[GDBserver] Don't error in reinsert_raw_breakpoint if bp->inserted
[external/binutils.git] / gdb / gdbserver / ChangeLog
1 2016-04-25  Yao Qi  <yao.qi@linaro.org>
2
3         * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
4         return instead of error.
5
6 2016-04-22  Yao Qi  <yao.qi@linaro.org>
7
8         * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
9         to 23.
10
11 2016-04-22  Yao Qi  <yao.qi@linaro.org>
12
13         * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
14         signal when stepping over breakpoint with software single
15         step.
16
17 2016-04-21  Pedro Alves  <palves@redhat.com>
18
19         * linux-s390-low.c (s390_collect_ptrace_register)
20         (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
21         add casts.
22         (s390_check_regset): Use void * instead of gdb_byte *.
23
24 2016-04-20  Pedro Alves  <palves@redhat.com>
25
26         * configure: Renegerate.
27
28 2016-04-20  Yao Qi  <yao.qi@linaro.org>
29
30         * linux-aarch32-low.c: Include "arch/arm-linux.h".
31         (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
32         number 16.
33         (arm_store_gregset): Likewise.
34
35 2016-04-16  Walfred Tedeschi  <walfred.tedeschi@intel.com>
36
37         * Makefile.in (clean): Add removal for i386-avx-mpx.c,
38         i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
39         (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
40         (amd64-avx-mpx-linux.c): New rules.
41         (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
42         * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
43         (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
44         (srv_amd64_regobj): Add amd64-avx-mpx.o.
45         (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
46         (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
47         (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
48         (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
49         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
50         (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
51         (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
52         * linux-x86-low.c (x86_linux_read_description): Add case for
53         X86_XSTATE_AVX_MPX_MASK.
54         (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
55         (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
56         init_registers_i386_avx_mpx_linux.
57         * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
58         (initialize_low_tracepoint): Call
59         init_registers_i386_avx_mpx_linux.
60         * linux-amd64-ipa.c (get_ipa_tdesc):  Add case for avx_mpx.
61         (initialize_low_tracepoint): Call
62         init_registers_amd64_avx_mpx_linux.
63         * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
64         (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
65         (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
66         declarations.
67
68 2016-04-18  Pedro Alves  <palves@redhat.com>
69
70         * configure: Regenerate.
71
72 2016-04-13  Antoine Tremblay  <antoine.tremblay@ericsson.com>
73
74         * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
75         (aarch64_emit_sub): Likewise.
76
77 2016-04-12  Pedro Alves  <palves@redhat.com>
78
79         * utils.c (prepare_to_throw_exception): Delete.
80
81 2016-04-05  Simon Marchi  <simon.marchi@ericsson.com>
82
83         * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
84
85 2016-04-05  Marcin Kościelnicki  <koriakin@0x04.net>
86
87         * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
88
89 2016-04-03  Marcin Kościelnicki  <koriakin@0x04.net>
90
91         * linux-aarch64-ipa.c: Add <elf.h> include.
92         * linux-ppc-ipa.c: Add <elf.h> include.
93         * linux-s390-ipa.c: Add <elf.h> include.
94
95 2016-03-31  Marcin Kościelnicki  <koriakin@0x04.net>
96
97         * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
98         (get_raw_reg_ptr): Likewise.
99         (get_trace_state_variable_value_ptr): Likewise.
100         (set_trace_state_variable_value_ptr): Likewise.
101         (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
102         char *.
103
104 2016-03-31  Wei-cheng Wang  <cole945@gmail.com>
105             Marcin Kościelnicki  <koriakin@0x04.net>
106
107         PR/17221
108         * linux-ppc-low.c (emit_insns): New function.
109         (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
110         (ppc_emit_prologue): New function.
111         (ppc_emit_epilogue): New function.
112         (ppc_emit_add): New function.
113         (ppc_emit_sub): New function.
114         (ppc_emit_mul): New function.
115         (ppc_emit_lsh): New function.
116         (ppc_emit_rsh_signed): New function.
117         (ppc_emit_rsh_unsigned): New function.
118         (ppc_emit_ext): New function.
119         (ppc_emit_zero_ext): New function.
120         (ppc_emit_log_not): New function.
121         (ppc_emit_bit_and): New function.
122         (ppc_emit_bit_or): New function.
123         (ppc_emit_bit_xor): New function.
124         (ppc_emit_bit_not): New function.
125         (ppc_emit_equal): New function.
126         (ppc_emit_less_signed): New function.
127         (ppc_emit_less_unsigned): New function.
128         (ppc_emit_ref): New function.
129         (ppc_emit_const): New function.
130         (ppc_emit_reg): New function.
131         (ppc_emit_pop): New function.
132         (ppc_emit_stack_flush): New function.
133         (ppc_emit_swap): New function.
134         (ppc_emit_stack_adjust): New function.
135         (ppc_emit_call): New function.
136         (ppc_emit_int_call_1): New function.
137         (ppc_emit_void_call_2): New function.
138         (ppc_emit_if_goto): New function.
139         (ppc_emit_goto): New function.
140         (ppc_emit_eq_goto): New function.
141         (ppc_emit_ne_goto): New function.
142         (ppc_emit_lt_goto): New function.
143         (ppc_emit_le_goto): New function.
144         (ppc_emit_gt_goto): New function.
145         (ppc_emit_ge_goto): New function.
146         (ppc_write_goto_address): New function.
147         (ppc_emit_ops_impl): New static variable.
148         (ppc64v1_emit_prologue): New function.
149         (ppc64v2_emit_prologue): New function.
150         (ppc64_emit_epilogue): New function.
151         (ppc64_emit_add): New function.
152         (ppc64_emit_sub): New function.
153         (ppc64_emit_mul): New function.
154         (ppc64_emit_lsh): New function.
155         (ppc64_emit_rsh_signed): New function.
156         (ppc64_emit_rsh_unsigned): New function.
157         (ppc64_emit_ext): New function.
158         (ppc64_emit_zero_ext): New function.
159         (ppc64_emit_log_not): New function.
160         (ppc64_emit_bit_and): New function.
161         (ppc64_emit_bit_or): New function.
162         (ppc64_emit_bit_xor): New function.
163         (ppc64_emit_bit_not): New function.
164         (ppc64_emit_equal): New function.
165         (ppc64_emit_less_signed): New function.
166         (ppc64_emit_less_unsigned): New function.
167         (ppc64_emit_ref): New function.
168         (ppc64_emit_const): New function.
169         (ppc64v1_emit_reg): New function.
170         (ppc64v2_emit_reg): New function.
171         (ppc64_emit_pop): New function.
172         (ppc64_emit_stack_flush): New function.
173         (ppc64_emit_swap): New function.
174         (ppc64v1_emit_call): New function.
175         (ppc64v2_emit_call): New function.
176         (ppc64v1_emit_int_call_1): New function.
177         (ppc64v2_emit_int_call_1): New function.
178         (ppc64v1_emit_void_call_2): New function.
179         (ppc64v2_emit_void_call_2): New function.
180         (ppc64_emit_if_goto): New function.
181         (ppc64_emit_eq_goto): New function.
182         (ppc64_emit_ne_goto): New function.
183         (ppc64_emit_lt_goto): New function.
184         (ppc64_emit_le_goto): New function.
185         (ppc64_emit_gt_goto): New function.
186         (ppc64_emit_ge_goto): New function.
187         (ppc64v1_emit_ops_impl): New static variable.
188         (ppc64v2_emit_ops_impl): New static variable.
189         (ppc_emit_ops): New function.
190         (linux_low_target): Wire in ppc_emit_ops.
191
192 2016-03-31  Wei-cheng Wang  <cole945@gmail.com>
193             Marcin Kościelnicki  <koriakin@0x04.net>
194
195         PR/17221
196         * Makefile.in: Add powerpc-*-ipa.o
197         * configure.srv: Add ipa_obj for powerpc*-linux.
198         * linux-ppc-ipa.c: New file.
199         * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
200         includes.
201         (PPC_FIELD): New macro.
202         (PPC_SEXT): New macro.
203         (PPC_OP6): New macro.
204         (PPC_BO): New macro.
205         (PPC_LI): New macro.
206         (PPC_BD): New macro.
207         (init_registers_*): Move prototype to linux-ppc-tdesc.h.
208         (tdesc_*): Move declaration to linux-ppc-tdesc.h.
209         (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
210         (ppc_get_thread_area): New function.
211         (is_elfv2_inferior): New function.
212         (gen_ds_form): New function.
213         (GEN_STD): New macro.
214         (GEN_STDU): New macro.
215         (GEN_LD): New macro.
216         (GEN_LDU): New macro.
217         (gen_d_form): New function.
218         (GEN_ADDI): New macro.
219         (GEN_ADDIS): New macro.
220         (GEN_LI): New macro.
221         (GEN_LIS): New macro.
222         (GEN_ORI): New macro.
223         (GEN_ORIS): New macro.
224         (GEN_LWZ): New macro.
225         (GEN_STW): New macro.
226         (GEN_STWU): New macro.
227         (gen_xfx_form): New function.
228         (GEN_MFSPR): New macro.
229         (GEN_MTSPR): New macro.
230         (GEN_MFCR): New macro.
231         (GEN_MTCR): New macro.
232         (GEN_SYNC): New macro.
233         (GEN_LWSYNC): New macro.
234         (gen_x_form): New function.
235         (GEN_OR): New macro.
236         (GEN_MR): New macro.
237         (GEN_LWARX): New macro.
238         (GEN_STWCX): New macro.
239         (GEN_CMPW): New macro.
240         (gen_md_form): New function.
241         (GEN_RLDICL): New macro.
242         (GEN_RLDICR): New macro.
243         (gen_i_form): New function.
244         (GEN_B): New macro.
245         (GEN_BL): New macro.
246         (gen_b_form): New function.
247         (GEN_BNE): New macro.
248         (GEN_LOAD): New macro.
249         (GEN_STORE): New macro.
250         (gen_limm): New function.
251         (gen_atomic_xchg): New function.
252         (gen_call): New function.
253         (ppc_relocate_instruction): New function.
254         (ppc_install_fast_tracepoint_jump_pad): New function.
255         (ppc_get_min_fast_tracepoint_insn_len): New function.
256         (ppc_get_ipa_tdesc_idx): New function.
257         (the_low_target): Wire in the new functions.
258         (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
259         tdescs.
260         * linux-ppc-tdesc.h: New file.
261
262 2016-03-31  Marcin Kościelnicki  <koriakin@0x04.net>
263
264         * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
265         (alloc_jump_pad_buffer): New function.
266         * linux-amd64-ipa.c: Add <sys/mman.h> include.
267         (alloc_jump_pad_buffer): New function.
268         * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
269         * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
270         (alloc_jump_pad_buffer): New function.
271         * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
272         (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
273         * tracepoint.h (alloc_jump_pad_buffer): New prototype.
274         (getauxval) [!HAVE_GETAUXVAL]: New prototype.
275
276 2016-03-30  Marcin Kościelnicki  <koriakin@0x04.net>
277
278         * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
279         * linux-amd64-ipa.c: Likewise.
280         * linux-i386-ipa.c: Likewise.
281         * linux-s390-ipa.c: Likewise.
282         * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
283         ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
284         set_trace_state_variable_value_ptr.
285         (struct ipa_sym_addresses): Likewise.
286         (symbol_list): Likewise.
287         (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
288         accessing gdb_collect directly.
289         (gdb_collect_ptr_type): New typedef.
290         (get_raw_reg_ptr_type): New typedef.
291         (get_trace_state_variable_value_ptr_type): New typedef.
292         (set_trace_state_variable_value_ptr_type): New typedef.
293         (gdb_collect_ptr): New global.
294         (get_raw_reg_ptr): New global.
295         (get_trace_state_variable_value_ptr): New global.
296         (set_trace_state_variable_value_ptr): New global.
297         (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
298         accessing get_raw_reg directly.
299         (get_get_tsv_func_addr): Likewise for
300         get_trace_state_variable_value_ptr.
301         (get_set_tsv_func_addr): Likewise for
302         set_trace_state_variable_value_ptr.
303         * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
304
305 2016-03-30  Simon Marchi  <simon.marchi@ericsson.com>
306
307         * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
308
309 2016-03-30  Marcin Kościelnicki  <koriakin@0x04.net>
310
311         * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
312         packets.
313         (relocate_instruction): Remove own_buf.
314         * server.c (own_buf): Make global.
315         (handle_v_requests): Make global.
316         * server.h (own_buf): New declaration.
317         (handle_v_requests): New prototype.
318
319 2016-03-29  Marcin Kościelnicki  <koriakin@0x04.net>
320
321         PR 18377
322         * linux-s390-low.c (add_insns): New function.
323         (s390_emit_prologue): New function.
324         (s390_emit_epilogue): New function.
325         (s390_emit_add): New function.
326         (s390_emit_sub): New function.
327         (s390_emit_mul): New function.
328         (s390_emit_lsh): New function.
329         (s390_emit_rsh_signed): New function.
330         (s390_emit_rsh_unsigned): New function.
331         (s390_emit_ext): New function.
332         (s390_emit_log_not): New function.
333         (s390_emit_bit_and): New function.
334         (s390_emit_bit_or): New function.
335         (s390_emit_bit_xor): New function.
336         (s390_emit_bit_not): New function.
337         (s390_emit_equal): New function.
338         (s390_emit_less_signed): New function.
339         (s390_emit_less_unsigned): New function.
340         (s390_emit_ref): New function.
341         (s390_emit_if_goto): New function.
342         (s390_emit_goto): New function.
343         (s390_write_goto_address): New function.
344         (s390_emit_litpool): New function.
345         (s390_emit_const): New function.
346         (s390_emit_call): New function.
347         (s390_emit_reg): New function.
348         (s390_emit_pop): New function.
349         (s390_emit_stack_flush): New function.
350         (s390_emit_zero_ext): New function.
351         (s390_emit_swap): New function.
352         (s390_emit_stack_adjust): New function.
353         (s390_emit_set_r2): New function.
354         (s390_emit_int_call_1): New function.
355         (s390_emit_void_call_2): New function.
356         (s390_emit_eq_goto): New function.
357         (s390_emit_ne_goto): New function.
358         (s390_emit_lt_goto): New function.
359         (s390_emit_le_goto): New function.
360         (s390_emit_gt_goto): New function.
361         (s390_emit_ge_goto): New function.
362         (s390x_emit_prologue): New function.
363         (s390x_emit_epilogue): New function.
364         (s390x_emit_add): New function.
365         (s390x_emit_sub): New function.
366         (s390x_emit_mul): New function.
367         (s390x_emit_lsh): New function.
368         (s390x_emit_rsh_signed): New function.
369         (s390x_emit_rsh_unsigned): New function.
370         (s390x_emit_ext): New function.
371         (s390x_emit_log_not): New function.
372         (s390x_emit_bit_and): New function.
373         (s390x_emit_bit_or): New function.
374         (s390x_emit_bit_xor): New function.
375         (s390x_emit_bit_not): New function.
376         (s390x_emit_equal): New function.
377         (s390x_emit_less_signed): New function.
378         (s390x_emit_less_unsigned): New function.
379         (s390x_emit_ref): New function.
380         (s390x_emit_if_goto): New function.
381         (s390x_emit_const): New function.
382         (s390x_emit_call): New function.
383         (s390x_emit_reg): New function.
384         (s390x_emit_pop): New function.
385         (s390x_emit_stack_flush): New function.
386         (s390x_emit_zero_ext): New function.
387         (s390x_emit_swap): New function.
388         (s390x_emit_stack_adjust): New function.
389         (s390x_emit_int_call_1): New function.
390         (s390x_emit_void_call_2): New function.
391         (s390x_emit_eq_goto): New function.
392         (s390x_emit_ne_goto): New function.
393         (s390x_emit_lt_goto): New function.
394         (s390x_emit_le_goto): New function.
395         (s390x_emit_gt_goto): New function.
396         (s390x_emit_ge_goto): New function.
397         (s390_emit_ops): New function.
398         (struct linux_target_ops): Fill in emit_ops hook.
399
400 2016-03-29  Marcin Kościelnicki  <koriakin@0x04.net>
401
402         PR 18377
403         * Makefile.in: Add s390 IPA files.
404         * configure.srv: Build IPA for s390.
405         * linux-s390-ipa.c: New file.
406         * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
407         (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
408         (tdesc_s390_linux32): Likewise.
409         (init_registers_s390_linux32v1): Likewise.
410         (tdesc_s390_linux32v1): Likewise.
411         (init_registers_s390_linux32v2): Likewise.
412         (tdesc_s390_linux32v2): Likewise.
413         (init_registers_s390_linux64): Likewise.
414         (tdesc_s390_linux64): Likewise.
415         (init_registers_s390_linux64v1): Likewise.
416         (tdesc_s390_linux64v1): Likewise.
417         (init_registers_s390_linux64v2): Likewise.
418         (tdesc_s390_linux64v2): Likewise.
419         (init_registers_s390_te_linux64): Likewise.
420         (tdesc_s390_te_linux64): Likewise.
421         (init_registers_s390_vx_linux64): Likewise.
422         (tdesc_s390_vx_linux64): Likewise.
423         (init_registers_s390_tevx_linux64): Likewise.
424         (tdesc_s390_tevx_linux64): Likewise.
425         (init_registers_s390x_linux64): Likewise.
426         (tdesc_s390x_linux64): Likewise.
427         (init_registers_s390x_linux64v1): Likewise.
428         (tdesc_s390x_linux64v1): Likewise.
429         (init_registers_s390x_linux64v2): Likewise.
430         (tdesc_s390x_linux64v2): Likewise.
431         (init_registers_s390x_te_linux64): Likewise.
432         (tdesc_s390x_te_linux64): Likewise.
433         (init_registers_s390x_vx_linux64): Likewise.
434         (tdesc_s390x_vx_linux64): Likewise.
435         (init_registers_s390x_tevx_linux64): Likewise.
436         (tdesc_s390x_tevx_linux64): Likewise.
437         (have_hwcap_s390_vx): New static variable.
438         (s390_arch_setup): Fill have_hwcap_s390_vx.
439         (s390_get_thread_area): New function.
440         (s390_ft_entry_gpr_esa): New const.
441         (s390_ft_entry_gpr_zarch): New const.
442         (s390_ft_entry_misc): New const.
443         (s390_ft_entry_fr): New const.
444         (s390_ft_entry_vr): New const.
445         (s390_ft_main_31): New const.
446         (s390_ft_main_64): New const.
447         (s390_ft_exit_fr): New const.
448         (s390_ft_exit_vr): New const.
449         (s390_ft_exit_misc): New const.
450         (s390_ft_exit_gpr_esa): New const.
451         (s390_ft_exit_gpr_zarch): New const.
452         (append_insns): New function.
453         (s390_relocate_instruction): New function.
454         (s390_install_fast_tracepoint_jump_pad): New function.
455         (s390_get_min_fast_tracepoint_insn_len): New function.
456         (s390_get_ipa_tdesc_idx): New function.
457         (struct linux_target_ops): Wire in the above functions.
458         (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
459         * linux-s390-tdesc.h: New file.
460
461 2016-03-29  Marcin Kościelnicki  <koriakin@0x04.net>
462
463         * linux-s390-low.c (s390_supports_tracepoints): New function.
464         (struct linux_target_ops): Fill supports_tracepoints hook.
465
466 2016-03-18  Yao Qi  <yao.qi@linaro.org>
467
468         * linux-low.c (lwp_signal_can_be_delivered): New function.
469         (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
470
471 2016-03-18  Yao Qi  <yao.qi@linaro.org>
472
473         * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
474         0 if signal is enqueued.  Remove 'signal' from one debugging
475         message.  Move one debugging message to some lines below.
476         Remove code setting 'signal' to 0.
477
478 2016-03-18  Yao Qi  <yao.qi@linaro.org>
479
480         * linux-low.c (linux_low_filter_event): Remove redundant
481         WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
482
483 2016-03-09  Marcin Kościelnicki  <koriakin@0x04.net>
484
485         * linux-ppc-low.c (ppc_supports_tracepoints): New function.
486         (struct linux_target_ops): Wire in the above.
487
488 2016-03-03  Yao Qi  <yao.qi@linaro.org>
489
490         * linux-low.c: Update comments to start_step_over.
491
492 2016-03-03  Yao Qi  <yao.qi@linaro.org>
493
494         PR server/19736
495         * linux-low.c (handle_extended_wait): Set child suspended
496         if event_lwp->bp_reinsert isn't zero.
497
498 2016-03-02  Yao Qi  <yao.qi@linaro.org>
499
500         * linux-low.c (linux_resume_one_lwp_throw): Replace code with
501         enqueue_pending_signal.
502
503 2016-03-02  Marcin Kościelnicki  <koriakin@0x04.net>
504
505         * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
506         is actually loaded.
507
508 2016-02-25  Marcin Kościelnicki  <koriakin@0x04.net>
509
510         * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
511         (s390_regmap_3264) [!__s390x__]: New global.
512         (s390_collect_ptrace_register): Skip map entries containing -1.
513         (s390_supply_ptrace_register): Ditto.
514         (s390_fill_gprs_high): New function.
515         (s390_store_gprs_high): New function.
516         (s390_regsets): Add NT_S390_HIGH_GPRS.
517         (s390_get_hwcap): Enable on 31-bit.
518         (have_hwcap_s390_high_gprs): Enable on 31-bit.
519         (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
520         Detect NT_S390_HIGH_GPRS.
521         (s390_usrregs_info_3264): Enable on 31-bit.
522         (s390_regs_info): Enable regs_info_3264 on 31-bit.
523         (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
524
525 2016-02-25  Marcin Kościelnicki  <koriakin@0x04.net>
526
527         PR gdb/13808
528         * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
529         * configure.srv: Ditto.
530         * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
531         (initialize_low_tracepoint): Remove ipa_tdesc assignment.
532         * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
533         (init_registers_amd64_linux): Remove prototype.
534         (tdesc_amd64_linux): Remove declaration.
535         (get_ipa_tdesc): New function.
536         (initialize_low_tracepoint): Remove ipa_tdesc assignment,
537         initialize remaining tdescs.
538         * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
539         (init_registers_i386_linux): Remove prototype.
540         (tdesc_i386_linux): Remove declaration.
541         (get_ipa_tdesc): New function.
542         (initialize_low_tracepoint): Remove ipa_tdesc assignment,
543         initialize remaining tdescs.
544         * linux-low.c (linux_get_ipa_tdesc_idx): New function.
545         (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
546         * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
547         * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
548         (x86_get_ipa_tdesc_idx): New function.
549         (the_low_target): Wire in x86_get_ipa_tdesc_idx.
550         * linux-x86-tdesc.h: New file.
551         * target.h (struct target_ops): Add get_ipa_tdesc_idx.
552         (target_get_ipa_tdesc_idx): New macro.
553         * tracepoint.c (ipa_tdesc_idx): New macro.
554         (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
555         (symbol_list): Add ipa_tdesc_idx.
556         (cmd_qtstart): Write ipa_tdesc_idx in the target.
557         (ipa_tdesc): Remove.
558         (ipa_tdesc_idx): New variable.
559         (get_context_regcache): Use get_ipa_tdesc.
560         (gdb_collect): Ditto.
561         (gdb_probe): Ditto.
562         * tracepoint.h (get_ipa_tdesc): New prototype.
563         (ipa_tdesc): Remove.
564
565 2016-02-24  Pedro Alves  <palves@redhat.com>
566
567         * linux-low.c (check_stopped_by_breakpoint): Rename to ...
568         (save_stop_reason): ... this.  Use GDB_ARCH_IS_TRAP_HWBKPT and
569         handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
570         Factor out common code between the USE_SIGTRAP_SIGINFO and
571         !USE_SIGTRAP_SIGINFO blocks.
572         (linux_low_filter_event): Call save_stop_reason instead of
573         check_stopped_by_breakpoint and check_stopped_by_watchpoint.
574         Update comments.
575         (linux_wait_1): Update comments.
576
577 2016-02-24  Wei-cheng Wang  <cole945@gmail.com>
578
579         * linux-ppc-low.c (ppc_supports_z_point_type): New function:
580         (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
581         (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
582         ppc_insert_point, ppc_remove_point.
583
584 2016-02-17  Marcin Kościelnicki  <koriakin@0x04.net>
585
586         * linux-s390-low.c (s390_supports_z_point_type): New function.
587         (struct linux_target_ops): Wire s390_supports_z_point_type in.
588
589 2016-02-16  Yao Qi  <yao.qi@linaro.org>
590
591         * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
592         PC.  Get pc from regcache_read_pc.
593
594 2016-02-12  Yao Qi  <yao.qi@linaro.org>
595
596         * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
597         or linux_get_pc_32bit.
598         (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
599
600 2016-02-12  Yao Qi  <yao.qi@linaro.org>
601
602         * linux-arm-low.c (get_next_pcs_ops): Initialize it with
603         arm_linux_get_next_pcs_fixup.
604
605 2016-02-12  Marcin Kościelnicki  <koriakin@0x04.net>
606
607         * tracepoint.c (x_tracepoint_action_download): Change
608         write_inferior_data_ptr to write_inferior_data_pointer.
609         (cmd_qtstart): Likewise.
610         (write_inferior_data_ptr): Remove.
611         (download_agent_expr): Change write_inferior_data_ptr to
612         write_inferior_data_pointer.
613         (download_tracepoint_1): Likewise.
614         (download_tracepoint): Likewise.
615         (download_trace_state_variables): Likewise.
616
617 2016-02-11  Wei-cheng Wang  <cole945@gmail.com>
618             Marcin Kościelnicki  <koriakin@0x04.net>
619
620         * tracepoint.c (struct tracepoint_action_ops): Remove.
621         (struct tracepoint_action): Remove ops.
622         (m_tracepoint_action_download, r_tracepoint_action_download)
623         (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
624         size and offset accordingly.
625         (m_tracepoint_action_ops, r_tracepoint_action_ops)
626         (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
627         (tracepoint_action_send, tracepoint_action_download): New functions.
628         Helpers for trace action handlers.
629         (add_tracepoint_action): Remove setup actions ops.
630         (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
631
632 2016-02-10  Yao Qi  <yao.qi@linaro.org>
633
634         * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
635
636 2016-02-09  Simon Marchi  <simon.marchi@ericsson.com>
637
638         * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
639         to AC_OUTPUT.
640         * configure: Regenerate.
641
642 2016-02-09  Simon Marchi  <simon.marchi@ericsson.com>
643
644         * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
645         void * to gdb_byte *.
646         * linux-low.c (siginfo_fixup): Likewise.
647         (linux_xfer_siginfo): Likewise.
648         * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
649         Likewise.
650         * linux-x86-low.c (x86_siginfo_fixup): Likewise.
651
652 2016-02-02  Walfred Tedeschi  <walfred.tedeschi@intel.com>
653
654         * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
655         to srv_tgtobj.
656         (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
657         to srv_tgtobj.
658         * linux-x86-low.c [__x86_64__]: Include
659         "nat/amd64-linux-siginfo.h".
660         (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
661         (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
662         (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
663         (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
664         (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
665         (cpt_si_fd, si_timerid, si_overrun): Move from
666         nat/amd64-linux-siginfo.c.
667         * Makefile.in (amd64-linux-siginfo.o:): New rule.
668
669 2016-01-28  Simon Marchi  <simon.marchi@ericsson.com>
670
671         * server.c (skip_to_semicolon):  Remove.
672         (process_point_options): Use strchrnul instead of
673         skip_to_semicolon.
674
675 2016-01-26  Yao Qi  <yao.qi@linaro.org>
676
677         * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
678         * linux-low.c (install_software_single_step_breakpoints): Don't
679         call regcache_read_pc.
680         * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
681         argument pc.
682
683 2016-01-26  Yao Qi  <yao.qi@linaro.org>
684
685         * linux-low.c (install_software_single_step_breakpoints): Call
686         regcache_read_pc instead of get_pc.
687
688 2016-01-26  Yao Qi  <yao.qi@linaro.org>
689
690         * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
691         (unblock_async_io): Rename to ...
692         (block_unblock_async_io): ... it.  New function.
693         (enable_async_io): Don't install SIGIO handler.  Unblock it
694         instead.
695         (disable_async_io): Don't ignore SIGIO.  Block it instead.
696         (initialize_async_io): Install SIGIO handler.  Don't call
697         unblock_async_io.
698
699 2016-01-26  Yao Qi  <yao.qi@linaro.org>
700
701         * remote-utils.c (getpkt): If the buffer isn't empty, and the
702         first character is '\003', call *the_target->request_interrupt.
703
704 2016-01-25  Yao Qi  <yao.qi@linaro.org>
705
706         * remote-utils.c (new_thread_notify): Remove.
707         (dead_thread_notify): Likewise.
708         * remote-utils.h (new_thread_notify): Remove declaration.
709         (dead_thread_notify): Likewise.
710
711 2016-01-23  Marcin Kościelnicki  <koriakin@0x04.net>
712
713         * gdb.trace/pending.exp: Fix expected message on continue.
714
715 2016-01-22  Marcin Kościelnicki  <koriakin@0x04.net>
716
717         * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
718         it works properly on big-endian machines where sizeof (CORE_ADDR)
719         != sizeof (void *).
720
721 2016-01-21  Pedro Alves  <palves@redhat.com>
722
723         * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
724         (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
725         * configure: Regenerate.
726
727 2016-01-21  Yao Qi  <yao.qi@linaro.org>
728
729         * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
730         is_thumb and set it according to CPSR saved on the stack.
731         (get_next_pcs_syscall_next_pc): Pass is_thumb to
732         arm_sigreturn_next_pc.
733
734 2016-01-18  Yao Qi  <yao.qi@linaro.org>
735
736         * linux-low.c (linux_set_pc_64bit): New function.
737         (linux_get_pc_64bit): New function.
738         * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
739         Declare.
740         * linux-sparc-low.c (debug_threads): Remove declaration.
741         (sparc_get_pc): Remove.
742         (the_low_target): Use linux_get_pc_64bit instead of
743         sparc_get_pc.
744         * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
745         (the_low_target): Use linux_get_pc_64bit and
746         linux_set_pc_64bit.
747
748 2016-01-18  Yao Qi  <yao.qi@linaro.org>
749
750         * linux-arm-low.c (debug_threads): Remove declaration.
751         (arm_get_pc, arm_set_pc): Remove.
752         (the_low_target): Use linux_get_pc_32bit and
753         linux_set_pc_32bit.
754         * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
755         (the_low_target): Use linux_get_pc_32bit and
756         linux_set_pc_32bit.
757         * linux-cris-low.c (debug_threads): Remove declaration.
758         (cris_get_pc, cris_set_pc,): Remove.
759         (the_low_target): Use linux_get_pc_32bit and
760         linux_set_pc_32bit.
761         * linux-crisv32-low.c (debug_threads): Remove declaration.
762         (cris_get_pc, cris_set_pc): Remove.
763         (the_low_target): Use linux_get_pc_32bit and
764         linux_set_pc_32bit.
765         * linux-low.c: Include inttypes.h.
766         (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
767         * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
768         * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
769         (the_low_target): Use linux_get_pc_32bit and
770         linux_set_pc_32bit.
771         * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
772         (the_low_target): Use linux_get_pc_32bit and
773         linux_set_pc_32bit.
774         * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
775         (the_low_target): Use linux_get_pc_32bit and
776         linux_set_pc_32bit.
777         * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
778         (the_low_target): Use linux_get_pc_32bit and
779         linux_set_pc_32bit.
780         * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
781         (the_low_target): Use linux_get_pc_32bit and
782         linux_set_pc_32bit.
783
784 2016-01-18  Gary Benson  <gbenson@redhat.com>
785
786         * configure.ac (AC_FUNC_FORK): New check.
787         * config.in: Regenerate.
788         * configure: Likewise.
789
790 2016-01-14  Yao Qi  <yao.qi@linaro.org>
791
792         * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
793         * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
794         * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
795         arm_get_next_pcs_ctor.
796
797 2016-01-12  Josh Stone  <jistone@redhat.com>
798             Philippe Waroquiers  <philippe.waroquiers@skynet.be>
799
800         * inferiors.h: Include "gdb_vecs.h".
801         (struct process_info): Add syscalls_to_catch.
802         * inferiors.c (remove_process): Free syscalls_to_catch.
803         * remote-utils.c (prepare_resume_reply): Report syscall_entry and
804         syscall_return stops.
805         * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
806         * server.c (handle_general_set): Handle QCatchSyscalls.
807         (handle_query): Report support for QCatchSyscalls.
808         * target.h (struct target_ops): Add supports_catch_syscall.
809         (target_supports_catch_syscall): New macro.
810         * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
811         (struct lwp_info): Add syscall_state.
812         * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
813         Maintain syscall_state and syscalls_to_catch across exec.
814         (get_syscall_trapinfo): New function, proxy to the_low_target.
815         (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
816         (linux_low_filter_event): Toggle syscall_state entry/return for
817         syscall traps, and set it ignored for all others.
818         (gdb_catching_syscalls_p): New function.
819         (gdb_catch_this_syscall_p): New function.
820         (linux_wait_1): Handle SYSCALL_SIGTRAP.
821         (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
822         (linux_supports_catch_syscall): New function.
823         (linux_target_ops): Install it.
824         * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
825         (the_low_target): Install it.
826
827 2016-01-12  Mike Frysinger  <vapier@gentoo.org>
828
829         * acinclude.m4: Include new ../warning.m4 file.
830         * configure: Regenerated.
831         * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
832
833 2016-01-12  Mike Frysinger  <vapier@gentoo.org>
834
835         * ax.c (is_goto_target): Mark static.
836         * linux-low.c (register_addr): Likewise.
837         (linux_fetch_registers, linux_store_registers): Likewise.
838         * mem-break.c (any_persistent_commands): Fix old prototype.
839         (add_commands_to_breakpoint): Mark static.
840         * regcache.c (find_register_by_name): Delete unused func.
841         * remote-utils.c (hex_or_minus_one): Mark static.
842         * server.c (monitor_show_help): Mark static.
843         (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
844         handle_v_requests): Likewise.
845
846 2016-01-12  Pedro Alves  <palves@redhat.com>
847
848         Remove use of the registered trademark symbol throughout.
849
850 2016-01-08  Yao Qi  <yao.qi@linaro.org>
851
852         * remote-utils.c (getpkt): If c is '\003', call target hook
853         request_interrupt.
854
855 2016-01-06  Yao Qi  <yao.qi@linaro.org>
856
857         * linux-aarch32-low.h (arm_abi_breakpoint): Move to
858         linux-aarch32-low.c.
859         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
860         (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
861         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
862         (thumb2_breakpoint): Declare.
863         * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
864         linux-aarch32-low.h.
865         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
866         (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
867         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
868
869 2016-01-01  Joel Brobecker  <brobecker@adacore.com>
870
871         * gdbreplay.c (gdbreplay_version): Change copyright year in
872         version message.
873         * server.c (gdbserver_version): Likewise.
874
875 2015-12-28  Patrick Palka  <patrick@parcs.ath.cx>
876
877         * server.c (crc32_table): Delete.
878         (crc32): Use libiberty's xcrc32 function.
879
880 2015-12-22  Joel Brobecker  <brobecker@adacore.com>
881
882         * lynx-low.c (lynx_delete_thread_callback): New function.
883         (lynx_mourn): Properly delete our process and all of its
884         threads.  Remove call to clear_inferiors.
885
886 2015-12-22  Joel Brobecker  <brobecker@adacore.com>
887
888         * target.c (thread_search_callback): Add check that
889         the thread_stopped target callback is not NULL before
890         calling it.
891
892 2015-12-21  Yao Qi  <yao.qi@linaro.org>
893
894         * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
895         arm breakpoint.
896
897 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
898
899         * server.c (handle_query): Call target_supports_software_single_step.
900
901 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
902
903         * linux-low.c (single_step): New function.
904         (linux_resume_one_lwp_throw): Call single_step.
905         (start_step_over): Likewise.
906
907 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
908
909         * Makefile.in (SFILES): Append arch/arm-linux.c,
910         arch/arm-get-next-pcs.c.
911         (arm-linux.o): New rule.
912         (arm-get-next-pcs.o): New rule.
913         * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
914         arm-linux.o.
915         * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro.  Moved
916         to linux-aarch32-low.c.
917         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
918         (arm_breakpoint_len, thumb_breakpoint): Likewise.
919         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
920         (thumb2_breakpoint_len): Likewise.
921         (arm_is_thumb_mode): Make non-static.
922         * linux-aarch32-low.h (arm_abi_breakpoint): New macro.  Moved
923         from linux-aarch32-low.c.
924         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
925         (arm_breakpoint_len, thumb_breakpoint): Likewise.
926         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
927         (thumb2_breakpoint_len): Likewise.
928         (arm_is_thumb_mode): New declaration.
929         * linux-arm-low.c: Include arch/arm-linux.h
930         aarch/arm-get-next-pcs.h, sys/syscall.h.
931         (get_next_pcs_ops): New struct.
932         (get_next_pcs_addr_bits_remove): New function.
933         (get_next_pcs_is_thumb): New function.
934         (get_next_pcs_read_memory_unsigned_integer): Likewise.
935         (arm_sigreturn_next_pc): Likewise.
936         (get_next_pcs_syscall_next_pc): Likewise.
937         (arm_gdbserver_get_next_pcs): Likewise.
938         (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
939         Initialize.
940         * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
941         * server.h: Include gdb_vecs.h.
942
943 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
944
945         * Makefile.in (SFILES): Append common/common-regcache.c.
946         (OBS): Append common-regcache.o.
947         (common-regcache.o): New rule.
948         * regcache.c (init_register_cache): Initialize cache to
949         REG_UNAVAILABLE.
950         (regcache_raw_read_unsigned): New function.
951         * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
952         register_status enum.
953
954 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
955
956         * linux-aarch64-low.c (the_low_targets): Rename
957         breakpoint_reinsert_addr to get_next_pcs.
958         * linux-arm-low.c (the_low_targets): Likewise.
959         * linux-bfin-low.c (the_low_targets): Likewise.
960         * linux-cris-low.c (the_low_targets): Likewise.
961         * linux-crisv32-low.c (the_low_targets): Likewise.
962         * linux-low.c (can_software_single_step): Likewise.
963         (install_software_single_step_breakpoints): New function.
964         (start_step_over): Use install_software_single_step_breakpoints.
965         * linux-low.h: New CORE_ADDR vector.
966         (struct linux_target_ops) Rename breakpoint_reinsert_addr to
967         get_next_pcs.
968         * linux-mips-low.c (the_low_targets): Likewise.
969         * linux-nios2-low.c (the_low_targets): Likewise.
970         * linux-sparc-low.c (the_low_targets): Likewise.
971
972 2015-12-17  Pedro Alves  <palves@redhat.com>
973
974         * linux-low.c (linux_kill_one_lwp): Remove references to
975         LinuxThreads.
976         (kill_lwp): Remove HAVE_TKILL_SYSCALL check.  No longer fall back
977         to 'kill'.
978         (linux_init_signals): Delete.
979         (initialize_low): Adjust.
980         * thread-db.c (thread_db_init): Remove LinuxThreads reference.
981
982 2015-12-16  Pedro Alves  <palves@redhat.com>
983
984         * configure.ac (compiler warning flags): When testing a
985         -Wno-foo option, check whether -Wfoo works instead.
986         * configure: Regenerate.
987
988 2015-12-11  Don Breazeal  <donb@codesourcery.com>
989
990         * server.c (process_serial_event): Don't exit from gdbserver
991         in remote mode if there are still active inferiors.
992
993 2015-12-11  Yao Qi  <yao.qi@linaro.org>
994
995         * linux-aarch64-low.c (aarch64_breakpoint_at): Call
996         arm_breakpoint_at if the process is 32-bit.
997
998 2015-12-11  Yao Qi  <yao.qi@linaro.org>
999
1000         * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
1001         arm breakpoint.
1002
1003 2015-12-07  Yao Qi  <yao.qi@linaro.org>
1004
1005         * configure.srv: Append arm.o to srv_tgtobj for
1006         aarch64*-*-linux* target.
1007         * linux-aarch32-low.c (arm_abi_breakpoint): New macro.  Moved
1008         from linux-arm-low.c.
1009         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1010         (arm_breakpoint_len, thumb_breakpoint): Likewise.
1011         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1012         (thumb2_breakpoint_len): Likewise.
1013         (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
1014         (arm_breakpoint_kinds): Likewise.
1015         (arm_breakpoint_kind_from_pc): Likewise.
1016         (arm_sw_breakpoint_from_kind): Likewise.
1017         (arm_breakpoint_kind_from_current_state): Likewise.
1018         * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
1019         (arm_sw_breakpoint_from_kind): Declare.
1020         (arm_breakpoint_kind_from_current_state): Declare.
1021         (arm_breakpoint_at): Declare.
1022         * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
1023         arm_sw_breakpoint_from_kind if process is 32-bit.
1024         (aarch64_breakpoint_kind_from_pc): New function.
1025         (aarch64_breakpoint_kind_from_current_state): New function.
1026         (the_low_target): Initialize fields breakpoint_kind_from_pc
1027         and breakpoint_kind_from_current_state.
1028         * linux-arm-low.c (arm_breakpoint_kinds): Move to
1029         linux-aarch32-low.c.
1030         (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
1031         (arm_breakpoint, arm_breakpoint_len): Likewise.
1032         (thumb_breakpoint, thumb_breakpoint_len): Likewise.
1033         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1034         (arm_is_thumb_mode): Likewise.
1035         (arm_breakpoint_at): Likewise.
1036         (arm_breakpoint_kind_from_pc): Likewise.
1037         (arm_sw_breakpoint_from_kind): Likewise.
1038         (arm_breakpoint_kind_from_current_state): Likewise.
1039
1040         Revert:
1041         2015-08-04  Yao Qi  <yao.qi@linaro.org>
1042
1043         * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1044         0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1045         * server.c (extended_protocol): Remove "static".
1046         * server.h (extended_protocol): Declare it.
1047
1048 2015-12-04  Josh Stone  <jistone@redhat.com>
1049
1050         * target.h (struct target_ops) <arch_setup>: Rename to ...
1051         (struct target_ops) <post_create_inferior>: ... this.
1052         (target_arch_setup): Rename to ...
1053         (target_post_create_inferior): ... this, calling post_create_inferior.
1054         * server.c (start_inferior): Update target_arch_setup calls to
1055         target_post_create_inferior.
1056         * linux-low.c (linux_low_ptrace_options): Forward declare.
1057         (linux_arch_setup): Update its comment for general use.
1058         (linux_post_create_inferior): New, run arch_setup and setup ptrace.
1059         (struct linux_target_ops): Use linux_post_create_inferior.
1060         * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
1061         to post_create_inferior.
1062         * nto-low.c (struct nto_target_ops): Likewise.
1063         * spu-low.c (struct spu_target_ops): Likewise.
1064         * win32-low.c (struct win32_target_ops): Likewise.
1065
1066 2015-12-03  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1067
1068         * linux-arm-low.c: Remove duplicate arch/arm.h include.
1069
1070 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1071
1072         * linux-arm-low.c (arm_reinsert_addr): Remove function.
1073         (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
1074         * linux-cris-low.c (cris_reinsert_addr> Remove function.
1075         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1076         * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1077         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1078         * linux-mips-low.c (mips_reinsert_addr): Remove function.
1079         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1080         * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1081         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1082         * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1083         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1084
1085 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1086
1087         * linux-low.c (linux_look_up_symbols): Don't call
1088         linux_supports_traceclone.
1089         * linux-low.h (thread_db_init): Remove use_events argument.
1090         * thread-db.c (thread_db_use_event): Remove global variable.
1091         (struct thread_db) <td_thr_event_enable_p>: Remove field.
1092         (struct thread_db) <td_create_bp>: Remove field.
1093         (thread_db_create_event): Remove function.
1094         (thread_db_enable_reporting): Likewise.
1095         (find_one_thread): Don't check for thread_db_use_events.
1096         (attach_thread): Likewise.
1097         (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1098         (try_thread_db_load_1): Don't check for thread_db_use_events.
1099         (thread_db_init): Remove use_events argument and thread events
1100         handling.
1101         (remove_thread_event_breakpoints): Remove function.
1102         (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1103
1104 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1105
1106         * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
1107         New function.
1108         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1109         * linux-arm-low.c (arm_supports_hardware_single_step): New function.
1110         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1111         * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
1112         (struct linux_target_ops) <bfin_supports_hardware_single_step>:
1113         Initialize.
1114         * linux-crisv32-low.c (cris_supports_hardware_single_step):
1115         New function.
1116         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1117         * linux-low.c (can_hardware_single_step): Use
1118         supports_hardware_single_step.
1119         (can_software_single_step): New function.
1120         (start_step_over): Call can_software_single_step.
1121         (linux_supports_hardware_single_step): New function.
1122         (struct target_ops) <supports_software_single_step>: Initialize.
1123         * linux-low.h (struct linux_target_ops)
1124         <supports_hardware_single_step>: Initialize.
1125         * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
1126         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1127         * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
1128         (struct linux_target_ops) <supports_hardware_single_step> Initialize.
1129         * linux-s390-low.c (s390_supports_hardware_single_step): New function.
1130         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1131         * linux-sh-low.c (sh_supports_hardware_single_step): New function.
1132         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1133         * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
1134         (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
1135         Initialize.
1136         * linux-tile-low.c (tile_supports_hardware_single_step): New function.
1137         (struct linux_target_ops) <tile_supports_hardware_single_step>:
1138         Initialize.
1139         * linux-x86-low.c (x86_supports_hardware_single_step) New function.
1140         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1141         * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
1142         New function.
1143         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1144         * target.h (struct target_ops): <supports_software_single_step>:
1145         New field.
1146         (target_supports_software_single_step): New macro.
1147
1148 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1149
1150         * linux-low.c (linux_wait_1): Fix pc advance condition.
1151         * mem-break.c (reinsert_breakpoint_inserted_here): New function.
1152         * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
1153
1154 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1155
1156         * linux-arm-low.c (arm_is_thumb_mode): New function.
1157         (arm_breakpoint_at): Use arm_is_thumb_mode.
1158         (arm_breakpoint_kind_from_current_state): New function.
1159         (struct linux_target_ops) <breakpoint_kind_from_current_state>:
1160         Initialize.
1161         * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
1162         (linux_breakpoint_kind_from_current_state): New function.
1163         (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
1164         * linux-low.h (struct linux_target_ops)
1165         <breakpoint_kind_from_current_state>: New field.
1166         * target.h (struct target_ops): Likewise.
1167         (target_breakpoint_kind_from_current_state): New macro.
1168
1169 2015-11-30  Pedro Alves  <palves@redhat.com>
1170
1171         * linux-low.c (linux_resume): Wake up the event loop before
1172         returning.
1173
1174 2015-11-30  Pedro Alves  <palves@redhat.com>
1175
1176         * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
1177         check.
1178         (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
1179         to -1.
1180         * target.c (struct thread_search): New structure.
1181         (thread_search_callback): New function.
1182         (prev_general_thread): New global.
1183         (prepare_to_access_memory, done_accessing_memory): New functions.
1184         * target.h (prepare_to_access_memory, done_accessing_memory):
1185         Replace macros with function declarations.
1186
1187 2015-11-30  Pedro Alves  <palves@redhat.com>
1188
1189         PR 14618
1190         * linux-low.c (linux_wait_1): If the last resumed thread is gone,
1191         report TARGET_WAITKIND_NO_RESUMED.
1192         * remote-utils.c (prepare_resume_reply): Handle
1193         TARGET_WAITKIND_NO_RESUMED.
1194         * server.c (report_no_resumed): New global.
1195         (handle_query) <qSupported>: Handle "no-resumed+".  Report
1196         "no-resumed+" support.
1197         (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
1198         return error if the client doesn't support no-resumed events.
1199         (push_stop_notification): New function.
1200         (handle_target_event): Use it.  Report TARGET_WAITKIND_NO_RESUMED
1201         events if the client supports them.
1202
1203 2015-11-30  Pedro Alves  <palves@redhat.com>
1204
1205         * linux-low.c (thread_still_has_status_pending_p): Don't check
1206         vCont;t here.
1207         (lwp_resumed): New function.
1208         (status_pending_p_callback): Return early if the LWP is not
1209         supposed to be resumed.
1210
1211 2015-11-30  Pedro Alves  <palves@redhat.com>
1212
1213         * linux-low.c (handle_extended_wait): Assert that the LWP's
1214         waitstatus is TARGET_WAITKIND_IGNORE.  If GDB wants to hear about
1215         thread create events, leave the new child's status pending.
1216         (linux_low_filter_event): If GDB wants to hear about thread exit
1217         events, leave the LWP marked dead and don't delete it.
1218         (linux_wait_for_event_filtered): Don't check for thread exit.
1219         (filter_exit_event): New function.
1220         (linux_wait_1): Use it, when returning an exit event.
1221         (linux_resume_one_lwp_throw): Assert that the LWP's
1222         waitstatus is TARGET_WAITKIND_IGNORE.
1223         * remote-utils.c (prepare_resume_reply): Handle
1224         TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
1225         * server.c (report_thread_events): New global.
1226         (handle_general_set): Handle QThreadEvents.
1227         (handle_query) <qSupported>: Handle and report QThreadEvents+;
1228         (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
1229         TARGET_WAITKIND_THREAD_EXITED.
1230         * server.h (report_thread_events): Declare.
1231
1232 2015-11-30  Pedro Alves  <palves@redhat.com>
1233
1234         * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
1235         the thread's last_resume_kind was resume_stop.
1236
1237 2015-11-30  Pedro Alves  <palves@redhat.com>
1238
1239         * linux-low.c (linux_attach): In non-stop mode, wait for one stop
1240         before returning.
1241
1242 2015-11-30  Pedro Alves  <palves@redhat.com>
1243
1244         * server.c (handle_v_requests): Handle vCtrlC.
1245
1246 2015-11-30  Pedro Alves  <palves@redhat.com>
1247
1248         * gdbthread.h (find_any_thread_of_pid): Declare.
1249         * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
1250         functions.
1251         * server.c (handle_query): If current_thread is NULL, look for
1252         another thread of the selected process.
1253
1254 2015-11-26  Daniel Colascione  <dancol@dancol.org>
1255             Simon Marchi  <simon.marchi@ericsson.com>
1256
1257         * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
1258         * server.c (handle_qxfer_threads_worker): Refactor to include thread
1259         name in reply.
1260         * target.h (struct target_ops) <thread_name>: New field.
1261         (target_thread_name): New macro.
1262
1263 2015-11-23  Joel Brobecker  <brobecker@adacore.com>
1264
1265         * regcache.h (regcache_invalidate_pid): Add declaration.
1266         * regcache.c (regcache_invalidate_pid): New function, extracted
1267         from regcache_invalidate.
1268         (regcache_invalidate): Reimplement using regcache_invalidate_pid.
1269         Add trivial documentation comment.
1270         * lynx-low.c: Use regcache_invalidate_pid instead of
1271         regcache_invalidate.
1272
1273 2015-11-23  Joel Brobecker  <brobecker@adacore.com>
1274
1275         * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
1276         and Elf64_auxv_t if the target is Android.
1277
1278 2015-11-22  Doug Evans  <xdje42@gmail.com>
1279
1280         * target.h: #include <sys/types.h>.
1281
1282 2015-11-19  Pedro Alves  <palves@redhat.com>
1283
1284         * linux-low.c (linux_process_qsupported): Change prototype.
1285         Adjust.
1286         * linux-low.h (struct linux_target_ops) <process_qsupported>:
1287         Change prototype.
1288         * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
1289         and adjust to loop over all features.
1290         * server.c (handle_query) <qSupported>: Adjust to call
1291         target_process_qsupported once, passing it a vector of unprocessed
1292         features.
1293         * target.h (struct target_ops) <process_qsupported>: Change
1294         prototype.
1295         (target_process_qsupported): Adjust.
1296
1297 2015-11-19  Pedro Alves  <palves@redhat.com>
1298
1299         * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
1300         mode.
1301         * configure: Regenerate.
1302
1303 2015-11-19  Pedro Alves  <palves@redhat.com>
1304
1305         * configure: Regenerate.
1306
1307 2015-11-19  Yao Qi  <yao.qi@linaro.org>
1308
1309         * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
1310         type to uint32_t.
1311
1312 2015-11-19  Yao Qi  <yao.qi@linaro.org>
1313
1314         * linux-aarch64-low.c (enum aarch64_operand_type): New.
1315         (struct aarch64_operand): Move enum out.
1316
1317 2015-11-19  Yao Qi  <yao.qi@linaro.org>
1318
1319         * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
1320         struct user_fpsimd_state *.
1321         (aarch64_store_fpregset): Likewise.
1322
1323 2015-11-19  Yao Qi  <yao.qi@linaro.org>
1324
1325         * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
1326         struct user_pt_regs *.
1327         (aarch64_store_gregset): Likewise.
1328
1329 2015-11-18  Pedro Alves  <palves@redhat.com>
1330
1331         * Makefile.in (all_object_files): Add $IPA_OBJS.
1332
1333 2015-11-17  Pedro Alves  <palves@redhat.com>
1334
1335         * win32-low.c (win32_resume): Use gdb_signal_from_host,
1336         GDB_SIGNAL_0 and gdb_signal_to_string.
1337
1338 2015-11-17  Pedro Alves  <palves@redhat.com>
1339
1340         * win32-low.c (handle_output_debug_string): Remove parameter.
1341         (win32_kill): Remove our_status local and adjust call to
1342         handle_output_debug_string.
1343         (get_child_debug_event): Adjust call to
1344         handle_output_debug_string.
1345
1346 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
1347
1348         * linux-mips-low.c (mips_fill_gregset): Add cast.
1349         (mips_store_gregset): Likewise.
1350         (mips_fill_fpregset): Likewise.
1351         (mips_store_fpregset): Likewise.
1352
1353 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
1354
1355         * linux-mips-low.c (mips_add_watchpoint): Rename private to
1356         priv.
1357
1358 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
1359
1360         * linux-mips-low.c (mips_linux_new_thread): Change type of
1361         watch_type to enum target_hw_bp_type.
1362
1363 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
1364
1365                 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
1366                 Change return type to arm_hwbp_type.
1367
1368 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
1369
1370         * linux-aarch32-low.c (arm_fill_gregset): Add cast.
1371         (arm_store_gregset): Likewise.
1372         * linux-arm-low.c (arm_get_hwcap): Likewise.
1373         (arm_read_description): Likewise.
1374
1375 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
1376
1377         * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
1378
1379 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
1380
1381         * linux-ppc-low.c (ppc_get_hwcap): Add cast.
1382         (ppc_fill_vsxregset): Likewise.
1383         (ppc_store_vsxregset): Likewise.
1384         (ppc_fill_vrregset): Likewise.
1385         (ppc_store_vrregset): Likewise.
1386         (ppc_fill_evrregset): Likewise.
1387         (ppc_store_evrregset): Likewise.
1388
1389 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
1390
1391         * linux-ppc-low.c (ppc_usrregs_info): Remove
1392         forward-declaration.
1393         (ppc_arch_setup): Move lower in file.
1394
1395 2015-10-30  Simon Marchi  <simon.marchi@ericsson.com>
1396
1397         * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
1398         (ps_pdwrite): Likewise.
1399
1400 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
1401
1402         * linux-arm-low.c (arm_new_thread): Move pointer dereference
1403         to after assert checks.
1404
1405 2015-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1406
1407         * proc-service.c (ps_pdread): Add/adjust casts.
1408         (ps_pdwrite): Add/adjust casts.
1409
1410 2015-10-29  Simon Marchi  <simon.marchi@polymtl.ca>
1411
1412         * server.c (handle_search_memory_1): Cast return value of
1413         memmem.
1414
1415 2015-10-29  Simon Marchi  <simon.marchi@polymtl.ca>
1416
1417         * server.c (write_qxfer_response): Change type of data to
1418         gdb_byte *.
1419
1420 2015-10-29  Pedro Alves  <palves@redhat.com>
1421
1422         * mem-break.c (Z_packet_to_bkpt_type): Add cast.
1423
1424 2015-10-29  Pedro Alves  <palves@redhat.com>
1425
1426         * tracepoint.c (clear_installed_tracepoints): Add casts.
1427
1428 2015-10-29  Pedro Alves  <palves@redhat.com>
1429
1430         * server.c (handle_v_cont, process_serial_event): Add enum
1431         gdb_signal casts to signal parsing code.
1432
1433 2015-10-29  Pedro Alves  <palves@redhat.com>
1434
1435         * linux-low.h (NULL_REGSET): Define.
1436         * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1437         * linux-arm-low.c (arm_regsets): Likewise.
1438         * linux-crisv32-low.c (cris_regsets): Likewise.
1439         * linux-m68k-low.c (m68k_regsets): Likewise.
1440         * linux-mips-low.c (mips_regsets): Likewise.
1441         * linux-nios2-low.c (nios2_regsets): Likewise.
1442         * linux-ppc-low.c (ppc_regsets): Likewise.
1443         * linux-s390-low.c (s390_regsets): Likewise.
1444         * linux-sh-low.c (sh_regsets): Likewise.
1445         * linux-sparc-low.c (sparc_regsets): Likewise.
1446         * linux-tic6x-low.c (tic6x_regsets): Likewise.
1447         * linux-tile-low.c (tile_regsets): Likewise.
1448         * linux-x86-low.c (x86_regsets): Likewise.
1449         * linux-xtensa-low.c (xtensa_regsets): Likewise.
1450
1451 2015-10-29  Pedro Alves  <palves@redhat.com>
1452
1453         * linux-low.h (NULL_REGSET): Define.
1454         * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1455         * linux-arm-low.c (arm_regsets): Likewise.
1456         * linux-crisv32-low.c (cris_regsets): Likewise.
1457         * linux-m68k-low.c (m68k_regsets): Likewise.
1458         * linux-mips-low.c (mips_regsets): Likewise.
1459         * linux-nios2-low.c (nios2_regsets): Likewise.
1460         * linux-ppc-low.c (ppc_regsets): Likewise.
1461         * linux-s390-low.c (s390_regsets): Likewise.
1462         * linux-sh-low.c (sh_regsets): Likewise.
1463         * linux-sparc-low.c (sparc_regsets): Likewise.
1464         * linux-tic6x-low.c (tic6x_regsets): Likewise.
1465         * linux-tile-low.c (tile_regsets): Likewise.
1466         * linux-x86-low.c (x86_regsets): Likewise.
1467         * linux-xtensa-low.c (xtensa_regsets): Likewise.
1468
1469 2015-10-26  Doug Evans  <dje@google.com>
1470
1471         * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
1472
1473 2015-10-26  Doug Evans  <dje@google.com>
1474
1475         * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
1476
1477 2015-10-26  Doug Evans  <dje@google.com>
1478
1479         * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
1480         for debug_printf.
1481         (attach_thread, find_new_threads_callback): Ditto.
1482
1483 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1484
1485         * mem-break.h (set_breakpoint_data): Remove.
1486
1487 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1488
1489         * nto-low.c (nto_sw_breakpoint_from_kind): New function.
1490         (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1491         (initialize_low): Remove set_breakpoint_data call.
1492         * spu-low.c (spu_sw_breakpoint_from_kind): New function.
1493         (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
1494         (initialize_low): Remove set_breakpoint_data call.
1495         * win32-low.c (win32_sw_breakpoint_from_kind): New function.
1496         (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1497         (initialize_low): Remove set_breakpoint_data call.
1498
1499 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1500
1501         * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
1502         * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
1503         * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
1504         * target.h (target_breakpoint_kind_from_pc): New macro.
1505
1506 2015-10-22  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1507
1508         * linux-low.c (default_breakpoint_kind_from_pc): New function.
1509         (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
1510         the default breakpoint kind.
1511
1512 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1513
1514         * linux-arm-low.c (arm_supports_z_point_type): Add software
1515         breakpoint support.
1516
1517 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1518
1519         * linux-arm-low.c: Refactor breakpoint definitions.
1520         (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
1521         (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
1522
1523 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1524
1525         * Makefile.in: Add arm.c/o.
1526         * configure.srv: Likewise.
1527         * linux-arm-low.c (arm_breakpoint_kinds): New enum.
1528         (arm_breakpoint_kind_from_pc): New function.
1529         (arm_sw_breakpoint_from_kind): Return proper kind.
1530         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
1531
1532 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1533
1534         * linux-low.c (initialize_low): Ajdust for breakpoint global variables
1535         removal.
1536         * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
1537         (struct raw_breakpoint) <size>: Remove.
1538         (struct raw_breakpoint) <kind>: Add.
1539         (bp_size): New function.
1540         (bp_opcode): Likewise.
1541         (find_raw_breakpoint_at): Adjust for kind.
1542         (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
1543         (remove_memory_breakpoint): Adjust for kind call bp_size.
1544         (set_raw_breakpoint_at): Adjust for kind.
1545         (set_breakpoint): Likewise.
1546         (set_breakpoint_at): Call breakpoint_kind_from_pc.
1547         (delete_raw_breakpoint): Adjust for kind.
1548         (delete_breakpoint): Likewise.
1549         (find_gdb_breakpoint): Likewise.
1550         (set_gdb_breakpoint_1): Likewise.
1551         (set_gdb_breakpoint): Likewise.
1552         (delete_gdb_breakpoint_1): Likewise.
1553         (delete_gdb_breakpoint): Likewise.
1554         (uninsert_raw_breakpoint): Likewise.
1555         (reinsert_raw_breakpoint): Likewise.
1556         (set_breakpoint_data): Remove.
1557         (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
1558         (check_mem_read): Adjust for kind call bp_size.
1559         (check_mem_write): Adjust for kind call bp_size,bp_opcode.
1560         (clone_one_breakpoint): Adjust for kind.
1561         * mem-break.h (set_gdb_breakpoint): Likewise.
1562         (delete_gdb_breakpoint): Likewise.
1563         * server.c (process_serial_event): Likewise.
1564
1565 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1566
1567         * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
1568         (struct linux_target_ops) <breakpoint>: Remove.
1569         (struct linux_target_ops) <breakpoint_len>: Remove.
1570         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1571         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1572         * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
1573         (arm_sw_breakpoint_from_kind): New function.
1574         * linux-bfin-low.c (bfin_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-cris-low.c (cris_sw_breakpoint_from_kind): New function.
1580         (struct linux_target_ops) <breakpoint>: Remove.
1581         (struct linux_target_ops) <breakpoint_len>: Remove.
1582         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1583         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1584         * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
1585         (struct linux_target_ops) <breakpoint>: Remove.
1586         (struct linux_target_ops) <breakpoint_len>: Remove.
1587         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1588         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1589         * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
1590         and sw_breakpoint_from_kind to increment the pc.
1591         (linux_breakpoint_kind_from_pc): New function.
1592         (linux_sw_breakpoint_from_kind): New function.
1593         (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
1594         (initialize_low): Call breakpoint_kind_from_pc and
1595         sw_breakpoint_from_kind to replace breakpoint_data/len.
1596         * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
1597         New field.
1598         (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
1599         * linux-m32r-low.c (m32r_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-m68k-low.c (m68k_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-mips-low.c (mips_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-nios2-low.c (nios2_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-ppc-low.c (ppc_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-s390-low.c (s390_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-sh-low.c (sh_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-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
1635         (struct linux_target_ops) <breakpoint>: Remove.
1636         (struct linux_target_ops) <breakpoint_len>: Remove.
1637         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1638         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1639         * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
1640         (struct linux_target_ops) <breakpoint>: Remove.
1641         (struct linux_target_ops) <breakpoint_len>: Remove.
1642         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1643         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1644         * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
1645         * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
1646         (struct linux_target_ops) <breakpoint>: Remove.
1647         (struct linux_target_ops) <breakpoint_len>: Remove.
1648         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1649         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1650         * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
1651         (struct linux_target_ops) <breakpoint>: Remove.
1652         (struct linux_target_ops) <breakpoint_len>: Remove.
1653         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1654         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1655
1656 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1657
1658         * linux-cris-low.c (cris_get_pc): Remove void arg.
1659
1660 2015-10-16  Aleksandar Ristovski  <aristovski@qnx.com>
1661
1662         * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
1663         variable name.
1664
1665 2015-10-16  Aleksandar Ristovski  <aristovski@qnx.com>
1666
1667         * inferiors.c (thread_pid_matches_callback): New function.
1668         (find_thread_process): New function.
1669         (remove_thread): Reset current_thread.
1670         (remove_process): Assert threads have been removed first.
1671
1672 2015-10-15  Yao Qi  <yao.qi@linaro.org>
1673
1674         * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
1675         if it is 3.
1676         (aarch64_remove_point): Likewise.
1677         * regcache.c (regcache_register_size): New function.
1678
1679 2015-10-12  Yao Qi  <yao.qi@linaro.org>
1680
1681         * linux-aarch64-low.c: Update all callers as emit_load_store
1682         is renamed to aarch64_emit_load_store.
1683
1684 2015-10-12  Yao Qi  <yao.qi@linaro.org>
1685
1686         * linux-aarch64-low.c: Update all callers of function renaming
1687         from emit_insn to aarch64_emit_insn.
1688
1689 2015-10-12  Yao Qi  <yao.qi@linaro.org>
1690
1691         * linux-aarch64-low.c (enum aarch64_opcodes): Move to
1692         arch/aarch64-insn.h.
1693         (struct aarch64_memory_operand): Likewise.
1694         (ENCODE): Likewise.
1695         (emit_insn): Move to arch/aarch64-insn.c.
1696         (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
1697         (emit_load_store): Move to arch/aarch64-insn.c.
1698         (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
1699         (can_encode_int32): Remove.
1700
1701 2015-10-12  Yao Qi  <yao.qi@linaro.org>
1702
1703         * linux-aarch64-low.c (extract_signed_bitfield): Remove.
1704         (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
1705         (aarch64_relocate_instruction): Likewise.
1706         (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
1707         (struct aarch64_insn_visitor): Likewise.
1708
1709 2015-10-12  Yao Qi  <yao.qi@linaro.org>
1710
1711         * linux-aarch64-low.c (struct aarch64_insn_data): New.
1712         (struct aarch64_insn_visitor): New.
1713         (struct aarch64_insn_relocation_data): New.
1714         (aarch64_ftrace_insn_reloc_b): New function.
1715         (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1716         (aarch64_ftrace_insn_reloc_cb): Likewise.
1717         (aarch64_ftrace_insn_reloc_tb): Likewise.
1718         (aarch64_ftrace_insn_reloc_adr): Likewise.
1719         (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
1720         (aarch64_ftrace_insn_reloc_others): Likewise.
1721         (visitor): New.
1722         (aarch64_relocate_instruction): Use visitor.
1723
1724 2015-10-12  Yao Qi  <yao.qi@linaro.org>
1725
1726         * linux-aarch64-low.c (aarch64_relocate_instruction): Return
1727         int.  Add argument buf.
1728         (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
1729         aarch64_relocate_instruction.
1730
1731 2015-10-12  Yao Qi  <yao.qi@linaro.org>
1732
1733         * linux-aarch64-low.c (aarch64_relocate_instruction): Add
1734         argument insn.  Remove local variable insn.  Don't call
1735         target_read_uint32.
1736         (aarch64_install_fast_tracepoint_jump_pad): Call
1737         target_read_uint32.
1738
1739 2015-09-30  Yao Qi  <yao.qi@linaro.org>
1740
1741         * linux-aarch64-low.c (emit_movk): Shorten a long line.
1742         (emit_load_store_pair): Likewise.
1743
1744 2015-09-25  Simon Marchi  <simon.marchi@ericsson.com>
1745
1746         * dll.c (match_dll): Add cast(s).
1747         (unloaded_dll): Likewise.
1748         * linux-low.c (second_thread_of_pid_p): Likewise.
1749         (delete_lwp_callback): Likewise.
1750         (count_events_callback): Likewise.
1751         (select_event_lwp_callback): Likewise.
1752         (linux_set_resume_request): Likewise.
1753         * server.c (accumulate_file_name_length): Likewise.
1754         (emit_dll_description): Likewise.
1755         (handle_qxfer_threads_worker): Likewise.
1756         (visit_actioned_threads): Likewise.
1757         * thread-db.c (any_thread_of): Likewise.
1758         * tracepoint.c (same_process_p): Likewise.
1759         (match_blocktype): Likewise.
1760         (build_traceframe_info_xml): Likewise.
1761
1762 2015-09-25  Simon Marchi  <simon.marchi@ericsson.com>
1763
1764         * ax.c (gdb_parse_agent_expr): Add cast to allocation result
1765         assignment.
1766         (gdb_unparse_agent_expr): Likewise.
1767         * hostio.c (require_data): Likewise.
1768         (handle_pread): Likewise.
1769         * linux-low.c (disable_regset): Likewise.
1770         (fetch_register): Likewise.
1771         (store_register): Likewise.
1772         (get_dynamic): Likewise.
1773         (linux_qxfer_libraries_svr4): Likewise.
1774         * mem-break.c (delete_fast_tracepoint_jump): Likewise.
1775         (set_fast_tracepoint_jump): Likewise.
1776         (uninsert_fast_tracepoint_jumps_at): Likewise.
1777         (reinsert_fast_tracepoint_jumps_at): Likewise.
1778         (validate_inserted_breakpoint): Likewise.
1779         (clone_agent_expr): Likewise.
1780         * regcache.c (init_register_cache): Likewise.
1781         * remote-utils.c (putpkt_binary_1): Likewise.
1782         (decode_M_packet): Likewise.
1783         (decode_X_packet): Likewise.
1784         (look_up_one_symbol): Likewise.
1785         (relocate_instruction): Likewise.
1786         (monitor_output): Likewise.
1787         * server.c (handle_search_memory): Likewise.
1788         (handle_qxfer_exec_file): Likewise.
1789         (handle_qxfer_libraries): Likewise.
1790         (handle_qxfer): Likewise.
1791         (handle_query): Likewise.
1792         (handle_v_cont): Likewise.
1793         (handle_v_run): Likewise.
1794         (captured_main): Likewise.
1795         * target.c (write_inferior_memory): Likewise.
1796         * thread-db.c (try_thread_db_load_from_dir): Likewise.
1797         * tracepoint.c (init_trace_buffer): Likewise.
1798         (add_tracepoint_action): Likewise.
1799         (add_traceframe): Likewise.
1800         (add_traceframe_block): Likewise.
1801         (cmd_qtdpsrc): Likewise.
1802         (cmd_qtdv): Likewise.
1803         (cmd_qtstatus): Likewise.
1804         (response_source): Likewise.
1805         (response_tsv): Likewise.
1806         (cmd_qtnotes): Likewise.
1807         (gdb_collect): Likewise.
1808         (initialize_tracepoint): Likewise.
1809
1810 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
1811
1812         * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
1813         (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
1814         <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
1815         <NOP>: New.
1816         (enum aarch64_condition_codes): New enum.
1817         (w0): New static global.
1818         (fp): Likewise.
1819         (lr): Likewise.
1820         (struct aarch64_memory_operand) <type>: New
1821         MEMORY_OPERAND_POSTINDEX type.
1822         (postindex_memory_operand): New helper function.
1823         (emit_ret): New function.
1824         (emit_load_store_pair): New function, factored out of emit_stp
1825         with support for MEMORY_OPERAND_POSTINDEX.
1826         (emit_stp): Rewrite using emit_load_store_pair.
1827         (emit_ldp): New function.
1828         (emit_load_store): Likewise.
1829         (emit_ldr): Mention post-index instruction in comment.
1830         (emit_ldrh): New function.
1831         (emit_ldrb): New function.
1832         (emit_ldrsw): Mention post-index instruction in comment.
1833         (emit_str): Likewise.
1834         (emit_subs): New function.
1835         (emit_cmp): Likewise.
1836         (emit_and): Likewise.
1837         (emit_orr): Likewise.
1838         (emit_orn): Likewise.
1839         (emit_eor): Likewise.
1840         (emit_mvn): Likewise.
1841         (emit_lslv): Likewise.
1842         (emit_lsrv): Likewise.
1843         (emit_asrv): Likewise.
1844         (emit_mul): Likewise.
1845         (emit_sbfm): Likewise.
1846         (emit_sbfx): Likewise.
1847         (emit_ubfm): Likewise.
1848         (emit_ubfx): Likewise.
1849         (emit_csinc): Likewise.
1850         (emit_cset): Likewise.
1851         (emit_nop): Likewise.
1852         (emit_ops_insns): New helper function.
1853         (emit_pop): Likewise.
1854         (emit_push): Likewise.
1855         (aarch64_emit_prologue): New function.
1856         (aarch64_emit_epilogue): Likewise.
1857         (aarch64_emit_add): Likewise.
1858         (aarch64_emit_sub): Likewise.
1859         (aarch64_emit_mul): Likewise.
1860         (aarch64_emit_lsh): Likewise.
1861         (aarch64_emit_rsh_signed): Likewise.
1862         (aarch64_emit_rsh_unsigned): Likewise.
1863         (aarch64_emit_ext): Likewise.
1864         (aarch64_emit_log_not): Likewise.
1865         (aarch64_emit_bit_and): Likewise.
1866         (aarch64_emit_bit_or): Likewise.
1867         (aarch64_emit_bit_xor): Likewise.
1868         (aarch64_emit_bit_not): Likewise.
1869         (aarch64_emit_equal): Likewise.
1870         (aarch64_emit_less_signed): Likewise.
1871         (aarch64_emit_less_unsigned): Likewise.
1872         (aarch64_emit_ref): Likewise.
1873         (aarch64_emit_if_goto): Likewise.
1874         (aarch64_emit_goto): Likewise.
1875         (aarch64_write_goto_address): Likewise.
1876         (aarch64_emit_const): Likewise.
1877         (aarch64_emit_call): Likewise.
1878         (aarch64_emit_reg): Likewise.
1879         (aarch64_emit_pop): Likewise.
1880         (aarch64_emit_stack_flush): Likewise.
1881         (aarch64_emit_zero_ext): Likewise.
1882         (aarch64_emit_swap): Likewise.
1883         (aarch64_emit_stack_adjust): Likewise.
1884         (aarch64_emit_int_call_1): Likewise.
1885         (aarch64_emit_void_call_2): Likewise.
1886         (aarch64_emit_eq_goto): Likewise.
1887         (aarch64_emit_ne_goto): Likewise.
1888         (aarch64_emit_lt_goto): Likewise.
1889         (aarch64_emit_le_goto): Likewise.
1890         (aarch64_emit_gt_goto): Likewise.
1891         (aarch64_emit_ge_got): Likewise.
1892         (aarch64_emit_ops_impl): New static global variable.
1893         (aarch64_emit_ops): New target function, return
1894         &aarch64_emit_ops_impl.
1895         (struct linux_target_ops): Install it.
1896
1897 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
1898
1899         * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
1900         * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
1901         aarch64-ipa.o.
1902         * linux-aarch64-ipa.c: New file.
1903         * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
1904         and endian.h.
1905         (aarch64_get_thread_area): New target method.
1906         (extract_signed_bitfield): New helper function.
1907         (aarch64_decode_ldr_literal): New function.
1908         (enum aarch64_opcodes): New enum.
1909         (struct aarch64_register): New struct.
1910         (struct aarch64_operand): New struct.
1911         (x0): New static global.
1912         (x1): Likewise.
1913         (x2): Likewise.
1914         (x3): Likewise.
1915         (x4): Likewise.
1916         (w2): Likewise.
1917         (ip0): Likewise.
1918         (sp): Likewise.
1919         (xzr): Likewise.
1920         (aarch64_register): New helper function.
1921         (register_operand): Likewise.
1922         (immediate_operand): Likewise.
1923         (struct aarch64_memory_operand): New struct.
1924         (offset_memory_operand): New helper function.
1925         (preindex_memory_operand): Likewise.
1926         (enum aarch64_system_control_registers): New enum.
1927         (ENCODE): New macro.
1928         (emit_insn): New helper function.
1929         (emit_b): New function.
1930         (emit_bcond): Likewise.
1931         (emit_cb): Likewise.
1932         (emit_tb): Likewise.
1933         (emit_blr): Likewise.
1934         (emit_stp): Likewise.
1935         (emit_ldp_q_offset): Likewise.
1936         (emit_stp_q_offset): Likewise.
1937         (emit_load_store): Likewise.
1938         (emit_ldr): Likewise.
1939         (emit_ldrsw): Likewise.
1940         (emit_str): Likewise.
1941         (emit_ldaxr): Likewise.
1942         (emit_stxr): Likewise.
1943         (emit_stlr): Likewise.
1944         (emit_data_processing_reg): Likewise.
1945         (emit_data_processing): Likewise.
1946         (emit_add): Likewise.
1947         (emit_sub): Likewise.
1948         (emit_mov): Likewise.
1949         (emit_movk): Likewise.
1950         (emit_mov_addr): Likewise.
1951         (emit_mrs): Likewise.
1952         (emit_msr): Likewise.
1953         (emit_sevl): Likewise.
1954         (emit_wfe): Likewise.
1955         (append_insns): Likewise.
1956         (can_encode_int32_in): New helper function.
1957         (aarch64_relocate_instruction): New function.
1958         (aarch64_install_fast_tracepoint_jump_pad): Likewise.
1959         (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
1960         (struct linux_target_ops): Install aarch64_get_thread_area,
1961         aarch64_install_fast_tracepoint_jump_pad and
1962         aarch64_get_min_fast_tracepoint_insn_len.
1963
1964 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
1965
1966         * Makefile.in (aarch64-insn.o): New rule.
1967         * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
1968
1969 2015-09-21  Yao Qi  <yao.qi@linaro.org>
1970
1971         * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
1972
1973 2015-09-21  Yao Qi  <yao.qi@linaro.org>
1974
1975         * tracepoint.c (max_jump_pad_size): Remove.
1976
1977 2015-09-18  Yao Qi  <yao.qi@linaro.org>
1978
1979         * linux-aarch64-low.c: Don't include sys/uio.h.
1980         (ps_get_thread_area): Call aarch64_ps_get_thread_area.
1981
1982 2015-09-16  Wei-cheng Wang  <cole945@gmail.com>
1983
1984         * tracepoint.c (eval_result_type): Change prototype.
1985         (condition_true_at_tracepoint): Fix argument to compiled_cond.
1986
1987 2015-09-15  Pedro Alves  <palves@redhat.com>
1988
1989         * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
1990         Check whether to report exec events instead of checking whether
1991         multiprocess is enabled.
1992
1993 2015-09-15  Pedro Alves  <palves@redhat.com>
1994
1995         PR remote/18965
1996         * remote-utils.c (prepare_resume_reply): Merge
1997         TARGET_WAITKIND_VFORK_DONE switch case with the
1998         TARGET_WAITKIND_FORKED case.
1999
2000 2015-09-15  Yao Qi  <yao.qi@linaro.org>
2001
2002         * server.c (handle_query): Check string comparison using
2003         "else if" instead of "if".
2004
2005 2015-09-15  Yao Qi  <yao.qi@linaro.org>
2006
2007         * server.c (vCont_supported): New global variable.
2008         (handle_query): Set vCont_supported to 1 if "vContSupported+"
2009         matches.  Append ";vContSupported+" to own_buf.
2010         (handle_v_requests): Append ";s;S" to own_buf if target supports
2011         hardware single step or vCont_supported is false.
2012         (capture_main): Set vCont_supported to zero.
2013
2014 2015-09-15  Yao Qi  <yao.qi@linaro.org>
2015
2016         * linux-low.c (linux_supports_conditional_breakpoints): Rename
2017         it to ...
2018         (linux_supports_hardware_single_step): ... New function.
2019         (linux_target_ops): Update.
2020         * lynx-low.c (lynx_target_ops): Set field
2021         supports_hardware_single_step to target_can_do_hardware_single_step.
2022         * nto-low.c (nto_target_ops): Likewise.
2023         * spu-low.c (spu_target_ops): Likewise.
2024         * win32-low.c (win32_target_ops): Likewise.
2025         * target.c (target_can_do_hardware_single_step): New function.
2026         * target.h (struct target_ops) <supports_conditional_breakpoints>:
2027         Remove.  <supports_hardware_single_step>: New field.
2028         (target_supports_conditional_breakpoints): Remove.
2029         (target_supports_hardware_single_step): New macro.
2030         (target_can_do_hardware_single_step): Declare.
2031         * server.c (handle_query): Use target_supports_hardware_single_step
2032         instead of target_supports_conditional_breakpoints.
2033
2034 2015-09-15  Yao Qi  <yao.qi@linaro.org>
2035
2036         * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
2037         function.
2038         (struct linux_target_ops the_low_target): Install
2039         aarch64_linux_siginfo_fixup.
2040
2041 2015-09-11  Don Breazeal  <donb@codesourcery.com>
2042             Luis Machado  <lgustavo@codesourcery.com>
2043
2044         * linux-low.c (linux_mourn): Static declaration.
2045         (linux_arch_setup): Move in front of
2046         handle_extended_wait.
2047         (linux_arch_setup_thread): New function.
2048         (handle_extended_wait): Handle exec events.  Call
2049         linux_arch_setup_thread.  Make event_lwp argument a
2050         pointer-to-a-pointer.
2051         (check_zombie_leaders): Do not check stopped threads.
2052         (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
2053         (linux_low_filter_event): Add lwp and thread for exec'ing
2054         non-leader thread if leader thread has been deleted.
2055         Refactor code into linux_arch_setup_thread and call it.
2056         Pass child lwp pointer by reference to handle_extended_wait.
2057         (linux_wait_for_event_filtered): Update comment.
2058         (linux_wait_1): Prevent clobbering exec event status.
2059         (linux_supports_exec_events): New function.
2060         (linux_target_ops) <supports_exec_events>: Initialize new member.
2061         * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
2062         new member.
2063         * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
2064         * server.c (report_exec_events): New global variable.
2065         (handle_query): Handle qSupported query for exec-events feature.
2066         (captured_main): Initialize report_exec_events.
2067         * server.h (report_exec_events): Declare new global variable.
2068         * target.h (struct target_ops) <supports_exec_events>: New
2069         member.
2070         (target_supports_exec_events): New macro.
2071         * win32-low.c (win32_target_ops) <supports_exec_events>:
2072         Initialize new member.
2073
2074 2015-09-09  Markus Metzger  <markus.t.metzger@intel.com>
2075
2076         * linux-low.c (linux_low_enable_btrace): Remove.
2077         (linux_target_ops): Replace linux_low_enable_btrace with
2078         linux_enable_btrace.
2079
2080 2015-09-03  Yao Qi  <yao.qi@linaro.org>
2081
2082         * linux-aarch64-low.c (aarch64_insert_point): Call
2083         aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2084         returns true.
2085
2086 2015-08-27  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2087
2088         * linux-low.c (check_stopped_by_breakpoint): Use
2089         GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2090
2091 2015-08-27  Pedro Alves  <palves@redhat.com>
2092
2093         * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2094
2095 2015-08-26  Simon Marchi  <simon.marchi@ericsson.com>
2096
2097         * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2098         the XNEW-family equivalent.
2099         (compile_bytecodes): Likewise.
2100         * dll.c (loaded_dll): Likewise.
2101         * event-loop.c (append_callback_event): Likewise.
2102         (create_file_handler): Likewise.
2103         (create_file_event): Likewise.
2104         * hostio.c (handle_open): Likewise.
2105         * inferiors.c (add_thread): Likewise.
2106         (add_process): Likewise.
2107         * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
2108         * linux-arm-low.c (arm_new_process): Likewise.
2109         (arm_new_thread): Likewise.
2110         * linux-low.c (add_to_pid_list): Likewise.
2111         (linux_add_process): Likewise.
2112         (handle_extended_wait): Likewise.
2113         (add_lwp): Likewise.
2114         (enqueue_one_deferred_signal): Likewise.
2115         (enqueue_pending_signal): Likewise.
2116         (linux_resume_one_lwp_throw): Likewise.
2117         (linux_resume_one_thread): Likewise.
2118         (linux_read_memory): Likewise.
2119         (linux_write_memory): Likewise.
2120         * linux-mips-low.c (mips_linux_new_process): Likewise.
2121         (mips_linux_new_thread): Likewise.
2122         (mips_add_watchpoint): Likewise.
2123         * linux-x86-low.c (initialize_low_arch): Likewise.
2124         * lynx-low.c (lynx_add_process): Likewise.
2125         * mem-break.c (set_raw_breakpoint_at): Likewise.
2126         (set_breakpoint): Likewise.
2127         (add_condition_to_breakpoint): Likewise.
2128         (add_commands_to_breakpoint): Likewise.
2129         (clone_agent_expr): Likewise.
2130         (clone_one_breakpoint): Likewise.
2131         * regcache.c (new_register_cache): Likewise.
2132         * remote-utils.c (look_up_one_symbol): Likewise.
2133         * server.c (queue_stop_reply): Likewise.
2134         (start_inferior): Likewise.
2135         (queue_stop_reply_callback): Likewise.
2136         (handle_target_event): Likewise.
2137         * spu-low.c (fetch_ppc_memory): Likewise.
2138         (store_ppc_memory): Likewise.
2139         * target.c (set_target_ops): Likewise.
2140         * thread-db.c (thread_db_load_search): Likewise.
2141         (try_thread_db_load_1): Likewise.
2142         * tracepoint.c (add_tracepoint): Likewise.
2143         (add_tracepoint_action): Likewise.
2144         (create_trace_state_variable): Likewise.
2145         (cmd_qtdpsrc): Likewise.
2146         (cmd_qtro): Likewise.
2147         (add_while_stepping_state): Likewise.
2148         * win32-low.c (child_add_thread): Likewise.
2149         (get_image_name): Likewise.
2150
2151 2015-08-25  Yao Qi  <yao.qi@linaro.org>
2152
2153         * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
2154
2155 2015-08-25  Yao Qi  <yao.qi@linaro.org>
2156
2157         * Makefile.in (aarch64-linux.o): New rule.
2158         * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
2159         srv_tgtobj.
2160         * linux-aarch64-low.c: Include nat/aarch64-linux.h.
2161         (aarch64_init_debug_reg_state): Make it extern.
2162         (aarch64_linux_prepare_to_resume): Remove.
2163
2164 2015-08-25  Yao Qi  <yao.qi@linaro.org>
2165
2166         * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
2167         lwp_arch_private_info and ptid_of_lwp.
2168
2169 2015-08-25  Yao Qi  <yao.qi@linaro.org>
2170
2171         * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
2172         Find proc_info by find_process_pid.  All callers updated.
2173
2174 2015-08-25  Yao Qi  <yao.qi@linaro.org>
2175
2176         * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
2177         Remove.
2178         (debug_reg_change_callback): Remove.
2179         (aarch64_notify_debug_reg_change): Remove.
2180
2181 2015-08-25  Yao Qi  <yao.qi@linaro.org>
2182
2183         * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
2184         Call current_lwp_ptid.
2185
2186 2015-08-25  Yao Qi  <yao.qi@linaro.org>
2187
2188         * linux-aarch64-low.c (debug_reg_change_callback): Use
2189         debug_printf.
2190
2191 2015-08-25  Yao Qi  <yao.qi@linaro.org>
2192
2193         * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
2194
2195 2015-08-25  Yao Qi  <yao.qi@linaro.org>
2196
2197         * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
2198
2199 2015-08-25  Yao Qi  <yao.qi@linaro.org>
2200
2201         * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
2202         the code.
2203
2204 2015-08-25  Yao Qi  <yao.qi@linaro.org>
2205
2206         * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
2207         Remove.
2208         (debug_reg_change_callback): Remove argument entry and add argument
2209         lwp.  Remove local variable thread.  Don't print thread id in the
2210         debugging output.  Don't check whether pid of thread equals to pid.
2211         (aarch64_notify_debug_reg_change): Don't set param.pid.  Call
2212         iterate_over_lwps instead find_inferior.
2213
2214 2015-08-24  Pedro Alves  <palves@redhat.com>
2215
2216         * inferiors.c (get_first_process): New function.
2217         * inferiors.h (get_first_process): New declaration.
2218         * remote-utils.c (read_ptid): Default to the first process in the
2219         list, instead of to the current thread's process.
2220
2221 2015-08-24  Pedro Alves  <palves@redhat.com>
2222
2223         * debug.c: Include gdb_sys_time.h instead of sys/time.h.
2224         * event-loop.c: Likewise.
2225         * remote-utils.c: Likewise.
2226         * tracepoint.c: Likewise.
2227
2228 2015-08-24  Pedro Alves  <palves@redhat.com>
2229
2230         * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
2231         ptid_get_lwp.
2232
2233 2015-08-21  Pedro Alves  <palves@redhat.com>
2234
2235         * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
2236         instead of literal 1.
2237
2238 2015-08-21  Pedro Alves  <palves@redhat.com>
2239
2240         * tdesc.c (default_description): Explicitly zero-initialize.
2241
2242 2015-08-21  Pedro Alves  <palves@redhat.com>
2243
2244         PR gdb/18749
2245         * inferiors.c (remove_thread): Discard any pending stop reply for
2246         this thread.
2247         * server.c (remove_all_on_match_pid): Rename to ...
2248         (remove_all_on_match_ptid): ... this.  Work with a filter ptid
2249         instead of a pid.
2250         (discard_queued_stop_replies): Change parameter to a ptid.  Now
2251         extern.
2252         (handle_v_kill, kill_inferior_callback, captured_main)
2253         (process_serial_event): Adjust.
2254         * server.h (discard_queued_stop_replies): Declare.
2255
2256 2015-08-21  Pedro Alves  <palves@redhat.com>
2257
2258         * linux-low.c (wait_for_sigstop): Always switch to no thread
2259         selected if the previously current thread dies.
2260         * lynx-low.c (lynx_request_interrupt): Use the first thread's
2261         process instead of the current thread's.
2262         * remote-utils.c (input_interrupt): Don't check if there's no
2263         current thread.
2264         * server.c (gdb_read_memory, gdb_write_memory): If setting the
2265         current thread to the general thread fails, error out.
2266         (handle_qxfer_auxv, handle_qxfer_libraries)
2267         (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
2268         (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
2269         (handle_query): Check if there's a thread selected instead of
2270         checking whether there's any thread in the thread list.
2271         (handle_qxfer_threads, handle_qxfer_btrace)
2272         (handle_qxfer_btrace_conf): Don't error out early if there's no
2273         thread in the thread list.
2274         (handle_v_cont, myresume): Don't set the current thread to the
2275         continue thread.
2276         (process_serial_event) <Hg handling>: Also set thread_id if the
2277         previous general thread is still alive.
2278         (process_serial_event) <g/G handling>: If setting the current
2279         thread to the general thread fails, error out.
2280         * spu-low.c (spu_resume, spu_request_interrupt): Use the first
2281         thread's lwp instead of the current thread's.
2282         * target.c (set_desired_thread): If the desired thread was not
2283         found, leave the current thread pointing to NULL.  Return an int
2284         (boolean) indicating success.
2285         * target.h (set_desired_thread): Change return type to int.
2286
2287 2015-08-20  Max Filippov  <jcmvbkbc@gmail.com>
2288
2289         * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
2290         * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
2291         #includes.
2292         (ps_get_thread_area): New function.
2293
2294 2015-08-19  Gary Benson  <gbenson@redhat.com>
2295
2296         * hostio.c (handle_pread): Do not attempt to read more data
2297         than hostio_reply_with_data can fit in a packet.
2298
2299 2015-08-18  Joel Brobecker  <brobecker@adacore.com>
2300
2301         * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
2302
2303 2015-08-14  Matthew Fortune  <matthew.fortune@imgtec.com>
2304
2305         * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
2306
2307 2015-08-06  Pedro Alves  <palves@redhat.com>
2308
2309         * tracepoint.c (expr_eval_result): Now an int.
2310
2311 2015-08-06  Pedro Alves  <palves@redhat.com>
2312
2313         * gdbthread.h (struct regcache): Forward declare.
2314         (struct thread_info) <regcache_data>: Now a struct regcache
2315         pointer.
2316         * inferiors.c (inferior_regcache_data)
2317         (set_inferior_regcache_data): Now work with struct regcache
2318         pointers.
2319         * inferiors.h (struct regcache): Forward declare.
2320         (inferior_regcache_data, set_inferior_regcache_data): Now work
2321         with struct regcache pointers.
2322         * regcache.c (get_thread_regcache, regcache_invalidate_thread)
2323         (free_register_cache_thread): Remove struct regcache pointer
2324         casts.
2325
2326 2015-08-06  Pedro Alves  <palves@redhat.com>
2327
2328         * server.c (captured_main): On error, print the exception message
2329         to stderr, and if run_once is set, throw a quit.
2330
2331 2015-08-06  Pedro Alves  <palves@redhat.com>
2332
2333         * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
2334         the current thread.
2335
2336 2015-08-06  Pedro Alves  <palves@redhat.com>
2337
2338         * linux-low.c (linux_write_memory): Rewrite debug output to avoid
2339         reading beyond the passed in buffer length.
2340
2341 2015-08-06  Pierre Langlois  <pierre.langlois@arm.com>
2342
2343         * tracepoint.c (symbol_list) <required>: Remove.
2344
2345 2015-08-06  Pedro Alves  <palves@redhat.com>
2346
2347         * linux-low.c (handle_extended_wait): Set the fork child's suspend
2348         count if stopping and suspending threads.
2349         (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
2350         stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
2351         (linux_detach): Complete an ongoing step-over.
2352         (lwp_suspended_inc, lwp_suspended_decr): New functions.  Use
2353         throughout.
2354         (resume_stopped_resumed_lwps): Don't resume a suspended thread.
2355         (linux_wait_1): If passing a signal to the inferior after
2356         finishing a step-over, unsuspend and re-resume all lwps.  If we
2357         see a single-step event but the thread should be continuing, don't
2358         pass the trap to gdb.
2359         (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
2360         internal_error instead of gdb_assert.
2361         (enqueue_pending_signal): New function.
2362         (check_ptrace_stopped_lwp_gone): Add debug output.
2363         (start_step_over): Use internal_error instead of gdb_assert.
2364         (complete_ongoing_step_over): New function.
2365         (linux_resume_one_thread): Don't resume a suspended thread.
2366         (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
2367         it stepping.
2368
2369 2015-08-06  Pedro Alves  <palves@redhat.com>
2370
2371         * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
2372         (linux_thread_alive): Use lwp_is_marked_dead.
2373         (extended_event_reported): Delete.
2374         (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
2375         instead of extended_event_reported.
2376         (mark_lwp_dead): Don't set the 'dead' flag.  Store the waitstatus
2377         as well.
2378         (lwp_is_marked_dead): New function.
2379         (lwp_running): Use lwp_is_marked_dead.
2380         * linux-low.h: Delete 'dead' field, and update 'waitstatus's
2381         comment.
2382
2383 2015-08-06  Pedro Alves  <palves@redhat.com>
2384
2385         * linux-low.c (linux_wait_1): Move fork event output out of the
2386         !report_to_gdb check.  Pass event_child->waitstatus to
2387         target_waitstatus_to_string instead of ourstatus.
2388
2389 2015-08-04  Yao Qi  <yao.qi@linaro.org>
2390
2391         * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
2392         if current_thread is 32 bit.
2393
2394 2015-08-04  Yao Qi  <yao.qi@linaro.org>
2395
2396         * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2397         0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2398         * server.c (extended_protocol): Remove "static".
2399         * server.h (extended_protocol): Declare it.
2400
2401 2015-08-04  Yao Qi  <yao.qi@linaro.org>
2402
2403         * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
2404         both aarch64 and aarch32.
2405         (aarch64_set_pc): Likewise.
2406
2407 2015-08-04  Yao Qi  <yao.qi@linaro.org>
2408
2409         * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
2410         to srv_regobj and append arm-core.xml arm-vfpv3.xml and
2411         arm-with-neon.xml to srv_xmlfiles.
2412         * linux-aarch64-low.c: Include linux-aarch32-low.h.
2413         (is_64bit_tdesc): New function.
2414         (aarch64_linux_read_description): New function.
2415         (aarch64_arch_setup): Call aarch64_linux_read_description.
2416         (regs_info): Rename to regs_info_aarch64.
2417         (aarch64_regs_info): Return right regs_info.
2418         (initialize_low_arch): Call initialize_low_arch_aarch32.
2419
2420 2015-08-04  Yao Qi  <yao.qi@linaro.org>
2421
2422         * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
2423         * linux-aarch32-low.c: New file.
2424         * linux-aarch32-low.h: New file.
2425         * linux-arm-low.c (arm_fill_gregset): Move it to
2426         linux-aarch32-low.c.
2427         (arm_store_gregset): Likewise.
2428         (arm_fill_vfpregset): Call arm_fill_vfpregset_num
2429         (arm_store_vfpregset): Call arm_store_vfpregset_num.
2430         (arm_arch_setup): Check if PTRACE_GETREGSET works.
2431         (regs_info): Rename to regs_info_arm.
2432         (arm_regs_info): Return regs_info_aarch32 if
2433         have_ptrace_getregset is 1 and target description is
2434         arm_with_neon or arm_with_vfpv3.
2435         (initialize_low_arch): Don't call init_registers_arm_with_neon.
2436         Call initialize_low_arch_aarch32 instead.
2437
2438 2015-08-04  Yao Qi  <yao.qi@linaro.org>
2439
2440         * linux-x86-low.c (have_ptrace_getregset): Move it to ...
2441         * linux-low.c: ... here.
2442         * linux-low.h (have_ptrace_getregset): Declare it.
2443
2444 2015-08-04  Pedro Alves  <palves@redhat.com>
2445
2446         * thread-db.c (struct thread_db): Use new typedefs.
2447         (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
2448         CHK calls.
2449         (disable_thread_event_reporting): Cast result of dlsym to
2450         destination function pointer type.
2451         (thread_db_mourn): Use td_ta_delete_ftype.
2452
2453 2015-08-03  Sandra Loosemore  <sandra@codesourcery.com>
2454
2455         * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
2456         arch variant.
2457         (CDX_BREAKPOINT): Define for R2.
2458         (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
2459         (the_low_target): Add comments.
2460
2461 2015-07-30  Yao Qi  <yao.qi@linaro.org>
2462
2463         * linux-arm-low.c (arm_hwcap): Remove it.
2464         (arm_read_description): New local variable arm_hwcap.  Don't
2465         set arm_hwcap to zero.
2466
2467 2015-07-30  Yao Qi  <yao.qi@linaro.org>
2468
2469         * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
2470         Use regcache->tdesc instead.
2471         (arm_store_wmmxregset): Likewise.
2472         (arm_fill_vfpregset): Likewise.
2473         (arm_store_vfpregset): Likewise.
2474
2475 2015-07-30  Yao Qi  <yao.qi@linaro.org>
2476
2477         * linux-arm-low.c: Include arch/arm.h.
2478         (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
2479         (arm_store_gregset): Likewise.
2480
2481 2015-07-29  Simon Marchi  <simon.marchi@ericsson.com>
2482
2483         * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
2484         ptrace's 4th parameter.
2485
2486 2015-07-27  Yao Qi  <yao.qi@linaro.org>
2487
2488         * configure.srv (case aarch64*-*-linux*): Don't set
2489         srv_linux_usrregs.
2490
2491 2015-07-24  Pedro Alves  <palves@redhat.c: Likewise.om>
2492
2493         * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
2494         sys/ptrace.h.
2495         * linux-arm-low.c: Likewise.
2496         * linux-cris-low.c: Likewise.
2497         * linux-crisv32-low.c: Likewise.
2498         * linux-low.c: Likewise.
2499         * linux-m68k-low.c: Likewise.
2500         * linux-mips-low.c: Likewise.
2501         * linux-nios2-low.c: Likewise.
2502         * linux-s390-low.c: Likewise.
2503         * linux-sparc-low.c: Likewise.
2504         * linux-tic6x-low.c: Likewise.
2505         * linux-tile-low.c: Likewise.
2506         * linux-x86-low.c: Likewise.
2507
2508 2015-07-24  Pedro Alves  <palves@redhat.com>
2509
2510         * config.in: Regenerate.
2511         * configure: Regenerate.
2512
2513 2015-07-24  Pedro Alves  <palves@redhat.com>
2514
2515         * acinclude.m4: Include ../ptrace.m4.
2516         * configure.ac: Call GDB_AC_PTRACE.
2517         * config.in, configure: Regenerate.
2518
2519 2015-07-24  Yao Qi  <yao.qi@linaro.org>
2520
2521         * linux-low.c (linux_create_inferior): Remove setting to
2522         proc->priv->new_inferior.
2523         (linux_attach): Likewise.
2524         (linux_low_filter_event): Likewise.
2525         * linux-low.h (struct process_info_private) <new_inferior>: Remove.
2526
2527 2015-07-24  Yao Qi  <yao.qi@linaro.org>
2528
2529         * linux-low.c (linux_arch_setup): New function.
2530         (linux_low_filter_event): If proc->tdesc is NULL and
2531         proc->attached is true, call the_low_target.arch_setup.
2532         Otherwise, keep status pending, and return.
2533         (linux_resume_one_lwp_throw): Don't call get_pc if
2534         thread->while_stepping isn't NULL.  Don't call
2535         get_thread_regcache if proc->tdesc is NULL.
2536         (need_step_over_p): Return 0 if proc->tdesc is NULL.
2537         (linux_target_ops): Install arch_setup.
2538         * server.c (start_inferior): Call the_target->arch_setup.
2539         * target.h (struct target_ops) <arch_setup>: New field.
2540         (target_arch_setup): New marco.
2541         * lynx-low.c (lynx_target_ops): Update.
2542         * nto-low.c (nto_target_ops): Update.
2543         * spu-low.c (spu_target_ops): Update.
2544         * win32-low.c (win32_target_ops): Update.
2545
2546 2015-07-24  Yao Qi  <yao.qi@linaro.org>
2547
2548         * linux-low.c (linux_add_process): Don't set
2549         proc->priv->new_inferior.
2550         (linux_create_inferior): Set proc->priv->new_inferior to 1.
2551         (linux_attach): Likewise.
2552
2553 2015-07-24  Yao Qi  <yao.qi@linaro.org>
2554
2555         * server.c (start_inferior): Code refactor.
2556
2557 2015-07-24  Yao Qi  <yao.qi@linaro.org>
2558
2559         * server.c (process_serial_event): Set general_thread.
2560
2561 2015-07-21  Yao Qi  <yao.qi@linaro.org>
2562
2563         * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
2564         aarch64_linux_get_debug_reg_capacity.
2565
2566 2015-07-17  Yao Qi  <yao.qi@linaro.org>
2567
2568         * Makefile.in (aarch64-linux-hw-point.o): New rule.
2569         * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
2570         * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
2571         (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
2572         (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
2573         (AARCH64_HWP_ALIGNMENT): Likewise.
2574         (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
2575         (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
2576         (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
2577         (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
2578         (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
2579         (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
2580         (struct aarch64_debug_reg_state): Likewise.
2581         (struct arch_lwp_info): Likewise.
2582         (aarch64_align_watchpoint): Likewise.
2583         (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
2584         (aarch64_watchpoint_length): Likewise.
2585         (aarch64_point_encode_ctrl_reg): Likewise
2586         (aarch64_point_is_aligned): Likewise.
2587         (aarch64_align_watchpoint): Likewise.
2588         (aarch64_linux_set_debug_regs):
2589         (aarch64_dr_state_insert_one_point): Likewise.
2590         (aarch64_dr_state_remove_one_point): Likewise.
2591         (aarch64_handle_breakpoint): Likewise.
2592         (aarch64_handle_aligned_watchpoint): Likewise.
2593         (aarch64_handle_unaligned_watchpoint): Likewise.
2594         (aarch64_handle_watchpoint): Likewise.
2595
2596 2015-07-17  Yao Qi  <yao.qi@linaro.org>
2597
2598         * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
2599         and don't aarch64_get_debug_reg_state.  All callers update.
2600         (aarch64_handle_aligned_watchpoint): Likewise.
2601         (aarch64_handle_unaligned_watchpoint): Likewise.
2602         (aarch64_handle_watchpoint): Likewise.
2603         (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
2604         (aarch64_remove_point): Likewise.
2605
2606 2015-07-17  Yao Qi  <yao.qi@linaro.org>
2607
2608         * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
2609         debug_printf.
2610         (aarch64_handle_unaligned_watchpoint): Likewise.
2611
2612 2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
2613
2614         Revert the previous 3 commits:
2615         Move gdb_regex* to common/
2616         Move linux_find_memory_regions_full & co.
2617         gdbserver build-id attribute generator
2618
2619 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
2620             Jan Kratochvil  <jan.kratochvil@redhat.com>
2621
2622         gdbserver build-id attribute generator.
2623         * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
2624         (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
2625         (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
2626         (find_phdr): New.
2627         (get_dynamic): Use find_pdhr to traverse program headers.
2628         (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
2629         (compare_mapping_entry_range, struct find_memory_region_callback_data)
2630         (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
2631         (get_hex_build_id): New.
2632         (linux_qxfer_libraries_svr4): Add optional build-id attribute
2633         to reply XML document.
2634
2635 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
2636             Jan Kratochvil  <jan.kratochvil@redhat.com>
2637
2638         * target.c: Include target/target-utils.h and fcntl.h.
2639         (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
2640         (target_fileio_read_stralloc): New functions.
2641
2642 2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
2643
2644         * Makefile.in (OBS): Add gdb_regex.o.
2645         (gdb_regex.o): New.
2646         * config.in: Rebuilt.
2647         * configure: Rebuilt.
2648
2649 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
2650             Jan Kratochvil  <jan.kratochvil@redhat.com>
2651
2652         Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
2653         * Makefile.in (OBS): Add target-utils.o.
2654         (linux-maps.o, target-utils.o): New.
2655         * configure.srv (srv_linux_obj): Add linux-maps.o.
2656
2657 2015-07-15  Pierre Langlois  <pierre.langlois@arm.com>
2658
2659         * linux-aarch64-low.c (aarch64_supports_range_stepping): New
2660         function, return 1.
2661         (the_low_target): Install it.
2662
2663 2015-07-14  Pedro Alves  <palves@redhat.com>
2664
2665         * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
2666         Instead, ignore ECHILD, and throw an error for other errnos.
2667
2668 2015-07-10  Pedro Alves  <palves@redhat.com>
2669
2670         * event-loop.c (struct callback_event) <data>: Change type to
2671         gdb_client_data instance instead of gdb_client_data pointer.
2672         (append_callback_event): Adjust.
2673
2674 2015-07-10  Pierre Langlois  <pierre.langlois@arm.com>
2675
2676         * linux-aarch64-low.c: Add comments for each linux_target_ops
2677         method.  Remove comments already covered in target_ops and
2678         linux_target_ops definitions.
2679         (the_low_target): Add comments for each unimplemented method.
2680
2681 2015-07-09  Yao Qi  <yao.qi@linaro.org>
2682
2683         * linux-aarch64-low.c (aarch64_regmap): Remove.
2684         (aarch64_usrregs_info): Remove.
2685         (regs_info): Set field usrregs to NULL.
2686
2687 2015-07-02  Markus Metzger  <markus.t.metzger@intel.com>
2688
2689         * linux-low.c: Include "rsp-low.h"
2690         (linux_low_encode_pt_config, linux_low_encode_raw): New.
2691         (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
2692         (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
2693         (handle_btrace_enable_pt): New.
2694         (handle_btrace_general_set): Support "pt".
2695         (handle_btrace_conf_general_set): Support "pt:size".
2696
2697 2015-06-29  Pierre Langlois  <pierre.langlois@arm.com>
2698
2699         * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
2700         Z_PACKET_SW_BP.
2701
2702 2015-06-29  Pierre Langlois  <pierre.langlois@arm.com>
2703
2704         * linux-aarch64-low.c: Remove comment about endianness.
2705         (aarch64_breakpoint): Change type to gdb_byte[].  Set to "brk #0".
2706         (aarch64_breakpoint_at): Change type of insn to gdb_byte[].  Use
2707         memcmp.
2708
2709 2015-06-24  Gary Benson  <gbenson@redhat.com>
2710
2711         * linux-i386-ipa.c (stdint.h): Do not include.
2712         * lynx-i386-low.c (stdint.h): Likewise.
2713         * lynx-ppc-low.c (stdint.h): Likewise.
2714         * mem-break.c (stdint.h): Likewise.
2715         * thread-db.c (stdint.h): Likewise.
2716         * tracepoint.c (stdint.h): Likewise.
2717         * win32-low.c (stdint.h): Likewise.
2718
2719 2015-06-18  Simon Marchi  <simon.marchi@ericsson.com>
2720
2721         * server.c (write_qxfer_response): Update call to
2722         remote_escape_output.
2723
2724 2015-06-15  Aleksandar Ristovski  <aristovski@qnx.com
2725             Jan Kratochvil  <jan.kratochvil@redhat.com>
2726
2727         Merge multiple hex conversions.
2728         * gdbreplay.c (tohex): Rename to 'fromhex'.
2729         (logchar): Use fromhex.
2730
2731 2015-06-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
2732
2733         * server.c (handle_qxfer_libraries): Set `version' attribute for
2734         <library-list>.
2735
2736 2015-06-10  Gary Benson  <gbenson@redhat.com>
2737
2738         * target.h (struct target_ops) <multifs_open>: New field.
2739         <multifs_unlink>: Likewise.
2740         <multifs_readlink>: Likewise.
2741         * linux-low.c (nat/linux-namespaces.h): New include.
2742         (linux_target_ops): Initialize the_target->multifs_open,
2743         the_target->multifs_unlink and the_target->multifs_readlink.
2744         * hostio.h (hostio_handle_new_gdb_connection): New declaration.
2745         * hostio.c (hostio_fs_pid): New static variable.
2746         (hostio_handle_new_gdb_connection): New function.
2747         (handle_setfs): Likewise.
2748         (handle_open): Use the_target->multifs_open as appropriate.
2749         (handle_unlink): Use the_target->multifs_unlink as appropriate.
2750         (handle_readlink): Use the_target->multifs_readlink as
2751         appropriate.
2752         (handle_vFile): Handle vFile:setfs packets.
2753         * server.c (handle_query): Call hostio_handle_new_gdb_connection
2754         after target_handle_new_gdb_connection.
2755
2756 2015-06-10  Gary Benson  <gbenson@redhat.com>
2757
2758         * configure.ac (AC_CHECK_FUNCS): Add setns.
2759         * config.in: Regenerate.
2760         * configure: Likewise.
2761         * Makefile.in (SFILES): Add nat/linux-namespaces.c.
2762         (linux-namespaces.o): New rule.
2763         * configure.srv (srv_linux_obj): Add linux-namespaces.o.
2764
2765 2015-06-09  Gary Benson <gbenson@redhat.com>
2766
2767         * hostio.c (handle_open): Process mode argument with
2768         fileio_to_host_mode.
2769
2770 2015-06-01  Yao Qi  <yao.qi@linaro.org>
2771
2772         * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
2773         * linux-x86-low.c: Likewise.
2774
2775 2015-05-28  Don Breazeal  <donb@codesourcery.com>
2776
2777         * linux-low.c (handle_extended_wait): Initialize
2778         thread_info.last_resume_kind for new fork children.
2779
2780 2015-05-15  Pedro Alves  <palves@redhat.com>
2781
2782         * target.h (target_handle_new_gdb_connection): Rewrite using if
2783         wrapped in do/while.
2784
2785 2015-05-14  Joel Brobecker  <brobecker@adacore.com>
2786
2787         * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
2788         * configure, config.in: Regenerate.
2789         * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
2790         Declare typedef.
2791
2792 2015-05-12  Don Breazeal  <donb@codesourcery.com>
2793
2794         * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
2795         PTRACE_EVENT_VFORK_DONE.
2796         (linux_low_ptrace_options, extended_event_reported): Add vfork
2797         events.
2798         * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
2799         and "vforkdone" for RSP 'T' Stop Reply Packet.
2800         * server.h (report_vfork_events): Declare
2801         global variable.
2802
2803 2015-05-12  Don Breazeal  <donb@codesourcery.com>
2804
2805         * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
2806         (the_low_target) <new_fork>: Initialize new member.
2807         * linux-arm-low.c (arm_new_fork): New function.
2808         (the_low_target) <new_fork>: Initialize new member.
2809         * linux-low.c (handle_extended_wait): Call new target function
2810         new_fork.
2811         * linux-low.h (struct linux_target_ops) <new_fork>: New member.
2812         * linux-mips-low.c (mips_add_watchpoint): New function
2813         extracted from mips_insert_point.
2814         (the_low_target) <new_fork>: Initialize new member.
2815         (mips_linux_new_fork): New function.
2816         (mips_insert_point): Call mips_add_watchpoint.
2817         * linux-x86-low.c (x86_linux_new_fork): New function.
2818         (the_low_target) <new_fork>: Initialize new member.
2819
2820 2015-05-12  Don Breazeal  <donb@codesourcery.com>
2821
2822         * linux-low.c (handle_extended_wait): Implement return value,
2823         rename argument 'event_child' to 'event_lwp', handle
2824         PTRACE_EVENT_FORK, call internal_error for unrecognized event.
2825         (linux_low_ptrace_options): New function.
2826         (linux_low_filter_event): Call linux_low_ptrace_options,
2827         use different argument fo linux_enable_event_reporting,
2828         use return value from handle_extended_wait.
2829         (extended_event_reported): New function.
2830         (linux_wait_1): Call extended_event_reported and set
2831         status to report fork events.
2832         (linux_write_memory): Add pid to debug message.
2833         (reset_lwp_ptrace_options_callback): New function.
2834         (linux_handle_new_gdb_connection): New function.
2835         (linux_target_ops): Initialize new structure member.
2836         * linux-low.h (struct lwp_info) <waitstatus>: New member.
2837         * lynx-low.c: Initialize new structure member.
2838         * remote-utils.c (prepare_resume_reply): Implement stop reason
2839         "fork" for "T" stop message.
2840         * server.c (handle_query): Call handle_new_gdb_connection.
2841         * server.h (report_fork_events): Declare global flag.
2842         * target.h (struct target_ops) <handle_new_gdb_connection>:
2843         New member.
2844         (target_handle_new_gdb_connection): New macro.
2845         * win32-low.c: Initialize new structure member.
2846
2847 2015-05-12  Don Breazeal  <donb@codesourcery.com>
2848
2849         * mem-break.c (APPEND_TO_LIST): Define macro.
2850         (clone_agent_expr): New function.
2851         (clone_one_breakpoint): New function.
2852         (clone_all_breakpoints): New function.
2853         * mem-break.h: Declare new functions.
2854
2855 2015-05-12  Don Breazeal  <donb@codesourcery.com>
2856
2857         * linux-low.c (linux_supports_fork_events): New function.
2858         (linux_supports_vfork_events): New function.
2859         (linux_target_ops): Initialize new structure members.
2860         (initialize_low): Call linux_check_ptrace_features.
2861         * lynx-low.c (lynx_target_ops): Initialize new structure
2862         members.
2863         * server.c (report_fork_events, report_vfork_events):
2864         New global flags.
2865         (handle_query): Add new features to qSupported packet and
2866         response.
2867         (captured_main): Initialize new global variables.
2868         * target.h (struct target_ops) <supports_fork_events>:
2869         New member.
2870         <supports_vfork_events>: New member.
2871         (target_supports_fork_events): New macro.
2872         (target_supports_vfork_events): New macro.
2873         * win32-low.c (win32_target_ops): Initialize new structure
2874         members.
2875
2876 2015-05-12  Gary Benson <gbenson@redhat.com>
2877
2878         * server.c (handle_qxfer_exec_file): Use current process
2879         if annex is empty.
2880
2881 2015-05-08  Sandra Loosemore  <sandra@codesourcery.com>
2882
2883         * linux-nios2-low.c: Include elf/common.h.  Adjust comments.
2884         Remove HAVE_PTRACE_GETREGS conditionals.
2885         (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
2886         instead of PTRACE_GETREGS and PTRACE_SETREGS.
2887
2888 2015-05-08  Yao Qi  <yao.qi@linaro.org>
2889
2890         * linux-low.c (linux_supports_conditional_breakpoints): New
2891         function.
2892         (linux_target_ops): Install new target method.
2893         * lynx-low.c (lynx_target_ops): Install NULL hook for
2894         supports_conditional_breakpoints.
2895         * nto-low.c (nto_target_ops): Likewise.
2896         * spu-low.c (spu_target_ops): Likewise.
2897         * win32-low.c (win32_target_ops): Likewise.
2898         * server.c (handle_query): Check
2899         target_supports_conditional_breakpoints.
2900         * target.h (struct target_ops) <supports_conditional_breakpoints>:
2901         New field.
2902         (target_supports_conditional_breakpoints): New macro.
2903
2904 2015-05-06  Pedro Alves  <palves@redhat.com>
2905
2906         PR server/18081
2907         * server.c (start_inferior): If the process exits, mourn it.
2908
2909 2015-04-21  Gary Benson <gbenson@redhat.com>
2910
2911         * hostio.c (fileio_open_flags_to_host): Factored out to
2912         fileio_to_host_openflags in common/fileio.c.  Single use
2913         updated.
2914
2915 2015-04-17  Max Filippov  <jcmvbkbc@gmail.com>
2916
2917         * linux-xtensa-low.c (xtensa_fill_gregset)
2918         (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
2919         XCHAL_HAVE_LOOP.
2920
2921 2015-04-17  Max Filippov  <jcmvbkbc@gmail.com>
2922
2923         * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
2924         (regs_info): Replace usrregs pointer with NULL.
2925
2926 2015-04-17  Gary Benson  <gbenson@redhat.com>
2927
2928         * target.h (struct target_ops) <pid_to_exec_file>: New field.
2929         * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
2930         * server.c (handle_qxfer_exec_file): New function.
2931         (qxfer_packets): Add exec-file entry.
2932         (handle_query): Report qXfer:exec-file:read as supported packet.
2933
2934 2015-04-14  Romain Naour <romain.naour@openwide.fr>  (tiny change)
2935
2936         * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
2937
2938 2015-04-09  Gary Benson <gbenson@redhat.com>
2939
2940         * hostio-errno.c (errno_to_fileio_error): Remove function.
2941         Update caller to use remote_fileio_to_fio_error.
2942
2943 2015-04-09  Yao Qi  <yao.qi@linaro.org>
2944
2945         * linux-low.c (linux_insert_point): Call
2946         insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
2947         (linux_remove_point): Call remove_memory_breakpoint if type is
2948         raw_bkpt_type_sw.
2949         * linux-x86-low.c (x86_insert_point): Don't call
2950         insert_memory_breakpoint.
2951         (x86_remove_point): Don't call remove_memory_breakpoint.
2952
2953 2015-04-01  Pedro Alves  <palves@redhat.com>
2954             Cleber Rosa  <crosa@redhat.com>
2955
2956         * server.c (gdbserver_usage): Reorganize and extend the usage
2957         message.
2958
2959 2015-03-24  Pedro Alves  <palves@redhat.com>
2960
2961         * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
2962         output.  Also dump TRAP_TRACE.
2963         (linux_low_filter_event): In debug output, distinguish a
2964         resume_stop SIGSTOP from a delayed SIGSTOP.
2965
2966 2015-03-24  Gary Benson  <gbenson@redhat.com>
2967
2968         * linux-x86-low.c (x86_linux_new_thread): Moved to
2969         nat/x86-linux.c.
2970         (x86_linux_prepare_to_resume): Likewise.
2971
2972 2015-03-24  Gary Benson  <gbenson@redhat.com>
2973
2974         * Makefile.in (x86-linux-dregs.o): New rule.
2975         * configure.srv: Add x86-linux-dregs.o to relevant targets.
2976         * linux-x86-low.c: Include nat/x86-linux-dregs.h.
2977         (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
2978         (x86_linux_dr_get): Likewise.
2979         (x86_linux_dr_set): Likewise.
2980         (update_debug_registers_callback): Likewise.
2981         (x86_linux_dr_set_addr): Likewise.
2982         (x86_linux_dr_get_addr): Likewise.
2983         (x86_linux_dr_set_control): Likewise.
2984         (x86_linux_dr_get_control): Likewise.
2985         (x86_linux_dr_get_status): Likewise.
2986         (x86_linux_update_debug_registers): Likewise.
2987
2988 2015-03-24  Gary Benson  <gbenson@redhat.com>
2989
2990         * linux-x86-low.c (x86_linux_update_debug_registers):
2991         New function, factored out from...
2992         (x86_linux_prepare_to_resume): ...this.
2993
2994 2015-03-24  Gary Benson  <gbenson@redhat.com>
2995
2996         * linux-x86-low.c (x86_linux_dr_get): Update comments.
2997         (x86_linux_dr_set): Likewise.
2998         (update_debug_registers_callback): Likewise.
2999         (x86_linux_dr_set_addr): Likewise.
3000         (x86_linux_dr_get_addr): Likewise.
3001         (x86_linux_dr_set_control): Likewise.
3002         (x86_linux_dr_get_control): Likewise.
3003         (x86_linux_dr_get_status): Likewise.
3004         (x86_linux_prepare_to_resume): Likewise.
3005
3006 2015-03-24  Gary Benson  <gbenson@redhat.com>
3007
3008         * linux-x86-low.c (x86_linux_dr_get): Add assertion.
3009         Use perror_with_name.  Pass string through gettext.
3010         (x86_linux_dr_set): Likewise.
3011
3012 2015-03-24  Gary Benson  <gbenson@redhat.com>
3013
3014         * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
3015         (x86_linux_dr_set_addr): ...this.
3016         (x86_dr_low_get_addr): Rename to...
3017         (x86_linux_dr_get_addr): ...this.
3018         (x86_dr_low_set_control): Rename to...
3019         (x86_linux_dr_set_control): ...this.
3020         (x86_dr_low_get_control): Rename to...
3021         (x86_linux_dr_get_control): ...this.
3022         (x86_dr_low_get_status): Rename to...
3023         (x86_linux_dr_get_status): ...this.
3024         (x86_dr_low): Update with new function names.
3025
3026 2015-03-24  Gary Benson  <gbenson@redhat.com>
3027
3028         * Makefile.in (x86-linux.o): New rule.
3029         * configure.srv: Add x86-linux.o to relevant targets.
3030         * linux-low.c (lwp_set_arch_private_info): New function.
3031         (lwp_arch_private_info): Likewise.
3032         * linux-x86-low.c: Include nat/x86-linux.h.
3033         (arch_lwp_info): Removed structure.
3034         (update_debug_registers_callback):
3035         Use lwp_set_debug_registers_changed.
3036         (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
3037         and lwp_set_debug_registers_changed.
3038         (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
3039
3040 2015-03-24  Gary Benson  <gbenson@redhat.com>
3041
3042         * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
3043         * linux-arm-low.c (arm_new_thread): Likewise.
3044         * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
3045         * linux-mips-low.c (mips_linux_new_thread): Likewise.
3046         * linux-x86-low.c (x86_linux_new_thread): Likewise.
3047         * linux-low.c (add_lwp): Update the_low_target.new_thread call.
3048
3049 2015-03-24  Gary Benson  <gbenson@redhat.com>
3050
3051         * linux-low.c (ptid_of_lwp): New function.
3052         (lwp_is_stopped): Likewise.
3053         (lwp_stop_reason): Likewise.
3054         * linux-x86-low.c (update_debug_registers_callback):
3055         Use lwp_is_stopped.
3056         (x86_linux_prepare_to_resume): Use ptid_of_lwp and
3057         lwp_stop_reason.
3058
3059 2015-03-24  Gary Benson  <gbenson@redhat.com>
3060
3061         * linux-low.h (linux_stop_lwp): Remove declaration.
3062
3063 2015-03-24  Gary Benson  <gbenson@redhat.com>
3064
3065         * linux-low.h: Include nat/linux-nat.h.
3066         * linux-low.c (iterate_over_lwps_args): New structure.
3067         (iterate_over_lwps_filter): New function.
3068         (iterate_over_lwps): Likewise.
3069         * linux-x86-low.c (update_debug_registers_callback):
3070         Update signature to what iterate_over_lwps expects.
3071         Remove PID check that iterate_over_lwps now performs.
3072         (x86_dr_low_set_addr): Use iterate_over_lwps.
3073         (x86_dr_low_set_control): Likewise.
3074
3075 2015-03-24  Gary Benson  <gbenson@redhat.com>
3076
3077         * linux-x86-low.c (x86_debug_reg_state): New function.
3078         (x86_linux_prepare_to_resume): Use the above.
3079
3080 2015-03-24  Gary Benson  <gbenson@redhat.com>
3081
3082         * linux-low.c (current_lwp_ptid): New function.
3083         * linux-x86-low.c: Include nat/linux-nat.h.
3084         (x86_dr_low_get_addr): Use current_lwp_ptid.
3085         (x86_dr_low_get_control): Likewise.
3086         (x86_dr_low_get_status): Likewise.
3087
3088 2015-03-20  Pedro Alves  <palves@redhat.com>
3089
3090         * tracepoint.c (cmd_qtstatus): Make "str" const.
3091
3092 2015-03-20  Pedro Alves  <palves@redhat.com>
3093
3094         * server.c (handle_general_set): Make "req_str" const.
3095
3096 2015-03-19  Pedro Alves  <palves@redhat.com>
3097
3098         * linux-low.c (linux_resume_one_lwp): Rename to ...
3099         (linux_resume_one_lwp_throw): ... this.  Don't handle ESRCH here,
3100         instead call perror_with_name.
3101         (check_ptrace_stopped_lwp_gone): New function.
3102         (linux_resume_one_lwp): Reimplement as wrapper around
3103         linux_resume_one_lwp_throw that swallows errors if the LWP is
3104         gone.
3105
3106 2015-03-19  Pedro Alves  <palves@redhat.com>
3107
3108         * linux-low.c (count_events_callback, select_event_lwp_callback):
3109         No longer check whether the thread has resume_stop as last resume
3110         kind.
3111
3112 2015-03-19 Pedro Alves  <palves@redhat.com>
3113
3114         * linux-low.c (count_events_callback, select_event_lwp_callback):
3115         Use the lwp's status_pending_p field, not the thread's.
3116
3117 2015-03-19  Pedro Alves  <palves@redhat.com>
3118
3119         * linux-low.c (select_event_lwp_callback): Update comments to
3120         no longer mention SIGTRAP.
3121
3122 2015-03-18  Gary Benson  <gbenson@redhat.com>
3123
3124         * server.c (handle_query): Do not report vFile:fstat as supported.
3125
3126 2015-03-11  Gary Benson  <gbenson@redhat.com>
3127
3128         * hostio.c (sys/types.h): New include.
3129         (sys/stat.h): Likewise.
3130         (common-remote-fileio.h): Likewise.
3131         (handle_fstat): New function.
3132         (handle_vFile): Handle vFile:fstat packets.
3133
3134 2015-03-11  Gary Benson  <gbenson@redhat.com>
3135
3136         * configure.ac (AC_CHECK_MEMBERS): Add checks for
3137         struct stat.st_blocks and struct stat.st_blksize.
3138         * configure: Regenerate.
3139         * config.in: Likewise.
3140         * Makefile.in (SFILES): Add common/common-remote-fileio.c.
3141         (OBS): Add common-remote-fileio.o.
3142         (common-remote-fileio.o): New rule.
3143
3144 2015-03-09  Pedro Alves  <palves@redhat.com>
3145
3146         * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
3147         'struct sockaddr' pointer in 'accept' call.
3148
3149 2015-03-09  Pedro Alves  <palves@redhat.com>
3150
3151         Revert:
3152         2015-03-07  Pedro Alves  <palves@redhat.com>
3153         * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3154         or <winsock2.h> here.  Instead include "gdb_socket.h".
3155         (remote_open): Use union gdb_sockaddr_u.
3156         * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3157         or <winsock2.h> here.  Instead include "gdb_socket.h".
3158         (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3159         * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3160         or <sys/un.h>.
3161         (init_named_socket, gdb_agent_helper_thread): Use union
3162         gdb_sockaddr_u.
3163
3164 2015-03-07  Pedro Alves  <palves@redhat.com>
3165
3166         * configure.ac (build_warnings): Move
3167         -Wdeclaration-after-statement to the C-specific set.
3168         * configure: Regenerate.
3169
3170 2015-03-07  Pedro Alves  <palves@redhat.com>
3171
3172         * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3173         or <winsock2.h> here.  Instead include "gdb_socket.h".
3174         (remote_open): Use union gdb_sockaddr_u.
3175         * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3176         or <winsock2.h> here.  Instead include "gdb_socket.h".
3177         (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3178         * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3179         or <sys/un.h>.
3180         (init_named_socket, gdb_agent_helper_thread): Use union
3181         gdb_sockaddr_u.
3182
3183 2015-03-07  Pedro Alves  <palves@redhat.com>
3184
3185         Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
3186         instead.
3187
3188 2015-03-06  Yao Qi  <yao.qi@linaro.org>
3189
3190         * linux-aarch64-low.c (aarch64_insert_point): Use
3191         show_debug_regs as a boolean.
3192         (aarch64_remove_point): Likewise.
3193
3194 2015-03-05  Pedro Alves  <palves@redhat.com>
3195
3196         * lynx-low.c (lynx_target_ops): Install NULL hooks for
3197         stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3198         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
3199         * nto-low.c (nto_target_ops): Likewise.
3200         * spu-low.c (spu_target_ops): Likewise.
3201         * win32-low.c (win32_target_ops): Likewise.
3202
3203 2015-03-04  Pedro Alves  <palves@redhat.com>
3204
3205         * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3206         Decide whether a breakpoint triggered based on the SIGTRAP's
3207         siginfo.si_code.
3208         (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
3209         breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3210         (linux_low_filter_event): Check for breakpoints before checking
3211         watchpoints.
3212         (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
3213         siginfo.si_code.
3214         (linux_stopped_by_sw_breakpoint)
3215         (linux_supports_stopped_by_sw_breakpoint)
3216         (linux_stopped_by_hw_breakpoint)
3217         (linux_supports_stopped_by_hw_breakpoint): New functions.
3218         (linux_target_ops): Install new target methods.
3219
3220 2015-03-04  Pedro Alves  <palves@redhat.com>
3221
3222         * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
3223         * server.c (swbreak_feature, hwbreak_feature): New globals.
3224         (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
3225         (captured_main): Clear swbreak_feature and hwbreak_feature.
3226         * server.h (swbreak_feature, hwbreak_feature): Declare.
3227         * target.h (struct target_ops) <stopped_by_sw_breakpoint,
3228         supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
3229         supports_stopped_by_hw_breakpoint>: New fields.
3230         (target_supports_stopped_by_sw_breakpoint)
3231         (target_stopped_by_sw_breakpoint)
3232         (target_supports_stopped_by_hw_breakpoint)
3233         (target_stopped_by_hw_breakpoint): Declare.
3234
3235 2015-03-04  Pedro Alves  <palves@redhat.com>
3236
3237         enum lwp_stop_reason -> enum target_stop_reason
3238         * linux-low.c (check_stopped_by_breakpoint): Adjust.
3239         (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
3240         (linux_wait_1, stuck_in_jump_pad_callback)
3241         (move_out_of_jump_pad_callback, linux_resume_one_lwp)
3242         (linux_stopped_by_watchpoint):
3243         * linux-low.h (enum lwp_stop_reason): Delete.
3244         (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
3245         * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3246
3247 2015-03-04  Yao Qi  <yao.qi@linaro.org>
3248
3249         * Makefile.in (SFILES): Add linux-aarch64-low.c.
3250
3251 2015-03-03  Gary Benson  <gbenson@redhat.com>
3252
3253         * hostio.c (handle_vFile): Fix prefix lengths.
3254
3255 2015-03-03  Markus Metzger  <markus.t.metzger@intel.com>
3256
3257         * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
3258         ptr_bits.
3259
3260 2015-03-02  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3261
3262         * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
3263         (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
3264         (clean): Add "rm -f" for above C files.
3265         * configure.srv (srv_regobj): Add s390-vx-linux64.o,
3266         s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
3267         (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
3268         s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
3269         * linux-s390-low.c (HWCAP_S390_VX): New macro.
3270         (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
3271         (init_registers_s390x_vx_linux64)
3272         (init_registers_s390x_tevx_linux64)
3273         (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
3274         (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
3275         declarations.
3276         (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
3277         (s390_store_vxrs_high): New functions.
3278         (s390_regsets): Add entries for NT_S390_VXRS_LOW and
3279         NT_S390_VXRS_HIGH.
3280         (s390_arch_setup): Add logic for selecting one of the new target
3281         descriptions.  Activate the new vector regsets if applicable.
3282         (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
3283         init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
3284         and init_registers_s390x_tevx_linux64.
3285
3286 2015-03-01  Pedro Alves  <palves@redhat.com>
3287
3288         * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
3289         parameter.
3290
3291 2015-02-27  Pedro Alves  <palves@redhat.com>
3292
3293         * linux-x86-low.c (u_debugreg_offset): New function.
3294         (x86_linux_dr_get, x86_linux_dr_set): Use it.
3295
3296 2015-02-27  Pedro Alves  <palves@redhat.com>
3297
3298         * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
3299         [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
3300         [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
3301         ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3302         (ps_lsetfpregs, ps_getpid)
3303         (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
3304         (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
3305         (ps_lsetxregs, ps_plog): Declare.
3306
3307 2015-02-27  Pedro Alves  <palves@redhat.com>
3308
3309         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
3310         IP_AGENT_EXPORT_FUNC.
3311         * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
3312         IP_AGENT_EXPORT_FUNC.
3313         * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
3314         (IP_AGENT_EXPORT): Delete.
3315         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3316         (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3317         (gdb_trampoline_buffer_error, collecting, gdb_collect)
3318         (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
3319         (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
3320         (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
3321         (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
3322         (traceframe_read_count, traceframe_write_count)
3323         (traceframes_created, trace_state_variables, get_raw_reg)
3324         (get_trace_state_variable_value, set_trace_state_variable_value)
3325         (ust_loaded, helper_thread_id, cmd_buf): Use
3326         IPA_SYM_EXPORTED_NAME.
3327         (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
3328         (tracepoints) Use IP_AGENT_EXPORT_VAR.
3329         (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
3330         IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3331         (last_tracepoint): Move into !IN_PROCESS_AGENT block.
3332         (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
3333         EXTERN_C_PUSH/EXTERN_C_POP.
3334         (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
3335         (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
3336         wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3337         (trace_buffer_ctrl, trace_buffer_ctrl_curr)
3338         (traceframe_write_count, traceframe_read_count)
3339         (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
3340         (about_to_request_buffer_space, get_trace_state_variable_value)
3341         (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
3342         (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
3343         EXTERN_C_PUSH/EXTERN_C_POP.
3344         (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
3345         (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
3346         (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
3347         and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3348         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3349         (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3350         (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
3351         * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
3352         Define.
3353         (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
3354         (IP_AGENT_EXPORT_VAR_DECL): Define.
3355         (tracing): Declare.
3356         (gdb_agent_get_raw_reg): Declare.
3357
3358 2015-02-27  Tom Tromey  <tromey@redhat.com>
3359             Pedro Alves  <palves@redhat.com>
3360
3361         Rename symbols whose names are reserved C++ keywords throughout.
3362
3363 2015-02-27  Pedro Alves  <palves@redhat.com>
3364
3365         * Makefile.in (COMPILER): New, get it from autoconf.
3366         (CXX): Get from autoconf instead.
3367         (COMPILE.pre): Use COMPILER.
3368         (CC-LD): Rename to ...
3369         (CC_LD): ... this.  Use COMPILER.
3370         (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
3371         (CXX_FOR_TARGET): Default to g++ instead of gcc.
3372         * acinclude.m4: Include build-with-cxx.m4.
3373         * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
3374         Disable -Werror by default if building in C++ mode.
3375         (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
3376         -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
3377         the C++ compiler.  Save/restore CXXFLAGS too.
3378         * configure: Regenerate.
3379
3380 2015-02-27  Pedro Alves  <palves@redhat.com>
3381
3382         * acinclude.m4: Include libiberty.m4.
3383         * configure.ac: Call libiberty_INIT.
3384         * config.in, configure: Regenerate.
3385
3386 2015-02-26  Pedro Alves  <palves@redhat.com>
3387
3388         * linux-low.c (linux_wait_1): When incrementing the PC past a
3389         program breakpoint always use the_low_target.breakpoint_len as
3390         increment, rather than the maximum between that and
3391         the_low_target.decr_pc_after_break.
3392
3393 2015-02-23  Pedro Alves  <palves@redhat.com>
3394
3395         * linux-low.c (check_stopped_by_breakpoint): Don't check if the
3396         thread was doing a step-over; always adjust the PC if
3397         we stepped over a permanent breakpoint.
3398         (linux_wait_1): If we stepped over breakpoint that was on top of a
3399         permanent breakpoint, manually advance the PC past it.
3400
3401 2015-02-23  Pedro Alves  <palves@redhat.com>
3402
3403         * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
3404         modes.
3405         (x86_fill_gregset, x86_store_gregset): Use it when handling
3406         $orig_eax.
3407
3408 2015-02-20  Pedro Alves  <palves@redhat.com>
3409
3410         * thread-db.c: Include "nat/linux-procfs.h".
3411         (thread_db_init): Skip listing new threads if the kernel supports
3412         PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
3413
3414 2015-02-20  Pedro Alves  <palves@redhat.com>
3415
3416         * linux-low.c (status_pending_p_callback): Use ptid_match.
3417
3418 2015-02-19  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3419
3420         PR breakpoints/16812
3421         * linux-low.c (wstatus_maybe_breakpoint): Remove.
3422         (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
3423         (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
3424
3425 2015-02-10  Antoine Tremblay <antoine.tremblay@ericsson.com>
3426
3427         PR breakpoints/15956
3428         * tracepoint.c (cmd_qtinit): Add check for current_thread.
3429
3430 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
3431
3432         * linux-low.c (linux_low_btrace_conf): Print size.
3433         * server.c (handle_btrace_conf_general_set): New.
3434         (hanle_general_set): Call handle_btrace_conf_general_set.
3435         (handle_query): Report Qbtrace-conf:bts:size as supported.
3436
3437 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
3438
3439         * linux-low.c (linux_low_enable_btrace): Update parameters.
3440         (linux_low_btrace_conf): New.
3441         (linux_target_ops)<to_btrace_conf>: Initialize.
3442         * server.c (current_btrace_conf): New.
3443         (handle_btrace_enable): Rename to ...
3444         (handle_btrace_enable_bts): ... this.  Pass &current_btrace_conf
3445         to target_enable_btrace.  Update comment.  Update users.
3446         (handle_qxfer_btrace_conf): New.
3447         (qxfer_packets): Add btrace-conf entry.
3448         (handle_query): Report qXfer:btrace-conf:read as supported packet.
3449         * target.h (target_ops)<enable_btrace>: Update parameters and comment.
3450         (target_ops)<read_btrace_conf>: New.
3451         (target_enable_btrace): Update parameters.
3452         (target_read_btrace_conf): New.
3453
3454 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
3455
3456         * server.c (handle_btrace_general_set): Remove call to
3457         target_supports_btrace.
3458         (supported_btrace_packets): New.
3459         (handle_query): Call supported_btrace_packets.
3460         * target.h: include btrace-common.h.
3461         (btrace_target_info): Removed.
3462         (supports_btrace, target_supports_btrace): Update parameters.
3463
3464 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
3465
3466         * Makefile.in (SFILES): Add common/btrace-common.c.
3467         (OBS): Add common/btrace-common.o.
3468         (btrace-common.o): Add build rules.
3469         * linux-low: Include btrace-common.h.
3470         (linux_low_read_btrace): Use struct btrace_data.  Call
3471         btrace_data_init and btrace_data_fini.
3472
3473 2015-02-06  Pedro Alves  <palves@redhat.com>
3474
3475         * thread-db.c (find_new_threads_callback): Add debug output.
3476
3477 2015-02-04  Pedro Alves  <palves@redhat.com>
3478
3479         * linux-low.c (handle_extended_wait): Don't resume LWPs here.
3480         (resume_stopped_resumed_lwps): New function.
3481         (linux_wait_for_event_filtered): Use it.
3482
3483 2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
3484
3485         * Makefile.in (SFILES): Add linux-personality.c.
3486         (linux-personality.o): New rule.
3487         * configure.srv (srv_linux_obj): Add linux-personality.o to the
3488         list of objects to be built.
3489         * linux-low.c: Include nat/linux-personality.h.
3490         (linux_create_inferior): Remove code to disable address space
3491         randomization (moved to ../nat/linux-personality.c).  Create
3492         cleanup to disable address space randomization.
3493
3494 2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
3495
3496         * Makefile.in (posix-strerror.o): New rule.
3497         (mingw-strerror.o): Likewise.
3498         * configure: Regenerated.
3499         * configure.ac: Source file ../common/common.host.  Initialize new
3500         variable srv_host_obs.  Add srv_host_obs to GDBSERVER_DEPFILES.
3501
3502 2015-01-14  Yao Qi  <yao@codesourcery.com>
3503
3504         * Makefile.in (SFILES): Add nat/ppc-linux.c.
3505         (ppc-linux.o): New rule.
3506         * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
3507         * configure.ac: AC_CHECK_FUNCS(getauxval).
3508         * config.in: Re-generated.
3509         * configure: Re-generated.
3510         * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
3511         ppc64_64bit_inferior_p
3512
3513 2015-01-14  Yao Qi  <yao@codesourcery.com>
3514
3515         * linux-ppc-low.c: Include "nat/ppc-linux.h".
3516          (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
3517         (PPC_FEATURE_HAS_ALTIVEC,  PPC_FEATURE_HAS_SPE): Likewise.
3518         (PT_ORIG_R3, PT_TRAP): Likewise.
3519         (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
3520         (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
3521         (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
3522
3523 2015-01-10  Joel Brobecker  <brobecker@adacore.com>
3524
3525         * i387-fp.c (i387_cache_to_xsave): In look over
3526         num_avx512_zmmh_high_registers, replace use of struct i387_xsave
3527         zmmh_low_space field by use of zmmh_high_space.
3528
3529 2015-01-09  Pedro Alves  <palves@redhat.com>
3530
3531         * linux-low.c (step_over_bkpt): Move higher up in the file.
3532         (handle_extended_wait): Don't store the stop_pc here.
3533         (get_stop_pc): Adjust comments and rename to ...
3534         (check_stopped_by_breakpoint): ... this.  Record whether the LWP
3535         stopped for a software breakpoint or hardware breakpoint.
3536         (thread_still_has_status_pending_p): New function.
3537         (status_pending_p_callback): Use
3538         thread_still_has_status_pending_p.  If the event is no longer
3539         interesting, resume the LWP.
3540         (handle_tracepoints): Add assert.
3541         (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
3542         (wstatus_maybe_breakpoint): New function.
3543         (cancel_breakpoint): Delete function.
3544         (check_stopped_by_watchpoint): New function, factored out from
3545         linux_low_filter_event.
3546         (lp_status_maybe_breakpoint): Delete function.
3547         (linux_low_filter_event): Remove filter_ptid argument.
3548         Leave thread group exits pending here.  Store the LWP's stop PC.
3549         Always leave events pending.
3550         (linux_wait_for_event_filtered): Pull all events out of the
3551         kernel, and leave them all pending.
3552         (count_events_callback, select_event_lwp_callback): Consider all
3553         events.
3554         (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
3555         (select_event_lwp): Only give preference to the stepping LWP in
3556         all-stop mode.  Adjust comments.
3557         (ignore_event): New function.
3558         (linux_wait_1): Delete 'retry' label.  Use ignore_event.  Remove
3559         references to cancel_breakpoints.  Adjust to renames.  Also give
3560         equal priority to all LWPs that have had events in non-stop mode.
3561         If reporting a software breakpoint event, unadjust the LWP's PC.
3562         (linux_wait): If linux_wait_1 returned an ignored event, retry.
3563         (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
3564         Adjust.
3565         (linux_resume_one_lwp): Store the LWP's PC.  Adjust.
3566         (resume_status_pending_p): Use thread_still_has_status_pending_p.
3567         (linux_stopped_by_watchpoint): Adjust.
3568         (linux_target_ops): Remove reference to linux_cancel_breakpoints.
3569         * linux-low.h (enum lwp_stop_reason): New.
3570         (struct lwp_info) <stop_pc>: Adjust comment.
3571         <stopped_by_watchpoint>: Delete field.
3572         <stop_reason>: New field.
3573         * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3574         * mem-break.c (software_breakpoint_inserted_here)
3575         (hardware_breakpoint_inserted_here): New function.
3576         * mem-break.h (software_breakpoint_inserted_here)
3577         (hardware_breakpoint_inserted_here): Declare.
3578         * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
3579         (cancel_breakpoints): Delete.
3580         * tracepoint.c (clear_installed_tracepoints, stop_tracing)
3581         (upload_fast_traceframes): Remove references to
3582         cancel_breakpoints.
3583
3584 2015-01-09  Pedro Alves  <palves@redhat.com>
3585
3586         * thread-db.c (find_new_threads_callback): Ignore thread if the
3587         kernel thread ID is -1.
3588
3589 2015-01-09  Pedro Alves  <palves@redhat.com>
3590
3591         * linux-low.c (linux_attach_fail_reason_string): Move to
3592         nat/linux-ptrace.c, and rename.
3593         (linux_attach_lwp): Update comment.
3594         (attach_proc_task_lwp_callback): New function.
3595         (linux_attach): Adjust to rename and use
3596         linux_proc_attach_tgid_threads.
3597         (linux_attach_fail_reason_string): Delete declaration.
3598
3599 2015-01-01  Joel Brobecker  <brobecker@adacore.com>
3600
3601         * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
3602         * server.c (gdbserver_version): Likewise.
3603
3604 2014-12-29  Sergio Durigan Junior  <sergiodj@redhat.com>
3605
3606         * remote-utils.c: Include ctype.h.
3607         (input_interrupt): Explicitly handle the case when the char
3608         received is the NUL byte.  Improve the printing of non-ASCII
3609         characters.
3610
3611 2014-12-16  Joel Brobecker  <brobecker@adacore.com>
3612
3613         * linux-low.c (linux_low_filter_event): Update call to
3614         linux_enable_event_reporting following the addition of
3615         a new parameter to that function.
3616
3617 2014-12-16  Catalin Udma  <catalin.udma@freescale.com>
3618
3619         PR server/17457
3620         * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
3621         (AARCH64_FPCR_REGNO): Likewise.
3622         (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
3623         (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
3624         (aarch64_store_fpregset): Likewise.
3625
3626 2014-12-15  Joel Brobecker  <brobecker@adacore.com>
3627
3628         * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
3629         Remove FIXME comment about assumption about N.
3630
3631 2014-12-13  Joel Brobecker  <brobecker@adacore.com>
3632
3633         * configure.ac: If large-file support is disabled in GDBserver,
3634         pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
3635         * configure: Regenerate.
3636
3637 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3638
3639         * linux-low.c (regsets_fetch_inferior_registers): Suppress the
3640         warning upon ENODATA from ptrace.
3641         * linux-s390-low.c (s390_store_tdb): New.
3642         (s390_regsets): Add regset for NT_S390_TDB.
3643
3644 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3645
3646         * linux-low.c (regsets_store_inferior_registers): Skip regsets
3647         without a fill_function.
3648         * linux-s390-low.c (s390_fill_last_break): Remove.
3649         (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
3650         (s390_arch_setup): Use regset's size instead of fill_function for
3651         loop end condition.
3652
3653 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3654
3655         * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
3656         the regset's store function when ptrace returned an error.
3657         * regcache.c (get_thread_regcache): Invalidate register cache
3658         before fetching inferior's registers.
3659
3660 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3661
3662         * linux-low.c (regsets_fetch_inferior_registers): Rephrase
3663         while-loop as for-loop.
3664         (regsets_store_inferior_registers): Likewise.
3665
3666 2014-11-28  Yao Qi  <yao@codesourcery.com>
3667
3668         * configure.ac(AC_CHECK_FUNCS): Remove readlink.
3669         * config.in, configure: Re-generate.
3670         * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
3671         is defined.
3672
3673 2014-11-21  Yao Qi  <yao@codesourcery.com>
3674
3675         * configure.ac: Don't invoke AC_FUNC_ALLOCA.
3676         (AC_CHECK_HEADERS): Remove malloc.h.
3677         * configure: Re-generated.
3678         * config.in: Re-generated.
3679         * server.h: Don't include alloca.h and malloc.h.
3680         * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
3681         Don't include malloc.h.
3682
3683 2014-11-17  Joel Brobecker  <brobecker@adacore.com>
3684
3685         * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
3686         corresponding ERRNO check in same block.
3687
3688 2014-11-12  Pedro Alves  <palves@redhat.com>
3689
3690         * server.c (cont_thread): Update comment.
3691         (start_inferior, attach_inferior): No longer clear cont_thread.
3692         (handle_v_cont): No longer set cont_thread.
3693         (captured_main): Clear cont_thread each time a GDB connects.
3694
3695 2014-11-12  Pedro Alves  <palves@redhat.com>
3696
3697         * linux-low.c (linux_wait_1): Don't force a wait for the Hc
3698         thread, and don't resume all threads if the Hc thread has exited.
3699
3700 2014-11-12  Pedro Alves  <palves@redhat.com>
3701
3702         * linux-low.c (linux_request_interrupt): Always send a SIGINT to
3703         the process group instead of to a specific LWP.
3704
3705 2014-10-15  Pedro Alves  <palves@redhat.com>
3706
3707         PR server/17487
3708         * win32-arm-low.c (arm_set_thread_context): Remove current_event
3709         parameter.
3710         (arm_set_thread_context): Delete.
3711         (the_low_target): Adjust.
3712         * win32-i386-low.c (debug_registers_changed)
3713         (debug_registers_used): Delete.
3714         (update_debug_registers_callback): New function.
3715         (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
3716         needing to update their debug registers.
3717         (win32_get_current_dr): New function.
3718         (x86_dr_low_get_addr, x86_dr_low_get_control)
3719         (x86_dr_low_get_status): Fetch the debug register from the thread
3720         record's context.
3721         (i386_initial_stuff): Adjust.
3722         (i386_get_thread_context): Remove current_event parameter.  Don't
3723         clear debug_registers_changed nor copy DR values to
3724         debug_reg_state.
3725         (i386_set_thread_context): Delete.
3726         (i386_prepare_to_resume): New function.
3727         (i386_thread_added): Mark the thread as needing to update irs
3728         debug registers.
3729         (the_low_target): Remove i386_set_thread_context and install
3730         i386_prepare_to_resume.
3731         * win32-low.c (win32_get_thread_context): Adjust.
3732         (win32_set_thread_context): Use SetThreadContext
3733         directly.
3734         (win32_prepare_to_resume): New function.
3735         (win32_require_context): New function, factored out from ...
3736         (thread_rec): ... this.
3737         (continue_one_thread): Call win32_prepare_to_resume on each thread
3738         we're about to continue.
3739         (win32_resume): Call win32_prepare_to_resume on the event thread.
3740         * win32-low.h (struct win32_thread_info)
3741         <debug_registers_changed>: New field.
3742         (struct win32_target_ops): Change prototype of set_thread_context,
3743         delete set_thread_context and add prepare_to_resume.
3744         (win32_require_context): New declaration.
3745
3746 2014-10-08  Gary Benson  <gbenson@redhat.com>
3747
3748         * server.h: Do not include common-exceptions.h.
3749
3750 2014-10-08  Gary Benson  <gbenson@redhat.com>
3751
3752         * server.h: Do not include cleanups.h.
3753
3754 2014-09-30  James Hogan  <james.hogan@imgtec.com>
3755
3756         * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
3757         mips64-dsp-linux.c.
3758
3759 2014-09-23  Yao Qi  <yao@codesourcery.com>
3760
3761         * linux-low.c (lp_status_maybe_breakpoint): New function.
3762         (linux_low_filter_event): Call lp_status_maybe_breakpoint.
3763         (count_events_callback): Likewise.
3764         (select_event_lwp_callback): Likewise.
3765         (cancel_breakpoints_callback): Likewise.
3766
3767 2014-09-19  Don Breazeal  <donb@codesourcery.com>
3768
3769         * linux-low.c (handle_extended_wait): Call
3770         linux_ptrace_get_extended_event.
3771         (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
3772         linux_is_extended_waitstatus.
3773
3774 2014-09-16  Joel Brobecker  <brobecker@adacore.com>
3775
3776         * Makefile.in (CPPFLAGS): Define.
3777         (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
3778         (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
3779
3780 2014-09-16  Gary Benson  <gbenson@redhat.com>
3781
3782         * inferiors.h (current_inferior): Renamed as...
3783         (current_thread): New variable.  All uses updated.
3784         * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
3785         (maybe_move_out_of_jump_pad): Likewise.
3786         (cancel_breakpoint): Likewise.
3787         (linux_low_filter_event): Likewise.
3788         (wait_for_sigstop): Likewise.
3789         (linux_resume_one_lwp): Likewise.
3790         (need_step_over_p): Likewise.
3791         (start_step_over): Likewise.
3792         (linux_stabilize_threads): Renamed save_inferior as saved_thread.
3793         * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
3794         * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
3795         and save_inferior as saved_thread.
3796         * regcache.c (get_thread_regcache): Renamed saved_inferior as
3797         saved_thread.
3798         (regcache_invalidate_thread): Likewise.
3799         * remote-utils.c (prepare_resume_reply): Likewise.
3800         * thread-db.c (thread_db_get_tls_address): Likewise.
3801         (disable_thread_event_reporting): Likewise.
3802         (remove_thread_event_breakpoints): Likewise.
3803         * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
3804         as saved_thread.
3805         * target.h (set_desired_inferior): Renamed as...
3806         (set_desired_thread): New declaration.  All uses updated.
3807         * server.c (myresume): Updated comment to reference thread instead
3808         of inferior.
3809         (handle_serial_event): Likewise.
3810         (handle_target_event): Likewise.
3811
3812 2014-09-12  Tom Tromey  <tromey@redhat.com>
3813             Gary Benson  <gbenson@redhat.com>
3814
3815         * regcache.h: Include common-regcache.h.
3816         (regcache_read_pc): Don't declare.
3817         * regcache.c (get_thread_regcache_for_ptid): New function.
3818
3819 2014-09-11  Tom Tromey  <tromey@redhat.com>
3820             Gary Benson  <gbenson@redhat.com>
3821
3822         * symbol.c: New file.
3823         * Makefile.in (SFILES): Add symbol.c.
3824         (OBS): Add symbol.o.
3825
3826 2014-09-11  Gary Benson  <gbenson@redhat.com>
3827
3828         * target.c (target_stop_ptid, target_continue_ptid): New
3829         functions.
3830
3831 2014-09-11  Tom Tromey  <tromey@redhat.com>
3832             Gary Benson  <gbenson@redhat.com>
3833
3834         * target.h: Include target/target.h.
3835         * target.c (target_read_memory, target_read_uint32)
3836         (target_write_memory): New functions.
3837
3838 2014-09-11  Gary Benson  <gbenson@redhat.com>
3839
3840         * server.h (debug_hw_points): Don't declare.
3841         * server.c (debug_hw_points): Don't define.  Replace all uses
3842         with show_debug_regs.
3843         * linux-aarch64-low.c (debug_hw_points): Don't define.  Replace
3844         all uses with show_debug_regs.
3845
3846 2014-09-08  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
3847
3848         * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
3849         endianness into account.
3850         (ppc_supply_ptrace_register): Likewise.
3851
3852 2014-09-03  James Hogan  <james.hogan@imgtec.com>
3853
3854         * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
3855         to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
3856
3857 2014-09-03  Gary Benson  <gbenson@redhat.com>
3858
3859         * linux-x86-low.c (x86_linux_prepare_to_resume): Use
3860         ALL_DEBUG_ADDRESS_REGISTERS.
3861
3862 2014-09-02  Gary Benson  <gbenson@redhat.com>
3863
3864         * i386-low.h: Renamed as...
3865         * x86-low.h: New file.  All type, function and variable name
3866         prefixes changed from "i386_" to "x86_".  All references updated.
3867         * i386-low.c: Renamed as...
3868         * x86-low.c: New file.  All type, function and variable name
3869         prefixes changed from "i386_" to "x86_".  All references updated.
3870
3871 2014-09-02  Gary Benson  <gbenson@redhat.com>
3872
3873         * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
3874         (x86_linux_new_thread): Likewise.
3875
3876 2014-08-29  Gary Benson  <gbenson@redhat.com>
3877
3878         * server.h (setjmp.h): Do not include.
3879         (toplevel): Do not declare.
3880         (common-exceptions.h): Include.
3881         (cleanups.h): Likewise.
3882         * server.c (toplevel): Do not define.
3883         (exit_code): New static global.
3884         (detach_or_kill_for_exit_cleanup): New function.
3885         (main): New function.  Original main renamed to...
3886         (captured_main): New function.
3887         * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
3888
3889 2014-08-29  Gary Benson  <gbenson@redhat.com>
3890
3891         * Makefile.in (SFILES): Add common/common-exceptions.c.
3892         (OBS): Add common-exceptions.o.
3893         (common-exceptions.o): New rule.
3894         * utils.c (prepare_to_throw_exception): New function.
3895
3896 2014-08-29  Gary Benson  <gbenson@redhat.com>
3897
3898         * config.in: Regenerate.
3899         * configure: Likewise.
3900
3901 2014-08-29  Gary Benson  <gbenson@redhat.com>
3902
3903         * Makefile.in (SFILES): Add common/cleanups.c.
3904         (OBS): cleanups.o.
3905         (cleanups.o): New rule.
3906
3907 2014-08-29  Gary Benson  <gbenson@redhat.com>
3908
3909         * utils.c (internal_vwarning): New function.
3910
3911 2014-08-28  Gary Benson  <gbenson@redhat.com>
3912
3913         * utils.h (fatal): Remove declaration.
3914         * utils.c (fatal): Remove function.
3915
3916 2014-08-28  Gary Benson  <gbenson@redhat.com>
3917
3918         * tracepoint.c (gdb_agent_init): Replace fatal with
3919         perror_with_name.
3920         (initialize_tracepoint): Likewise.
3921
3922 2014-08-28  Gary Benson  <gbenson@redhat.com>
3923
3924         * remote-utils.c (remote_prepare): Replace fatal with error.
3925
3926 2014-08-28  Gary Benson  <gbenson@redhat.com>
3927
3928         * linux-low.c (linux_async): Replace fatal with warning.
3929         Tidy up and return.
3930         (linux_start_non_stop): Return -1 if linux_async failed.
3931
3932 2014-08-28  Gary Benson  <gbenson@redhat.com>
3933
3934         * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
3935         gdb_assert.
3936         (i386_dr_low_get_addr): Remove vague comment.
3937         * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
3938         gdb_assert.
3939
3940 2014-08-28  Gary Benson  <gbenson@redhat.com>
3941
3942         * inferiors.c (get_thread_process): Replace check with gdb_assert.
3943         * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
3944         internal_error.
3945         (linux_resume_one_lwp): Likewise.
3946         * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
3947         gdb_assert.
3948         * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
3949         with internal_error.
3950         * regcache.c (get_thread_regcache): Replace check with gdb_assert.
3951         (init_register_cache): Replace fatal with gdb_assert_not_reached.
3952         (find_register_by_name): Replace fatal with internal_error.
3953         (find_regno): Likewise.
3954         * tdesc.c (init_target_desc): Replace check with gdb_assert.
3955         * thread-db.c (thread_db_create_event): Likewise.
3956         (thread_db_load_search): Likewise.
3957         (try_thread_db_load_1): Likewise.
3958         * tracepoint.c (get_jump_space_head): Replace fatal with
3959         internal_error.
3960         (claim_trampoline_space): Likewise.
3961         (have_fast_tracepoint_trampoline_buffer): Likewise.
3962         (cmd_qtstart): Likewise.
3963         (stop_tracing): Likewise.
3964         (fast_tracepoint_collecting): Likewise.
3965         (target_malloc): Likewise.
3966         (download_tracepoint): Likewise.
3967         (download_trace_state_variables): Replace check with gdb_assert.
3968         (upload_fast_traceframes): Replace fatal with internal_error.
3969
3970 2014-08-19  Tom Tromey  <tromey@redhat.com>
3971             Gary Benson  <gbenson@redhat.com>
3972
3973         * Makefile.in (SFILES): Add common/common-debug.c.
3974         (OBS): Add common-debug.o.
3975         (common-debug.o): New rule.
3976         * debug.h (debug_printf): Don't declare.
3977         * debug.c (debug_printf): Renamed and rewritten as...
3978         (debug_vprintf): New function.
3979
3980 2014-08-19  Gary Benson  <gbenson@redhat.com>
3981
3982         * utils.h: Do not include print-utils.h.
3983
3984 2014-08-19  Tom Tromey  <tromey@redhat.com>
3985             Gary Benson  <gbenson@redhat.com>
3986
3987         * server.h: Add static assertion.
3988         (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
3989
3990 2014-08-19  Tom Tromey  <tromey@redhat.com>
3991             Gary Benson  <gbenson@redhat.com>
3992
3993         * Makefile.in (SFILES): Add common/errors.c.
3994         (OBS): Add errors.o.
3995         (IPA_OBS): Add errors-ipa.o.
3996         (errors.o): New rule.
3997         (errors-ipa.o): Likewise.
3998         * utils.h (perror_with_name, error, warning): Don't declare.
3999         * utils.c (warning): Renamed and rewritten as...
4000         (vwarning): New function.
4001         (error): Renamed and rewritten as...
4002         (verror): New function.
4003         (internal_error): Renamed and rewritten as...
4004         (internal_verror): New function.
4005
4006 2014-08-07  Gary Benson  <gbenson@redhat.com>
4007
4008         * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
4009         * configure: Regenerate.
4010         * config.in: Likewise.
4011         * server.h: Do not include errno.h.
4012         * event-loop.c: Likewise.
4013         * hostio-errno.c: Likewise.
4014         * linux-low.c: Likewise.
4015         * remote-utils.c: Likewise.
4016         * spu-low.c: Likewise.
4017         * utils.c: Likewise.
4018         * gdbreplay.c: Unconditionally include errno.h.
4019
4020 2014-08-07  Gary Benson  <gbenson@redhat.com>
4021
4022         * server.h: Do not include string.h.
4023         * event-loop.c: Likewise.
4024         * linux-low.c: Likewise.
4025         * regcache.c: Likewise.
4026         * remote-utils.c: Likewise.
4027         * spu-low.c: Likewise.
4028         * utils.c: Likewise.
4029
4030 2014-08-07  Gary Benson  <gbenson@redhat.com>
4031
4032         * server.h: Do not include gdb_assert.h.
4033
4034 2014-08-07  Gary Benson  <gbenson@redhat.com>
4035
4036         * server.h: Do not include common-utils.h.
4037
4038 2014-08-07  Gary Benson  <gbenson@redhat.com>
4039
4040         * server.h: Do not include ptid.h.
4041         * notif.h: Likewise.
4042
4043 2014-08-07  Gary Benson  <gbenson@redhat.com>
4044
4045         * server.h: Do not include gdb_locale.h.
4046
4047 2014-08-07  Gary Benson  <gbenson@redhat.com>
4048
4049         * server.h: Do not include gdb/signals.h.
4050         * win32-low.c: Likewise.
4051
4052 2014-08-07  Gary Benson  <gbenson@redhat.com>
4053
4054         * server.h: Do not include pathmax.h.
4055
4056 2014-08-07  Gary Benson  <gbenson@redhat.com>
4057
4058         * server.h: Do not include libiberty.h.
4059         * linux-bfin-low.c: Likewise.
4060
4061 2014-08-07  Gary Benson  <gbenson@redhat.com>
4062
4063         * server.h: Do not include ansidecl.h.
4064
4065 2014-08-07  Gary Benson  <gbenson@redhat.com>
4066
4067         * linux-x86-low.c: Do not include stddef.h.
4068         * lynx-ppc-low.c: Likewise.
4069         * tracepoint.c: Likewise.
4070
4071 2014-08-07  Gary Benson  <gbenson@redhat.com>
4072
4073         * server.h: Do not include stdarg.h.
4074         * nto-low.c: Likewise.
4075
4076 2014-08-07  Gary Benson  <gbenson@redhat.com>
4077
4078         * server.h: Do not include stdlib.h.
4079         * inferiors.c: Likewise.
4080         * linux-low.c: Likewise.
4081         * regcache.c: Likewise.
4082         * spu-low.c: Likewise.
4083         * tracepoint.c: Likewise.
4084         * utils.c: Likewise.
4085
4086 2014-08-07  Gary Benson  <gbenson@redhat.com>
4087
4088         * server.h: Do not include stdio.h.
4089         * linux-low.c: Likewise.
4090         * remote-utils.c: Likewise.
4091         * spu-low.c: Likewise.
4092         * utils.c: Likewise.
4093         * wincecompat.c: Likewise.
4094
4095 2014-08-06  Gary Benson  <gbenson@redhat.com>
4096
4097         * regcache.c (init_register_cache): Move conditionals inside if.
4098
4099 2014-08-06  Gary Benson  <gbenson@redhat.com>
4100
4101         * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4102
4103 2014-07-31  Gary Benson  <gbenson@redhat.com>
4104
4105         * ax.h: Do not include server.h.
4106         * gdbthread.h: Likewise.
4107         * lynx-low.h: Likewise.
4108         * notif.h: Likewise.
4109
4110 2014-07-30  Gary Benson  <gbenson@redhat.com>
4111
4112         * server.h: Include common-defs.h.
4113         Do not include config.h or build-gnulib-gdbserver/config.h.
4114
4115 2014-07-30  Gary Benson  <gbenson@redhat.com>
4116
4117         * hostio-errno.c: Move server.h to top of includes list.
4118         * inferiors.c: Likewise.
4119         * linux-x86-low.c: Likewise.
4120         * notif.c: Include server.h.
4121
4122 2014-07-24  Tom Tromey  <tromey@redhat.com>
4123             Gary Benson  <gbenson@redhat.com>
4124
4125         * server.h (CORE_ADDR): Now unsigned.
4126
4127 2014-07-16  Pedro Alves  <palves@redhat.com>
4128
4129         * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
4130
4131 2014-07-15  Pedro Alves  <palves@redhat.com>
4132
4133         * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
4134         copy.
4135
4136 2014-07-11  Pedro Alves  <palves@redhat.com>
4137
4138         * linux-low.c (kill_wait_lwp): New function, based on
4139         kill_one_lwp_callback, but use my_waitpid directly.
4140         (kill_one_lwp_callback, linux_kill): Use it.
4141
4142 2014-06-23  Pedro Alves  <palves@redhat.com>
4143
4144         * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
4145         before setting DR0..DR3.
4146
4147 2014-06-20  Gary Benson  <gbenson@redhat.com>
4148
4149         * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
4150         * configure: Regenerated.
4151         * config.in: Likewise.
4152
4153 2014-06-20  Gary Benson  <gbenson@redhat.com>
4154
4155         * Makefile.in (SFILES): Update locations for files moved
4156         from common to nat.
4157         (object file files): Reordered.
4158
4159 2014-06-20  Gary Benson  <gbenson@redhat.com>
4160
4161         * i386-low.h (i386_dr_low_can_set_addr): Removed.
4162         (i386_dr_low_set_addr): Likewise.
4163         (i386_dr_low_get_addr): Likewise.
4164         (i386_dr_low_can_set_control): Likewise.
4165         (i386_dr_low_set_control): Likewise.
4166         (i386_dr_low_get_control): Likewise.
4167         (i386_dr_low_get_status): Likewise.
4168         (i386_get_debug_register_length): Likewise.
4169         * linux-x86-low.c (i386_dr_low_set_addr):
4170         Changed signature.  Made static.
4171         (i386_dr_low_get_addr): Likewise.
4172         (i386_dr_low_set_control): Likewise.
4173         (i386_dr_low_get_control): Likewise.
4174         (i386_dr_low_get_status): Likewise.
4175         (i386_dr_low): New global variable.
4176         * win32-i386-low.c (i386_dr_low_set_addr):
4177         Changed signature.  Made static.
4178         (i386_dr_low_get_addr): Likewise.
4179         (i386_dr_low_set_control): Likewise.
4180         (i386_dr_low_get_control): Likewise.
4181         (i386_dr_low_get_status): Likewise.
4182         (i386_dr_low): New global variable.
4183
4184 2014-06-20  Marcus Shawcroft  <marcus.shawcroft@arm.com>
4185
4186         * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
4187         * Makefile.in (AR, AR_FLAGS): Define.
4188         * configure: Regenerate.
4189
4190 2014-06-19  Gary Benson  <gbenson@redhat.com>
4191
4192         * Makefile.in (i386-dregs.o): New rule.
4193         * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
4194         * i386-low.c (target.h): Remove include.
4195         (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
4196         (DR_CONTROL_SHIFT): Likewise.
4197         (DR_CONTROL_SIZE): Likewise.
4198         (DR_RW_EXECUTE): Likewise.
4199         (DR_RW_WRITE): Likewise.
4200         (DR_RW_READ): Likewise.
4201         (DR_RW_IORW): Likewise.
4202         (DR_LEN_1): Likewise.
4203         (DR_LEN_2): Likewise.
4204         (DR_LEN_4): Likewise.
4205         (DR_LEN_8): Likewise.
4206         (DR_LOCAL_ENABLE_SHIFT): Likewise.
4207         (DR_GLOBAL_ENABLE_SHIFT): Likewise.
4208         (DR_ENABLE_SIZE): Likewise.
4209         (DR_LOCAL_SLOWDOWN): Likewise.
4210         (DR_GLOBAL_SLOWDOWN): Likewise.
4211         (DR_CONTROL_RESERVED): Likewise.
4212         (I386_DR_CONTROL_MASK): Likewise.
4213         (I386_DR_VACANT): Likewise.
4214         (I386_DR_LOCAL_ENABLE): Likewise.
4215         (I386_DR_GLOBAL_ENABLE): Likewise.
4216         (I386_DR_DISABLE): Likewise.
4217         (I386_DR_SET_RW_LEN): Likewise.
4218         (I386_DR_GET_RW_LEN): Likewise.
4219         (I386_DR_WATCH_HIT): Likewise.
4220         (i386_wp_op_t): Likewise.
4221         (i386_show_dr): Likewise.
4222         (i386_length_and_rw_bits): Likewise.
4223         (i386_insert_aligned_watchpoint): Likewise.
4224         (i386_remove_aligned_watchpoint): Likewise.
4225         (i386_handle_nonaligned_watchpoint): Likewise.
4226         i386_update_inferior_debug_regs(): Likewise.
4227         (i386_dr_insert_watchpoint): Likewise.
4228         (i386_dr_remove_watchpoint): Likewise.
4229         (i386_dr_region_ok_for_watchpoint): Likewise.
4230         (i386_dr_stopped_data_address): Likewise.
4231         (i386_dr_stopped_by_watchpoint): Likewise.
4232
4233 2014-06-19  Gary Benson  <gbenson@redhat.com>
4234
4235         * i386-low.c (i386_dr_show): Renamed to
4236         i386_show_dr and made static.  All uses updated.
4237         (i386_dr_length_and_rw_bits): Renamed to
4238         i386_length_and_rw_bits and made static.
4239         All uses updated.
4240         (i386_dr_insert_aligned_watchpoint): Renamed to
4241         i386_insert_aligned_watchpoint and made static.
4242         All uses updated.
4243         (i386_dr_remove_aligned_watchpoint): Renamed to
4244         i386_remove_aligned_watchpoint and made static.
4245         All uses updated.
4246         (i386_dr_update_inferior_debug_regs): Renamed to
4247         i386_update_inferior_debug_regs and made static.
4248         All uses updated.
4249
4250 2014-06-18  Gary Benson  <gbenson@redhat.com>
4251
4252         * i386-low.h (i386_dr_low_can_set_addr): New macro.
4253         (i386_dr_low_can_set_control): Likewise.
4254         (i386_get_debug_register_length): Likewise.
4255         * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
4256         (i386_dr_low_can_set_control): Likewise.
4257         (i386_get_debug_register_length): Likewise.
4258
4259 2014-06-17  Gary Benson  <gbenson@redhat.com>
4260
4261         * i386-low.h (i386-dregs.h): New include.
4262         (DR_FIRSTADDR): Now in i386-dregs.h.
4263         (DR_LASTADDR): Likewise.
4264         (DR_NADDR): Likewise.
4265         (DR_STATUS): Likewise.
4266         (DR_CONTROL): Likewise.
4267         (i386_debug_reg_state): Likewise.
4268         (i386_dr_insert_watchpoint): Likewise.
4269         (i386_dr_remove_watchpoint): Likewise.
4270         (i386_dr_region_ok_for_watchpoint): Likewise.
4271         (i386_dr_stopped_data_address): Likewise.
4272         (i386_dr_stopped_by_watchpoint): Likewise.
4273         * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
4274
4275 2014-06-18  Gary Benson  <gbenson@redhat.com>
4276
4277         * i386-low.h (i386_low_insert_watchpoint): Renamed to
4278         i386_dr_insert_watchpoint.
4279         (i386_low_remove_watchpoint): Renamed to
4280         i386_dr_remove_watchpoint.
4281         (i386_low_region_ok_for_watchpoint): Renamed to
4282         i386_dr_region_ok_for_watchpoint.
4283         (i386_low_stopped_data_address): Renamed to
4284         i386_dr_stopped_data_address.
4285         (i386_low_stopped_by_watchpoint): Renamed to
4286         i386_dr_stopped_by_watchpoint.
4287         * i386-low.c (i386_show_dr): Renamed to
4288         i386_dr_show and made nonstatic.  All uses updated.
4289         (i386_length_and_rw_bits): Renamed to
4290         i386_dr_length_and_rw_bits and made nonstatic.
4291         All uses updated.
4292         (i386_insert_aligned_watchpoint): Renamed to
4293         i386_dr_insert_aligned_watchpoint and made nonstatic.
4294         All uses updated.
4295         (i386_remove_aligned_watchpoint): Renamed to
4296         i386_dr_remove_aligned_watchpoint and made nonstatic.
4297         All uses updated.
4298         (i386_update_inferior_debug_regs): Renamed to
4299         i386_dr_update_inferior_debug_regs and made nonstatic.
4300         All uses updated.
4301         (i386_low_insert_watchpoint): Renamed to
4302         i386_dr_insert_watchpoint.  All uses updated.
4303         (i386_low_remove_watchpoint): Renamed to
4304         i386_dr_remove_watchpoint.  All uses updated.
4305         (i386_low_region_ok_for_watchpoint): Renamed to
4306         i386_dr_region_ok_for_watchpoint.  All uses updated.
4307         (i386_low_stopped_data_address): Renamed to
4308         i386_dr_stopped_data_address.  All uses updated.
4309         (i386_low_stopped_by_watchpoint): Renamed to
4310         i386_dr_stopped_by_watchpoint.  All uses updated.
4311
4312 2014-06-18  Gary Benson  <gbenson@redhat.com>
4313
4314         * i386-low.c (i386_dr_low_can_set_addr): New macro.
4315         (i386_dr_low_can_set_control): Likewise.
4316         (i386_insert_aligned_watchpoint): New check.
4317
4318 2014-06-18  Gary Benson  <gbenson@redhat.com>
4319
4320         * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
4321         Renamed to state.
4322
4323 2014-06-18  Gary Benson  <gbenson@redhat.com>
4324
4325         * i386-low.c (i386_length_and_rw_bits): Use internal_error
4326         instead of fatal and error.
4327         (i386_handle_nonaligned_watchpoint): Likewise.
4328
4329 2014-06-18  Gary Benson  <gbenson@redhat.com>
4330
4331         * i386-low.c (i386_get_debug_register_length): New macro.
4332         (TARGET_HAS_DR_LEN_8): Remove conditional.  Use above macro.
4333         (i386_show_dr): Use debug_printf instead of fprintf.  Use
4334         phex to format values.
4335
4336 2014-06-18  Gary Benson  <gbenson@redhat.com>
4337
4338         * i386-low.h: Comment changes.
4339         * i386-low.c: Likewise.
4340
4341 2014-06-18  Gary Benson  <gbenson@redhat.com>
4342
4343         * i386-low.c: Whitespace changes.
4344
4345 2014-06-12  Tom Tromey  <tromey@redhat.com>
4346
4347         * utils.c (freeargv): Remove.
4348
4349 2014-06-12  Tom Tromey  <tromey@redhat.com>
4350
4351         * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
4352         * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
4353         (parse_debug_format_options): Likewise.
4354         (gdbserver_usage): Likewise.
4355         * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
4356         (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
4357         (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
4358         against libiberty.
4359         ($(LIBGNU)): Depend on libiberty.
4360         (all-lib): Recurse into all subdirs.
4361         (install-only): Invoke "install" target in subdirs.
4362         (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
4363         targets.
4364         * configure: Rebuild.
4365         * configure.ac: Add ACX_CONFIGURE_DIR for libiberty.  Don't check
4366         for vasprintf, vsnprintf, or gettimeofday.
4367         * configure.srv: Don't add safe-ctype.o or lbasename.o to
4368         srv_tgtobj.
4369
4370 2014-06-05  Joel Brobecker  <brobecker@adacore.com>
4371
4372         * development.sh: Delete.
4373         * Makefile.in (config.status): Adjust dependency on development.sh.
4374         * configure.ac: Adjust development.sh source call.
4375         * configure: Regenerate.
4376
4377 2014-06-02  Pedro Alves  <palves@redhat.com>
4378
4379         * ax.c (gdb_free_agent_expr): New function.
4380         * ax.h (gdb_free_agent_expr): New declaration.
4381         * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
4382         list.
4383         (clear_breakpoint_conditions, clear_breakpoint_commands): Make
4384         static.
4385         (clear_breakpoint_conditions_and_commands): New function.
4386         * mem-break.h (clear_breakpoint_conditions): Delete declaration.
4387         (clear_breakpoint_conditions_and_commands): New declaration.
4388
4389 2014-05-23  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
4390
4391         * linux-aarch64-low.c (asm/ptrace.h): Include.
4392
4393 2014-05-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
4394
4395         Fix TLS access for -static -pthread.
4396         * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
4397         (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
4398         (thread_db_load_search, try_thread_db_load_1): Initialize it.
4399
4400 2014-05-20  Pedro Alves  <palves@redhat.com>
4401
4402         * linux-aarch64-low.c (aarch64_insert_point)
4403         (aarch64_remove_point): No longer check whether the type is
4404         supported here.  Adjust to new interface.
4405         (the_low_target): Install aarch64_supports_z_point_type as
4406         supports_z_point_type method.
4407         * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
4408         (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
4409         instead of a Z packet char.  Adjust.
4410         (arm_supports_z_point_type): New function.
4411         (arm_insert_point, arm_remove_point): Adjust to new interface.
4412         (the_low_target): Install arm_supports_z_point_type.
4413         * linux-crisv32-low.c (cris_supports_z_point_type): New function.
4414         (cris_insert_point, cris_remove_point): Adjust to new interface.
4415         Don't check whether the type is supported here.
4416         (the_low_target): Install cris_supports_z_point_type.
4417         * linux-low.c (linux_supports_z_point_type): New function.
4418         (linux_insert_point, linux_remove_point): Adjust to new interface.
4419         * linux-low.h (struct linux_target_ops) <insert_point,
4420         remove_point>: Take an enum raw_bkpt_type instead of a char.  Add
4421         raw_breakpoint pointer parameter.
4422         <supports_z_point_type>: New method.
4423         * linux-mips-low.c (mips_supports_z_point_type): New function.
4424         (mips_insert_point, mips_remove_point): Adjust to new interface.
4425         Use mips_supports_z_point_type.
4426         (the_low_target): Install mips_supports_z_point_type.
4427         * linux-ppc-low.c (the_low_target): Install NULL as
4428         supports_z_point_type method.
4429         * linux-s390-low.c (the_low_target): Install NULL as
4430         supports_z_point_type method.
4431         * linux-sparc-low.c (the_low_target): Install NULL as
4432         supports_z_point_type method.
4433         * linux-x86-low.c (x86_supports_z_point_type): New function.
4434         (x86_insert_point): Adjust to new insert_point interface.  Use
4435         insert_memory_breakpoint.  Adjust to new
4436         i386_low_insert_watchpoint interface.
4437         (x86_remove_point): Adjust to remove_point interface.  Use
4438         remove_memory_breakpoint.  Adjust to new
4439         i386_low_remove_watchpoint interface.
4440         (the_low_target): Install x86_supports_z_point_type.
4441         * lynx-low.c (lynx_target_ops): Install NULL as
4442         supports_z_point_type callback.
4443         * nto-low.c (nto_supports_z_point_type): New.
4444         (nto_insert_point, nto_remove_point): Adjust to new interface.
4445         (nto_target_ops): Install nto_supports_z_point_type.
4446         * mem-break.c: Adjust intro comment.
4447         (struct raw_breakpoint) <raw_type, size>: New fields.
4448         <inserted>: Update comment.
4449         <shlib_disabled>: Delete field.
4450         (enum bkpt_type) <gdb_breakpoint>: Delete value.
4451         <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
4452         gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
4453         (raw_bkpt_type_to_target_hw_bp_type): New function.
4454         (find_enabled_raw_code_breakpoint_at): New function.
4455         (find_raw_breakpoint_at): New type and size parameters.  Use them.
4456         (insert_memory_breakpoint): New function, based off
4457         set_raw_breakpoint_at.
4458         (remove_memory_breakpoint): New function.
4459         (set_raw_breakpoint_at): Reimplement.
4460         (set_breakpoint): New, based on set_breakpoint_at.
4461         (set_breakpoint_at): Reimplement.
4462         (delete_raw_breakpoint): Go through the_target->remove_point
4463         instead of assuming memory breakpoints.
4464         (find_gdb_breakpoint_at): Delete.
4465         (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
4466         (find_gdb_breakpoint): New function.
4467         (set_gdb_breakpoint_at): Delete.
4468         (z_type_supported): New function.
4469         (set_gdb_breakpoint_1): New function, loosely based off
4470         set_gdb_breakpoint_at.
4471         (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
4472         (delete_gdb_breakpoint_at): Delete.
4473         (delete_gdb_breakpoint_1): New function, loosely based off
4474         delete_gdb_breakpoint_at.
4475         (delete_gdb_breakpoint): New function.
4476         (clear_gdb_breakpoint_conditions): Rename to ...
4477         (clear_breakpoint_conditions): ... this.  Don't handle a NULL
4478         breakpoint.
4479         (add_condition_to_breakpoint): Make static.
4480         (add_breakpoint_condition): Take a struct breakpoint pointer
4481         instead of an address.  Adjust.
4482         (gdb_condition_true_at_breakpoint): Rename to ...
4483         (gdb_condition_true_at_breakpoint_z_type): ... this, and add
4484         z_type parameter.
4485         (gdb_condition_true_at_breakpoint): Reimplement.
4486         (add_breakpoint_commands): Take a struct breakpoint pointer
4487         instead of an address.  Adjust.
4488         (gdb_no_commands_at_breakpoint): Rename to ...
4489         (gdb_no_commands_at_breakpoint_z_type): ... this.  Add z_type
4490         parameter.  Return true if no breakpoint was found.  Change debug
4491         output.
4492         (gdb_no_commands_at_breakpoint): Reimplement.
4493         (run_breakpoint_commands): Rename to ...
4494         (run_breakpoint_commands_z_type): ... this.  Add z_type parameter,
4495         and change return type to boolean.
4496         (run_breakpoint_commands): New function.
4497         (gdb_breakpoint_here): Also check for Z1 breakpoints.
4498         (uninsert_raw_breakpoint): Don't try to reinsert a disabled
4499         breakpoint.  Go through the_target->remove_point instead of
4500         assuming memory breakpoint.
4501         (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
4502         software and hardware breakpoints.
4503         (reinsert_raw_breakpoint): Go through the_target->insert_point
4504         instead of assuming memory breakpoint.
4505         (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
4506         software and hardware breakpoints.
4507         (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
4508         Check both software and hardware breakpoints.
4509         (validate_inserted_breakpoint): Assert the breakpoint is a
4510         software breakpoint.  Set the inserted flag to -1 instead of
4511         setting shlib_disabled.
4512         (delete_disabled_breakpoints): Adjust.
4513         (validate_breakpoints): Only validate software breakpoints.
4514         Adjust to inserted flag change.
4515         (check_mem_read, check_mem_write): Skip breakpoint types other
4516         than software breakpoints.  Adjust to inserted flag change.
4517         * mem-break.h (enum raw_bkpt_type): New enum.
4518         (raw_breakpoint, struct process_info): Forward declare.
4519         (Z_packet_to_target_hw_bp_type): Delete declaration.
4520         (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
4521         (set_gdb_breakpoint, delete_gdb_breakpoint)
4522         (clear_breakpoint_conditions): New declarations.
4523         (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
4524         (breakpoint_inserted_here): Update comment.
4525         (add_breakpoint_condition, add_breakpoint_commands): Replace
4526         address parameter with a breakpoint pointer parameter.
4527         (gdb_breakpoint_here): Update comment.
4528         (delete_gdb_breakpoint_at): Delete.
4529         (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
4530         * server.c (process_point_options): Take a struct breakpoint
4531         pointer instead of an address.  Adjust.
4532         (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
4533         delete_gdb_breakpoint.
4534         * spu-low.c (spu_target_ops): Install NULL as
4535         supports_z_point_type method.
4536         * target.h: Include mem-break.h.
4537         (struct target_ops) <prepare_to_access_memory>: Update comment.
4538         <supports_z_point_type>: New field.
4539         <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4540         instead of a char.  Also take a raw breakpoint pointer.
4541         * win32-arm-low.c (the_low_target): Install NULL as
4542         supports_z_point_type.
4543         * win32-i386-low.c (i386_supports_z_point_type): New function.
4544         (i386_insert_point, i386_remove_point): Adjust to new interface.
4545         (the_low_target): Install i386_supports_z_point_type.
4546         * win32-low.c (win32_supports_z_point_type): New function.
4547         (win32_insert_point, win32_remove_point): Adjust to new interface.
4548         (win32_target_ops): Install win32_supports_z_point_type.
4549         * win32-low.h (struct win32_target_ops):
4550         <supports_z_point_type>: New method.
4551         <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4552         instead of a char.  Also take a raw breakpoint pointer.
4553
4554 2014-05-20  Pedro Alves  <palves@redhat.com>
4555
4556         * mem-break.h: Include break-common.h.
4557         (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4558         (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
4559         (Z_packet_to_target_hw_bp_type): New declaration.
4560         * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
4561         * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
4562         (Z_PACKET_ACCESS_WP): Delete macros.
4563         (Z_packet_to_hw_type): Delete function.
4564         * i386-low.h: Don't include break-common.h here.
4565         (Z_packet_to_hw_type): Delete declaration.
4566         * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
4567         Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4568         * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
4569         Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4570         * linux-aarch64-low.c: Don't include break-common.h here.
4571         (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4572         (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
4573         (Z_packet_to_target_hw_bp_type): Delete function.
4574         * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
4575         function.
4576         (mips_insert_point, mips_remove_point): Use
4577         Z_packet_to_target_hw_bp_type.
4578
4579 2014-05-20  Pedro Alves  <palves@redhat.com>
4580
4581         * linux-aarch64-low.c: Include break-common.h.
4582         (enum target_point_type): Delete.
4583         (Z_packet_to_point_type): Rename to ...
4584         (Z_packet_to_target_hw_bp_type): ... this, and return a
4585         target_hw_bp_type instead.
4586         (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
4587         instead of an enum target_point_type.
4588         (aarch64_point_encode_ctrl_reg): Likewise.  Compute type mask from
4589         breakpoint type.
4590         (aarch64_dr_state_insert_one_point)
4591         (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
4592         (aarch64_handle_aligned_watchpoint)
4593         (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
4594         Take an enum target_hw_bp_type instead of an enum
4595         target_point_type.
4596         (aarch64_supports_z_point_type): New function.
4597         (aarch64_insert_point, aarch64_remove_point): Use it.  Adjust to
4598         use Z_packet_to_target_hw_bp_type.
4599
4600 2014-05-20  Joel Brobecker  <brobecker@adacore.com>
4601
4602         * configure.ac: Only use -Werror by default when DEVELOPMENT
4603         is true.
4604         * configure: Regenerate.
4605
4606 2014-05-19  Jan Kratochvil  <jan.kratochvil@redhat.com>
4607
4608         Fix gdbserver qGetTLSAddr for x86_64 -m32.
4609         * linux-x86-low.c (X86_64_USER_REGS): New.
4610         (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
4611
4612 2014-04-28  Yao Qi  <yao@codesourcery.com>
4613
4614         * Makefile.in (i386-avx512.c): Fix the typo of generated file
4615         name.
4616
4617 2014-04-25  Pedro Alves  <palves@redhat.com>
4618
4619         PR server/16255
4620         * linux-low.c (linux_attach_fail_reason_string): New function.
4621         (linux_attach_lwp): Delete.
4622         (linux_attach_lwp_1): Rename to ...
4623         (linux_attach_lwp): ... this.  Take a ptid instead of a pid as
4624         argument.  Remove "initial" parameter.  Return int instead of
4625         void.  Don't error or warn here.
4626         (linux_attach): Adjust to call linux_attach_lwp.  Call error on
4627         failure to attach to the tgid.  Call warning when failing to
4628         attach to an lwp.
4629         * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
4630         argument.  Remove "initial" parameter.  Return int instead of
4631         void.  Don't error or warn here.
4632         (linux_attach_fail_reason_string): New declaration.
4633         * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
4634         interface change.  Use linux_attach_fail_reason_string.
4635
4636 2014-04-24  Michael Sturm  <michael.sturm@mintel.com>
4637             Walfred Tedeschi  <walfred.tedeschi@intel.com>
4638
4639         * Makefile.in: Added rules to handle new files
4640         i386-avx512.c i386-avx512-linux.c amd64-avx512.c
4641         amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
4642         * configure.srv (srv_i386_regobj): Add i386-avx512.o.
4643         (srv_i386_linux_regobj): Add i386-avx512-linux.o.
4644         (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
4645         (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
4646         x32-avx512-linux.o.
4647         (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
4648         (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
4649         (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
4650         i386/x32-avx512.xml.
4651         (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
4652         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
4653         i386/x32-avx512-linux.xml.
4654         * i387-fp.c (num_avx512_k_registers): New constant for number
4655         of K registers.
4656         (num_avx512_zmmh_low_registers): New constant for number of
4657         lower ZMM registers (0-15).
4658         (num_avx512_zmmh_high_registers): New constant for number of
4659         higher ZMM registers (16-31).
4660         (num_avx512_ymmh_registers): New contant for number of higher
4661         YMM registers (ymm16-31 added by avx521 on x86_64).
4662         (num_avx512_xmm_registers): New constant for number of higher
4663         XMM registers (xmm16-31 added by AVX512 on x86_64).
4664         (struct i387_xsave): Add space for AVX512 registers.
4665         (i387_cache_to_xsave): Change raw buffer size to 64 characters.
4666         Add code to handle AVX512 registers.
4667         (i387_xsave_to_cache): Add code to handle AVX512 registers.
4668         * linux-x86-low.c (init_registers_amd64_avx512_linux): New
4669         prototypei from generated file.
4670         (tdesc_amd64_avx512_linux): Likewise.
4671         (init_registers_x32_avx512_linux): Likewise.
4672         (tdesc_x32_avx512_linux): Likewise.
4673         (init_registers_i386_avx512_linux): Likewise.
4674         (tdesc_i386_avx512_linux): Likewise.
4675         (x86_64_regmap): Add AVX512 registers.
4676         (x86_linux_read_description): Add code to handle AVX512 XSTATE
4677         mask.
4678         (initialize_low_arch): Add code to initialize AVX512 registers.
4679
4680 2014-04-23  Pedro Alves  <palves@redhat.com>
4681
4682         * mem-break.c (find_gdb_breakpoint_at): Make static.
4683         * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
4684
4685 2014-04-23  Pedro Alves  <palves@redhat.com>
4686
4687         * i386-low.c: Don't include break-common.h here.
4688         (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4689         prototype to take target_hw_bp_type as argument instead of a Z
4690         packet char.
4691         * i386-low.h: Include break-common.h here.
4692         (Z_packet_to_hw_type): Declare.
4693         (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4694         prototypes.
4695         * linux-x86-low.c (x86_insert_point): Convert the packet number to
4696         a target_hw_bp_type before calling i386_low_insert_watchpoint.
4697         (x86_remove_point): Convert the packet number to a
4698         target_hw_bp_type before calling i386_low_remove_watchpoint.
4699         * win32-i386-low.c (i386_insert_point): Convert the packet number
4700         to a target_hw_bp_type before calling i386_low_insert_watchpoint.
4701         (i386_remove_point): Convert the packet number to a
4702         target_hw_bp_type before calling i386_low_remove_watchpoint.
4703
4704 2014-04-23  Pedro Alves  <palves@redhat.com>
4705
4706         * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
4707
4708 2014-04-10  Pedro Alves  <palves@redhat.com>
4709
4710         * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4711         Check if the condition or command is NULL before checking if the
4712         breakpoint is known.  On success, return true.
4713         * mem-break.h (add_breakpoint_condition): Document return.
4714         (add_breakpoint_commands): Add describing comment.
4715         * server.c (skip_to_semicolon): New function.
4716         (process_point_options): Use it.
4717
4718 2014-04-09  Pedro Alves  <palves@redhat.com>
4719
4720         * linux-low.c (linux_read_loadmap): Pass current_inferior directly
4721         to lwpid_of.
4722
4723 2014-02-27  Pedro Alves  <palves@redhat.com>
4724
4725         PR 12702
4726         * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
4727         macros.
4728         * linux-low.c (delete_lwp, handle_extended_wait): Add debug
4729         output.
4730         (last_thread_of_process_p): Take a PID argument instead of a
4731         thread pointer.
4732         (linux_wait_for_lwp): Delete.
4733         (num_lwps, check_zombie_leaders, not_stopped_callback): New
4734         functions.
4735         (linux_low_filter_event): New function, party factored out from
4736         linux_wait_for_event.
4737         (linux_wait_for_event): Rename to ...
4738         (linux_wait_for_event_filtered): ... this.  Add new filter ptid
4739         argument.  Partly rewrite.  Always use waitpid(-1, WNOHANG) and
4740         sigsuspend.  Check for zombie leaders.
4741         (linux_wait_for_event): Reimplement as wrapper around
4742         linux_wait_for_event_filtered.
4743         (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED.  Assume that if
4744         a normal or signal exit is seen, it's the whole process exiting.
4745         (wait_for_sigstop): No longer a for_each_inferior callback.
4746         Rewrite on top of linux_wait_for_event_filtered.
4747         (stop_all_lwps): Call wait_for_sigstop directly.
4748         * server.c (resume, handle_target_event): Handle
4749         TARGET_WAITKIND_NO_RESUMED.
4750
4751 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
4752
4753         * win32-low.c (psapi_get_dll_name,
4754         * win32_CreateToolhelp32Snapshot): Delete.
4755         (win32_CreateToolhelp32Snapshot, win32_Module32First)
4756         (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
4757         Delete.
4758         (handle_load_dll): Add function description.
4759         Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
4760
4761 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
4762
4763         * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
4764         Add comment.
4765         (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
4766         base address when calling win32_add_one_solib.
4767         (handle_load_dll): Delete local variable load_addr.
4768         Remove 0x1000 offset applied to DLL base address when calling
4769         win32_add_one_solib.
4770         (handle_unload_dll): Add comment.
4771
4772 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
4773
4774         * win32-low.c (win32_add_all_dlls): Renames
4775         win32_ensure_ntdll_loaded.  Rewrite function documentation.
4776         Adjust implementation to always load all DLLs.
4777         Add 0x1000 offset to DLL base address when calling
4778         win32_add_one_solib.
4779         (child_initialization_done): New static global.
4780         (do_initial_child_stuff): Set child_initialization_done to
4781         zero during child initialization, and 1 after.  Replace call
4782         to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
4783         Add comment.
4784         (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
4785         (handle_unload_dll): Add function documentation.
4786         (get_child_debug_event): Ignore load and unload DLL events
4787         during child initialization.
4788
4789 2014-02-20  Doug Evans  <dje@google.com>
4790
4791         Remove global all_lwps.
4792         * inferiors.h (ptid_of): Move here from linux-low.h.
4793         (pid_of, lwpid_of): Ditto.
4794         * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
4795         parameter is a struct thread_info * now.
4796         (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
4797         directly.  Pass &all_threads to find_inferior instead of &all_lwps.
4798         (aarch64_stopped_data_address): Fetch lwpid from current_inferior
4799         directly.
4800         (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
4801         (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
4802         * linux-arm-low.c (update_registers_callback): Update, "entry"
4803         parameter is a struct thread_info * now.
4804         Fetch lwpid from current_inferior directly.
4805         (arm_insert_point): Pass &all_threads to find_inferior instead of
4806         &all_lwps.
4807         (arm_remove_point): Ditto.
4808         (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
4809         (arm_prepare_to_resume): Fetch pid from thread.
4810         (arm_read_description): Fetch lwpid from current_inferior directly.
4811         * linux-low.c (all_lwps): Delete.
4812         (delete_lwp): Delete call to remove_inferior.
4813         (handle_extended_wait): Fetch lwpid from thread.
4814         (add_lwp): Don't set lwp->entry.id.  Remove call to
4815         add_inferior_to_list.
4816         (linux_attach_lwp_1): Fetch pid from current_inferior directly.
4817         (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
4818         (kill_one_lwp_callback): Ditto.
4819         (linux_kill): Don't dereference NULL pointer.
4820         Fetch ptid,lwpid from thread.
4821         (get_detach_signal): Fetch ptid from thread.
4822         (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
4823         Simplify call to regcache_invalidate_thread.
4824         (delete_lwp_callback): Update, "entry" parameter is a
4825         struct thread_info * now.  Fetch pid from thread.
4826         (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
4827         (status_pending_p_callback): Update, "entry" parameter is a
4828         struct thread_info * now.  Fetch ptid from thread.
4829         (find_lwp_pid): Update, "entry" parameter is a
4830         struct thread_info * now.
4831         (linux_wait_for_lwp): Fetch pid from thread.
4832         (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
4833         (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
4834         (enqueue_one_deferred_signal): Fetch lwpid from thread.
4835         (dequeue_one_deferred_signal): Ditto.
4836         (cancel_breakpoint): Fetch ptid from current_inferior.
4837         (linux_wait_for_event): Pass &all_threads to find_inferior,
4838         not &all_lwps.  Fetch ptid, lwpid from thread.
4839         (count_events_callback): Update, "entry" parameter is a
4840         struct thread_info * now.
4841         (select_singlestep_lwp_callback): Ditto.
4842         (select_event_lwp_callback): Ditto.
4843         (cancel_breakpoints_callback): Ditto.
4844         (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
4845         not &all_lwps.
4846         (select_event_lwp): Ditto.  Fetch ptid from event_thread.
4847         (unsuspend_one_lwp): Update, "entry" parameter is a
4848         struct thread_info * now.
4849         (unsuspend_all_lwps): Pass &all_threads to find_inferior,
4850         not &all_lwps.
4851         (linux_stabilize_threads): Ditto.  And for for_each_inferior.
4852         Fetch lwpid from thread, not lwp.
4853         (linux_wait_1): Fetch ptid, lwpid from current_inferior.
4854         Pass &all_threads to find_inferior, not &all_lwps.
4855         (send_sigstop): Fetch lwpid from thread, not lwp.
4856         (send_sigstop_callback): Update, "entry" parameter is a
4857         struct thread_info * now.
4858         (suspend_and_send_sigstop_callback): Ditto.
4859         (wait_for_sigstop): Ditto.  Fetch ptid, lwpid from thread, lwp.
4860         (stuck_in_jump_pad_callback): Update, "entry" parameter is a
4861         struct thread_info * now.
4862         (move_out_of_jump_pad_callback): Ditto.  Fetch ptid, lwpid
4863         from thread, lwp.
4864         (lwp_running): Update, "entry" parameter is a
4865         struct thread_info * now.
4866         (stop_all_lwps): Fetch ptid from thread.
4867         Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
4868         (linux_resume_one_lwp): Fetch lwpid from thread.
4869         (linux_set_resume_request): Update, "entry" parameter is a
4870         struct thread_info * now.  Fetch pid, lwpid from thread.
4871         (resume_status_pending_p): Update, "entry" parameter is a
4872         struct thread_info * now.
4873         (need_step_over_p): Ditto.  Fetch lwpid from thread.
4874         (start_step_over): Fetch lwpid from thread.
4875         (linux_resume_one_thread): Update, "entry" parameter is a
4876         struct thread_info * now.  Fetch lwpid from thread.
4877         (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
4878         (proceed_one_lwp): Update, "entry" parameter is a
4879         struct thread_info * now.  Fetch lwpid from thread.
4880         (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
4881         struct thread_info * now.
4882         (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
4883         (unstop_all_lwps): Ditto.  Fetch lwpid from thread.
4884         (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
4885         directly.
4886         (regsets_store_inferior_registers): Ditto.
4887         (fetch_register, store_register): Ditto.
4888         (linux_read_memory, linux_write_memory): Ditto.
4889         (linux_request_interrupt): Ditto.
4890         (linux_read_auxv): Ditto.
4891         (linux_xfer_siginfo): Ditto.
4892         (linux_qxfer_spu): Ditto.
4893         (linux_qxfer_libraries_svr4): Ditto.
4894         * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
4895         moved to inferiors.h.
4896         (get_lwp): Delete.
4897         (get_thread_lwp): Update.
4898         (struct lwp_info): Delete member "entry".  Simplify comment for
4899         member "thread".
4900         (all_lwps): Delete.
4901         * linux-mips-low.c (mips_read_description): Fetch lwpid from
4902         current_inferior directly.
4903         (update_watch_registers_callback): Update, "entry" parameter is a
4904         struct thread_info * now.  Fetch pid from thread.
4905         (mips_linux_prepare_to_resume): Fetch ptid from thread.
4906         (mips_insert_point): Fetch lwpid from current_inferior.
4907         Pass &all_threads to find_inferior, not &all_lwps.
4908         (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
4909         (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
4910         directly.
4911         (mips_stopped_data_address): Ditto.
4912         * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
4913         directly.
4914         * linux-tile-low.c (tile_arch_setup): Ditto.
4915         * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
4916         (update_debug_registers_callback): Update, "entry" parameter is a
4917         struct thread_info * now.  Fetch pid from thread.
4918         (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
4919         Pass &all_threads to find_inferior, not &all_lwps.
4920         (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
4921         (i386_dr_low_set_control): Fetch pid from current_inferior directly.
4922         Pass &all_threads to find_inferior, not &all_lwps.
4923         (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
4924         (i386_dr_low_get_status): Ditto.
4925         (x86_linux_prepare_to_resume): Fetch ptid from thread.
4926         (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
4927         (x86_linux_read_description): Ditto.
4928         * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
4929
4930 2014-02-20  Doug Evans  <dje@google.com>
4931
4932         * inferiors.c (get_first_inferior): Fix buglet.
4933
4934 2014-02-19  Doug Evans  <dje@google.com>
4935
4936         * gdbthread.h (add_thread): Change result type to struct thread_info *.
4937         * inferiors.c (add_thread): Change result type to struct thread_info *.
4938         All callers updated.
4939         (add_lwp): Call add_thread here instead of in callers.
4940         All callers updated.
4941         * linux-low.h (get_lwp_thread): Rewrite.
4942         (struct lwp_info): New member "thread".
4943
4944 2014-02-19  Doug Evans  <dje@google.com>
4945
4946         * linux-low.c (add_lwp): Change result to struct lwp_info *.
4947         All callers updated.
4948
4949 2014-02-19  Doug Evans  <dje@google.com>
4950
4951         * inferiors.c (add_thread): Fix whitespace.
4952
4953 2014-02-19  Doug Evans  <dje@google.com>
4954
4955         * dll.c (clear_dlls): Replace accessing list implemention details
4956         with API function.
4957         * gdbthread.h (get_first_thread): Declare.
4958         * inferiors.c (for_each_inferior_with_data): New function.
4959         (get_first_thread): New function.
4960         (find_thread_ptid): Simplify.
4961         (get_first_inferior): New function.
4962         (clear_list): Delete.
4963         (one_inferior_p): New function.
4964         (clear_inferior_list): New function.
4965         (clear_inferiors): Update.
4966         * inferiors.h (for_each_inferior_with_data): Declare.
4967         (clear_inferior_list): Declare.
4968         (one_inferior_p): Declare.
4969         (get_first_inferior): Declare.
4970         * linux-low.c (linux_wait_for_event): Replace accessing list
4971         implemention details with API function.
4972         * server.c (target_running): Ditto.
4973         (accumulate_file_name_length): New function.
4974         (emit_dll_description): New function.
4975         (handle_qxfer_libraries): Replace accessing list implemention
4976         details with API function.
4977         (handle_qxfer_threads_worker): New function.
4978         (handle_qxfer_threads_proper): Replace accessing list implemention
4979         details with API function.
4980         (handle_query): Ditto.
4981         (visit_actioned_threads_callback_ftype): New typedef.
4982         (visit_actioned_threads_data): New struct.
4983         (visit_actioned_threads): Rewrite to be find_inferior callback.
4984         (resume): Call find_inferior.
4985         (handle_status): Replace accessing list implemention
4986         details with API function.
4987         (process_serial_event): Replace accessing list implemention details
4988         with API function.
4989         * target.c (set_desired_inferior): Replace accessing list implemention
4990         details with API function.
4991         * tracepoint.c (same_process_p): New function.
4992         (gdb_agent_about_to_close): Replace accessing list implemention
4993         details with API function.
4994         * win32-low.c (child_delete_thread): Replace accessing list
4995         implemention details with API function.
4996         (match_dll_by_basename): New function.
4997         (dll_is_loaded_by_basename): New function.
4998         (win32_ensure_ntdll_loaded): Replace accessing list implemention
4999         details call to dll_is_loaded_by_basename.
5000
5001 2014-02-19  Doug Evans  <dje@google.com>
5002
5003         * dll.h (struct dll_info): Add comment.
5004         * gdbthread.h (struct thread_info): Add comment.
5005         (current_ptid): Simplify.
5006         * inferiors.c (add_process): Update.
5007         (remove_process): Update.
5008         * inferiors.h (struct process_info): Rename member "head" to "entry".
5009         * linux-low.c (delete_lwp): Update.
5010         (add_lwp): Update.
5011         (last_thread_of_process_p): Update.
5012         (kill_one_lwp_callback, linux_kill): Update.
5013         (status_pending_p_callback): Update.
5014         (wait_for_sigstop): Update.  Simplify read of ptid.
5015         (start_step_over): Update.
5016         * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
5017         (get_lwp_thread): Update.
5018         (struct lwp_info): Rename member "head" to "entry".
5019         * regcache.h (inferior_list_entry): Delete.
5020         * server.c (kill_inferior_callback): Update.
5021         (detach_or_kill_inferior_callback): Update.
5022         (print_started_pid): Update.
5023         (print_attached_pid): Update.
5024         (process_serial_event): Simplify read of ptid.
5025         * thread-db.c (thread_db_create_event): Update.
5026         (thread_db_get_tls_address): Update.
5027         * win32-low.c (current_inferior_ptid): Simplify.
5028
5029 2014-02-19  Tom Tromey  <tromey@redhat.com>
5030
5031         * target.h (struct target_ops) <supports_btrace>: Add target_ops
5032         argument.
5033         (target_supports_btrace): Update.
5034
5035 2014-02-14  Yao Qi  <yao@codesourcery.com>
5036
5037         * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
5038         (rsp-low-ipa.o): New target.
5039
5040 2014-02-12  Tom Tromey  <tromey@redhat.com>
5041
5042         * ax.c (gdb_parse_agent_expr): Use hex2bin, not
5043         convert_ascii_to_int.
5044         * regcache.c (registers_to_string): Likewise.
5045         * remote-utils.c (decode_M_packet): Likewise.
5046         * server.c (process_serial_event): Likewise.
5047
5048 2014-02-12  Tom Tromey  <tromey@redhat.com>
5049
5050         * server.c (handle_query, handle_v_run): Use hex2bin, not
5051         unhexify.
5052         * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
5053
5054 2014-02-12  Tom Tromey  <tromey@redhat.com>
5055
5056         * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
5057         convert_int_to_ascii.
5058         * regcache.c (registers_to_string, collect_register_as_string):
5059         Likewise.
5060         * remote-utils.c (look_up_one_symbol, relocate_instruction):
5061         Likewise.
5062         * server.c (process_serial_event): Likewise.
5063         * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
5064         (cmd_qtbuffer, cstr_to_hexstr): Likewise.
5065
5066 2014-02-12  Tom Tromey  <tromey@redhat.com>
5067
5068         * remote-utils.c (look_up_one_symbol, monitor_output): Use
5069         bin2hex, not hexify.
5070         * tracepoint.c (cmd_qtstatus): Likewise.
5071
5072 2014-02-12  Tom Tromey  <tromey@redhat.com>
5073
5074         * remote-utils.c (monitor_output): Pass explicit length to
5075         hexify.
5076
5077 2014-02-12  Tom Tromey  <tromey@redhat.com>
5078
5079         * tracepoint.c: Include rsp-low.h.
5080         * server.c: Include rsp-low.h.
5081         * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5082         (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5083         declare.
5084         * remote-utils.c: Include rsp-low.h.
5085         (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5086         (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5087         (convert_int_to_ascii, convert_ascii_to_int): Move to
5088         common/rsp-low.c.
5089         * regcache.c: Include rsp-low.h.
5090         * ax.c: Include rsp-low.h.
5091         * Makefile.in (SFILES): Add common/rsp-low.c.
5092         (OBS): Add rsp-low.o.
5093         (rsp-low.o): New target.
5094
5095 2014-02-12  Tom Tromey  <tromey@redhat.com>
5096
5097         * utils.h (pulongest, plongest, phex_nz): Don't declare.
5098         Include print-utils.h.
5099         * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5100         (plongest, thirty_two, phex_nz): Remove.
5101         * Makefile.in (SFILES): Add common/print-utils.c.
5102         (OBS): Add print-utils.o.
5103         (print-utils-ipa.o): New target.
5104         (print-utils.o): New target.
5105         (IPA_OBJS): Add print-utils-ipa.o.
5106
5107 2014-02-06  Tom Tromey  <tromey@redhat.com>
5108
5109         * Makefile.in (SFILES): Fix indentation.
5110
5111 2014-02-05  Doug Evans  <dje@google.com>
5112
5113         * linux-low.c (linux_wait_for_event): Improve comment.
5114         (linux_wait_1): Keep current_inferior in sync with event_child.
5115
5116 2014-01-22  Doug Evans  <dje@google.com>
5117
5118         * gdbthread.h (gdb_id_to_thread): Delete, unused.
5119
5120 2014-01-22  Doug Evans  <dje@google.com>
5121
5122         * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
5123         * configure: Regenerate.
5124         * config.in: Regenerate.
5125         * Makefile.in (SFILES): Add debug.c.
5126         (OBS): Add debug.o.
5127         * debug.c: New file.
5128         * debug.h: New file.
5129         * linux-aarch64-low.c (*): Update all debugging printfs to use
5130         debug_printf instead of fprintf.
5131         * linux-arm-low.c (*): Ditto.
5132         * linux-cris-low.c (*): Ditto.
5133         * linux-crisv32-low.c (*): Ditto.
5134         * linux-m32r-low.c (*): Ditto.
5135         * linux-sparc-low.c (*): Ditto.
5136         * linux-x86.c (*): Ditto.
5137         * linux-low.c (*): Ditto.
5138         (linux_wait_1): Add calls to debug_enter, debug_exit.
5139         (linux_wait): Remove redundant debugging printf.
5140         (stop_all_lwps): Add calls to debug_enter, debug_exit.
5141         (linux_resume, unstop_all_lwps): Ditto.
5142         * mem-break.c (*): Update all debugging printfs to use
5143         debug_printf instead of fprintf.
5144         * remote-utils.c (*): Ditto.
5145         * thread-db.c (*): Ditto.
5146         * server.c #include <ctype.h>, "gdb_vecs.h".
5147         (debug_threads): Moved to debug.c.
5148         (*): Update all debugging printfs to use debug_printf instead of
5149         fprintf.
5150         (start_inferior): Replace call to fflush with call to debug_flush.
5151         (monitor_show_help): Mention set debug-format.
5152         (parse_debug_format_options): New function.
5153         (handle_monitor_command): Handle "monitor set debug-format".
5154         (gdbserver_usage): Mention --debug-format.
5155         (main): Parse --debug-format.
5156         * server.h (debug_threads): Declaration moved to debug.h.
5157         #include "debug.h".
5158         * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
5159         trace_debug_1 that uses debug_printf.
5160         (tracepoint_look_up_symbols): Update all debugging printfs to use
5161         debug_printf instead of fprintf.
5162
5163 2014-01-20  Baruch Siach  <baruch@tkos.co.il>
5164
5165         * linux-xtensa-low.c: Include asm/ptrace.h instead of
5166         sys/ptrace.h.
5167
5168 2014-01-17  Pedro Alves  <palves@redhat.com>
5169
5170         PR build/16445
5171         * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
5172         defined after including gdb_proc_service.h.
5173
5174 2014-01-16  Doug Evans  <dje@google.com>
5175
5176         * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
5177         (match_dll): Use it.
5178
5179 2014-01-16  Markus Metzger  <markus.t.metzger@intel.com>
5180
5181         * target.h (target_ops) <read_btrace>: Change parameters and
5182         return type to allow error reporting.
5183         * server.c (handle_qxfer_btrace): Support delta reads.  Pass
5184         trace reading errors on.
5185         * linux-low.c (linux_low_read_btrace): Pass trace reading
5186         errors on.
5187         (linux_low_disable_btrace): New.
5188
5189 2014-01-15  Doug Evans  <dje@google.com>
5190
5191         * inferiors.c (thread_id_to_gdb_id): Delete.
5192         * inferiors.h (thread_id_to_gdb_id): Delete.
5193
5194 2014-01-13  Eli Zaretskii  <eliz@gnu.org>
5195
5196         * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
5197         "-I$(srcdir)/../".  Fixes MinGW compilation errors with old GCC
5198         versions.
5199
5200 2014-01-08  Pedro Alves  <palves@redhat.com>
5201
5202         * server.c (handle_status): Don't discard previous queued stop
5203         replies or thread's pending status here.
5204         (main) <disconnection>: Do it here instead.
5205
5206 2014-01-08  Pedro Alves  <palves@redhat.com>
5207
5208         * gdbthread.h (struct thread_info) <status_pending_p>: New field.
5209         * server.c (visit_actioned_threads, handle_pending_status): New
5210         function.
5211         (handle_v_cont): Factor out parts to ...
5212         (resume): ... this new function.  If in all-stop, and a thread
5213         being resumed has a pending status, report it without actually
5214         resuming.
5215         (myresume): Adjust to use the new 'resume' function.
5216         (clear_pending_status_callback, set_pending_status_callback)
5217         (find_status_pending_thread_callback): New functions.
5218         (handle_status): Handle the case of multiple threads having
5219         interesting statuses to report.  Report threads' real last signal
5220         instead of always reporting GDB_SIGNAL_TRAP.  Look for a thread
5221         with an interesting thread to report the status for, instead of
5222         always reporting the status of the first thread.
5223
5224 2014-01-01  Joel Brobecker  <brobecker@adacore.com>
5225
5226         * gdbserver.c (gdbserver_version): Set copyright year to 2014.
5227         * gdbreplay.c (gdbreplay_version): Likewise.
5228
5229 2013-12-18  Yufeng Zhang  <yufeng.zhang@arm.com>
5230
5231         * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
5232         iov.iov_len with the real length in use.
5233
5234 2013-12-13  Joel Brobecker  <brobecker@adacore.com>
5235
5236         * Makefile.in (safe-ctype.o, lbasename.o): New rules.
5237         * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
5238         for all targets that use win32-low.c.
5239         * win32-low.c (win32_ensure_ntdll_loaded): New function.
5240         (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
5241
5242 2013-12-13  Pedro Alves  <palves@redhat.com>
5243
5244         * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
5245         if equal to TARGET_WAITKIND_LOADED.
5246         * win32-low.c (cached_status): New static global.
5247         (win32_wait): Add declaration.
5248         (do_initial_child_stuff): Flush all initial pending debug events
5249         up to the initial breakpoint.
5250         (win32_wait): If CACHED_STATUS was set, return that instead
5251         of doing a real wait.  Remove the code resuming the execution
5252         of the inferior after receiving a TARGET_WAITKIND_LOADED event
5253         during the initial phase.  Also remove the code changing
5254         OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
5255         TARGET_WAITKIND_STOPPED.
5256
5257 2013-12-11  Yao Qi  <yao@codesourcery.com>
5258
5259         * notif.c (handle_notif_ack): Return 0 if no notification
5260         matches.
5261
5262 2013-11-20  Doug Evans  <dje@google.com>
5263
5264         * linux-low.c (linux_set_resume_request): Fix comment.
5265
5266 2013-11-20  Doug Evans  <dje@google.com>
5267
5268         * linux-low.c (resume_status_pending_p): Tweak comment.
5269
5270 2013-11-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
5271
5272         * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
5273         amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
5274         * configure.srv (srv_i386_regobj): Add i386-mpx.o.
5275         (srv_i386_linux_regobj): Add i386-mpx-linux.o.
5276         (srv_amd64_regobj): Add amd64-mpx.o.
5277         (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
5278         (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
5279         (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
5280         * i387-fp.c (num_pl_bnd_register) Added constant.
5281         (num_pl_bnd_cfg_registers) Added constant.
5282         (struct i387_xsave) Added reserved area and MPX fields.
5283         (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
5284         * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
5285         function.
5286         (tdesc_i386_mpx_linux): Add MPX amd64 target.
5287         (init_registers_amd64_mpx_linux): Declare new function.
5288         (tdesc_amd64_mpx_linux): Add MPX amd64 target.
5289         (x86_64_regmap): Add MPX registers.
5290         (x86_linux_read_description): Add MPX case.
5291         (initialize_low_arch): Initialize MPX targets.
5292
5293 2013-11-18  Tom Tromey  <tromey@redhat.com>
5294
5295         * configure: Rebuild.
5296         * configure.ac: Don't check for stdlib.h.
5297         * gdbreplay.c: Unconditionally include stdlib.h.
5298
5299 2013-11-18  Tom Tromey  <tromey@redhat.com>
5300
5301         * config.in: Rebuild.
5302         * configure: Rebuild.
5303         * configure.ac: Don't use AC_HEADER_DIRENT.
5304
5305 2013-11-18  Tom Tromey  <tromey@redhat.com>
5306
5307         * server.h: Don't check HAVE_STRING_H.
5308         * gdbreplay.c: Don't check HAVE_STRING_H.
5309         * configure: Rebuild.
5310
5311 2013-11-18  Tom Tromey  <tromey@redhat.com>
5312
5313         * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
5314         LIBGNU.
5315
5316 2013-11-08  Tom Tromey  <tromey@redhat.com>
5317
5318         * configure, config.in: Rebuild.
5319         * configure.ac: Remove unused configury.
5320
5321 2013-11-08  Tom Tromey  <tromey@redhat.com>
5322
5323         * acinclude.m4: Include common.m4, codeset.m4.
5324         * configure, config.in: Rebuild.
5325         * configure.ac: Use GDB_AC_COMMON.
5326
5327 2013-11-06  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5328
5329         * linux-s390-low.c (HWCAP_S390_TE): New define.
5330         (s390_arch_setup): Consider the TE field in the HWCAP for
5331         determining 'have_regset_tdb'.
5332
5333 2013-10-16  Sergio Durigan Junior  <sergiodj@redhat.com>
5334
5335         PR gdb/16014
5336         * tracepoint.c (download_tracepoint_1): Remove unnecessary double
5337         call to sizeof.
5338
5339 2013-10-02  Pedro Alves  <palves@redhat.com>
5340
5341         * server.c (process_serial_event): Don't output "GDBserver
5342         exiting" if GDB is connected through stdio.
5343         * target.c (mywait): Likewise, be silent if GDB is connected
5344         through stdio.
5345
5346 2013-10-01  Joel Brobecker  <brobecker@adacore.com>
5347
5348         * lynx-low.c (lynx_add_threads_after_attach): New function.
5349         (lynx_attach): Remove call to add_thread.  Add call to
5350         lynx_add_threads_after_attach instead.
5351
5352 2013-09-28  Mike Frysinger  <vapier@gentoo.org>
5353
5354         * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
5355         * config.in, configure: Regenerated.
5356
5357 2013-09-18  Yao Qi  <yao@codesourcery.com>
5358
5359         PR server/15959
5360         * server.c (start_inferior): Clear 'resume_info'.
5361
5362 2013-09-16  Jiong Wang  <jiwang@tilera.com>
5363
5364         * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
5365         for each register.
5366
5367 2013-09-16  Jiong Wang  <jiwang@tilera.com>
5368
5369         * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
5370         linux-tile-low.o to srv_tgtobj.
5371
5372 2013-09-16  Will Newton  <will.newton@linaro.org>
5373
5374         * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
5375         out regs.
5376
5377 2013-09-06  Pedro Alves  <palves@redhat.com>
5378
5379         * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
5380         (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
5381         (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
5382         (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
5383         (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
5384         (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
5385
5386 2013-09-06  Pedro Alves  <palves@redhat.com>
5387
5388         * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
5389         explicit header dependencies and use $COMPILE/$POSTCOMPILE.
5390
5391 2013-09-06  Pedro Alves  <palves@redhat.com>
5392
5393         * linux-amd64-ipa.c: Include tracepoint.h.
5394         * linux-i386-ipa.c: Include tracepoint.h.
5395
5396 2013-09-06  Ricard Wanderlof  <ricardw@axis.com>
5397
5398         * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
5399         (ps_get_thread_area): New function.
5400
5401 2013-09-06  Ricard Wanderlof  <ricardw@axis.com>
5402
5403         * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
5404         (initialize_low_arch): Call init_registers_crisv32 rather than
5405         init_register_crisv32.
5406
5407 2013-09-05  Pedro Alves  <palves@redhat.com>
5408
5409         * server.h (handle_vFile, hostio_last_error_from_errno): Move
5410         to ...
5411         * hostio.h: ... this new file.
5412         * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
5413         win32-low.c: Include hostio.h.
5414
5415 2013-09-05  Pedro Alves  <palves@redhat.com>
5416
5417         * server.h (gdb_client_data, handler_func, callback_handler_func)
5418         (delete_file_handler, add_file_handler, append_callback_event)
5419         (delete_callback_event, start_event_loop, initialize_event_loop):
5420         Move to event-loop.h and include it.
5421         * event-loop.h: New file.
5422
5423 2013-09-05  Pedro Alves  <palves@redhat.com>
5424
5425         * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
5426         * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
5427         (loaded_dll, unloaded_dll): Move to ...
5428         * dll.h: ... this new file.
5429         * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
5430
5431 2013-09-05  Pedro Alves  <palves@redhat.com>
5432
5433         * server.h (current_process, get_thread_process, all_processes)
5434         (add_inferior_to_list, for_each_inferior, current_inferior)
5435         (remove_inferior, add_process, remove_process, find_process_pid)
5436         (have_started_inferiors_p, have_attached_inferiors_p)
5437         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
5438         (clear_inferiors, find_inferior, find_inferior_id)
5439         (inferior_target_data, set_inferior_target_data)
5440         (inferior_regcache_data, set_inferior_regcache_data): Move to
5441         inferiors.h, and include it.
5442         * inferiors.h: New file.
5443
5444 2013-09-05  Pedro Alves  <palves@redhat.com>
5445
5446         * server.h (struct emit_ops, current_insn_ptr, emit_error):
5447         Move ...
5448         * ax.h: ... here.
5449
5450 2013-09-05  Pedro Alves  <palves@redhat.com>
5451
5452         * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
5453         tracepoint.h.
5454         * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
5455         (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
5456         (handle_tracepoint_general_set, handle_tracepoint_query)
5457         (tracepoint_finished_step, tracepoint_was_hit)
5458         (release_while_stepping_state_list, current_traceframe)
5459         (in_readonly_region, traceframe_read_mem)
5460         (fetch_traceframe_registers, traceframe_read_sdata)
5461         (traceframe_read_info, struct fast_tpoint_collect_status)
5462         (fast_tracepoint_collecting, force_unlock_trace_buffer)
5463         (handle_tracepoit_bkpts, initialize_low_tracepoint)
5464         (supply_fast_tracepoint_registers)
5465         (supply_static_tracepoint_registers, set_trampoline_buffer_space)
5466         (ipa_tdesc, claim_trampoline_space)
5467         (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
5468         (agent_mem_read, agent_get_trace_state_variable_value)
5469         (agent_set_trace_state_variable_value, agent_tsv_read)
5470         (agent_mem_read_string, get_raw_reg_func_addr)
5471         (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
5472         * tracepoint.h: ... this new file.
5473
5474 2013-09-05  Pedro Alves  <palves@redhat.com>
5475
5476         * server.h (perror_with_name, error, fatal, warning, paddress)
5477         (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
5478         include it.
5479         * utils.h: New file.
5480
5481 2013-09-05  Pedro Alves  <palves@redhat.com>
5482
5483         * server.h (remote_debug, noack_mode, transport_is_reliable)
5484         (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
5485         (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
5486         (getpkt, remote_prepare, remote_open, remote_close, write_ok)
5487         (write_enn, initialize_async_io, enable_async_io)
5488         (disable_async_io, check_remote_input_interrupt_request)
5489         (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
5490         (dead_thread_notify, prepare_resume_reply)
5491         (decode_address_to_semicolon, decode_address, decode_m_packet)
5492         (decode_M_packet, decode_X_packet, decode_xfer_write)
5493         (decode_search_memory_packet, unhexify, hexify)
5494         (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
5495         (look_up_one_symbol, relocate_instruction)
5496         (monitor_output): Move to remote-utils.h, and include it.
5497         * remote-utils.h: New file.
5498
5499 2013-09-05  Pedro Alves  <palves@redhat.com>
5500
5501         * server.h (_): Delete.
5502
5503 2013-09-02  Pedro Alves  <palves@redhat.com>
5504
5505         * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
5506         (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
5507         allocated.
5508         (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
5509
5510 2013-09-02  Pierre Muller  <muller@sourceware.org>
5511
5512         * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
5513         or WriteProcessMemory complete successfully and handle
5514         ERROR_PARTIAL_COPY error.
5515
5516 2013-09-02  Pedro Alves  <palves@redhat.com>
5517
5518         * server.c (gdb_read_memory): Return -1 on traceframe memory read
5519         error instead of EIO.
5520
5521 2013-08-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
5522
5523         PR server/15604
5524         * linux-low.c: Include filestuff.h.
5525         (linux_create_inferior) <pid == 0>: Call close_most_fds.
5526         * lynx-low.c: Include filestuff.h.
5527         (lynx_create_inferior) <pid == 0>: Call close_most_fds.
5528         * server.c: Include filestuff.h.
5529         (main): Call notice_open_fds.
5530         * spu-low.c: Include filestuff.h.
5531         (spu_create_inferior) <pid == 0>: Call close_most_fds.
5532
5533 2013-08-22  Luis Machado  <lgustavo@codesourcery.com>
5534
5535         * Makefile.in: Explain why ../target and ../nat are not
5536         listed as include file search paths.
5537         (linux-waitpid.o): New object file rule.
5538         * configure.srv (srv_native_linux_obj): New variable.
5539         Replace all occurrences of linux native object files with
5540         $srv_native_linux_obj.
5541         * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
5542         (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
5543         (linux_enable_event_reporting): Remove declaration.
5544         (my_waitpid): Moved to common/linux-waitpid.c.
5545         (linux_wait_for_event): Pass ptid when calling
5546         linux_enable_event_reporting.
5547         (linux_supports_tracefork_flag): Remove.
5548         (linux_enable_event_reporting): Likewise.
5549         (linux_tracefork_grandchild): Remove.
5550         (STACK_SIZE): Moved to common/linux-ptrace.c.
5551         (linux_tracefork_child): Remove.
5552         (linux_test_for_tracefork): Remove.
5553         (linux_look_up_symbols): Call linux_supports_traceclone.
5554         (initialize_low): Remove call to linux_test_for_tracefork.
5555         * linux-low.h (PTRACE_TYPE_ARG3): Move to
5556         common/linux-ptrace.h.
5557         (PTRACE_TYPE_ARG4): Likewise.
5558         Include linux-ptrace.h.
5559
5560 2013-08-21  Pedro Alves  <palves@redhat.com>
5561
5562         * config.in: Renegerate.
5563
5564 2013-08-19  Luis Machado  <lgustavo@codesourcery.com>
5565
5566         * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
5567         (SFILES): Remove $(srcdir)/common/target-common.c and
5568         add $(srcdir)/target/waitstatus.c.
5569         (OBS): Remove target-common.o and add waitstatus.o.
5570         (server_h): Remove $(srcdir)/../common/target-common.h and
5571         add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
5572         and $(srcdir)/../target/waitstatus.h.
5573         (target-common.o): Remove.
5574         (waitstatus.o): New target object file.
5575         * target.h: Do not include target-common.h and
5576         include target/resume.h, target/wait.h and
5577         target/waitstatus.h.
5578
5579 2013-08-13  Luis Machado  <lgustavo@codesourcery.com>
5580
5581         * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5582         to PTRACE_TYPE_ARG3.
5583         * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5584         to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
5585         PTRACE_TYPE_ARG4.
5586         * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
5587         (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
5588
5589 2013-07-27  Jie Zhang  <jie@codesourcery.com>
5590             Daniel Jacobowitz  <dan@codesourcery.com>
5591             Yao Qi  <yao@codesourcery.com>
5592
5593         * Makefile.in (SFILES): Add common/mips-linux-watch.c.
5594         (mips-linux-watch.o): New rule.
5595         (mips_linux_watch_h): New variable.
5596         * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
5597         srv_tgtobj.
5598         * linux-mips-low.c: Include mips-linux-watch.h.
5599         (struct arch_process_info, struct arch_lwp_info): New.
5600         (update_watch_registers_callback): New function.
5601         (mips_linux_new_process, mips_linux_new_thread) New functions.
5602         (mips_linux_prepare_to_resume, mips_insert_point): New
5603         functions.
5604         (mips_remove_point, mips_stopped_by_watchpoint): New
5605         functions.
5606         (rsp_bp_type_to_target_hw_bp_type): New function.
5607         (mips_stopped_data_address): New function.
5608         (the_low_target): Add watchpoint support functions.
5609
5610 2013-07-27  Yao Qi  <yao@codesourcery.com>
5611
5612         * i386-low.c: Include break-common.h.
5613         (enum target_hw_bp_type): Remove.
5614
5615 2013-07-24  Luis Machado  <lgustavo@codesourcery.com>
5616
5617         * Makefile.in (SFILES): /common/target-common.c.
5618         (OBS): Add target-common.o.
5619         (server_h): Add $(srcdir)/../common/target-common.h.
5620         (target-common.o): New target.
5621         * server.c (queue_stop_reply_callback): Free
5622         status string after use.
5623         * target.c (target_waitstatus_to_string): Remove.
5624         * target.h: Include target-common.h.
5625         (resume_kind): Likewise.
5626         (target_waitkind): Likewise.
5627         (target_waitstatus): Likewise.
5628         (TARGET_WNOHANG): Likewise.
5629
5630 2013-07-04  Yao Qi  <yao@codesourcery.com>
5631
5632         * Makefile.in (host_alias): Use @host_noncanonical@.
5633         (target_alias): Use @target_noncanonical@.
5634         * configure.ac: Use ACX_NONCANONICAL_TARGET and
5635         ACX_NONCANONICAL_HOST.
5636         * configure: Regenerated.
5637
5638         Revert:
5639         2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>
5640
5641         * configure.ac (version_host, version_target): Set and AC_SUBST them.
5642         * configure: Rebuild.
5643         * Makefile.in (version_host, version_target): Get from configure.
5644         (version.c): Use $(version_host) and $(version_target).
5645
5646 2013-07-03  Pedro Alves  <palves@redhat.com>
5647
5648         * Makefile.in (config.status): Depend on development.sh.
5649         * acinclude.m4: Include libmcheck.m4.
5650         * configure: Regenerate.
5651
5652 2013-07-02  Mircea Gherzan  <mircea.gherzan@intel.com>
5653
5654         * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
5655         attribute inside the parentheses.
5656         (winapi_DebugSetProcessKillOnExit): Ditto.
5657         (winapi_DebugBreakProcess): Ditto.
5658         (winapi_GenerateConsoleCtrlEvent): Ditto.
5659
5660 2013-07-02  Mircea Gherzan  <mircea.gherzan@intel.com>
5661
5662         * notif.h (notif_event): Add a dummy member to avoid compiler
5663         errors.
5664
5665 2013-07-01  Pedro Alves  <palves@redhat.com>
5666
5667         * hostio.c (HOSTIO_PATH_MAX): Define.
5668         (require_filename, handle_open, handle_unlink, handle_readlink):
5669         Use it.
5670
5671 2013-07-01  Pedro Alves  <palves@redhat.com>
5672
5673         * server.h: Include "pathmax.h".
5674         * linux-low.c: Don't include sys/param.h.
5675         (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
5676         MAXPATHLEN.
5677         * win32-low.c: Don't include sys/param.h.
5678         (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
5679
5680 2013-07-01  Pedro Alves  <palves@redhat.com>
5681
5682         * event-loop.c: Don't check HAVE_UNISTD_H before including
5683         <unistd.h>.
5684         * gdbreplay.c: Likewise.
5685         * remote-utils.c: Likewise.
5686         * server.c: Likewise.
5687         * configure.ac: Don't check for unistd.h.
5688         * configure: Regenerate.
5689
5690 2013-06-28  Tom Tromey  <tromey@redhat.com>
5691
5692         * Makefile.in (version.c): Use version.in, not
5693         common/version.in.
5694
5695 2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>
5696
5697         * configure.ac (version_host, version_target): Set and AC_SUBST them.
5698         * configure: Rebuild.
5699         * Makefile.in (version_host, version_target): Get from configure.
5700         (version.c): Use $(version_host) and $(version_target).
5701
5702 2013-06-10  Dmitry Kozlov <ddk@codesourcery.com>
5703
5704         Fix trace-status to output user name without trailing colon.
5705         * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
5706
5707 2013-06-10  Dmitry Kozlov <ddk@codesourcery.com>
5708
5709         Fix trace-status to output proper start-time and stop-time.
5710         * tracepoint.c (cmd_qtstatus): Modify trace-status output to
5711         output start time and stop time in hex as gdb expects.
5712
5713 2013-06-26  Pedro Alves  <pedro@codesourcery.com>
5714
5715         * tracepoint.c (build_traceframe_info_xml): Output trace state
5716         variables present in the trace buffer.
5717
5718 2013-06-24  Tom Tromey  <tromey@redhat.com>
5719
5720         * Makefile.in (version.c): Use bfd/version.h, common/version.in,
5721         create-version.sh.
5722         (version.o): Remove.
5723         * gdbreplay.c: Include version.h.
5724         (version, host_name): Don't declare.
5725         * server.h: Include version.h.
5726         (version, host_name): Don't declare.
5727
5728 2013-06-12  Pedro Alves  <palves@redhat.com>
5729
5730         * linux-x86-low.c (linux_is_elf64): Delete global.
5731         (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
5732         with local linux_pid_exe_is_elf_64_file use.
5733
5734 2013-06-11  Pedro Alves  <palves@redhat.com>
5735
5736         * linux-low.c (regset_disabled, disable_regset): New functions.
5737         (regsets_fetch_inferior_registers)
5738         (regsets_store_inferior_registers): Use them.
5739         (initialize_regsets_info); Don't allocate the disabled_regsets
5740         array here.
5741         * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
5742         comment.
5743
5744 2013-06-11  Pedro Alves  <palves@redhat.com>
5745
5746         * linux-low.c (initialize_regsets_info): Use xcalloc instead of
5747         xmalloc.
5748
5749 2013-06-11  Pedro Alves  <palves@redhat.com>
5750
5751         * linux-x86-low.c (initialize_low_arch): Call
5752         init_registers_x32_avx_linux.
5753
5754 2013-06-09  Jan Kratochvil  <jan.kratochvil@redhat.com>
5755
5756         Fix compatibility with Android Bionic.
5757         * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
5758         it is not empty.
5759
5760 2013-06-07  Pedro Alves  <palves@redhat.com>
5761
5762         PR server/14823
5763         * Makefile.in (OBS): Add tdesc.o.
5764         (IPA_OBJS): Add tdesc-ipa.o.
5765         (tdesc-ipa.o): New rule.
5766         * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
5767         interface.
5768         * linux-low.c (new_inferior): Delete.
5769         (disabled_regsets, num_regsets): Delete.
5770         (linux_add_process): Adjust to set the new per-process
5771         new_inferior flag.
5772         (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
5773         (linux_wait_for_lwp): Adjust.  Only call arch_setup if the event
5774         was a stop.  When calling arch_setup, switch the current inferior
5775         to the thread that got an event.
5776         (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
5777         (regsets_fetch_inferior_registers)
5778         (regsets_store_inferior_registers): New regsets_info parameter.
5779         Adjust to use it.
5780         (linux_register_in_regsets): New regs_info parameter.  Adjust to
5781         use it.
5782         (register_addr, fetch_register, store_register): New usrregs_info
5783         parameter.  Adjust to use it.
5784         (usr_fetch_inferior_registers, usr_store_inferior_registers): New
5785         parameter regs_info.  Adjust to use it.
5786         (linux_fetch_registers): Get the current inferior's regs_info, and
5787         adjust to use it.
5788         (linux_store_registers): Ditto.
5789         [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
5790         (initialize_low): Don't initialize the target_regsets here.  Call
5791         initialize_low_arch.
5792         * linux-low.h (target_regsets): Delete declaration.
5793         (struct regsets_info): New.
5794         (struct usrregs_info): New.
5795         (struct regs_info): New.
5796         (struct process_info_private) <new_inferior>: New field.
5797         (struct linux_target_ops): Delete the num_regs, regmap, and
5798         regset_bitmap fields.  New field regs_info.
5799         [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
5800         * i387-fp.c (num_xmm_registers): Delete.
5801         (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
5802         calls to new interface.
5803         (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
5804         (i387_xsave_to_cache): Adjust find_regno calls to new interface.
5805         Infer the number of xmm registers from the regcache's target
5806         description.
5807         * i387-fp.h (num_xmm_registers): Delete.
5808         * inferiors.c (add_thread): Don't install the thread's regcache
5809         here.
5810         * proc-service.c (gregset_info): Fetch the current inferior's
5811         regs_info.  Adjust to use it.
5812         * regcache.c: Include tdesc.h.
5813         (register_bytes, reg_defs, num_registers)
5814         (gdbserver_expedite_regs): Delete.
5815         (get_thread_regcache): If the thread doesn't have a regcache yet,
5816         create one, instead of aborting gdbserver.
5817         (regcache_invalidate_one): Rename to ...
5818         (regcache_invalidate_thread): ... this.
5819         (regcache_invalidate_one): New.
5820         (regcache_invalidate): Only invalidate registers of the current
5821         process.
5822         (init_register_cache): Add target_desc parameter, and use it.
5823         (new_register_cache): Ditto.  Assert the target description has a
5824         non zero registers_size.
5825         (regcache_cpy): Add assertions.  Adjust.
5826         (realloc_register_cache, set_register_cache): Delete.
5827         (registers_to_string, registers_from_string): Adjust.
5828         (find_register_by_name, find_regno, find_register_by_number)
5829         (register_cache_size): Add target_desc parameter, and use it.
5830         (free_register_cache_thread, free_register_cache_thread_one)
5831         (regcache_release, register_cache_size): New.
5832         (register_size): Add target_desc parameter, and use it.
5833         (register_data, supply_register, supply_register_zeroed)
5834         (supply_regblock, supply_register_by_name, collect_register)
5835         (collect_register_as_string, collect_register_by_name): Adjust.
5836         * regcache.h (struct target_desc): Forward declare.
5837         (struct regcache) <tdesc>: New field.
5838         (init_register_cache, new_register_cache): Add target_desc
5839         parameter.
5840         (regcache_invalidate_thread): Declare.
5841         (regcache_invalidate_one): Delete declaration.
5842         (regcache_release): Declare.
5843         (find_register_by_number, register_cache_size, register_size)
5844         (find_regno): Add target_desc parameter.
5845         (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
5846         declarations.
5847         * remote-utils.c: Include tdesc.h.
5848         (outreg, prepare_resume_reply): Adjust.
5849         * server.c: Include tdesc.h.
5850         (gdbserver_xmltarget): Delete declaration.
5851         (get_features_xml, process_serial_event): Adjust.
5852         * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
5853         declare.
5854         (struct process_info) <tdesc>: New field.
5855         (ipa_tdesc): Declare.
5856         * tdesc.c: New file.
5857         * tdesc.h: New file.
5858         * tracepoint.c: Include tdesc.h.
5859         [IN_PROCESS_AGENT] (ipa_tdesc): Define.
5860         (get_context_regcache): Adjust to pass ipa_tdesc down.
5861         (do_action_at_tracepoint): Adjust to get the register cache size
5862         from the context regcache's description.
5863         (traceframe_walk_blocks): Adjust to get the register cache size
5864         from the current trace frame's description.
5865         (traceframe_get_pc): Adjust to get current trace frame's
5866         description and pass it down.
5867         (gdb_collect): Adjust to get the register cache size from the
5868         IPA's description.
5869         * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
5870         (gdbserver_xmltarget): Delete.
5871         (initialize_low_tracepoint): Set the ipa's target description.
5872         * linux-i386-ipa.c (tdesc_i386_linux): Declare.
5873         (initialize_low_tracepoint): Set the ipa's target description.
5874         * linux-x86-low.c: Include tdesc.h.
5875         [__x86_64__] (is_64bit_tdesc): New.
5876         (ps_get_thread_area, x86_get_thread_area): Use it.
5877         (i386_cannot_store_register): Rename to ...
5878         (x86_cannot_store_register): ... this.  Use is_64bit_tdesc.
5879         (i386_cannot_fetch_register): Rename to ...
5880         (x86_cannot_fetch_register): ... this.  Use is_64bit_tdesc.
5881         (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
5882         to new interface.
5883         (target_regsets): Rename to ...
5884         (x86_regsets): ... this.
5885         (x86_get_pc, x86_set_pc): Adjust register_size calls to new
5886         interface.
5887         (x86_siginfo_fixup): Use is_64bit_tdesc.
5888         [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
5889         (tdesc_x32_avx_linux, tdesc_x32_linux)
5890         (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
5891         Declare.
5892         (x86_linux_update_xmltarget): Delete.
5893         (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
5894         (have_ptrace_getfpxregs, have_ptrace_getregset): New.
5895         (AMD64_LINUX_USER64_CS): New.
5896         (x86_linux_read_description): New, based on
5897         x86_linux_update_xmltarget.
5898         (same_process_callback): New.
5899         (x86_arch_setup_process_callback): New.
5900         (x86_linux_update_xmltarget): New.
5901         (x86_regsets_info): New.
5902         (amd64_linux_regs_info): New.
5903         (i386_linux_usrregs_info): New.
5904         (i386_linux_regs_info): New.
5905         (x86_linux_regs_info): New.
5906         (x86_arch_setup): Reimplement.
5907         (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
5908         (x86_emit_ops): Ditto.
5909         (the_low_target): Adjust.  Install x86_linux_regs_info,
5910         x86_cannot_fetch_register, and x86_cannot_store_register.
5911         (initialize_low_arch): New.
5912         * linux-ia64-low.c (tdesc_ia64): Declare.
5913         (ia64_fetch_register): Adjust.
5914         (ia64_usrregs_info, regs_info): New globals.
5915         (ia64_regs_info): New function.
5916         (the_low_target): Adjust.
5917         (initialize_low_arch): New function.
5918         * linux-sparc-low.c (tdesc_sparc64): Declare.
5919         (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
5920         Adjust.
5921         (sparc_arch_setup): New function.
5922         (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
5923         (the_low_target): Adjust.
5924         (initialize_low_arch): New function.
5925         * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
5926         (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
5927         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
5928         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
5929         (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
5930         (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
5931         (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
5932         (tdesc_powerpc_isa205_vsx64l): Declare.
5933         (ppc_cannot_store_register, ppc_collect_ptrace_register)
5934         (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
5935         (ppc_set_pc, ppc_get_hwcap): Adjust.
5936         (ppc_usrregs_info): Forward declare.
5937         (!__powerpc64__) ppc_regmap_adjusted: New global.
5938         (ppc_arch_setup): Adjust to the current process'es target
5939         description.
5940         (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
5941         (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
5942         (ppc_store_evrregset): Adjust.
5943         (target_regsets): Rename to ...
5944         (ppc_regsets): ... this, and make static.
5945         (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
5946         (ppc_regs_info): New function.
5947         (the_low_target): Adjust.
5948         (initialize_low_arch): New function.
5949         * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
5950         (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
5951         (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
5952         (tdesc_s390x_linux64v2): Declare.
5953         (s390_collect_ptrace_register, s390_supply_ptrace_register)
5954         (s390_fill_gregset, s390_store_last_break): Adjust.
5955         (target_regsets): Rename to ...
5956         (s390_regsets): ... this, and make static.
5957         (s390_get_pc, s390_set_pc): Adjust.
5958         (s390_get_hwcap): New target_desc parameter, and use it.
5959         [__s390x__] (have_hwcap_s390_high_gprs): New global.
5960         (s390_arch_setup): Adjust to set the current process'es target
5961         description.  Don't adjust the regmap.
5962         (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
5963         [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
5964         (regs_info_3264): New globals.
5965         (s390_regs_info): New function.
5966         (the_low_target): Adjust.
5967         (initialize_low_arch): New function.
5968         * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
5969         (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
5970         [__mips64] (init_registers_mips_linux)
5971         (init_registers_mips_dsp_linux): Delete defines.
5972         [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
5973         (have_dsp): New global.
5974         (mips_read_description): New, based on mips_arch_setup.
5975         (mips_arch_setup): Reimplement.
5976         (get_usrregs_info): New function.
5977         (mips_cannot_fetch_register, mips_cannot_store_register)
5978         (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
5979         (mips_fill_fpregset, mips_store_fpregset): Adjust.
5980         (target_regsets): Rename to ...
5981         (mips_regsets): ... this, and make static.
5982         (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
5983         (dsp_regs_info, regs_info): New globals.
5984         (mips_regs_info): New function.
5985         (the_low_target): Adjust.
5986         (initialize_low_arch): New function.
5987         * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
5988         (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
5989         Declare.
5990         (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
5991         (arm_read_description): New, with bits factored from
5992         arm_arch_setup.
5993         (arm_arch_setup): Reimplement.
5994         (target_regsets): Rename to ...
5995         (arm_regsets): ... this, and make static.
5996         (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
5997         (arm_regs_info): New function.
5998         (the_low_target): Adjust.
5999         (initialize_low_arch): New function.
6000         * linux-m68k-low.c (tdesc_m68k): Declare.
6001         (target_regsets): Rename to ...
6002         (m68k_regsets): ... this, and make static.
6003         (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
6004         (m68k_regs_info): New function.
6005         (m68k_arch_setup): New function.
6006         (the_low_target): Adjust.
6007         (initialize_low_arch): New function.
6008         * linux-sh-low.c (tdesc_sharch): Declare.
6009         (target_regsets): Rename to ...
6010         (sh_regsets): ... this, and make static.
6011         (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
6012         (sh_regs_info, sh_arch_setup): New functions.
6013         (the_low_target): Adjust.
6014         (initialize_low_arch): New function.
6015         * linux-bfin-low.c (tdesc_bfin): Declare.
6016         (bfin_arch_setup): New function.
6017         (bfin_usrregs_info, regs_info): New globals.
6018         (bfin_regs_info): New function.
6019         (the_low_target): Adjust.
6020         (initialize_low_arch): New function.
6021         * linux-cris-low.c (tdesc_cris): Declare.
6022         (cris_arch_setup): New function.
6023         (cris_usrregs_info, regs_info): New globals.
6024         (cris_regs_info): New function.
6025         (the_low_target): Adjust.
6026         (initialize_low_arch): New function.
6027         * linux-cris-low.c (tdesc_crisv32): Declare.
6028         (cris_arch_setup): New function.
6029         (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
6030         (cris_regs_info): New function.
6031         (the_low_target): Adjust.
6032         (initialize_low_arch): New function.
6033         * linux-m32r-low.c (tdesc_m32r): Declare.
6034         (m32r_arch_setup): New function.
6035         (m32r_usrregs_info, regs_info): New globals.
6036         (m32r_regs_info): Adjust.
6037         (initialize_low_arch): New function.
6038         * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
6039         (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
6040         (tic6x_usrregs_info): Forward declare.
6041         (tic6x_read_description): New function, based on ...
6042         (tic6x_arch_setup): ... this.  Reimplement.
6043         (target_regsets): Rename to ...
6044         (tic6x_regsets): ... this, and make static.
6045         (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
6046         (tic6x_regs_info): New function.
6047         (the_low_target): Adjust.
6048         (initialize_low_arch): New function.
6049         * linux-xtensa-low.c (tdesc_xtensa): Declare.
6050         (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
6051         (target_regsets): Rename to ...
6052         (xtensa_regsets): ... this, and make static.
6053         (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
6054         globals.
6055         (xtensa_arch_setup, xtensa_regs_info): New functions.
6056         (the_low_target): Adjust.
6057         (initialize_low_arch): New function.
6058         * linux-nios2-low.c (tdesc_nios2_linux): Declare.
6059         (nios2_arch_setup): Set the current process'es tdesc.
6060         (target_regsets): Rename to ...
6061         (nios2_regsets): ... this.
6062         (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
6063         (nios2_regs_info): New function.
6064         (the_low_target): Adjust.
6065         (initialize_low_arch): New function.
6066         * linux-aarch64-low.c (tdesc_aarch64): Declare.
6067         (aarch64_arch_setup): Set the current process'es tdesc.
6068         (target_regsets): Rename to ...
6069         (aarch64_regsets): ... this.
6070         (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
6071         (aarch64_regs_info): New function.
6072         (the_low_target): Adjust.
6073         (initialize_low_arch): New function.
6074         * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
6075         globals.
6076         (target_regsets): Rename to ...
6077         (tile_regsets): ... this.
6078         (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6079         (tile_regs_info): New function.
6080         (tile_arch_setup): Set the current process'es tdesc.
6081         (the_low_target): Adjust.
6082         (initialize_low_arch): New function.
6083         * spu-low.c (tdesc_spu): Declare.
6084         (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6085         * win32-arm-low.c (tdesc_arm): Declare.
6086         (arm_arch_setup): New function.
6087         (the_low_target): Install arm_arch_setup instead of
6088         init_registers_arm.
6089         * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6090         (init_windows_x86): Rename to ...
6091         (i386_arch_setup): ... this.  Set `win32_tdesc'.
6092         (the_low_target): Adjust.
6093         * win32-low.c (win32_tdesc): New global.
6094         (child_add_thread): Don't create the thread cache here.
6095         (do_initial_child_stuff): Set the new process'es tdesc.
6096         * win32-low.h (struct target_desc): Forward declare.
6097         (win32_tdesc): Declare.
6098         * lynx-i386-low.c (tdesc_i386): Declare global.
6099         (lynx_i386_arch_setup): Set `lynx_tdesc'.
6100         * lynx-low.c (lynx_tdesc): New global.
6101         (lynx_add_process): Set the new process'es tdesc.
6102         * lynx-low.h (struct target_desc): Forward declare.
6103         (lynx_tdesc): Declare global.
6104         * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
6105         (lynx_ppc_arch_setup): Set `lynx_tdesc'.
6106         * nto-low.c (nto_tdesc): New global.
6107         (do_attach): Set the new process'es tdesc.
6108         * nto-low.h (struct target_desc): Forward declare.
6109         (nto_tdesc): Declare.
6110         * nto-x86-low.c (tdesc_i386): Declare.
6111         (nto_x86_arch_setup): Set `nto_tdesc'.
6112
6113 2013-06-04  Gary Benson  <gbenson@redhat.com>
6114
6115         * server.c (handle_query): Add "augmented-libraries-svr4-read+"
6116         to qSupported response when appropriate.
6117         (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
6118         with nonzero-length annex.
6119         * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
6120         arguments supplied in annex.
6121
6122 2013-05-31  Doug Evans  <dje@google.com>
6123
6124         PR server/15594
6125         * linux-x86-low.c (ps_get_thread_area): Properly extend address to
6126         64 bits in 64-cross-32 environment.
6127
6128 2013-05-28  Pedro Alves  <palves@redhat.com>
6129
6130         * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
6131         (aarch64-without-fpu.c): Delete rule.
6132         * configure.srv (aarch64*-*-linux*): Remove references to
6133         aarch64-without-fpu.o and aarch64-without-fpu.xml.
6134         * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
6135         declaration.
6136
6137 2013-05-24  Pedro Alves  <palves@redhat.com>
6138
6139         * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
6140         instead of strchr/decode_address.  Error if the range isn't split
6141         with a ','.  Don't assume there's be a ':' in the action.
6142
6143 2013-05-23  Yao Qi  <yao@codesourcery.com>
6144             Pedro Alves  <palves@redhat.com>
6145
6146         * linux-low.c (lwp_in_step_range): New function.
6147         (linux_wait_1): If the thread was range stepping and stopped
6148         outside the stepping range, report the stop to GDB.  Otherwise,
6149         continue stepping.  Add range stepping debug output.
6150         (linux_set_resume_request): Copy the step range from the resume
6151         request to the lwp.
6152         (linux_supports_range_stepping): New.
6153         (linux_target_ops) <supports_range_stepping>: Set to
6154         linux_supports_range_stepping.
6155         * linux-low.h (struct linux_target_ops)
6156         <supports_range_stepping>: New field.
6157         (struct lwp_info) <step_range_start, step_range_end>: New fields.
6158         * linux-x86-low.c (x86_supports_range_stepping): New.
6159         (the_low_target) <supports_range_stepping>: Set to
6160         x86_supports_range_stepping.
6161         * server.c (handle_v_cont): Handle 'r' action.
6162         (handle_v_requests): Append ";r" if the target supports range
6163         stepping.
6164         * target.h (struct thread_resume) <step_range_start,
6165         step_range_end>: New fields.
6166         (struct target_ops) <supports_range_stepping>:
6167         New field.
6168         (target_supports_range_stepping): New macro.
6169
6170 2013-05-17  Joel Brobecker  <brobecker@adacore.com>
6171
6172         * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
6173         confusion in comment.
6174
6175 2013-05-17  Joel Brobecker  <brobecker@adacore.com>
6176
6177         * lynx-low.c (struct process_info_private): New type.
6178         (lynx_add_process): New function.
6179         (lynx_create_inferior, lynx_attach): Replace calls to
6180         add_process by calls to lynx_add_process.
6181         (lynx_resume): If PTID is null, then try using
6182         current_process()->private->last_wait_event_ptid.
6183         Add comments.
6184         (lynx_clear_inferiors): Delete.  The contents of that function
6185         has been inlined in lynx_mourn;
6186         (lynx_wait_1): Save the ptid in the process's private data.
6187         (lynx_mourn): Free the process' private data.  Replace call
6188         to lynx_clear_inferiors by call to clear_inferiors.
6189
6190 2013-05-17  Yao Qi  <yao@codesourcery.com>
6191
6192         * i386-low.c (i386_length_and_rw_bits): Move the comment to
6193         the right place.
6194
6195 2013-05-16  Luis Machado  <lgustavo@codesourcery.com>
6196
6197         * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
6198         PT_DATA_ADDR and PT_TEXT_END_ADDR.  Update comments.
6199         (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
6200         PT_TEXT_END_ADDR guards.  Update comments.
6201         (linux_target_op) <read_offsets>: Conditionally define to
6202         linux_read_offsets if the target is UCLIBC and if it defines
6203         PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
6204
6205 2013-05-06  Sandra Loosemore  <sandra@codesourcery.com>
6206             Andrew Jenner  <andrew@codesourcery.com>
6207
6208         * Makefile.in (SFILES): Add linux-nios2-low.c.
6209         (clean): Add action to delete nios2-linux.c.
6210         (nios2-linux.c): New rule.
6211         * configure.srv: Add nios2*-*-linux*.
6212         * linux-nios2-low.c: New.
6213
6214 2013-05-03  Hafiz Abid Qadeer  <abidh@codesourcery.com>
6215
6216         * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
6217
6218 2013-04-25  Hui Zhu  <hui@codesourcery.com>
6219
6220         PR gdb/15186
6221         * ax.c (ax_printf): Add fflush.
6222
6223 2013-04-22  Tom Tromey  <tromey@redhat.com>
6224
6225         * Makefile.in (SFILES): Add filestuff.c.
6226         (OBS): Add filestuff.o.
6227         (filestuff.o): New target.
6228         * config.in, configure: Rebuild.
6229         * configure.ac: Check for fdwalk, pipe2.
6230
6231 2013-04-17  Pedro Alves  <palves@redhat.com>
6232
6233         * configure.ac (USE_THREAD_DB): Delete variable.
6234         (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
6235         Don't AC_SUBST USE_THREAD_DB.
6236         * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
6237         * config.in, configure: Regenerate.
6238
6239 2013-04-16  Pedro Alves  <palves@redhat.com>
6240
6241         * linux-low.h (struct lwp_info) <thread_known>: Move under
6242         the USE_THREAD_DB #ifdef.
6243
6244 2013-04-16  Pedro Alves  <palves@redhat.com>
6245
6246         * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
6247         (linux-low.o): Delete rule.
6248         * linux-low.h: Always include "gdb_thread_db.h" instead of
6249         conditionally including thread_db.h.
6250         (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
6251         HAVE_THREAD_DB_H.
6252
6253 2013-04-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
6254
6255         * Makefile.in (install-only): Fix make install regression.
6256
6257 2013-04-05  Jan Kratochvil  <jan.kratochvil@redhat.com>
6258
6259         Convert man pages to texinfo, new gdbinit.5 texinfo page.
6260         * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
6261         installation.
6262         * gdbserver.1: Remove.
6263
6264 2013-03-22  Pedro Alves  <palves@redhat.com>
6265
6266         * linux-low.c (handle_extended_wait): Don't call
6267         linux_enable_event_reporting.
6268
6269 2013-03-15  Tony Theodore  <tonyt@logyst.com>
6270
6271         PR build/9098:
6272         * Makefile.in (SHELL): Use @SHELL@.
6273
6274 2013-03-14  Sergio Durigan Junior  <sergiodj@redhat.com>
6275
6276         * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
6277         compiler warning.
6278
6279 2013-03-13  Joel Brobecker  <brobecker@adacore.com>
6280
6281         * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
6282         Remove extraneous NULL element.
6283
6284 2013-03-13  Yao Qi  <yao@codesourcery.com>
6285
6286         * tracepoint.c (traceframe_read_tsv): Look for the last matched
6287         'V' block in trace frame.
6288
6289 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
6290
6291         * target.h (struct target_ops): Add btrace ops.
6292         (target_supports_btrace): New macro.
6293         (target_enable_btrace): New macro.
6294         (target_disable_btrace): New macro.
6295         (target_read_btrace): New macro.
6296         * gdbthread.h (struct thread_info): Add btrace field.
6297         * server.c: Include btrace-common.h.
6298         (handle_btrace_general_set): New function.
6299         (handle_btrace_enable): New function.
6300         (handle_btrace_disable): New function.
6301         (handle_general_set): Call handle_btrace_general_set.
6302         (handle_qxfer_btrace): New function.
6303         (struct qxfer qxfer_packets[]): Add btrace entry.
6304         * inferiors.c (remove_thread): Disable btrace.
6305         * linux-low: Include linux-btrace.h.
6306         (linux_low_enable_btrace): New function.
6307         (linux_low_read_btrace): New function.
6308         (linux_target_ops): Add btrace ops.
6309         * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
6310         Add srv_linux_btrace=yes.
6311         (x86_64-*-linux*): Add linux-btrace.o.
6312         Add srv_linux_btrace=yes.
6313         * configure.ac: Define HAVE_LINUX_BTRACE.
6314         * config.in: Regenerated.
6315         * configure: Regenerated.
6316
6317 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
6318
6319         * server.c (handle_qxfer): Preserve error message if -3 is
6320         returned.
6321         (qxfer): Document the -3 return value.
6322
6323 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
6324
6325         * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
6326         (linux_btrace_h): New variable.
6327         (linux-btrace.o): New rule.
6328
6329 2013-03-08  Stan Shebs  <stan@codesourcery.com>
6330             Hafiz Abid Qadeer  <abidh@codesourcery.com>
6331
6332         * tracepoint.c (trace_buffer_size): New global.
6333         (DEFAULT_TRACE_BUFFER_SIZE): New define.
6334         (init_trace_buffer): Change to one-argument function. Allocate
6335         trace buffer memory.
6336         (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
6337         handle QTBuffer:size packet.
6338         (cmd_bigqtbuffer_size): New function.
6339         (initialize_tracepoint): Call init_trace_buffer with
6340         DEFAULT_TRACE_BUFFER_SIZE.
6341         * server.c (handle_query): Add QTBuffer:size in the
6342         supported packets.
6343
6344 2013-03-07  Yao Qi  <yao@codesourcery.com>
6345
6346         * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
6347         (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
6348         of -1.
6349         (cmd_qtsp): Adjust condition.  Do post increment.
6350         Set cur_action and cur_step_action back to 0.
6351
6352 2013-03-07  Jeremy Bennett  <jeremy.bennett@embecosm.com>
6353
6354         PR server/15236
6355         * linux-low.c (linux_write_memory): Return early success if LEN is
6356         zero.
6357
6358 2013-03-05  Corinna Vinschen  <vinschen@redhat.de>
6359
6360         * configure.srv: Add x86_64-*-cygwin* as target.
6361
6362 2013-02-28  Tom Tromey  <tromey@redhat.com>
6363
6364         * configure.ac: Invoke AC_SYS_LARGEFILE.
6365         * configure, config.in: Rebuild.
6366
6367 2013-02-28  Corinna Vinschen  <vinschen@redhat.com>
6368
6369         * win32-low.c: Throughout, fix format strings and casts of
6370         printf-like functions to avoid type related warnings on all
6371         platforms.
6372         (get_child_debug_event): Print dwDebugEventCode as hex since
6373         that's how it's usually documented.
6374
6375 2013-02-28  Yao Qi  <yao@codesourcery.com>
6376
6377         * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
6378         pulongest.
6379
6380 2013-02-27  Jiong Wang  <jiwang@tilera.com>
6381
6382         * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
6383         (reg-tilegx32.c): New rule.
6384         * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
6385         * linux-tile-low.c (tile_arch_setup): New function.  Invoke
6386         different register info initializer according to elf class.
6387         (init_registers_tilgx32): New function.  The tilegx32 register info
6388         initializer.
6389         (tile_fill_gregset): Use "uint_reg_t" to represent register size.
6390         (tile_store_gregset): Likewise.
6391
6392 2013-02-27  Yao Qi  <yao@codesourcery.com>
6393
6394         * server.c (process_point_options): Print debug message when
6395         debug_threads is true.
6396
6397 2013-02-26  Yao Qi  <yao@codesourcery.com>
6398
6399         * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
6400
6401 2013-02-19  Pedro Alves  <palves@redhat.com>
6402             Kai Tietz <ktietz@redhat.com>
6403
6404         PR gdb/15161
6405
6406         * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
6407         instead of strtoul to extract address from packet.
6408         (process_serial_event) <'z'>: Likewise.
6409
6410 2013-02-18  Yao Qi  <yao@codesourcery.com>
6411
6412         * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
6413
6414 2013-02-14  Pedro Alves  <palves@redhat.com>
6415
6416         Plug memory leak.
6417
6418         * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
6419         TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
6420
6421 2013-02-14  Pedro Alves  <palves@redhat.com>
6422
6423         * tracepoint.c (cmd_qtdpsrc): Use savestring.
6424
6425 2013-02-14  Pedro Alves  <palves@redhat.com>
6426
6427         * tracepoint.c (save_string): Delete.
6428         (add_tracepoint_action): Use savestring instead of save_string.
6429
6430 2013-02-12  Pedro Alves  <palves@redhat.com>
6431
6432         * linux-xtensa-low.c: Ditto.
6433         * xtensa-xtregs.c: Ditto.
6434
6435 2013-02-12  Sanimir Agovic  <sanimir.agovic@intel.com>
6436
6437         * thread-db.c (thread_db_get_tls_address): NULL pointer check
6438         thread_db.
6439
6440 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
6441
6442         * linux-aarch64-low.c (aarch64_arch_setup): Clamp
6443         aarch64_num_wp_regs and aarch64_num_bp_regs to
6444         AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
6445
6446 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
6447
6448         * linux-aarch64-low.c (ps_get_thread_area): Replace
6449         PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
6450
6451 2013-02-04  Jim MacArthur  <jim.macarthur@arm.com>
6452             Marcus Shawcroft  <marcus.shawcroft@arm.com>
6453             Nigel Stephens  <nigel.stephens@arm.com>
6454             Yufeng Zhang  <yufeng.zhang@arm.com>
6455
6456         * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
6457         (aarch64.c, aarch64-without-fpu.c): New targets.
6458         * configure.srv (aarch64*-*-linux*): New.
6459         * linux-aarch64-low.c: New file.
6460
6461 2013-02-04  Marcus Shawcroft  <marcus.shawcroft@arm.com>
6462
6463         * linux-low.c (handle_extended_wait, linux_create_inferior)
6464         (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
6465         (dequeue_one_deferred_signal, linux_resume_one_thread)
6466         (fetch_register, linux_write_memory, linux_enable_event_reporting)
6467         (linux_tracefork_grandchild, linux_test_for_tracefork)
6468         (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
6469         PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
6470         where the argument is 0.
6471
6472 2013-01-25  Yao Qi  <yao@codesourcery.com>
6473
6474         * event-loop.c: Include "queue.h".
6475         (gdb_event_p): New typedef.
6476         (struct gdb_event) <next_event>: Remove.
6477         (event_queue): Change to QUEUE(gdb_event_p).
6478         (async_queue_event): Remove.
6479         (gdb_event_xfree): New.
6480         (initialize_event_loop): New.
6481         (process_event): Use API from QUEUE.
6482         (wait_for_event): Likewise.
6483         * server.c (main): Call initialize_event_loop.
6484         * server.h (initialize_event_loop): Declare.
6485
6486 2013-01-18  Yao Qi  <yao@codesourcery.com>
6487
6488         * ax.h (struct eval_agent_expr_context): New.
6489         (gdb_eval_agent_expr): Update declaration.
6490         * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
6491         TFRAME.  Add new argument CTX.
6492         * server.h (struct eval_agent_expr_context): Declare.
6493         (agent_mem_read, agent_tsv_read): Update declaration.
6494         (agent_mem_read_string): Likewise.
6495         * tracepoint.c (eval_tracepoint_agent_expr): Remove.
6496         (add_traceframe_block): Add new argument TPOINT.
6497         Increase TPOINT->traceframe_usage.
6498         (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
6499         eval_tracepoint_agent_expr.
6500         (condition_true_at_tracepoint): Likewise.
6501         (agent_mem_read): Remove argument TFRAME.  Add argument CTX.
6502         (agent_mem_read_string, agent_tsv_read): Likewise.
6503
6504 2013-01-16  Yao Qi  <yao@codesourcery.com>
6505
6506         * linux-low.c (linux_resume_one_lwp): Don't check
6507         'lwp->bp_reinsert != 0'.
6508
6509 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
6510             Pedro Alves  <palves@redhat.com>
6511
6512         * lynx-low.c (ptrace_request_to_str): Define a temporary
6513         macro and use it to simplify this function's implementation.
6514
6515 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
6516
6517         * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
6518         sets errno.
6519
6520 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
6521
6522         * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
6523
6524 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
6525
6526         * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
6527
6528 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
6529
6530         * lynx-low.c (lynx_resume): Use the resume_info parameter
6531         to determine the ptid for the lynx_ptrace call, unless
6532         it is equal to minus_one_ptid, in which case we use the
6533         ptid of the current_inferior.
6534         (lynx_wait_1): After having received a thread create/exit
6535         event, resume the inferior's execution using the signaling
6536         thread's ptid, rather than the old ptid.
6537
6538 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
6539
6540         * lynx-low.c (lynx_resume): Delete variable ret.
6541
6542 2013-01-01  Joel Brobecker  <brobecker@adacore.com>
6543
6544         * gdbreplay.c (gdbreplay_version): Update copyright year.
6545         * server.c (gdbserver_version): Likewise.
6546
6547 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
6548
6549         * lynx-low.c (lynx_wait_1): Add debug trace before adding
6550         new thread.
6551
6552 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
6553
6554         * lynx-low.c (ptrace_request_to_str): Add handling for
6555         PTRACE_GETTRACESIG.
6556
6557 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
6558
6559         * lynx-low.c (lynx_attach): Delete variable new_process.
6560
6561 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
6562
6563         * lynx-low.c (lynx_create_inferior): Delete variable
6564         new_process.
6565
6566 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
6567
6568         * lynx-low.c (ptrace_request_to_str): Do not handle
6569         PTRACE_GETTHREADLIST if this macro does not exist.
6570
6571 2012-12-15  Yao Qi  <yao@codesourcery.com>
6572
6573         * Makefile.in (OBS): Add notif.o.
6574         * notif.c, notif.h: New.
6575         * server.c: Include "notif.h".
6576         (struct vstop_notif) <next>: Remove.
6577         <base>: New field.
6578         (queue_stop_reply): Update.
6579         (push_event, send_next_stop_reply): Remove.
6580         (discard_queued_stop_replies): Update.
6581         (notif_stop): New variable.
6582         (handle_v_stopped): Remove.
6583         (handle_v_requests): Don't call handle_v_stopped.  Call
6584         handle_ack_notif instead.
6585         (queue_stop_reply_callback): Call notif_event_enque instead
6586         of queue_stop_reply.
6587         (handle_status): Don't call send_next_stop_reply, call
6588         notif_write_event instead.
6589         (kill_inferior_callback): Likewise.
6590         (detach_or_kill_inferior_callback): Likewise.
6591         (main): Call initialize_notif.
6592         (process_serial_event): Call QUEUE_is_empty.
6593         (handle_target_event): Call notif_push instead of push event.
6594         * server.h (push_event): Remove declaration.
6595
6596 2012-12-10  Tom Tromey  <tromey@redhat.com>
6597
6598         * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
6599         (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
6600         macros.
6601         (.c.o): Rewrite.
6602         (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
6603         (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
6604         (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
6605         (amd64-linux-ipa.o, ax.o): Rewrite.
6606         (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
6607         (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
6608         (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
6609         (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
6610         (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
6611         (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
6612         (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
6613         (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
6614         (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
6615         (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
6616         (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
6617         (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
6618         (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
6619         (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
6620         (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
6621         (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
6622         (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
6623         (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
6624         (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
6625         (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
6626         (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
6627         (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
6628         (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
6629         (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
6630         (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
6631         (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
6632         (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
6633         (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
6634         (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
6635         (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
6636         (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
6637         (reg-tilegx.o): Remove.
6638         (all_object_files): New macro.
6639         Include .deps files.
6640         * aclocal.m4, configure: Rebuild.
6641         * acinclude.m4: Include depstand.m4, lead-dot.m4.
6642         * configure.ac: Invoke ZW_CREATE_DEPDIR,
6643         ZW_PROG_COMPILER_DEPENDENCIES.  Compute GMAKE condition.
6644
6645 2012-12-05  Tom Tromey  <tromey@redhat.com>
6646
6647         PR gdb/14917:
6648         * server.h (current_insn_ptr, emit_error): Declare 'extern'.
6649
6650 2012-11-28  Markus Metzger  <markus.t.metzger@intel.com>
6651
6652         * configure.ac: Check for linux/perf_event.h.
6653         * config.in: Regenerated.
6654         * configure: Regenerated.
6655
6656 2012-11-26  Maxime Villard  <rustyBSD@gmx.fr>
6657
6658         * hostio.c (handle_readlink): Decrease buffer size
6659         parameter passed to readlink by one byte.
6660
6661 2012-11-26  Yao Qi  <yao@codesourcery.com>
6662
6663         * configure.ac (build_warnings): Append '-Wempty-body'.
6664         * configure: Regenerated.
6665         * linux-low.c (linux_create_inferior): Use braces for empty 'if'
6666         body.
6667
6668 2012-11-15  Pierre Muller  <muller@sourceware.org>
6669
6670         * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
6671         * config.in: Regenerate.
6672         * configure: Regenerate.
6673         * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
6674         Use "gdb_wait.h" header instead of <sys/wait.h> header.
6675         * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6676         * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
6677         header.
6678         * server.c: Remove HAVE_WAIT_H conditional.  Use "gdb_wait.h" header
6679         instead of <sys/wait.h> header.
6680         * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6681
6682 2012-11-13 Markus Metzger  <markus.t.metzger@intel.com>
6683
6684         * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
6685         (various make rules): Remove -DGDBSERVER
6686
6687 2012-11-09  Yao Qi  <yao@codesourcery.com>
6688
6689         * spu-low.c (current_ptid): Move it to ..
6690         * gdbthread.h: ... here.  New.
6691         * remote-utils.c (read_ptid): Use macro 'current_ptid'.
6692         * server.c (myresume, process_serial_event): Likewise.
6693         * thread-db.c (thread_db_find_new_threads): Likewise.
6694         * tracepoint.c (run_inferior_command): Likewise.
6695
6696 2012-10-01  Andrew Burgess  <aburgess@broadcom.com>
6697
6698         * server.c (handle_search_memory_1): Include access length in
6699         warning message.
6700
6701 2012-09-05  Michael Brandt  <michael.brandt@axis.com>
6702
6703         * linux-crisv32-low.c: Fix compile errors.
6704
6705 2012-09-04  Yao Qi  <yao@codesourcery.com>
6706
6707         * tracepoint.c (cmd_qtsv): Adjust debug message.
6708         Don't check CUR_TPOINT.
6709
6710 2012-08-28  Yao Qi  <yao@codesourcery.com>
6711
6712         * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
6713         * server.h: Include 'libiberty.h' and 'ansidecl.h'.
6714         (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
6715         Remove declarations of xmalloc, xreallloc, xstrdup and
6716         freeargv.
6717         * Makefile.in (libiberty_h): New.
6718         (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
6719         (linux-bfin-low.o): Append dependency 'libiberty.h'.
6720
6721 2012-08-23  Yao Qi  <yao@codesourcery.com>
6722
6723         * server.h: Remove declaration of 'xsnprintf'.
6724
6725 2012-08-22  Keith Seitz  <keiths@redhat.com>
6726
6727         * server.h: Include build-gnulib-gbserver/config.h.
6728         * gdbreplay.c: Likewise.
6729
6730 2012-08-08  Doug Evans  <dje@google.com>
6731
6732         * Makefile.in (SFILES): Add gdb_vecs.c.
6733         (OBS): Add gdb_vecs.o.
6734         (gdb_vecs_h, host_defs_h): New variables.
6735         (thread-db.o): Add $(gdb_vecs_h) dependency.
6736         (gdb_vecs.o): New rule.
6737         * thread-db.c: #include "gdb_vecs.h".
6738         (thread_db_load_search): Use a vector to iterate over path elements.
6739         Handle text appearing after "$pdir".
6740
6741         * configure.ac: Add check for strstr.
6742         * config.in: Regenerate.
6743         * configure: Regenerate.
6744
6745 2012-08-02  Ulrich Weigand  <ulrich.weigand@linaro.org>
6746
6747         * hostio.c (handle_pread): If pread fails, fall back to attempting
6748         lseek/read.
6749         (handle_pwrite): Likewise for pwrite.
6750
6751 2012-08-01  Ulrich Weigand  <ulrich.weigand@linaro.org>
6752
6753         * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
6754         between unsupported TYPE and unimplementable ADDR/LEN combination.
6755         (arm_insert_point): Act on new return value.
6756
6757 2012-07-31  Pedro Alves  <palves@redhat.com>
6758
6759         * server.c (process_point_options): Only skip tokens if we find
6760         one that is unrecognized.  Don't treat 'X' specially while
6761         skipping unrecognized tokens.
6762
6763 2012-07-30  Ulrich Weigand  <ulrich.weigand@linaro.org>
6764
6765         * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
6766         to 4-byte-align HW breakpoint addresses for Thumb.
6767
6768 2012-07-27  Yao Qi  <yao@codesourcery.com>
6769
6770         PR remote/14161.
6771
6772         * server.h: Declare gdb_agent_about_to_close.
6773         * target.c (kill_inferior): Include "agent.h".
6774         New.  Send command 'kill'.
6775         * target.h (kill_inferior): Removed macro.
6776         * tracepoint.c (gdb_agent_about_to_close): New.
6777         (gdb_agent_helper_thread): Handle command 'close'.
6778         Wait endlessly until the inferior stops.
6779         Install gdb_agent_remove_socket to atexit hook.
6780         (agent_socket_name): New static variable.
6781         (gdb_agent_socket_init): Replace local variable 'name' with
6782         'agent_socket_name'.
6783         (gdb_agent_remove_socket): New.
6784
6785 2012-07-27  Yao Qi  <yao@codesourcery.com>
6786
6787         * server.c (process_point_options): Stop at 'X' when parsing.
6788
6789 2012-07-19  Michael Eager  <eager@eagercon.com>
6790
6791         * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
6792         to hw_execute.
6793         * linux-x86-low.c (x86_insert_point, x86_remove_point):
6794         Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
6795         hardware breakpoint.
6796
6797 2012-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
6798
6799         * gdbserver/linux-low.c (initialize_low): Call
6800         linux_ptrace_init_warnings.
6801
6802 2012-07-02  Doug Evans  <dje@google.com>
6803
6804         * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
6805         pointer to int.
6806
6807 2012-07-02  Stan Shebs  <stan@codesourcery.com>
6808
6809         * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
6810         (ax.o): Add it to build rule.
6811         (ax-ipa.o): Ditto.
6812         (OBS): Add format.o.
6813         (IPA_OBS): Add format.o.
6814         * server.c (handle_query): Claim support for breakpoint commands.
6815         (process_point_options): Add command case.
6816         (process_serial_event): Leave running if there are printfs in
6817         effect.
6818         * mem-break.h (any_persistent_commands): Declare.
6819         (add_breakpoint_commands): Declare.
6820         (gdb_no_commands_at_breakpoint): Declare.
6821         (run_breakpoint_commands): Declare.
6822         * mem-break.c (struct point_command_list): New struct.
6823         (struct breakpoint): New field command_list.
6824         (any_persistent_commands): New function.
6825         (add_commands_to_breakpoint): New function.
6826         (add_breakpoint_commands): New function.
6827         (gdb_no_commands_at_breakpoint): New function.
6828         (run_breakpoint_commands): New function.
6829         * linux-low.c (linux_wait_1): Test for and run breakpoint commands
6830         locally.
6831         * ax.c: Include format.h.
6832         (ax_printf): New function.
6833         (gdb_eval_agent_expr): Add printf opcode.
6834
6835 2012-06-13  Yao Qi  <yao@codesourcery.com>
6836
6837         * server.c (start_inferior): Remove duplicated writes to fields
6838         'last_resume_kind' and 'last_status' of 'current_inferior'.
6839
6840 2012-06-12  Yao Qi  <yao@codesourcery.com>
6841             Pedro Alves  <palves@redhat.com>
6842
6843         * linux-low.c (linux_set_resume_request): Simplify predicate.  Add
6844         comment.
6845         * server.c (handle_v_cont): Extend comment.
6846
6847 2012-06-11  Yao Qi  <yao@codesourcery.com>
6848
6849         * linux-low.c (linux_attach): Add 'static'.
6850
6851 2012-06-06  Yao Qi  <yao@codesourcery.com>
6852
6853         * ax.c (gdb_eval_agent_expr): Print `top' in hex.
6854
6855 2012-06-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
6856
6857         Fix gcc -flto compilation warning.
6858         * server.c (main): Make variable multi_mode and attach volatile.
6859
6860 2012-05-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
6861
6862         * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
6863         if the platform doesn't know about it.
6864
6865 2012-05-30  Jeff Kenton  <jkenton@tilera.com>
6866
6867         * Makefile.in (SFILES): Add linux-tile-low.c.
6868         (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
6869         * configure.srv: Handle tilegx-*-linux*.
6870         * linux-tile-low.c: New file.
6871
6872 2012-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
6873
6874         * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
6875
6876 2012-05-24  Pedro Alves  <palves@redhat.com>
6877
6878         PR gdb/7205
6879
6880         Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
6881
6882 2012-05-24  Pedro Alves  <palves@redhat.com>
6883
6884         PR gdb/7205
6885
6886         Replace target_signal with gdb_signal throughout.
6887
6888 2012-05-22  Maciej W. Rozycki  <macro@codesourcery.com>
6889
6890         * linux-low.c (linux_store_registers): Avoid the copying sequence
6891         when no data has been retrieved by ptrace.
6892
6893 2012-05-22  Will Deacon  <will.deacon@arm.com>
6894
6895         * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
6896         Include asm/ptrace.h.
6897         (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
6898         already defined.
6899
6900 2012-05-21  Maciej W. Rozycki  <macro@codesourcery.com>
6901
6902         * linux-low.c (linux_store_registers): Don't re-retrieve data
6903         with ptrace that has already been obtained from /proc.  Always
6904         copy any data retrieved with ptrace to the buffer supplied.
6905
6906 2012-05-11  Yao Qi  <yao@codesourcery.com>
6907             Pedro Alves  <palves@redhat.com>
6908
6909         * linux-low.c (enum stopping_threads_kind): New.
6910         (stopping_threads): Change type to `enum stopping_threads_kind'.
6911         (handle_extended_wait): If stopping and suspending threads, leave
6912         the new_lwp suspended too.
6913         (linux_wait_for_event): Adjust.
6914         (stop_all_lwps): Set `stopping_threads' to
6915         STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
6916         whether we're suspending threads or just stopping them.  Assert no
6917         recursion happens.
6918
6919 2012-04-29  Yao Qi  <yao@codesourcery.com>
6920
6921         * server.h: Move some code to ...
6922         * gdbthread.h: ... here.  New.
6923         * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
6924         (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
6925         (nto-low.o, win32-low.o): Likewise.
6926         * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
6927         * regcache.c, remote-utils.c, server.c: Likewise.
6928         * target.c, tracepoint.c, win32-low.c: Likewise.
6929
6930 2012-04-24  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
6931
6932         * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
6933         (PTRACE_ARG4_TYPE): Likewise.
6934         (PTRACE_XFER_TYPE): Likewise.
6935         * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
6936         ptrace to PTRACE_ARG3_TYPE.
6937         * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
6938         (PTRACE_ARG4_TYPE): Likewise.
6939         (PTRACE_XFER_TYPE): Likewise.
6940         (linux_detach_one_lwp): Cast fourth argument of
6941         ptrace to long then PTRACE_ARG4_TYPE.
6942         (regsets_fetch_inferior_registers): Cast third argument of
6943         ptrace to long then PTRACE_ARG3_TYPE.
6944         (regsets_store_inferior_registers): Likewise.
6945
6946 2012-04-20  Pedro Alves  <palves@redhat.com>
6947
6948         * configure: Regenerate.
6949
6950 2012-04-19  Pedro Alves  <palves@redhat.com>
6951
6952         * Makefile.in (GNULIB_BUILDDIR): New.
6953         (LIBGNU, INCGNU, GNULIB_H): Adjust.
6954         (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
6955         (all, install-only, uninstall, clean-info, all-lib, clean): No
6956         longer pass GNULIB_FLAGS_TO_PASS.  Use subdir_do.
6957         (maintainer-clean realclean distclean): Use subdir_do.
6958         (subdir_do): New.
6959         (gnulib/import/Makefile): Adjust.  Replace gnulib/import with
6960         $(GNULIB_BUILDDIR).  Don't pass argument to config.status.
6961         * acinclude.m4: Include acx_configure_dir.m4.
6962         * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
6963         calls.  Call AC_PROG_RANLIB.  Configure gnulib using
6964         ACX_CONFIGURE_DIR.
6965         (GNULIB): New.
6966         (GNULIB_STDINT_H): Adjust.
6967         (AC_OUTPUT): Don't output gnulib/Makefile anymore.
6968         * gdbreplay.c: Include build-gnulib/config.h.
6969         * server.h: Likewise.
6970         * aclocal.m4: Regenerate.
6971         * config.in: Regenerate.
6972         * configure: Regenerate.
6973
6974 2012-04-19  Pedro Alves  <palves@redhat.com>
6975
6976         * Makefile.in (LIBGNU, INCGNU): Adjust.
6977         (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
6978         (all, install-only, uninstall, clean-info, all-lib, clean)
6979         (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
6980         * configure.ac: Adjust AC_OUTPUT output.
6981         * aclocal.m4: Regenerate.
6982         * configure: Regenerate.
6983
6984 2012-04-19  Pedro Alves  <palves@redhat.com>
6985
6986         * Makefile.in (generated_files): New.
6987         (server_h): Remove the explicit dependency on config.h, and depend
6988         on $generated_files.
6989
6990 2012-04-19  Pedro Alves  <palves@redhat.com>
6991
6992         * Makefile.in (INCGNU): Add -Ignulib.
6993
6994 2012-04-19  Pedro Alves  <palves@redhat.com>
6995
6996         * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
6997         (INCGNU): ... this, and spell out -I here.
6998         (GNULIB_LIB): Rename to ...
6999         (LIBGNU): ... this.
7000         (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
7001
7002 2012-04-19  Pedro Alves  <palves@redhat.com>
7003
7004         * config.in: Regenerate.
7005
7006 2012-04-19  Pedro Alves  <palves@redhat.com>
7007
7008         * configure.ac: Remove AC_CHECK_DECLS check for memmem.
7009         * server.h (memmem): Remove declaration.
7010         * config.in: Regenerate.
7011         * configure: Regenerate.
7012
7013 2012-04-19  Yao Qi  <yao@codesourcery.com>
7014
7015         * Makefile.in (SFILES): Add common/vec.c.
7016         (OBS): Add vec.o.
7017         (vec.o): New rule.
7018
7019 2012-04-19  Yao Qi  <yao@codesourcery.com>
7020
7021         * remote-utils.c (prepare_resume_reply): Replace with macro
7022         target_core_of_thread.
7023         * server.c (handle_qxfer_threads_proper): Likewise.
7024         * target.h (traget_core_of_thread): New macro.
7025
7026 2012-04-18  Pedro Alves  <palves@redhat.com>
7027
7028         * aclocal.m4: Regenerate.
7029         * configure: Regenerate.
7030
7031 2012-04-16  Yao Qi  <yao@codesourcery.com>
7032
7033         * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
7034         duplicated on address.
7035
7036 2012-04-16  Yao Qi  <yao@codesourcery.com>
7037
7038         * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
7039         (struct tracepoint_action_ops) <send>: New field.
7040         (m_tracepoint_action_send, r_tracepoint_action_send): New.
7041         (agent_expr_send, x_tracepoint_action_send): New.
7042         (l_tracepoint_action_send): New.
7043         (cmd_qtdp): Download and install tracepoint
7044         according to `use_agent'.
7045         (run_inferior_command): Add one more parameter `len'.
7046         Update callers.
7047         (tracepoint_send_agent): New.
7048         (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
7049
7050 2012-04-16  Yao Qi  <yao@codesourcery.com>
7051
7052         * tracepoint.c (download_tracepoints): Moved to ...
7053         (cmd_qtstart): ... here.
7054
7055 2012-04-14  Yao Qi  <yao@codesourcery.com>
7056
7057         * tracepoint.c: Include inttypes.h.
7058         (struct collect_memory_action): Use sized types.
7059         (struct tracepoint): Likewise.
7060         (cmd_qtdp, stop_tracing): Update print specifiers.
7061         (cmd_qtp, response_tracepoint): Likewise.
7062         (collect_data_at_tracepoint): Likewise.
7063         (collect_data_at_step): Likewise.
7064
7065 2012-04-14  Yao Qi  <yao@codesourcery.com>
7066
7067         Import gnulib module inttypes.
7068         * aclocal.m4, config.in, configure: Regenerated.
7069
7070 2012-04-14  Yao Qi  <yao@codesourcery.com>
7071
7072         * Makefile.in (maintainer-clean, realclean, distclean): Remove
7073         Makefile and config.status at last.
7074
7075 2012-04-13  Yao Qi  <yao@codesourcery.com>
7076
7077         * tracepoint.c: Include stdint.h unconditionally.
7078
7079 2012-04-13  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
7080
7081         * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7082         on BFD_HAVE_SYS_PROCFS_TYPE.
7083         * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7084         * configure: Regenerate.
7085         * config.in: Likewise.
7086
7087 2012-04-13  H.J. Lu  <hongjiu.lu@intel.com>
7088
7089         * Makefile.in (clean): Also remove x32.c x32-linux.c
7090         x32-avx.c x32-avx-linux.c.
7091         (x32.o): New target.
7092         (x32.c): Likewise.
7093         (x32-linux.o): Likewise.
7094         (x32-linux.c): Likewise.
7095         (x32-avx.o): Likewise.
7096         (x32-avx.c): Likewise.
7097         (x32-avx-linux.o): Likewise.
7098         (x32-avx-linux.c): Likewise.
7099
7100         * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
7101         (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
7102         (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7103         (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7104         (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
7105         i386/x32-avx-linux.xml.
7106
7107         * linux-x86-low.c (init_registers_x32_linux): New prototype.
7108         (init_registers_x32_avx_linux): Likwise.
7109         (x86_linux_update_xmltarget): Call init_registers_x32_linux
7110         or init_registers_x32_avx_linux if linux_is_elf64 is false.
7111
7112 2012-04-13  Pedro Alves  <palves@redhat.com>
7113
7114         * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
7115         (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
7116         (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
7117         (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
7118         the sub-make.
7119
7120 2012-04-12  H.J. Lu  <hongjiu.lu@intel.com>
7121
7122         * linux-x86-low.c (compat_x32_clock_t): New.
7123         (compat_x32_siginfo_t): Likewise.
7124         (compat_x32_siginfo_from_siginfo): Likewise.
7125         (siginfo_from_compat_x32_siginfo): Likewise.
7126         (linux_is_elf64): Likewise.
7127         (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
7128         and siginfo_from_compat_x32_siginfo for x32.
7129         (x86_arch_setup): Set linux_is_elf64.
7130
7131 2012-04-12  H.J. Lu  <hongjiu.lu@intel.com>
7132
7133         PR gdb/13969
7134         * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
7135         e_machine field.
7136         (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
7137         * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
7138         * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
7139         compatible with process.
7140
7141 2012-04-12  Yao Qi  <yao@codesourcery.com>
7142
7143         * Makefile.in: Define abs_top_srcdir and abs_srcdir.
7144         (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
7145         (install-only, install-info, clean): Handle sub dir gnulib.
7146         (all-lib, am--refresh): New targets.
7147         (memmem.o): Remove target.
7148         * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
7149         Invoke gl_EARLY.  Invoke AC_CHECK_PROGS for make.
7150         (AC_REPLACE_FUNCS): Remove memmem.
7151         Invoke gl_INIT and AM_INIT_AUTOMAKE.
7152         (AC_OUTPUT): Generate Makefile in gnulib/.
7153         * aclocal.m4, config.in, configure: Regenerated.
7154
7155 2012-04-10  Maciej W. Rozycki  <macro@codesourcery.com>
7156
7157         * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
7158
7159 2012-04-05  Pedro Alves  <palves@redhat.com>
7160
7161         -Werror=strict-aliasing
7162
7163         * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
7164         pointer.
7165
7166 2012-04-04  Pedro Alves  <palves@redhat.com>
7167
7168         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7169         (sparc_store_gregset_from_stack, sparc_store_gregset)
7170         (sparc_breakpoint_at): Fix formatting.
7171
7172 2012-03-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
7173
7174         * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
7175         are available.
7176         * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
7177         [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
7178         * config.in: Regenerate.
7179         * configure: Likewise.
7180
7181 2012-03-29  Pedro Alves  <palves@redhat.com>
7182
7183         * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
7184         Correct ptrace arguments.
7185
7186 2012-03-28  Pedro Alves  <palves@redhat.com>
7187
7188         * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
7189         (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
7190         (IA64_FR1_REGNUM): New defines.
7191         (ia64_fetch_register): New.
7192         (the_low_target): Install it.
7193         * linux-low.h (struct linux_target_ops) <fetch_register>: New
7194         field.
7195         * linux-low.c (linux_fetch_registers): Try the
7196         the_low_target.fetch_register hook first.
7197
7198         * linux-arm-low.c (the_low_target): Adjust.
7199         * linux-bfin-low.c (the_low_target): Adjust.
7200         * linux-cris-low.c (the_low_target): Adjust.
7201         * linux-crisv32-low.c (the_low_target): Adjust.
7202         * linux-m32r-low.c (the_low_target): Adjust.
7203         * linux-m68k-low.c (the_low_target): Adjust.
7204         * linux-mips-low.c (the_low_target): Adjust.
7205         * linux-ppc-low.c (the_low_target): Adjust.
7206         * linux-s390-low.c (the_low_target): Adjust.
7207         * linux-sh-low.c (the_low_target): Adjust.
7208         * linux-sparc-low.c (the_low_target): Adjust.
7209         * linux-tic6x-low.c (the_low_target): Adjust.
7210         * linux-x86-low.c (the_low_target): Adjust.
7211         * linux-xtensa-low.c (the_low_target): Adjust.
7212
7213 2012-03-26  Pedro Alves  <palves@redhat.com>
7214
7215         * server.c (handle_qxfer_libraries): Don't bail early if
7216         the_target->qxfer_libraries_svr4 is not NULL.
7217
7218 2012-03-26  Pedro Alves  <palves@redhat.com>
7219
7220         * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
7221
7222 2012-03-23  Pedro Alves  <palves@redhat.com>
7223
7224         * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
7225         "library-list-svr4" element's start tag when the the DSO list is
7226         empty.
7227
7228 2012-03-23  Pedro Alves  <palves@redhat.com>
7229
7230         * linux-low.c (read_one_ptr): Read the inferior's pointer through
7231         a variable whose type size is the same as the inferior's pointer
7232         size.
7233
7234 2012-03-21  Thomas Schwinge  <thomas@codesourcery.com>
7235
7236         * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
7237         struct siginfo.
7238         * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
7239         * linux-x86-low.c (x86_siginfo_fixup): Likewise.
7240         * linux-low.h: Include <signal.h>.
7241         (struct siginfo): Remove forward declaration.
7242         (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
7243         struct siginfo.
7244
7245 2012-03-21  Mike Frysinger  <vapier@gentoo.org>
7246
7247         * .gitignore: Ignore more files.
7248
7249 2012-03-19  Pedro Alves  <palves@redhat.com>
7250             Jan Kratochvil  <jan.kratochvil@redhat.com>
7251
7252         * server.c (cont_thread, general_thread): Add describing comments.
7253         (start_inferior): Clear `cont_thread'.
7254         (handle_v_cont): Don't set `cont_thread' if resuming all threads
7255         of a process.
7256
7257 2012-03-15  Yao Qi  <yao@codesourcery.com>
7258
7259         * tracepoint.c (install_tracepoint): Move duplicated tracepoint
7260         handling to ...
7261         (cmd_qtdp): ... here.
7262
7263 2012-03-15  Yao Qi  <yao@codesourcery.com>
7264
7265         * tracepoint.c (struct tracepoint_action_ops): New.
7266         (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
7267         (m_tracepoint_action_download): New.
7268         (r_tracepoint_action_download): New.
7269         (x_tracepoint_action_download): New.
7270         (l_tracepoint_action_download): New.
7271         (add_tracepoint_action): Install `action->ops' according type.
7272         (download_tracepoint_1): Move code `download' function pointer
7273         of various tracepoint_action_ops.
7274
7275 2012-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
7276
7277         * linux-low.c (linux_attach_lwp_1): New variable buffer.  Call
7278         linux_ptrace_attach_warnings.
7279
7280 2012-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
7281
7282         * Makefile.in (linux-ptrace.o): New.
7283         * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
7284         (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
7285         (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
7286         (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
7287         (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
7288         of these targets.
7289         * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
7290
7291 2012-03-08  Yao Qi  <yao@codesourcery.com>
7292             Pedro Alves  <palves@redhat.com>
7293
7294         Fix PR server/13392.
7295         * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
7296         offset of JMP insn.
7297         * tracepoint.c (remove_tracepoint): New.
7298         (cmd_qtdp): Call remove_tracepoint when failed to install.
7299
7300 2012-03-07  Pedro Alves  <palves@redhat.com>
7301
7302         * linux-low.c (get_detach_signal): New.
7303         (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
7304         Pass on pending signals to PTRACE_DETACH.  Check the result of the
7305         ptrace call.
7306         * server.c (program_signals, program_signals_p): New.
7307         (handle_general_set): Handle QProgramSignals.
7308         * server.h (program_signals, program_signals_p): Declare.
7309
7310 2012-03-05  Pedro Alves  <palves@redhat.com>
7311             Jan Kratochvil  <jan.kratochvil@redhat.com>
7312
7313         * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
7314         New comment why.
7315
7316 2012-03-03  Yao Qi  <yao@codesourcery.com>
7317
7318         * tracepoint.c (tracepoint_look_up_symbols): Update call to
7319         agent_look_up_symbols.
7320
7321 2012-03-03  Yao Qi  <yao@codesourcery.com>
7322
7323         * Makefile.in (linux-low.o): Keep dependence on agent.h.
7324         (linux-x86-low.o): Likewise.
7325         * server.h: Remove in_process_agent_loaded.
7326         * tracepoint.c (in_process_agent_loaded): Removed.  Moved it
7327         common/agent.c.
7328         Update callers.
7329
7330 2012-03-03  Yao Qi  <yao@codesourcery.com>
7331
7332         * tracepoint.c (gdb_agent_capability): New global.
7333         (in_process_agent_loaded_ust): Renamed to
7334         `in_process_agent_supports_ust'.
7335         Update callers.
7336         (in_process_agent_supports_ust): Call agent_capability_check.
7337         (clear_installed_tracepoints): Assert that agent supports
7338         agent.
7339
7340 2012-03-03  Yao Qi  <yao@codesourcery.com>
7341
7342         * linux-low.c (linux_supports_agent): New.
7343         (linux_target_ops): Initialize field `supports_agent' with
7344         linux_supports_agent.
7345         * target.h (struct target_ops) <supports_agent>: New.
7346         (target_supports_agent): New macro.
7347         * server.c (handle_general_set): Handle packet 'QAgent'.
7348         (handle_query): Send `QAgent+'.
7349         * Makefile.in (server.o): Depends on agent.h.
7350
7351 2012-03-03  Yao Qi  <yao@codesourcery.com>
7352
7353         * Makefile.in (OBS): Add agent.o.
7354         Add new rule for agent.o.
7355         Track dependence of tracepoint.c on agent.h.
7356         * tracepoint.c (run_inferior_command_1):
7357         (run_inferior_command): Call agent_run_command.
7358         (gdb_ust_connect_sync_socket): Deleted.  Move it to
7359         common/agent.c.
7360         (resume_thread, stop_thread): Likewise.
7361         (gdb_ust_socket_init): Renamed to ...
7362         (gdb_agent_socket_init): ... New.
7363         (gdb_ust_thread): Renamed to ...
7364         (gdb_agent_helper_thread): ... New.
7365         (gdb_ust_init): Move some code to ...
7366         (gdb_agent_init): ... here.  New.
7367         [HAVE_UST]: Call gdb_ust_init.
7368         (initialize_tracepoint_ftlib):  Call gdb_agent_init.
7369         * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
7370         * config.in, configure: Regenerated.
7371
7372 2012-03-02  Pedro Alves  <palves@redhat.com>
7373
7374         * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
7375         * linux-low.c (struct simple_pid_list): New.
7376         (stopped_pids): New a struct simple_pid_list pointer.
7377         (add_to_pid_list, pull_pid_from_list): New.
7378         (handle_extended_wait): Don't assume the first signal new children
7379         report is SIGSTOP.  Adjust call to pull_pid_from_list.
7380         (linux_wait_for_lwp): Adjust.
7381
7382 2012-03-02  Yao Qi  <yao@codesourcery.com>
7383
7384         * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
7385         debug log.
7386
7387 2012-03-02  Yao Qi  <yao@codesourcery.com>
7388
7389         * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
7390         `stop_pc' and `tpoint'.  Update caller.
7391
7392 2012-03-01  Maciej W. Rozycki  <macro@codesourcery.com>
7393
7394         * linux-low.h (linux_target_ops): Add regset_bitmap member.
7395         * linux-low.c (use_linux_regsets): New macro.
7396         [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
7397         [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
7398         (linux_register_in_regsets): New function.
7399         (usr_fetch_inferior_registers): Skip registers covered by
7400         regsets.
7401         (usr_store_inferior_registers): Likewise.
7402         (usr_fetch_inferior_registers): New macro.
7403         (usr_store_inferior_registers): Likewise.
7404         (linux_fetch_registers): Handle mixed regset/non-regset targets.
7405         (linux_store_registers): Likewise.
7406         * linux-mips-low.c (init_registers_mips_dsp_linux): New
7407         prototype.
7408         (init_registers_mips64_dsp_linux): Likewise.
7409         (init_registers_mips_linux): New macro.
7410         (init_registers_mips_dsp_linux): Likewise.
7411         (mips_dsp_num_regs): Likewise.
7412         (DSP_BASE, DSP_CONTROL): New fallback macros.
7413         (mips_base_regs): New macro.
7414         (mips_regmap): Use it.  Fix the size.
7415         (mips_dsp_regmap): New variable.
7416         (mips_dsp_regset_bitmap): Likewise.
7417         (mips_arch_setup): New function.
7418         (mips_cannot_fetch_register): Use the_low_target.regmap rather
7419         than mips_regmap.
7420         (mips_cannot_store_register): Likewise.
7421         (the_low_target): Update .arch_setup, .num_regs and .regmap
7422         initializers.  Add .regset_bitmap initializer.
7423         * linux-arm-low.c (the_low_target): Add .regset_bitmap
7424         initializer.
7425         * linux-bfin-low.c (the_low_target): Likewise.
7426         * linux-cris-low.c (the_low_target): Likewise.
7427         * linux-crisv32-low.c (the_low_target): Likewise.
7428         * linux-ia64-low.c (the_low_target): Likewise.
7429         * linux-m32r-low.c (the_low_target): Likewise.
7430         * linux-m68k-low.c (the_low_target): Likewise.
7431         * linux-ppc-low.c (the_low_target): Likewise.
7432         * linux-s390-low.c (the_low_target): Likewise.
7433         * linux-sh-low.c (the_low_target): Likewise.
7434         * linux-sparc-low.c (the_low_target): Likewise.
7435         * linux-tic6x-low.c (the_low_target): Likewise.
7436         * linux-x86-low.c (the_low_target): Likewise.
7437         * linux-xtensa-low.c (the_low_target): Likewise.
7438         * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
7439         mips64-dsp-linux.o to srv_regobj.  Add mips-dsp-linux.xml,
7440         mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
7441         srv_xmlfiles.
7442         * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
7443         (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
7444
7445 2012-02-29  Yao Qi  <yao@codesourcery.com>
7446             Pedro Alves  <palves@redhat.com>
7447
7448         * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
7449         `step_over_finished' is true.
7450
7451 2012-02-27  Pedro Alves  <palves@redhat.com>
7452
7453         * linux-low.c (pid_is_stopped): Delete, moved to common/.
7454         (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
7455
7456 2012-02-27  Pedro Alves  <palves@redhat.com>
7457
7458         PR server/9684
7459         * linux-low.c (pid_is_stopped): New.
7460         (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
7461
7462 2012-02-25  Luis Machado  <lgustavo@codesourcery.com>
7463
7464         * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
7465         of conditions.
7466
7467 2012-02-24  Maciej W. Rozycki  <macro@codesourcery.com>
7468
7469         * linux-mips-low.c (mips_regmap): Correct the index of $f9.
7470
7471 2012-02-24  Luis Machado  <lgustavo@codesourcery>
7472
7473         * server.c (handle_query): Advertise support for target-side
7474         breakpoint condition evaluation.
7475         (process_point_options): New function.
7476         (process_serial_event): When inserting a breakpoint, check for
7477         a target-side condition that should be evaluated.
7478
7479         * mem-break.c: Include regcache.h and ax.h.
7480         (point_cond_list_t): New data structure.
7481         (breakpoint) <cond_list>: New field.
7482         (find_gdb_breakpoint_at): Make non-static.
7483         (delete_gdb_breakpoint_at): Clear any target-side
7484         conditions.
7485         (clear_gdb_breakpoint_conditions): New function.
7486         (add_condition_to_breakpoint): Likewise.
7487         (add_breakpoint_condition): Likewise.
7488         (gdb_condition_true_at_breakpoint): Likewise.
7489         (gdb_breakpoint_here): Return result directly instead
7490         of going through a local variable.
7491
7492         * mem-break.h (find_gdb_breakpoint_at): New prototype.
7493         (clear_gdb_breakpoint_conditions): Likewise.
7494         (add_breakpoint_condition): Likewise.
7495         (gdb_condition_true_at_breakpoint): Likewise.
7496
7497         * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
7498         (need_step_over_p): Take target-side breakpoint condition into
7499         consideration.
7500
7501 2012-02-24  Luis Machado  <lgustavo@codesourcery>
7502
7503         * server.h: Include tracepoint.h.
7504         (agent_mem_read, agent_get_trace_state_variable_value,
7505         agent_set_trace_state_variable_value,
7506         agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
7507         get_set_tsv_func_addr): New prototypes.
7508
7509         * ax.h: New include file.
7510         * ax.c: New source file.
7511
7512         * tracepoint.c: Include ax.h.
7513         (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
7514         agent_expr, eval_result_type): Move to ax.h.
7515         (parse_agent_expr): Rename to ...
7516         (gdb_parse_agent_expr): ... this, make it non-static and move
7517         to ax.h.
7518         (unparse_agent_expr) Rename to ...
7519         (gdb_unparse_agent_expr): ... this, make it non-static and move
7520         to ax.h.
7521         (eval_agent_expr): Rename to ...
7522         (eval_tracepoint_agent_expr): ... this.
7523         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
7524         forward declarations.
7525         (add_tracepoint_action): Call gdb_parse_agent_expr (...).
7526         (agent_get_trace_state_variable_value): New function.
7527         (agent_set_trace_state_variable_value): New function.
7528         (cmd_qtdp): Call gdb_parse_agent_expr (...).
7529         (response_tracepoint): Call gdb_unparse_agent_expr (...).
7530         (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
7531         (condition_true_at_tracepoint): Likewise.
7532         (parse_agent_expr): Rename to ...
7533         (gdb_parse_agent_expr): ... this and move to ax.c.
7534         (unparse_agent_expr): Rename to ...
7535         (gdb_unparse_agent_expr): ... this and move to ax.c.
7536         (gdb_agent_op_name): Move to ax.c.
7537         (eval_agent_expr): Rename to ...
7538         (gdb_eval_agent_expr): ... this, use regcache passed as parameter
7539         and move to ax.c.
7540         (eval_tracepoint_agent_expr): New function.
7541         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
7542         non-static.
7543         (current_insn_ptr, emit_error, struct bytecode_address): Move to
7544         ax.c.
7545         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
7546         emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
7547         emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
7548         emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
7549         emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
7550         emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
7551         emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
7552         emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
7553         (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
7554         (compile_bytecodes): Remove forward declaration.
7555         (is_goto_target): Move to ax.c.
7556         (compile_bytecodes): Move to ax.c and call
7557         agent_get_trace_state_variable_value (...) and
7558         agent_set_trace_state_variable_value (...).
7559
7560         * Makefile.in: Update ax.c and IPA dependencies.
7561
7562 2012-02-24  Pedro Alves  <palves@redhat.com>
7563
7564         * tracepoint.c (cmd_bigqtbuffer): Rename as ...
7565         (cmd_bigqtbuffer_circular): ... this.  Only handle
7566         'QTBuffer:circular:'.
7567         (handle_tracepoint_general_set): Adjust.
7568
7569 2012-02-16  Yao Qi  <yao@codesourcery.com>
7570
7571         * inferiors.c: Move code to ...
7572         * dll.c: .... here.  New.
7573         * server.h: Declare clear_dlls.
7574         * Makefile.in (SFILES): Add dll.c.
7575         (OBS): Add dll.o
7576         (dll.o): New rule.
7577
7578 2012-02-11  Yao Qi  <yao@codesourcery.com>
7579
7580         * server.c: (handle_monitor_command): Add a new parameter
7581         `own_buf'.
7582         (handle_query): Update caller.
7583
7584 2012-02-09  Joel Brobecker  <brobecker@adacore.com>
7585
7586         * configure.ac: Add readlink to AC_CHECK_FUNCS list.
7587         * configure, config.in: Regenerate.
7588         * hostio.c: Provide an alternate implementation if HAVE_READLINK
7589         is not defined.
7590
7591 2012-02-02  Pedro Alves  <palves@redhat.com>
7592
7593         Try SIGKILL first, then PTRACE_KILL.
7594         * linux-low.c (linux_kill_one_lwp): New.
7595         (linux_kill_one_lwp): Rename to ...
7596         (kill_one_lwp_callback): ... this.  Use the new
7597         linux_kill_one_lwp.
7598
7599 2012-02-02  Pedro Alves  <palves@redhat.com>
7600
7601         * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
7602         inferior.
7603
7604 2012-01-27  Pedro Alves  <palves@redhat.com>
7605
7606         * linux-low.c (linux_child_pid_to_exec_file): Delete.
7607         (elf_64_file_p): Make static.
7608         (linux_pid_exe_is_elf_64_file): New.
7609         * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
7610         Delete declarations.
7611         (linux_pid_exe_is_elf_64_file): Declare.
7612         * linux-x86-low.c (x86_arch_setup): Use
7613         linux_pid_exe_is_elf_64_file.
7614
7615 2012-01-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
7616
7617         * linux-low.c (linux_wait_for_event_1): Rename to ...
7618         (linux_wait_for_event): ... here and merge it with former
7619         linux_wait_for_event - new variable wait_ptid, use it.
7620         (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
7621
7622 2012-01-23  Pedro Alves  <palves@redhat.com>
7623
7624         * server.c (main): Avoid yet another case of infinite loop while
7625         detaching/killing after a longjmp.
7626
7627 2012-01-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
7628
7629         Code cleanup.
7630         * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
7631
7632 2012-01-20  Ulrich Weigand  <ulrich.weigand@linaro.org>
7633
7634         * hostio.c (handle_readlink): New function.
7635         (handle_vFile): Call it to handle "vFile:readlink" packets.
7636
7637 2012-01-20  Pedro Alves  <palves@redhat.com>
7638             Ulrich Weigand  <ulrich.weigand@linaro.org>
7639
7640         * server.c (handle_v_requests): Only support vAttach and vRun to
7641         start multiple processes when in extended protocol mode.
7642
7643 2012-01-17  Pedro Alves  <palves@redhat.com>
7644
7645         * tracepoint.c (initialize_tracepoint): Use mmap instead of
7646         memalign plus mprotect to allocate the scratch buffer.
7647
7648 2012-01-13  Pedro Alves  <palves@redhat.com>
7649
7650         * server.c (attach_inferior): Clear `cont_thread'.
7651
7652 2012-01-13  Pedro Alves  <palves@redhat.com>
7653
7654         * server.c (main): Avoid infinite loop while detaching/killing
7655         after a longjmp.
7656
7657 2012-01-09  Doug Evans  <dje@google.com>
7658
7659         * server.c (start_inferior): Set last_ptid in --wrapper case.
7660
7661 2012-01-06  Yao Qi  <yao@codesourcery.com>
7662
7663         * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
7664         defined.
7665         [IN_PROCESS_AGENT] (debug_agent): New global variable.
7666
7667 2012-01-04  Yao Qi  <yao@codesourcery.com>
7668
7669         * tracepoint.c (cmd_qtdp): Print debug message
7670         for static tracepoint.
7671
7672 2012-01-04  Yao Qi  <yao@codesourcery.com>
7673
7674         * tracepoint.c (trace_vdebug): Differentiate debug message
7675         between gdbserver and IPA.
7676
7677 2012-01-03  Yao Qi  <yao@codesourcery.com>
7678
7679         * tracepoint.c (tracepoint_was_hit): Don't collect for
7680         static tracepoint.
7681
7682 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
7683
7684         * terminal.h: Reformat copyright header.
7685
7686 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
7687
7688         * server.c (gdbserver_version): Update copyright year.
7689         * gdbreplay.c (gdbreplay_version): Likewise.
7690
7691 2011-12-18  Jan Kratochvil  <jan.kratochvil@redhat.com>
7692
7693         * linux-low.c (linux_create_inferior): Put empty if clause for write.
7694
7695         Revert:
7696         2011-12-18  Hui Zhu  <teawater@gmail.com>
7697         * linux-low.c (linux_create_inferior): Save return value to ret.
7698
7699 2011-12-18  Hui Zhu  <teawater@gmail.com>
7700
7701         * linux-low.c (linux_create_inferior): Save return value to ret.
7702
7703 2011-12-16  Doug Evans  <dje@google.com>
7704
7705         * linux-low.c (linux_create_inferior): If stdio connection,
7706         redirect stdin from /dev/null, stdout to stderr.
7707         * remote-utils.c (remote_is_stdio): New static global.
7708         (remote_connection_is_stdio): New function.
7709         (remote_prepare): Handle stdio connection.
7710         (remote_open): Ditto.
7711         (remote_close): Don't close stdin for stdio connections.
7712         (read_prim,write_prim): New functions.  Replace all calls to
7713         read/write to these.
7714         * server.c (main): Watch for "-" argument.  Move call to
7715         remote_prepare before start_inferior.
7716         * server.h (STDIO_CONNECTION_NAME): New macro.
7717         (remote_connection_is_stdio): Declare.
7718
7719         * remote-utils.c (prepare_resume_reply): Remove extraneous \n
7720         in debugging output.
7721
7722 2011-12-15  Yao Qi  <yao@codesourcery.com>
7723
7724         * tracepoint.c: Include sys/syscall.h.
7725         (gdb_ust_thread): Remove preprocessor conditional.
7726
7727 2011-12-14  Pedro Alves  <pedro@codesourcery.com>
7728
7729         * linux-low.c (linux_detach_one_lwp): Call
7730         the_low_target.prepare_to_resume before detaching.
7731
7732 2011-12-14  Yao Qi  <yao@codesourcery.com>
7733
7734         * tracepoint.c (gdb_ust_thread): Don't ignore return value
7735         of write.
7736
7737 2011-12-14  Yao Qi  <yao@codesourcery.com>
7738
7739         * i386-low.c (i386_low_stopped_data_address): Initialize local
7740         variable `control'.
7741
7742 2011-12-13  Pedro Alves  <pedro@codesourcery.com>
7743
7744         PR remote/13492
7745
7746         * i386-low.c (i386_low_stopped_data_address): Avoid fetching
7747         DR_CONTROL unless necessary.  Extend comments.
7748         * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
7749         DR0-3 if not used.  If any watchpoint was set, clear DR_STATUS.
7750
7751 2011-12-13  Yao Qi  <yao@codesourcery.com>
7752
7753         * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
7754         macros.
7755         (upload_fast_traceframes, upload_fast_traceframes): Likewise.
7756
7757 2011-12-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
7758
7759         * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
7760         Print new debug message for such case.
7761
7762 2011-12-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
7763
7764         Fix overlapping memcpy.
7765         * mem-break.c (set_raw_breakpoint_at): New variable buf.  Use it for
7766         the read_inferior_memory transfer.
7767         (delete_fast_tracepoint_jump): New variable buf.  Use it for the
7768         write_inferior_memory transfer.
7769         (set_fast_tracepoint_jump): New variable buf.  Use it for the
7770         read_inferior_memory and write_inferior_memory transfers.
7771         (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
7772         (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
7773         Use it for the write_inferior_memory transfer.
7774         (check_mem_read, check_mem_write): New gdb_asserts for overlapping
7775         buffers.
7776
7777 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
7778
7779         * linux-low.c (fetch_register, store_register): Make code
7780         consistent, fix formatting.
7781
7782 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
7783
7784         * linux-low.c (usr_store_inferior_registers): Factor out code
7785         to handle individual registers into...
7786         (store_register): ... this new function.
7787
7788 2011-12-06  Ulrich Weigand  <uweigand@de.ibm.com>
7789
7790         * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
7791         (s390-linux32v2.o, s390-linux32v2.c): Likewise.
7792         (s390-linux64v1.o, s390-linux64v1.c): Likewise.
7793         (s390-linux64v2.o, s390-linux64v2.c): Likewise.
7794         (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
7795         (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
7796         * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
7797         (srv_xmlfiles): Add new XML files.
7798
7799         * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
7800         and <sys/uio.h>.
7801         (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
7802         (init_registers_s390_linux32v1): Add prototype.
7803         (init_registers_s390_linux32v2): Likewise.
7804         (init_registers_s390_linux64v1): Likewise.
7805         (init_registers_s390_linux64v2): Likewise.
7806         (init_registers_s390x_linux64v1): Likewise.
7807         (init_registers_s390x_linux64v2): Likewise.
7808         (s390_num_regs): Increment to 52.
7809         (s390_regmap): Add orig_r2 register.
7810         (s390_num_regs_3264): Increment to 68.
7811         (s390_regmap_3264): Add orig_r2 register.
7812         (s390_collect_ptrace_register): Handle orig_r2 register.
7813         (s390_supply_ptrace_register): Likewise.
7814         (s390_fill_last_break): New function.
7815         (s390_store_last_break): Likewise.
7816         (s390_fill_system_call): New function.
7817         (s390_store_system_call): Likewise.
7818         (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
7819         register sets.
7820         (s390_check_regset): New function.
7821         (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
7822         NT_S390_SYSTEM_CALL regsets and use appropriate description.
7823         Update target_regsets for available register sets.
7824
7825 2011-12-02  Paul Pluzhnikov  <ppluzhnikov@google.com>
7826             Jan Kratochvil  <jan.kratochvil@redhat.com>
7827
7828         * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
7829         (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
7830         New.
7831         (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
7832         * linux-low.h (struct process_info_private): New member r_debug.
7833         * server.c (handle_qxfer_libraries): Call
7834         the_target->qxfer_libraries_svr4.
7835         (handle_qxfer_libraries_svr4): New function.
7836         (qxfer_packets): New entry "libraries-svr4".
7837         (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
7838         * target.h (struct target_ops): New member qxfer_libraries_svr4.
7839         * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
7840         PACKET_qXfer_libraries_svr4.
7841
7842 2011-11-30  Ulrich Weigand  <uweigand@de.ibm.com>
7843
7844         * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
7845         PSW address/mask between 8-byte and 16-byte formats.
7846         (s390_supply_ptrace_register): Likewise.
7847         (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
7848         basic addressing mode bit.
7849
7850 2011-11-24  Stan Shebs  <stan@codesourcery.com>
7851
7852         * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
7853
7854 2011-11-17  Stan Shebs  <stan@codesourcery.com>
7855
7856         * tracepoint.c (struct tracepoint): New field traceframe_usage.
7857         (tracing_start_time): New global.
7858         (tracing_stop_time): New global.
7859         (tracing_user_name): New global.
7860         (tracing_notes): New global.
7861         (tracing_stop_note): New global.
7862         (cmd_qtstart): Set traceframe_usage, start_time.
7863         (stop_tracing): Set stop_time.
7864         (cmd_qtstatus): Report additional status.
7865         (cmd_qtp): New function.
7866         (handle_tracepoint_query): Call it.
7867         (cmd_qtnotes): New function.
7868         (handle_tracepoint_general_set): Call it.
7869         (get_timestamp): Rename from tsv_get_timestamp.
7870
7871 2011-11-14  Stan Shebs  <stan@codesourcery.com>
7872             Kwok Cheung Yeung  <kcy@codesourcery.com>
7873
7874         * linux-x86-low.c (small_jump_insn): New.
7875         (i386_install_fast_tracepoint_jump_pad): Add arguments for
7876         trampoline and error message, build a trampoline and issue a small
7877         jump instruction to it.
7878         (x86_install_fast_tracepoint_jump_pad): Add arguments for
7879         trampoline and error message.
7880         (x86_get_min_fast_tracepoint_insn_len): New.
7881         (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
7882         * linux-low.h (struct linux_target_ops): Add arguments to
7883         install_fast_tracepoint_jump_pad operation, add new operation.
7884         * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
7885         arguments.
7886         (linux_get_min_fast_tracepoint_insn_len): New function.
7887         (linux_target_op): Add new operation.
7888         * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
7889         (gdb_trampoline_buffer_end): Ditto.
7890         (gdb_trampoline_buffer_error): Ditto.
7891         (struct ipa_sym_addresses): Add fields for new IPA variables.
7892         (symbol_list): Add entries for new IPA variables.
7893         (struct tracepoint): Add fields to hold the address range of the
7894         trampoline used by the tracepoint.
7895         (trampoline_buffer_head): New static variable.
7896         (trampoline_buffer_tail): Ditto.
7897         (claim_trampoline_space): New function.
7898         (have_fast_tracepoint_trampoline_buffer): New function.
7899         (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
7900         structure.
7901         (install_fast_tracepoint): Ditto, also add error buffer argument.
7902         (cmd_qtminftpilen): New function.
7903         (handle_tracepoint_query): Add response to qTMinFTPILen packet.
7904         (fast_tracepoint_from_trampoline_address): New function.
7905         (fast_tracepoint_collecting): Handle trampoline as part of jump
7906         pad space.
7907         (set_trampoline_buffer_space): New function.
7908         (initialize_tracepoint): Initialize new IPA variables.
7909         * target.h (struct target_ops): Add arguments to
7910         install_fast_tracepoint_jump_pad operation, add new
7911         get_min_fast_tracepoint_insn_len operation.
7912         (target_get_min_fast_tracepoint_insn_len): New.
7913         (install_fast_tracepoint_jump_pad): Add arguments.
7914         * server.h (IPA_BUFSIZ): Define.
7915         * linux-i386-ipa.c: Include extra header files.
7916         (initialize_fast_tracepoint_trampoline_buffer): New function.
7917         (initialize_low_tracepoint): Call it.
7918         * server.h (set_trampoline_buffer_space): Declare.
7919         (claim_trampoline_space): Ditto.
7920         (have_fast_tracepoint_trampoline_buffer): Ditto.
7921
7922 2011-11-14  Yao Qi  <yao@codesourcery.com>
7923
7924         * server.c (handle_query): Handle InstallInTrace for qSupported.
7925         * tracepoint.c (add_tracepoint): Sort list.
7926         (install_tracepoint, download_tracepoint): New.
7927         (cmd_qtdp): Call them to install and download tracepoints.
7928         (sort_tracepoints): Removed.
7929         (cmd_qtstart): Update.
7930
7931 2011-11-14  Yao Qi  <yao@codesourcery.com>
7932
7933         * mem-break.c (inc_ref_fast_tracepoint_jump): New.
7934         * mem-break.h: Declare.
7935         * tracepoint.c (cmd_qtstart): Move some code to ...
7936         (clone_fast_tracepoint, install_fast_tracepoint): ... here.
7937         New.
7938         (download_tracepoints): Move some code to ...
7939         (download_tracepoint_1): ... here.  New.
7940
7941 2011-11-08  Yao Qi  <yao@codesourcery.com>
7942
7943         * remote-utils.c (relocate_instruction): A comment fix.
7944
7945 2011-11-07  Joel Brobecker  <brobecker@adacore.com>
7946
7947         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
7948         (i386_dr_low_get_control, i386_dr_low_get_status): Use
7949         dr_status_mirror and dr_control_mirror from debug_reg_state.
7950         (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
7951         (i386_initial_stuff): Remove use of deleted globals.
7952         (i386_get_thread_context, i386_set_thread_context,
7953         i386_thread_added): Use dr_status_mirror and dr_control_mirror
7954         from debug_reg_state.
7955
7956 2011-11-05  Yao Qi  <yao@codesourcery.com>
7957
7958         * tracepoint.c (gdb_collect): Loop over tracepoints of same
7959         address as TPOINT's.
7960
7961 2011-11-02  Stan Shebs  <stan@codesourcery.com>
7962
7963         * tracepoint.c (agent_mem_read_string): New function.
7964         (eval_agent_expr): Call it for tracenz.
7965         * server.c (handle_query): Report support for tracenz.
7966
7967 2011-11-02  Yao Qi  <yao@codesourcery.com>
7968
7969         * tracepoint.c (cmd_qtstart): Remove unused local variables.
7970
7971 2011-11-02  Yao Qi  <yao@codesourcery.com>
7972
7973         * target.h: Fix a typo in comment.
7974
7975 2011-10-31  Pedro Alves  <pedro@codesourcery.com>
7976
7977         * mem-break.c (check_mem_write): Add `myaddr' parameter.  Don't
7978         clobber the breakpoints' shadows with fast tracepoint jumps.
7979         * mem-break.h (check_mem_write): Add `myaddr' parameter.
7980         * target.c (write_inferior_memory): Also pass MYADDR down to
7981         check_mem_write.
7982
7983 2011-10-07  Ulrich Weigand  <ulrich.weigand@linaro.org>
7984
7985         * configure.ac: Check support for personality routine.
7986         * configure: Regenerate.
7987         * config.in: Likewise.
7988         * linux-low.c: Include <sys/personality.h>.
7989         Define ADDR_NO_RANDOMIZE if necessary.
7990         (linux_create_inferior): Disable address space randomization when
7991         forking inferior, if requested.
7992         (linux_supports_disable_randomization): New function.
7993         (linux_target_ops): Install it.
7994         * server.h (disable_randomization): Declare.
7995         * server.c (disable_randomization): New global variable.
7996         (handle_general_set): Handle QDisableRandomization.
7997         (handle_query): Likewise for qSupported.
7998         (main): Support --disable-randomization and --no-disable-randomization
7999         command line arguments.
8000         * target.h (struct target_ops): Add supports_disable_randomization.
8001         (target_supports_disable_randomization): New macro.
8002
8003 2011-09-29  Mike Frysinger  <vapier@gentoo.org>
8004
8005         * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
8006         ifdef check.
8007         [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
8008         [!PT_GETDSBT] (target_loadmap): New definition.
8009         (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
8010         (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
8011         LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
8012         and PT_GETDSBT to LINUX_LOADMAP.
8013         [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
8014         (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
8015
8016 2011-09-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
8017
8018         * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
8019         (arm_linux_hwbp_cap): New static variable.
8020         (arm_linux_get_hwbp_cap): Replace by ...
8021         (arm_linux_init_hwbp_cap): ... this new function.
8022         (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
8023         (arm_linux_get_hw_watchpoint_count): Likewise.
8024         (arm_linux_get_hw_watchpoint_max_length): Likewise.
8025         (arm_arch_setup): Call arm_linux_init_hwbp_cap.
8026         (arm_prepare_to_resume): Use perror_with_name instead of error.
8027
8028 2011-09-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
8029
8030         * linux-arm-low.c: Include <signal.h>.
8031         (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
8032         (struct arm_linux_hwbp_cap): New data type.
8033         (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
8034         (struct arm_linux_hw_breakpoint): New data type.
8035         (MAX_BPTS, MAX_WPTS): Define.
8036         (struct arch_process_info, struct arch_lwp_info): New data types.
8037         (arm_linux_get_hwbp_cap): New function.
8038         (arm_linux_get_hw_breakpoint_count): Likewise.
8039         (arm_linux_get_hw_watchpoint_count): Likewise.
8040         (arm_linux_get_hw_watchpoint_max_length): Likewise.
8041         (arm_hwbp_control_initialize): Likewise.
8042         (arm_hwbp_control_is_enabled): Likewise.
8043         (arm_hwbp_control_is_initialized): Likewise.
8044         (arm_hwbp_control_disable): Likewise.
8045         (arm_linux_hw_breakpoint_equal): Likewise.
8046         (arm_linux_hw_point_initialize): Likewise.
8047         (struct update_registers_data): New data structure.
8048         (update_registers_callback: New function.
8049         (arm_insert_point): Likewise.
8050         (arm_remove_point): Likewise.
8051         (arm_stopped_by_watchpoint): Likewise.
8052         (arm_stopped_data_address): Likewise.
8053         (arm_new_process): Likewise.
8054         (arm_new_thread): Likewise.
8055         (arm_prepare_to_resume): Likewise.
8056         (the_low_target): Register arm_insert_point, arm_remove_point,
8057         arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
8058         arm_new_thread, and arm_prepare_to_resume.
8059
8060 2011-09-15  Stan Shebs  <stan@codesourcery.com>
8061
8062         * server.h (struct emit_ops): Add compare-goto fields.
8063         * tracepoint.c (gdb_agent_op_sizes): New table.
8064         (emit_eq_goto): New function.
8065         (emit_ne_goto): New function.
8066         (emit_lt_goto): New function.
8067         (emit_le_goto): New function.
8068         (emit_gt_goto): New function.
8069         (emit_ge_goto): New function.
8070         (is_goto_target): New function.
8071         (compile_bytecodes): Recognize special cases of compare-goto
8072         combinations and call specialized emitters for them.
8073         * linux-x86-low.c (amd64_emit_eq_goto): New function.
8074         (amd64_emit_ne_goto): New function.
8075         (amd64_emit_lt_goto): New function.
8076         (amd64_emit_le_goto): New function.
8077         (amd64_emit_gt_goto): New function.
8078         (amd64_emit_ge_goto): New function.
8079         (amd64_emit_ops): Add the new functions.
8080         (i386_emit_eq_goto): New function.
8081         (i386_emit_ne_goto): New function.
8082         (i386_emit_lt_goto): New function.
8083         (i386_emit_le_goto): New function.
8084         (i386_emit_gt_goto): New function.
8085         (i386_emit_ge_goto): New function.
8086         (i386_emit_ops): Add the new functions.
8087
8088 2011-09-08  Stan Shebs  <stan@codesourcery.com>
8089
8090         * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8091         (i386_emit_epilogue): Restore %ebx.
8092
8093 2011-08-31  Jie Zhang  <jzhang918@gmail.com>
8094
8095         * server.c (step_thread): Remove definition.
8096         (process_serial_event): Don't handle Hs.
8097         * server.h (step_thread): Remove declaration.
8098         * target.c (set_desired_inferior): Remove use of step_thread.
8099
8100 2011-08-24  Luis Machado  <lgustavo@codesourcery.com>
8101
8102         * linux-low.c: Include linux-procfs.h.
8103         (linux_attach_lwp_1): Update comments.
8104         (linux_attach): Scan for existing threads when attaching to a
8105         process that is the tgid.
8106         * Makefile.in: Update dependencies.
8107
8108 2011-08-24  Luis Machado  <lgustavo@codesourcery.com>
8109
8110         * configure.srv: Add linux-procfs.o dependencies.
8111
8112 2011-08-14  Yao Qi  <yao@codesourcery.com>
8113
8114         * target.h (struct target_ops): Fix indent.
8115         * win32-low.c (win32_target_ops): Fix comment.
8116
8117 2011-08-14  Andrew Jenner  <andrew@codesourcery.com>
8118             Yao Qi  <yao@codesourcery.com>
8119
8120         * Makefile.in (clean): Remove tic6x-*.c files.
8121         (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
8122         (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
8123         (tic6x-c64xp-linux.c): Likewise.
8124         * configure.srv: Add support for tic6x-*-uclinux.
8125         * linux-tic6x-low.c: New.
8126         * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
8127
8128 2011-08-14  Andrew Stubbs <ams@codesourcery.com>
8129             Yao Qi  <yao@codesourcery.com>
8130
8131         * target.h (struct target_ops): Add read_loadmap.
8132         * linux-low.c (struct target_loadseg): New type.
8133         (struct target_loadmap): New type.
8134         (linux_read_loadmap): New function.
8135         (linux_target_ops): Add linux_read_loadmap.
8136         * server.c (handle_query): Support qXfer:fdpic:read packet.
8137         * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
8138         to NULL.
8139
8140 2011-08-05  Eli Zaretskii  <eliz@gnu.org>
8141
8142         * win32-low.c: Include <stdint.h>.
8143
8144 2011-07-22  Pedro Alves  <pedro@codesourcery.com>
8145
8146         * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
8147         to the inferior here.
8148         (i386_remove_aligned_watchpoint): Ditto.
8149         (i386_handle_nonaligned_watchpoint): Return immediate on fail to
8150         fit part of the watchpoint in the debug registers.
8151         (i386_update_inferior_debug_regs): New.
8152         (i386_low_insert_watchpoint): Work on a local mirror of the debug
8153         registers, and only update the inferior on success.
8154         (i386_low_remove_watchpoint): Ditto.
8155
8156 2011-07-22  Kwok Cheung Yeung  <kcy@codesourcery.com>
8157
8158         * linux-low.c (compare_ints, unique, list_threads, show_process,
8159         linux_core_of_thread): Delete.
8160         (linux_target_ops): Change linux_core_of_thread to
8161         linux_common_core_of_thread.
8162         (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
8163         * utils.c (malloc_failure): Change type of argument.
8164         (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
8165         * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
8166         common/linux-osdata.c, common/ptid.c and common/buffer.c.
8167         (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
8168         (IPA_OBJS): Add common-utils-ipa.o.
8169         (ptid_h, linux_osdata_h): New macros.
8170         (server_h): Add common/common-utils.h, common/xml-utils.h,
8171         common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
8172         common/ptid.h.
8173         (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
8174         ptid.o, buffer.o): New rules.
8175         (linux-low.o): Add common/linux-osdata.h as a dependency.
8176         * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
8177         * configure.ac: Add AC_HEADER_DIRENT check.
8178         * config.in: Regenerate.
8179         * configure: Regenerate.
8180         * remote-utils.c (xml_escape_text): Delete.
8181         (buffer_grow, buffer_free, buffer_init, buffer_finish,
8182         buffer_xml_printf): Move to common/buffer.c.
8183         * server.c (main): Remove call to initialize_inferiors.
8184         * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
8185         ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
8186         ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
8187         internal_error, gdb_assert, gdb_assert_fail): Delete.
8188         (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
8189         buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
8190         common/buffer.h.
8191         * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
8192         ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
8193         initialize_inferiors): Delete.
8194
8195 2011-07-20  Pedro Alves  <pedro@codesourcery.com>
8196
8197         * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
8198         symbol error.
8199
8200 2011-05-31  Pedro Alves  <pedro@codesourcery.com>
8201
8202         * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
8203         assertion.
8204         * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
8205
8206 2011-05-26  Yao Qi  <yao@codesourcery.com>
8207
8208         * Makefile.in (thread-db.o): Track dependence to
8209         common/gdb_thread_db.h.
8210         * thread-db.c: include gdb_thread_db.h from right place.
8211
8212 2011-05-16  Adrian Cornish  <gnu@bluedreamer.com>
8213
8214         * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
8215         __FILE__ and __LINE__ to internal_error.
8216
8217 2011-05-13  Doug Evans  <dje@google.com>
8218
8219         * thread-db.c (try_thread_db_load_from_sdir): New function.
8220         (try_thread_db_load_from_dir): New function.
8221         (thread_db_load_search): Handle $sdir, ignore $pdir.
8222         Remove trying of system directories if search of
8223         libthread-db-search-path fails, that is now done via $sdir.
8224
8225 2011-05-12  Kwok Cheung Yeung  <kcy@codesourcery.com>
8226
8227         * server.c (handle_query): Add EnableDisableTracepoints to the list
8228         of supported features.
8229         * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
8230         tracepoints.
8231         (cmd_qtenable_disable): New.
8232         (cmd_qtstart): Install tracepoints even if disabled.
8233         (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
8234         receiving a QTEnable or QTDisable packet.
8235         (gdb_collect): Skip data collection if fast tracepoint is disabled.
8236         (ust_marker_to_static_tracepoint): Do not ignore disabled static
8237         tracepoints.
8238         (gdb_probe): Skip data collection if static tracepoint is disabled.
8239
8240 2011-05-10  Doug Evans  <dje@google.com>
8241
8242         * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
8243
8244 2011-05-04  Doug Evans  <dje@google.com>
8245
8246         * linux-low.c (linux_join): Skip process lookup.
8247         * spu-low.c (spu_join): Ditto.
8248         * server.c (join_inferiors_callback): Delete.
8249         (process_serial_event): For 'D' packet (detach) call join_inferior
8250         directly.
8251
8252 2011-05-04  Joseph Myers  <joseph@codesourcery.com>
8253
8254         * README: Don't mention xscale*-*-linux*.
8255         * configure.srv (xscale*-*-linux*): Don't handle target.
8256
8257 2011-04-27  Nathan Froyd  <froydnj@codesourcery.com>
8258
8259         * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
8260         casting pointers.
8261         (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
8262         (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
8263         (i386_emit_void_call_2): Likewise.
8264
8265 2011-04-26  Yao Qi  <yao@codesourcery.com>
8266
8267         * linux-low.c: Move common macros to linux-ptrace.h.
8268         Include linux-ptrace.h.
8269         * Makefile.in (linux_ptrace_h): New.
8270         (linux-low.o): Depends on linux-ptrace.h.
8271
8272 2011-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
8273
8274         * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
8275         RUN_ONCE.  Comment for the LISTEN_DESC delete_file_handler call.
8276         (remote_prepare): New function with most of the TCP code from ...
8277         (remote_open): ... here.  Detect PORT here unconditionally.  Move also
8278         setting transport_is_reliable.
8279         * server.c (run_once): New variable.
8280         (gdbserver_usage): Document it.
8281         (main): Set run_once for `--once'.  Call remote_prepare.  Exit after
8282         the first run if RUN_ONCE.
8283         * server.h (run_once, remote_prepare): New declarations.
8284
8285 2011-04-19  Tom Tromey  <tromey@redhat.com>
8286
8287         * win32-low.c (handle_load_dll): Remove duplicate "the".
8288
8289 2011-04-07  Pierre Muller  <muller@ics.u-strasbg.fr>
8290
8291         Remove support for old Cygwin 1.5 versions.
8292         * win32-low.c (win32_create_inferior): Use new cygwin_path_list
8293         function to avoid warning.
8294         (win32_add_one_solib): Use cygwin_conv_path function to avoid
8295         warning.
8296
8297 2011-03-18  Pierre Muller  <muller@ics.u-strasbg.fr>
8298
8299         * gdbserver/server.h (Macro _): Define it if not available.
8300
8301 2011-03-14  Michael Snyder  <msnyder@vmware.com>
8302
8303         * hostio.c (handle_close): Remove unnecessary null test.
8304
8305 2011-03-10  Joel Brobecker  <brobecker@adacore.com>
8306
8307         * Makefile.in (maintainer-clean realclean distclean): Remove
8308         "make ...  subdir_do" command.
8309
8310 2011-03-10  Michael Snyder  <msnyder@vmware.com>
8311
8312         * tracepoint.c (tracepoint_finish_step): Fix loop variable.
8313
8314         * server.c (handle_v_run): Free alloced buffer on early return.
8315
8316 2011-03-09  Yao Qi  <yao@codesourcery.com>
8317
8318         Revert:
8319         2011-03-04  Yao Qi  <yao@codesourcery.com>
8320
8321         * Makefile.in: Remove GNU make feature --directory.
8322
8323         2011-03-05  Yao Qi  <yao@codesourcery.com>
8324
8325         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8326         (subdir_do): New make target.  Copied from gdb/Makefile.
8327         (maintainer-clean, realclean, distclean, clean): Call corresponding
8328         make targets in common/Makefile.
8329
8330         2011-02-11  Yao Qi  <yao@codesourcery.com>
8331
8332         * configure.ac: Call AC_PROG_RANLIB.
8333         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
8334         * configure: Regenerate.
8335
8336 2011-03-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
8337
8338         * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
8339
8340 2011-03-06  Yao Qi  <yao@codesourcery.com>
8341
8342         * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
8343
8344 2011-03-05  Yao Qi  <yao@codesourcery.com>
8345
8346         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8347         (subdir_do): New make target.  Copied from gdb/Makefile.
8348         (maintainer-clean, realclean, distclean, clean): Call corresponding
8349         make targets in common/Makefile.
8350
8351 2011-03-04  Yao Qi  <yao@codesourcery.com>
8352
8353         * Makefile.in: Remove GNU make feature --directory.
8354
8355 2011-03-04  Michael Snyder  <msnyder@vmware.com>
8356
8357         * server.c (queue_stop_reply): Call xmalloc not malloc.
8358
8359 2011-03-02  Michael Snyder  <msnyder@vmware.com>
8360
8361         * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
8362
8363 2011-02-28  Michael Snyder  <msnyder@vmware.com>
8364
8365         * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
8366         (cmd_qtframe): Ditto.
8367         (cmd_qtbuffer): Ditto.
8368         (cmd_bigqtbuffer): Ditto.
8369
8370         * utils.c (decimal2str): Initialize 'width' to nine, then
8371         don't mess with it.
8372
8373 2011-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
8374
8375         * hostio.c (require_data): Free *data, not data.
8376
8377 2011-02-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
8378
8379         * hostio.c (require_data): Use free, not xfree.
8380
8381 2011-02-27  Michael Snyder  <msnyder@vmware.com>
8382
8383         * server.c (handle_query): Discard unused value.
8384
8385         * hostio.c (require_data): Free malloc memory before returning
8386         error.
8387
8388 2011-02-26  Michael Snyder  <msnyder@vmware.com>
8389
8390         * linux-low.c (list_threads): Call closedir for dirent.
8391
8392 2011-02-27  Michael Snyder  <msnyder@vmware.com>
8393
8394         * i386-low.c (i386-length_and_rw_bits): Comment the fact that
8395         a case statement falls through.
8396
8397         * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
8398
8399         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
8400         in comparison.
8401
8402 2011-02-26  Michael Snyder  <msnyder@vmware.com>
8403
8404         * utils.c (decimal2str): Eliminate dead code and dead param.
8405         (pulongest): Drop dead param from call to decimal2str.
8406         (plongest): Ditto.
8407
8408 2011-02-24  Joel Brobecker  <brobecker@adacore.com>
8409
8410         Revert the following patch (not approved yet):
8411         2011-02-21  Hui Zhu  <teawater@gmail.com>
8412         * tracepoint.c (tp_printf): New function.
8413         (eval_agent_expr): Handle gdb_agent_op_printf.
8414
8415 2011-02-21  Hui Zhu  <teawater@gmail.com>
8416
8417         * tracepoint.c (tp_printf): New function.
8418         (eval_agent_expr): Handle gdb_agent_op_printf.
8419
8420 2011-02-18  Tom Tromey  <tromey@redhat.com>
8421
8422         * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
8423         (tracepoint.o): Likewise.
8424         * tracepoint.c (enum gdb_agent_op): Use ax.def.
8425         (gdb_agent_op_names): Likewise.
8426
8427 2011-02-18  Tom Tromey  <tromey@redhat.com>
8428
8429         * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
8430         gdb_agent_op_rot>: New constants.
8431         (gdb_agent_op_names): Add pick and roll.
8432         (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
8433         cases.
8434
8435 2011-02-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
8436
8437         * aclocal.m4: Regenerated with aclocal-1.11.1.
8438
8439 2011-02-14  Pedro Alves  <pedro@codesourcery.com>
8440
8441         * server.c (handle_qxfer_traceframe_info): New.
8442         (qxfer_packets): Register "traceframe-info".
8443         (handle_query): Report support for qXfer:traceframe-info:read+.
8444         * tracepoint.c (match_blocktype): New.
8445         (traceframe_find_block_type): Rename to ...
8446         (traceframe_walk_blocks): ... this.  Add callback filter argument,
8447         and use it.
8448         (traceframe_find_block_type): New, reimplemented on top of
8449         traceframe_walk_blocks.
8450         (build_traceframe_info_xml): New.
8451         (traceframe_read_info): New.
8452         * server.h (traceframe_read_info): Declare.
8453
8454 2011-02-11  Yao Qi  <yao@codesourcery.com>
8455
8456         * configure.ac: Call AC_PROG_RANLIB.
8457         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
8458         * configure: Regenerate.
8459
8460 2011-02-07  Pedro Alves  <pedro@codesourcery.com>
8461
8462         * server.c (gdb_read_memory): Change return semantics to allow
8463         partial transfers.
8464         (handle_search_memory_1): Adjust.
8465         (process_serial_event) <'m' packet>: Handle partial transfers.
8466         * tracepoint.c (traceframe_read_mem): Handle partial transfers.
8467
8468 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
8469
8470         * regcache.c (init_register_cache): Initialize
8471         regcache->register_status.
8472         (free_register_cache): Release regcache->register_status.
8473         (regcache_cpy): Copy register_status.
8474         (registers_to_string): Print 'x's for unavailable registers.
8475         (supply_register): Mark the register's status valid or
8476         unavailable, depending on whether a buffer was passed in or not.
8477         (supply_register_zeroed): New.
8478         (supply_regblock): Mark the registers' status valid or
8479         unavailable, depending on whether a buffer was passed in or not.
8480         * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
8481         (struct regcache): New `register_status' field.
8482         (supply_register_zeroed): Declare.
8483         * i387-fp.c (i387_xsave_to_cache): Zero out registers using
8484         supply_register_zeroed, rather than passing a NULL buffer to
8485         supply_register.
8486         * tracepoint.c (fetch_traceframe_registers): Update comment.
8487
8488 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
8489
8490         * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
8491         buffer explicit.
8492
8493 2011-01-25  Pedro Alves  <pedro@codesourcery.com>
8494
8495         * server.h (decode_xfer_write): Change prototype.
8496         * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
8497         and don't extract the annex here.
8498         * server.c (decode_xfer_read): Remove `annex' parameter,
8499         and don't extract the annex here.
8500         (decode_xfer): New.
8501         (struct qxfer): New.
8502         (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
8503         (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
8504         (handle_qxfer_statictrace): New functions, abstracted out from
8505         handle_query, and made to use the struct qxfer interface.
8506         (handle_threads_qxfer_proper): Rename to ...
8507         (handle_qxfer_threads_proper): ... this.
8508         (handle_threads_qxfer): Rename to ...
8509         (handle_qxfer_threads): ... this.  Adjust.
8510         (qxfer_packets): New array.
8511         (handle_qxfer): New function.
8512         (handle_query): Use handle_qxfer.
8513
8514 2011-01-05  Michael Snyder  <msnyder@msnyder-server.eng.vmware.com>
8515
8516         * gdbreplay.c: Shorten lines of >= 80 columns.
8517         * linux-low.c: Ditto.
8518         * linux-ppc-low.c: Ditto.
8519         * linux-s390-low.c: Ditto.
8520         * linux-sparc-low.c: Ditto.
8521         * linux-x86-low.c: Ditto.
8522         * linux-xtensa-low.c: Ditto.
8523         * mem-break.c: Ditto.
8524         * nto-low.c: Ditto.
8525         * regcache.h: Ditto.
8526         * remote-utils.c: Ditto.
8527         * server.c: Ditto.
8528         * server.h: Ditto.
8529         * thread-db.c: Ditto.
8530         * tracepoint.c: Ditto.
8531         * utils.c: Ditto.
8532         * win32-low.h: Ditto.
8533
8534 2011-01-05  Joel Brobecker  <brobecker@adacore.com>
8535
8536         * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
8537         update.
8538
8539 2011-01-01  Joel Brobecker  <brobecker@adacore.com>
8540
8541         * server.c (gdbserver_version): Update copyright year in version
8542         output.
8543         * gdbreplay.c (gdbreplay_version): Ditto.
8544
8545 2010-12-29  Jie Zhang  <jie.zhang@analog.com>
8546
8547         * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
8548         * linux-bfin-low.c: New file.
8549         * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
8550         PT_DATA_ADDR for BFIN targets.
8551         * Makefile.in (SFILES): Add linux-bfin-low.c.
8552         (clean): Remove reg-bfin.c.
8553         (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
8554         * README: Mention supported Blackfin targets.
8555
8556 2010-12-23  Mike Frysinger  <vapier@gentoo.org>
8557
8558         * .gitignore: New file.
8559
8560 2010-11-16  Mike Frysinger  <vapier@gentoo.org>
8561
8562         * linux-low.c (linux_tracefork_child): Add char* cast to arg.
8563
8564 2010-10-22  Jie Zhang  <jie@codesourcery.com>
8565
8566         * Makefile.in: Add FLAGS_TO_PASS variable.
8567         (install): Remove dependency of install-only and recursively
8568         invoke make for install-only.
8569
8570 2010-10-04  Doug Evans  <dje@google.com>
8571
8572         * Makefile.in (uninstall): Use $(DESTDIR).
8573
8574 2010-09-24  Pedro Alves  <pedro@codesourcery.com>
8575
8576         PR gdb/11842
8577
8578         * linux-x86-low.c (compat_siginfo_from_siginfo)
8579         (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
8580         si_code is < 0.  Check for si_code == SI_TIMER before checking for
8581         si_code < 0.
8582
8583 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
8584
8585         * lynx-i386-low.c: New file.
8586         * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
8587
8588 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
8589
8590         * lynx-low.c (ptrace_request_to_str): Remove handling for
8591         request values that have been removed in LynxOS 5.x.
8592
8593 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
8594
8595         * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
8596         <ptrace.h>
8597
8598 2010-09-09  Nathan Sidwell  <nathan@codesourcery.com>
8599
8600         * configure.ac: Add --enable-inprocess-agent option.
8601         * configure: Rebuilt.
8602
8603 2010-09-06  Yao Qi  <yao@codesourcery.com>
8604
8605         * linux-low.c (linux_kill): Remove unused variable.
8606         (linux_stabilize_threads): Likewise.
8607         * server.c (start_inferior): Likewise.
8608         (queue_stop_reply_callback): Likewise.
8609         * tracepoint.c (do_action_at_tracepoint): Likewise.
8610
8611 2010-09-06  Yao Qi  <yao@codesourcery.com>
8612
8613         * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
8614         on return.
8615
8616 2010-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
8617
8618         * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
8619
8620 2010-09-06  Pedro Alves  <pedro@codesourcery.com>
8621
8622         * Makefile.in (install-only): Replace $IPA_DEPFILES with
8623         "$(IPA_DEPFILES)".
8624
8625 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
8626
8627         * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
8628         gdbserver/lynx-ppc-low.c: New files.
8629         * Makefile.in (lynx_low_h): New variable.
8630         (lynx-low.o, lynx-ppc-low.o): New rules.
8631         * configure.ac: On LynxOS, link with -lnetinet.
8632         * configure.srv: Add handling of powerpc-*-lynxos* targets.
8633         * configure: regenerate.
8634
8635 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
8636
8637         * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
8638         * configure.ac: Add check for vasprintf and vsnprintf.
8639         * configure, config.in: Regenerate.
8640         * server.h (vasprintf, vsnprintf): Add conditional declarations.
8641
8642 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
8643
8644         * gdbreplay.c: Move include of alloca.h up, next to include of
8645         malloc.h.
8646         * server.h: Add include of malloc.h.
8647         * mem-break.c: Remove include of malloc.h.
8648         * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
8649
8650 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
8651
8652         * Makefile.in (memmem.o): Build with -Wno-error.
8653
8654 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
8655
8656         * utils.c (xsnprintf): Make non-static.
8657         * server.h: Add xsnprintf declaration.
8658         * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
8659         replace calls to snprintf by calls to xsnprintf throughout.
8660
8661 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
8662
8663         * configure.ac: Add configure check for alloca.
8664         * configure, config.in: Regenerate.
8665         * server.h: Include alloca.h if it exists.
8666         * gdbreplay.c: Include alloca.h if it exists.
8667
8668 2010-08-28  Pedro Alves  <pedro@codesourcery.com>
8669
8670         * linux-low.c (__SIGRTMIN): Define if not already defined.
8671         (linux_create_inferior): Check for __ANDROID__ rather than
8672         __SIGRTMIN.
8673         (enqueue_one_deferred_signal): Don't requeue non-RT signals that
8674         are already deferred.
8675         (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
8676         (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
8677         stopped and already has a pending signal to report.
8678         (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
8679         a pending signal to report or is moving out of a jump pad.
8680         (linux_init_signals): Check for __ANDROID__ rather than
8681         __SIGRTMIN.
8682
8683 2010-08-28  Pedro Alves  <pedro@codesourcery.com>
8684
8685         * linux-low.c (linux_stabilize_threads): Wrap debug output in a
8686         debug_threads check.  Avoid a linear search when not doing debug
8687         output.
8688
8689 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
8690
8691         * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
8692         (struct gdb_event) <fd>: Change type to gdb_fildes_t.
8693         (struct file_handler) <fd>: Change type to gdb_fildes_t.
8694         (process_event): Change local fd's type to gdb_fildes_t.
8695         (create_file_handler): Adjust prototype.
8696         (delete_file_handler): Adjust prototype.
8697         (handle_file_event): Adjust prototype.  Use pfildes.
8698         (create_file_event): Adjsut prototype.
8699         * remote-utils.c (remote_desc, listen_desc): Change type to
8700         gdb_fildes_t.
8701         * server.h: New gdb_fildes_t typedef.
8702         [USE_WIN32API]: Include winsock2.h.
8703         (delete_file_handler, add_file_handler): Adjust prototypes.
8704         (pfildes): Declare.
8705         * utils.c (pfildes): New.
8706
8707 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
8708
8709         * configure.ac (build_warnings): Add -Wno-char-subscripts.
8710         * configure: Regenerate.
8711
8712 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
8713
8714         * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
8715         (linux_done_accessing_memory): ... this.
8716         (linux_target_ops): Adjust.
8717         * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
8718         * nto-low.c (nto_target_ops): Adjust comment.
8719         * server.c (gdb_read_memory, gdb_write_memory): Adjust.
8720         * spu-low.c (spu_target_ops): Adjust comment.
8721         * target.h (target_ops): Rename unprepare_to_access_memory field
8722         to done_accessing_memory.
8723         (unprepare_to_access_memory): Rename to ...
8724         (done_accessing_memory): ... this.
8725
8726 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
8727
8728         * linux-low.c (linux_prepare_to_access_memory): New.
8729         (linux_unprepare_to_access_memory): New.
8730         (linux_target_ops): Install them.
8731         * server.c (read_memory): Rename to ...
8732         (gdb_read_memory): ... this.  Use
8733         prepare_to_access_memory/prepare_to_access_memory.
8734         (write_memory): Rename to ...
8735         (gdb_write_memory): ... this.  Use
8736         prepare_to_access_memory/prepare_to_access_memory.
8737         (handle_search_memory_1): Adjust.
8738         (process_serial_event): Adjust.
8739         * target.h (struct target_ops): New fields
8740         prepare_to_access_memory and unprepare_to_access_memory.
8741         (prepare_to_access_memory, unprepare_to_access_memory): New.
8742         * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
8743         prepare_to_access_memory/prepare_to_access_memory.
8744         * nto-low.c (nto_target_ops): Adjust.
8745         * spu-low.c (spu_target_ops): Adjust.
8746         * win32-low.c (win32_target_ops): Adjust.
8747
8748 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
8749
8750         * Makefile.in (WARN_CFLAGS): Get it from configure.
8751         (WERROR_CFLAGS): New.
8752         (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
8753         * configure.ac: Introduce --enable-werror, which adds -Werror to
8754         the compiler command line.  Enabled by default.  Disable with
8755         --disable-werror.  Add -Wdeclaration-after-statement
8756         Wpointer-arith and -Wformat-nonliteral to warning flags.
8757         * configure: Regenerate.
8758
8759 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
8760
8761         * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
8762
8763 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
8764
8765         * gdbreplay.c (remote_error): New.
8766         (gdbchar): New.
8767         (expect): Use gdbchar.  Check for error reading from GDB.
8768         Clarify sync error output.
8769         (play): Check for errors writing to GDB.
8770         * linux-low.c (sigchld_handler): Really ignore `write' errors.
8771         * remote-utils.c (getpkt): Check for errors writing to the remote
8772         descriptor.
8773
8774 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
8775
8776         * linux-low.c (linux_wait_1): Move non-debugging code out of
8777         `debug_threads' control.
8778
8779 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
8780
8781         * linux-low.c (linux_wait_1): Don't set last_status here.
8782         * server.c (push_event, queue_stop_reply_callback): Assert we're
8783         not pushing a TARGET_WAITKIND_IGNORE event.
8784         (start_inferior, start_inferior, attach_inferior, handle_v_cont)
8785         (myresume, handle_target_event): Set the thread's last_resume_kind
8786         and last_status from the target returned status.
8787
8788 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
8789
8790         PR threads/10729
8791
8792         * linux-x86-low.c (update_debug_registers_callback): New.
8793         (i386_dr_low_set_addr): Use it.
8794         (i386_dr_low_get_addr): New.
8795         (i386_dr_low_set_control): Use update_debug_registers_callback.
8796         (i386_dr_low_get_control): New.
8797         (i386_dr_low_get_status): Adjust.
8798         * linux-low.c (linux_stop_lwp): New.
8799         * linux-low.h (linux_stop_lwp): Declare.
8800
8801         * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
8802         argument instead of a i386_debug_reg_state.
8803         (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
8804         a i386_debug_reg_state.
8805         (i386_insert_aligned_watchpoint): Adjust.
8806         (i386_remove_aligned_watchpoint): Adjust.
8807         (i386_low_stopped_data_address): Read the debug registers from the
8808         inferior instead of from the mirrors.
8809         * i386-low.h (struct i386_debug_reg_state): Extend comment.
8810         (i386_dr_low_get_addr): Declare.
8811         (i386_dr_low_get_control): Declare.
8812         (i386_dr_low_get_status): Change prototype.
8813
8814         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
8815         (i386_dr_low_get_addr): New.
8816         (i386_dr_low_get_control): New.
8817         (i386_dr_low_get_status): Adjust prototype.  Return
8818         dr_status_mirror.
8819         (i386_initial_stuff): Clear dr_status_mirror and
8820         dr_control_mirror.
8821         (i386_get_thread_context): Adjust.
8822         (i386_set_thread_context): Adjust.
8823         (i386_thread_added): Adjust.
8824
8825 2010-08-24  Pedro Alves  <pedro@codesourcery.com>
8826
8827         * linux-low.h (linux_thread_area): Delete declaration.
8828
8829 2010-08-11  Thomas Schwinge  <thomas@codesourcery.com>
8830
8831         * linux-low.c (linux_wait_1): Correctly return the ptid of the child
8832         after its termination.
8833
8834 2010-08-09  Pedro Alves  <pedro@codesourcery.com>
8835
8836         * linux-low.c (gdb_wants_lwp_stopped): Delete.
8837         (gdb_wants_all_stopped): Delete.
8838         (linux_wait_1): Don't call them.
8839         * server.c (handle_v_cont): Tag all threads as want-stopped.
8840         (gdb_wants_thread_stopped): Fix comments.  Tag the thread that
8841         stopped as "client-wants-stopped".
8842
8843 2010-07-31  Pedro Alves  <pedro@codesourcery.com>
8844
8845         * Makefile.in (signals_h): New.
8846         (server_h): Depend on it.
8847         (server.o): Don't depend on $(signals_def).
8848         (signals.o): Depend on $(signals_def).
8849
8850 2010-07-31  Jan Kratochvil  <jan.kratochvil@redhat.com>
8851
8852         * Makefile.in (signals_def): New.
8853         (server_h): Append include/gdb/signals.h and signals_def.
8854         (server.o): Append signals_def.
8855
8856 2010-07-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
8857
8858         * server.c (handle_target_event): Use target_signal_to_host for
8859         resume_info.sig initialization.
8860         * target.h (struct thread_resume) <sig>: New comment.
8861
8862 2010-07-20  Ozkan Sezer  <sezeroz@gmail.com>
8863
8864         * server.c (handle_query): strcpy() the returned string from paddress()
8865         instead of sprintf().
8866         * utils.c (paddress): Return phex_nz().
8867
8868 2010-07-07  Joel Brobecker  <brobecker@adacore.com>
8869
8870         * server.c (handle_v_cont): Call mourn_inferior if process
8871         just exited.
8872         (myresume): Likewise.
8873
8874 2010-07-01  Pedro Alves  <pedro@codesourcery.com>
8875
8876         Static tracepoints, and integration with UST.
8877
8878         * configure.ac: Handle --with-ust.  substitute ustlibs and ustinc.
8879         * mem-break.c (uninsert_all_breakpoints)
8880         (reinsert_all_breakpoints): New.
8881         * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
8882         * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
8883         (gdb_agent_ust_loaded, helper_thread_id)
8884         (gdb_agent_helper_thread_id): New macros.
8885         (struct ipa_sym_addresses): Add addr_ust_loaded,
8886         addr_helper_thread_id, addr_cmd_buf.
8887         (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
8888         (in_process_agent_loaded_ust): New.
8889         (write_e_ust_not_loaded): New.
8890         (maybe_write_ipa_ust_not_loaded): New.
8891         (struct collect_static_trace_data_action): New.
8892         (enum tracepoint_type) <static_tracepoint>: New.
8893         (struct tracepoint) <handle>: Mention static tracepoints.
8894         (struct static_tracepoint_ctx): New.
8895         (CMD_BUF_SIZE): New.
8896         (add_tracepoint_action): Handle static tracepoint actions.
8897         (unprobe_marker_at): New.
8898         (clear_installed_tracepoints): Handle static tracepoints.
8899         (cmd_qtdp): Handle static tracepoints.
8900         (probe_marker_at): New.
8901         (cmd_qtstart): Handle static tracepoints.
8902         (response_tracepoint): Handle static tracepoints.
8903         (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
8904         (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
8905         (get_context_regcache): Handle static tracepoints.
8906         (do_action_at_tracepoint): Handle static tracepoint actions.
8907         (traceframe_find_block_type): Handle static trace data blocks.
8908         (traceframe_read_sdata): New.
8909         (download_tracepoints): Download static tracepoint actions.
8910         [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
8911         (GDB_PROBE_NAME): New.
8912         (ust_ops): New.
8913         (GET_UST_SYM): New.
8914         (USTF): New.
8915         (dlsym_ust): New.
8916         (ust_marker_to_static_tracepoint): New.
8917         (gdb_probe): New.
8918         (collect_ust_data_at_tracepoint): New.
8919         (gdb_ust_probe): New.
8920         (UNIX_PATH_MAX, SOCK_DIR): New.
8921         (gdb_ust_connect_sync_socket): New.
8922         (resume_thread, stop_thread): New.
8923         (run_inferior_command): New.
8924         (init_named_socket): New.
8925         (gdb_ust_socket_init): New.
8926         (cstr_to_hexstr): New.
8927         (next_st): New.
8928         (first_marker, next_marker): New.
8929         (response_ust_marker): New.
8930         (cmd_qtfstm, cmd_qtsstm): New.
8931         (unprobe_marker_at, probe_marker_at): New.
8932         (cmd_qtstmat, gdb_ust_thread): New.
8933         (gdb_ust_init): New.
8934         (initialize_tracepoint_ftlib): Call gdb_ust_init.
8935         * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
8936         (ST_REGENTRY): New.
8937         (x86_64_st_collect_regmap): New.
8938         (X86_64_NUM_ST_COLLECT_GREGS): New.
8939         (AMD64_RIP_REGNUM): New.
8940         (supply_static_tracepoint_registers): New.
8941         * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
8942         (ST_REGENTRY): New.
8943         (i386_st_collect_regmap): New.
8944         (i386_NUM_ST_COLLECT_GREGS): New.
8945         (supply_static_tracepoint_registers): New.
8946         * server.c (handle_query): Handle qXfer:statictrace:read.
8947         <qSupported>: Report support for StaticTracepoints, and
8948         qXfer:statictrace:read features.
8949         * server.h (traceframe_read_sdata)
8950         (supply_static_tracepoint_registers): Declare.
8951         * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
8952         (unpack_varlen_hex): Include in IPA build.
8953         * Makefile.in (ustlibs, ustinc): New.
8954         (IPA_OBJS): Add remote-utils-ipa.o.
8955         ($(IPA_LIB)): Link -ldl and -lpthread.
8956         (UST_CFLAGS): New.
8957         (IPAGENT_CFLAGS): Add UST_CFLAGS.
8958         * config.in, configure: Regenerate.
8959
8960 2010-06-20  Ian Lance Taylor  <iant@google.com>
8961             Pedro Alves  <pedro@codesourcery.com>
8962
8963         * linux-x86-low.c (always_true): Delete.
8964         (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
8965         trying to fool the compiler with always_true.
8966
8967 2010-06-20  Pedro Alves  <pedro@codesourcery.com>
8968
8969         * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
8970         conditions in gdbserver.
8971
8972 2010-06-19  Ulrich Weigand  <uweigand@de.ibm.com>
8973
8974         * spu-low.c (spu_read_memory): Wrap around local store limit.
8975         (spu_write_memory): Likewise.
8976
8977 2010-06-15  Pedro Alves  <pedro@codesourcery.com>
8978
8979         * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
8980         (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
8981         LONGEST uses.
8982         * server.h (struct emit_ops): Replace int64_t uses with LONGEST
8983         uses.
8984         * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
8985         uses with LONGEST uses.
8986
8987 2010-06-14  Stan Shebs  <stan@codesourcery.com>
8988             Pedro Alves  <pedro@codesourcery.com>
8989
8990         Bytecode compiler.
8991
8992         * linux-x86-low.c: Include limits.h.
8993         (add_insns): New.
8994         (always_true): New.
8995         (EMIT_ASM): New.
8996         (EMIT_ASM32): New.
8997         (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
8998         (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
8999         (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
9000         (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
9001         (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
9002         (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
9003         (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
9004         (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
9005         (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
9006         (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
9007         (amd64_emit_void_call_2): New.
9008         (amd64_emit_ops): New.
9009         (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
9010         (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
9011         (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
9012         (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
9013         (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
9014         (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
9015         (i386_emit_goto, i386_write_goto_address, i386_emit_const)
9016         (i386_emit_call, i386_emit_reg, i386_emit_pop)
9017         (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
9018         (i386_emit_stack_adjust, i386_emit_int_call_1)
9019         (i386_emit_void_call_2): New.
9020         (i386_emit_ops): New.
9021         (x86_emit_ops): New.
9022         (the_low_target): Install x86_emit_ops.
9023         * server.h (struct emit_ops): New.
9024         (get_raw_reg_func_addr): Declare.
9025         (current_insn_ptr, emit_error): Declare.
9026         * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
9027         (set_trace_state_variable_value): New defines.
9028         (struct ipa_sym_addresses): New fields addr_get_raw_reg,
9029         addr_get_trace_state_variable_value and
9030         addr_set_trace_state_variable_value.
9031         (symbol_list): New fields for get_raw_reg,
9032         get_trace_state_variable_value and set_trace_state_variable_value.
9033         (condfn): New typedef.
9034         (struct tracepoint): New field `compiled_cond'.
9035         (do_action_at_tracepoint): Clear compiled_cond.
9036         (get_trace_state_variable_value, set_trace_state_variable_value):
9037         Export in the IPA.
9038         (condition_true_at_tracepoint): If there's a compiled condition,
9039         run that.
9040         (current_insn_ptr, emit_error): New globals.
9041         (struct bytecode_address): New.
9042         (get_raw_reg_func_addr): New.
9043         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
9044         (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
9045         (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
9046         (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
9047         (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
9048         (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
9049         (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
9050         (compile_tracepoint_condition, compile_bytecodes): New.
9051         * target.h (emit_ops): Forward declare.
9052         (struct target_ops): New field emit_ops.
9053         (target_emit_ops): New.
9054         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
9055         * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
9056         * linux-low.c (linux_emit_ops): New.
9057         (linux_target_ops): Install it.
9058         * linux-low.h (struct linux_target_ops): New field emit_ops.
9059
9060 2010-06-14  Ulrich Weigand  <uweigand@de.ibm.com>
9061
9062         * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
9063         * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
9064
9065 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
9066             Stan Shebs  <stan@codesourcery.com>
9067
9068         * Makefile.in (IPA_DEPFILES, extra_libraries): New.
9069         (all): Depend on $(extra_libraries).
9070         (install-only): Install the IPA.
9071         (IPA_OBJS, IPA_LIB): New.
9072         (clean): Remove the IPA lib.
9073         (IPAGENT_CFLAGS): New.
9074         (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
9075         (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9076         (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9077         * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9078         * configure.ac: Check for atomic builtins support in the compiler.
9079         (IPA_DEPFILES, extra_libraries): Define.
9080         * configure.srv (ipa_obj): Add description.
9081         (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9082         (i[34567]86-*-linux*): Set ipa_obj.
9083         (x86_64-*-linux*): Set ipa_obj.
9084         * linux-low.c (stabilizing_threads): New.
9085         (supports_fast_tracepoints): New.
9086         (linux_detach): Stabilize threads before detaching.
9087         (handle_tracepoints): Handle internal tracing breakpoints.  Assert
9088         the lwp is either not stabilizing, or is moving out of a jump pad.
9089         (linux_fast_tracepoint_collecting): New.
9090         (maybe_move_out_of_jump_pad): New.
9091         (enqueue_one_deferred_signal): New.
9092         (dequeue_one_deferred_signal): New.
9093         (linux_wait_for_event_1): If moving out of a jump pad, defer
9094         pending signals to later.
9095         (linux_stabilize_threads): New.
9096         (linux_wait_1): Check if threads need moving out of jump pads, and
9097         do it if so.
9098         (stuck_in_jump_pad_callback): New.
9099         (move_out_of_jump_pad_callback): New.
9100         (lwp_running): New.
9101         (linux_resume_one_lwp): Handle moving out of jump pads.
9102         (linux_set_resume_request): Dequeue deferred signals.
9103         (need_step_over_p): Also step over fast tracepoint jumps.
9104         (start_step_over): Also uninsert fast tracepoint jumps.
9105         (finish_step_over): Also reinsert fast tracepoint jumps.
9106         (linux_install_fast_tracepoint_jump): New.
9107         (linux_target_ops): Install linux_stabilize_threads and
9108         linux_install_fast_tracepoint_jump_pad.
9109         * linux-low.h (linux_target_ops) <get_thread_area,
9110         install_fast_tracepoint_jump_pad>: New fields.
9111         (struct lwp_info) <collecting_fast_tracepoint,
9112         pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
9113         (linux_get_thread_area): Declare.
9114         * linux-x86-low.c (jump_insn): New.
9115         (x86_get_thread_area): New.
9116         (append_insns): New.
9117         (push_opcode): New.
9118         (amd64_install_fast_tracepoint_jump_pad): New.
9119         (i386_install_fast_tracepoint_jump_pad): New.
9120         (x86_install_fast_tracepoint_jump_pad): New.
9121         (the_low_target): Install x86_get_thread_area and
9122         x86_install_fast_tracepoint_jump_pad.
9123         * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
9124         (struct fast_tracepoint_jump): New.
9125         (fast_tracepoint_jump_insn): New.
9126         (fast_tracepoint_jump_shadow): New.
9127         (find_fast_tracepoint_jump_at): New.
9128         (fast_tracepoint_jump_here): New.
9129         (delete_fast_tracepoint_jump): New.
9130         (set_fast_tracepoint_jump): New.
9131         (uninsert_fast_tracepoint_jumps_at): New.
9132         (reinsert_fast_tracepoint_jumps_at): New.
9133         (set_breakpoint_at): Use write_inferior_memory.
9134         (uninsert_raw_breakpoint): Use write_inferior_memory.
9135         (check_mem_read): Mask out fast tracepoint jumps.
9136         (check_mem_write): Mask out fast tracepoint jumps.
9137         * mem-break.h (struct fast_tracepoint_jump): Forward declare.
9138         (set_fast_tracepoint_jump): Declare.
9139         (delete_fast_tracepoint_jump)
9140         (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
9141         (reinsert_fast_tracepoint_jumps_at): Declare.
9142         * regcache.c: Don't compile many functions when building the
9143         in-process agent library.
9144         (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
9145         the register buffer in the heap.
9146         (free_register_cache): If the register buffer isn't owned by the
9147         regcache, don't free it.
9148         (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
9149         pre-existing register caches.
9150         * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
9151         type.
9152         (convert_ascii_to_int): : Constify `from' parameter type.
9153         (decode_M_packet, decode_X_packet): Replace the `to' parameter by
9154         a `to_p' pointer to pointer parameter.  If TO_P is NULL, malloc
9155         the needed buffer in-place.
9156         (relocate_instruction): New.
9157         * server.c (handle_query) <qSymbols>: If the target supports
9158         tracepoints, give it a chance of looking up symbols.  Report
9159         support for fast tracepoints.
9160         (handle_status): Stabilize threads.
9161         (process_serial_event): Adjust.
9162         * server.h (struct fast_tracepoint_jump): Forward declare.
9163         (struct process_info) <fast_tracepoint_jumps>: New field.
9164         (convert_ascii_to_int, convert_int_to_ascii): Adjust.
9165         (decode_X_packet, decode_M_packet): Adjust.
9166         (relocate_instruction): Declare.
9167         (in_process_agent_loaded): Declare.
9168         (tracepoint_look_up_symbols): Declare.
9169         (struct fast_tpoint_collect_status): Declare.
9170         (fast_tracepoint_collecting): Declare.
9171         (force_unlock_trace_buffer): Declare.
9172         (handle_tracepoint_bkpts): Declare.
9173         (initialize_low_tracepoint)
9174         (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
9175         * target.h (struct target_ops) <stabilize_threads,
9176         install_fast_tracepoint_jump_pad>: New fields.
9177         (stabilize_threads, install_fast_tracepoint_jump_pad): New.
9178         * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
9179         [HAVE_STDINT_H]: Include stdint.h.
9180         (trace_debug_1): Rename to ...
9181         (trace_vdebug): ... this.
9182         (trace_debug): Rename to ...
9183         (trace_debug_1): ... this.  Add `level' parameter.
9184         (trace_debug): New.
9185         (ATTR_USED, ATTR_NOINLINE): New.
9186         (IP_AGENT_EXPORT): New.
9187         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9188         (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
9189         (about_to_request_buffer_space, trace_buffer_is_full)
9190         (stopping_tracepoint, expr_eval_result, error_tracepoint)
9191         (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
9192         (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
9193         (traceframe_write_count, traceframes_created)
9194         (trace_state_variables)
9195         New renaming defines.
9196         (struct ipa_sym_addresses): New.
9197         (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
9198         (symbol_list): New.
9199         (ipa_sym_addrs): New.
9200         (all_tracepoint_symbols_looked_up): New.
9201         (in_process_agent_loaded): New.
9202         (write_e_ipa_not_loaded): New.
9203         (maybe_write_ipa_not_loaded): New.
9204         (tracepoint_look_up_symbols): New.
9205         (debug_threads) [IN_PROCESS_AGENT]: New.
9206         (read_inferior_memory) [IN_PROCESS_AGENT]: New.
9207         (UNKNOWN_SIDE_EFFECTS): New.
9208         (stop_tracing): New.
9209         (flush_trace_buffer): New.
9210         (stop_tracing_bkpt): New.
9211         (flush_trace_buffer_bkpt): New.
9212         (read_inferior_integer): New.
9213         (read_inferior_uinteger): New.
9214         (read_inferior_data_pointer): New.
9215         (write_inferior_data_pointer): New.
9216         (write_inferior_integer): New.
9217         (write_inferior_uinteger): New.
9218         (struct collect_static_trace_data_action): Delete.
9219         (enum tracepoint_type): New.
9220         (struct tracepoint) <type>: New field `type'.
9221         <actions_str, step_actions, step_actions_str>: Only include in
9222         GDBserver.
9223         <orig_size, obj_addr_on_target, adjusted_insn_addr>
9224         <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
9225         (tracepoints): Use IP_AGENT_EXPORT.
9226         (last_tracepoint): Don't include in the IPA.
9227         (stopping_tracepoint): Use IP_AGENT_EXPORT.
9228         (trace_buffer_is_full): Use IP_AGENT_EXPORT.
9229         (alloced_trace_state_variables): New.
9230         (trace_state_variables): Use IP_AGENT_EXPORT.
9231         (traceframe_t): Delete unused variable.
9232         (circular_trace_buffer): Don't include in the IPA.
9233         (trace_buffer_start): Delete.
9234         (struct trace_buffer_control): New.
9235         (trace_buffer_free): Delete.
9236         (struct ipa_trace_buffer_control): New.
9237         (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
9238         (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
9239         New.
9240         (trace_buffer_ctrl): New.
9241         (TRACE_BUFFER_CTRL_CURR): New.
9242         (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
9243         Reimplement as macros.
9244         (trace_buffer_wrap): Delete.
9245         (traceframe_write_count, traceframe_read_count)
9246         (traceframes_created, tracing): Use IP_AGENT_EXPORT.
9247         (struct tracepoint_hit_ctx) <type>: New field.
9248         (struct fast_tracepoint_ctx): New.
9249         (memory_barrier): New.
9250         (cmpxchg): New.
9251         (record_tracepoint_error): Update atomically in the IPA.
9252         (clear_inferior_trace_buffer): New.
9253         (about_to_request_buffer_space): New.
9254         (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
9255         updating the same buffer.
9256         (add_tracepoint): Default the tracepoint's type to trap
9257         tracepoint, and orig_size to -1.
9258         (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
9259         internal variables.
9260         (create_trace_state_variable): New parameter `gdb'.  Handle it.
9261         (clear_installed_tracepoints): Clear fast tracepoint jumps.
9262         (cmd_qtdp): Handle fast tracepoints.
9263         (cmd_qtdv): Adjust.
9264         (max_jump_pad_size): New.
9265         (gdb_jump_pad_head): New.
9266         (get_jump_space_head): New.
9267         (claim_jump_space): New.
9268         (sort_tracepoints): New.
9269         (MAX_JUMP_SIZE): New.
9270         (cmd_qtstart): Handle fast tracepoints.  Sync tracepoints with the
9271         IPA.
9272         (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
9273         support.  Upload fast traceframes, and delete internal IPA
9274         breakpoints.
9275         (stop_tracing_handler): New.
9276         (flush_trace_buffer_handler): New.
9277         (cmd_qtstop): Upload fast tracepoints.
9278         (response_tracepoint): Handle fast tracepoints.
9279         (tracepoint_finished_step): Upload fast traceframes.  Set the
9280         tracepoint hit context's tracepoint type.
9281         (handle_tracepoint_bkpts): New.
9282         (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
9283         type.  Add comment about fast tracepoints.
9284         (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
9285         non-existing action_str field.
9286         (get_context_regcache): Handle fast tracepoints.
9287         (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
9288         to the regcache.
9289         (fast_tracepoint_from_jump_pad_address): New.
9290         (fast_tracepoint_from_ipa_tpoint_address): New.
9291         (collecting_t): New.
9292         (force_unlock_trace_buffer): New.
9293         (fast_tracepoint_collecting): New.
9294         (collecting): New.
9295         (gdb_collect): New.
9296         (write_inferior_data_ptr): New.
9297         (target_tp_heap): New.
9298         (target_malloc): New.
9299         (download_agent_expr): New.
9300         (UALIGN): New.
9301         (download_tracepoints): New.
9302         (download_trace_state_variables): New.
9303         (upload_fast_traceframes): New.
9304         (IPA_FIRST_TRACEFRAME): New.
9305         (IPA_NEXT_TRACEFRAME_1): New.
9306         (IPA_NEXT_TRACEFRAME): New.
9307         [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
9308         [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
9309         (gdb_jump_pad_buffer_end): New.
9310         [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
9311         (initialize_tracepoint): Adjust.
9312         [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
9313         buffer.  Initialize the low module.
9314         * utils.c (PREFIX, TOOLNAME): New.
9315         (malloc_failure): Use PREFIX.
9316         (error): In the IPA, an error causes an exit.
9317         (fatal, warning): Use PREFIX.
9318         (internal_error): Use TOOLNAME.
9319         (NUMCELLS): Increase to 10.
9320         * configure, config.in: Regenerate.
9321
9322 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
9323
9324         * server.c (handle_query) <qSupported>: Do two passes over the
9325         qSupported string to avoid nesting strtok.
9326
9327 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
9328
9329         * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
9330         (CDEPS): New.
9331         * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping.  Test also
9332         -Wl,--dynamic-list.
9333         * configure: Regenerate.
9334         * proc-service.list: New.
9335
9336 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
9337
9338         * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
9339         New comment.
9340
9341 2010-05-26  Ozkan Sezer  <sezeroz@gmail.com>
9342
9343         * gdbreplay.c (remote_open): Check error return from socket() call by
9344         its equality to -1 not by it being negative.
9345         * remote-utils.c (remote_open): Likewise.
9346
9347 2010-05-23  Pedro Alves  <pedro@codesourcery.com>
9348
9349         * config.h: Regenerate.
9350
9351 2010-05-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
9352
9353         * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
9354         doesn't provide PTRACE_GET_THREAD_AREA.
9355
9356 2010-05-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
9357
9358         * linux-m68k-low.c: Include <asm/ptrace.h>
9359         (ps_get_thread_area): Implement.
9360
9361 2010-05-03  Doug Evans  <dje@google.com>
9362
9363         * event-loop.c (struct callback_event): New struct.
9364         (callback_list): New global.
9365         (append_callback_event, delete_callback_event): New functions.
9366         (process_callback): New function.
9367         (start_event_loop): Call it.
9368         * remote-utils.c (NOT_SCHEDULED): Define.
9369         (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
9370         moved out of readchar.
9371         (readchar): Rewrite.  Call reschedule before returning.
9372         (reset_readchar): New function.
9373         (remote_close): Call it.
9374         (process_remaining, reschedule): New functions.
9375         * server.h (callback_handler_func): New typedef.
9376         (append_callback_event, delete_callback_event): Declare.
9377
9378 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
9379
9380         * proc-service.c (ps_pglobal_lookup): Use
9381         thread_db_look_up_one_symbol.
9382         * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
9383         parameter.  Use it instead of all_symbols_looked_up.
9384         * server.h (struct process_info) <all_symbols_looked_up>: Delete
9385         field.
9386         (all_symbols_looked_up): Don't declare.
9387         (look_up_one_symbol): Add new `may_ask_gdb' parameter.
9388         * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
9389         field.
9390         (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
9391         Set all_symbols_looked_up here.
9392         (thread_db_look_up_one_symbol): New.
9393         (thread_db_get_tls_address): Adjust.
9394         (thread_db_load_search, try_thread_db_load_1): Always allocate the
9395         thread_db object on the heap, and tentatively set it in the
9396         process structure.
9397         (thread_db_init): Don't set all_symbols_looked_up here.
9398         * linux-low.h (thread_db_look_up_one_symbol): Declare.
9399
9400 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
9401
9402         * linux-low.c (linux_kill, linux_detach): Adjust.
9403         (status_pending_p_callback): Remove redundant statement.  Check
9404         for !TARGET_WAITIKIND_IGNORE, instead of
9405         TARGET_WAITKIND_STOPPED.
9406         (handle_tracepoints): Make sure LWP is locked.  Adjust.
9407         (linux_wait_for_event_1): Adjust.
9408         (linux_cancel_breakpoints): New.
9409         (unsuspend_one_lwp): New.
9410         (unsuspend_all_lwps): New.
9411         (linux_wait_1): If finishing a step-over, unsuspend all lwps.
9412         (send_sigstop_callback): Change return type to int, add new
9413         `except' parameter and handle it.
9414         (suspend_and_send_sigstop_callback): New.
9415         (stop_all_lwps): Add new `suspend' and `expect' parameters, and
9416         pass them down.  If SUSPEND, also increment the lwp's suspend
9417         count.
9418         (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
9419         (need_step_over_p): Don't consider suspended LWPs.
9420         (start_step_over): Adjust.
9421         (proceed_one_lwp): Change return type to int, add new `except'
9422         parameter and handle it.
9423         (unsuspend_and_proceed_one_lwp): New.
9424         (proceed_all_lwps): Use find_inferior instead of
9425         for_each_inferior.
9426         (unstop_all_lwps): Add `unsuspend' parameter.  If UNSUSPEND, them
9427         also decrement the suspend count of LWPs.  Pass `except' down,
9428         instead of hacking its suspend count.
9429         (linux_pause_all): Add `freeze' parameter.  Adjust.
9430         (linux_unpause_all): New.
9431         (linux_target_ops): Install linux_unpause_all.
9432         * server.c (handle_status): Adjust.
9433         * target.h (struct target_ops): New fields `unpause_all' and
9434         `cancel_breakpoints'.  Add new parameter to `pause_all'.
9435         (pause_all): Add new `freeze' parameter.
9436         (unpause_all): New.
9437         (cancel_breakpoints): New.
9438         * tracepoint.c (clear_installed_tracepoints): Pause threads, and
9439         cancel breakpoints.
9440         (cmd_qtstart): Pause threads.
9441         (stop_tracing): Pause threads, and cancel breakpoints.
9442         * win32-low.c (win32_target_ops): Adjust.
9443
9444 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
9445
9446         * linux-low.c (linux_wait_for_event_1): Move passing the signal to
9447         the inferior right away from here...
9448         (linux_wait_1): ... to here, and adjust to check the thread's
9449         last_resume_kind instead of the lwp's step or stop_expected flags.
9450
9451 2010-05-02  Pedro Alves  <pedro@codesourcery.com>
9452
9453         * README: Use consistent `GDB' and `GDBserver' spellings.
9454
9455 2010-05-02  Pedro Alves  <pedro@codesourcery.com>
9456
9457         * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
9458         (linux_kill): Stop all lwps here.  Don't delete the main lwp here.
9459         (linux_detach_one_lwp): Assume the lwp is stopped.
9460         (any_thread_of): Delete.
9461         (linux_detach): Stop all lwps here.  Don't blindly delete all
9462         breakpoints.
9463         (delete_lwp_callback): New.
9464         (linux_mourn): Delete all lwps of the process that is gone.
9465         (linux_wait_1): Don't delete the last lwp of the process here.
9466         * mem-break.h (mark_breakpoints_out): Declare.
9467         * mem-break.c (mark_breakpoints_out): New.
9468         (free_all_breakpoints): Use it.
9469         * server.c (handle_target_event): If the process is gone, mark
9470         breakpoints out.
9471         * thread-db.c (struct thread_db) <create_bp>: New field.
9472         (thread_db_enable_reporting): Fix prototype.  Store a thread event
9473         breakpoint reference in the thread_db struct.
9474         (thread_db_load_search): Clear the thread_db object.
9475         (try_thread_db_load_1): Ditto.
9476         (switch_to_process): New.
9477         (disable_thread_event_reporting): Use it.
9478         (remove_thread_event_breakpoints): New.
9479         (thread_db_detach, thread_db_mourn): Use it.
9480
9481 2010-05-01  Pedro Alves  <pedro@codesourcery.com>
9482
9483         * linux-low.c (linux_enable_event_reporting): New.
9484         (linux_wait_for_event_1, handle_extended_wait): Use it.
9485
9486 2010-04-30  Pedro Alves  <pedro@codesourcery.com>
9487
9488         * linux-low.c (linux_kill_one_lwp, linux_kill)
9489         (linux_detach_one_lwp): Adjust to send_sigstop interface change.
9490         (send_sigstop): Take an lwp_info as parameter instead.  Queue a
9491         SIGSTOP even if the LWP is stopped.
9492         (send_sigstop_callback): New.
9493         (stop_all_lwps): Use send_sigstop_callback instead.
9494         (linux_resume_one_thread): Adjust.
9495         (proceed_one_lwp): Still proceed an LWP that the client has
9496         requested to stop, if we haven't reported it as stopped yet.  Make
9497         sure that LWPs the client want stopped, have a pending SIGSTOP.
9498
9499 2010-04-26  Doug Evans  <dje@google.com>
9500
9501         * server.c (handle_general_set): Make static.
9502
9503         * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
9504         Print received char after testing for error/eof instead of before.
9505         (input_interrupt): Tweak comment.
9506
9507 2010-04-23  Doug Evans  <dje@google.com>
9508
9509         * server.c (start_inferior): Print inferior argv if --debug.
9510
9511 2010-04-21  Aleksandar Ristovski  <aristovski@qnx.com>
9512
9513         * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
9514         * nto-x86-low.c: Include server.h
9515
9516 2010-04-20  Pierre Muller  <muller@ics.u-strasbg.fr>
9517
9518         * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
9519         be consistent with other sources of this directory.
9520         (init_registers_amd64): Correct name of source file of this function
9521         in the comment.
9522
9523 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
9524
9525         * configure.srv (x86_64-*-mingw*): New configuration for Windows
9526         64-bit executables.
9527
9528 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
9529
9530         * win32-i386-low.c: Add 64-bit support.
9531         (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
9532         (init_registers_amd64): Declare.
9533         (mappings): Add 64-bit version of array.
9534         (init_windows_x86): New function.
9535         (the_low_target): Change init_arch field to init_windows_x86.
9536
9537 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
9538
9539         * win32-low.c: Adapt to support also 64-bit architecture.
9540         (child_xfer_memory): Use uintptr_t type for local variable `addr'.
9541         (get_image_name): Use SIZE_T type for local variable `done'.
9542         (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
9543         (toolhelp_get_dll_name): Idem.
9544         (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
9545         Use uintptr_t typecast to avoid warning.
9546         (handle_unload_dll): Use uintptr_t typecast to avoid warning.
9547         (handle_exception): Use phex_nz to avoid warning.
9548         (win32_wait): Remove unused local variable `process'.
9549
9550 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
9551
9552         * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
9553         `amd64-avx.o'.
9554
9555 2010-04-17  Pierre Muller  <muller@ics.u-strasbg.fr>
9556
9557         * configure.ac: Use `ws2_32' library for srv_mingw.
9558         * configure: Regenerate.
9559         * gdbreplay.c: Include winsock2.h instead of winsock.h.
9560         * remote-utils.c: Likewise.
9561
9562 2010-04-17  H.J. Lu  <hongjiu.lu@intel.com>
9563
9564         * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
9565         if __x86_64__ is defined.
9566
9567 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
9568
9569         * configure: Regenerate.
9570
9571 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
9572
9573         * server.c (handle_query): Handle 'qGetTIBAddr' query.
9574         * target.h (target_ops): New get_tib_address field.
9575         * win32-low.h (win32_thread_info): Add thread_local_base field.
9576         * win32-low.c (child_add_thread): Add tlb argument.
9577         Set thread_local_base field to TLB.
9578         (get_child_debug_event): Adapt to child_add_thread change.
9579         (win32_get_tib_address): New function.
9580         (win32_target_ops): Set get_tib_address field to
9581         win32_get_tib_address.
9582         * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
9583
9584 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
9585
9586         * linux-low.c (linux_mourn): Also remove the process.
9587         * server.c (handle_target_event): Don't remove the process here.
9588         * nto-low.c (nto_mourn): New.
9589         (nto_target_ops): Install it.
9590         * spu-low.c (spu_mourn): New.
9591         (spu_target_ops): Install it.
9592         * win32-low.c (win32_mourn): New.
9593         (win32_target_ops): Install it.
9594
9595 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
9596
9597         * server.h (buffer_xml_printf): Remove redundant `;'.
9598
9599 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
9600
9601         * regcache.c (set_register_cache): Invalidate regcaches before
9602         changing the register cache layout.
9603         (regcache_invalidate_one): Allow a NULL regcache.
9604         * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
9605         regcaches before changing the register cache layout or the target
9606         regsets.
9607
9608 2010-04-12  H.J. Lu  <hongjiu.lu@intel.com>
9609
9610         * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
9611         variable warning on Linux/x86-64.
9612
9613 2010-04-11  Pedro Alves  <pedro@codesourcery.com>
9614
9615         GDBserver disconnected tracing support.
9616
9617         * linux-low.c (linux_remove_process): Delete.
9618         (add_lwp): Don't set last_resume_kind here.
9619         (linux_kill): Use `mourn'.
9620         (linux_detach): Use `thread_db_detach', and `mourn'.
9621         (linux_mourn): New.
9622         (linux_attach_lwp_1): Adjust comment.
9623         (linux_attach): last_resume_kind moved the thread_info; adjust.
9624         (status_pending_p_callback): Adjust.
9625         (linux_wait_for_event_1): Adjust.
9626         (count_events_callback, select_singlestep_lwp_callback)
9627         (select_event_lwp_callback, cancel_breakpoints_callback)
9628         (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
9629         (proceed_one_lwp): Adjust.
9630         (linux_async): Add debug output.
9631         (linux_thread_stopped): New.
9632         (linux_pause_all): New.
9633         (linux_target_ops): Install linux_mourn, linux_thread_stopped and
9634         linux_pause_all.
9635         * linux-low.h (struct lwp_info): Delete last_resume_kind field.
9636         (thread_db_free): Delete declaration.
9637         (thread_db_detach, thread_db_mourn): Declare.
9638         * thread-db.c (thread_db_init): Use thread_db_mourn.
9639         (thread_db_free): Delete, split in two.
9640         (disable_thread_event_reporting): New.
9641         (thread_db_detach): New.
9642         (thread_db_mourn): New.
9643
9644         * server.h (struct thread_info) <last_resume_kind>: New field.
9645         <attached>: Add comment.
9646         <gdb_detached>: New field.
9647         (handler_func): Change return type to int.
9648         (handle_serial_event, handle_target_event): Ditto.
9649         (gdb_connected): Declare.
9650         (tracing): Delete.
9651         (disconnected_tracing): Declare.
9652         (stop_tracing): Declare.
9653
9654         * server.c (handle_query) <qSupported>: Report support for
9655         disconnected tracing.
9656         (queue_stop_reply_callback): Account for running threads.
9657         (gdb_wants_thread_stopped): New.
9658         (gdb_wants_all_threads_stopped): New.
9659         (gdb_reattached_process): New.
9660         (handle_status): Clear the `gdb_detached' flag of all processes.
9661         In all-stop, stop all threads.
9662         (main): Be sure to leave tfind mode.  Handle disconnected tracing.
9663         (process_serial_event): If the remote connection breaks, or if an
9664         exit was forced with "monitor exit", force an event loop exit.
9665         Handle disconnected tracing on detach.
9666         (handle_serial_event): Adjust.
9667         (handle_target_event): If GDB isn't connected, forward events back
9668         to the inferior, unless the last process exited, in which case,
9669         exit gdbserver.  Adjust interface.
9670
9671         * remote-utils.c (remote_open): Don't block in accept.  Instead
9672         register an event loop source on the listen socket file
9673         descriptor.  Refactor bits into ...
9674         (listen_desc): ... this new global.
9675         (gdb_connected): ... this new function.
9676         (enable_async_notification): ... this new function.
9677         (handle_accept_event): ... this new function.
9678         (remote_close): Clear remote_desc.
9679
9680         * inferiors.c (add_thread): Set the new thread's last_resume_kind.
9681
9682         * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
9683         New fields.
9684         (mourn_inferior): Define.
9685         (target_process_qsupported): Avoid the dangling else problem.
9686         (thread_stopped): Define.
9687         (pause_all): Define.
9688         (target_waitstatus_to_string): Declare.
9689         * target.c (target_waitstatus_to_string): New.
9690
9691         * tracepoint.c (tracing): Make extern.
9692         (disconnected_tracing): New.
9693         (stop_tracing): Make extern.  Handle tracing stops due to GDB
9694         disconnecting.
9695         (cmd_qtdisconnected): New.
9696         (cmd_qtstatus): Report disconnected tracing status in trace reply.
9697         (handle_tracepoint_general_set): Handle QTDisconnected.
9698
9699         * event-loop.c (event_handler_func): Change return type to int.
9700         (process_event): Bail out if the event handler wants the event
9701         loop to stop.
9702         (handle_file_event): Ditto.
9703         (start_event_loop): Bail out if the event handler wants the event
9704         loop to stop.
9705
9706         * nto-low.c (nto_target_ops): Adjust.
9707         * spu-low.c (spu_wait): Don't remove the process here.
9708         (spu_target_ops): Adjust.
9709         * win32-low.c (win32_wait): Don't remove the process here.
9710         (win32_target_ops): Adjust.
9711
9712 2010-04-11  Pedro Alves  <pedro@codesourcery.com>
9713
9714         * regcache.c (realloc_register_cache): Invalidate inferior's
9715         regcache before recreating it.
9716
9717 2010-04-09  Pedro Alves  <pedro@codesourcery.com>
9718
9719         * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
9720
9721 2010-04-09  Stan Shebs  <stan@codesourcery.com>
9722             Pedro Alves  <pedro@codesourcery.com>
9723
9724         * server.h (LONGEST): New.
9725         (struct thread_info) <while_stepping>: New field.
9726         (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
9727         Declare.
9728         (initialize_tracepoint, handle_tracepoint_general_set)
9729         (handle_tracepoint_query, tracepoint_finished_step)
9730         (tracepoint_was_hit, release_while_stepping_state_list):
9731         (current_traceframe): Declare.
9732         * server.c (handle_general_set): Handle tracepoint packets.
9733         (read_memory): New.
9734         (write_memory): New.
9735         (handle_search_memory_1): Use read_memory.
9736         (handle_query): Report support for conditional tracepoints, trace
9737         state variables, and tracepoint sources.  Handle tracepoint
9738         queries.
9739         (main): Initialize the tracepoints module.
9740         (process_serial_event): Handle traceframe reads/writes.
9741
9742         * linux-low.c (handle_tracepoints): New.
9743         (linux_wait_1): Call it.
9744         (linux_resume_one_lwp): Handle while-stepping.
9745         (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
9746         (linux_target_ops): Install them.
9747         * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
9748         New field.
9749         * linux-x86-low.c (x86_supports_tracepoints): New.
9750         (the_low_target). Install it.
9751
9752         * mem-break.h (delete_breakpoint): Declare.
9753         * mem-break.c (delete_breakpoint): Make external.
9754
9755         * target.h (struct target_ops): Add `supports_tracepoints',
9756         `read_pc', and `write_pc' fields.
9757         (target_supports_tracepoints): Define.
9758         * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
9759         (phex_nz): New.
9760
9761         * regcache.h (struct regcache) <registers_owned>: New field.
9762         (init_register_cache, regcache_cpy): Declare.
9763         (regcache_read_pc, regcache_write_pc): Declare.
9764         (register_cache_size): Declare.
9765         (supply_regblock): Declare.
9766         * regcache.c (init_register_cache): New.
9767         (new_register_cache): Use it.
9768         (regcache_cpy): New.
9769         (register_cache_size): New.
9770         (supply_regblock): New.
9771         (regcache_read_pc, regcache_write_pc): New.
9772
9773         * tracepoint.c: New.
9774
9775         * Makefile.in (OBS): Add tracepoint.o.
9776         (tracepoint.o): New rule.
9777
9778 2010-04-08  H.J. Lu  <hongjiu.lu@intel.com>
9779
9780         * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
9781         (i386-mmx.o): New.
9782         (i386-mmx.c): Likewise.
9783         (i386-mmx-linux.o): Likewise.
9784         (i386-mmx-linux.c): Likewise.
9785
9786         * configure.srv (srv_i386_regobj): Add i386-mmx.o.
9787         (srv_i386_linux_regobj): Add i386-mmx-linux.o.
9788         (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
9789         (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
9790
9791         * linux-x86-low.c (init_registers_i386_mmx_linux): New.
9792         (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
9793         and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
9794
9795 2010-04-07  H.J. Lu  <hongjiu.lu@intel.com>
9796
9797         * Makefile.in (clean): Updated.
9798         (i386-avx.o): New.
9799         (i386-avx.c): Likewise.
9800         (i386-avx-linux.o): Likewise.
9801         (i386-avx-linux.c): Likewise.
9802         (amd64-avx.o): Likewise.
9803         (amd64-avx.c): Likewise.
9804         (amd64-avx-linux.o): Likewise.
9805         (amd64-avx-linux.c): Likewise.
9806
9807         * configure.srv (srv_i386_regobj): Add i386-avx.o.
9808         (srv_i386_linux_regobj): Add i386-avx-linux.o.
9809         (srv_amd64_regobj): Add amd64-avx.o.
9810         (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
9811         (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
9812         (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
9813         (srv_i386_xmlfiles): Add i386/i386-avx.xml.
9814         (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
9815         (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
9816         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
9817
9818         * i387-fp.c: Include "i386-xstate.h".
9819         (i387_xsave): New.
9820         (i387_cache_to_xsave): Likewise.
9821         (i387_xsave_to_cache): Likewise.
9822         (x86_xcr0): Likewise.
9823
9824         * i387-fp.h (i387_cache_to_xsave): Likewise.
9825         (i387_xsave_to_cache): Likewise.
9826         (x86_xcr0): Likewise.
9827
9828         * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
9829         * linux-crisv32-low.c (target_regsets): Likewise.
9830         * linux-m68k-low.c (target_regsets): Likewise.
9831         * linux-mips-low.c (target_regsets): Likewise.
9832         * linux-ppc-low.c (target_regsets): Likewise.
9833         * linux-s390-low.c (target_regsets): Likewise.
9834         * linux-sh-low.c (target_regsets): Likewise.
9835         * linux-sparc-low.c (target_regsets): Likewise.
9836         * linux-xtensa-low.c (target_regsets): Likewise.
9837
9838         * linux-low.c: Include <sys/uio.h>.
9839         (regsets_fetch_inferior_registers): Support nt_type.
9840         (regsets_store_inferior_registers): Likewise.
9841         (linux_process_qsupported): New.
9842         (linux_target_ops): Add linux_process_qsupported.
9843
9844         * linux-low.h (regset_info): Add nt_type.
9845         (linux_target_ops): Add process_qsupported.
9846
9847         * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
9848         and <sys/uio.h>.
9849         (init_registers_i386_avx_linux): New.
9850         (init_registers_amd64_avx_linux): Likewise.
9851         (xmltarget_i386_linux_no_xml): Likewise.
9852         (xmltarget_amd64_linux_no_xml): Likewise.
9853         (PTRACE_GETREGSET): Likewise.
9854         (PTRACE_SETREGSET): Likewise.
9855         (x86_fill_xstateregset): Likewise.
9856         (x86_store_xstateregset): Likewise.
9857         (use_xml): Likewise.
9858         (x86_linux_update_xmltarget): Likewise.
9859         (x86_linux_process_qsupported): Likewise.
9860         (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
9861         (x86_arch_setup): Don't call init_registers_amd64_linux nor
9862         init_registers_i386_linux here.  Call
9863         x86_linux_update_xmltarget.
9864         (the_low_target): Add x86_linux_process_qsupported.
9865
9866         * server.c (handle_query): Call target_process_qsupported.
9867
9868         * target.h (target_ops): Add process_qsupported.
9869         (target_process_qsupported): New.
9870
9871 2010-04-03  Pedro Alves  <pedro@codesourcery.com>
9872
9873         * inferiors.c (add_thread): Set last_status kind to
9874         TARGET_WAITKIND_IGNORE.
9875         * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
9876         fetch.  Use ptid_of.  Avoid unnecessary get_lwp_thread calls.
9877         (linux_wait_1): Move `thread' local definition to block that uses
9878         it.  Don't NULL initialize `event_child'.
9879         (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
9880         Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
9881         * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
9882
9883 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
9884
9885         * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
9886         an extended waitstatus, or by a watchpoint.
9887         (cancel_breakpoints_callback): Don't cancel a breakpoint if the
9888         thread was stepping or has been stopped by a watchpoint.
9889
9890 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
9891
9892         * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
9893         (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
9894         of another, then delete the previous, and validate all
9895         breakpoints.
9896         (validate_inserted_breakpoint): New.
9897         (delete_disabled_breakpoints): New.
9898         (validate_breakpoints): New.
9899         (check_mem_read): Validate breakpoints before trusting their
9900         shadow.  Delete disabled breakpoints.
9901         (check_mem_write): Validate breakpoints before trusting they
9902         should be inserted.  Delete disabled breakpoints.
9903         * mem-break.h (validate_breakpoints):
9904         * server.c (handle_query): Validate breakpoints when we see a
9905         qSymbol query.
9906
9907 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
9908
9909         * linux-low.c (linux_wait_1): Avoid setting need_step_over is
9910         there's a GDB breakpoint at stop_pc.  Always report a trap to GDB
9911         if we could tell there's a GDB breakpoint at stop_pc.
9912         (need_step_over_p): Don't do a step over if we find a GDB
9913         breakpoint at the resume PC.
9914
9915         * mem-break.c (struct raw_breakpoint): New.
9916         (enum bkpt_type): New type `gdb_breakpoint'.
9917         (struct breakpoint): Delete the `PC', `old_data' and `inserted'
9918         fields.  New field `raw'.
9919         (find_raw_breakpoint_at): New.
9920         (set_raw_breakpoint_at): Handle refcounting.  Create a raw
9921         breakpoint instead.
9922         (set_breakpoint_at): Adjust.
9923         (delete_raw_breakpoint): New.
9924         (release_breakpoint): New.
9925         (delete_breakpoint): Rename to...
9926         (delete_breakpoint_1): ... this.  Add proc parameter.  Use
9927         release_breakpoint.  Return ENOENT.
9928         (delete_breakpoint): Reimplement.
9929         (find_breakpoint_at): Delete.
9930         (find_gdb_breakpoint_at): New.
9931         (delete_breakpoint_at): Delete.
9932         (set_gdb_breakpoint_at): New.
9933         (delete_gdb_breakpoint_at): New.
9934         (gdb_breakpoint_here): New.
9935         (set_reinsert_breakpoint): Use release_breakpoint.
9936         (uninsert_breakpoint): Rename to ...
9937         (uninsert_raw_breakpoint): ... this.
9938         (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
9939         (reinsert_raw_breakpoint): Change parameter type to
9940         raw_breakpoint.
9941         (reinsert_breakpoints_at): Adjust to handle raw breakpoints
9942         instead.
9943         (check_breakpoints): Adjust.  Use release_breakpoint.
9944         (breakpoint_here): Rewrite using find_raw_breakpoint_at.
9945         (breakpoint_inserted_here): Ditto.
9946         (check_mem_read): Adjust to iterate over raw breakpoints instead.
9947         Don't trust the breakpoint's shadow if it is not inserted.
9948         (check_mem_write): Adjust to iterate over raw breakpoints instead.
9949         (delete_all_breakpoints): Adjust.
9950         (free_all_breakpoints): Mark all breakpoints as uninserted, and
9951         use delete_breakpoint_1.
9952
9953         * mem-break.h (breakpoints_supported): Delete declaration.
9954         (set_gdb_breakpoint_at): Declare.
9955         (gdb_breakpoint_here): Declare.
9956         (delete_breakpoint_at): Delete.
9957         (delete_gdb_breakpoint_at): Declare.
9958
9959         * server.h (struct raw_breakpoint): Forward declare.
9960         (struct process_info): New field `raw_breakpoints'.
9961
9962         * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
9963         breakpoints.
9964
9965 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
9966
9967         * linux-low.c (status_pending_p_callback): Fix comment.
9968         (linux_wait_for_event_1): Move most of the internal breakpoint
9969         handling from here...
9970         (linux_wait_1): ... to here.
9971         (count_events_callback): New.
9972         (select_singlestep_lwp_callback): New.
9973         (select_event_lwp_callback): New.
9974         (cancel_breakpoints_callback): New.
9975         (select_event_lwp): New.
9976         (linux_wait_1): Simplify internal breakpoint handling.  Give equal
9977         priority to all LWPs that have had events that should be reported
9978         to the client.  Cancel breakpoints when about to reporting the
9979         event to the client, not while stopping lwps.  No longer cancel
9980         finished single-steps here.
9981         (cancel_finished_single_step): Delete.
9982         (cancel_finished_single_steps): Delete.
9983
9984 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
9985
9986         * mem-break.c (enum bkpt_type): New.
9987         (struct breakpoint): New field `type'.
9988         (set_breakpoint_at): Change return type to struct breakpoint
9989         pointer.  Set type to `other_breakpoint' by default.
9990         (delete_breakpoint): Rewrite, supporting more than one breakpoint
9991         in the breakpoint list.
9992         (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
9993         (reinsert_breakpoint): Rename to ...
9994         (reinsert_raw_breakpoint): ... this.
9995         (reinsert_breakpoints_at): Adjust.
9996         * mem-break.h (struct breakpoint): Declare.
9997         (set_breakpoint_at): Change return type to struct breakpoint
9998         pointer.
9999
10000 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
10001
10002         * server.c (handle_query): Assign, not compare.
10003
10004 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
10005
10006         Teach linux gdbserver to step-over-breakpoints.
10007
10008         * linux-low.c (can_hardware_single_step): New.
10009         (supports_breakpoints): New.
10010         (handle_extended_wait): If stopping threads, read the stop pc of
10011         the new cloned LWP.
10012         (get_pc): New.
10013         (get_stop_pc): Add `lwp' parameter.  Handle it.  Bail out if the
10014         low target doesn't support retrieving the PC.
10015         (add_lwp): Set last_resume_kind to resume_continue.
10016         (linux_attach_lwp_1): Adjust comments.  Always set stop_expected.
10017         (linux_attach): Don't clear stop_expected.  Set the lwp's
10018         last_resume_kind to resume_stop.
10019         (linux_detach_one_lwp): Don't check for removed breakpoints.
10020         (check_removed_breakpoint): Delete.
10021         (status_pending_p): Rename to ...
10022         (status_pending_p_callback): ... this.  Don't check for removed
10023         breakpoints.  Don't consider threads that are stopped from GDB's
10024         perspective.
10025         (linux_wait_for_lwp): Always read the stop_pc here.
10026         (cancel_breakpoint): New.
10027         (step_over_bkpt): New global.
10028         (linux_wait_for_event_1): Implement stepping over breakpoints.
10029         (gdb_wants_lwp_stopped): New.
10030         (gdb_wants_all_stopped): New.
10031         (linux_wait_1): Tag threads as gdb-wants-stopped.  Cancel finished
10032         single-step traps here.  Store the thread's last reported target
10033         wait status.
10034         (send_sigstop): Don't clear stop_expected.  Always set it,
10035         instead.
10036         (mark_lwp_dead): Remove reference to pending_is_breakpoint.
10037         (cancel_finished_single_step): New.
10038         (cancel_finished_single_steps): New.
10039         (wait_for_sigstop): Don't cancel finished single-step traps here.
10040         (linux_resume_one_lwp): Don't check for removed breakpoints.
10041         Don't set `step' on non-hardware step archs.
10042         (linux_set_resume_request): Ignore resume_stop requests if already
10043         stopping or stopped.  Set the lwp's last_resume_kind.
10044         (resume_status_pending_p): Don't check for removed breakpoints.
10045         (need_step_over_p): New.
10046         (start_step_over): New.
10047         (finish_step_over): New.
10048         (linux_resume_one_thread): Always queue a sigstop for resume_stop
10049         requests.  Clear the thread's last reported target waitstatus.
10050         Don't use the `suspended' flag.  Don't consider pending breakpoints.
10051         (linux_resume): Start a step-over if necessary.
10052         (proceed_one_lwp): New.
10053         (proceed_all_lwps): New.
10054         (unstop_all_lwps): New.
10055         * linux-low.h (struct lwp_info): Rewrite comment for the
10056         `suspended' flag.  Add the `stop_pc' field.  Delete the
10057         `pending_stop_pc' field.  Tweak the `stepping' flag's comment.
10058         Add `'last_resume_kind' and `need_step_over' fields.
10059         * inferiors.c (struct thread_info): Delete, moved elsewhere.
10060         * mem-break.c (struct breakpoint): Delete `reinserting' flag.
10061         Delete `breakpoint_to_reinsert' field.  New flag `inserted'.
10062         (set_raw_breakpoint_at): New.
10063         (set_breakpoint_at): Rewrite to use it.
10064         (reinsert_breakpoint_handler): Delete.
10065         (set_reinsert_breakpoint): New.
10066         (reinsert_breakpoint_by_bp): Delete.
10067         (delete_reinsert_breakpoints): New.
10068         (uninsert_breakpoint): Rewrite.
10069         (uninsert_breakpoints_at): New.
10070         (reinsert_breakpoint): Rewrite.
10071         (reinsert_breakpoints_at): New.
10072         (check_breakpoints): Rewrite.
10073         (breakpoint_here): New.
10074         (breakpoint_inserted_here): New.
10075         (check_mem_read): Adjust.
10076         * mem-break.h (breakpoints_supported, breakpoint_here)
10077         (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10078         (reinsert_breakpoint_by_bp): Delete declaration.
10079         (delete_reinsert_breakpoints): Declare.
10080         (reinsert_breakpoint): Delete declaration.
10081         (reinsert_breakpoints_at): Declare.
10082         (uninsert_breakpoint): Delete declaration.
10083         (uninsert_breakpoints_at): Declare.
10084         (check_breakpoints): Adjust prototype.
10085         * server.h: Adjust include order.
10086         (struct thread_info): Declare here.  Add a `last_status' field.
10087
10088 2010-03-23  Michael Snyder  <msnyder@vmware.com>
10089
10090         * server.c (crc32): New function.
10091         (handle_query): Add handling for 'qCRC:' request.
10092
10093 2010-03-23  Pedro Alves  <pedro@codesourcery.com>
10094
10095         * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10096         lwp had been stopped by a watchpoint.
10097
10098 2010-03-16  Pedro Alves  <pedro@codesourcery.com>
10099
10100         * server.h (internal_error): Declare.
10101         (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
10102         * utils.c (internal_error): New function.
10103
10104 2010-03-15  Andreas Schwab  <schwab@redhat.com>
10105
10106         * configure.srv: Fix typo setting srv_regobj.
10107
10108 2010-03-15  Pedro Alves  <pedro@codesourcery.com>
10109
10110         * linux-low.c (fetch_register): Avoid passing a non string literal
10111         format to `error'.
10112         (usr_store_inferior_registers): Ditto.
10113
10114 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
10115
10116         * linux-low.c (linux_write_memory): Bail out early if peeking
10117         memory failed.
10118
10119 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
10120
10121         * linux-low.h (struct lwp_info): New fields
10122         `stopped_by_watchpoint' and `stopped_data_address'.
10123         * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
10124         here, and cache them in the lwp object.
10125         (wait_for_sigstop): Check stopped_by_watchpoint lwp field
10126         directly.
10127         (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
10128         field.
10129         (linux_stopped_by_watchpoint): Rewrite.
10130         (linux_stopped_data_address): Rewrite.
10131
10132 2010-03-06  Simo Melenius  <simo.melenius@iki.fi>
10133
10134         * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
10135         switching the current inferior, not before.
10136
10137 2010-03-01  H.J. Lu  <hongjiu.lu@intel.com>
10138
10139         * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
10140         reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
10141         i386-linux.c and amd64-linux.c.
10142         (reg-i386.o): Removed.
10143         (reg-i386.c): Likewise.
10144         (reg-i386-linux.o): Likewise.
10145         (reg-i386-linux.c): Likewise.
10146         (reg-x86-64.o): Likewise.
10147         (reg-x86-64.c): Likewise.
10148         (reg-x86-64-linux.o): Likewise.
10149         (reg-x86-64-linux.c): Likewise.
10150         (i386.o): New.
10151         (i386.c): Likewise.
10152         (i386-linux.o): Likewise.
10153         (i386-linux.c): Likewise.
10154         (amd64.o): Likewise.
10155         (amd64.c): Likewise.
10156         (amd64-linux.o): Likewise.
10157         (amd64-linux.c): Likewise.
10158
10159         * configure.srv (srv_i386_regobj): New.
10160         (srv_i386_linux_regobj): Likewise.
10161         (srv_amd64_regobj): Likewise.
10162         (srv_amd64_linux_regobj): Likewise.
10163         (srv_i386_32bit_xmlfiles): Likewise.
10164         (srv_i386_64bit_xmlfiles): Likewise.
10165         (srv_i386_xmlfiles): Likewise.
10166         (srv_amd64_xmlfiles): Likewise.
10167         (srv_i386_linux_xmlfiles): Likewise.
10168         (srv_amd64_linux_xmlfiles): Likewise.
10169         (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj.  Set
10170         srv_xmlfiles to $srv_i386_xmlfiles.
10171         (i[34567]86-*-mingw32ce*): Likewise.
10172         (i[34567]86-*-mingw*): Likewise.
10173         (i[34567]86-*-nto*): Likewise.
10174         (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
10175         and $srv_amd64_linux_regobj.  Set srv_xmlfiles to
10176         $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
10177         (x86_64-*-linux*): Likewise.
10178
10179         * linux-x86-low.c (init_registers_x86_64_linux): Removed.
10180         (init_registers_amd64_linux): New.
10181         (x86_arch_setup): Replace init_registers_x86_64_linux with
10182         init_registers_amd64_linux.
10183
10184 2010-02-23  Maxim Kuvyrkov  <maxim@codesourcery.com>
10185
10186         * configure.ac: Check for libdl.  If it is not available link against
10187         static libthread_db.
10188         * configure: Regenerate.
10189
10190 2010-02-22  Pedro Alves  <pedro@codesourcery.com>
10191
10192         PR9605
10193
10194         * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
10195         handing a read watchpoint.
10196         (i386_low_insert_watchpoint): Read watchpoints aren't supported.
10197
10198 2010-02-12  Doug Evans  <dje@google.com>
10199
10200         * linux-low.c (linux_supports_tracefork_flag): Document.
10201         (linux_look_up_symbols): Add comment.
10202
10203 2010-02-03  H.J. Lu  <hongjiu.lu@intel.com>
10204
10205         * regcache.c (supply_register): Clear regcache if buf is NULL.
10206
10207 2010-02-02  Nicolas Roche  <roche@sourceware.org>
10208             Joel Brobecker  <brobecker@adacore.com>
10209
10210         * inferiors.c (find_inferior): Add function documentation.
10211         (unloaded_dll): Handle the case where the unloaded dll has not
10212         been previously registered in the dll list.
10213
10214 2010-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
10215
10216         * linux-arm-low.c (thumb_breakpoint_len): Delete.
10217         (thumb2_breakpoint): New.
10218         (arm_breakpoint_at): Check for Thumb-2 breakpoints.
10219
10220 2010-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
10221
10222         * linux-low.c (get_stop_pc): Check for SIGTRAP.
10223         (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
10224         breakpoints.
10225
10226 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
10227
10228         * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
10229
10230 2010-01-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
10231
10232         * linux-s390-low.c (s390_collect_ptrace_register)
10233         (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
10234
10235 2010-01-21  Doug Evans  <dje@google.com>
10236
10237         * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
10238         (PTRACE_ARG4_TYPE): New macro.
10239         (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
10240         (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
10241         (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
10242         (usr_store_inferior_registers): Ditto.
10243         (linux_read_memory, linux_write_memory): Ditto.
10244         (linux_test_for_tracefork): Ditto.
10245
10246         * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
10247         Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
10248
10249 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
10250
10251         * proc-service.c (ps_lgetregs): Don't refetch registers from the
10252         target.
10253
10254 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
10255
10256         * spu-low.c (spu_fetch_registers, spu_store_registers): Change
10257         prototype to take a regcache.  Adjust.
10258
10259 2010-01-20  Pedro Alves  <pedro@codesourcery.com>
10260
10261         * regcache.h (struct thread_info): Forward declare.
10262         (struct regcache): New.
10263         (new_register_cache): Adjust prototype.
10264         (get_thread_regcache): Declare.
10265         (free_register_cache): Adjust prototype.
10266         (registers_to_string, registers_from_string): Ditto.
10267         (supply_register, supply_register_by_name, collect_register)
10268         (collect_register_as_string, collect_register_by_name): Ditto.
10269         * regcache.c (struct inferior_regcache_data): Delete.
10270         (get_regcache): Rename to ...
10271         (get_thread_regcache): ... this.  Adjust.  Switch inferior before
10272         fetching registers.
10273         (regcache_invalidate_one): Adjust.
10274         (regcache_invalidate): Fix prototype.
10275         (new_register_cache): Return the new register cache.
10276         (free_register_cache): Change prototype.
10277         (realloc_register_cache): Adjust.
10278         (registers_to_string): Change prototype to take a regcache.  Adjust.
10279         (registers_from_string): Ditto.
10280         (register_data): Ditto.
10281         (supply_register): Ditto.
10282         (supply_register_by_name): Ditto.
10283         (collect_register): Ditto.
10284         (collect_register_as_string): Ditto.
10285         (collect_register_by_name): Ditto.
10286         * server.c (process_serial_event): Adjust.
10287         * linux-low.h (regset_fill_func, regset_store_func): Change
10288         prototype.
10289         (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
10290         Change prototype.
10291         * linux-low.c (get_stop_pc): Adjust.
10292         (check_removed_breakpoint): Adjust.
10293         (linux_wait_for_event): Adjust.
10294         (linux_resume_one_lwp): Adjust.
10295         (fetch_register): Add regcache parameter.  Adjust.
10296         (usr_store_inferior_registers): Ditto.
10297         (regsets_fetch_inferior_registers): Ditto.
10298         (regsets_store_inferior_registers): Ditto.
10299         (linux_fetch_registers, linux_store_registers): Ditto.
10300         * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
10301         regcache.  Adjust.
10302         (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
10303         Ditto.
10304         * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
10305         prototype to take a regcache.
10306         (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
10307         * remote-utils.c (convert_ascii_to_int, outreg)
10308         (prepare_resume_reply): Change prototype to take a regcache.
10309         Adjust.
10310         * target.h (struct target_ops) <fetch_registers, store_registers>:
10311         Change prototype to take a regcache.
10312         (fetch_inferior_registers, store_inferior_registers): Change
10313         prototype to take a regcache.  Adjust.
10314         * proc-service.c (ps_lgetregs): Adjust.
10315         * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
10316         (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
10317         (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
10318         take a regcache.  Adjust.
10319         * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
10320         (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
10321         (arm_store_vfpregset, arm_get_pc, arm_set_pc):
10322         (arm_breakpoint_at): Change prototype to take a regcache.  Adjust.
10323         * linux-cris-low.c (cris_get_pc, cris_set_pc)
10324         (cris_cannot_fetch_register):
10325         (cris_breakpoint_at): Change prototype to take a regcache.
10326         Adjust.
10327         * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
10328         cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
10329         to take a regcache.  Adjust.
10330         (cris_breakpoint_at, cris_insert_point, cris_remove_point):
10331         Adjust.
10332         * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
10333         take a regcache.  Adjust.
10334         * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
10335         (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
10336         (m68k_set_pc): Change prototype to take a regcache.  Adjust.
10337         * linux-mips-low.c (mips_get_pc):
10338         (mips_set_pc): Change prototype to take a regcache.  Adjust.
10339         (mips_reinsert_addr): Adjust.
10340         (mips_collect_register): Change prototype to take a regcache.
10341         Adjust.
10342         (mips_supply_register):
10343         (mips_collect_register_32bit, mips_supply_register_32bit)
10344         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10345         (mips_store_fpregset): Ditto.
10346         * linux-ppc-low.c (ppc_supply_ptrace_register)
10347         (ppc_supply_ptrace_register): Ditto.
10348         (parse_spufs_run): Adjust.
10349         (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
10350         (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
10351         (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
10352         take a regcache.  Adjust.
10353         * linux-s390-low.c (s390_collect_ptrace_register)
10354         (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
10355         (s390_set_pc): Change prototype to take a regcache.  Adjust.
10356         (s390_arch_setup): Adjust.
10357         * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
10358         (sh_fill_gregset): Change prototype to take a regcache.  Adjust.
10359         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10360         (sparc_fill_gregset, sparc_store_gregset_from_stack)
10361         (sparc_store_gregset, sparc_get_pc): Change prototype to take a
10362         regcache.  Adjust.
10363         (sparc_breakpoint_at): Adjust.
10364         * linux-xtensa-low.c (xtensa_fill_gregset):
10365         (xtensa_store_gregset):
10366         (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
10367         (xtensa_set_pc): Change prototype to take a regcache.  Adjust.
10368         * nto-low.c (nto_fetch_registers, nto_store_registers): Change
10369         prototype to take a regcache.  Adjust.
10370         * win32-arm-low.c (arm_fetch_inferior_register)
10371         (arm_store_inferior_register): Change prototype to take a
10372         regcache.  Adjust.
10373         * win32-i386-low.c (i386_fetch_inferior_register)
10374         (i386_store_inferior_register): Change prototype to take a
10375         regcache.  Adjust.
10376         * win32-low.c (child_fetch_inferior_registers)
10377         (child_store_inferior_registers): Change prototype to take a
10378         regcache.  Adjust.
10379         (win32_wait): Adjust.
10380         (win32_fetch_inferior_registers): Change prototype to take a
10381         regcache.  Adjust.
10382         (win32_store_inferior_registers): Adjust.
10383         * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
10384         store_inferior_register>: Change prototype to take a regcache.
10385
10386 2010-01-20  Doug Evans  <dje@google.com>
10387
10388         * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
10389         #ifdef.
10390         (linux_wait_for_event1, linux_init_signals): Ditto.
10391         (W_STOPCODE): Provide definition if missing.
10392
10393 2010-01-13  Vladimir Prus  <vladimir@codesourcery.com>
10394
10395         * linux-low.c (linux_core_of_thread): New.
10396         (compare_ints, show_process, list_threads): New.
10397         (linux_qxfer_osdata): Report threads and cores.
10398         (linux_target_op): Register linux_core_of_thread.
10399         * remote-utils.c (prepare_resume_reply): Report the core.
10400         (buffer_xml_printf): Support %d specifier.
10401         * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
10402         New.
10403         (handle_query): Handle qXfer:threads.  Announce availability
10404         thereof.
10405         * target.h (struct target_ops): New field core_of_thread.
10406
10407 2010-01-04  Ulrich Weigand  <uweigand@de.ibm.com>
10408
10409         * Makefile.in (clean): Remove new generated files.
10410         (reg-s390.o, reg-s390.c): Remove rules.
10411         (reg-s390x.o, reg-s390x.c): Likewise.
10412         (s390-linux32.o, s390-linux32.c): Add rules.
10413         (s390-linux64.o, s390-linux64.c): Likewise.
10414         (s390x-linux64.o, s390x-linux64.c): Likewise.
10415         * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
10416         * linux-s390-low.c: Include <elf.h>.
10417         (HWCAP_S390_HIGH_GPRS): Define if undefined.
10418         (init_registers_s390): Remove prototype.
10419         (init_registers_s390x): Likewise.
10420         (init_registers_s390_linux32): Add prototype.
10421         (init_registers_s390_linux64): Likewise.
10422         (init_registers_s390x_linux64): Likewise.
10423         (s390_num_regs_3264): New define.
10424         (s390_regmap_3264): New global variable.
10425         (s390_cannot_fetch_register): Remove obsolete check.
10426         (s390_cannot_store_register): Likewise.
10427         (s390_collect_ptrace_register): Handle upper/lower register halves.
10428         (s390_supply_ptrace_register): Likewise.
10429         (s390_fill_gregset): Update to register number changes.
10430         (s390_get_hwcap): New routine.
10431         (s390_arch_setup): Detect 32-bit process running on 64-bit system.
10432         Install appropriate regmap and register set.
10433
10434 2010-01-01  Joel Brobecker  <brobecker@adacore.com>
10435
10436         * server.c (gdbserver_version): Update copyright year to 2010.
10437         * gdbreplay.c (gdbreplay_version): Likewise.
10438
10439 2009-12-28  Doug Evans  <dje@google.com>
10440
10441         * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
10442         elf/external.h.  Include <elf.h> instead but only if necessary.
10443
10444 2009-12-28  Pedro Alves  <pedro@codesourcery.com>
10445
10446         * linux-low.c (linux_remove_process): Remove `detaching'
10447         parameter.  Don't release/detach from thread_db here.
10448         (linux_kill): Release/detach from thread_db here, ...
10449         (linux_detach): ... and here, before actually detaching.
10450         (linux_wait_1): ... and here, when a process exits.
10451         * thread-db.c (any_thread_of): New.
10452         (thread_db_free): Switch the current inferior to a thread of the
10453         passed in process.
10454
10455 2009-12-21  Doug Evans  <dje@google.com>
10456
10457         * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
10458
10459         * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
10460         Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
10461         warning ifndef __NR_tkill.  Move setting of errno there too.
10462         Delete unnecessary resetting of errno after syscall.
10463         Minor comment changes to match gdb/linux-nat.c:kill_lwp.
10464
10465         * configure.ac: Check for dladdr.
10466         * config.in: Regenerate.
10467         * configure: Regenerate.
10468         * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
10469         (try_thread_db_load): Update.
10470
10471         * linux-low.c (my_waitpid): Delete unnecessary prototype.
10472
10473 2009-12-18  Doug Evans  <dje@google.com>
10474
10475         * event-loop.c: Include unistd.h if it exists.
10476
10477         * linux-low.c (my_waitpid): Move definition away from being in
10478         between linux_tracefork_child/linux_test_for_tracefork.
10479
10480         * gdb_proc_service.h (psaddr_t): Fix type.
10481         * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
10482         signature to match glibc.
10483
10484 2009-12-16  Doug Evans  <dje@google.com>
10485
10486         * linux-low.c (linux_read_memory): Fix argument to read.
10487
10488 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
10489
10490         * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
10491         events, don't leave current_inferior pointing at null.
10492
10493 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
10494
10495         * win32-low.c (LOG): Delete.
10496         (OUTMSG): Output to stderr.
10497         (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
10498         on compile time LOG macro.
10499         (win32_wait): Fix debug output.
10500
10501 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
10502
10503         * win32-low.c (win32_add_one_solib): If the dll name is
10504         "ntdll.dll", prepend the system directory to the dll path.
10505
10506 2009-11-17  Daniel Jacobowitz  <dan@codesourcery.com>
10507
10508         * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
10509
10510 2009-11-17  Nathan Sidwell  <nathan@codesourcery.com>
10511             Vladimir Prus  <vladimir@codesourcery.com>
10512
10513         * Makefile.in (reg-cf.o, reg-cf.c): New targets.
10514         * configure.ac: Check for __mcoldfire__ and set
10515         gdb_cv_m68k_is_coldfire.
10516         * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
10517         reg-cf.o and reg-m68k.o.
10518         * configure: Regenerated.
10519
10520 2009-11-16  Pedro Alves  <pedro@codesourcery.com>
10521
10522         * linux-low.c (linux_remove_process): Add `detaching' parameter.
10523         Pass it to thread_db_free.
10524         (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
10525         proper `detaching' argument to linux_remove_process.
10526         * linux-low.h (thread_db_free): Add `detaching' parameter.
10527         * thread-db.c (thread_db_init): Pass false as `detaching' argument
10528         to thread_db_free.
10529         (thread_db_free): Add `detaching' parameter.  Only
10530         call td_ta_clear_event if detaching from process.
10531
10532 2009-11-12  Maxim Kuvyrkov  <maxim@codesourcery.com>
10533
10534         * thread-db.c (thread_db_free): Fix typo.
10535
10536 2009-11-11  Paul Pluzhnikov  <ppluzhnikov@google.com>
10537
10538         PR gdb/10838
10539         * thread-db.c (thread_db_free): Call td_ta_clear_event.
10540
10541 2009-11-03  Nathan Sidwell  <nathan@codesourcery.com>
10542
10543         * configure.ac (i[34567]86-*): Check if we're targetting x86-64
10544         with an i686 compiler.
10545         * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
10546         needed.
10547         * configure: Rebuilt.
10548
10549 2009-10-29  Sandra Loosemore  <sandra@codesourcery.com>
10550
10551         PR gdb/10783
10552
10553         * server.c (handle_search_memory_1): Correct read_addr initialization
10554         in loop for searching subsequent chunks.
10555
10556 2009-10-29  Paul Pluzhnikov  <ppluzhnikov@google.com>
10557
10558         * configure.ac: New --with-libthread-db option.
10559         * thread-db.c: Allow direct dependence on libthread_db.
10560         (thread_db_free): Adjust.
10561         * config.in: Regenerate.
10562         * configure: Likewise.
10563
10564 2009-10-28  Paul Pluzhnikov  <ppluzhnikov@google.com>
10565
10566         PR gdb/10757
10567         * thread-db.c (attach_thread): New function.
10568         (maybe_attach_thread): Return success/failure.
10569         (find_new_threads_callback): Adjust.
10570         (thread_db_find_new_threads): Loop until no new threads.
10571
10572 2009-10-13  Pedro Alves  <pedro@codesourcery.com>
10573
10574         * proc-service.c (ps_lgetregs): Formatting.
10575
10576 2009-10-08  Paul Pluzhnikov  <ppluzhnikov@google.com>
10577
10578         * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
10579         * configure.ac: Adjust.
10580         * linux-low.h (struct process_info_private): Move members to struct
10581         thread_db.
10582         (thread_db_free, thread_db_handle_monitor_command): New prototype.
10583         * linux-low.c (linux_remove_process): Adjust.
10584         (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
10585         * server.c (handle_query): Move code ...
10586         (handle_monitor_command): ... here. New function.
10587         * target.h (struct target_ops): New member.
10588         * thread-db.c (struct thread_db): New.
10589         (libthread_db_search_path): New variable.
10590         (thread_db_create_event, thread_db_enable_reporting)
10591         (find_one_thread, maybe_attach_thread, find_new_threads_callback)
10592         (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
10593         (try_thread_db_load_1, dladdr_to_soname): New functions.
10594         (try_thread_db_load, thread_db_load_search): New functions.
10595         (thread_db_init): Search for libthread_db.
10596         (thread_db_free): New function.
10597         (thread_db_handle_monitor_command): Likewise.
10598         * config.in: Regenerate.
10599         * configure: Regenerate.
10600
10601 2009-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
10602
10603         * spu-low.c (spu_kill): Wait for inferior to terminate.
10604         Call clear_inferiors.
10605         (spu_detach): Call clear_inferiors.
10606
10607 2009-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10608
10609         * aclocal.m4: Regenerate.
10610         * config.in: Likewise.
10611         * configure: Likewise.
10612
10613 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
10614
10615         * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
10616         (parse_spufs_run): New function.
10617         (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
10618         (ppc_breakpoint_at): Handle SPU breakpoints.
10619
10620 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
10621
10622         * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
10623         (SPUFS_MAGIC): Define.
10624         (spu_enumerate_spu_ids): New function.
10625         (linux_qxfer_spu): New function.
10626         (linux_target_ops): Install linux_qxfer_spu.
10627
10628 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
10629
10630         * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
10631         and powerpc-cell64l.o to srv_regobj.  Add rs6000/powerpc-cell32l.xml
10632         and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
10633         * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
10634         (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
10635         (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
10636         * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
10637         (init_registers_powerpc_cell32l): Add prototype.
10638         (init_registers_powerpc_cell64l): Likewise.
10639         (ppc_arch_setup): Detect Cell/B.E. architecture.
10640
10641 2009-07-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10642
10643         * Makefile.in (datarootdir): New variable.
10644
10645 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
10646
10647         * linux-low.c (linux_write_memory): Update debugging output.
10648         * Makefile.in (clean): Add new descriptions.
10649         (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
10650         (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
10651         * configure.srv: Add new files for arm*-*-linux*.
10652         * linux-arm-low.c: Add new declarations.
10653         (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
10654         (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
10655         (HWCAP_VFPv3D16): New.
10656         (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
10657         instead of __IWMMXT__.
10658         (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
10659         (arm_arch_setup): New.
10660         (target_regsets): Remove #ifdef.  Add VFP regset.
10661         (the_low_target): Use arm_arch_setup.
10662
10663 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
10664
10665         * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
10666         the main thread again.
10667
10668 2009-07-06  Aleksandar Ristovski  <aristovski@qnx.com>
10669
10670         Adding Neutrino gdbserver.
10671         * configure: Regenerated.
10672         * configure.ac: Add case for srv_qnx and set LIBS accordingly.
10673         * configure.srv (i[34567]86-*-nto*): New target.
10674         * nto-low.c, nto-low.h, nto-x86-low.c: New files.
10675         * remote-utils.c [__QNX__]: Include sys/iomgr.h
10676         (nto_comctrl) [__QNX__]: New function.
10677         (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
10678
10679 2009-07-05  Danny Backx  <dannybackx@users.sourceforge.net>
10680
10681         * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
10682         srv_tgtobj.
10683
10684 2009-07-04  Danny Backx  <dannybackx@users.sourceforge.net>
10685             Pedro Alves  <pedro@codesourcery.com>
10686
10687         * win32-i386-low.c (i386_get_thread_context): Handle systems that
10688         don't support CONTEXT_EXTENDED_REGISTERS.
10689         (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
10690         (the_low_target): Install them.
10691         * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
10692         failing with ERROR_PIPE_NOT_CONNECTED.
10693
10694 2009-06-30  Doug Evans  <dje@google.com>
10695             Pierre Muller  <muller@ics.u-strasbg.fr>
10696
10697         Add h/w watchpoint support to x86-linux, win32-i386.
10698         * Makefile.in (SFILES): Add i386-low.c
10699         (i386_low_h): Define.
10700         (i386-low.o): Add dependencies.
10701         (linux-x86-low.o): Add i386-low.h dependency.
10702         (win32-i386-low.o): Ditto.
10703         * i386-low.c: New file.
10704         * i386-low.h: New file.
10705         * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
10706         (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
10707         * linux-low.c (linux_add_process): Initialize arch_private.
10708         (linux_remove_process): Free arch_private.
10709         (add_lwp): Initialize arch_private.
10710         (delete_lwp): Free arch_private.
10711         (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
10712         provided.
10713         * linux-low.h (process_info_private): New member arch_private.
10714         (lwp_info): New member arch_private.
10715         (linux_target_ops): New members new_process, new_thread,
10716         prepare_to_resume.
10717         (ptid_of): New macro.
10718         * linux-x86-low.c: Include stddef.h, i386-low.h.
10719         (arch_process_info): New struct.
10720         (arch_lwp_info): New struct.
10721         (x86_linux_dr_get, x86_linux_dr_set): New functions.
10722         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10723         (i386_dr_low_get_status): New function.
10724         (x86_insert_point, x86_remove_point): New functions.
10725         (x86_stopped_by_watchpoint): New function.
10726         (x86_stopped_data_address): New function.
10727         (x86_linux_new_process, x86_linux_new_thread): New functions.
10728         (x86_linux_prepare_to_resume): New function.
10729         (the_low_target): Add entries for insert_point, remove_point,
10730         stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
10731         prepare_to_resume.
10732         * server.c (debug_hw_points): New global.
10733         (monitor_show_help): Document set debug-hw-points.
10734         (handle_query): Process "set debug-hw-points".
10735         * server.h (debug_hw_points): Declare.
10736         (paddress): Declare.
10737         * utils.c (NUMCELLS, CELLSIZE): New macros.
10738         (get_sell, xsnprintf, paddress): New functions.
10739         * win32-arm-low.c (the_low_target): Add entries for insert_point,
10740         remove_point, stopped_by_watchpoint, stopped_data_address.
10741         * win32-i386-low.c: Include i386-low.h.
10742         (debug_reg_state): Replaces dr.
10743         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10744         (i386_dr_low_get_status): New function.
10745         (i386_insert_point, i386_remove_point): New functions.
10746         (i386_stopped_by_watchpoint): New function.
10747         (i386_stopped_data_address): New function.
10748         (i386_initial_stuff): Update.
10749         (get_thread_context,set_thread_context,i386_thread_added): Update.
10750         (the_low_target): Add entries for insert_point,
10751         remove_point, stopped_by_watchpoint, stopped_data_address.
10752         * win32-low.c (win32_insert_watchpoint): New function.
10753         (win32_remove_watchpoint): New function.
10754         (win32_stopped_by_watchpoint): New function.
10755         (win32_stopped_data_address): New function.
10756         (win32_target_ops): Add entries for insert_watchpoint,
10757         remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
10758         * win32-low.h (win32_target_ops): New members insert_point,
10759         remove_point, stopped_by_watchpoint, stopped_data_address.
10760
10761 2009-06-25  Pedro Alves  <pedro@codesourcery.com>
10762
10763         * server.c (process_serial_event): Re-return unsupported, not
10764         error, if the type isn't recognized.  Re-allow supporting only
10765         insert or remove packets.  Also call require_running for
10766         breakpoints.  Add missing break statement to default case.  Tidy.
10767         * target.h (struct target_ops): Rename insert_watchpoint to
10768         insert_point, and remove_watchpoint to remove_point.
10769
10770         * linux-low.h (struct linux_target_ops): Likewise.
10771         * linux-low.c (linux_insert_watchpoint): Rename to ...
10772         (linux_insert_point): ... this.  Adjust.
10773         (linux_remove_watchpoint): Rename to ...
10774         (linux_remove_point): ... this.  Adjust.
10775         (linux_target_ops): Adjust.
10776         * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
10777         (cris_insert_point): ... this.
10778         (cris_remove_watchpoint): Rename to ...
10779         (cris_remove_point): ... this.
10780         (the_low_target): Adjust.
10781
10782 2009-06-24  Pierre Muller  <muller@ics.u-strasbg.fr>
10783
10784         * server.c (handle_v_kill): Pass signal_pid to
10785         kill_inferior if multi_process is zero.
10786
10787 2009-06-23  Aleksandar Ristovski  <aristovski@qnx.com>
10788
10789         * server.c (process_serial_event): Add support for Z0 and Z1 packet.
10790         * target.h (target_ops): Comment for *_watchpoint to make it clear
10791         the functions can get types '0' and '1'.
10792
10793 2009-06-22  Aleksandar Ristovski  <aristovski@qnx.com>
10794
10795         * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
10796         * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
10797         * regcache.c (get_regcache): Likewise.
10798         * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
10799         * win32-low.c (child_fetch_inferior_registers): Remove check for
10800         regno 0.
10801
10802 2009-06-19  Aleksandar Ristovski  <aristovski@qnx.com>
10803             Pedro Alves <pedro@codesourcery.com>
10804
10805         * target.h (struct target_ops) <supports_multi_process>: New
10806         callback.
10807         (target_supports_multi_process): New.
10808         * server.c (handle_query): Even if GDB reports support, only
10809         enable multi-process if the target also supports it.  Report
10810         multi-process support only if the target backend supports it.
10811         * linux-low.c (linux_supports_multi_process): New function.
10812         (linux_target_ops): Install it as target_supports_multi_process
10813         callback.
10814
10815 2009-05-24  Doug Evans  <dje@google.com>
10816
10817         Global renaming of find_thread_pid to find_thread_ptid.
10818         * server.h (find_thread_ptid): Renamed from find_thread_pid.
10819         * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
10820         All callers updated.
10821
10822         * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
10823         to resume the newly created thread, don't call ptrace (PTRACE_CONT)
10824         directly.
10825
10826         * linux-low.c (get_stop_pc): Print pc if debug_threads.
10827         (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
10828         (linux_resume_one_lwp): Ditto.
10829
10830 2009-05-23  Doug Evans  <dje@google.com>
10831
10832         * linux-low.c (linux_resume_one_lwp): Change type of first arg
10833         from struct inferior_list_entry * to struct lwp_info *.
10834         All callers updated.
10835
10836 2009-05-13  Doug Evans  <dje@google.com>
10837
10838         * linux-x86-low.c: Don't include assert.h.
10839         (x86_siginfo_fixup): Use fatal, not assert.
10840         (x86_arch_setup): Fix comment.
10841
10842 2009-05-12  Doug Evans  <dje@google.com>
10843
10844         Biarch support for i386/amd64 gdbserver.
10845         * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
10846         Add linux-x86-low.c.
10847         (linux-i386-low.o, linux-x86-64-low.o): Delete.
10848         (linux-x86-low.o): Add.
10849         * linux-x86-64-low.c: Delete.
10850         * linux-i386-low.c: Delete.
10851         * linux-x86-low.c: New file.
10852         * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
10853         linux-x86-low.o.
10854         (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
10855         linux-x86-low.o.
10856         (x86_64-linux srv_regobj): Add reg-i386-linux.o.
10857         * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
10858         (linux_child_pid_to_exec_file): New function.
10859         (elf_64_header_p, elf_64_file_p): New functions.
10860         (siginfo_fixup): New function.
10861         (linux_xfer_siginfo): New local inf_siginfo.  Call siginfo_fixup to
10862         give target a chance to convert layout.
10863         * linux-low.h (linux_target_ops): New member siginfo_fixup.
10864         (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
10865
10866 2009-05-07  Doug Evans  <dje@google.com>
10867
10868         * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
10869         (regsets_store_inferior_registers): Ditto.
10870
10871 2009-05-06  Pedro Alves  <pedro@codesourcery.com>
10872
10873         PR server/10048
10874
10875         * linux-low.c (must_set_ptrace_flags): Delete.
10876         (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
10877         of the global.
10878         (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here.  Set
10879         `lwp->must_set_ptrace_flags' instead.
10880         (linux_wait_for_event_1): Set ptrace options here.
10881         (linux_wait_1): ... not here.
10882
10883 2009-04-30  Doug Evans  <dje@google.com>
10884
10885         * inferiors.c (started_inferior_callback): New function.
10886         (attached_inferior_callback): New function.
10887         (have_started_inferiors_p, have_attached_inferiors_p): New functions.
10888         * server.c (print_started_pid, print_attached_pid): New functions.
10889         (detach_or_kill_for_exit): New function.
10890         (main): Call it instead of for_each_inferior (kill_inferior_callback).
10891         * server.h (have_started_inferiors_p): Declare.
10892         (have_attached_inferiors_p): Declare.
10893
10894         * inferiors.c (remove_process): Fix memory leak, free process.
10895         * linux-low.c (linux_remove_process): New function.
10896         (linux_kill): Call it instead of remove_process.
10897         (linux_detach, linux_wait_1): Ditto.
10898
10899 2009-04-19  Danny Backx  <dannybackx@users.sourceforge.net>
10900
10901         * configure.srv: Add x86 Windows CE target.
10902
10903 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
10904
10905         * inferiors.c (get_thread_process): Make global.
10906         * server.h (get_thread_process): Add prototype.
10907         * thread-db.c (find_one_thread): Use get_thread_process
10908         instead of current_process.
10909         (thread_db_get_tls_address): Do not crash if called when
10910         thread layer is not yet initialized.
10911
10912 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
10913
10914         * remote-utils.c (prepare_resume_reply): Null-terminate packet.
10915         * spu-low.c (current_tid): Rename to ...
10916         (current_ptid): ... this.
10917         (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
10918         spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
10919         ptid_get_lwp (current_ptid) instead of current_tid.
10920         (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
10921         instead of current_tid.  Use find_process_pid to verify pid
10922         argument is valid.  Pass proper argument to remove_process.
10923         (spu_thread_alive): Compare current_ptid instead of current_tid.
10924         (spu_resume): Likewise.
10925
10926 2009-04-02  Pedro Alves  <pedro@codesourcery.com>
10927
10928         * linux-low.c (usr_store_inferior_registers): Declare local `pid'
10929         variable.
10930
10931 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
10932
10933         Implement the multiprocess extensions, and add linux multiprocess
10934         support.
10935
10936         * server.h (ULONGEST): Declare.
10937         (struct ptid, ptid_t): New.
10938         (minus_one_ptid, null_ptid): Declare.
10939         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10940         (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
10941         (struct inferior_list_entry): Change `id' type from unsigned from
10942         to ptid_t.
10943         (struct sym_cache, struct breakpoint, struct
10944         process_info_private): Forward declare.
10945         (struct process_info): Declare.
10946         (current_process): Declare.
10947         (all_processes): Declare.
10948         (initialize_inferiors): Declare.
10949         (add_thread): Adjust to use ptid_t.
10950         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
10951         (add_process, remove_process, find_thread_pid): Declare.
10952         (find_inferior_id): Adjust to use ptid_t.
10953         (cont_thread, general_thread, step_thread): Change type to ptid_t.
10954         (multi_process): Declare.
10955         (push_event): Adjust to use ptid_t.
10956         (read_ptid, write_ptid): Declare.
10957         (prepare_resume_reply): Adjust to use ptid_t.
10958         (clear_symbol_cache): Declare.
10959         * inferiors.c (all_processes): New.
10960         (null_ptid, minus_one_ptid): New.
10961         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10962         (ptid_get_tid, ptid_equal, ptid_is_pid): New.
10963         (add_thread): Change unsigned long to ptid.  Remove gdb_id
10964         parameter.  Adjust.
10965         (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
10966         (gdb_id_to_thread): Rename to ...
10967         (find_thread_pid): ... this.  Change unsigned long to ptid.
10968         (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
10969         (loaded_dll, pull_pid_from_list): Adjust.
10970         (add_process, remove_process, find_process_pid)
10971         (get_thread_process, current_process, initialize_inferiors): New.
10972         * target.h (struct thread_resume) <thread>: Change type to ptid_t.
10973         (struct target_waitstatus) <related_pid>: Ditto.
10974         (struct target_ops) <kill, detach>: Add `pid' argument.  Change
10975         return type to int.
10976         (struct target_ops) <join>: Add `pid' argument.
10977         (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
10978         (struct target_ops) <wait>: Add `ptid' field.  Change return type
10979         to ptid.
10980         (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
10981         (mywait): Add `ptid' argument.  Change return type to ptid_t.
10982         (target_pid_to_str): Declare.
10983         * target.c (set_desired_inferior): Adjust to use ptids.
10984         (mywait): Add new `ptid' argument.  Adjust.
10985         (target_pid_to_str): New.
10986         * mem-break.h (free_all_breakpoints): Declare.
10987         * mem-break.c (breakpoints): Delelete.
10988         (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
10989         (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
10990         to use per-process breakpoint list.
10991         (free_all_breakpoints): New.
10992         * remote-utils.c (struct sym_cache) <name>: Drop `const'.
10993         (symbol_cache, all_symbols_looked_up): Delete.
10994         (hexchars): New.
10995         (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
10996         read_ptid): New.
10997         (prepare_resume_reply): Change ptid argument's type from unsigned
10998         long to ptid_t.  Adjust.  Implement W;process and X;process.
10999         (free_sym_cache, clear_symbol_cache): New.
11000         (look_up_one_symbol): Adjust to per-process symbol cache.  *
11001         * server.c (cont_thread, general_thread, step_thread): Change type
11002         to ptid_t.
11003         (attached): Delete.
11004         (multi_process): New.
11005         (last_ptid): Change type to ptid_t.
11006         (struct vstop_notif) <ptid>: Change type to ptid_t.
11007         (queue_stop_reply, push_event): Change `ptid' argument's type to
11008         ptid_t.
11009         (discard_queued_stop_replies): Add `pid' argument.
11010         (start_inferior): Adjust to use ptids.  Adjust to mywait interface
11011         changes.  Don't reference the `attached' global.
11012         (attach_inferior): Adjust to mywait interface changes.
11013         (handle_query): Adjust to use ptids.  Parse GDB's qSupported
11014         features.  Handle and report "multiprocess+".  Handle
11015         "qAttached:PID".
11016         (handle_v_cont): Adjust to use ptids.  Adjust to mywait interface
11017         changes.
11018         (handle_v_kill): New.
11019         (handle_v_stopped): Adjust to use target_pid_to_str.
11020         (handle_v_requests): Allow multiple attaches and runs when
11021         multiprocess extensions are in effect.  Handle "vKill".
11022         (myresume): Adjust to use ptids.
11023         (queue_stop_reply_callback): Add `arg' parameter.  Handle it.
11024         (handle_status): Adjust to discard_queued_stop_replies interface
11025         change.
11026         (first_thread_of, kill_inferior_callback)
11027         (detach_or_kill_inferior_callback, join_inferiors_callback): New.
11028         (main): Call initialize_inferiors.  Adjust to use ptids, killing
11029         and detaching from all inferiors.  Handle multiprocess packet
11030         variants.
11031         * linux-low.h: Include gdb_proc_service.h.
11032         (struct process_info_private): New.
11033         (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
11034         <lwpid_of>: Use ptid_get_lwp.
11035         (get_lwp_thread): Adjust.
11036         (struct lwp_info): Add `dead' member.
11037         (find_lwp_pid): Declare.
11038         * linux-low.c (thread_db_active): Delete.
11039         (new_inferior): Adjust comment.
11040         (inferior_pid): Delete.
11041         (linux_add_process): New.
11042         (handle_extended_wait): Adjust.
11043         (add_lwp): Change unsigned long to ptid.
11044         (linux_create_inferior): Add process to processes table.  Adjust
11045         to use ptids.  Don't set new_inferior here.
11046         (linux_attach_lwp): Rename to ...
11047         (linux_attach_lwp_1): ... this.  Add `initial' argument.  Handle
11048         it.  Adjust to use ptids.
11049         (linux_attach_lwp): New.
11050         (linux_attach): Add process to processes table.  Don't set
11051         new_inferior here.
11052         (struct counter): New.
11053         (second_thread_of_pid_p, last_thread_of_process_p): New.
11054         (linux_kill_one_lwp): Add `args' parameter.  Handle it.  Adjust to
11055         multiple processes.
11056         (linux_kill): Add `pid' argument.  Handle it.  Adjust to multiple
11057         processes.  Remove process from process table.
11058         (linux_detach_one_lwp): Add `args' parameter.  Handle it.  Adjust
11059         to multiple processes.
11060         (any_thread_of): New.
11061         (linux_detach): Add `pid' argument, and handle it.  Remove process
11062         from processes table.
11063         (linux_join): Add `pid' argument.  Handle it.
11064         (linux_thread_alive): Change unsighed long argument to ptid_t.
11065         Consider dead lwps as not being alive.
11066         (status_pending_p): Rename `dummy' argument to `arg'.  Filter out
11067         threads we're not interested in.
11068         (same_lwp, find_lwp_pid): New.
11069         (linux_wait_for_lwp): Change `pid' argument's type from int to
11070         ptid_t.  Adjust.
11071         (linux_wait_for_event): Rename to ...
11072         (linux_wait_for_event_1): ... this.  Change `pid' argument's type
11073         from int to ptid_t.  Adjust.
11074         (linux_wait_for_event): New.
11075         (linux_wait_1): Add `ptid' argument.  Change return type to
11076         ptid_t.  Adjust.  Use last_thread_of_process_p.  Remove processes
11077         that exit from the process table.
11078         (linux_wait): Add `ptid' argument.  Change return type to ptid_t.
11079         Adjust.
11080         (mark_lwp_dead): New.
11081         (wait_for_sigstop): Adjust to use ptids.  If a process exits while
11082         stopping all threads, mark its main lwp as dead.
11083         (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11084         ptids.
11085         (fetch_register, usr_store_inferior_registers)
11086         (regsets_fetch_inferior_registers)
11087         (regsets_store_inferior_registers, linux_read_memory)
11088         (linux_write_memory): Inline `inferior_pid'.
11089         (linux_look_up_symbols): Adjust to use per-process
11090         `thread_db_active'.
11091         (linux_request_interrupt): Adjust to use ptids.
11092         (linux_read_auxv): Inline `inferior_pid'.
11093         (initialize_low): Don't reference thread_db_active.
11094         * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11095         * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11096         (ps_getpid): Return the pid of the current inferior.
11097         * thread-db.c (proc_handle, thread_agent): Delete.
11098         (thread_db_create_event, thread_db_enable_reporting): Adjust to
11099         per-process data.
11100         (find_one_thread): Change argument type to ptid_t.  Adjust to
11101         per-process data.
11102         (maybe_attach_thread): Adjust to per-process data and ptids.
11103         (thread_db_find_new_threads): Ditto.
11104         (thread_db_init): Ditto.
11105         * spu-low.c (spu_create_inferior, spu_attach): Add process to
11106         processes table.  Adjust to use ptids.
11107         (spu_kill, spu_detach): Adjust interface.  Remove process from
11108         processes table.
11109         (spu_join, spu_thread_alive): Adjust interface.
11110         (spu_wait): Adjust interface.  Remove process from processes
11111         table.  Adjust to use ptids.
11112         * win32-low.c (current_inferior_tid): Delete.
11113         (current_inferior_ptid): New.
11114         (debug_event_ptid): New.
11115         (thread_rec): Take a ptid.  Adjust.
11116         (child_add_thread): Add `pid' argument.  Adjust to use ptids.
11117         (child_delete_thread): Ditto.
11118         (do_initial_child_stuff): Add `attached' argument.  Add process to
11119         processes table.
11120         (child_fetch_inferior_registers, child_store_inferior_registers):
11121         Adjust.
11122         (win32_create_inferior): Pass 0 to do_initial_child_stuff.
11123         (win32_attach): Pass 1 to do_initial_child_stuff.
11124         (win32_kill): Adjust interface.  Remove process from processes
11125         table.
11126         (win32_detach): Ditto.
11127         (win32_join): Adjust interface.
11128         (win32_thread_alive): Take a ptid.
11129         (win32_resume): Adjust to use ptids.
11130         (get_child_debug_event): Ditto.
11131         (win32_wait): Adjust interface.  Remove exiting process from
11132         processes table.
11133
11134 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
11135
11136         Non-stop mode support.
11137
11138         * server.h (non_stop): Declare.
11139         (gdb_client_data, handler_func): Declare.
11140         (delete_file_handler, add_file_handler, start_event_loop):
11141         Declare.
11142         (handle_serial_event, handle_target_event, push_event)
11143         (putpkt_notif): Declare.
11144         * target.h (enum resume_kind): New.
11145         (struct thread_resume): Replace `step' field by `kind' field.
11146         (TARGET_WNOHANG): Define.
11147         (struct target_ops) <wait>: Add `options' argument.
11148         <supports_non_stop, async, start_non_stop>: New fields.
11149         (target_supports_non_stop, target_async): New.
11150         (start_non_stop): Declare.
11151         (mywait): Add `options' argument.
11152         * target.c (mywait): Add `options' argument.  Print child exit
11153         notifications here.
11154         (start_non_stop): New.
11155         * server.c (non_stop, own_buf, mem_buf): New globals.
11156         (struct vstop_notif): New.
11157         (notif_queue): New global.
11158         (queue_stop_reply, push_event, discard_queued_stop_replies)
11159         (send_next_stop_reply): New.
11160         (start_inferior): Adjust to use resume_kind.  Adjust to mywait
11161         interface changes.
11162         (attach_inferior): In non-stop mode, don't wait for the target
11163         here.
11164         (handle_general_set): Handle QNonStop.
11165         (handle_query): When handling qC, return the current general
11166         thread, instead of the first thread of the list.
11167         (handle_query): If the backend supports non-stop mode, include
11168         QNonStop+ in the qSupported query response.
11169         (handle_v_cont): Adjust to use resume_kind.  Handle resume_stop
11170         and non-stop mode.
11171         (handle_v_attach, handle_v_run): Handle non-stop mode.
11172         (handle_v_stopped): New.
11173         (handle_v_requests): Report support for vCont;t.  Handle vStopped.
11174         (myresume): Adjust to use resume_kind.  Handle non-stop.
11175         (queue_stop_reply_callback): New.
11176         (handle_status): Handle non-stop mode.
11177         (main): Clear non_stop flag on reconnection.  Use the event-loop.
11178         Refactor serial protocol handling from here ...
11179         (process_serial_event): ... to this new function.  When GDB
11180         selects any thread, select one here.  In non-stop mode, wait until
11181         GDB acks all pending events before exiting.
11182         (handle_serial_event, handle_target_event): New.
11183         * remote-utils.c (remote_open): Install remote_desc in the event
11184         loop.
11185         (remote_close): Remove remote_desc from the event loop.
11186         (putpkt_binary): Rename to...
11187         (putpkt_binary_1): ... this.  Add `is_notic' argument.  Handle it.
11188         (putpkt_binary): New as wrapper around putpkt_binary_1.
11189         (putpkt_notif): New.
11190         (prepare_resume_reply): In non-stop mode, don't change the
11191         general_thread.
11192         * event-loop.c: New.
11193         * Makefile.in (OBJ): Add event-loop.o.
11194         (event-loop.o): New rule.
11195
11196         * linux-low.h (pid_of): Moved here.
11197         (lwpid_of): New.
11198         (get_lwp_thread): Use lwpid_of.
11199         (struct lwp_info): Delete `lwpid' field.  Add `suspended' field.
11200         * linux-low.c (pid_of): Delete.
11201         (inferior_pid): Use lwpid_of.
11202         (linux_event_pipe): New.
11203         (target_is_async_p): New.
11204         (delete_lwp): New.
11205         (handle_extended_wait): Use lwpid_of.
11206         (add_lwp): Don't set lwpid field.
11207         (linux_attach_lwp): Adjust debug output.  Use lwpid_of.
11208         (linux_kill_one_lwp): If killing a running lwp, stop it first.
11209         Use lwpid_of.  Adjust to linux_wait_for_event interface changes.
11210         (linux_detach_one_lwp): If detaching from a running lwp, stop it
11211         first.  Adjust to linux_wait_for_event interface changes.  Use
11212         lwpid_of.
11213         (linux_detach): Don't delete the main lwp here.
11214         (linux_join): Use my_waitpid.  Avoid signal_pid.  Use lwpid_of.
11215         (status_pending_p): Don't consider explicitly suspended lwps.
11216         (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
11217         pointer.  Add OPTIONS argument.  Change return type to int.  Use
11218         my_waitpid instead of sleeping.  Handle WNOHANG.  Use lwpid_of.
11219         (linux_wait_for_event): Take an integer pid instead of a lwp_info
11220         pointer.  Add status pointer argument.  Return a pid instead of a
11221         status.  Use lwpid_of.  Adjust to linux_wait_for_lwp interface
11222         changes.  In non-stop mode, don't switch to a random thread.
11223         (linux_wait): Rename to...
11224         (linux_wait_1): ... this.  Add target_options argument, and handle
11225         it.  Adjust to use resume_kind.  Use lwpid_of.  In non-stop mode,
11226         don't handle the continue thread.  Handle TARGET_WNOHANG.  Merge
11227         clean exit and signal exit code.  Don't stop all threads in
11228         non-stop mode.  In all-stop mode, only stop all threads when
11229         reporting a stop to GDB.  Handle explicit thread stop requests.
11230         (async_file_flush, async_file_mark): New.
11231         (linux_wait): New.
11232         (send_sigstop): Use lwpid_of.
11233         (wait_for_sigstop): Use lwpid_of.  Adjust to linux_wait_for_event
11234         interface changes.  In non-stop mode, don't switch to a random
11235         thread.
11236         (linux_resume_one_lwp): Use lwpid_of.
11237         (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
11238         (linux_resume_one_thread): ... this.  Handle resume_stop.  In
11239         non-stop mode, don't look for pending flag in all threads.
11240         (resume_status_pending_p): Don't consider explicitly suspended
11241         threads.
11242         (my_waitpid): Reimplement.  Emulate __WALL.
11243         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11244         Use lwpid_of.
11245         (sigchld_handler, linux_supports_non_stop, linux_async)
11246         (linux_start_non_stop): New.
11247         (linux_target_ops): Register linux_supports_non_stop, linux_async
11248         and linux_start_non_stop.
11249         (initialize_low): Install SIGCHLD handler.
11250         * thread-db.c (thread_db_create_event, find_one_thread)
11251         (thread_db_get_tls_address): Use lwpid_of.
11252         * win32-low.c (win32_detach): Adjust to use resume_kind.
11253         (win32_wait): Add `options' argument.
11254         * spu-low.c (spu_resume): Adjust to use resume_kind.
11255         (spu_wait): Add `options' argument.
11256
11257 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
11258
11259         Decouple target code from remote protocol.
11260
11261         * target.h (enum target_waitkind): New.
11262         (struct target_waitstatus): New.
11263         (struct target_ops) <wait>: Return an unsigned long.  Take a
11264         target_waitstatus pointer instead of a char pointer.
11265         (mywait): Likewise.
11266         * target.c (mywait): Change prototype to return an unsigned long.
11267         Take a target_waitstatus pointer instead of a char pointer.  Adjust.
11268         * server.h (thread_from_wait, old_thread_from_wait): Delete
11269         declarations.
11270         (prepare_resume_reply): Change prototype to take a
11271         target_waitstatus.
11272         * server.c (thread_from_wait, old_thread_from_wait): Delete.
11273         (last_status, last_ptid): New.
11274         (start_inferior): Remove "statusptr" argument.  Adjust.  Return a
11275         pid instead of a signal.
11276         (attach_inferior): Remove "status" and "signal" parameters.
11277         Adjust.
11278         (handle_query): For qGetTLSAddr, parse the thread id with strtol,
11279         not as an address.
11280         (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
11281         (handle_v_requests, myresume): Remove "status" and "signal"
11282         parameters.  Adjust.
11283         (handle_status): New.
11284         (main): Delete local `status'.  Adjust.
11285         * remote-utils.c: Include target.h.
11286         (prepare_resume_reply): Change prototype to take a
11287         target_waitstatus.  Adjust.
11288
11289         * linux-low.c (linux_wait): Adjust to new target_ops->wait
11290         interface.
11291         * spu-low.c (spu_wait): Adjust.
11292         * win32-low.c (enum target_waitkind, struct target_waitstatus):
11293         Delete.
11294         (win32_wait): Adjust.
11295
11296 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
11297
11298         * target.h (struct thread_resume): Delete leave_stopped member.
11299         (struct target_ops): Add a `n' argument to the `resume' callback.
11300         * server.c (start_inferior): Adjust.
11301         (handle_v_cont, myresume): Adjust.
11302         * linux-low.c (check_removed_breakpoint): Adjust to resume
11303         interface change, and to removed leave_stopped field.
11304         (resume_ptr): Delete.
11305         (struct thread_resume_array): New.
11306         (linux_set_resume_request): Add new `arg' parameter.  Adjust to
11307         resume interface change.
11308         (linux_continue_one_thread, linux_queue_one_thread)
11309         (resume_status_pending_p): Check if the resume field is NULL
11310         instead of checking the leave_stopped member.
11311         (linux_resume): Adjust to the target resume interface change.
11312         * spu-low.c (spu_resume): Adjust to the target resume interface
11313         change.
11314         * win32-low.c (win32_detach, win32_resume): Ditto.
11315
11316 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
11317
11318         * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
11319         flag.
11320         (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
11321         pending.
11322         (linux_continue_one_thread): Only preserve the stepping flag if
11323         there's a pending breakpoint.
11324
11325 2009-03-31  Pedro Alves  <pedro@codesourcery.com>
11326
11327         * server.c (main): After the inferior having exited, call
11328         remote_close before exiting gdbserver.
11329
11330 2009-03-25  Thiago Jung Bauermann  <bauerman@br.ibm.com>
11331
11332         Fix size of FPSCR in Power 7 processors.
11333         * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
11334         (PPC_FEATURE_HAS_DFP): New #define.
11335         (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
11336         size of the FPSCR.
11337
11338 2009-03-23  Pedro Alves  <pedro@codesourcery.com>
11339
11340         * server.c (handle_query) Whitespace and formatting.
11341
11342 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
11343
11344         * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
11345         linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
11346         linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
11347         linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
11348         regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
11349         thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
11350         Makefile.in, configure.ac: Fix whitespace throughout.
11351         * configure: Regenerate.
11352
11353 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
11354
11355         * inferiors.c (find_inferior): Make it safe for the callback
11356         function to delete the currently iterated inferior.
11357
11358 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
11359
11360         * Makefile.in (linuw_low_h): Move higher.
11361         (thread-db.o): Depend on $(linux_low_h).
11362
11363 2009-03-17  Pedro Alves  <pedro@codesourcery.com>
11364
11365         Rename "process" to "lwp" throughout.
11366
11367         * linux-low.c (all_processes): Rename to...
11368         (all_lwps): ... this.
11369         (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
11370         (add_process): Rename to ...
11371         (add_lwp): ... this.  Adjust.
11372         (linux_create_inferior): Adjust.
11373         (linux_attach_lwp): Adjust.
11374         (linux_attach): Adjust.
11375         (linux_kill_one_process): Rename to ...
11376         (linux_kill_one_lwp): ... this.  Adjust.
11377         (linux_kill): Adjust.
11378         (linux_detach_one_process): Rename to ...
11379         (linux_detach_one_lwp): ... this.  Adjust.
11380         (linux_detach): Adjust.
11381         (check_removed_breakpoint): Adjust.
11382         (status_pending_p): Adjust.
11383         (linux_wait_for_process): Rename to ...
11384         (linux_wait_for_lwp): ... this.  Adjust.
11385         (linux_wait_for_event): Adjust.
11386         (send_sigstop): Adjust.
11387         (wait_for_sigstop): Adjust.
11388         (stop_all_processes): Rename to ...
11389         (stop_all_lwps): ... this.
11390         (linux_resume_one_process): Rename to ...
11391         (linux_resume_one_lwp): ... this.  Adjust.
11392         (linux_set_resume_request, linux_continue_one_thread)
11393         (linux_queue_one_thread, resume_status_pending_p)
11394         (usr_store_inferior_registers, regsets_store_inferior_registers)
11395         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11396         Adjust.
11397         * linux-low.h (get_process): Rename to ...
11398         (get_lwp): ... this.  Adjust.
11399         (get_thread_process): Rename to ...
11400         (get_thread_lwp): ... this.  Adjust.
11401         (get_process_thread): Rename to ...
11402         (get_lwp_thread): ... this.  Adjust.
11403         (struct process_info): Rename to ...
11404         (struct lwp_info): ... this.
11405         (all_processes): Rename to ...
11406         (all_lwps): ... this.
11407         * proc-service.c (ps_lgetregs): Adjust.
11408         * thread-db.c (thread_db_create_event, find_one_thread)
11409         (maybe_attach_thread, thread_db_get_tls_address): Adjust.
11410
11411 2009-03-14  Pedro Alves  <pedro@codesourcery.com>
11412
11413         * server.c (handle_query): Handle "qAttached".
11414
11415 2009-03-13  Nathan Sidwell  <nathan@codesourcery.com>
11416
11417         * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
11418         GPLv3, update license URL.
11419
11420 2009-03-01  Doug Evans  <dje@google.com>
11421
11422         * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
11423         (server_h): Add gdb_signals.h.
11424         (signals.o): Update.
11425         * server.h (target_signal_from_host,target_signal_to_host_p)
11426         (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
11427
11428 2009-02-14  Pierre Muller  <muller@ics.u-strasbg.fr>
11429
11430         * remote-utils.c (getpkt): Also generate remote-debug
11431         information if noack_mode is set.
11432
11433 2009-02-06  Pedro Alves  <pedro@codesourcery.com>
11434
11435         * server.c (handle_query): Report qXfer:siginfo:read and
11436         qXfer:siginfo:write as supported and handle them.
11437         * target.h (struct target_ops) <qxfer_siginfo>: New field.
11438         * linux-low.c (linux_xfer_siginfo): New.
11439         (linux_target_ops): Set it.
11440
11441 2009-01-26  Pedro Alves  <pedro@codesourcery.com>
11442
11443         * server.c (gdbserver_usage): Mention --remote-debug.
11444         (main): Accept '--remote-debug' switch.
11445
11446 2009-01-18  Doug Evans  <dje@google.com>
11447
11448         * regcache.c (new_register_cache): No need to check result of xcalloc.
11449         * server.c (handle_search_memory): Back out calls to xmalloc,
11450         result is checked and error is returned to user upon failure.
11451         (handle_query): Ditto.  Add more checks for result of malloc.
11452         (handle_v_cont): Check result of malloc, report error back to
11453         user upon failure.
11454         (handle_v_run): Ditto.  Call freeargv.
11455         * server.h (freeargv): Declare.
11456         * utils.c (freeargv): New fn.
11457
11458 2009-01-15  Doug Evans  <dje@google.com>
11459
11460         * gdbreplay.c (perror_with_name): Make arg const char *.
11461         * server.h (target_signal_to_name): Make return type const char *.
11462         * thread-db.c (thread_db_err_str): Make return type const char *.
11463         * utils.c (perror_with_name): Make arg const char *.
11464
11465 2009-01-14  Pedro Alves  <pedro@codesourcery.com>
11466
11467         * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
11468         when handling a EXIT_PROCESS_DEBUG_EVENT.
11469
11470 2009-01-06  Joel Brobecker  <brobecker@adacore.com>
11471
11472         * gdbreplay.c (gdbreplay_version): Update copyright year.
11473         * server.c (gdbserver_version): Likewise.
11474
11475 2009-01-05  Doug Evans  <dje@google.com>
11476
11477         * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
11478         (handle_extended_wait): Improve comment.
11479
11480 2008-12-13  Doug Evans  <dje@google.com>
11481
11482         * utils.c (xmalloc,xcalloc,xstrdup): New fns.
11483         * server.h (ATTR_MALLOC): New macro.
11484         (xmalloc,xcalloc,xstrdup): Declare.
11485         * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
11486         * inferiors.c: Ditto.
11487         * linux-low.c: Ditto.
11488         * mem-break.c: Ditto.
11489         * regcache.c: Ditto.
11490         * remote-utils.c: Ditto.
11491         * server.c: Ditto.
11492         * target.c: Ditto.
11493         * win32-low.c: Ditto.
11494
11495 2008-12-12  Doug Evans  <dje@google.com>
11496
11497         * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
11498         in debugging printf.
11499
11500         * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
11501
11502 2008-12-09  Doug Evans  <dje@google.com>
11503
11504         * linux-low.h (struct process_info): Delete member tid, unused.
11505         * thread-db.c (find_one_thread): Update.
11506         (maybe_attach_thread): Update.
11507
11508 2008-12-02  Pedro Alves  <pedro@codesourcery.com>
11509
11510         * target.h (struct target_ops): Add qxfer_osdata member.
11511         * linux-low.c: Include ctype.h and pwd.h and sys/types.h
11512         and dirent.h.
11513         (linux_qxfer_osdata): New functions.
11514         (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
11515         callback.
11516         * server.c (handle_query): Handle "qXfer:osdata:read:".
11517         * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
11518         (buffer_xml_printf): New functions.
11519         * server.h (struct buffer): New.
11520         (buffer_grow_str, buffer_grow_str0): New macros.
11521         (buffer_grow, buffer_free, buffer_init, buffer_finish)
11522         (buffer_xml_printf): Declare.
11523
11524 2008-11-24  Doug Evans  <dje@google.com>
11525
11526         * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
11527
11528 2008-11-24  Daniel Jacobowitz  <dan@codesourcery.com>
11529
11530         * server.c (handle_v_run): Always use the supplied argument list.
11531
11532 2008-11-19  Bob Wilson  <bob.wilson@acm.org>
11533
11534         * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
11535         (xtensa_regmap_table): Add entry for scompare1.
11536
11537 2008-11-18  Thiago Jung Bauermann  <bauerman@br.ibm.com>
11538
11539         * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
11540         powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
11541         powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
11542         powerpc-isa205-64l.o, powerpc-isa205-64l.c,
11543         powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
11544         powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
11545         * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
11546         XML target descriptions.
11547         * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
11548         when inferior is running on an ISA 2.05 or later processor.  Add
11549         special case to return offset for full 64-bit slot of FPSCR when
11550         in 32-bits.
11551
11552 2008-11-14  Daniel Gutson  <dgutson@codesourcery.com>
11553
11554         * Makefile.in (SFILES, clean): Added sparc64 files.
11555         (reg-sparc64.o, reg-sparc64.c): New.
11556         * configure.srv (sparc*-*-linux*): New configuration.
11557         * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
11558         syscall arguments for SPARC.
11559         (regsets_store_inferior_registers): Likewise.
11560         * linux-sparc-low.c: New file.
11561
11562 2008-10-21  Doug Evans  <dje@google.com>
11563
11564         * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
11565         (READLINE_DIR,READLINE_DEP): Delete.
11566         (INTERNAL_CFLAGS): Update.
11567         (LINTFLAGS): Update.
11568
11569 2008-10-10  Pedro Alves  <pedro@codesourcery.com>
11570
11571         * server.c (handle_v_run): If GDB didn't specify an argv, use the
11572         whole argv from the last run, not just argv[0].
11573
11574 2008-09-08  Pedro Alves  <pedro@codesourcery.com>
11575
11576         * regcache.c (new_register_cache): Return NULL if the register
11577         cache size isn't known yet.
11578         (free_register_cache): Avoid dereferencing a NULL regcache.
11579
11580 2008-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
11581
11582         * configure.srv: Merge MIPS and MIPS64.
11583
11584 2008-08-24  Maciej W. Rozycki  <macro@linux-mips.org>
11585
11586         * Makefile.in (uninstall): Apply $(EXEEXT) too.
11587
11588 2008-08-18  Luis Machado  <luisgpm@br.ibm.com>
11589
11590         * Makefile.in: Add required vsx dependencies.
11591
11592         * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
11593         Declare init_registers_powerpc_vsx32l.
11594         Declare init_registers_powerpc_vsx64l.
11595         Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
11596         (ppc_arch_setup): Check for VSX in hwcap.
11597         (ppc_fill_vsxregset): New function.
11598         (ppc_store_vsxregset): New function.
11599         Add new VSX entry in regset_info target_regsets.
11600
11601         * configure.srv: Add new VSX dependencies.
11602
11603 2008-08-12  Pedro Alves  <pedro@codesourcery.com>
11604
11605         * remote-utils.c (noack_mode, transport_is_reliable): New globals.
11606         (remote_open): Set or clear transport_is_reliable.
11607         (putpkt_binary): Don't expect acks in noack mode.
11608         (getpkt): Don't send ack/nac in noack mode.
11609         * server.c (handle_general_set): Handle QStartNoAckMode.
11610         (handle_query): If connected by tcp pass QStartNoAckMode+ in
11611         qSupported.
11612         (main): Reset noack_mode on every connection.
11613         * server.h (noack_mode): Declare.
11614
11615 2008-08-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11616
11617         * Makefile.in (GDBREPLAY_OBS): New variable.
11618         (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
11619
11620 2008-08-05  Ulrich Weigand  <uweigand@de.ibm.com>
11621             Daniel Jacobowitz  <dan@codesourcery.com>
11622
11623         * linux-low.c (linux_resume_one_process): Ignore ESRCH.
11624         (usr_store_inferior_registers): Likewise.
11625         (regsets_store_inferior_registers): Likewise.
11626
11627 2008-07-31  Rolf Jansen  <rj@surtec.com>
11628             Pedro Alves  <pedro@codesourcery.com>
11629
11630         * configure.ac: Check for memmem declaration.
11631         * server.c [HAVE_MALLOC_H]: Include malloc.h.
11632         (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
11633         (disable_packet_qfThreadInfo): Unconditionally compile.
11634         * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
11635         * configure, config.in: Regenerate.
11636
11637 2008-07-28  Doug Kwan  <dougkwan@google.com>
11638
11639         * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
11640         (linux_write_memory): Remove declaration of errno.
11641
11642 2008-07-12  Ulrich Weigand  <uweigand@de.ibm.com>
11643
11644         * linux-low.c (handle_extended_wait): Do not use "status"
11645         variable uninitialized.
11646
11647 2008-07-07  Pedro Alves  <pedro@codesourcery.com>
11648
11649         * server.c (handle_v_attach): Inhibit reporting dll changes.
11650
11651 2008-06-27  Pedro Alves  <pedro@codesourcery.com>
11652
11653         * remote-utils.c (prepare_resume_reply): If requested, don't
11654         output "thread:TID" in the T stop reply.
11655
11656         * server.c (disable_packet_vCont, disable_packet_Tthread)
11657         (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
11658         (handle_query): If requested, disable support for qC, qfThreadInfo
11659         and qsThreadInfo.
11660         (handle_v_requests): If requested, disable support for vCont.
11661         (gdbserver_show_disableable): New.
11662         (main): Handle --disable-packet and --disable-packet=LIST.
11663
11664         * server.h (disable_packet_vCont, disable_packet_Tthread)
11665         (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
11666
11667 2008-06-20  Carlos O'Donell  <carlos@codesourcery.com>
11668
11669         * server.c (gdbserver_usage): Mention --version.
11670
11671 2008-06-06  Daniel Jacobowitz  <dan@codesourcery.com>
11672
11673         * Makefile.in (gdbreplay.o): New rule.
11674
11675 2008-06-06  Joseph Myers  <joseph@codesourcery.com>
11676
11677         * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
11678         message, not gdbserver.
11679
11680 2008-06-05  Vladimir Prus  <vladimir@codesourcery.com>
11681             Nathan Sidwell  <nathan@codesourcery.com>
11682             Joseph Myers  <joseph@codesourcery.com>
11683
11684         * acinclude.m4: Include ../../config/acx.m4.
11685         * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
11686         * configure, config.in: Regenerate.
11687         * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
11688         * server.c (gdbserver_version): Print PKGVERSION.
11689         (gdbsrever_usage): Add stream parameter.  Print REPORT_BUGS_TO.
11690         (main): Adjust gdbserver_usage calls.
11691         * gdbreplay.c (version, host_name): Add declarations.
11692         (gdbreplay_version, gdbreplay_usage): New.
11693         (main): Accept --version and --help options.
11694
11695 2008-06-04  Daniel Jacobowitz  <dan@codesourcery.com>
11696
11697         * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
11698         (arm_breakpoint_at): Handle Thumb.
11699         (the_low_target): Add comment.
11700
11701 2008-05-29  Ulrich Weigand  <uweigand@de.ibm.com>
11702
11703         * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
11704
11705 2008-05-09  Doug Evans  <dje@google.com>
11706
11707         * server.h (decode_search_memory_packet): Declare.
11708         * remote-utils.c (decode_search_memory_packet): New fn.
11709         * server.c (handle_search_memory_1): New fn.
11710         (handle_search_memory): New fn.
11711         (handle_query): Process qSearch:memory packets.
11712
11713 2008-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
11714
11715         * regcache.c (registers_length): Remove.
11716         (set_register_cache): Verify that PBUFSIZ is large enough to hold a
11717         full register packet.
11718         * regcache.h (registers_length): Remove prototype.
11719         * server.h (PBUFSIZ): Define to 16384.
11720
11721 2008-05-03  Ulrich Weigand  <uweigand@de.ibm.com>
11722
11723         * configure.srv (powerpc*-*-linux*): Set srv_regobj to
11724         powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
11725         powerpc-64l.o, and powerpc-altivec64l.o.
11726         Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
11727         rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
11728         rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
11729         rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
11730         rs6000/power-linux.xml, and rs6000/power64-linux.xml
11731         to srv_xmlfiles.
11732
11733         * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
11734         (powerpc-32l.o, powerpc-32l.c): ... these new rules.
11735         (powerpc-32.o, powerpc-32.c): Remove, replace by ...
11736         (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
11737         (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
11738         (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
11739         (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
11740         (powerpc-64l.o, powerpc-64l.c): ... these new rules.
11741         (powerpc-64.o, powerpc-64.c): Remove, replace by ...
11742         (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
11743         (clean): Update.
11744
11745         * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
11746         (init_registers_powerpc_32l): ... this new prototype.
11747         (init_registers_powerpc_32): Remove, replace by ...
11748         (init_registers_powerpc_altivec32l): ... this new prototype.
11749         (init_registers_powerpc_e500): Remove, replace by ...
11750         (init_registers_powerpc_e500l): ... this new prototype.
11751         (init_registers_ppc64): Remove, replace by ...
11752         (init_registers_powerpc_64l): ... this new prototype.
11753         (init_registers_powerpc_64): Remove, replace by ...
11754         (init_registers_powerpc_altivec64l): ... this new prototype.
11755         (ppc_num_regs): Set to 73.
11756         (PT_ORIG_R3, PT_TRAP): Define if necessary.
11757         (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
11758         (ppc_cannot_store_register): Handle orig_r3 and trap.
11759         (ppc_arch_setup): Update init_registers_... calls.
11760         (ppc_fill_gregset): Handle orig_r3 and trap.
11761
11762         * inferiors.c (clear_inferiors): Reset current_inferior.
11763
11764 2008-04-23  Paolo Bonzini  <bonzini@gnu.org>
11765
11766         * acinclude.m4: Add override.m4.
11767         * configure: Regenerate.
11768
11769 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
11770
11771         * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
11772         initial call to init_register_ppc64.
11773
11774 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
11775
11776         * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
11777         single powerpc*-*-linux* case.
11778         (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
11779
11780 2008-04-17  Ulrich Weigand  <uweigand@de.ibm.com>
11781
11782         * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
11783         srv_regobj.  Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
11784         from reg_xmlfiles.
11785         * linux-ppc-low.c: Include <elf.h>.
11786         (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
11787         (ppc_hwcap): New global variable.
11788         (ppc_regmap): Remove __SPE__ #ifdef sections.
11789         (ppc_regmap_e500): New global variable.
11790         (ppc_cannot_store_register): Update __SPE__ special case.
11791         (ppc_get_hwcap): New function.
11792         (ppc_arch_setup): Use it to determine whether inferior supports
11793         AltiVec or SPE registers.  Set the_low_target.regmap if appropriate.
11794         (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
11795         Do not access registers if target does not support AltiVec.
11796         (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
11797         Do not access registers if target does not support SPE.
11798         (target_regsets): Unconditionally include AltiVec and SPE regsets.
11799
11800 2008-04-17  Daniel Jacobowitz  <dan@codesourcery.com>
11801
11802         * linux-low.c (disabled_regsets, num_regsets): New.
11803         (use_regsets_p): Delete.
11804         (linux_wait_for_process): Clear disabled_regsets.
11805         (regsets_fetch_inferior_registers): Check and set it.
11806         (regsets_store_inferior_registers): Likewise.
11807         (linux_fetch_registers, linux_store_registers): Do not use
11808         use_regsets_p.
11809         (initialize_low): Allocate disabled_regsets.
11810
11811 2008-04-14  Daniel Jacobowitz  <dan@codesourcery.com>
11812
11813         * Makefile.in (LIBOBJS): New.
11814         (OBS): Use LIBOBJS.
11815         (memmem.o): New rule.
11816         * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
11817         * configure: Regenerated.
11818
11819 2008-04-04  Ulrich Weigand  <uweigand@de.ibm.com>
11820
11821         * server.c (handle_query): Never return "unsupported" for
11822         qXfer:features:read queries.
11823
11824 2008-03-27  Ulrich Weigand  <uweigand@de.ibm.com>
11825
11826         * server.c (get_features_xml): Fix inverted condition.
11827         (handle_query): Always support qXfer:feature:read.
11828
11829 2008-03-10  Daniel Jacobowitz  <dan@codesourcery.com>
11830
11831         * server.c (wrapper_argv): New.
11832         (start_inferior): Handle wrapper_argv.  If set, expect an extra
11833         trap.
11834         (gdbserver_usage): Document --wrapper.
11835         (main): Parse --wrapper.
11836
11837 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
11838
11839         * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
11840         powerpc-*-linux* to srv_regobj and reg_xmlfiles.
11841         * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
11842         (ppc_set_pc): Likewise.
11843         (ppc_arch_setup): New function.
11844         (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
11845         of collect_register.
11846         (the_low_target): Use ppc_arch_setup as arch_setup initializer.
11847
11848 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
11849
11850         * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
11851         instead of linux-ppc64-low.o.
11852         * linux-ppc64-low.c: Remove file.
11853         * Makefile.in (SFILES): Remove linux-ppc64-low.c.
11854         (linux-ppc64-low.o): Remove rule.
11855
11856         * linux-ppc-low.c (init_registers_ppc64): Add prototype.
11857         (init_registers_powerpc_64): Likewise.
11858         (ppc_regmap): Conditionally define depending on __powerpc64__.
11859         (ppc_cannot_store_register): Do not special-case "fpscr" when
11860         compiled on __powerpc64__.
11861         (ppc_collect_ptrace_register): New function.
11862         (ppc_supply_ptrace_register): New function.
11863         (ppc_breakpoint): Change type to "unsigned int".
11864         (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
11865         (the_low_target): Conditionally provide initializers for the
11866         arch_setup member depending on __powerpc64__.  Install
11867         collect_ptrace_register and supply_ptrace_register members.
11868
11869 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
11870
11871         * regcache.h (gdbserver_xmltarget): Add extern declaration.
11872         * server.c (gdbserver_xmltarget): Define.
11873         (get_features_xml): Use it to replace "target.xml" and arch_string.
11874
11875         * configure.srv: Remove srv_xmltarget.  Add XML files that were
11876         mentioned there to srv_xmlfiles instead.  Remove conditional tests
11877         on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
11878         srv_xmlfiles and srv_regobj to include all possible choices.
11879         * configure.ac (srv_xmltarget): Remove.
11880         (srv_xmlfiles): Do not add "target.xml".
11881         (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
11882         checks for supplementary target information.
11883         * configure: Regenerate.
11884         * Makefile.in (XML_TARGET): Remove.
11885         (target.xml): Remove rule.
11886         (clean): Do not clean up target.xml.
11887         (.PRECIOUS): Do not mention target.xml.
11888
11889         * target.h (struct target_ops): Remove arch_string member.
11890         * linux-low.c (linux_arch_string): Remove.
11891         (linux_target_ops): Remove arch_string initializer.
11892         * linux-low.h (struct linux_target_ops): Remove arch_string member.
11893         * linux-i386-low.c (the_low_target): Remove arch_string initializer.
11894         * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
11895         * spu-low.c (spu_arch_string): Remove.
11896         (spu_target_ops): Remove arch_string initializer.
11897         * win32-low.c (win32_arch_string): Remove.
11898         (win32_target_ops): Remove arch_string initializer.
11899         * win32-low.h (struct win32_target_ops): Remove arch_string member.
11900         * win32-arm-low.c (the_low_target): Remove arch_string initializer.
11901         * win32-i368-low.c (the_low_target): Remove arch_string initializer.
11902
11903 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
11904
11905         * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
11906         by collect_ptrace_register and supply_ptrace_register hooks.
11907         * linux-low.c (fetch_register): Use supply_ptrace_register callback
11908         instead of checking for the_low_target.left_pad_xfer.
11909         (usr_store_inferior_registers): Use collect_ptrace_register callback
11910         instead of checking for the_low_target.left_pad_xfer.
11911
11912         * linux-s390-low.c (s390_collect_ptrace_register): New function.
11913         (s390_supply_ptrace_register): Likewise.
11914         (s390_fill_gregset): Call s390_collect_ptrace_register.
11915         (the_low_target): Update.
11916
11917         * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
11918         (ppc_supply_ptrace_register): Likewise.
11919         (the_low_target): Update.
11920
11921         * linux-i386-low.c (the_low_target): Update.
11922         * linux-x86-64-low.c (the_low_target): Update.
11923
11924 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
11925
11926         * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
11927         reg-s390.o and reg-s390x.o.
11928
11929         * linux-low.c (new_inferior): New global variable.
11930         (linux_create_inferior, linux_attach): Set it.
11931         (linux_wait_for_process): Call the_low_target.arch_setup after the
11932         target has stopped for the first time.
11933         (initialize_low): Do not call the_low_target.arch_setup.
11934
11935         * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
11936         (s390_set_pc): Likewise.
11937         (s390_arch_setup): New function.
11938         (the_low_target): Use s390_arch_setup as arch_setup routine.
11939
11940         * regcache.c (realloc_register_cache): New function.
11941         (set_register_cache): Call it for each existing regcache.
11942
11943 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
11944
11945         * server.h (init_registers): Remove prototype.
11946
11947         * linux-low.h (struct linux_target_ops): Add arch_setup field.
11948         * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
11949         instead of init_registers ().
11950         * linux-arm-low.c (init_registers_arm): Add prototype.
11951         (init_registers_arm_with_iwmmxt): Likewise.
11952         (the_low_target): Add initializer for arch_setup field.
11953         * linux-cris-low.c (init_registers_cris): Add prototype.
11954         (the_low_target): Add initializer for arch_setup field.
11955         * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
11956         (the_low_target): Add initializer for arch_setup field.
11957         * linux-i386-low.c (init_registers_i386_linux): Add prototype.
11958         (the_low_target): Add initializer for arch_setup field.
11959         * linux-ia64-low.c (init_registers_ia64): Add prototype.
11960         (the_low_target): Add initializer for arch_setup field.
11961         * linux-m32r-low.c (init_registers_m32r): Add prototype.
11962         (the_low_target): Add initializer for arch_setup field.
11963         * linux-m68k-low.c (init_registers_m68k): Add prototype.
11964         (the_low_target): Add initializer for arch_setup field.
11965         * linux-mips-low.c (init_registers_mips_linux): Add prototype.
11966         (init_registers_mips64_linux): Likewise.
11967         (the_low_target): Add initializer for arch_setup field.
11968         * linux-ppc-low.c (init_registers_ppc): Add prototype.
11969         (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
11970         (the_low_target): Add initializer for arch_setup field.
11971         * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
11972         (init_registers_powerpc_64): Likewise.
11973         (the_low_target): Add initializer for arch_setup field.
11974         * linux-s390-low.c (init_registers_s390): Add prototype.
11975         (init_registers_s390x): Likewise.
11976         (the_low_target): Add initializer for arch_setup field.
11977         * linux-sh-low.c (init_registers_sh): Add prototype.
11978         (the_low_target): Add initializer for arch_setup field.
11979         * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
11980         (the_low_target): Add initializer for arch_setup field.
11981         * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
11982         (the_low_target): Add initializer for arch_setup field.
11983
11984         * win32-low.h (struct win32_target_ops): Add arch_setup field.
11985         * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
11986         instead of init_registers ().
11987         * win32-arm-low.c (init_registers_arm): Add prototype.
11988         (the_low_target): Add initializer for arch_setup field.
11989         * win32-i386-low.c (init_registers_i386): Add prototype.
11990         (the_low_target): Add initializer for arch_setup field.
11991
11992         * spu-low.c (init_registers_spu): Add prototype.
11993         (initialize_low): Call initialie_registers_spu () instead of
11994         initialize_registers ().
11995
11996 2008-02-19  Pedro Alves  <pedro@codesourcery.com>
11997
11998         * server.c (handle_v_requests): When handling the vRun and vAttach
11999         packets, if already debugging a process, don't kill it.  Return an
12000         error instead.
12001
12002 2008-02-17  Daniel Jacobowitz  <dan@codesourcery.com>
12003
12004         * server.c (handle_query): Correct length check.
12005
12006 2008-02-14  Pedro Alves  <pedro_alves@portugalmail.pt>
12007
12008         * win32-low.c (do_initial_child_stuff): Add process handle
12009         parameter.  Set current_process_handle and current_process_id from the
12010         parameters. Clear globals.
12011         (win32_create_inferior): Don't set current_process_handle and
12012         current_process_id here.  Instead pass them on the call to
12013         do_initial_child_stuff.
12014         (win32_attach): Likewise.
12015         (win32_clear_inferiors): New.
12016         (win32_kill): Don't close the current process handle or the
12017         current thread handle here.  Instead call win32_clear_inferiors.
12018         (win32_detach): Don't open a new handle to the process.  Call
12019         win32_clear_inferiors.
12020         (win32_join): Don't rely on current_process_handle; open a new
12021         handle using the process id.
12022         (win32_wait): Call win32_clear_inferiors when the inferior process
12023         has exited.
12024
12025 2008-02-14  Daniel Jacobowitz  <dan@codesourcery.com>
12026
12027         * server.c (monitor_show_help): Add "exit".
12028
12029 2008-02-11  Maxim Grigoriev  <maxim2405@gmail.com>
12030
12031         * Makefile.in (SFILES): Add linux-xtensa-low.c.
12032         (clean): Add reg-xtensa.c.
12033         (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
12034         * configure.srv (xtensa*-*-linux*) New target.
12035         * linux-xtensa-low.c: New.
12036         * xtensa-xtregs.c: New.
12037
12038 2008-02-01  Pedro Alves  <pedro_alves@portugalmail.pt>
12039
12040         * hostio.c: Don't include errno.h.
12041         (errno_to_fileio_errno): Move to hostio-errno.
12042         * hostio.c: (hostio_error): Remove the error parameter.  Defer the
12043         error number outputting to the target->hostio_last_error callback.
12044         (hostio_packet_error): Use FILEIO_EINVAL directly.
12045         (handle_open, handle_pread, hostio_error, handle_unlink): Update
12046         calls to hostio_error.
12047         * hostio-errno.c: New.
12048         * server.h (hostio_last_error_from_errno): Declare.
12049         * target.h (target_ops): Add hostio_last_error member.
12050         * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
12051         as hostio_last_error handler.
12052         * spu-low.c (spu_target_ops): Likewise.
12053         * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
12054         (wince_hostio_last_error): New functions.
12055         (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
12056         as hostio_last_error handler.
12057         (win32_target_ops) [!_WIN32_WCE]: Register
12058         hostio_last_error_from_errno as hostio_last_error handler.
12059         * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
12060         (hostio-errno.o): New rule.
12061         * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
12062         * configure.srv (srv_hostio_err_objs): New variable.  Default to
12063         hostio-errno.o.
12064         (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
12065         * configure: Regenerate.
12066
12067 2008-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
12068
12069         * linux-low.c (linux_attach_lwp): Do not _exit after errors.
12070         (linux_kill, linux_detach): Clean up the process list.
12071         * remote-utils.c (remote_open): Improve port number parsing.
12072         (putpkt_binary, input_interrupt): Only send interrupts if the target
12073         is running.
12074         * server.c (extended_protocol): Make static.
12075         (attached): Define earlier.
12076         (exit_requested, response_needed, program_argv): New variables.
12077         (target_running): New.
12078         (start_inferior): Clear attached here.
12079         (attach_inferior): Set attached here.
12080         (require_running): Define.
12081         (handle_query): Use require_running and target_running.  Implement
12082         "monitor exit".
12083         (handle_v_attach, handle_v_run): New.
12084         (handle_v_requests): Use require_running.  Handle vAttach and vRun.
12085         (gdbserver_usage): Update.
12086         (main): Redo argument parsing.  Handle --debug and --multi.  Handle
12087         --attach along with other options or after the port.  Save
12088         program_argv.  Support no initial program.  Resynchronize
12089         communication with GDB after an error.  Handle "monitor exit".
12090         Use require_running and target_running.  Always allow the extended
12091         protocol.  Do not error out for Hc0 or Hc-1.  Do not automatically
12092         restart in extended mode.
12093         * README: Refer to the GDB manual.  Update --attach usage.
12094
12095 2007-12-20  Andreas Schwab  <schwab@suse.de>
12096
12097         * linux-low.c (STACK_SIZE): Define.
12098         (linux_tracefork_child): Use it.  Use __clone2 on ia64.
12099         (linux_test_for_tracefork): Likewise.
12100
12101 2007-12-18  Daniel Jacobowitz  <dan@codesourcery.com>
12102
12103         * linux-low.c (linux_wait_for_event): Update messages.  Do not
12104         reinsert auto-delete breakpoints.
12105         * mem-break.c (struct breakpoint): Change return type of handler to
12106         int.
12107         (set_breakpoint_at): Update handler type.
12108         (reinsert_breakpoint_handler): Return 1 instead of calling
12109         delete_breakpoint.
12110         (reinsert_breakpoint_by_bp): Check for the original breakpoint before
12111         setting a new one.
12112         (check_breakpoints): Delete auto-delete breakpoints and return 2.
12113         * mem-break.h (set_breakpoint_at): Update handler type.
12114         * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
12115         * win32-low.c (auto_delete_breakpoint): New.
12116         (get_child_debug_event): Use it.
12117
12118 2007-12-16  Daniel Jacobowitz  <dan@codesourcery.com>
12119
12120         * configure.ac: Check for pread and pwrite.
12121         * hostio.c (handle_pread): Fall back to lseek and read.
12122         (handle_pwrite): Fall back to lseek and write.
12123         * config.in, configure: Regenerated.
12124
12125 2007-12-07  Daniel Jacobowitz  <dan@codesourcery.com>
12126
12127         * server.c (myresume): Add own_buf argument.
12128         (main): Update calls.
12129
12130 2007-12-06  Daniel Jacobowitz  <dan@codesourcery.com>
12131
12132         * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
12133         * remote-utils.c (remote_open): Do not call disable_async_io.
12134         (block_async_io): Delete.
12135         (unblock_async_io): Make static.
12136         (initialize_async_io): New.
12137         * server.c (handle_v_cont): Handle async I/O here.
12138         (myresume): Likewise.  Move other common resume tasks here...
12139         (main): ... from here.  Call initialize_async_io.  Disable async
12140         I/O before the main loop.
12141         * server.h (initialize_async_io): Declare.
12142         (block_async_io, unblock_async_io): Delete prototypes.
12143         * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
12144
12145 2007-12-06  Mick Davis  <mickd@goanna.iinet.net.au>
12146
12147         * remote-utils.c (readchar): Allow binary data in received messages.
12148
12149 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
12150
12151         * win32-low.c (attaching): New global.
12152         (win32_create_inferior): Clear the `attaching' global.
12153         (win32_attach): Set the `attaching' global.
12154         (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
12155         attaching.  Only set a breakpoint at the entry point if not
12156         attaching.
12157
12158 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
12159
12160         * server.c (main): Don't report dll events on the initial
12161         connection on attaches.
12162
12163 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
12164
12165         * server.c (main): Relax numerical bases supported for the pid of
12166         the --attach command line argument.
12167
12168 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
12169
12170         * win32-low.c (win32_attach): Call OpenProcess before
12171         DebugActiveProcess, not after.  Add last error output to error
12172         call.
12173
12174 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
12175
12176         * win32-low.c (win32_get_thread_context)
12177         (win32_set_thread_context): New functions.
12178         (thread_rec): Use win32_get_thread_context.
12179         (continue_one_thread, win32_resume): Use win32_set_thread_context.
12180         * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
12181         field.
12182
12183 2007-12-03  Leo Zayas
12184             Pedro Alves  <pedro_alves@portugalmail.pt>
12185
12186         * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
12187         global variables.
12188         (child_add_thread): Minor cleanup.
12189         (child_continue): Resume artificially suspended threads before
12190         calling ContinueDebugEvent.
12191         (suspend_one_thread): New.
12192         (fake_breakpoint_event): New.
12193         (get_child_debug_event): Change return type to int.  Check here if
12194         gdb sent an interrupt request.  If a soft interrupt was requested,
12195         fake a breakpoint event.  Return 0 if there is no event to handle,
12196         and 1 otherwise.
12197         (win32_wait): Don't check here if gdb sent an interrupt request.
12198         Ensure there is a valid event to handle.
12199         (win32_request_interrupt): Add soft interruption method as last
12200         resort.
12201
12202 2007-12-03  Leo Zayas
12203             Pedro Alves  <pedro_alves@portugalmail.pt>
12204
12205         * win32-low.h (win32_thread_info): Add descriptions to the
12206         structure members.  Replace `suspend_count' counter by a
12207         `suspended' flag.
12208         * win32-low.c (thread_rec): Update condition of when to get the
12209         context from the inferior.  Rely on ContextFlags being set if it
12210         has already been retrieved.  Only suspend the inferior thread if
12211         we haven't already.  Warn if that fails.
12212         (continue_one_thread): s/suspend_count/suspended/.  Only call
12213         ResumeThread once.  Warn if that fails.
12214
12215 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
12216
12217         * win32-low.c (win32_wait): Don't read from the inferior when it
12218         has already exited.
12219
12220 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
12221
12222         * Makefile.in (win32_low_h): New variable.
12223         (win32-low.o): Add dependency on $(win32_low_h).
12224         (win32-arm-low.o, win32-i386-low.o): New rules.
12225
12226 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
12227
12228         * hostio.c: Correct copyright year.
12229
12230 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
12231
12232         * Makefile.in (OBS): Add hostio.o.
12233         (hostio.o): New rule.
12234         * server.h (handle_vFile): Declare.
12235         * hostio.c: New file.
12236         * server.c (handle_v_requests): Take packet_len and new_packet_len
12237         for binary packets.  Call handle_vFile.
12238         (main): Update call to handle_v_requests.
12239
12240 2007-11-05  Daniel Jacobowitz  <dan@codesourcery.com>
12241
12242         * linux-low.c: Include <sched.h>.
12243
12244 2007-11-01  Daniel Jacobowitz  <dan@codesourcery.com>
12245
12246         * linux-low.c (linux_tracefork_grandchild): New.
12247         (linux_tracefork_child): Use clone.
12248         (linux_test_for_tracefork): Use clone; allocate and free a stack.
12249
12250 2007-10-31  Joel Brobecker  <brobecker@adacore.com>
12251
12252         * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
12253
12254 2007-10-24  Daniel Jacobowitz  <dan@codesourcery.com>
12255
12256         * linux-low.c (handle_extended_wait): Handle unexpected signals.
12257
12258 2007-10-23  Daniel Jacobowitz  <dan@codesourcery.com>
12259
12260         * inferiors.c (change_inferior_id): Delete.
12261         (add_pid_to_list, pull_pid_from_list): New.
12262         * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
12263         (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
12264         (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
12265         (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
12266         (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
12267         (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
12268         (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
12269         (using_threads): Always set to 1.
12270         (handle_extended_wait): New.
12271         (add_process): Do not set TID.
12272         (linux_create_inferior): Set must_set_ptrace_flags.
12273         (linux_attach_lwp): Remove TID argument.  Do not check using_threads.
12274         Use PTRACE_SETOPTIONS.  Call new_thread_notify.  Update all callers.
12275         (linux_thread_alive): Rename TID argument to LWPID.
12276         (linux_wait_for_process): Handle unknown processes.  Do not use TID.
12277         (linux_wait_for_event): Do not use TID or check using_threads.  Update
12278         call to dead_thread_notify.  Call handle_extended_wait.
12279         (linux_create_inferior): Use PTRACE_SETOPTIONS.
12280         (send_sigstop): Delete sigstop_sent.
12281         (wait_for_sigstop): Avoid TID.
12282         (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
12283         (linux_test_for_tracefork): New.
12284         (linux_lookup_signals): Use thread_db_active and
12285         linux_supports_tracefork_flag.
12286         (initialize_low): Use thread_db_active and linux_test_for_tracefork.
12287         * linux-low.h (get_process_thread): Avoid TID.
12288         (struct process_ifo): Move thread_known and tid to the end.  Remove
12289         sigstop_sent.
12290         (linux_attach_lwp, thread_db_init): Update prototypes.
12291         * server.h (change_inferior_id): Delete prototype.
12292         (add_pid_to_list, pull_pid_from_list): New prototypes.
12293         * thread-db.c (thread_db_use_events): New.
12294         (find_first_thread): Rename to...
12295         (find_one_thread): ...this.  Update callers and messages.  Do not
12296         call fatal.  Check thread_db_use_events.  Do not call
12297         change_inferior_id or new_thread_notify.
12298         (maybe_attach_thread): Update.  Do not call new_thread_notify.
12299         (thread_db_init): Set thread_db_use_events.  Check use_events.
12300         * utils.c (fatal, warning): Correct message prefix.
12301
12302 2007-10-15  Daniel Jacobowitz  <dan@codesourcery.com>
12303
12304         * Makefile.in (clean): Remove new files.
12305         (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
12306         (powerpc-64.o, powerpc-64.c): New rules.
12307         * configure.srv: Use alternate register sets for powerpc64-*-linux*
12308         with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
12309         with SPE.
12310         * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
12311         SPE targets.
12312         (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
12313         (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
12314         (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
12315         (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
12316         (target_regsets): Add AltiVec and SPE register sets.
12317         * configure.ac: Check for AltiVec and SPE.
12318         * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
12319         (ppc_fill_vrregset, ppc_store_vrregset): New.
12320         (target_regsets): Add AltiVec register set.
12321         * configure: Regenerated.
12322
12323 2007-09-19  Daniel Jacobowitz  <dan@codesourcery.com>
12324
12325         * linux-low.c (O_LARGEFILE): Define.
12326         (linux_read_memory): Use /proc/PID/mem.
12327         * configure.ac: Use AC_GNU_SOURCE.  Check for pread64.
12328         * configure, config.in: Regenerated.
12329
12330 2007-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
12331
12332         * linux-low.c (linux_wait_for_event): Do not pass signals while
12333         single-stepping.
12334
12335 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
12336
12337         * win32-low.c (create_process): New.
12338         (win32_create_inferior): Use create_process instead of
12339         CreateProcess.  If create_process failed retry appending an ".exe"
12340         suffix.  Store the GetLastError result immediatelly after
12341         create_process calls and use it on the call to error.
12342
12343 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
12344
12345         * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
12346
12347 2007-08-23  Joel Brobecker  <brobecker@adacore.com>
12348
12349         * configure.ac: Switch license to GPLv3.
12350
12351 2007-08-01  Michael Snyder  <msnyder@access-company.com>
12352
12353         * remote-utils.c (putpkt_binary): Memory leak, free buf2.
12354
12355 2007-07-31  Pedro Alves  <pedro_alves@portugalmail.pt>
12356
12357         * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
12358         typedef.
12359         (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
12360         (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL.  Get
12361         CloseToolhelp32Snapshot.
12362         (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
12363         CloseToolhelp32Snapshot.
12364
12365 2007-07-27  Michael Snyder  <michael.snyder@access-company.com>
12366
12367         * server.c (main): Check for inferior exit before main loop.
12368
12369 2007-07-18  Pedro Alves  <pedro_alves@portugalmail.pt>
12370
12371         * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
12372         instead of on tmp_desc.
12373
12374 2007-07-17  Pedro Alves  <pedro_alves@portugalmail.pt>
12375             Daniel Jacobowitz  <dan@codesourcery.com>
12376
12377         * inferiors.c (all_dlls, dlls_changed, get_dll): New.
12378         (add_thread): Minor cleanups.
12379         (clear_inferiors): Move lower in the file.  Clear the DLL
12380         list.
12381         (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
12382         * remote-utils.c (prepare_resume_reply): Check dlls_changed.
12383         (xml_escape_text): New.
12384         * server.c (handle_query): Handle qXfer:libraries:read.  Report it
12385         for qSupported.
12386         (handle_v_cont): Report errors.
12387         (gdbserver_version): Update.
12388         (main): Correct size of own_buf.  Do not report initial DLL events.
12389         * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
12390         (unloaded_dll, xml_escape_text): New.
12391         * win32-low.c (enum target_waitkind): Update comments.
12392         (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
12393         (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
12394         (win32_EnumProcessModules, win32_GetModuleInformation)
12395         (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
12396         (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
12397         (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
12398         (win32_Module32First, win32_Module32Next, load_toolhelp)
12399         (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
12400         (get_child_debug_event): Handle DLL events.
12401         (win32_wait): Likewise.
12402
12403 2007-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
12404
12405         * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
12406         * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
12407
12408 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
12409
12410         * win32-low.c (handle_output_debug_string): Ignore event if not
12411         waiting.
12412
12413 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
12414
12415         * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
12416
12417 2007-07-03  Daniel Jacobowitz  <dan@codesourcery.com>
12418
12419         * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
12420
12421 2007-07-02  Daniel Jacobowitz  <dan@codesourcery.com>
12422
12423         * inferiors.c (change_inferior_id): Add comment.
12424         * linux-low.c (check_removed_breakpoint): Add an early
12425         prototype.  Improve debug output.
12426         (linux_attach): Doc update.
12427         (linux_detach_one_process, linux_detach): Clean up before releasing
12428         each process.
12429         (send_sigstop, wait_for_sigstop): Improve comments and debug output.
12430         * linux-low.h (struct process_info): Doc improvement.
12431         * mem-break.c (delete_all_breakpoints): New.
12432         * mem-break.h (delete_all_breakpoints): New prototype.
12433         * thread-db.c (find_first_thread): New.
12434         (thread_db_create_event): Call it instead of
12435         thread_db_find_new_threads.  Clean up unused variables.
12436         (maybe_attach_thread): Remove first thread handling.
12437         (thread_db_find_new_threads): Use find_first_thread.
12438         (thread_db_get_tls_address): Likewise.
12439
12440 2007-06-27  Daniel Jacobowitz  <dan@codesourcery.com>
12441
12442         * thread-db.c (thread_db_find_new_threads): Add prototype.
12443         (thread_db_create_event): Check for the main thread before adding
12444         a new thread.
12445         (maybe_attach_thread): Only enable event reporting if TID == 0.
12446         (thread_db_get_tls_address): Check for new threads.
12447
12448 2007-06-20  Daniel Jacobowitz  <dan@codesourcery.com>
12449
12450         * linux-low.c (linux_create_inferior): Try execv before execvp.
12451         * spu-low.c (spu_create_inferior): Likewise.
12452
12453 2007-06-13  Mike Frysinger  <vapier@gentoo.org>
12454
12455         * linux-low.c (linux_create_inferior): Change execv to execvp.
12456         * spu-low.c (spu_create_inferior): Likewies.
12457
12458 2007-06-13  Daniel Jacobowitz  <dan@codesourcery.com>
12459
12460         * Makefile.in (clean): Clean new files instead of deleted ones.
12461         (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
12462         (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
12463         rules.
12464         * configure.srv: Specify XML files and new regformats for MIPS and
12465         MIPS64 GNU/Linux.
12466         * linux-mips-low.c (mips_num_regs): Set to only used registers.
12467         (mips_regmap): Do not fetch $0.  Remove unused registers.  Add
12468         an entry for the restart register.
12469         (mips_cannot_fetch_register, mips_cannot_store_register)
12470         (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
12471         register names to match the XML descriptions.
12472         (mips_fill_gregset, mips_store_gregset): Likewise.  Handle the
12473         restart register instead of $0.
12474
12475 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
12476             Markus Deuling  <deuling@de.ibm.com>
12477
12478         * remote-utils.c (decode_xfer_write): New function.
12479         * server.h (decode_xfer_write): Add prototype.
12480         * server.c (handle_query): Add PACKET_LEN argument.  Support
12481         qXfer:spu:read and qXfer:spu:write packets.
12482         (main): Pass packet_len to handle_query.
12483         * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
12484         * target.h (target_ops): Add qxfer_spu.
12485
12486 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
12487
12488         * spu-low.c (spu_proc_xfer_spu): Do not return failure when
12489         accessing non-seekable spufs files.
12490
12491 2007-05-16  Markus Deuling  <deuling@de.ibm.com>
12492
12493         * server.c (handle_query): Add reply for qC packet.
12494
12495 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
12496             Leo Zayas  <lerele@champenstudios@com>
12497
12498         * server.h (check_remote_input_interrupt_request): New function.
12499         * remote_utils.c (INVALID_DESCRIPTOR): New define.
12500         (remote_desc): Initialize with INVALID_DESCRIPTOR.
12501         (input_interrupt): Expose on USE_WIN32API too.  Fix whitespace.
12502         (check_remote_input_interrupt_request): New function.
12503         * server.h (check_remote_input_interrupt_request): Declare.
12504         * win32-low.c (winapi_DebugBreakProcess,
12505         winapi_GenerateConsoleCtrlEvent): New typedefs.
12506         (get_child_debug_event): Lower Win32 debug event polling from 1 sec
12507         to 250 ms.
12508         (win32_wait): Check for remote interrupt request
12509         with check_remote_input_interrupt_request.
12510         (win32_request_interrupt): New function.
12511         (win32_target_op): Set request_interrupt to win32_request_interrupt.
12512
12513 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
12514
12515         * win32-low.c (debug_registers_changed,
12516         debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
12517         CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
12518         CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
12519         (thread_rec): Get context using the low target.
12520         (child_add_thread): Call thread_added on the low target,
12521         which does the same thing.
12522         (regptr): Delete.
12523         (do_initial_child_stuff): Remove debug registers references.
12524         Set context using the low target.  Resume threads after
12525         setting the contexts.
12526         (child_continue): Remove dead variable.  Remove debug
12527         registers references.
12528         (child_fetch_inferior_registers): Go through the low target.
12529         (do_child_store_inferior_registers): Remove.
12530         (child_store_inferior_registers): Go through the low target.
12531         (win32_resume): Remove debug registers references.
12532         Set context using the low target.
12533         (handle_exception): Change return type to void.  Don't record
12534         context here.  Set status to TARGET_WAITKIND_SPURIOUS on a
12535         first chance exception.
12536         (get_child_debug_event): Change return type to void.  Remove
12537         goto loop.  Always return after waiting for debug event.
12538         (win32_wait): Convert to switch statement.  Handle spurious
12539         events.
12540
12541         * win32-i386-low.c (debug_registers_changed,
12542         debug_registers_used): New.
12543         (initial_stuff): Rename to ...
12544         (i386_initial_stuff): ... this.  Clear debug registers
12545         state variables.
12546         (store_debug_registers): Delete.
12547         (i386_get_thread_context): New.
12548         (load_debug_registers): Delete.
12549         (i386_set_thread_context): New.
12550         (i386_thread_added): New.
12551         (single_step): Rename to ...
12552         (i386_single_step): ... this.
12553         (do_fetch_inferior_registers): Rename to ...
12554         (i386_fetch_inferior_register): ... this.
12555         (i386_store_inferior_register): New.
12556         (the_low_target): Adapt to new interface.
12557
12558         * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
12559         (arm_get_thread_context): New.
12560         (arm_set_thread_context): New.
12561         (regptr): New.
12562         (do_fetch_inferior_registers): Rename to ...
12563         (arm_fetch_inferior_register): ... this.
12564         (arm_store_inferior_register): New.
12565         (arm_wince_breakpoint): Reimplement as unsigned long.
12566         (arm_wince_breakpoint_len): Define.
12567         (the_low_target): Adapt to new interface.
12568
12569         * win32-low.h (target_ops): Remove regmap, store_debug_registers and
12570         load_debug_registers.  Add get_thread_context, set_thread_context,
12571         thread_added and store_inferior_register.  Rename
12572         fetch_inferior_registers to fetch_inferior_register.
12573         (regptr): Remove declaration.
12574
12575 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
12576
12577         * linux-low.c (linux_detach): Change return type to int.  Return 0.
12578         * spu-low.c (spu_detach): Likewise.
12579
12580 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
12581
12582         * target.h (target_ops): Change return type of detach to int.
12583         Add join.
12584         (join_inferior): New.
12585         * server.c (main): Don't skip detach support on mingw32.
12586         If the inferior doesn't support detaching return error.
12587         Call join_inferior instead of using waitpid.
12588         * linux-low.c (linux_join): New.
12589         (linux_target_op): Add linux_join.
12590         * spu-low.c (spu_join): New.
12591         (spu_target_ops): Add spu_join.
12592         * win32-low.c (win32_detach): Adapt to new interface.
12593         Reopen current_process_handle before detaching.  Issue a child
12594         resume before detaching.
12595         (win32_join): New.
12596         (win32_target_op): Add win32_join.
12597
12598 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
12599
12600         * win32-low.c (win32-attach): Fix return value.
12601         * target.h (target_ops): Describe ATTACH return values.
12602
12603 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
12604
12605         * win32-low.c (GETPROCADDRESS): Define.
12606         (winapi_DebugActiveProcessStop): Add WINAPI.  typedef as pointer.
12607         (winapi_DebugSetProcessKillOnExit): Likewise.
12608         (win32_create_inferior): Force usage of ansi CreateProcessA.
12609         (win32_attach): Use GETPROCADDRESS.
12610         (win32_detach): Likewise.
12611
12612 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
12613
12614         * win32-low.c (win32_wait): Don't use WSTOPSIG.
12615
12616 2007-03-30  Pedro Alves  <pedro_alves@portugalmail.pt>
12617
12618         * win32-low.c: Commit leftover changes from 2007-03-29.
12619
12620 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
12621
12622         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
12623         fields short instead of int.  Add explicit padding.
12624         (i387_cache_to_fsave): Remove unnecessary casts.
12625         (i387_fsave_to_cache): Doc fix.
12626         (i387_cache_to_fxsave): Remove unnecessary casts and masking.
12627
12628 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
12629
12630         * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
12631         (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
12632
12633 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
12634
12635         * configure.srv (arm*-*-mingw32ce*): Move near the other
12636         arm targets.
12637
12638 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
12639
12640         * configure.ac: Add errno checking.
12641         (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
12642         sys/file.h and malloc.h.
12643         (AC_CHECK_DECLS): Add perror.
12644         (srv_mingwce): Handle.
12645         * configure.srv (i[34567]86-*-cygwin*): Add
12646         win32-i386-low.o to srv_tgtobj.
12647         (i[34567]86-*-mingw*): Likewise.
12648         (arm*-*-mingw32ce*): Add case.
12649         * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12650         HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
12651         [__MINGW32CE__] (strerror): New function.
12652         [__MINGW32CE__] (errno): Define to GetLastError.
12653         [__MINGW32CE__] (COUNTOF): New macro.
12654         (remote_open): Remove extra close call.
12655         * mem-break.c (delete_breakpoint_at): New function.
12656         * mem-break.h (delete_breakpoint_at): Declare.
12657         * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12658         HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
12659         [USE_WIN32API] (read, write): Add char* casts.
12660         * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
12661         * server.h: Include wincecompat.h on Windows CE.
12662         [HAVE_ERRNO_H]: Check.
12663         (perror): Declare if not declared.
12664         * utils.c: Add stdlib.h, errno.h and malloc.h includes.
12665         (perror_with_name): Remove errno declaration.
12666         * wincecompat.h: New.
12667         * wincecompat.c: New.
12668         * win32-low.h: New.
12669         * win32-arm-low.c: New.
12670         * win32-i386-low.c: New.
12671         (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
12672         (OUTMSG2): Make it safe.
12673         (_T): New macro.
12674         (COUNTOF): New macro.
12675         (NUM_REGS): Get it from the low target.
12676         (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
12677         CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
12678         (thread_rec): Let low target handle debug registers.
12679         (child_add_thread): Likewise.
12680         (child_init_thread_list): Likewise.
12681         (continue_one_thread): Likewise.
12682         (regptr): New.
12683         (do_child_fetch_inferior_registers): Move to ...
12684         * win32-i386-low.c: ... here, and rename to ...
12685         (do_fetch_inferior_registers): ... this.
12686         * win32-low.c (child_fetch_inferior_registers):
12687         Go through the low target.
12688         (do_child_store_inferior_registers): Use regptr.
12689         (strwinerror): New function.
12690         (win32_create_inferior): Handle Windows CE.
12691         Use strwinerror instead of strerror on Windows error
12692         codes.  Add program to the error output.
12693         Don't close the main thread handle on Windows CE.
12694         (win32_attach): Use coredll.dll on Windows CE.
12695         (win32_kill): Close current process and current
12696         thread handles.
12697         (win32_detach): Use coredll.dll on Windows CE.
12698         (win32_resume): Let low target handle debug registers, and
12699         step request.
12700         (handle_exception): Add/Remove initial breakpoint.  Avoid
12701         non-existant WSTOPSIG on Windows CE.
12702         (win32_read_inferior_memory): Cast to remove warning.
12703         (win32_arch_string): Go through the low target.
12704         (initialize_low): Call set_breakpoint_data with the low
12705         target's breakpoint.
12706         * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
12707         FOP_REGNUM, mappings): Move to ...
12708         * win32-i386-low.c: ... here.
12709         * win32-low.c (win32_thread_info): Move to ...
12710         * win32-low.h: ... here.
12711         * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
12712         win32-arm-low.c and wincecompat.c.
12713         (all:): Add $EXEEXT.
12714         (install-only:): Likewise.
12715         (gdbserver:): Likewise.
12716         (gdbreplay:): Likewise.
12717         * config.in: Regenerate.
12718         * configure: Regenerate.
12719
12720 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
12721
12722         * win32-low.c: Rename typedef thread_info to
12723         win32_thread_info throughout.
12724
12725 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
12726
12727         * win32-i386-low.c: Rename to ...
12728         * win32-low.c: ... this.
12729         * configure.srv: Replace win32-i386-low.o with win32-low.o.
12730         * Makefile.in: Likewise.
12731
12732 2007-03-27  Pedro Alves  <pedro_alves@portugalmail.pt>
12733
12734         * remote-utils.c (monitor_output): Constify msg parameter.
12735         * server.h (monitor_output): Likewise.
12736         * win32-i386-low.c (handle_output_debug_string): New.
12737         (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
12738         handle_output_debug_string.
12739         (get_child_debug_event): Likewise.
12740
12741 2007-03-27  Mat Hostetter  <mat@lcs.mit.edu>
12742
12743         * server.c (main): Correct strtoul check.
12744
12745 2007-03-27  Jon Ringle  <jon@ringle.org>
12746
12747         * linux-low.c: Check __ARCH_HAS_MMU__ also.
12748
12749 2007-03-27  Brooks Moses  <brooks.moses@codesourcery.com>
12750
12751         * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
12752
12753 2007-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
12754
12755         * terminal.h: Check HAVE_SGTTY_H.
12756
12757 2007-02-27  Mat Hostetter  <mat@lcs.mit.edu>
12758
12759         * remote-utils.c (remote_open): Print out the assigned port number.
12760
12761 2007-02-26  Daniel Jacobowitz  <dan@codesourcery.com>
12762
12763         * remote-utils.c (monitor_output): New function.
12764         * server.c (debug_threads): Define here.
12765         (monitor_show_help): New function.
12766         (handle_query): Handle qRcmd.
12767         (main): Do not handle 'd' packet.
12768         * server.h (debug_threads, remote_debug, monitor_output): Declare.
12769         * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
12770         of debug_threads.
12771
12772 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
12773
12774         * Makefile.in (EXEEXT): New.
12775         (clean): Use $(EXEEXT).
12776
12777 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
12778
12779         * target.h (target_ops): Rename send_signal to request_interrupt,
12780         and remove enum target_signal parameter.
12781         * linux-low.c (linux_request_interrupt): Rename from
12782         linux_send_signal, and always send SIGINT.
12783         * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
12784         and always send SIGINT.
12785         * remote-utils.c (putpkt_binary): Call request_interrupt, instead
12786         of send_signal.
12787         (input_interrupt): Likewise.
12788
12789 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
12790
12791         * server.c (get_features_xml): Check if target implemented
12792         arch_string.
12793         * win32-i386-low.c (win32_arch_string): New.
12794         (win32_target_ops): Add win32_arch_string as arch_string member.
12795
12796 2007-02-22  Markus Deuling  <deuling@de.ibm.com>
12797
12798         * spu-low.c (spu_arch_string): New.
12799         (spu_target_ops): Add spu_arch_string.
12800
12801 2007-02-16  Daniel Jacobowitz  <dan@codesourcery.com>
12802
12803         * remote-utils.c: Remove HAVE_TERMINAL_H check.
12804         * configure.ac: Do not check for terminal.h.
12805         * configure, config.in: Regenerated.
12806
12807 2007-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
12808
12809         * Makefile.in (OBS): Add $(XML_BUILTIN).
12810         (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
12811         (clean): Update.
12812         (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
12813         (arm-with-iwmmxt.c): New.
12814         * config.in, configure: Regenerate.
12815         * configure.ac: Check for iWMMXt.  Handle srv_xmltarget,
12816         srv_xmlbuiltin, and srv_xmlfiles.  Define USE_XML.
12817         * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
12818         (arm*-*-linux*): Add iWMMXt and regset support.
12819         * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
12820         (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
12821         (arm_store_wmmxregset, target_regsets): New.
12822         * server.c (get_features_xml): Take annex argument.  Check builtin
12823         XML documents.
12824         (handle_query): Handle multiple annexes.
12825
12826 2007-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
12827
12828         * remote-utils.c [USE_WIN32API] (read, write): Define.
12829         (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
12830         write.
12831
12832 2007-01-09  Daniel Jacobowitz  <dan@codesourcery.com>
12833
12834         * linux-i386-low.c (the_low_target): Set arch_string.
12835         * linux-x86-64-low.c (the_low_target): Likewise.
12836         * linux-low.c (linux_arch_string): New.
12837         (linux_target_ops): Add it.
12838         * linux-low.h (struct linux_target_ops): Add arch_string.
12839         * server.c (write_qxfer_response): Use const void * for DATA.
12840         (get_features_xml): New.
12841         (handle_query): Handle qXfer:features:read.  Report it for qSupported.
12842         * target.h (struct target_ops): Add arch_string method.
12843
12844 2007-01-03  Denis Pilat  <denis.pilat@st.com>
12845             Daniel Jacobowitz  <dan@codesourcery.com>
12846
12847         * linux-low.c (linux_kill): Handle being called with no threads.
12848         * win32-i386-low.c (win32_kill): Likewise.
12849         (get_child_debug_event): Clear current_process_handle.
12850
12851 2006-12-30  Denis PILAT  <denis.pilat@st.com>
12852             Daniel Jacobowitz  <dan@codesourcery.com>
12853
12854         * remote-utils.c (remote_open): Check the type of specified
12855         serial port devices before opening them.
12856         * server.c (main): Kill the inferior if an error occurs during
12857         the first remote_open.
12858
12859 2006-12-05  Markus Deuling  <deuling@de.ibm.com>
12860
12861         * README: Update supported targets.
12862
12863 2006-11-28  Daniel Jacobowitz  <dan@codesourcery.com>
12864
12865         * Makefile.in (clean): Remove reg-mips64.c.
12866         (reg-mips64.c, reg-mips64.o): New rules.
12867         * configure.srv: Handle mips64.  Include regset support for mips.
12868         * linux-mips-low.c (union mips_register): New.
12869         (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
12870         (mips_breakpoint, mips_breakpoint_at): Use int.
12871         (mips_collect_register, mips_supply_register)
12872         (mips_collect_register_32bit, mips_supply_register_32bit)
12873         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12874         (mips_store_fpregset, target_regsets): New.
12875         * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
12876
12877 2006-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
12878
12879         * configure.srv: Add target "spu*-*-*".
12880         * Makefile.in (clean): Remove reg-spu.c.
12881         (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
12882         * spu-low.c: New file.
12883
12884 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
12885
12886         * configure.ac: Correct td_thr_tls_get_addr test.
12887         * configure: Regenerated.
12888
12889 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
12890
12891         * linux-low.c (linux_wait_for_event): Reformat.  Use the
12892         pass_signals array.
12893         * remote-utils.c (decode_address_to_semicolon): New.
12894         * server.c (pass_signals, handle_general_set): New.
12895         (handle_query): Mention QPassSignals for qSupported.
12896         (main): Call handle_general_set.
12897         * server.h (pass_signals, decode_address_to_semicolon): New.
12898
12899 2006-11-06  Daniel Jacobowitz  <dan@codesourcery.com>
12900
12901         * server.c (handle_query): Correct error handling for read_auxv.
12902
12903 2005-10-19  Ulrich Weigand  <uweigand@de.ibm.com>
12904
12905         * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
12906         and srv_linux_thread_db to yes.
12907         * linux-s390-low.c (s390_fill_gregset): New function.
12908         (target_regsets): Define data structure.
12909
12910 2006-10-17  Daniel Jacobowitz  <dan@codesourcery.com>
12911
12912         * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
12913         * configure.ac: Use it.  Define HAVE_TD_THR_TLS_GET_ADDR.
12914         * config.in, configure: Regenerated.
12915         * inferiors.c (gdb_id_to_thread): New function.
12916         (gdb_id_to_thread_id): Use it.
12917         * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
12918         * linux-low.h (struct process_info): Add th member.
12919         (thread_db_get_tls_address): New prototype.
12920         * remote-utils.c (decode_address): Make non-static.
12921         * server.c (handle_query): Handle qGetTLSAddr.
12922         * server.h (gdb_id_to_thread, decode_address): New prototypes.
12923         * target.h (struct target_ops): Add get_tls_address.
12924         * thread-db.c (maybe_attach_thread): Save the thread handle.
12925         (thread_db_get_tls_address): New.
12926
12927 2006-09-28  Daniel Jacobowitz  <dan@codesourcery.com>
12928
12929         * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
12930         (linux_resume_one_process): Take a siginfo_t *.  Update all
12931         callers.  Queue it if necessary.  Use PTRACE_SETSIGINFO.
12932         (struct pending_signals): Add a siginfo_t.
12933         (linux_wait_for_process): Always set last_status.
12934         (linux_wait_for_event): Use PTRACE_GETSIGINFO.
12935         (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
12936         * linux-low.h (struct process_info): Add last_status.
12937
12938 2006-09-21  Daniel Jacobowitz  <dan@codesourcery.com>
12939
12940         * remote-utils.c (try_rle): New function.
12941         (putpkt_binary): Use it.
12942
12943 2006-08-19  Daniel Jacobowitz  <dan@codesourcery.com>
12944
12945         * Makefile.in (clean): Clean reg-x86-64-linux.c.
12946         (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
12947         * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
12948         * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
12949         (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
12950         point registers.
12951
12952 2006-08-08  Richard Sandiford  <richard@codesourcery.com>
12953
12954         * server.c (terminal_fd): New variable.
12955         (old_foreground_pgrp): Likewise.
12956         (restore_old_foreground_pgrp): New function.
12957         (start_inferior): Record the terminal file descriptor in terminal_fd
12958         and its original foreground group in old_foreground_pgrp.  Register
12959         restore_old_foreground_pgrp with atexit().
12960
12961 2006-07-26  Daniel Jacobowitz  <dan@codesourcery.com>
12962
12963         * server.c (handle_query): Correct qPart to qXfer.
12964
12965 2006-07-22  Daniel Jacobowitz  <dan@codesourcery.com>
12966
12967         * configure.ac: Check for more headers which are missing on
12968         Windows.  Automatically supply -lwsock32 and USE_WIN32API.
12969         * configure.srv: Add Cygwin and mingw32.
12970         * remote-utils.c: Don't include headers unconditionally which
12971         are missing on mingw32.  Include <winsock.h> for mingw32.
12972         (remote_open): Adjust for mingw32 support.  Flush
12973         standard error after writing to it.
12974         (remote_close, putpkt_binary, input_interrupt, block_async_io)
12975         (unblock_async_io, enable_async_io, disable_async_io)
12976         (readchar, getpkt): Update for Winsock support.
12977         (prepare_resume_reply): Expect a protocol signal number.
12978         * server.c: Disable <sys/wait.h> on mingw32.
12979         (start_inferior): Adjust for mingw32 support.  Flush
12980         standard error after writing to it.
12981         (attach_inferior): Likewise.  Use protocol signal
12982         numbers.
12983         (main): Skip 'D' packet on mingw32.  Use protocol signal numbers
12984         and names.
12985         * win32-i386-low.c: New file.
12986         * Makefile.in (XM_CLIBS): Set.
12987         (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
12988         (win32-i386-low.o): New dependency rule.
12989         * linux-low.c (linux_wait): Use target signal numbers.
12990         * target.h (struct target_ops): Doc fix.
12991         * server.h (target_signal_to_name): New prototype.
12992         * gdbreplay.c: Don't include headers unconditionally which
12993         are missing on mingw32.  Include <winsock.h> for mingw32.
12994         (remote_close, remote_open): Adjust for Winsock support.
12995         * configure, config.in: Regenerated.
12996
12997 2006-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
12998
12999         * server.c (decode_xfer_read, write_qxfer_response): New.
13000         (handle_query): Take a packet length argument.  Handle
13001         qXfer:auxv:read instead of qPart:auxv:read.  Mention it in
13002         the qSupported response.
13003         (main): Update call to handle_query.
13004
13005 2006-06-22  Daniel Jacobowitz  <dan@codesourcery.com>
13006
13007         * remote-utils.c (remote_escape_output, remote_unescape_input): New.
13008         (putpkt_binary): Renamed from putpkt and adjusted for binary
13009         data.
13010         (putpkt): New wrapper for putpkt_binary.
13011         (readchar): Don't mask off the high bit.
13012         (decode_X_packet): New function.
13013         * server.c (main): Call putpkt_binary if a handler sets the packet
13014         length.  Save the length of the incoming packet.  Handle 'X'.
13015         * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
13016
13017 2006-06-21  Daniel Jacobowitz  <dan@codesourcery.com>
13018
13019         * server.c (handle_query): Handle qSupported.
13020
13021 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
13022
13023         * remote-utils.c (all_symbols_looked_up): New variable.
13024         (look_up_one_symbol): Check it.
13025         * server.h (look_up_one_symbol): New declaration.
13026         * thread-db.c (thread_db_init): Set all_symbols_looked_up.
13027
13028 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
13029
13030         * Makefile.in (linux-arm-low.o): Update dependencies.
13031         * linux-arm-low.c: Include "gdb_proc_service.h".
13032         (PTRACE_GET_THREAD_AREA): Define.
13033         (ps_get_thread_area): New function.
13034
13035 2006-05-09  Nathan Sidwell  <nathan@codesourcery.com>
13036
13037         * configure.srv (m68k*-*-uclinux*): New target.
13038         * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
13039         (linux_resume_one_process): Remove extraneous cast.
13040         (linux_read_offsets): New.
13041         (linux_target_op): Add linux_read_offsets on mmuless systems.
13042         * server.c (handle_query): Add qOffsets logic.
13043         * target.h (struct target_ops): Add read_offsets.
13044
13045 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
13046
13047         * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
13048         (PTRACE_GET_THREAD_AREA): Define.
13049         (ps_get_thread_area): New function.
13050         * Makefile.in (linux-i386-low.o, linux-mips-low.o)
13051         (linux-x86-64-low.o): Update.
13052
13053 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
13054
13055         * configure.ac: Remove checks for prfpregset_t.
13056         * gdb_proc_service.h: New file.
13057         * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
13058         new "gdb_proc_service.h".
13059         * proc-service.c: Likewise.
13060         (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
13061         (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
13062         * Makefile.in (gdb_proc_service_h): Updated.
13063         * configure, config.in: Regenerated.
13064
13065 2006-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
13066
13067         * remote-utils.c (prepare_resume_reply): Move declaration
13068         of gdb_id_from_wait to the top of the block.
13069
13070 2006-02-15  Daniel Jacobowitz  <dan@codesourcery.com>
13071
13072         * linux-low.c (regsets_store_inferior_registers): Read the regset
13073         from the target before filling it.
13074
13075 2006-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
13076
13077         * server.c (attach_inferior): Return SIGTRAP for a successful
13078         attach.
13079
13080 2006-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
13081
13082         * Makefile.in (OBS): Add version.o.
13083         (STAGESTUFF): Delete.
13084         (version.o): Add dependencies.
13085         (version.c): Replace rule.
13086         (clean): Remove version.c.
13087         * server.c (gdbserver_version): New.
13088         (gdbserver_usage): Use printf.
13089         (main): Handle --version and --help.
13090         * server.h (version, host_name): Add declarations.
13091
13092 2005-12-23  Eli Zaretskii  <eliz@gnu.org>
13093
13094         * linux-arm-low.c:
13095         * linux-arm-low.c:
13096         * inferiors.c:
13097         * i387-fp.h:
13098         * i387-fp.c:
13099         * gdbreplay.c:
13100         * regcache.c:
13101         * proc-service.c:
13102         * mem-break.h:
13103         * mem-break.c:
13104         * linux-x86-64-low.c:
13105         * linux-sh-low.c:
13106         * linux-s390-low.c:
13107         * linux-ppc64-low.c:
13108         * linux-ppc-low.c:
13109         * linux-mips-low.c:
13110         * linux-m68k-low.c:
13111         * linux-m32r-low.c:
13112         * linux-low.h:
13113         * linux-low.c:
13114         * linux-ia64-low.c:
13115         * linux-i386-low.c:
13116         * linux-crisv32-low.c:
13117         * thread-db.c:
13118         * terminal.h:
13119         * target.h:
13120         * target.c:
13121         * server.h:
13122         * server.c:
13123         * remote-utils.c:
13124         * regcache.h:
13125         * utils.c:
13126         * Makefile.in:
13127         * configure.ac:
13128         * gdbserver.1: Add (C) after Copyright.  Update the FSF
13129         address.
13130
13131 2005-11-13  Daniel Jacobowitz  <dan@codesourcery.com>
13132
13133         * linux-arm-low.c (arm_eabi_breakpoint): New variable.
13134         (arm_breakpoint_at): Recognize both breakpoints.
13135         (the_low_target): Use the correct breakpoint instruction.
13136
13137 2005-11-02  Daniel Jacobowitz  <dan@codesourcery.com>
13138
13139         * configure.srv (x86_64-*-linux*): Turn on thread_db support.
13140         * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
13141         (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
13142         (the_low_target): Update.
13143
13144 2005-10-25  Andreas Schwab  <schwab@suse.de>
13145
13146         * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
13147
13148         * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
13149         (ia64_num_regs): Reduce to 462.
13150
13151 2005-09-17  Daniel Jacobowitz  <dan@codesourcery.com>
13152
13153         * acinclude.m4: Correct quoting.
13154         * aclocal.m4: Regenerated.
13155
13156         Suggested by SZOKOVACS Robert <szo@ies.hu>:
13157         * thread-db.c (thread_db_err_str): Handle TD_VERSION.
13158         (thread_db_init): Call thread_db_err_str.
13159         * configure.ac: Check for TD_VERSION.
13160         * config.in, configure: Regenerated.
13161
13162 2005-07-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13163
13164         * server.h (error, fatal, warning): Add ATTR_FORMAT.
13165
13166 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
13167
13168         * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
13169         is not available.  Define HAVE_PTRACE_GETREGS if it is.
13170         * config.in, configure: Regenerated.
13171         * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
13172         * linux-i386-low.c, linux-m68k-low.c: Update to use
13173         HAVE_PTRACE_GETREGS.
13174         * linux-low.c (regsets_fetch_inferior_registers)
13175         (regsets_store_inferior_registers): Only return 0 if we processed
13176         GENERAL_REGS.
13177         * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
13178         * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
13179
13180 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
13181
13182         * inferiors.c (struct thread_info): Add gdb_id.
13183         (add_thread): Add gdb_id argument.
13184         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
13185         * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
13186         calls to add_thread.
13187         * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
13188         * server.c (handle_query): Use thread_to_gdb_id.
13189         (handle_v_cont, main): Use gdb_id_to_thread_id.
13190         * server.h (add_thread): Update prototype.
13191         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
13192         prototypes.
13193
13194 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
13195
13196         * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
13197         left-padded registers.
13198         * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
13199         * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
13200
13201 2005-07-01  Steve Ellcey  <sje@cup.hp.com>
13202
13203         * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
13204         * configure: Regenerate.
13205         * config.in: Regenerate.
13206         * server.h (NEED_DECLARATION_STRERROR):
13207         Replace with !HAVE_DECL_STRERROR.
13208
13209 2005-06-16  Daniel Jacobowitz  <dan@codesourcery.com>
13210
13211         * linux-low.c (linux_wait, linux_send_signal): Don't test
13212         an unsigned long variable for > 0 if it could be MAX_ULONG.
13213         * server.c (myresume): Likewise.
13214         * target.c (set_desired_inferior): Likewise.
13215
13216 2005-06-13  Mark Kettenis  <kettenis@gnu.org>
13217
13218         * configure.ac: Simplify and improve check for socklen_t.
13219         * configure, config.in: Regenerate.
13220
13221 2005-06-12  Daniel Jacobowitz  <dan@codesourcery.com>
13222
13223         * acconfig.h: Remove.
13224         * configure.ac: Add a test for socklen_t.  Use three-argument
13225         AC_DEFINE throughout.
13226         * config.in: Regenerated using autoheader 2.59.
13227         * configure: Regenerated.
13228
13229         * gdbreplay.c (socklen_t): Provide a default.
13230         (remote_open): Use socklen_t.
13231         * remote-utils.c (socklen_t): Provide a default.
13232         (remote_open): Use socklen_t.
13233         (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
13234         unsigned char.
13235
13236         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
13237         char for buffers.
13238         * linux-low.c (linux_read_memory, linux_write_memory)
13239         (linux_read_auxv): Likewise.
13240         * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
13241         (check_mem_write): Likewise.
13242         * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
13243         Likewise.
13244         * regcache.c (struct inferior_rgcache_data, registers_to_string)
13245         (registers_from_string, register_data): Likewise.
13246         * server.c (handle_query, main): Likewise.
13247         * server.h (convert_ascii_to_int, convert_int_to_ascii)
13248         (decode_M_packet): Likewise.
13249         * target.c (read_inferior_memory, write_inferior_memory): Likewise.
13250         * target.h (struct target_ops): Update read_memory, write_memory,
13251         and read_auxv.
13252         (read_inferior_memory, write_inferior_memory): Update.
13253         * linux-low.h (struct linux_target_ops): Change type of breakpoint
13254         to unsigned char *.
13255         * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
13256         linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
13257         linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
13258         linux-s390-low.c, linux-sh-low.c: Update for changes in
13259         read_inferior_memory and the_low_target->breakpoint.
13260
13261 2005-05-28  Daniel Jacobowitz  <dan@codesourcery.com>
13262
13263         * Makefile.in (SFILES): Add linux-ppc64-low.c.
13264         (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
13265         * configure.srv: Add powerpc64-*-linux*.
13266         * linux-ppc64-low.c: New file.
13267
13268 2005-05-23  Orjan Friberg  <orjanf@axis.com>
13269
13270         * linux-cris-low.c: New file with support for CRIS.
13271         * linux-crisv32-low.c: Ditto for CRISv32.
13272         * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
13273         (clean): Add reg-cris.c and reg-crisv32.c.
13274         Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
13275         reg-crisv32.o, and reg-crisv32.c to make rules.
13276         * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
13277         recognized targets.
13278
13279 2005-05-16  Ulrich Weigand  <uweigand@de.ibm.com>
13280
13281         * linux-low.c (fetch_register): Ensure buffer size is a multiple
13282         of sizeof (PTRACE_XFER_TYPE).
13283         (usr_store_inferior_registers): Likewise.  Zero out excess bytes.
13284
13285 2005-05-12  Orjan Friberg  <orjanf@axis.com>
13286
13287         * target.h (struct target_ops): Add insert_watchpoint,
13288         remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
13289         pointers for hardware watchpoint support.
13290         * linux-low.h (struct linux_target_ops): Ditto.
13291         * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
13292         (linux_stopped_by_watchpoint, linux_stopped_data_address): New.  Add
13293         to linux_target_ops.
13294         * remote-utils.c (prepare_resume_reply): Add watchpoint information to
13295         reply packet.
13296         * server.c (main): Recognize 'Z' and 'z' packets.
13297
13298 2005-05-10  Ulrich Weigand  <uweigand@de.ibm.com>
13299
13300         * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
13301         (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
13302         (the_low_target): Add new members.
13303
13304 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
13305
13306         * proc-service.c (ps_lgetregs): Search all_processes instead of
13307         all_threads.
13308
13309 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
13310
13311         * server.c (start_inferior): Change return type to int.
13312         (attach_inferior): Change sigptr to int *.
13313         (handle_v_cont, handle_v_requests): Change signal to int *.
13314         (main): Change signal to int.
13315
13316 2005-04-15  Kei Sakamoto  <sakamoto.kei@renesas.com>
13317
13318         * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
13319         * configure.srv: Add m32r*-*-linux*.
13320         * linux-m32r-low.c: New file.
13321
13322 2005-03-04  Daniel Jacobowitz  <dan@codesourcery.com>
13323
13324         * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
13325
13326 2005-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
13327
13328         * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
13329         Take unsigned long arguments for PIDs.
13330         * linux-low.c (add_process, linux_attach_lwp, linux_attach)
13331         (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
13332         (wait_for_sigstop, linux_resume_one_process)
13333         (regsets_fetch_inferior_registers, linux_send_signal)
13334         (linux_read_auxv): Likewise.  Update the types of variables holding
13335         PIDs.  Update format string specifiers.
13336         * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
13337         * remote-utils.c (prepare_resume_reply): Likewise.
13338         * server.c (cont_thread, general_thread, step_thread)
13339         (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
13340         unsigned long.
13341         (handle_query): Update format specifiers.
13342         (handle_v_cont, main): Use strtoul for thread IDs.
13343         * server.h (struct inferior_list_entry): Use unsigned long for ID.
13344         (add_thread, find_inferior_id, change_inferior_id, cont_thread)
13345         (general_thread, step_thread, thread_from_wait)
13346         (old_thread_from_wait): Update.
13347         * target.h (struct thread_resume): Use unsigned long for THREAD.
13348         (struct target_ops): Use unsigned long for arguments to attach and
13349         thread_alive.
13350
13351 2005-02-24  Daniel Jacobowitz  <dan@codesourcery.com>
13352
13353         * acinclude.m4: Include bfd/bfd.m4 directly.
13354         * configure.ac: Use AC_ARG_PROGRAM.  Suggested by Aron Griffis
13355         <agriffis@toolchain.org>.
13356         * aclocal.m4, configure: Regenerated.
13357
13358 2005-01-07  Andrew Cagney  <cagney@gnu.org>
13359
13360         * configure.ac: Rename configure.in, require autoconf 2.59.
13361         * configure: Re-generate.
13362
13363 2004-12-08  Daniel Jacobowitz  <dan@debian.org>
13364
13365         * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area.  Reset
13366         LIBS when finished.
13367         * aclocal.m4: Regenerated.
13368         * configure: Regenerated.
13369
13370 2004-11-21  Andreas Schwab  <schwab@suse.de>
13371
13372         * linux-m68k-low.c (m68k_num_gregs): Define.
13373         (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
13374         (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
13375         (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
13376         (m68k_breakpoint_at): New.  Add to the_low_target.
13377
13378         * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
13379         srv_linux_thread_db to yes.
13380
13381 2004-10-20  Joel Brobecker  <brobecker@gnat.com>
13382
13383         * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
13384         (ARCH_SET_FS): Likewise.
13385         (ARCH_GET_FS): Likewise.
13386         (ARCH_GET_GS): Likewise.
13387
13388 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
13389
13390         * linux-i386-low.c (ps_get_thread_area): New.
13391         * linux-x86-64-low.c (ps_get_thread_area): New.
13392         * linux-low.c: Include <sys/syscall.h>.
13393         (linux_kill_one_process): Don't kill the first thread here.
13394         (linux_kill): Kill the first thread here.
13395         (kill_lwp): New function.
13396         (send_sigstop, linux_send_signal): Use it.
13397         * proc-service.c: Clean up #ifdefs.
13398         (fpregset_info): Delete.
13399         (ps_lgetregs): Update and enable implementation.
13400         (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
13401         implementations.
13402         * remote-utils.c (struct sym_cache, symbol_cache): New.
13403         (input_interrupt): Print a clearer message.
13404         (async_io_enabled): New variable.
13405         (enable_async_io, disable_async_io): Use it.  Update comments.
13406         (look_up_one_symbol): Use the symbol cache.
13407         * thread-db.c (thread_db_look_up_symbols): New function.
13408         (thread_db_init): Update comments.  Call thread_db_look_up_symbols.
13409
13410 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
13411
13412         * configure.in: Test for -rdynamic.
13413         * configure: Regenerated.
13414         * Makefile (INTERNAL_LDFLAGS): New.
13415         (gdbserver, gdbreplay): Use it.
13416
13417 2004-09-02  Andrew Cagney  <cagney@gnu.org>
13418
13419         * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
13420
13421 2004-03-23  Daniel Jacobowitz  <drow@mvista.com>
13422
13423         * linux-low.c (linux_wait): Clear all_processes list also.
13424
13425 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
13426
13427         * linux-low.c: Include <errno.h>.  Remove extern declaration of
13428         errno.
13429
13430 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
13431
13432         * gdbreplay.c, server.h, utils.c: Update copyright years.
13433
13434 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
13435
13436         * server.c (main): Print child status or termination signal from
13437         variable 'signal', not 'sig'.
13438
13439 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
13440
13441         * linux-low.c (linux_read_memory): Change return type to
13442         int.  Check for and return error from ptrace().
13443         * target.c (read_inferior_memory): Change return type to int.  Pass
13444         back return status from the_target->read_memory().
13445         * target.h (struct target_ops): Adapt *read_memory() prototype.
13446         Update comment.
13447         (read_inferior_memory): Adapt prototype.
13448         * server.c (main): Return an error packet if
13449         read_inferior_memory() returns an error.
13450
13451 2004-03-04  Daniel Jacobowitz  <drow@mvista.com>
13452
13453         * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
13454         Unify with other clean targets.
13455
13456 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
13457
13458         * server.c (handle_v_cont): Call set_desired_inferior.
13459
13460 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
13461
13462         * remote-utils.c (prepare_resume_reply): Always supply "thread:".
13463
13464 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
13465
13466         * linux-low.c (linux_wait): Unblock async I/O.
13467         (linux_resume): Block and enable async I/O.
13468         * remote-utils.c (block_async_io, unblock_async_io): New functions.
13469         * server.h (block_async_io, unblock_async_io): Add prototypes.
13470
13471 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
13472
13473         * remote-utils.c (remote_open): Print a status notice after
13474         opening a TCP port.
13475         * server.c (attach_inferior): Print a status notice after
13476         attaching.
13477
13478 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
13479
13480         * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
13481
13482 2004-02-26  Daniel Jacobowitz  <drow@mvista.com>
13483
13484         * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
13485         error packet.
13486         * server.c, target.h: Update copyright years.
13487
13488 2004-02-25  Roland McGrath  <roland@redhat.com>
13489
13490         * target.h (struct target_ops): New member `read_auxv'.
13491         * server.c (handle_query): Handle qPart:auxv:read: query using that.
13492         * linux-low.c (linux_read_auxv): New function.
13493         (linux_target_ops): Initialize `read_auxv' member to that.
13494
13495 2004-02-17  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
13496
13497         Committed by Jim Blandy  <jimb@redhat.com>.
13498
13499         * linux-s390-low.c (s390_num_regs): Update.
13500         (s390_regmap): Remove control registers.  Use __s390x__ predefine
13501         instead of GPR_SIZE to distiguish s390 and s390x targets.
13502
13503 2004-01-31  Daniel Jacobowitz  <drow@mvista.com>
13504
13505         * linux-low.c: Update copyright year.
13506         (check_removed_breakpoint): Clear pending_is_breakpoint.
13507         (linux_set_resume_request, linux_queue_one_thread)
13508         (resume_status_pending_p): New functions.
13509         (linux_continue_one_thread): Use process->resume.
13510         (linux_resume): Only resume threads if there are no pending events.
13511         * linux-low.h (struct process_info): Add resume request
13512         pointer.
13513
13514 2004-01-30  Daniel Jacobowitz  <drow@mvista.com>
13515
13516         * regcache.c (new_register_cache): Clear the allocated register
13517         buffer.  Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
13518
13519 2003-10-13  Daniel Jacobowitz  <drow@mvista.com>
13520
13521         * linux-low.c (linux_resume): Take a struct thread_resume *
13522         argument.
13523         (linux_wait): Update call.
13524         (resume_ptr): New static variable.
13525         (linux_continue_one_thread): Renamed from
13526         linux_continue_one_process.  Use resume_ptr.
13527         (linux_resume): Use linux_continue_one_thread.
13528         * server.c (handle_v_cont, handle_v_requests): New functions.
13529         (myresume): New function.
13530         (main): Handle 'v' case.
13531         * target.h (struct thread_resume): New type.
13532         (struct target_ops): Change argument of "resume" to struct
13533         thread_resume *.
13534         (myresume): Delete macro.
13535
13536 2003-08-08  H.J. Lu  <hongjiu.lu@intel.com>
13537
13538         * Makefile.in (install-only): Create dest dir. Support DESTDIR.
13539         (uninstall): Support DESTDIR.
13540
13541 Mon Jul 21 20:09:34 UTC 2003  Brendan Conoboy  <blc@redhat.com>
13542
13543         * configure.srv: Add xscale*linux copy of arm*linux entry.
13544
13545 2003-07-24  Daniel Jacobowitz  <drow@mvista.com>
13546
13547         * linux-arm-low.c (arm_reinsert_addr): New function.
13548         (the_low_target): Add arm_reinsert_addr.
13549
13550 2003-07-08  Mark Kettenis  <kettenis@gnu.org>
13551
13552         * mem-break.c: Remove whitespace at end of file.
13553
13554 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
13555
13556         * configure.in: Check whether we need to prototype strerror.
13557         * server.h: Optionally prototype strerror.
13558         * gdbreplay.c (perror_with_name): Use strerror.
13559         * linux-low.c (linux_attach_lwp): Use strerror.
13560         * utils.c (perror_with_name): Use strerror.
13561         * config.in, configure: Regenerated.
13562
13563 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
13564
13565         * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
13566         SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
13567
13568 2003-06-20  Daniel Jacobowitz  <drow@mvista.com>
13569
13570         * Makefile.in (SFILES): Update.
13571         * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
13572         low-sun3.c: Remove files.
13573
13574 2003-06-17  Daniel Jacobowitz  <drow@mvista.com>
13575
13576         * linux-low.c: Move comment to linux_thread_alive where it belonged.
13577         (linux_detach_one_process, linux_detach): New functions.
13578         (linux_target_ops): Add linux_detach.
13579         * server.c (main): Handle 'D' packet.
13580         * target.h (struct target_ops): Add "detach" member.
13581         (detach_inferior): Define.
13582
13583 2003-06-13  Mark Kettenis  <kettenis@gnu.org>
13584
13585         From Kelley Cook  <kelleycook@wideopenwest.com>:
13586         * configure.srv: Accept i[34567]86 variants.
13587
13588 2003-06-05  Daniel Jacobowitz  <drow@mvista.com>
13589
13590         * linux-low.c (linux_wait_for_event): Correct comment typos.
13591         (linux_resume_one_process): Call check_removed_breakpoint.
13592         (linux_send_signal): New function.
13593         (linux_target_ops): Add linux_send_signal.
13594         * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
13595         of kill.
13596         * target.h (struct target_ops): Add send_signal.
13597
13598 2003-05-29  Jim Blandy  <jimb@redhat.com>
13599
13600         * linux-low.c (usr_store_inferior_registers): Transfer buf in
13601         PTRACE_XFER_TYPE-sized chunks, not int-sized chunks.  Otherwise,
13602         if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
13603         away part of the register's value.
13604
13605 2003-03-26  Daniel Jacobowitz  <drow@mvista.com>
13606
13607         * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
13608         (linux_wait_for_event, linux_init_signals): Likewise.
13609
13610 2003-03-17  Daniel Jacobowitz  <drow@mvista.com>
13611
13612         * configure.in: Check for stdlib.h.
13613         * configure: Regenerated.
13614         * config.in: Regenerated.
13615
13616 2003-01-04  Andreas Schwab  <schwab@suse.de>
13617
13618         * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
13619
13620 2003-01-02  Andrew Cagney  <ac131313@redhat.com>
13621
13622         * Makefile.in: Remove obsolete code.
13623
13624 2002-11-20  Daniel Jacobowitz  <drow@mvista.com>
13625
13626         * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
13627         defined(PT_FPR0_HI).
13628
13629 2002-11-17  Stuart Hughes  <seh@zee2.com>
13630
13631         * linux-arm-low.c (arm_num_regs): Increase.
13632         (arm_regmap): Include status register.
13633
13634 2002-11-17  Daniel Jacobowitz  <drow@mvista.com>
13635
13636         * linux-low.c (register_addr): Remove incorrect -1 check.
13637
13638 2002-08-29  Daniel Jacobowitz  <drow@mvista.com>
13639
13640         * linux-low.c (linux_create_inferior): Call setpgid.  Return
13641         the new PID.
13642         (unstopped_p, linux_signal_pid): Remove.
13643         (linux_target_ops): Remove linux_signal_pid.
13644         * remote-utils.c (putpkt, input_interrupt): Use signal_pid
13645         global instead of target method.
13646         * target.h (struct target_ops): Remove signal_pid.  Update comment
13647         for create_inferior.
13648         * server.c (signal_pid): New variable.
13649         (create_inferior): Set signal_pid.  Block SIGTTOU and SIGTTIN in
13650         gdbserver.  Set the child to be the foreground process group.
13651         (attach_inferior): Set signal_pid.
13652
13653 2002-08-23  Daniel Jacobowitz  <drow@mvista.com>
13654
13655         * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
13656
13657 2002-08-20  Jim Blandy  <jimb@redhat.com>
13658
13659         * Makefile.in (LDFLAGS): Allow the configure script to establish a
13660         default for this.
13661
13662 2002-08-01  Andrew Cagney  <cagney@redhat.com>
13663
13664         * Makefile.in: Make chill references obsolete.
13665
13666 2002-07-24  Kevin Buettner  <kevinb@redhat.com>
13667
13668         * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
13669         * configure: Regenerate.
13670         * config.in: Regenerate.
13671
13672 2002-07-09  David O'Brien  <obrien@FreeBSD.org>
13673
13674         * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
13675         (perror_with_name, remote_close, remote_open, expect, play): Static.
13676
13677 2002-07-04  Michal Ludvig  <mludvig@suse.cz>
13678
13679         * linux-x86-64-low.c (x86_64_regmap): Make it an array of
13680         byte offsets instead of an array of indexes.
13681         (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
13682
13683 2002-06-13  Daniel Jacobowitz  <drow@mvista.com>
13684
13685         * regcache.c: Add comment.
13686
13687 2002-06-11  Daniel Jacobowitz  <drow@mvista.com>
13688
13689         * thread-db.c: New file.
13690         * proc-service.c: New file.
13691         * acinclude.m4: New file.
13692         * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
13693         proc-service.o, and thread-db.o.
13694         (linux-low.o): Add USE_THREAD_DB.
13695         * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
13696         HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
13697         * aclocal.m4: Regenerated.
13698         * config.in: Regenerated.
13699         * configure: Regenerated.
13700         * configure.in: Check for proc_service.h, sys/procfs.h,
13701         thread_db.h, and linux/elf.h headrs.
13702         Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
13703         PRFPREGSET_T_BROKEN.  Introduce srv_thread_depfiles and USE_THREAD_DB.
13704         Check for -lthread_db and thread support.
13705         * configure.srv: Enable thread_db support for ARM, i386, MIPS,
13706         PowerPC, and SuperH.
13707         * i387-fp.c: Constify arguments.
13708         * i387-fp.h: Likewise.
13709         * inferiors.c: (struct thread_info): Renamed from
13710         `struct inferior_info'.  Remove PID member.  Use generic inferior
13711         list header.  All uses updated.
13712         (inferiors, signal_pid): Removed.
13713         (all_threads): New variable.
13714         (get_thread): Define.
13715         (add_inferior_to_list): New function.
13716         (for_each_inferior): New function.
13717         (change_inferior_id): New function.
13718         (add_inferior): Removed.
13719         (remove_inferior): New function.
13720         (add_thread): New function.
13721         (free_one_thread): New function.
13722         (remove_thread): New function.
13723         (clear_inferiors): Use for_each_inferior and free_one_thread.
13724         (find_inferior): New function.
13725         (find_inferior_id): New function.
13726         (inferior_target_data): Update argument type.
13727         (set_inferior_target_data): Likewise.
13728         (inferior_regcache_data): Likewise.
13729         (set_inferior_regcache_data): Likewise.
13730         * linux-low.c (linux_bp_reinsert): Remove.
13731         (all_processes, stopping_threads, using_thrads)
13732         (struct pending_signals, debug_threads, pid_of): New.
13733         (inferior_pid): Replace with macro.
13734         (struct inferior_linux_data): Remove.
13735         (get_stop_pc, add_process): New functions.
13736         (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
13737         Use add_process and add_thread.
13738         (linux_attach_lwp): New function, based on old linux_attach.  Use
13739         add_process and add_thread.  Set stop_expected for new threads.
13740         (linux_attach): New function.
13741         (linux_kill_one_process): New function.
13742         (linux_kill): Kill all LWPs.
13743         (linux_thread_alive): Use find_inferior_id.
13744         (check_removed_breakpoints, status_pending_p): New functions.
13745         (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
13746         Update.  Use WNOHANG.  Wait for cloned processes also.  Update process
13747         struct for the found process.
13748         (linux_wait_for_event): New function.
13749         (linux_wait): Use it.  Support LWPs.
13750         (send_sigstop, wait_for_sigstop, stop_all_processes)
13751         (linux_resume_one_process, linux_continue_one_process): New functions.
13752         (linux_resume): Support LWPs.
13753         (REGISTER_RAW_SIZE): Remove.
13754         (fetch_register): Use register_size instead.  Call supply_register.
13755         (usr_store_inferior_registers): Likewise.  Call collect_register.
13756         Fix recursive case.
13757         (regsets_fetch_inferior_registers): Improve error message.
13758         (regsets_store_inferior_registers): Add debugging.
13759         (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
13760         (unstopped_p, linux_signal_pid): New functions.
13761         (linux_target_ops): Add linux_signal_pid.
13762         (linux_init_signals): New function.
13763         (initialize_low): Call it.  Initialize using_threads.
13764         * regcache.c (inferior_regcache_data): Add valid
13765         flag.
13766         (get_regcache): Fetch registers lazily.  Add fetch argument
13767         and update all callers.
13768         (regcache_invalidate_one, regcache_invalidate): New
13769         functions.
13770         (new_register_cache): Renamed from create_register_cache.
13771         Return the new regcache.
13772         (free_register_cache): Change argument to a void *.
13773         (registers_to_string, registers_from_string): Call get_regcache
13774         with fetch flag set.
13775         (register_data): Make static.  Pass fetch flag to get_regcache.
13776         (supply_register): Call get_regcache with fetch flag clear.
13777         (collect_register): Call get_regcache with fetch flag set.
13778         (collect_register_as_string): New function.
13779         * regcache.h: Update.
13780         * remote-utils.c (putpkt): Flush after debug output and use
13781         stderr.
13782         Handle input interrupts while waiting for an ACK.
13783         (input_interrupt): Use signal_pid method.
13784         (getpkt): Flush after debug output and use stderr.
13785         (outreg): Use collect_register_as_string.
13786         (new_thread_notify, dead_thread_notify): New functions.
13787         (prepare_resume_reply): Check using_threads.  Set thread_from_wait
13788         and general_thread.
13789         (look_up_one_symbol): Flush after debug output.
13790         * server.c (step_thread, server_waiting): New variables.
13791         (start_inferior): Don't use signal_pid.  Update call to mywait.
13792         (attach_inferior): Update call to mywait.
13793         (handle_query): Handle qfThreadInfo and qsThreadInfo.
13794         (main): Don't fetch/store registers explicitly.  Use
13795         set_desired_inferior.  Support proposed ``Hs'' packet.  Update
13796         calls to mywait.
13797         * server.h: Update.
13798         (struct inferior_list, struct_inferior_list_entry): New.
13799         * target.c (set_desired_inferior): New.
13800         (write_inferior_memory): Constify.
13801         (mywait): New function.
13802         * target.h: Update.
13803         (struct target_ops): New signal_pid method.
13804         (mywait): Removed macro, added prototype.
13805
13806         * linux-low.h (regset_func): Removed.
13807         (regset_fill_func, regset_store_func): New.
13808         (enum regset_type): New.
13809         (struct regset_info): Add type field.  Use new operation types.
13810         (struct linux_target_ops): stop_pc renamed to get_pc.
13811         Add decr_pc_after_break and breakpoint_at.
13812         (get_process, get_thread_proess, get_process_thread)
13813         (strut process_info, all_processes, linux_attach_lwp)
13814         (thread_db_init): New.
13815
13816         * linux-arm-low.c (arm_get_pc, arm_set_pc,
13817         arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
13818         (the_low_target): Add new members.
13819         * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
13820         (i386_store_fpxregset): Constify.
13821         (target_regsets): Add new kind identifier.
13822         (i386_get_pc): Renamed from i386_stop_pc.  Simplify.
13823         (i386_set_pc): Add debugging.
13824         (i386_breakpoint_at): New function.
13825         (the_low_target): Add new members.
13826         * linux-mips-low.c (mips_get_pc, mips_set_pc)
13827         (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
13828         (mips_breakpoint_at): New.
13829         (the_low_target): Add new members.
13830         * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
13831         (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
13832         (the_low_target): Add new members.
13833         * linux-sh-low.c (sh_get_pc, sh_set_pc)
13834         (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
13835         (the_low_target): Add new members.
13836         * linux-x86-64-low.c (target_regsets): Add new kind
13837         identifier.
13838
13839 2002-05-15  Daniel Jacobowitz  <drow@mvista.com>
13840
13841         From Martin Pool <mbp@samba.org>:
13842         * server.c (gdbserver_usage): New function.
13843         (main): Call it.
13844
13845 2002-05-14  Daniel Jacobowitz  <drow@mvista.com>
13846
13847         * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
13848         stop_at -> stop_pc.
13849
13850 2002-05-04  Andrew Cagney  <ac131313@redhat.com>
13851
13852         * Makefile.in: Remove obsolete code.
13853
13854 2002-04-24  Michal Ludvig  <mludvig@suse.cz>
13855
13856         * linux-low.c (regsets_fetch_inferior_registers),
13857         (regsets_store_inferior_registers): Removed cast to int from
13858         ptrace() calls.
13859         * regcache.h: Added declaration of struct inferior_info.
13860
13861 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
13862
13863         * inferiors.c (struct inferior_info): Add regcache_data.
13864         (add_inferior): Call create_register_cache.
13865         (clear_inferiors): Call free_register_cache.
13866         (inferior_regcache_data, set_inferior_regcache_data): New functions.
13867         * regcache.c (struct inferior_regcache_data): New.
13868         (registers): Remove.
13869         (get_regcache): New function.
13870         (create_register_cache, free_register_cache): New functions.
13871         (set_register_cache): Don't initialize the register cache here.
13872         (registers_to_string, registers_from_string, register_data): Call
13873         get_regcache.
13874         * regcache.h: Add prototypes.
13875         * server.h: Likewise.
13876
13877 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
13878
13879         * mem-break.c: New file.
13880         * mem-break.h: New file.
13881         * Makefile.in: Add mem-break.o rule; update server.h
13882         dependencies.
13883         * inferiors.c (struct inferior_info): Add target_data
13884         member.
13885         (clear_inferiors): Free target_data member if set.
13886         (inferior_target_data, set_inferior_target_data): New functions.
13887         * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
13888         (i386_stop_pc, i386_set_pc): New.  Add to the_low_target.
13889         * linux-low.c (linux_bp_reinsert): New variable.
13890         (struct inferior_linux_data): New.
13891         (linux_create_inferior): Use set_inferior_target_data.
13892         (linux_attach): Likewise.  Call add_inferior.
13893         (linux_wait_for_one_inferior): New function.
13894         (linux_wait): Call it.
13895         (linux_write_memory): Add const.
13896         (initialize_low): Call set_breakpoint_data.
13897         * linux-low.h (struct linux_target_ops): Add breakpoint
13898         handling members.
13899         * server.c (attach_inferior): Remove extra add_inferior
13900         call.
13901         * server.h: Include mem-break.h.  Update inferior.c
13902         prototypes.
13903         * target.c (read_inferior_memory)
13904         (write_inferior_memory): New functions.
13905         * target.h (read_inferior_memory)
13906         (write_inferior_memory): Change macros to prototypes.
13907         (struct target_ops): Update comments.  Add const to write_memory
13908         definition.
13909
13910 2002-04-11  Daniel Jacobowitz  <drow@mvista.com>
13911
13912         * linux-low.c (usr_store_inferior_registers): Support
13913         registers which are allowed to fail to store.
13914         * linux-low.h (linux_target_ops): Likewise.
13915         * linux-ppc-low.c (ppc_regmap): Support FPSCR.
13916         (ppc_cannot_store_register): FPSCR may not be storable.
13917
13918 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13919
13920         * server.h: Include <string.h> if HAVE_STRING_H.
13921         * ChangeLog: Correct paths in last ChangeLog entry.
13922
13923 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13924
13925         * linux-low.h: Remove obsolete prototypes.
13926         (struct linux_target_ops): New.
13927         (extern the_low_target): New.
13928         * linux-low.c (num_regs, regmap): Remove declarations.
13929         (register_addr): Use the_low_target explicitly.
13930         (fetch_register): Likewise.
13931         (usr_fetch_inferior_registers): Likewise.
13932         (usr_store_inferior_registers): Likewise.
13933         * linux-arm-low.c (num_regs): Remove.
13934         (arm_num_regs): Define.
13935         (arm_regmap): Renamed from regmap, made static.
13936         (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
13937         made static.
13938         (arm_cannot_store_register): Renamed from cannot_store_register,
13939         made static.
13940         (the_low_target): New.
13941         * linux-i386-low.c (num_regs): Remove.
13942         (i386_num_regs): Define.
13943         (i386_regmap): Renamed from regmap, made static.
13944         (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
13945         made static.
13946         (i386_cannot_store_register): Renamed from cannot_store_register,
13947         made static.
13948         (the_low_target): New.
13949         * linux-ia64-low.c (num_regs): Remove.
13950         (ia64_num_regs): Define.
13951         (ia64_regmap): Renamed from regmap, made static.
13952         (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
13953         made static.
13954         (ia64_cannot_store_register): Renamed from cannot_store_register,
13955         made static.
13956         (the_low_target): New.
13957         * linux-m68k-low.c (num_regs): Remove.
13958         (m68k_num_regs): Define.
13959         (m68k_regmap): Renamed from regmap, made static.
13960         (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
13961         made static.
13962         (m68k_cannot_store_register): Renamed from cannot_store_register,
13963         made static.
13964         (the_low_target): New.
13965         * linux-mips-low.c (num_regs): Remove.
13966         (mips_num_regs): Define.
13967         (mips_regmap): Renamed from regmap, made static.
13968         (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
13969         made static.
13970         (mips_cannot_store_register): Renamed from cannot_store_register,
13971         made static.
13972         (the_low_target): New.
13973         * linux-ppc-low.c (num_regs): Remove.
13974         (ppc_num_regs): Define.
13975         (ppc_regmap): Renamed from regmap, made static.
13976         (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
13977         made static.
13978         (ppc_cannot_store_register): Renamed from cannot_store_register,
13979         made static.
13980         (the_low_target): New.
13981         * linux-s390-low.c (num_regs): Remove.
13982         (s390_num_regs): Define.
13983         (s390_regmap): Renamed from regmap, made static.
13984         (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
13985         made static.
13986         (s390_cannot_store_register): Renamed from cannot_store_register,
13987         made static.
13988         (the_low_target): New.
13989         * linux-sh-low.c (num_regs): Remove.
13990         (sh_num_regs): Define.
13991         (sh_regmap): Renamed from regmap, made static.
13992         (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
13993         made static.
13994         (sh_cannot_store_register): Renamed from cannot_store_register,
13995         made static.
13996         (the_low_target): New.
13997         * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
13998         (the_low_target): New.
13999
14000 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
14001
14002         * Makefile.in: Add stamp-h target.
14003         * configure.in: Create stamp-h.
14004         * configure: Regenerated.
14005
14006 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
14007
14008         * inferiors.c: New file.
14009         * target.c: New file.
14010         * target.h: New file.
14011         * Makefile.in:  Add target.o and inferiors.o.  Update
14012         dependencies.
14013         * linux-low.c (inferior_pid): New static variable,
14014         moved from server.c.
14015         (linux_create_inferior): Renamed from create_inferior.
14016         Call add_inferior.  Return 0 on success instead of a PID.
14017         (linux_attach): Renamed from myattach.
14018         (linux_kill): Renamed from kill_inferior.  Call clear_inferiors ().
14019         (linux_thread_alive): Renamed from mythread_alive.
14020         (linux_wait): Renamed from mywait.  Call clear_inferiors () if the
14021         child dies.
14022         (linux_resume): Renamed from myresume.  Add missing ``return 0''.
14023         (regsets_store_inferior_registers): Correct error message.
14024         Add missing ``return 0''.
14025         (linux_fetch_registers): Renamed from fetch_inferior_registers.
14026         (linux_store_registers): Renamed from store_inferior_registers.
14027         (linux_read_memory): Renamed from read_inferior_memory.
14028         (linux_write_memory): Renamed from write_inferior_memory.
14029         (linux_target_ops): New structure.
14030         (initialize_low): Call set_target_ops ().
14031         * remote-utils.c (unhexify): New function.
14032         (hexify): New function.
14033         (input_interrupt): Send signals to ``signal_pid''.
14034         * server.c (inferior_pid): Remove.
14035         (start_inferior): Update create_inferior call.
14036         (attach_inferior): Call add_inferior.
14037         (handle_query): New function.
14038         (main): Call handle_query for `q' packets.
14039         * server.h: Include "target.h".  Remove obsolete prototypes.
14040         Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
14041
14042 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
14043
14044         * Makefile.in: Add WARN_CFLAGS.  Update configury
14045         dependencies.
14046         * configure.in: Check for <string.h>
14047         * configure: Regenerate.
14048         * config.in: Regenerate.
14049         * gdbreplay.c: Include needed system headers.
14050         (remote_open): Remove strchr prototype.
14051         * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
14052         * regcache.c (supply_register): Change buf argument to const void *.
14053         (supply_register_by_name): Likewise.
14054         (collect_register): Change buf argument to void *.
14055         (collect_register_by_name): Likewise.
14056         * regcache.h: Add missing prototypes.
14057         * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
14058         * server.c (handle_query): New function.
14059         (attached): New static variable, moved out of main.
14060         (main): Quiet longjmp clobber warnings.
14061         * server.h: Add ATTR_NORETURN and ATTR_FORMAT.  Update prototypes.
14062         * utils.c (error): Remove NORETURN.
14063         (fatal): Likewise.