Move ARM_CPSR_GREGNUM to arch/arm-linux.h
[external/binutils.git] / gdb / gdbserver / ChangeLog
1 2016-04-20  Yao Qi  <yao.qi@linaro.org>
2
3         * linux-aarch32-low.c: Include "arch/arm-linux.h".
4         (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
5         number 16.
6         (arm_store_gregset): Likewise.
7
8 2016-04-16  Walfred Tedeschi  <walfred.tedeschi@intel.com>
9
10         * Makefile.in (clean): Add removal for i386-avx-mpx.c,
11         i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
12         (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
13         (amd64-avx-mpx-linux.c): New rules.
14         (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
15         * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
16         (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
17         (srv_amd64_regobj): Add amd64-avx-mpx.o.
18         (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
19         (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
20         (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
21         (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
22         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
23         (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
24         (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
25         * linux-x86-low.c (x86_linux_read_description): Add case for
26         X86_XSTATE_AVX_MPX_MASK.
27         (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
28         (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
29         init_registers_i386_avx_mpx_linux.
30         * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
31         (initialize_low_tracepoint): Call
32         init_registers_i386_avx_mpx_linux.
33         * linux-amd64-ipa.c (get_ipa_tdesc):  Add case for avx_mpx.
34         (initialize_low_tracepoint): Call
35         init_registers_amd64_avx_mpx_linux.
36         * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
37         (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
38         (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
39         declarations.
40
41 2016-04-18  Pedro Alves  <palves@redhat.com>
42
43         * configure: Regenerate.
44
45 2016-04-13  Antoine Tremblay  <antoine.tremblay@ericsson.com>
46
47         * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
48         (aarch64_emit_sub): Likewise.
49
50 2016-04-12  Pedro Alves  <palves@redhat.com>
51
52         * utils.c (prepare_to_throw_exception): Delete.
53
54 2016-04-05  Simon Marchi  <simon.marchi@ericsson.com>
55
56         * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
57
58 2016-04-05  Marcin Kościelnicki  <koriakin@0x04.net>
59
60         * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
61
62 2016-04-03  Marcin Kościelnicki  <koriakin@0x04.net>
63
64         * linux-aarch64-ipa.c: Add <elf.h> include.
65         * linux-ppc-ipa.c: Add <elf.h> include.
66         * linux-s390-ipa.c: Add <elf.h> include.
67
68 2016-03-31  Marcin Kościelnicki  <koriakin@0x04.net>
69
70         * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
71         (get_raw_reg_ptr): Likewise.
72         (get_trace_state_variable_value_ptr): Likewise.
73         (set_trace_state_variable_value_ptr): Likewise.
74         (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
75         char *.
76
77 2016-03-31  Wei-cheng Wang  <cole945@gmail.com>
78             Marcin Kościelnicki  <koriakin@0x04.net>
79
80         PR/17221
81         * linux-ppc-low.c (emit_insns): New function.
82         (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
83         (ppc_emit_prologue): New function.
84         (ppc_emit_epilogue): New function.
85         (ppc_emit_add): New function.
86         (ppc_emit_sub): New function.
87         (ppc_emit_mul): New function.
88         (ppc_emit_lsh): New function.
89         (ppc_emit_rsh_signed): New function.
90         (ppc_emit_rsh_unsigned): New function.
91         (ppc_emit_ext): New function.
92         (ppc_emit_zero_ext): New function.
93         (ppc_emit_log_not): New function.
94         (ppc_emit_bit_and): New function.
95         (ppc_emit_bit_or): New function.
96         (ppc_emit_bit_xor): New function.
97         (ppc_emit_bit_not): New function.
98         (ppc_emit_equal): New function.
99         (ppc_emit_less_signed): New function.
100         (ppc_emit_less_unsigned): New function.
101         (ppc_emit_ref): New function.
102         (ppc_emit_const): New function.
103         (ppc_emit_reg): New function.
104         (ppc_emit_pop): New function.
105         (ppc_emit_stack_flush): New function.
106         (ppc_emit_swap): New function.
107         (ppc_emit_stack_adjust): New function.
108         (ppc_emit_call): New function.
109         (ppc_emit_int_call_1): New function.
110         (ppc_emit_void_call_2): New function.
111         (ppc_emit_if_goto): New function.
112         (ppc_emit_goto): New function.
113         (ppc_emit_eq_goto): New function.
114         (ppc_emit_ne_goto): New function.
115         (ppc_emit_lt_goto): New function.
116         (ppc_emit_le_goto): New function.
117         (ppc_emit_gt_goto): New function.
118         (ppc_emit_ge_goto): New function.
119         (ppc_write_goto_address): New function.
120         (ppc_emit_ops_impl): New static variable.
121         (ppc64v1_emit_prologue): New function.
122         (ppc64v2_emit_prologue): New function.
123         (ppc64_emit_epilogue): New function.
124         (ppc64_emit_add): New function.
125         (ppc64_emit_sub): New function.
126         (ppc64_emit_mul): New function.
127         (ppc64_emit_lsh): New function.
128         (ppc64_emit_rsh_signed): New function.
129         (ppc64_emit_rsh_unsigned): New function.
130         (ppc64_emit_ext): New function.
131         (ppc64_emit_zero_ext): New function.
132         (ppc64_emit_log_not): New function.
133         (ppc64_emit_bit_and): New function.
134         (ppc64_emit_bit_or): New function.
135         (ppc64_emit_bit_xor): New function.
136         (ppc64_emit_bit_not): New function.
137         (ppc64_emit_equal): New function.
138         (ppc64_emit_less_signed): New function.
139         (ppc64_emit_less_unsigned): New function.
140         (ppc64_emit_ref): New function.
141         (ppc64_emit_const): New function.
142         (ppc64v1_emit_reg): New function.
143         (ppc64v2_emit_reg): New function.
144         (ppc64_emit_pop): New function.
145         (ppc64_emit_stack_flush): New function.
146         (ppc64_emit_swap): New function.
147         (ppc64v1_emit_call): New function.
148         (ppc64v2_emit_call): New function.
149         (ppc64v1_emit_int_call_1): New function.
150         (ppc64v2_emit_int_call_1): New function.
151         (ppc64v1_emit_void_call_2): New function.
152         (ppc64v2_emit_void_call_2): New function.
153         (ppc64_emit_if_goto): New function.
154         (ppc64_emit_eq_goto): New function.
155         (ppc64_emit_ne_goto): New function.
156         (ppc64_emit_lt_goto): New function.
157         (ppc64_emit_le_goto): New function.
158         (ppc64_emit_gt_goto): New function.
159         (ppc64_emit_ge_goto): New function.
160         (ppc64v1_emit_ops_impl): New static variable.
161         (ppc64v2_emit_ops_impl): New static variable.
162         (ppc_emit_ops): New function.
163         (linux_low_target): Wire in ppc_emit_ops.
164
165 2016-03-31  Wei-cheng Wang  <cole945@gmail.com>
166             Marcin Kościelnicki  <koriakin@0x04.net>
167
168         PR/17221
169         * Makefile.in: Add powerpc-*-ipa.o
170         * configure.srv: Add ipa_obj for powerpc*-linux.
171         * linux-ppc-ipa.c: New file.
172         * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
173         includes.
174         (PPC_FIELD): New macro.
175         (PPC_SEXT): New macro.
176         (PPC_OP6): New macro.
177         (PPC_BO): New macro.
178         (PPC_LI): New macro.
179         (PPC_BD): New macro.
180         (init_registers_*): Move prototype to linux-ppc-tdesc.h.
181         (tdesc_*): Move declaration to linux-ppc-tdesc.h.
182         (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
183         (ppc_get_thread_area): New function.
184         (is_elfv2_inferior): New function.
185         (gen_ds_form): New function.
186         (GEN_STD): New macro.
187         (GEN_STDU): New macro.
188         (GEN_LD): New macro.
189         (GEN_LDU): New macro.
190         (gen_d_form): New function.
191         (GEN_ADDI): New macro.
192         (GEN_ADDIS): New macro.
193         (GEN_LI): New macro.
194         (GEN_LIS): New macro.
195         (GEN_ORI): New macro.
196         (GEN_ORIS): New macro.
197         (GEN_LWZ): New macro.
198         (GEN_STW): New macro.
199         (GEN_STWU): New macro.
200         (gen_xfx_form): New function.
201         (GEN_MFSPR): New macro.
202         (GEN_MTSPR): New macro.
203         (GEN_MFCR): New macro.
204         (GEN_MTCR): New macro.
205         (GEN_SYNC): New macro.
206         (GEN_LWSYNC): New macro.
207         (gen_x_form): New function.
208         (GEN_OR): New macro.
209         (GEN_MR): New macro.
210         (GEN_LWARX): New macro.
211         (GEN_STWCX): New macro.
212         (GEN_CMPW): New macro.
213         (gen_md_form): New function.
214         (GEN_RLDICL): New macro.
215         (GEN_RLDICR): New macro.
216         (gen_i_form): New function.
217         (GEN_B): New macro.
218         (GEN_BL): New macro.
219         (gen_b_form): New function.
220         (GEN_BNE): New macro.
221         (GEN_LOAD): New macro.
222         (GEN_STORE): New macro.
223         (gen_limm): New function.
224         (gen_atomic_xchg): New function.
225         (gen_call): New function.
226         (ppc_relocate_instruction): New function.
227         (ppc_install_fast_tracepoint_jump_pad): New function.
228         (ppc_get_min_fast_tracepoint_insn_len): New function.
229         (ppc_get_ipa_tdesc_idx): New function.
230         (the_low_target): Wire in the new functions.
231         (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
232         tdescs.
233         * linux-ppc-tdesc.h: New file.
234
235 2016-03-31  Marcin Kościelnicki  <koriakin@0x04.net>
236
237         * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
238         (alloc_jump_pad_buffer): New function.
239         * linux-amd64-ipa.c: Add <sys/mman.h> include.
240         (alloc_jump_pad_buffer): New function.
241         * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
242         * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
243         (alloc_jump_pad_buffer): New function.
244         * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
245         (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
246         * tracepoint.h (alloc_jump_pad_buffer): New prototype.
247         (getauxval) [!HAVE_GETAUXVAL]: New prototype.
248
249 2016-03-30  Marcin Kościelnicki  <koriakin@0x04.net>
250
251         * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
252         * linux-amd64-ipa.c: Likewise.
253         * linux-i386-ipa.c: Likewise.
254         * linux-s390-ipa.c: Likewise.
255         * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
256         ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
257         set_trace_state_variable_value_ptr.
258         (struct ipa_sym_addresses): Likewise.
259         (symbol_list): Likewise.
260         (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
261         accessing gdb_collect directly.
262         (gdb_collect_ptr_type): New typedef.
263         (get_raw_reg_ptr_type): New typedef.
264         (get_trace_state_variable_value_ptr_type): New typedef.
265         (set_trace_state_variable_value_ptr_type): New typedef.
266         (gdb_collect_ptr): New global.
267         (get_raw_reg_ptr): New global.
268         (get_trace_state_variable_value_ptr): New global.
269         (set_trace_state_variable_value_ptr): New global.
270         (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
271         accessing get_raw_reg directly.
272         (get_get_tsv_func_addr): Likewise for
273         get_trace_state_variable_value_ptr.
274         (get_set_tsv_func_addr): Likewise for
275         set_trace_state_variable_value_ptr.
276         * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
277
278 2016-03-30  Simon Marchi  <simon.marchi@ericsson.com>
279
280         * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
281
282 2016-03-30  Marcin Kościelnicki  <koriakin@0x04.net>
283
284         * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
285         packets.
286         (relocate_instruction): Remove own_buf.
287         * server.c (own_buf): Make global.
288         (handle_v_requests): Make global.
289         * server.h (own_buf): New declaration.
290         (handle_v_requests): New prototype.
291
292 2016-03-29  Marcin Kościelnicki  <koriakin@0x04.net>
293
294         PR 18377
295         * linux-s390-low.c (add_insns): New function.
296         (s390_emit_prologue): New function.
297         (s390_emit_epilogue): New function.
298         (s390_emit_add): New function.
299         (s390_emit_sub): New function.
300         (s390_emit_mul): New function.
301         (s390_emit_lsh): New function.
302         (s390_emit_rsh_signed): New function.
303         (s390_emit_rsh_unsigned): New function.
304         (s390_emit_ext): New function.
305         (s390_emit_log_not): New function.
306         (s390_emit_bit_and): New function.
307         (s390_emit_bit_or): New function.
308         (s390_emit_bit_xor): New function.
309         (s390_emit_bit_not): New function.
310         (s390_emit_equal): New function.
311         (s390_emit_less_signed): New function.
312         (s390_emit_less_unsigned): New function.
313         (s390_emit_ref): New function.
314         (s390_emit_if_goto): New function.
315         (s390_emit_goto): New function.
316         (s390_write_goto_address): New function.
317         (s390_emit_litpool): New function.
318         (s390_emit_const): New function.
319         (s390_emit_call): New function.
320         (s390_emit_reg): New function.
321         (s390_emit_pop): New function.
322         (s390_emit_stack_flush): New function.
323         (s390_emit_zero_ext): New function.
324         (s390_emit_swap): New function.
325         (s390_emit_stack_adjust): New function.
326         (s390_emit_set_r2): New function.
327         (s390_emit_int_call_1): New function.
328         (s390_emit_void_call_2): New function.
329         (s390_emit_eq_goto): New function.
330         (s390_emit_ne_goto): New function.
331         (s390_emit_lt_goto): New function.
332         (s390_emit_le_goto): New function.
333         (s390_emit_gt_goto): New function.
334         (s390_emit_ge_goto): New function.
335         (s390x_emit_prologue): New function.
336         (s390x_emit_epilogue): New function.
337         (s390x_emit_add): New function.
338         (s390x_emit_sub): New function.
339         (s390x_emit_mul): New function.
340         (s390x_emit_lsh): New function.
341         (s390x_emit_rsh_signed): New function.
342         (s390x_emit_rsh_unsigned): New function.
343         (s390x_emit_ext): New function.
344         (s390x_emit_log_not): New function.
345         (s390x_emit_bit_and): New function.
346         (s390x_emit_bit_or): New function.
347         (s390x_emit_bit_xor): New function.
348         (s390x_emit_bit_not): New function.
349         (s390x_emit_equal): New function.
350         (s390x_emit_less_signed): New function.
351         (s390x_emit_less_unsigned): New function.
352         (s390x_emit_ref): New function.
353         (s390x_emit_if_goto): New function.
354         (s390x_emit_const): New function.
355         (s390x_emit_call): New function.
356         (s390x_emit_reg): New function.
357         (s390x_emit_pop): New function.
358         (s390x_emit_stack_flush): New function.
359         (s390x_emit_zero_ext): New function.
360         (s390x_emit_swap): New function.
361         (s390x_emit_stack_adjust): New function.
362         (s390x_emit_int_call_1): New function.
363         (s390x_emit_void_call_2): New function.
364         (s390x_emit_eq_goto): New function.
365         (s390x_emit_ne_goto): New function.
366         (s390x_emit_lt_goto): New function.
367         (s390x_emit_le_goto): New function.
368         (s390x_emit_gt_goto): New function.
369         (s390x_emit_ge_goto): New function.
370         (s390_emit_ops): New function.
371         (struct linux_target_ops): Fill in emit_ops hook.
372
373 2016-03-29  Marcin Kościelnicki  <koriakin@0x04.net>
374
375         PR 18377
376         * Makefile.in: Add s390 IPA files.
377         * configure.srv: Build IPA for s390.
378         * linux-s390-ipa.c: New file.
379         * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
380         (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
381         (tdesc_s390_linux32): Likewise.
382         (init_registers_s390_linux32v1): Likewise.
383         (tdesc_s390_linux32v1): Likewise.
384         (init_registers_s390_linux32v2): Likewise.
385         (tdesc_s390_linux32v2): Likewise.
386         (init_registers_s390_linux64): Likewise.
387         (tdesc_s390_linux64): Likewise.
388         (init_registers_s390_linux64v1): Likewise.
389         (tdesc_s390_linux64v1): Likewise.
390         (init_registers_s390_linux64v2): Likewise.
391         (tdesc_s390_linux64v2): Likewise.
392         (init_registers_s390_te_linux64): Likewise.
393         (tdesc_s390_te_linux64): Likewise.
394         (init_registers_s390_vx_linux64): Likewise.
395         (tdesc_s390_vx_linux64): Likewise.
396         (init_registers_s390_tevx_linux64): Likewise.
397         (tdesc_s390_tevx_linux64): Likewise.
398         (init_registers_s390x_linux64): Likewise.
399         (tdesc_s390x_linux64): Likewise.
400         (init_registers_s390x_linux64v1): Likewise.
401         (tdesc_s390x_linux64v1): Likewise.
402         (init_registers_s390x_linux64v2): Likewise.
403         (tdesc_s390x_linux64v2): Likewise.
404         (init_registers_s390x_te_linux64): Likewise.
405         (tdesc_s390x_te_linux64): Likewise.
406         (init_registers_s390x_vx_linux64): Likewise.
407         (tdesc_s390x_vx_linux64): Likewise.
408         (init_registers_s390x_tevx_linux64): Likewise.
409         (tdesc_s390x_tevx_linux64): Likewise.
410         (have_hwcap_s390_vx): New static variable.
411         (s390_arch_setup): Fill have_hwcap_s390_vx.
412         (s390_get_thread_area): New function.
413         (s390_ft_entry_gpr_esa): New const.
414         (s390_ft_entry_gpr_zarch): New const.
415         (s390_ft_entry_misc): New const.
416         (s390_ft_entry_fr): New const.
417         (s390_ft_entry_vr): New const.
418         (s390_ft_main_31): New const.
419         (s390_ft_main_64): New const.
420         (s390_ft_exit_fr): New const.
421         (s390_ft_exit_vr): New const.
422         (s390_ft_exit_misc): New const.
423         (s390_ft_exit_gpr_esa): New const.
424         (s390_ft_exit_gpr_zarch): New const.
425         (append_insns): New function.
426         (s390_relocate_instruction): New function.
427         (s390_install_fast_tracepoint_jump_pad): New function.
428         (s390_get_min_fast_tracepoint_insn_len): New function.
429         (s390_get_ipa_tdesc_idx): New function.
430         (struct linux_target_ops): Wire in the above functions.
431         (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
432         * linux-s390-tdesc.h: New file.
433
434 2016-03-29  Marcin Kościelnicki  <koriakin@0x04.net>
435
436         * linux-s390-low.c (s390_supports_tracepoints): New function.
437         (struct linux_target_ops): Fill supports_tracepoints hook.
438
439 2016-03-18  Yao Qi  <yao.qi@linaro.org>
440
441         * linux-low.c (lwp_signal_can_be_delivered): New function.
442         (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
443
444 2016-03-18  Yao Qi  <yao.qi@linaro.org>
445
446         * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
447         0 if signal is enqueued.  Remove 'signal' from one debugging
448         message.  Move one debugging message to some lines below.
449         Remove code setting 'signal' to 0.
450
451 2016-03-18  Yao Qi  <yao.qi@linaro.org>
452
453         * linux-low.c (linux_low_filter_event): Remove redundant
454         WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
455
456 2016-03-09  Marcin Kościelnicki  <koriakin@0x04.net>
457
458         * linux-ppc-low.c (ppc_supports_tracepoints): New function.
459         (struct linux_target_ops): Wire in the above.
460
461 2016-03-03  Yao Qi  <yao.qi@linaro.org>
462
463         * linux-low.c: Update comments to start_step_over.
464
465 2016-03-03  Yao Qi  <yao.qi@linaro.org>
466
467         PR server/19736
468         * linux-low.c (handle_extended_wait): Set child suspended
469         if event_lwp->bp_reinsert isn't zero.
470
471 2016-03-02  Yao Qi  <yao.qi@linaro.org>
472
473         * linux-low.c (linux_resume_one_lwp_throw): Replace code with
474         enqueue_pending_signal.
475
476 2016-03-02  Marcin Kościelnicki  <koriakin@0x04.net>
477
478         * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
479         is actually loaded.
480
481 2016-02-25  Marcin Kościelnicki  <koriakin@0x04.net>
482
483         * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
484         (s390_regmap_3264) [!__s390x__]: New global.
485         (s390_collect_ptrace_register): Skip map entries containing -1.
486         (s390_supply_ptrace_register): Ditto.
487         (s390_fill_gprs_high): New function.
488         (s390_store_gprs_high): New function.
489         (s390_regsets): Add NT_S390_HIGH_GPRS.
490         (s390_get_hwcap): Enable on 31-bit.
491         (have_hwcap_s390_high_gprs): Enable on 31-bit.
492         (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
493         Detect NT_S390_HIGH_GPRS.
494         (s390_usrregs_info_3264): Enable on 31-bit.
495         (s390_regs_info): Enable regs_info_3264 on 31-bit.
496         (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
497
498 2016-02-25  Marcin Kościelnicki  <koriakin@0x04.net>
499
500         PR gdb/13808
501         * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
502         * configure.srv: Ditto.
503         * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
504         (initialize_low_tracepoint): Remove ipa_tdesc assignment.
505         * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
506         (init_registers_amd64_linux): Remove prototype.
507         (tdesc_amd64_linux): Remove declaration.
508         (get_ipa_tdesc): New function.
509         (initialize_low_tracepoint): Remove ipa_tdesc assignment,
510         initialize remaining tdescs.
511         * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
512         (init_registers_i386_linux): Remove prototype.
513         (tdesc_i386_linux): Remove declaration.
514         (get_ipa_tdesc): New function.
515         (initialize_low_tracepoint): Remove ipa_tdesc assignment,
516         initialize remaining tdescs.
517         * linux-low.c (linux_get_ipa_tdesc_idx): New function.
518         (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
519         * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
520         * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
521         (x86_get_ipa_tdesc_idx): New function.
522         (the_low_target): Wire in x86_get_ipa_tdesc_idx.
523         * linux-x86-tdesc.h: New file.
524         * target.h (struct target_ops): Add get_ipa_tdesc_idx.
525         (target_get_ipa_tdesc_idx): New macro.
526         * tracepoint.c (ipa_tdesc_idx): New macro.
527         (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
528         (symbol_list): Add ipa_tdesc_idx.
529         (cmd_qtstart): Write ipa_tdesc_idx in the target.
530         (ipa_tdesc): Remove.
531         (ipa_tdesc_idx): New variable.
532         (get_context_regcache): Use get_ipa_tdesc.
533         (gdb_collect): Ditto.
534         (gdb_probe): Ditto.
535         * tracepoint.h (get_ipa_tdesc): New prototype.
536         (ipa_tdesc): Remove.
537
538 2016-02-24  Pedro Alves  <palves@redhat.com>
539
540         * linux-low.c (check_stopped_by_breakpoint): Rename to ...
541         (save_stop_reason): ... this.  Use GDB_ARCH_IS_TRAP_HWBKPT and
542         handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
543         Factor out common code between the USE_SIGTRAP_SIGINFO and
544         !USE_SIGTRAP_SIGINFO blocks.
545         (linux_low_filter_event): Call save_stop_reason instead of
546         check_stopped_by_breakpoint and check_stopped_by_watchpoint.
547         Update comments.
548         (linux_wait_1): Update comments.
549
550 2016-02-24  Wei-cheng Wang  <cole945@gmail.com>
551
552         * linux-ppc-low.c (ppc_supports_z_point_type): New function:
553         (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
554         (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
555         ppc_insert_point, ppc_remove_point.
556
557 2016-02-17  Marcin Kościelnicki  <koriakin@0x04.net>
558
559         * linux-s390-low.c (s390_supports_z_point_type): New function.
560         (struct linux_target_ops): Wire s390_supports_z_point_type in.
561
562 2016-02-16  Yao Qi  <yao.qi@linaro.org>
563
564         * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
565         PC.  Get pc from regcache_read_pc.
566
567 2016-02-12  Yao Qi  <yao.qi@linaro.org>
568
569         * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
570         or linux_get_pc_32bit.
571         (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
572
573 2016-02-12  Yao Qi  <yao.qi@linaro.org>
574
575         * linux-arm-low.c (get_next_pcs_ops): Initialize it with
576         arm_linux_get_next_pcs_fixup.
577
578 2016-02-12  Marcin Kościelnicki  <koriakin@0x04.net>
579
580         * tracepoint.c (x_tracepoint_action_download): Change
581         write_inferior_data_ptr to write_inferior_data_pointer.
582         (cmd_qtstart): Likewise.
583         (write_inferior_data_ptr): Remove.
584         (download_agent_expr): Change write_inferior_data_ptr to
585         write_inferior_data_pointer.
586         (download_tracepoint_1): Likewise.
587         (download_tracepoint): Likewise.
588         (download_trace_state_variables): Likewise.
589
590 2016-02-11  Wei-cheng Wang  <cole945@gmail.com>
591             Marcin Kościelnicki  <koriakin@0x04.net>
592
593         * tracepoint.c (struct tracepoint_action_ops): Remove.
594         (struct tracepoint_action): Remove ops.
595         (m_tracepoint_action_download, r_tracepoint_action_download)
596         (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
597         size and offset accordingly.
598         (m_tracepoint_action_ops, r_tracepoint_action_ops)
599         (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
600         (tracepoint_action_send, tracepoint_action_download): New functions.
601         Helpers for trace action handlers.
602         (add_tracepoint_action): Remove setup actions ops.
603         (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
604
605 2016-02-10  Yao Qi  <yao.qi@linaro.org>
606
607         * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
608
609 2016-02-09  Simon Marchi  <simon.marchi@ericsson.com>
610
611         * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
612         to AC_OUTPUT.
613         * configure: Regenerate.
614
615 2016-02-09  Simon Marchi  <simon.marchi@ericsson.com>
616
617         * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
618         void * to gdb_byte *.
619         * linux-low.c (siginfo_fixup): Likewise.
620         (linux_xfer_siginfo): Likewise.
621         * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
622         Likewise.
623         * linux-x86-low.c (x86_siginfo_fixup): Likewise.
624
625 2016-02-02  Walfred Tedeschi  <walfred.tedeschi@intel.com>
626
627         * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
628         to srv_tgtobj.
629         (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
630         to srv_tgtobj.
631         * linux-x86-low.c [__x86_64__]: Include
632         "nat/amd64-linux-siginfo.h".
633         (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
634         (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
635         (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
636         (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
637         (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
638         (cpt_si_fd, si_timerid, si_overrun): Move from
639         nat/amd64-linux-siginfo.c.
640         * Makefile.in (amd64-linux-siginfo.o:): New rule.
641
642 2016-01-28  Simon Marchi  <simon.marchi@ericsson.com>
643
644         * server.c (skip_to_semicolon):  Remove.
645         (process_point_options): Use strchrnul instead of
646         skip_to_semicolon.
647
648 2016-01-26  Yao Qi  <yao.qi@linaro.org>
649
650         * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
651         * linux-low.c (install_software_single_step_breakpoints): Don't
652         call regcache_read_pc.
653         * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
654         argument pc.
655
656 2016-01-26  Yao Qi  <yao.qi@linaro.org>
657
658         * linux-low.c (install_software_single_step_breakpoints): Call
659         regcache_read_pc instead of get_pc.
660
661 2016-01-26  Yao Qi  <yao.qi@linaro.org>
662
663         * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
664         (unblock_async_io): Rename to ...
665         (block_unblock_async_io): ... it.  New function.
666         (enable_async_io): Don't install SIGIO handler.  Unblock it
667         instead.
668         (disable_async_io): Don't ignore SIGIO.  Block it instead.
669         (initialize_async_io): Install SIGIO handler.  Don't call
670         unblock_async_io.
671
672 2016-01-26  Yao Qi  <yao.qi@linaro.org>
673
674         * remote-utils.c (getpkt): If the buffer isn't empty, and the
675         first character is '\003', call *the_target->request_interrupt.
676
677 2016-01-25  Yao Qi  <yao.qi@linaro.org>
678
679         * remote-utils.c (new_thread_notify): Remove.
680         (dead_thread_notify): Likewise.
681         * remote-utils.h (new_thread_notify): Remove declaration.
682         (dead_thread_notify): Likewise.
683
684 2016-01-23  Marcin Kościelnicki  <koriakin@0x04.net>
685
686         * gdb.trace/pending.exp: Fix expected message on continue.
687
688 2016-01-22  Marcin Kościelnicki  <koriakin@0x04.net>
689
690         * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
691         it works properly on big-endian machines where sizeof (CORE_ADDR)
692         != sizeof (void *).
693
694 2016-01-21  Pedro Alves  <palves@redhat.com>
695
696         * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
697         (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
698         * configure: Regenerate.
699
700 2016-01-21  Yao Qi  <yao.qi@linaro.org>
701
702         * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
703         is_thumb and set it according to CPSR saved on the stack.
704         (get_next_pcs_syscall_next_pc): Pass is_thumb to
705         arm_sigreturn_next_pc.
706
707 2016-01-18  Yao Qi  <yao.qi@linaro.org>
708
709         * linux-low.c (linux_set_pc_64bit): New function.
710         (linux_get_pc_64bit): New function.
711         * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
712         Declare.
713         * linux-sparc-low.c (debug_threads): Remove declaration.
714         (sparc_get_pc): Remove.
715         (the_low_target): Use linux_get_pc_64bit instead of
716         sparc_get_pc.
717         * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
718         (the_low_target): Use linux_get_pc_64bit and
719         linux_set_pc_64bit.
720
721 2016-01-18  Yao Qi  <yao.qi@linaro.org>
722
723         * linux-arm-low.c (debug_threads): Remove declaration.
724         (arm_get_pc, arm_set_pc): Remove.
725         (the_low_target): Use linux_get_pc_32bit and
726         linux_set_pc_32bit.
727         * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
728         (the_low_target): Use linux_get_pc_32bit and
729         linux_set_pc_32bit.
730         * linux-cris-low.c (debug_threads): Remove declaration.
731         (cris_get_pc, cris_set_pc,): Remove.
732         (the_low_target): Use linux_get_pc_32bit and
733         linux_set_pc_32bit.
734         * linux-crisv32-low.c (debug_threads): Remove declaration.
735         (cris_get_pc, cris_set_pc): Remove.
736         (the_low_target): Use linux_get_pc_32bit and
737         linux_set_pc_32bit.
738         * linux-low.c: Include inttypes.h.
739         (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
740         * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
741         * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
742         (the_low_target): Use linux_get_pc_32bit and
743         linux_set_pc_32bit.
744         * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
745         (the_low_target): Use linux_get_pc_32bit and
746         linux_set_pc_32bit.
747         * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
748         (the_low_target): Use linux_get_pc_32bit and
749         linux_set_pc_32bit.
750         * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
751         (the_low_target): Use linux_get_pc_32bit and
752         linux_set_pc_32bit.
753         * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
754         (the_low_target): Use linux_get_pc_32bit and
755         linux_set_pc_32bit.
756
757 2016-01-18  Gary Benson  <gbenson@redhat.com>
758
759         * configure.ac (AC_FUNC_FORK): New check.
760         * config.in: Regenerate.
761         * configure: Likewise.
762
763 2016-01-14  Yao Qi  <yao.qi@linaro.org>
764
765         * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
766         * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
767         * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
768         arm_get_next_pcs_ctor.
769
770 2016-01-12  Josh Stone  <jistone@redhat.com>
771             Philippe Waroquiers  <philippe.waroquiers@skynet.be>
772
773         * inferiors.h: Include "gdb_vecs.h".
774         (struct process_info): Add syscalls_to_catch.
775         * inferiors.c (remove_process): Free syscalls_to_catch.
776         * remote-utils.c (prepare_resume_reply): Report syscall_entry and
777         syscall_return stops.
778         * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
779         * server.c (handle_general_set): Handle QCatchSyscalls.
780         (handle_query): Report support for QCatchSyscalls.
781         * target.h (struct target_ops): Add supports_catch_syscall.
782         (target_supports_catch_syscall): New macro.
783         * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
784         (struct lwp_info): Add syscall_state.
785         * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
786         Maintain syscall_state and syscalls_to_catch across exec.
787         (get_syscall_trapinfo): New function, proxy to the_low_target.
788         (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
789         (linux_low_filter_event): Toggle syscall_state entry/return for
790         syscall traps, and set it ignored for all others.
791         (gdb_catching_syscalls_p): New function.
792         (gdb_catch_this_syscall_p): New function.
793         (linux_wait_1): Handle SYSCALL_SIGTRAP.
794         (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
795         (linux_supports_catch_syscall): New function.
796         (linux_target_ops): Install it.
797         * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
798         (the_low_target): Install it.
799
800 2016-01-12  Mike Frysinger  <vapier@gentoo.org>
801
802         * acinclude.m4: Include new ../warning.m4 file.
803         * configure: Regenerated.
804         * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
805
806 2016-01-12  Mike Frysinger  <vapier@gentoo.org>
807
808         * ax.c (is_goto_target): Mark static.
809         * linux-low.c (register_addr): Likewise.
810         (linux_fetch_registers, linux_store_registers): Likewise.
811         * mem-break.c (any_persistent_commands): Fix old prototype.
812         (add_commands_to_breakpoint): Mark static.
813         * regcache.c (find_register_by_name): Delete unused func.
814         * remote-utils.c (hex_or_minus_one): Mark static.
815         * server.c (monitor_show_help): Mark static.
816         (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
817         handle_v_requests): Likewise.
818
819 2016-01-12  Pedro Alves  <palves@redhat.com>
820
821         Remove use of the registered trademark symbol throughout.
822
823 2016-01-08  Yao Qi  <yao.qi@linaro.org>
824
825         * remote-utils.c (getpkt): If c is '\003', call target hook
826         request_interrupt.
827
828 2016-01-06  Yao Qi  <yao.qi@linaro.org>
829
830         * linux-aarch32-low.h (arm_abi_breakpoint): Move to
831         linux-aarch32-low.c.
832         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
833         (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
834         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
835         (thumb2_breakpoint): Declare.
836         * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
837         linux-aarch32-low.h.
838         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
839         (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
840         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
841
842 2016-01-01  Joel Brobecker  <brobecker@adacore.com>
843
844         * gdbreplay.c (gdbreplay_version): Change copyright year in
845         version message.
846         * server.c (gdbserver_version): Likewise.
847
848 2015-12-28  Patrick Palka  <patrick@parcs.ath.cx>
849
850         * server.c (crc32_table): Delete.
851         (crc32): Use libiberty's xcrc32 function.
852
853 2015-12-22  Joel Brobecker  <brobecker@adacore.com>
854
855         * lynx-low.c (lynx_delete_thread_callback): New function.
856         (lynx_mourn): Properly delete our process and all of its
857         threads.  Remove call to clear_inferiors.
858
859 2015-12-22  Joel Brobecker  <brobecker@adacore.com>
860
861         * target.c (thread_search_callback): Add check that
862         the thread_stopped target callback is not NULL before
863         calling it.
864
865 2015-12-21  Yao Qi  <yao.qi@linaro.org>
866
867         * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
868         arm breakpoint.
869
870 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
871
872         * server.c (handle_query): Call target_supports_software_single_step.
873
874 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
875
876         * linux-low.c (single_step): New function.
877         (linux_resume_one_lwp_throw): Call single_step.
878         (start_step_over): Likewise.
879
880 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
881
882         * Makefile.in (SFILES): Append arch/arm-linux.c,
883         arch/arm-get-next-pcs.c.
884         (arm-linux.o): New rule.
885         (arm-get-next-pcs.o): New rule.
886         * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
887         arm-linux.o.
888         * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro.  Moved
889         to linux-aarch32-low.c.
890         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
891         (arm_breakpoint_len, thumb_breakpoint): Likewise.
892         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
893         (thumb2_breakpoint_len): Likewise.
894         (arm_is_thumb_mode): Make non-static.
895         * linux-aarch32-low.h (arm_abi_breakpoint): New macro.  Moved
896         from linux-aarch32-low.c.
897         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
898         (arm_breakpoint_len, thumb_breakpoint): Likewise.
899         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
900         (thumb2_breakpoint_len): Likewise.
901         (arm_is_thumb_mode): New declaration.
902         * linux-arm-low.c: Include arch/arm-linux.h
903         aarch/arm-get-next-pcs.h, sys/syscall.h.
904         (get_next_pcs_ops): New struct.
905         (get_next_pcs_addr_bits_remove): New function.
906         (get_next_pcs_is_thumb): New function.
907         (get_next_pcs_read_memory_unsigned_integer): Likewise.
908         (arm_sigreturn_next_pc): Likewise.
909         (get_next_pcs_syscall_next_pc): Likewise.
910         (arm_gdbserver_get_next_pcs): Likewise.
911         (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
912         Initialize.
913         * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
914         * server.h: Include gdb_vecs.h.
915
916 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
917
918         * Makefile.in (SFILES): Append common/common-regcache.c.
919         (OBS): Append common-regcache.o.
920         (common-regcache.o): New rule.
921         * regcache.c (init_register_cache): Initialize cache to
922         REG_UNAVAILABLE.
923         (regcache_raw_read_unsigned): New function.
924         * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
925         register_status enum.
926
927 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
928
929         * linux-aarch64-low.c (the_low_targets): Rename
930         breakpoint_reinsert_addr to get_next_pcs.
931         * linux-arm-low.c (the_low_targets): Likewise.
932         * linux-bfin-low.c (the_low_targets): Likewise.
933         * linux-cris-low.c (the_low_targets): Likewise.
934         * linux-crisv32-low.c (the_low_targets): Likewise.
935         * linux-low.c (can_software_single_step): Likewise.
936         (install_software_single_step_breakpoints): New function.
937         (start_step_over): Use install_software_single_step_breakpoints.
938         * linux-low.h: New CORE_ADDR vector.
939         (struct linux_target_ops) Rename breakpoint_reinsert_addr to
940         get_next_pcs.
941         * linux-mips-low.c (the_low_targets): Likewise.
942         * linux-nios2-low.c (the_low_targets): Likewise.
943         * linux-sparc-low.c (the_low_targets): Likewise.
944
945 2015-12-17  Pedro Alves  <palves@redhat.com>
946
947         * linux-low.c (linux_kill_one_lwp): Remove references to
948         LinuxThreads.
949         (kill_lwp): Remove HAVE_TKILL_SYSCALL check.  No longer fall back
950         to 'kill'.
951         (linux_init_signals): Delete.
952         (initialize_low): Adjust.
953         * thread-db.c (thread_db_init): Remove LinuxThreads reference.
954
955 2015-12-16  Pedro Alves  <palves@redhat.com>
956
957         * configure.ac (compiler warning flags): When testing a
958         -Wno-foo option, check whether -Wfoo works instead.
959         * configure: Regenerate.
960
961 2015-12-11  Don Breazeal  <donb@codesourcery.com>
962
963         * server.c (process_serial_event): Don't exit from gdbserver
964         in remote mode if there are still active inferiors.
965
966 2015-12-11  Yao Qi  <yao.qi@linaro.org>
967
968         * linux-aarch64-low.c (aarch64_breakpoint_at): Call
969         arm_breakpoint_at if the process is 32-bit.
970
971 2015-12-11  Yao Qi  <yao.qi@linaro.org>
972
973         * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
974         arm breakpoint.
975
976 2015-12-07  Yao Qi  <yao.qi@linaro.org>
977
978         * configure.srv: Append arm.o to srv_tgtobj for
979         aarch64*-*-linux* target.
980         * linux-aarch32-low.c (arm_abi_breakpoint): New macro.  Moved
981         from linux-arm-low.c.
982         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
983         (arm_breakpoint_len, thumb_breakpoint): Likewise.
984         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
985         (thumb2_breakpoint_len): Likewise.
986         (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
987         (arm_breakpoint_kinds): Likewise.
988         (arm_breakpoint_kind_from_pc): Likewise.
989         (arm_sw_breakpoint_from_kind): Likewise.
990         (arm_breakpoint_kind_from_current_state): Likewise.
991         * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
992         (arm_sw_breakpoint_from_kind): Declare.
993         (arm_breakpoint_kind_from_current_state): Declare.
994         (arm_breakpoint_at): Declare.
995         * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
996         arm_sw_breakpoint_from_kind if process is 32-bit.
997         (aarch64_breakpoint_kind_from_pc): New function.
998         (aarch64_breakpoint_kind_from_current_state): New function.
999         (the_low_target): Initialize fields breakpoint_kind_from_pc
1000         and breakpoint_kind_from_current_state.
1001         * linux-arm-low.c (arm_breakpoint_kinds): Move to
1002         linux-aarch32-low.c.
1003         (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
1004         (arm_breakpoint, arm_breakpoint_len): Likewise.
1005         (thumb_breakpoint, thumb_breakpoint_len): Likewise.
1006         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1007         (arm_is_thumb_mode): Likewise.
1008         (arm_breakpoint_at): Likewise.
1009         (arm_breakpoint_kind_from_pc): Likewise.
1010         (arm_sw_breakpoint_from_kind): Likewise.
1011         (arm_breakpoint_kind_from_current_state): Likewise.
1012
1013         Revert:
1014         2015-08-04  Yao Qi  <yao.qi@linaro.org>
1015
1016         * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1017         0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1018         * server.c (extended_protocol): Remove "static".
1019         * server.h (extended_protocol): Declare it.
1020
1021 2015-12-04  Josh Stone  <jistone@redhat.com>
1022
1023         * target.h (struct target_ops) <arch_setup>: Rename to ...
1024         (struct target_ops) <post_create_inferior>: ... this.
1025         (target_arch_setup): Rename to ...
1026         (target_post_create_inferior): ... this, calling post_create_inferior.
1027         * server.c (start_inferior): Update target_arch_setup calls to
1028         target_post_create_inferior.
1029         * linux-low.c (linux_low_ptrace_options): Forward declare.
1030         (linux_arch_setup): Update its comment for general use.
1031         (linux_post_create_inferior): New, run arch_setup and setup ptrace.
1032         (struct linux_target_ops): Use linux_post_create_inferior.
1033         * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
1034         to post_create_inferior.
1035         * nto-low.c (struct nto_target_ops): Likewise.
1036         * spu-low.c (struct spu_target_ops): Likewise.
1037         * win32-low.c (struct win32_target_ops): Likewise.
1038
1039 2015-12-03  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1040
1041         * linux-arm-low.c: Remove duplicate arch/arm.h include.
1042
1043 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1044
1045         * linux-arm-low.c (arm_reinsert_addr): Remove function.
1046         (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
1047         * linux-cris-low.c (cris_reinsert_addr> Remove function.
1048         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1049         * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1050         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1051         * linux-mips-low.c (mips_reinsert_addr): Remove function.
1052         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1053         * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1054         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1055         * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1056         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1057
1058 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1059
1060         * linux-low.c (linux_look_up_symbols): Don't call
1061         linux_supports_traceclone.
1062         * linux-low.h (thread_db_init): Remove use_events argument.
1063         * thread-db.c (thread_db_use_event): Remove global variable.
1064         (struct thread_db) <td_thr_event_enable_p>: Remove field.
1065         (struct thread_db) <td_create_bp>: Remove field.
1066         (thread_db_create_event): Remove function.
1067         (thread_db_enable_reporting): Likewise.
1068         (find_one_thread): Don't check for thread_db_use_events.
1069         (attach_thread): Likewise.
1070         (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1071         (try_thread_db_load_1): Don't check for thread_db_use_events.
1072         (thread_db_init): Remove use_events argument and thread events
1073         handling.
1074         (remove_thread_event_breakpoints): Remove function.
1075         (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1076
1077 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1078
1079         * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
1080         New function.
1081         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1082         * linux-arm-low.c (arm_supports_hardware_single_step): New function.
1083         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1084         * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
1085         (struct linux_target_ops) <bfin_supports_hardware_single_step>:
1086         Initialize.
1087         * linux-crisv32-low.c (cris_supports_hardware_single_step):
1088         New function.
1089         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1090         * linux-low.c (can_hardware_single_step): Use
1091         supports_hardware_single_step.
1092         (can_software_single_step): New function.
1093         (start_step_over): Call can_software_single_step.
1094         (linux_supports_hardware_single_step): New function.
1095         (struct target_ops) <supports_software_single_step>: Initialize.
1096         * linux-low.h (struct linux_target_ops)
1097         <supports_hardware_single_step>: Initialize.
1098         * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
1099         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1100         * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
1101         (struct linux_target_ops) <supports_hardware_single_step> Initialize.
1102         * linux-s390-low.c (s390_supports_hardware_single_step): New function.
1103         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1104         * linux-sh-low.c (sh_supports_hardware_single_step): New function.
1105         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1106         * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
1107         (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
1108         Initialize.
1109         * linux-tile-low.c (tile_supports_hardware_single_step): New function.
1110         (struct linux_target_ops) <tile_supports_hardware_single_step>:
1111         Initialize.
1112         * linux-x86-low.c (x86_supports_hardware_single_step) New function.
1113         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1114         * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
1115         New function.
1116         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1117         * target.h (struct target_ops): <supports_software_single_step>:
1118         New field.
1119         (target_supports_software_single_step): New macro.
1120
1121 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1122
1123         * linux-low.c (linux_wait_1): Fix pc advance condition.
1124         * mem-break.c (reinsert_breakpoint_inserted_here): New function.
1125         * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
1126
1127 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1128
1129         * linux-arm-low.c (arm_is_thumb_mode): New function.
1130         (arm_breakpoint_at): Use arm_is_thumb_mode.
1131         (arm_breakpoint_kind_from_current_state): New function.
1132         (struct linux_target_ops) <breakpoint_kind_from_current_state>:
1133         Initialize.
1134         * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
1135         (linux_breakpoint_kind_from_current_state): New function.
1136         (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
1137         * linux-low.h (struct linux_target_ops)
1138         <breakpoint_kind_from_current_state>: New field.
1139         * target.h (struct target_ops): Likewise.
1140         (target_breakpoint_kind_from_current_state): New macro.
1141
1142 2015-11-30  Pedro Alves  <palves@redhat.com>
1143
1144         * linux-low.c (linux_resume): Wake up the event loop before
1145         returning.
1146
1147 2015-11-30  Pedro Alves  <palves@redhat.com>
1148
1149         * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
1150         check.
1151         (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
1152         to -1.
1153         * target.c (struct thread_search): New structure.
1154         (thread_search_callback): New function.
1155         (prev_general_thread): New global.
1156         (prepare_to_access_memory, done_accessing_memory): New functions.
1157         * target.h (prepare_to_access_memory, done_accessing_memory):
1158         Replace macros with function declarations.
1159
1160 2015-11-30  Pedro Alves  <palves@redhat.com>
1161
1162         PR 14618
1163         * linux-low.c (linux_wait_1): If the last resumed thread is gone,
1164         report TARGET_WAITKIND_NO_RESUMED.
1165         * remote-utils.c (prepare_resume_reply): Handle
1166         TARGET_WAITKIND_NO_RESUMED.
1167         * server.c (report_no_resumed): New global.
1168         (handle_query) <qSupported>: Handle "no-resumed+".  Report
1169         "no-resumed+" support.
1170         (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
1171         return error if the client doesn't support no-resumed events.
1172         (push_stop_notification): New function.
1173         (handle_target_event): Use it.  Report TARGET_WAITKIND_NO_RESUMED
1174         events if the client supports them.
1175
1176 2015-11-30  Pedro Alves  <palves@redhat.com>
1177
1178         * linux-low.c (thread_still_has_status_pending_p): Don't check
1179         vCont;t here.
1180         (lwp_resumed): New function.
1181         (status_pending_p_callback): Return early if the LWP is not
1182         supposed to be resumed.
1183
1184 2015-11-30  Pedro Alves  <palves@redhat.com>
1185
1186         * linux-low.c (handle_extended_wait): Assert that the LWP's
1187         waitstatus is TARGET_WAITKIND_IGNORE.  If GDB wants to hear about
1188         thread create events, leave the new child's status pending.
1189         (linux_low_filter_event): If GDB wants to hear about thread exit
1190         events, leave the LWP marked dead and don't delete it.
1191         (linux_wait_for_event_filtered): Don't check for thread exit.
1192         (filter_exit_event): New function.
1193         (linux_wait_1): Use it, when returning an exit event.
1194         (linux_resume_one_lwp_throw): Assert that the LWP's
1195         waitstatus is TARGET_WAITKIND_IGNORE.
1196         * remote-utils.c (prepare_resume_reply): Handle
1197         TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
1198         * server.c (report_thread_events): New global.
1199         (handle_general_set): Handle QThreadEvents.
1200         (handle_query) <qSupported>: Handle and report QThreadEvents+;
1201         (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
1202         TARGET_WAITKIND_THREAD_EXITED.
1203         * server.h (report_thread_events): Declare.
1204
1205 2015-11-30  Pedro Alves  <palves@redhat.com>
1206
1207         * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
1208         the thread's last_resume_kind was resume_stop.
1209
1210 2015-11-30  Pedro Alves  <palves@redhat.com>
1211
1212         * linux-low.c (linux_attach): In non-stop mode, wait for one stop
1213         before returning.
1214
1215 2015-11-30  Pedro Alves  <palves@redhat.com>
1216
1217         * server.c (handle_v_requests): Handle vCtrlC.
1218
1219 2015-11-30  Pedro Alves  <palves@redhat.com>
1220
1221         * gdbthread.h (find_any_thread_of_pid): Declare.
1222         * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
1223         functions.
1224         * server.c (handle_query): If current_thread is NULL, look for
1225         another thread of the selected process.
1226
1227 2015-11-26  Daniel Colascione  <dancol@dancol.org>
1228             Simon Marchi  <simon.marchi@ericsson.com>
1229
1230         * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
1231         * server.c (handle_qxfer_threads_worker): Refactor to include thread
1232         name in reply.
1233         * target.h (struct target_ops) <thread_name>: New field.
1234         (target_thread_name): New macro.
1235
1236 2015-11-23  Joel Brobecker  <brobecker@adacore.com>
1237
1238         * regcache.h (regcache_invalidate_pid): Add declaration.
1239         * regcache.c (regcache_invalidate_pid): New function, extracted
1240         from regcache_invalidate.
1241         (regcache_invalidate): Reimplement using regcache_invalidate_pid.
1242         Add trivial documentation comment.
1243         * lynx-low.c: Use regcache_invalidate_pid instead of
1244         regcache_invalidate.
1245
1246 2015-11-23  Joel Brobecker  <brobecker@adacore.com>
1247
1248         * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
1249         and Elf64_auxv_t if the target is Android.
1250
1251 2015-11-22  Doug Evans  <xdje42@gmail.com>
1252
1253         * target.h: #include <sys/types.h>.
1254
1255 2015-11-19  Pedro Alves  <palves@redhat.com>
1256
1257         * linux-low.c (linux_process_qsupported): Change prototype.
1258         Adjust.
1259         * linux-low.h (struct linux_target_ops) <process_qsupported>:
1260         Change prototype.
1261         * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
1262         and adjust to loop over all features.
1263         * server.c (handle_query) <qSupported>: Adjust to call
1264         target_process_qsupported once, passing it a vector of unprocessed
1265         features.
1266         * target.h (struct target_ops) <process_qsupported>: Change
1267         prototype.
1268         (target_process_qsupported): Adjust.
1269
1270 2015-11-19  Pedro Alves  <palves@redhat.com>
1271
1272         * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
1273         mode.
1274         * configure: Regenerate.
1275
1276 2015-11-19  Pedro Alves  <palves@redhat.com>
1277
1278         * configure: Regenerate.
1279
1280 2015-11-19  Yao Qi  <yao.qi@linaro.org>
1281
1282         * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
1283         type to uint32_t.
1284
1285 2015-11-19  Yao Qi  <yao.qi@linaro.org>
1286
1287         * linux-aarch64-low.c (enum aarch64_operand_type): New.
1288         (struct aarch64_operand): Move enum out.
1289
1290 2015-11-19  Yao Qi  <yao.qi@linaro.org>
1291
1292         * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
1293         struct user_fpsimd_state *.
1294         (aarch64_store_fpregset): Likewise.
1295
1296 2015-11-19  Yao Qi  <yao.qi@linaro.org>
1297
1298         * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
1299         struct user_pt_regs *.
1300         (aarch64_store_gregset): Likewise.
1301
1302 2015-11-18  Pedro Alves  <palves@redhat.com>
1303
1304         * Makefile.in (all_object_files): Add $IPA_OBJS.
1305
1306 2015-11-17  Pedro Alves  <palves@redhat.com>
1307
1308         * win32-low.c (win32_resume): Use gdb_signal_from_host,
1309         GDB_SIGNAL_0 and gdb_signal_to_string.
1310
1311 2015-11-17  Pedro Alves  <palves@redhat.com>
1312
1313         * win32-low.c (handle_output_debug_string): Remove parameter.
1314         (win32_kill): Remove our_status local and adjust call to
1315         handle_output_debug_string.
1316         (get_child_debug_event): Adjust call to
1317         handle_output_debug_string.
1318
1319 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
1320
1321         * linux-mips-low.c (mips_fill_gregset): Add cast.
1322         (mips_store_gregset): Likewise.
1323         (mips_fill_fpregset): Likewise.
1324         (mips_store_fpregset): Likewise.
1325
1326 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
1327
1328         * linux-mips-low.c (mips_add_watchpoint): Rename private to
1329         priv.
1330
1331 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
1332
1333         * linux-mips-low.c (mips_linux_new_thread): Change type of
1334         watch_type to enum target_hw_bp_type.
1335
1336 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
1337
1338                 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
1339                 Change return type to arm_hwbp_type.
1340
1341 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
1342
1343         * linux-aarch32-low.c (arm_fill_gregset): Add cast.
1344         (arm_store_gregset): Likewise.
1345         * linux-arm-low.c (arm_get_hwcap): Likewise.
1346         (arm_read_description): Likewise.
1347
1348 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
1349
1350         * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
1351
1352 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
1353
1354         * linux-ppc-low.c (ppc_get_hwcap): Add cast.
1355         (ppc_fill_vsxregset): Likewise.
1356         (ppc_store_vsxregset): Likewise.
1357         (ppc_fill_vrregset): Likewise.
1358         (ppc_store_vrregset): Likewise.
1359         (ppc_fill_evrregset): Likewise.
1360         (ppc_store_evrregset): Likewise.
1361
1362 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
1363
1364         * linux-ppc-low.c (ppc_usrregs_info): Remove
1365         forward-declaration.
1366         (ppc_arch_setup): Move lower in file.
1367
1368 2015-10-30  Simon Marchi  <simon.marchi@ericsson.com>
1369
1370         * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
1371         (ps_pdwrite): Likewise.
1372
1373 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
1374
1375         * linux-arm-low.c (arm_new_thread): Move pointer dereference
1376         to after assert checks.
1377
1378 2015-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1379
1380         * proc-service.c (ps_pdread): Add/adjust casts.
1381         (ps_pdwrite): Add/adjust casts.
1382
1383 2015-10-29  Simon Marchi  <simon.marchi@polymtl.ca>
1384
1385         * server.c (handle_search_memory_1): Cast return value of
1386         memmem.
1387
1388 2015-10-29  Simon Marchi  <simon.marchi@polymtl.ca>
1389
1390         * server.c (write_qxfer_response): Change type of data to
1391         gdb_byte *.
1392
1393 2015-10-29  Pedro Alves  <palves@redhat.com>
1394
1395         * mem-break.c (Z_packet_to_bkpt_type): Add cast.
1396
1397 2015-10-29  Pedro Alves  <palves@redhat.com>
1398
1399         * tracepoint.c (clear_installed_tracepoints): Add casts.
1400
1401 2015-10-29  Pedro Alves  <palves@redhat.com>
1402
1403         * server.c (handle_v_cont, process_serial_event): Add enum
1404         gdb_signal casts to signal parsing code.
1405
1406 2015-10-29  Pedro Alves  <palves@redhat.com>
1407
1408         * linux-low.h (NULL_REGSET): Define.
1409         * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1410         * linux-arm-low.c (arm_regsets): Likewise.
1411         * linux-crisv32-low.c (cris_regsets): Likewise.
1412         * linux-m68k-low.c (m68k_regsets): Likewise.
1413         * linux-mips-low.c (mips_regsets): Likewise.
1414         * linux-nios2-low.c (nios2_regsets): Likewise.
1415         * linux-ppc-low.c (ppc_regsets): Likewise.
1416         * linux-s390-low.c (s390_regsets): Likewise.
1417         * linux-sh-low.c (sh_regsets): Likewise.
1418         * linux-sparc-low.c (sparc_regsets): Likewise.
1419         * linux-tic6x-low.c (tic6x_regsets): Likewise.
1420         * linux-tile-low.c (tile_regsets): Likewise.
1421         * linux-x86-low.c (x86_regsets): Likewise.
1422         * linux-xtensa-low.c (xtensa_regsets): Likewise.
1423
1424 2015-10-29  Pedro Alves  <palves@redhat.com>
1425
1426         * linux-low.h (NULL_REGSET): Define.
1427         * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1428         * linux-arm-low.c (arm_regsets): Likewise.
1429         * linux-crisv32-low.c (cris_regsets): Likewise.
1430         * linux-m68k-low.c (m68k_regsets): Likewise.
1431         * linux-mips-low.c (mips_regsets): Likewise.
1432         * linux-nios2-low.c (nios2_regsets): Likewise.
1433         * linux-ppc-low.c (ppc_regsets): Likewise.
1434         * linux-s390-low.c (s390_regsets): Likewise.
1435         * linux-sh-low.c (sh_regsets): Likewise.
1436         * linux-sparc-low.c (sparc_regsets): Likewise.
1437         * linux-tic6x-low.c (tic6x_regsets): Likewise.
1438         * linux-tile-low.c (tile_regsets): Likewise.
1439         * linux-x86-low.c (x86_regsets): Likewise.
1440         * linux-xtensa-low.c (xtensa_regsets): Likewise.
1441
1442 2015-10-26  Doug Evans  <dje@google.com>
1443
1444         * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
1445
1446 2015-10-26  Doug Evans  <dje@google.com>
1447
1448         * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
1449
1450 2015-10-26  Doug Evans  <dje@google.com>
1451
1452         * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
1453         for debug_printf.
1454         (attach_thread, find_new_threads_callback): Ditto.
1455
1456 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1457
1458         * mem-break.h (set_breakpoint_data): Remove.
1459
1460 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1461
1462         * nto-low.c (nto_sw_breakpoint_from_kind): New function.
1463         (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1464         (initialize_low): Remove set_breakpoint_data call.
1465         * spu-low.c (spu_sw_breakpoint_from_kind): New function.
1466         (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
1467         (initialize_low): Remove set_breakpoint_data call.
1468         * win32-low.c (win32_sw_breakpoint_from_kind): New function.
1469         (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1470         (initialize_low): Remove set_breakpoint_data call.
1471
1472 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1473
1474         * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
1475         * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
1476         * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
1477         * target.h (target_breakpoint_kind_from_pc): New macro.
1478
1479 2015-10-22  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1480
1481         * linux-low.c (default_breakpoint_kind_from_pc): New function.
1482         (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
1483         the default breakpoint kind.
1484
1485 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1486
1487         * linux-arm-low.c (arm_supports_z_point_type): Add software
1488         breakpoint support.
1489
1490 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1491
1492         * linux-arm-low.c: Refactor breakpoint definitions.
1493         (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
1494         (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
1495
1496 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1497
1498         * Makefile.in: Add arm.c/o.
1499         * configure.srv: Likewise.
1500         * linux-arm-low.c (arm_breakpoint_kinds): New enum.
1501         (arm_breakpoint_kind_from_pc): New function.
1502         (arm_sw_breakpoint_from_kind): Return proper kind.
1503         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
1504
1505 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1506
1507         * linux-low.c (initialize_low): Ajdust for breakpoint global variables
1508         removal.
1509         * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
1510         (struct raw_breakpoint) <size>: Remove.
1511         (struct raw_breakpoint) <kind>: Add.
1512         (bp_size): New function.
1513         (bp_opcode): Likewise.
1514         (find_raw_breakpoint_at): Adjust for kind.
1515         (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
1516         (remove_memory_breakpoint): Adjust for kind call bp_size.
1517         (set_raw_breakpoint_at): Adjust for kind.
1518         (set_breakpoint): Likewise.
1519         (set_breakpoint_at): Call breakpoint_kind_from_pc.
1520         (delete_raw_breakpoint): Adjust for kind.
1521         (delete_breakpoint): Likewise.
1522         (find_gdb_breakpoint): Likewise.
1523         (set_gdb_breakpoint_1): Likewise.
1524         (set_gdb_breakpoint): Likewise.
1525         (delete_gdb_breakpoint_1): Likewise.
1526         (delete_gdb_breakpoint): Likewise.
1527         (uninsert_raw_breakpoint): Likewise.
1528         (reinsert_raw_breakpoint): Likewise.
1529         (set_breakpoint_data): Remove.
1530         (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
1531         (check_mem_read): Adjust for kind call bp_size.
1532         (check_mem_write): Adjust for kind call bp_size,bp_opcode.
1533         (clone_one_breakpoint): Adjust for kind.
1534         * mem-break.h (set_gdb_breakpoint): Likewise.
1535         (delete_gdb_breakpoint): Likewise.
1536         * server.c (process_serial_event): Likewise.
1537
1538 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1539
1540         * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
1541         (struct linux_target_ops) <breakpoint>: Remove.
1542         (struct linux_target_ops) <breakpoint_len>: Remove.
1543         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1544         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1545         * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
1546         (arm_sw_breakpoint_from_kind): New function.
1547         * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
1548         (struct linux_target_ops) <breakpoint>: Remove.
1549         (struct linux_target_ops) <breakpoint_len>: Remove.
1550         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1551         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1552         * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
1553         (struct linux_target_ops) <breakpoint>: Remove.
1554         (struct linux_target_ops) <breakpoint_len>: Remove.
1555         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1556         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1557         * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
1558         (struct linux_target_ops) <breakpoint>: Remove.
1559         (struct linux_target_ops) <breakpoint_len>: Remove.
1560         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1561         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1562         * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
1563         and sw_breakpoint_from_kind to increment the pc.
1564         (linux_breakpoint_kind_from_pc): New function.
1565         (linux_sw_breakpoint_from_kind): New function.
1566         (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
1567         (initialize_low): Call breakpoint_kind_from_pc and
1568         sw_breakpoint_from_kind to replace breakpoint_data/len.
1569         * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
1570         New field.
1571         (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
1572         * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
1573         (struct linux_target_ops) <breakpoint>: Remove.
1574         (struct linux_target_ops) <breakpoint_len>: Remove.
1575         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1576         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1577         * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
1578         (struct linux_target_ops) <breakpoint>: Remove.
1579         (struct linux_target_ops) <breakpoint_len>: Remove.
1580         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1581         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1582         * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
1583         (struct linux_target_ops) <breakpoint>: Remove.
1584         (struct linux_target_ops) <breakpoint_len>: Remove.
1585         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1586         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1587         * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
1588         (struct linux_target_ops) <breakpoint>: Remove.
1589         (struct linux_target_ops) <breakpoint_len>: Remove.
1590         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1591         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1592         * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
1593         (struct linux_target_ops) <breakpoint>: Remove.
1594         (struct linux_target_ops) <breakpoint_len>: Remove.
1595         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1596         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1597         * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
1598         (struct linux_target_ops) <breakpoint>: Remove.
1599         (struct linux_target_ops) <breakpoint_len>: Remove.
1600         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1601         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1602         * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
1603         (struct linux_target_ops) <breakpoint>: Remove.
1604         (struct linux_target_ops) <breakpoint_len>: Remove.
1605         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1606         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1607         * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
1608         (struct linux_target_ops) <breakpoint>: Remove.
1609         (struct linux_target_ops) <breakpoint_len>: Remove.
1610         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1611         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1612         * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
1613         (struct linux_target_ops) <breakpoint>: Remove.
1614         (struct linux_target_ops) <breakpoint_len>: Remove.
1615         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1616         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1617         * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
1618         * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
1619         (struct linux_target_ops) <breakpoint>: Remove.
1620         (struct linux_target_ops) <breakpoint_len>: Remove.
1621         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1622         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1623         * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
1624         (struct linux_target_ops) <breakpoint>: Remove.
1625         (struct linux_target_ops) <breakpoint_len>: Remove.
1626         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1627         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1628
1629 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1630
1631         * linux-cris-low.c (cris_get_pc): Remove void arg.
1632
1633 2015-10-16  Aleksandar Ristovski  <aristovski@qnx.com>
1634
1635         * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
1636         variable name.
1637
1638 2015-10-16  Aleksandar Ristovski  <aristovski@qnx.com>
1639
1640         * inferiors.c (thread_pid_matches_callback): New function.
1641         (find_thread_process): New function.
1642         (remove_thread): Reset current_thread.
1643         (remove_process): Assert threads have been removed first.
1644
1645 2015-10-15  Yao Qi  <yao.qi@linaro.org>
1646
1647         * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
1648         if it is 3.
1649         (aarch64_remove_point): Likewise.
1650         * regcache.c (regcache_register_size): New function.
1651
1652 2015-10-12  Yao Qi  <yao.qi@linaro.org>
1653
1654         * linux-aarch64-low.c: Update all callers as emit_load_store
1655         is renamed to aarch64_emit_load_store.
1656
1657 2015-10-12  Yao Qi  <yao.qi@linaro.org>
1658
1659         * linux-aarch64-low.c: Update all callers of function renaming
1660         from emit_insn to aarch64_emit_insn.
1661
1662 2015-10-12  Yao Qi  <yao.qi@linaro.org>
1663
1664         * linux-aarch64-low.c (enum aarch64_opcodes): Move to
1665         arch/aarch64-insn.h.
1666         (struct aarch64_memory_operand): Likewise.
1667         (ENCODE): Likewise.
1668         (emit_insn): Move to arch/aarch64-insn.c.
1669         (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
1670         (emit_load_store): Move to arch/aarch64-insn.c.
1671         (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
1672         (can_encode_int32): Remove.
1673
1674 2015-10-12  Yao Qi  <yao.qi@linaro.org>
1675
1676         * linux-aarch64-low.c (extract_signed_bitfield): Remove.
1677         (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
1678         (aarch64_relocate_instruction): Likewise.
1679         (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
1680         (struct aarch64_insn_visitor): Likewise.
1681
1682 2015-10-12  Yao Qi  <yao.qi@linaro.org>
1683
1684         * linux-aarch64-low.c (struct aarch64_insn_data): New.
1685         (struct aarch64_insn_visitor): New.
1686         (struct aarch64_insn_relocation_data): New.
1687         (aarch64_ftrace_insn_reloc_b): New function.
1688         (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1689         (aarch64_ftrace_insn_reloc_cb): Likewise.
1690         (aarch64_ftrace_insn_reloc_tb): Likewise.
1691         (aarch64_ftrace_insn_reloc_adr): Likewise.
1692         (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
1693         (aarch64_ftrace_insn_reloc_others): Likewise.
1694         (visitor): New.
1695         (aarch64_relocate_instruction): Use visitor.
1696
1697 2015-10-12  Yao Qi  <yao.qi@linaro.org>
1698
1699         * linux-aarch64-low.c (aarch64_relocate_instruction): Return
1700         int.  Add argument buf.
1701         (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
1702         aarch64_relocate_instruction.
1703
1704 2015-10-12  Yao Qi  <yao.qi@linaro.org>
1705
1706         * linux-aarch64-low.c (aarch64_relocate_instruction): Add
1707         argument insn.  Remove local variable insn.  Don't call
1708         target_read_uint32.
1709         (aarch64_install_fast_tracepoint_jump_pad): Call
1710         target_read_uint32.
1711
1712 2015-09-30  Yao Qi  <yao.qi@linaro.org>
1713
1714         * linux-aarch64-low.c (emit_movk): Shorten a long line.
1715         (emit_load_store_pair): Likewise.
1716
1717 2015-09-25  Simon Marchi  <simon.marchi@ericsson.com>
1718
1719         * dll.c (match_dll): Add cast(s).
1720         (unloaded_dll): Likewise.
1721         * linux-low.c (second_thread_of_pid_p): Likewise.
1722         (delete_lwp_callback): Likewise.
1723         (count_events_callback): Likewise.
1724         (select_event_lwp_callback): Likewise.
1725         (linux_set_resume_request): Likewise.
1726         * server.c (accumulate_file_name_length): Likewise.
1727         (emit_dll_description): Likewise.
1728         (handle_qxfer_threads_worker): Likewise.
1729         (visit_actioned_threads): Likewise.
1730         * thread-db.c (any_thread_of): Likewise.
1731         * tracepoint.c (same_process_p): Likewise.
1732         (match_blocktype): Likewise.
1733         (build_traceframe_info_xml): Likewise.
1734
1735 2015-09-25  Simon Marchi  <simon.marchi@ericsson.com>
1736
1737         * ax.c (gdb_parse_agent_expr): Add cast to allocation result
1738         assignment.
1739         (gdb_unparse_agent_expr): Likewise.
1740         * hostio.c (require_data): Likewise.
1741         (handle_pread): Likewise.
1742         * linux-low.c (disable_regset): Likewise.
1743         (fetch_register): Likewise.
1744         (store_register): Likewise.
1745         (get_dynamic): Likewise.
1746         (linux_qxfer_libraries_svr4): Likewise.
1747         * mem-break.c (delete_fast_tracepoint_jump): Likewise.
1748         (set_fast_tracepoint_jump): Likewise.
1749         (uninsert_fast_tracepoint_jumps_at): Likewise.
1750         (reinsert_fast_tracepoint_jumps_at): Likewise.
1751         (validate_inserted_breakpoint): Likewise.
1752         (clone_agent_expr): Likewise.
1753         * regcache.c (init_register_cache): Likewise.
1754         * remote-utils.c (putpkt_binary_1): Likewise.
1755         (decode_M_packet): Likewise.
1756         (decode_X_packet): Likewise.
1757         (look_up_one_symbol): Likewise.
1758         (relocate_instruction): Likewise.
1759         (monitor_output): Likewise.
1760         * server.c (handle_search_memory): Likewise.
1761         (handle_qxfer_exec_file): Likewise.
1762         (handle_qxfer_libraries): Likewise.
1763         (handle_qxfer): Likewise.
1764         (handle_query): Likewise.
1765         (handle_v_cont): Likewise.
1766         (handle_v_run): Likewise.
1767         (captured_main): Likewise.
1768         * target.c (write_inferior_memory): Likewise.
1769         * thread-db.c (try_thread_db_load_from_dir): Likewise.
1770         * tracepoint.c (init_trace_buffer): Likewise.
1771         (add_tracepoint_action): Likewise.
1772         (add_traceframe): Likewise.
1773         (add_traceframe_block): Likewise.
1774         (cmd_qtdpsrc): Likewise.
1775         (cmd_qtdv): Likewise.
1776         (cmd_qtstatus): Likewise.
1777         (response_source): Likewise.
1778         (response_tsv): Likewise.
1779         (cmd_qtnotes): Likewise.
1780         (gdb_collect): Likewise.
1781         (initialize_tracepoint): Likewise.
1782
1783 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
1784
1785         * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
1786         (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
1787         <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
1788         <NOP>: New.
1789         (enum aarch64_condition_codes): New enum.
1790         (w0): New static global.
1791         (fp): Likewise.
1792         (lr): Likewise.
1793         (struct aarch64_memory_operand) <type>: New
1794         MEMORY_OPERAND_POSTINDEX type.
1795         (postindex_memory_operand): New helper function.
1796         (emit_ret): New function.
1797         (emit_load_store_pair): New function, factored out of emit_stp
1798         with support for MEMORY_OPERAND_POSTINDEX.
1799         (emit_stp): Rewrite using emit_load_store_pair.
1800         (emit_ldp): New function.
1801         (emit_load_store): Likewise.
1802         (emit_ldr): Mention post-index instruction in comment.
1803         (emit_ldrh): New function.
1804         (emit_ldrb): New function.
1805         (emit_ldrsw): Mention post-index instruction in comment.
1806         (emit_str): Likewise.
1807         (emit_subs): New function.
1808         (emit_cmp): Likewise.
1809         (emit_and): Likewise.
1810         (emit_orr): Likewise.
1811         (emit_orn): Likewise.
1812         (emit_eor): Likewise.
1813         (emit_mvn): Likewise.
1814         (emit_lslv): Likewise.
1815         (emit_lsrv): Likewise.
1816         (emit_asrv): Likewise.
1817         (emit_mul): Likewise.
1818         (emit_sbfm): Likewise.
1819         (emit_sbfx): Likewise.
1820         (emit_ubfm): Likewise.
1821         (emit_ubfx): Likewise.
1822         (emit_csinc): Likewise.
1823         (emit_cset): Likewise.
1824         (emit_nop): Likewise.
1825         (emit_ops_insns): New helper function.
1826         (emit_pop): Likewise.
1827         (emit_push): Likewise.
1828         (aarch64_emit_prologue): New function.
1829         (aarch64_emit_epilogue): Likewise.
1830         (aarch64_emit_add): Likewise.
1831         (aarch64_emit_sub): Likewise.
1832         (aarch64_emit_mul): Likewise.
1833         (aarch64_emit_lsh): Likewise.
1834         (aarch64_emit_rsh_signed): Likewise.
1835         (aarch64_emit_rsh_unsigned): Likewise.
1836         (aarch64_emit_ext): Likewise.
1837         (aarch64_emit_log_not): Likewise.
1838         (aarch64_emit_bit_and): Likewise.
1839         (aarch64_emit_bit_or): Likewise.
1840         (aarch64_emit_bit_xor): Likewise.
1841         (aarch64_emit_bit_not): Likewise.
1842         (aarch64_emit_equal): Likewise.
1843         (aarch64_emit_less_signed): Likewise.
1844         (aarch64_emit_less_unsigned): Likewise.
1845         (aarch64_emit_ref): Likewise.
1846         (aarch64_emit_if_goto): Likewise.
1847         (aarch64_emit_goto): Likewise.
1848         (aarch64_write_goto_address): Likewise.
1849         (aarch64_emit_const): Likewise.
1850         (aarch64_emit_call): Likewise.
1851         (aarch64_emit_reg): Likewise.
1852         (aarch64_emit_pop): Likewise.
1853         (aarch64_emit_stack_flush): Likewise.
1854         (aarch64_emit_zero_ext): Likewise.
1855         (aarch64_emit_swap): Likewise.
1856         (aarch64_emit_stack_adjust): Likewise.
1857         (aarch64_emit_int_call_1): Likewise.
1858         (aarch64_emit_void_call_2): Likewise.
1859         (aarch64_emit_eq_goto): Likewise.
1860         (aarch64_emit_ne_goto): Likewise.
1861         (aarch64_emit_lt_goto): Likewise.
1862         (aarch64_emit_le_goto): Likewise.
1863         (aarch64_emit_gt_goto): Likewise.
1864         (aarch64_emit_ge_got): Likewise.
1865         (aarch64_emit_ops_impl): New static global variable.
1866         (aarch64_emit_ops): New target function, return
1867         &aarch64_emit_ops_impl.
1868         (struct linux_target_ops): Install it.
1869
1870 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
1871
1872         * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
1873         * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
1874         aarch64-ipa.o.
1875         * linux-aarch64-ipa.c: New file.
1876         * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
1877         and endian.h.
1878         (aarch64_get_thread_area): New target method.
1879         (extract_signed_bitfield): New helper function.
1880         (aarch64_decode_ldr_literal): New function.
1881         (enum aarch64_opcodes): New enum.
1882         (struct aarch64_register): New struct.
1883         (struct aarch64_operand): New struct.
1884         (x0): New static global.
1885         (x1): Likewise.
1886         (x2): Likewise.
1887         (x3): Likewise.
1888         (x4): Likewise.
1889         (w2): Likewise.
1890         (ip0): Likewise.
1891         (sp): Likewise.
1892         (xzr): Likewise.
1893         (aarch64_register): New helper function.
1894         (register_operand): Likewise.
1895         (immediate_operand): Likewise.
1896         (struct aarch64_memory_operand): New struct.
1897         (offset_memory_operand): New helper function.
1898         (preindex_memory_operand): Likewise.
1899         (enum aarch64_system_control_registers): New enum.
1900         (ENCODE): New macro.
1901         (emit_insn): New helper function.
1902         (emit_b): New function.
1903         (emit_bcond): Likewise.
1904         (emit_cb): Likewise.
1905         (emit_tb): Likewise.
1906         (emit_blr): Likewise.
1907         (emit_stp): Likewise.
1908         (emit_ldp_q_offset): Likewise.
1909         (emit_stp_q_offset): Likewise.
1910         (emit_load_store): Likewise.
1911         (emit_ldr): Likewise.
1912         (emit_ldrsw): Likewise.
1913         (emit_str): Likewise.
1914         (emit_ldaxr): Likewise.
1915         (emit_stxr): Likewise.
1916         (emit_stlr): Likewise.
1917         (emit_data_processing_reg): Likewise.
1918         (emit_data_processing): Likewise.
1919         (emit_add): Likewise.
1920         (emit_sub): Likewise.
1921         (emit_mov): Likewise.
1922         (emit_movk): Likewise.
1923         (emit_mov_addr): Likewise.
1924         (emit_mrs): Likewise.
1925         (emit_msr): Likewise.
1926         (emit_sevl): Likewise.
1927         (emit_wfe): Likewise.
1928         (append_insns): Likewise.
1929         (can_encode_int32_in): New helper function.
1930         (aarch64_relocate_instruction): New function.
1931         (aarch64_install_fast_tracepoint_jump_pad): Likewise.
1932         (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
1933         (struct linux_target_ops): Install aarch64_get_thread_area,
1934         aarch64_install_fast_tracepoint_jump_pad and
1935         aarch64_get_min_fast_tracepoint_insn_len.
1936
1937 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
1938
1939         * Makefile.in (aarch64-insn.o): New rule.
1940         * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
1941
1942 2015-09-21  Yao Qi  <yao.qi@linaro.org>
1943
1944         * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
1945
1946 2015-09-21  Yao Qi  <yao.qi@linaro.org>
1947
1948         * tracepoint.c (max_jump_pad_size): Remove.
1949
1950 2015-09-18  Yao Qi  <yao.qi@linaro.org>
1951
1952         * linux-aarch64-low.c: Don't include sys/uio.h.
1953         (ps_get_thread_area): Call aarch64_ps_get_thread_area.
1954
1955 2015-09-16  Wei-cheng Wang  <cole945@gmail.com>
1956
1957         * tracepoint.c (eval_result_type): Change prototype.
1958         (condition_true_at_tracepoint): Fix argument to compiled_cond.
1959
1960 2015-09-15  Pedro Alves  <palves@redhat.com>
1961
1962         * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
1963         Check whether to report exec events instead of checking whether
1964         multiprocess is enabled.
1965
1966 2015-09-15  Pedro Alves  <palves@redhat.com>
1967
1968         PR remote/18965
1969         * remote-utils.c (prepare_resume_reply): Merge
1970         TARGET_WAITKIND_VFORK_DONE switch case with the
1971         TARGET_WAITKIND_FORKED case.
1972
1973 2015-09-15  Yao Qi  <yao.qi@linaro.org>
1974
1975         * server.c (handle_query): Check string comparison using
1976         "else if" instead of "if".
1977
1978 2015-09-15  Yao Qi  <yao.qi@linaro.org>
1979
1980         * server.c (vCont_supported): New global variable.
1981         (handle_query): Set vCont_supported to 1 if "vContSupported+"
1982         matches.  Append ";vContSupported+" to own_buf.
1983         (handle_v_requests): Append ";s;S" to own_buf if target supports
1984         hardware single step or vCont_supported is false.
1985         (capture_main): Set vCont_supported to zero.
1986
1987 2015-09-15  Yao Qi  <yao.qi@linaro.org>
1988
1989         * linux-low.c (linux_supports_conditional_breakpoints): Rename
1990         it to ...
1991         (linux_supports_hardware_single_step): ... New function.
1992         (linux_target_ops): Update.
1993         * lynx-low.c (lynx_target_ops): Set field
1994         supports_hardware_single_step to target_can_do_hardware_single_step.
1995         * nto-low.c (nto_target_ops): Likewise.
1996         * spu-low.c (spu_target_ops): Likewise.
1997         * win32-low.c (win32_target_ops): Likewise.
1998         * target.c (target_can_do_hardware_single_step): New function.
1999         * target.h (struct target_ops) <supports_conditional_breakpoints>:
2000         Remove.  <supports_hardware_single_step>: New field.
2001         (target_supports_conditional_breakpoints): Remove.
2002         (target_supports_hardware_single_step): New macro.
2003         (target_can_do_hardware_single_step): Declare.
2004         * server.c (handle_query): Use target_supports_hardware_single_step
2005         instead of target_supports_conditional_breakpoints.
2006
2007 2015-09-15  Yao Qi  <yao.qi@linaro.org>
2008
2009         * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
2010         function.
2011         (struct linux_target_ops the_low_target): Install
2012         aarch64_linux_siginfo_fixup.
2013
2014 2015-09-11  Don Breazeal  <donb@codesourcery.com>
2015             Luis Machado  <lgustavo@codesourcery.com>
2016
2017         * linux-low.c (linux_mourn): Static declaration.
2018         (linux_arch_setup): Move in front of
2019         handle_extended_wait.
2020         (linux_arch_setup_thread): New function.
2021         (handle_extended_wait): Handle exec events.  Call
2022         linux_arch_setup_thread.  Make event_lwp argument a
2023         pointer-to-a-pointer.
2024         (check_zombie_leaders): Do not check stopped threads.
2025         (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
2026         (linux_low_filter_event): Add lwp and thread for exec'ing
2027         non-leader thread if leader thread has been deleted.
2028         Refactor code into linux_arch_setup_thread and call it.
2029         Pass child lwp pointer by reference to handle_extended_wait.
2030         (linux_wait_for_event_filtered): Update comment.
2031         (linux_wait_1): Prevent clobbering exec event status.
2032         (linux_supports_exec_events): New function.
2033         (linux_target_ops) <supports_exec_events>: Initialize new member.
2034         * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
2035         new member.
2036         * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
2037         * server.c (report_exec_events): New global variable.
2038         (handle_query): Handle qSupported query for exec-events feature.
2039         (captured_main): Initialize report_exec_events.
2040         * server.h (report_exec_events): Declare new global variable.
2041         * target.h (struct target_ops) <supports_exec_events>: New
2042         member.
2043         (target_supports_exec_events): New macro.
2044         * win32-low.c (win32_target_ops) <supports_exec_events>:
2045         Initialize new member.
2046
2047 2015-09-09  Markus Metzger  <markus.t.metzger@intel.com>
2048
2049         * linux-low.c (linux_low_enable_btrace): Remove.
2050         (linux_target_ops): Replace linux_low_enable_btrace with
2051         linux_enable_btrace.
2052
2053 2015-09-03  Yao Qi  <yao.qi@linaro.org>
2054
2055         * linux-aarch64-low.c (aarch64_insert_point): Call
2056         aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2057         returns true.
2058
2059 2015-08-27  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2060
2061         * linux-low.c (check_stopped_by_breakpoint): Use
2062         GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2063
2064 2015-08-27  Pedro Alves  <palves@redhat.com>
2065
2066         * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2067
2068 2015-08-26  Simon Marchi  <simon.marchi@ericsson.com>
2069
2070         * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2071         the XNEW-family equivalent.
2072         (compile_bytecodes): Likewise.
2073         * dll.c (loaded_dll): Likewise.
2074         * event-loop.c (append_callback_event): Likewise.
2075         (create_file_handler): Likewise.
2076         (create_file_event): Likewise.
2077         * hostio.c (handle_open): Likewise.
2078         * inferiors.c (add_thread): Likewise.
2079         (add_process): Likewise.
2080         * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
2081         * linux-arm-low.c (arm_new_process): Likewise.
2082         (arm_new_thread): Likewise.
2083         * linux-low.c (add_to_pid_list): Likewise.
2084         (linux_add_process): Likewise.
2085         (handle_extended_wait): Likewise.
2086         (add_lwp): Likewise.
2087         (enqueue_one_deferred_signal): Likewise.
2088         (enqueue_pending_signal): Likewise.
2089         (linux_resume_one_lwp_throw): Likewise.
2090         (linux_resume_one_thread): Likewise.
2091         (linux_read_memory): Likewise.
2092         (linux_write_memory): Likewise.
2093         * linux-mips-low.c (mips_linux_new_process): Likewise.
2094         (mips_linux_new_thread): Likewise.
2095         (mips_add_watchpoint): Likewise.
2096         * linux-x86-low.c (initialize_low_arch): Likewise.
2097         * lynx-low.c (lynx_add_process): Likewise.
2098         * mem-break.c (set_raw_breakpoint_at): Likewise.
2099         (set_breakpoint): Likewise.
2100         (add_condition_to_breakpoint): Likewise.
2101         (add_commands_to_breakpoint): Likewise.
2102         (clone_agent_expr): Likewise.
2103         (clone_one_breakpoint): Likewise.
2104         * regcache.c (new_register_cache): Likewise.
2105         * remote-utils.c (look_up_one_symbol): Likewise.
2106         * server.c (queue_stop_reply): Likewise.
2107         (start_inferior): Likewise.
2108         (queue_stop_reply_callback): Likewise.
2109         (handle_target_event): Likewise.
2110         * spu-low.c (fetch_ppc_memory): Likewise.
2111         (store_ppc_memory): Likewise.
2112         * target.c (set_target_ops): Likewise.
2113         * thread-db.c (thread_db_load_search): Likewise.
2114         (try_thread_db_load_1): Likewise.
2115         * tracepoint.c (add_tracepoint): Likewise.
2116         (add_tracepoint_action): Likewise.
2117         (create_trace_state_variable): Likewise.
2118         (cmd_qtdpsrc): Likewise.
2119         (cmd_qtro): Likewise.
2120         (add_while_stepping_state): Likewise.
2121         * win32-low.c (child_add_thread): Likewise.
2122         (get_image_name): Likewise.
2123
2124 2015-08-25  Yao Qi  <yao.qi@linaro.org>
2125
2126         * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
2127
2128 2015-08-25  Yao Qi  <yao.qi@linaro.org>
2129
2130         * Makefile.in (aarch64-linux.o): New rule.
2131         * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
2132         srv_tgtobj.
2133         * linux-aarch64-low.c: Include nat/aarch64-linux.h.
2134         (aarch64_init_debug_reg_state): Make it extern.
2135         (aarch64_linux_prepare_to_resume): Remove.
2136
2137 2015-08-25  Yao Qi  <yao.qi@linaro.org>
2138
2139         * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
2140         lwp_arch_private_info and ptid_of_lwp.
2141
2142 2015-08-25  Yao Qi  <yao.qi@linaro.org>
2143
2144         * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
2145         Find proc_info by find_process_pid.  All callers updated.
2146
2147 2015-08-25  Yao Qi  <yao.qi@linaro.org>
2148
2149         * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
2150         Remove.
2151         (debug_reg_change_callback): Remove.
2152         (aarch64_notify_debug_reg_change): Remove.
2153
2154 2015-08-25  Yao Qi  <yao.qi@linaro.org>
2155
2156         * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
2157         Call current_lwp_ptid.
2158
2159 2015-08-25  Yao Qi  <yao.qi@linaro.org>
2160
2161         * linux-aarch64-low.c (debug_reg_change_callback): Use
2162         debug_printf.
2163
2164 2015-08-25  Yao Qi  <yao.qi@linaro.org>
2165
2166         * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
2167
2168 2015-08-25  Yao Qi  <yao.qi@linaro.org>
2169
2170         * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
2171
2172 2015-08-25  Yao Qi  <yao.qi@linaro.org>
2173
2174         * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
2175         the code.
2176
2177 2015-08-25  Yao Qi  <yao.qi@linaro.org>
2178
2179         * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
2180         Remove.
2181         (debug_reg_change_callback): Remove argument entry and add argument
2182         lwp.  Remove local variable thread.  Don't print thread id in the
2183         debugging output.  Don't check whether pid of thread equals to pid.
2184         (aarch64_notify_debug_reg_change): Don't set param.pid.  Call
2185         iterate_over_lwps instead find_inferior.
2186
2187 2015-08-24  Pedro Alves  <palves@redhat.com>
2188
2189         * inferiors.c (get_first_process): New function.
2190         * inferiors.h (get_first_process): New declaration.
2191         * remote-utils.c (read_ptid): Default to the first process in the
2192         list, instead of to the current thread's process.
2193
2194 2015-08-24  Pedro Alves  <palves@redhat.com>
2195
2196         * debug.c: Include gdb_sys_time.h instead of sys/time.h.
2197         * event-loop.c: Likewise.
2198         * remote-utils.c: Likewise.
2199         * tracepoint.c: Likewise.
2200
2201 2015-08-24  Pedro Alves  <palves@redhat.com>
2202
2203         * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
2204         ptid_get_lwp.
2205
2206 2015-08-21  Pedro Alves  <palves@redhat.com>
2207
2208         * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
2209         instead of literal 1.
2210
2211 2015-08-21  Pedro Alves  <palves@redhat.com>
2212
2213         * tdesc.c (default_description): Explicitly zero-initialize.
2214
2215 2015-08-21  Pedro Alves  <palves@redhat.com>
2216
2217         PR gdb/18749
2218         * inferiors.c (remove_thread): Discard any pending stop reply for
2219         this thread.
2220         * server.c (remove_all_on_match_pid): Rename to ...
2221         (remove_all_on_match_ptid): ... this.  Work with a filter ptid
2222         instead of a pid.
2223         (discard_queued_stop_replies): Change parameter to a ptid.  Now
2224         extern.
2225         (handle_v_kill, kill_inferior_callback, captured_main)
2226         (process_serial_event): Adjust.
2227         * server.h (discard_queued_stop_replies): Declare.
2228
2229 2015-08-21  Pedro Alves  <palves@redhat.com>
2230
2231         * linux-low.c (wait_for_sigstop): Always switch to no thread
2232         selected if the previously current thread dies.
2233         * lynx-low.c (lynx_request_interrupt): Use the first thread's
2234         process instead of the current thread's.
2235         * remote-utils.c (input_interrupt): Don't check if there's no
2236         current thread.
2237         * server.c (gdb_read_memory, gdb_write_memory): If setting the
2238         current thread to the general thread fails, error out.
2239         (handle_qxfer_auxv, handle_qxfer_libraries)
2240         (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
2241         (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
2242         (handle_query): Check if there's a thread selected instead of
2243         checking whether there's any thread in the thread list.
2244         (handle_qxfer_threads, handle_qxfer_btrace)
2245         (handle_qxfer_btrace_conf): Don't error out early if there's no
2246         thread in the thread list.
2247         (handle_v_cont, myresume): Don't set the current thread to the
2248         continue thread.
2249         (process_serial_event) <Hg handling>: Also set thread_id if the
2250         previous general thread is still alive.
2251         (process_serial_event) <g/G handling>: If setting the current
2252         thread to the general thread fails, error out.
2253         * spu-low.c (spu_resume, spu_request_interrupt): Use the first
2254         thread's lwp instead of the current thread's.
2255         * target.c (set_desired_thread): If the desired thread was not
2256         found, leave the current thread pointing to NULL.  Return an int
2257         (boolean) indicating success.
2258         * target.h (set_desired_thread): Change return type to int.
2259
2260 2015-08-20  Max Filippov  <jcmvbkbc@gmail.com>
2261
2262         * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
2263         * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
2264         #includes.
2265         (ps_get_thread_area): New function.
2266
2267 2015-08-19  Gary Benson  <gbenson@redhat.com>
2268
2269         * hostio.c (handle_pread): Do not attempt to read more data
2270         than hostio_reply_with_data can fit in a packet.
2271
2272 2015-08-18  Joel Brobecker  <brobecker@adacore.com>
2273
2274         * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
2275
2276 2015-08-14  Matthew Fortune  <matthew.fortune@imgtec.com>
2277
2278         * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
2279
2280 2015-08-06  Pedro Alves  <palves@redhat.com>
2281
2282         * tracepoint.c (expr_eval_result): Now an int.
2283
2284 2015-08-06  Pedro Alves  <palves@redhat.com>
2285
2286         * gdbthread.h (struct regcache): Forward declare.
2287         (struct thread_info) <regcache_data>: Now a struct regcache
2288         pointer.
2289         * inferiors.c (inferior_regcache_data)
2290         (set_inferior_regcache_data): Now work with struct regcache
2291         pointers.
2292         * inferiors.h (struct regcache): Forward declare.
2293         (inferior_regcache_data, set_inferior_regcache_data): Now work
2294         with struct regcache pointers.
2295         * regcache.c (get_thread_regcache, regcache_invalidate_thread)
2296         (free_register_cache_thread): Remove struct regcache pointer
2297         casts.
2298
2299 2015-08-06  Pedro Alves  <palves@redhat.com>
2300
2301         * server.c (captured_main): On error, print the exception message
2302         to stderr, and if run_once is set, throw a quit.
2303
2304 2015-08-06  Pedro Alves  <palves@redhat.com>
2305
2306         * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
2307         the current thread.
2308
2309 2015-08-06  Pedro Alves  <palves@redhat.com>
2310
2311         * linux-low.c (linux_write_memory): Rewrite debug output to avoid
2312         reading beyond the passed in buffer length.
2313
2314 2015-08-06  Pierre Langlois  <pierre.langlois@arm.com>
2315
2316         * tracepoint.c (symbol_list) <required>: Remove.
2317
2318 2015-08-06  Pedro Alves  <palves@redhat.com>
2319
2320         * linux-low.c (handle_extended_wait): Set the fork child's suspend
2321         count if stopping and suspending threads.
2322         (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
2323         stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
2324         (linux_detach): Complete an ongoing step-over.
2325         (lwp_suspended_inc, lwp_suspended_decr): New functions.  Use
2326         throughout.
2327         (resume_stopped_resumed_lwps): Don't resume a suspended thread.
2328         (linux_wait_1): If passing a signal to the inferior after
2329         finishing a step-over, unsuspend and re-resume all lwps.  If we
2330         see a single-step event but the thread should be continuing, don't
2331         pass the trap to gdb.
2332         (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
2333         internal_error instead of gdb_assert.
2334         (enqueue_pending_signal): New function.
2335         (check_ptrace_stopped_lwp_gone): Add debug output.
2336         (start_step_over): Use internal_error instead of gdb_assert.
2337         (complete_ongoing_step_over): New function.
2338         (linux_resume_one_thread): Don't resume a suspended thread.
2339         (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
2340         it stepping.
2341
2342 2015-08-06  Pedro Alves  <palves@redhat.com>
2343
2344         * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
2345         (linux_thread_alive): Use lwp_is_marked_dead.
2346         (extended_event_reported): Delete.
2347         (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
2348         instead of extended_event_reported.
2349         (mark_lwp_dead): Don't set the 'dead' flag.  Store the waitstatus
2350         as well.
2351         (lwp_is_marked_dead): New function.
2352         (lwp_running): Use lwp_is_marked_dead.
2353         * linux-low.h: Delete 'dead' field, and update 'waitstatus's
2354         comment.
2355
2356 2015-08-06  Pedro Alves  <palves@redhat.com>
2357
2358         * linux-low.c (linux_wait_1): Move fork event output out of the
2359         !report_to_gdb check.  Pass event_child->waitstatus to
2360         target_waitstatus_to_string instead of ourstatus.
2361
2362 2015-08-04  Yao Qi  <yao.qi@linaro.org>
2363
2364         * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
2365         if current_thread is 32 bit.
2366
2367 2015-08-04  Yao Qi  <yao.qi@linaro.org>
2368
2369         * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2370         0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2371         * server.c (extended_protocol): Remove "static".
2372         * server.h (extended_protocol): Declare it.
2373
2374 2015-08-04  Yao Qi  <yao.qi@linaro.org>
2375
2376         * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
2377         both aarch64 and aarch32.
2378         (aarch64_set_pc): Likewise.
2379
2380 2015-08-04  Yao Qi  <yao.qi@linaro.org>
2381
2382         * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
2383         to srv_regobj and append arm-core.xml arm-vfpv3.xml and
2384         arm-with-neon.xml to srv_xmlfiles.
2385         * linux-aarch64-low.c: Include linux-aarch32-low.h.
2386         (is_64bit_tdesc): New function.
2387         (aarch64_linux_read_description): New function.
2388         (aarch64_arch_setup): Call aarch64_linux_read_description.
2389         (regs_info): Rename to regs_info_aarch64.
2390         (aarch64_regs_info): Return right regs_info.
2391         (initialize_low_arch): Call initialize_low_arch_aarch32.
2392
2393 2015-08-04  Yao Qi  <yao.qi@linaro.org>
2394
2395         * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
2396         * linux-aarch32-low.c: New file.
2397         * linux-aarch32-low.h: New file.
2398         * linux-arm-low.c (arm_fill_gregset): Move it to
2399         linux-aarch32-low.c.
2400         (arm_store_gregset): Likewise.
2401         (arm_fill_vfpregset): Call arm_fill_vfpregset_num
2402         (arm_store_vfpregset): Call arm_store_vfpregset_num.
2403         (arm_arch_setup): Check if PTRACE_GETREGSET works.
2404         (regs_info): Rename to regs_info_arm.
2405         (arm_regs_info): Return regs_info_aarch32 if
2406         have_ptrace_getregset is 1 and target description is
2407         arm_with_neon or arm_with_vfpv3.
2408         (initialize_low_arch): Don't call init_registers_arm_with_neon.
2409         Call initialize_low_arch_aarch32 instead.
2410
2411 2015-08-04  Yao Qi  <yao.qi@linaro.org>
2412
2413         * linux-x86-low.c (have_ptrace_getregset): Move it to ...
2414         * linux-low.c: ... here.
2415         * linux-low.h (have_ptrace_getregset): Declare it.
2416
2417 2015-08-04  Pedro Alves  <palves@redhat.com>
2418
2419         * thread-db.c (struct thread_db): Use new typedefs.
2420         (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
2421         CHK calls.
2422         (disable_thread_event_reporting): Cast result of dlsym to
2423         destination function pointer type.
2424         (thread_db_mourn): Use td_ta_delete_ftype.
2425
2426 2015-08-03  Sandra Loosemore  <sandra@codesourcery.com>
2427
2428         * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
2429         arch variant.
2430         (CDX_BREAKPOINT): Define for R2.
2431         (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
2432         (the_low_target): Add comments.
2433
2434 2015-07-30  Yao Qi  <yao.qi@linaro.org>
2435
2436         * linux-arm-low.c (arm_hwcap): Remove it.
2437         (arm_read_description): New local variable arm_hwcap.  Don't
2438         set arm_hwcap to zero.
2439
2440 2015-07-30  Yao Qi  <yao.qi@linaro.org>
2441
2442         * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
2443         Use regcache->tdesc instead.
2444         (arm_store_wmmxregset): Likewise.
2445         (arm_fill_vfpregset): Likewise.
2446         (arm_store_vfpregset): Likewise.
2447
2448 2015-07-30  Yao Qi  <yao.qi@linaro.org>
2449
2450         * linux-arm-low.c: Include arch/arm.h.
2451         (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
2452         (arm_store_gregset): Likewise.
2453
2454 2015-07-29  Simon Marchi  <simon.marchi@ericsson.com>
2455
2456         * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
2457         ptrace's 4th parameter.
2458
2459 2015-07-27  Yao Qi  <yao.qi@linaro.org>
2460
2461         * configure.srv (case aarch64*-*-linux*): Don't set
2462         srv_linux_usrregs.
2463
2464 2015-07-24  Pedro Alves  <palves@redhat.c: Likewise.om>
2465
2466         * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
2467         sys/ptrace.h.
2468         * linux-arm-low.c: Likewise.
2469         * linux-cris-low.c: Likewise.
2470         * linux-crisv32-low.c: Likewise.
2471         * linux-low.c: Likewise.
2472         * linux-m68k-low.c: Likewise.
2473         * linux-mips-low.c: Likewise.
2474         * linux-nios2-low.c: Likewise.
2475         * linux-s390-low.c: Likewise.
2476         * linux-sparc-low.c: Likewise.
2477         * linux-tic6x-low.c: Likewise.
2478         * linux-tile-low.c: Likewise.
2479         * linux-x86-low.c: Likewise.
2480
2481 2015-07-24  Pedro Alves  <palves@redhat.com>
2482
2483         * config.in: Regenerate.
2484         * configure: Regenerate.
2485
2486 2015-07-24  Pedro Alves  <palves@redhat.com>
2487
2488         * acinclude.m4: Include ../ptrace.m4.
2489         * configure.ac: Call GDB_AC_PTRACE.
2490         * config.in, configure: Regenerate.
2491
2492 2015-07-24  Yao Qi  <yao.qi@linaro.org>
2493
2494         * linux-low.c (linux_create_inferior): Remove setting to
2495         proc->priv->new_inferior.
2496         (linux_attach): Likewise.
2497         (linux_low_filter_event): Likewise.
2498         * linux-low.h (struct process_info_private) <new_inferior>: Remove.
2499
2500 2015-07-24  Yao Qi  <yao.qi@linaro.org>
2501
2502         * linux-low.c (linux_arch_setup): New function.
2503         (linux_low_filter_event): If proc->tdesc is NULL and
2504         proc->attached is true, call the_low_target.arch_setup.
2505         Otherwise, keep status pending, and return.
2506         (linux_resume_one_lwp_throw): Don't call get_pc if
2507         thread->while_stepping isn't NULL.  Don't call
2508         get_thread_regcache if proc->tdesc is NULL.
2509         (need_step_over_p): Return 0 if proc->tdesc is NULL.
2510         (linux_target_ops): Install arch_setup.
2511         * server.c (start_inferior): Call the_target->arch_setup.
2512         * target.h (struct target_ops) <arch_setup>: New field.
2513         (target_arch_setup): New marco.
2514         * lynx-low.c (lynx_target_ops): Update.
2515         * nto-low.c (nto_target_ops): Update.
2516         * spu-low.c (spu_target_ops): Update.
2517         * win32-low.c (win32_target_ops): Update.
2518
2519 2015-07-24  Yao Qi  <yao.qi@linaro.org>
2520
2521         * linux-low.c (linux_add_process): Don't set
2522         proc->priv->new_inferior.
2523         (linux_create_inferior): Set proc->priv->new_inferior to 1.
2524         (linux_attach): Likewise.
2525
2526 2015-07-24  Yao Qi  <yao.qi@linaro.org>
2527
2528         * server.c (start_inferior): Code refactor.
2529
2530 2015-07-24  Yao Qi  <yao.qi@linaro.org>
2531
2532         * server.c (process_serial_event): Set general_thread.
2533
2534 2015-07-21  Yao Qi  <yao.qi@linaro.org>
2535
2536         * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
2537         aarch64_linux_get_debug_reg_capacity.
2538
2539 2015-07-17  Yao Qi  <yao.qi@linaro.org>
2540
2541         * Makefile.in (aarch64-linux-hw-point.o): New rule.
2542         * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
2543         * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
2544         (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
2545         (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
2546         (AARCH64_HWP_ALIGNMENT): Likewise.
2547         (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
2548         (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
2549         (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
2550         (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
2551         (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
2552         (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
2553         (struct aarch64_debug_reg_state): Likewise.
2554         (struct arch_lwp_info): Likewise.
2555         (aarch64_align_watchpoint): Likewise.
2556         (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
2557         (aarch64_watchpoint_length): Likewise.
2558         (aarch64_point_encode_ctrl_reg): Likewise
2559         (aarch64_point_is_aligned): Likewise.
2560         (aarch64_align_watchpoint): Likewise.
2561         (aarch64_linux_set_debug_regs):
2562         (aarch64_dr_state_insert_one_point): Likewise.
2563         (aarch64_dr_state_remove_one_point): Likewise.
2564         (aarch64_handle_breakpoint): Likewise.
2565         (aarch64_handle_aligned_watchpoint): Likewise.
2566         (aarch64_handle_unaligned_watchpoint): Likewise.
2567         (aarch64_handle_watchpoint): Likewise.
2568
2569 2015-07-17  Yao Qi  <yao.qi@linaro.org>
2570
2571         * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
2572         and don't aarch64_get_debug_reg_state.  All callers update.
2573         (aarch64_handle_aligned_watchpoint): Likewise.
2574         (aarch64_handle_unaligned_watchpoint): Likewise.
2575         (aarch64_handle_watchpoint): Likewise.
2576         (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
2577         (aarch64_remove_point): Likewise.
2578
2579 2015-07-17  Yao Qi  <yao.qi@linaro.org>
2580
2581         * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
2582         debug_printf.
2583         (aarch64_handle_unaligned_watchpoint): Likewise.
2584
2585 2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
2586
2587         Revert the previous 3 commits:
2588         Move gdb_regex* to common/
2589         Move linux_find_memory_regions_full & co.
2590         gdbserver build-id attribute generator
2591
2592 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
2593             Jan Kratochvil  <jan.kratochvil@redhat.com>
2594
2595         gdbserver build-id attribute generator.
2596         * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
2597         (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
2598         (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
2599         (find_phdr): New.
2600         (get_dynamic): Use find_pdhr to traverse program headers.
2601         (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
2602         (compare_mapping_entry_range, struct find_memory_region_callback_data)
2603         (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
2604         (get_hex_build_id): New.
2605         (linux_qxfer_libraries_svr4): Add optional build-id attribute
2606         to reply XML document.
2607
2608 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
2609             Jan Kratochvil  <jan.kratochvil@redhat.com>
2610
2611         * target.c: Include target/target-utils.h and fcntl.h.
2612         (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
2613         (target_fileio_read_stralloc): New functions.
2614
2615 2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
2616
2617         * Makefile.in (OBS): Add gdb_regex.o.
2618         (gdb_regex.o): New.
2619         * config.in: Rebuilt.
2620         * configure: Rebuilt.
2621
2622 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
2623             Jan Kratochvil  <jan.kratochvil@redhat.com>
2624
2625         Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
2626         * Makefile.in (OBS): Add target-utils.o.
2627         (linux-maps.o, target-utils.o): New.
2628         * configure.srv (srv_linux_obj): Add linux-maps.o.
2629
2630 2015-07-15  Pierre Langlois  <pierre.langlois@arm.com>
2631
2632         * linux-aarch64-low.c (aarch64_supports_range_stepping): New
2633         function, return 1.
2634         (the_low_target): Install it.
2635
2636 2015-07-14  Pedro Alves  <palves@redhat.com>
2637
2638         * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
2639         Instead, ignore ECHILD, and throw an error for other errnos.
2640
2641 2015-07-10  Pedro Alves  <palves@redhat.com>
2642
2643         * event-loop.c (struct callback_event) <data>: Change type to
2644         gdb_client_data instance instead of gdb_client_data pointer.
2645         (append_callback_event): Adjust.
2646
2647 2015-07-10  Pierre Langlois  <pierre.langlois@arm.com>
2648
2649         * linux-aarch64-low.c: Add comments for each linux_target_ops
2650         method.  Remove comments already covered in target_ops and
2651         linux_target_ops definitions.
2652         (the_low_target): Add comments for each unimplemented method.
2653
2654 2015-07-09  Yao Qi  <yao.qi@linaro.org>
2655
2656         * linux-aarch64-low.c (aarch64_regmap): Remove.
2657         (aarch64_usrregs_info): Remove.
2658         (regs_info): Set field usrregs to NULL.
2659
2660 2015-07-02  Markus Metzger  <markus.t.metzger@intel.com>
2661
2662         * linux-low.c: Include "rsp-low.h"
2663         (linux_low_encode_pt_config, linux_low_encode_raw): New.
2664         (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
2665         (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
2666         (handle_btrace_enable_pt): New.
2667         (handle_btrace_general_set): Support "pt".
2668         (handle_btrace_conf_general_set): Support "pt:size".
2669
2670 2015-06-29  Pierre Langlois  <pierre.langlois@arm.com>
2671
2672         * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
2673         Z_PACKET_SW_BP.
2674
2675 2015-06-29  Pierre Langlois  <pierre.langlois@arm.com>
2676
2677         * linux-aarch64-low.c: Remove comment about endianness.
2678         (aarch64_breakpoint): Change type to gdb_byte[].  Set to "brk #0".
2679         (aarch64_breakpoint_at): Change type of insn to gdb_byte[].  Use
2680         memcmp.
2681
2682 2015-06-24  Gary Benson  <gbenson@redhat.com>
2683
2684         * linux-i386-ipa.c (stdint.h): Do not include.
2685         * lynx-i386-low.c (stdint.h): Likewise.
2686         * lynx-ppc-low.c (stdint.h): Likewise.
2687         * mem-break.c (stdint.h): Likewise.
2688         * thread-db.c (stdint.h): Likewise.
2689         * tracepoint.c (stdint.h): Likewise.
2690         * win32-low.c (stdint.h): Likewise.
2691
2692 2015-06-18  Simon Marchi  <simon.marchi@ericsson.com>
2693
2694         * server.c (write_qxfer_response): Update call to
2695         remote_escape_output.
2696
2697 2015-06-15  Aleksandar Ristovski  <aristovski@qnx.com
2698             Jan Kratochvil  <jan.kratochvil@redhat.com>
2699
2700         Merge multiple hex conversions.
2701         * gdbreplay.c (tohex): Rename to 'fromhex'.
2702         (logchar): Use fromhex.
2703
2704 2015-06-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
2705
2706         * server.c (handle_qxfer_libraries): Set `version' attribute for
2707         <library-list>.
2708
2709 2015-06-10  Gary Benson  <gbenson@redhat.com>
2710
2711         * target.h (struct target_ops) <multifs_open>: New field.
2712         <multifs_unlink>: Likewise.
2713         <multifs_readlink>: Likewise.
2714         * linux-low.c (nat/linux-namespaces.h): New include.
2715         (linux_target_ops): Initialize the_target->multifs_open,
2716         the_target->multifs_unlink and the_target->multifs_readlink.
2717         * hostio.h (hostio_handle_new_gdb_connection): New declaration.
2718         * hostio.c (hostio_fs_pid): New static variable.
2719         (hostio_handle_new_gdb_connection): New function.
2720         (handle_setfs): Likewise.
2721         (handle_open): Use the_target->multifs_open as appropriate.
2722         (handle_unlink): Use the_target->multifs_unlink as appropriate.
2723         (handle_readlink): Use the_target->multifs_readlink as
2724         appropriate.
2725         (handle_vFile): Handle vFile:setfs packets.
2726         * server.c (handle_query): Call hostio_handle_new_gdb_connection
2727         after target_handle_new_gdb_connection.
2728
2729 2015-06-10  Gary Benson  <gbenson@redhat.com>
2730
2731         * configure.ac (AC_CHECK_FUNCS): Add setns.
2732         * config.in: Regenerate.
2733         * configure: Likewise.
2734         * Makefile.in (SFILES): Add nat/linux-namespaces.c.
2735         (linux-namespaces.o): New rule.
2736         * configure.srv (srv_linux_obj): Add linux-namespaces.o.
2737
2738 2015-06-09  Gary Benson <gbenson@redhat.com>
2739
2740         * hostio.c (handle_open): Process mode argument with
2741         fileio_to_host_mode.
2742
2743 2015-06-01  Yao Qi  <yao.qi@linaro.org>
2744
2745         * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
2746         * linux-x86-low.c: Likewise.
2747
2748 2015-05-28  Don Breazeal  <donb@codesourcery.com>
2749
2750         * linux-low.c (handle_extended_wait): Initialize
2751         thread_info.last_resume_kind for new fork children.
2752
2753 2015-05-15  Pedro Alves  <palves@redhat.com>
2754
2755         * target.h (target_handle_new_gdb_connection): Rewrite using if
2756         wrapped in do/while.
2757
2758 2015-05-14  Joel Brobecker  <brobecker@adacore.com>
2759
2760         * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
2761         * configure, config.in: Regenerate.
2762         * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
2763         Declare typedef.
2764
2765 2015-05-12  Don Breazeal  <donb@codesourcery.com>
2766
2767         * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
2768         PTRACE_EVENT_VFORK_DONE.
2769         (linux_low_ptrace_options, extended_event_reported): Add vfork
2770         events.
2771         * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
2772         and "vforkdone" for RSP 'T' Stop Reply Packet.
2773         * server.h (report_vfork_events): Declare
2774         global variable.
2775
2776 2015-05-12  Don Breazeal  <donb@codesourcery.com>
2777
2778         * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
2779         (the_low_target) <new_fork>: Initialize new member.
2780         * linux-arm-low.c (arm_new_fork): New function.
2781         (the_low_target) <new_fork>: Initialize new member.
2782         * linux-low.c (handle_extended_wait): Call new target function
2783         new_fork.
2784         * linux-low.h (struct linux_target_ops) <new_fork>: New member.
2785         * linux-mips-low.c (mips_add_watchpoint): New function
2786         extracted from mips_insert_point.
2787         (the_low_target) <new_fork>: Initialize new member.
2788         (mips_linux_new_fork): New function.
2789         (mips_insert_point): Call mips_add_watchpoint.
2790         * linux-x86-low.c (x86_linux_new_fork): New function.
2791         (the_low_target) <new_fork>: Initialize new member.
2792
2793 2015-05-12  Don Breazeal  <donb@codesourcery.com>
2794
2795         * linux-low.c (handle_extended_wait): Implement return value,
2796         rename argument 'event_child' to 'event_lwp', handle
2797         PTRACE_EVENT_FORK, call internal_error for unrecognized event.
2798         (linux_low_ptrace_options): New function.
2799         (linux_low_filter_event): Call linux_low_ptrace_options,
2800         use different argument fo linux_enable_event_reporting,
2801         use return value from handle_extended_wait.
2802         (extended_event_reported): New function.
2803         (linux_wait_1): Call extended_event_reported and set
2804         status to report fork events.
2805         (linux_write_memory): Add pid to debug message.
2806         (reset_lwp_ptrace_options_callback): New function.
2807         (linux_handle_new_gdb_connection): New function.
2808         (linux_target_ops): Initialize new structure member.
2809         * linux-low.h (struct lwp_info) <waitstatus>: New member.
2810         * lynx-low.c: Initialize new structure member.
2811         * remote-utils.c (prepare_resume_reply): Implement stop reason
2812         "fork" for "T" stop message.
2813         * server.c (handle_query): Call handle_new_gdb_connection.
2814         * server.h (report_fork_events): Declare global flag.
2815         * target.h (struct target_ops) <handle_new_gdb_connection>:
2816         New member.
2817         (target_handle_new_gdb_connection): New macro.
2818         * win32-low.c: Initialize new structure member.
2819
2820 2015-05-12  Don Breazeal  <donb@codesourcery.com>
2821
2822         * mem-break.c (APPEND_TO_LIST): Define macro.
2823         (clone_agent_expr): New function.
2824         (clone_one_breakpoint): New function.
2825         (clone_all_breakpoints): New function.
2826         * mem-break.h: Declare new functions.
2827
2828 2015-05-12  Don Breazeal  <donb@codesourcery.com>
2829
2830         * linux-low.c (linux_supports_fork_events): New function.
2831         (linux_supports_vfork_events): New function.
2832         (linux_target_ops): Initialize new structure members.
2833         (initialize_low): Call linux_check_ptrace_features.
2834         * lynx-low.c (lynx_target_ops): Initialize new structure
2835         members.
2836         * server.c (report_fork_events, report_vfork_events):
2837         New global flags.
2838         (handle_query): Add new features to qSupported packet and
2839         response.
2840         (captured_main): Initialize new global variables.
2841         * target.h (struct target_ops) <supports_fork_events>:
2842         New member.
2843         <supports_vfork_events>: New member.
2844         (target_supports_fork_events): New macro.
2845         (target_supports_vfork_events): New macro.
2846         * win32-low.c (win32_target_ops): Initialize new structure
2847         members.
2848
2849 2015-05-12  Gary Benson <gbenson@redhat.com>
2850
2851         * server.c (handle_qxfer_exec_file): Use current process
2852         if annex is empty.
2853
2854 2015-05-08  Sandra Loosemore  <sandra@codesourcery.com>
2855
2856         * linux-nios2-low.c: Include elf/common.h.  Adjust comments.
2857         Remove HAVE_PTRACE_GETREGS conditionals.
2858         (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
2859         instead of PTRACE_GETREGS and PTRACE_SETREGS.
2860
2861 2015-05-08  Yao Qi  <yao.qi@linaro.org>
2862
2863         * linux-low.c (linux_supports_conditional_breakpoints): New
2864         function.
2865         (linux_target_ops): Install new target method.
2866         * lynx-low.c (lynx_target_ops): Install NULL hook for
2867         supports_conditional_breakpoints.
2868         * nto-low.c (nto_target_ops): Likewise.
2869         * spu-low.c (spu_target_ops): Likewise.
2870         * win32-low.c (win32_target_ops): Likewise.
2871         * server.c (handle_query): Check
2872         target_supports_conditional_breakpoints.
2873         * target.h (struct target_ops) <supports_conditional_breakpoints>:
2874         New field.
2875         (target_supports_conditional_breakpoints): New macro.
2876
2877 2015-05-06  Pedro Alves  <palves@redhat.com>
2878
2879         PR server/18081
2880         * server.c (start_inferior): If the process exits, mourn it.
2881
2882 2015-04-21  Gary Benson <gbenson@redhat.com>
2883
2884         * hostio.c (fileio_open_flags_to_host): Factored out to
2885         fileio_to_host_openflags in common/fileio.c.  Single use
2886         updated.
2887
2888 2015-04-17  Max Filippov  <jcmvbkbc@gmail.com>
2889
2890         * linux-xtensa-low.c (xtensa_fill_gregset)
2891         (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
2892         XCHAL_HAVE_LOOP.
2893
2894 2015-04-17  Max Filippov  <jcmvbkbc@gmail.com>
2895
2896         * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
2897         (regs_info): Replace usrregs pointer with NULL.
2898
2899 2015-04-17  Gary Benson  <gbenson@redhat.com>
2900
2901         * target.h (struct target_ops) <pid_to_exec_file>: New field.
2902         * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
2903         * server.c (handle_qxfer_exec_file): New function.
2904         (qxfer_packets): Add exec-file entry.
2905         (handle_query): Report qXfer:exec-file:read as supported packet.
2906
2907 2015-04-14  Romain Naour <romain.naour@openwide.fr>  (tiny change)
2908
2909         * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
2910
2911 2015-04-09  Gary Benson <gbenson@redhat.com>
2912
2913         * hostio-errno.c (errno_to_fileio_error): Remove function.
2914         Update caller to use remote_fileio_to_fio_error.
2915
2916 2015-04-09  Yao Qi  <yao.qi@linaro.org>
2917
2918         * linux-low.c (linux_insert_point): Call
2919         insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
2920         (linux_remove_point): Call remove_memory_breakpoint if type is
2921         raw_bkpt_type_sw.
2922         * linux-x86-low.c (x86_insert_point): Don't call
2923         insert_memory_breakpoint.
2924         (x86_remove_point): Don't call remove_memory_breakpoint.
2925
2926 2015-04-01  Pedro Alves  <palves@redhat.com>
2927             Cleber Rosa  <crosa@redhat.com>
2928
2929         * server.c (gdbserver_usage): Reorganize and extend the usage
2930         message.
2931
2932 2015-03-24  Pedro Alves  <palves@redhat.com>
2933
2934         * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
2935         output.  Also dump TRAP_TRACE.
2936         (linux_low_filter_event): In debug output, distinguish a
2937         resume_stop SIGSTOP from a delayed SIGSTOP.
2938
2939 2015-03-24  Gary Benson  <gbenson@redhat.com>
2940
2941         * linux-x86-low.c (x86_linux_new_thread): Moved to
2942         nat/x86-linux.c.
2943         (x86_linux_prepare_to_resume): Likewise.
2944
2945 2015-03-24  Gary Benson  <gbenson@redhat.com>
2946
2947         * Makefile.in (x86-linux-dregs.o): New rule.
2948         * configure.srv: Add x86-linux-dregs.o to relevant targets.
2949         * linux-x86-low.c: Include nat/x86-linux-dregs.h.
2950         (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
2951         (x86_linux_dr_get): Likewise.
2952         (x86_linux_dr_set): Likewise.
2953         (update_debug_registers_callback): Likewise.
2954         (x86_linux_dr_set_addr): Likewise.
2955         (x86_linux_dr_get_addr): Likewise.
2956         (x86_linux_dr_set_control): Likewise.
2957         (x86_linux_dr_get_control): Likewise.
2958         (x86_linux_dr_get_status): Likewise.
2959         (x86_linux_update_debug_registers): Likewise.
2960
2961 2015-03-24  Gary Benson  <gbenson@redhat.com>
2962
2963         * linux-x86-low.c (x86_linux_update_debug_registers):
2964         New function, factored out from...
2965         (x86_linux_prepare_to_resume): ...this.
2966
2967 2015-03-24  Gary Benson  <gbenson@redhat.com>
2968
2969         * linux-x86-low.c (x86_linux_dr_get): Update comments.
2970         (x86_linux_dr_set): Likewise.
2971         (update_debug_registers_callback): Likewise.
2972         (x86_linux_dr_set_addr): Likewise.
2973         (x86_linux_dr_get_addr): Likewise.
2974         (x86_linux_dr_set_control): Likewise.
2975         (x86_linux_dr_get_control): Likewise.
2976         (x86_linux_dr_get_status): Likewise.
2977         (x86_linux_prepare_to_resume): Likewise.
2978
2979 2015-03-24  Gary Benson  <gbenson@redhat.com>
2980
2981         * linux-x86-low.c (x86_linux_dr_get): Add assertion.
2982         Use perror_with_name.  Pass string through gettext.
2983         (x86_linux_dr_set): Likewise.
2984
2985 2015-03-24  Gary Benson  <gbenson@redhat.com>
2986
2987         * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
2988         (x86_linux_dr_set_addr): ...this.
2989         (x86_dr_low_get_addr): Rename to...
2990         (x86_linux_dr_get_addr): ...this.
2991         (x86_dr_low_set_control): Rename to...
2992         (x86_linux_dr_set_control): ...this.
2993         (x86_dr_low_get_control): Rename to...
2994         (x86_linux_dr_get_control): ...this.
2995         (x86_dr_low_get_status): Rename to...
2996         (x86_linux_dr_get_status): ...this.
2997         (x86_dr_low): Update with new function names.
2998
2999 2015-03-24  Gary Benson  <gbenson@redhat.com>
3000
3001         * Makefile.in (x86-linux.o): New rule.
3002         * configure.srv: Add x86-linux.o to relevant targets.
3003         * linux-low.c (lwp_set_arch_private_info): New function.
3004         (lwp_arch_private_info): Likewise.
3005         * linux-x86-low.c: Include nat/x86-linux.h.
3006         (arch_lwp_info): Removed structure.
3007         (update_debug_registers_callback):
3008         Use lwp_set_debug_registers_changed.
3009         (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
3010         and lwp_set_debug_registers_changed.
3011         (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
3012
3013 2015-03-24  Gary Benson  <gbenson@redhat.com>
3014
3015         * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
3016         * linux-arm-low.c (arm_new_thread): Likewise.
3017         * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
3018         * linux-mips-low.c (mips_linux_new_thread): Likewise.
3019         * linux-x86-low.c (x86_linux_new_thread): Likewise.
3020         * linux-low.c (add_lwp): Update the_low_target.new_thread call.
3021
3022 2015-03-24  Gary Benson  <gbenson@redhat.com>
3023
3024         * linux-low.c (ptid_of_lwp): New function.
3025         (lwp_is_stopped): Likewise.
3026         (lwp_stop_reason): Likewise.
3027         * linux-x86-low.c (update_debug_registers_callback):
3028         Use lwp_is_stopped.
3029         (x86_linux_prepare_to_resume): Use ptid_of_lwp and
3030         lwp_stop_reason.
3031
3032 2015-03-24  Gary Benson  <gbenson@redhat.com>
3033
3034         * linux-low.h (linux_stop_lwp): Remove declaration.
3035
3036 2015-03-24  Gary Benson  <gbenson@redhat.com>
3037
3038         * linux-low.h: Include nat/linux-nat.h.
3039         * linux-low.c (iterate_over_lwps_args): New structure.
3040         (iterate_over_lwps_filter): New function.
3041         (iterate_over_lwps): Likewise.
3042         * linux-x86-low.c (update_debug_registers_callback):
3043         Update signature to what iterate_over_lwps expects.
3044         Remove PID check that iterate_over_lwps now performs.
3045         (x86_dr_low_set_addr): Use iterate_over_lwps.
3046         (x86_dr_low_set_control): Likewise.
3047
3048 2015-03-24  Gary Benson  <gbenson@redhat.com>
3049
3050         * linux-x86-low.c (x86_debug_reg_state): New function.
3051         (x86_linux_prepare_to_resume): Use the above.
3052
3053 2015-03-24  Gary Benson  <gbenson@redhat.com>
3054
3055         * linux-low.c (current_lwp_ptid): New function.
3056         * linux-x86-low.c: Include nat/linux-nat.h.
3057         (x86_dr_low_get_addr): Use current_lwp_ptid.
3058         (x86_dr_low_get_control): Likewise.
3059         (x86_dr_low_get_status): Likewise.
3060
3061 2015-03-20  Pedro Alves  <palves@redhat.com>
3062
3063         * tracepoint.c (cmd_qtstatus): Make "str" const.
3064
3065 2015-03-20  Pedro Alves  <palves@redhat.com>
3066
3067         * server.c (handle_general_set): Make "req_str" const.
3068
3069 2015-03-19  Pedro Alves  <palves@redhat.com>
3070
3071         * linux-low.c (linux_resume_one_lwp): Rename to ...
3072         (linux_resume_one_lwp_throw): ... this.  Don't handle ESRCH here,
3073         instead call perror_with_name.
3074         (check_ptrace_stopped_lwp_gone): New function.
3075         (linux_resume_one_lwp): Reimplement as wrapper around
3076         linux_resume_one_lwp_throw that swallows errors if the LWP is
3077         gone.
3078
3079 2015-03-19  Pedro Alves  <palves@redhat.com>
3080
3081         * linux-low.c (count_events_callback, select_event_lwp_callback):
3082         No longer check whether the thread has resume_stop as last resume
3083         kind.
3084
3085 2015-03-19 Pedro Alves  <palves@redhat.com>
3086
3087         * linux-low.c (count_events_callback, select_event_lwp_callback):
3088         Use the lwp's status_pending_p field, not the thread's.
3089
3090 2015-03-19  Pedro Alves  <palves@redhat.com>
3091
3092         * linux-low.c (select_event_lwp_callback): Update comments to
3093         no longer mention SIGTRAP.
3094
3095 2015-03-18  Gary Benson  <gbenson@redhat.com>
3096
3097         * server.c (handle_query): Do not report vFile:fstat as supported.
3098
3099 2015-03-11  Gary Benson  <gbenson@redhat.com>
3100
3101         * hostio.c (sys/types.h): New include.
3102         (sys/stat.h): Likewise.
3103         (common-remote-fileio.h): Likewise.
3104         (handle_fstat): New function.
3105         (handle_vFile): Handle vFile:fstat packets.
3106
3107 2015-03-11  Gary Benson  <gbenson@redhat.com>
3108
3109         * configure.ac (AC_CHECK_MEMBERS): Add checks for
3110         struct stat.st_blocks and struct stat.st_blksize.
3111         * configure: Regenerate.
3112         * config.in: Likewise.
3113         * Makefile.in (SFILES): Add common/common-remote-fileio.c.
3114         (OBS): Add common-remote-fileio.o.
3115         (common-remote-fileio.o): New rule.
3116
3117 2015-03-09  Pedro Alves  <palves@redhat.com>
3118
3119         * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
3120         'struct sockaddr' pointer in 'accept' call.
3121
3122 2015-03-09  Pedro Alves  <palves@redhat.com>
3123
3124         Revert:
3125         2015-03-07  Pedro Alves  <palves@redhat.com>
3126         * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3127         or <winsock2.h> here.  Instead include "gdb_socket.h".
3128         (remote_open): Use union gdb_sockaddr_u.
3129         * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3130         or <winsock2.h> here.  Instead include "gdb_socket.h".
3131         (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3132         * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3133         or <sys/un.h>.
3134         (init_named_socket, gdb_agent_helper_thread): Use union
3135         gdb_sockaddr_u.
3136
3137 2015-03-07  Pedro Alves  <palves@redhat.com>
3138
3139         * configure.ac (build_warnings): Move
3140         -Wdeclaration-after-statement to the C-specific set.
3141         * configure: Regenerate.
3142
3143 2015-03-07  Pedro Alves  <palves@redhat.com>
3144
3145         * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3146         or <winsock2.h> here.  Instead include "gdb_socket.h".
3147         (remote_open): Use union gdb_sockaddr_u.
3148         * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3149         or <winsock2.h> here.  Instead include "gdb_socket.h".
3150         (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3151         * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3152         or <sys/un.h>.
3153         (init_named_socket, gdb_agent_helper_thread): Use union
3154         gdb_sockaddr_u.
3155
3156 2015-03-07  Pedro Alves  <palves@redhat.com>
3157
3158         Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
3159         instead.
3160
3161 2015-03-06  Yao Qi  <yao.qi@linaro.org>
3162
3163         * linux-aarch64-low.c (aarch64_insert_point): Use
3164         show_debug_regs as a boolean.
3165         (aarch64_remove_point): Likewise.
3166
3167 2015-03-05  Pedro Alves  <palves@redhat.com>
3168
3169         * lynx-low.c (lynx_target_ops): Install NULL hooks for
3170         stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3171         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
3172         * nto-low.c (nto_target_ops): Likewise.
3173         * spu-low.c (spu_target_ops): Likewise.
3174         * win32-low.c (win32_target_ops): Likewise.
3175
3176 2015-03-04  Pedro Alves  <palves@redhat.com>
3177
3178         * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3179         Decide whether a breakpoint triggered based on the SIGTRAP's
3180         siginfo.si_code.
3181         (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
3182         breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3183         (linux_low_filter_event): Check for breakpoints before checking
3184         watchpoints.
3185         (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
3186         siginfo.si_code.
3187         (linux_stopped_by_sw_breakpoint)
3188         (linux_supports_stopped_by_sw_breakpoint)
3189         (linux_stopped_by_hw_breakpoint)
3190         (linux_supports_stopped_by_hw_breakpoint): New functions.
3191         (linux_target_ops): Install new target methods.
3192
3193 2015-03-04  Pedro Alves  <palves@redhat.com>
3194
3195         * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
3196         * server.c (swbreak_feature, hwbreak_feature): New globals.
3197         (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
3198         (captured_main): Clear swbreak_feature and hwbreak_feature.
3199         * server.h (swbreak_feature, hwbreak_feature): Declare.
3200         * target.h (struct target_ops) <stopped_by_sw_breakpoint,
3201         supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
3202         supports_stopped_by_hw_breakpoint>: New fields.
3203         (target_supports_stopped_by_sw_breakpoint)
3204         (target_stopped_by_sw_breakpoint)
3205         (target_supports_stopped_by_hw_breakpoint)
3206         (target_stopped_by_hw_breakpoint): Declare.
3207
3208 2015-03-04  Pedro Alves  <palves@redhat.com>
3209
3210         enum lwp_stop_reason -> enum target_stop_reason
3211         * linux-low.c (check_stopped_by_breakpoint): Adjust.
3212         (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
3213         (linux_wait_1, stuck_in_jump_pad_callback)
3214         (move_out_of_jump_pad_callback, linux_resume_one_lwp)
3215         (linux_stopped_by_watchpoint):
3216         * linux-low.h (enum lwp_stop_reason): Delete.
3217         (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
3218         * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3219
3220 2015-03-04  Yao Qi  <yao.qi@linaro.org>
3221
3222         * Makefile.in (SFILES): Add linux-aarch64-low.c.
3223
3224 2015-03-03  Gary Benson  <gbenson@redhat.com>
3225
3226         * hostio.c (handle_vFile): Fix prefix lengths.
3227
3228 2015-03-03  Markus Metzger  <markus.t.metzger@intel.com>
3229
3230         * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
3231         ptr_bits.
3232
3233 2015-03-02  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3234
3235         * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
3236         (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
3237         (clean): Add "rm -f" for above C files.
3238         * configure.srv (srv_regobj): Add s390-vx-linux64.o,
3239         s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
3240         (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
3241         s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
3242         * linux-s390-low.c (HWCAP_S390_VX): New macro.
3243         (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
3244         (init_registers_s390x_vx_linux64)
3245         (init_registers_s390x_tevx_linux64)
3246         (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
3247         (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
3248         declarations.
3249         (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
3250         (s390_store_vxrs_high): New functions.
3251         (s390_regsets): Add entries for NT_S390_VXRS_LOW and
3252         NT_S390_VXRS_HIGH.
3253         (s390_arch_setup): Add logic for selecting one of the new target
3254         descriptions.  Activate the new vector regsets if applicable.
3255         (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
3256         init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
3257         and init_registers_s390x_tevx_linux64.
3258
3259 2015-03-01  Pedro Alves  <palves@redhat.com>
3260
3261         * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
3262         parameter.
3263
3264 2015-02-27  Pedro Alves  <palves@redhat.com>
3265
3266         * linux-x86-low.c (u_debugreg_offset): New function.
3267         (x86_linux_dr_get, x86_linux_dr_set): Use it.
3268
3269 2015-02-27  Pedro Alves  <palves@redhat.com>
3270
3271         * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
3272         [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
3273         [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
3274         ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3275         (ps_lsetfpregs, ps_getpid)
3276         (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
3277         (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
3278         (ps_lsetxregs, ps_plog): Declare.
3279
3280 2015-02-27  Pedro Alves  <palves@redhat.com>
3281
3282         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
3283         IP_AGENT_EXPORT_FUNC.
3284         * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
3285         IP_AGENT_EXPORT_FUNC.
3286         * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
3287         (IP_AGENT_EXPORT): Delete.
3288         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3289         (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3290         (gdb_trampoline_buffer_error, collecting, gdb_collect)
3291         (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
3292         (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
3293         (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
3294         (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
3295         (traceframe_read_count, traceframe_write_count)
3296         (traceframes_created, trace_state_variables, get_raw_reg)
3297         (get_trace_state_variable_value, set_trace_state_variable_value)
3298         (ust_loaded, helper_thread_id, cmd_buf): Use
3299         IPA_SYM_EXPORTED_NAME.
3300         (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
3301         (tracepoints) Use IP_AGENT_EXPORT_VAR.
3302         (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
3303         IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3304         (last_tracepoint): Move into !IN_PROCESS_AGENT block.
3305         (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
3306         EXTERN_C_PUSH/EXTERN_C_POP.
3307         (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
3308         (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
3309         wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3310         (trace_buffer_ctrl, trace_buffer_ctrl_curr)
3311         (traceframe_write_count, traceframe_read_count)
3312         (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
3313         (about_to_request_buffer_space, get_trace_state_variable_value)
3314         (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
3315         (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
3316         EXTERN_C_PUSH/EXTERN_C_POP.
3317         (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
3318         (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
3319         (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
3320         and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3321         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3322         (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3323         (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
3324         * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
3325         Define.
3326         (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
3327         (IP_AGENT_EXPORT_VAR_DECL): Define.
3328         (tracing): Declare.
3329         (gdb_agent_get_raw_reg): Declare.
3330
3331 2015-02-27  Tom Tromey  <tromey@redhat.com>
3332             Pedro Alves  <palves@redhat.com>
3333
3334         Rename symbols whose names are reserved C++ keywords throughout.
3335
3336 2015-02-27  Pedro Alves  <palves@redhat.com>
3337
3338         * Makefile.in (COMPILER): New, get it from autoconf.
3339         (CXX): Get from autoconf instead.
3340         (COMPILE.pre): Use COMPILER.
3341         (CC-LD): Rename to ...
3342         (CC_LD): ... this.  Use COMPILER.
3343         (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
3344         (CXX_FOR_TARGET): Default to g++ instead of gcc.
3345         * acinclude.m4: Include build-with-cxx.m4.
3346         * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
3347         Disable -Werror by default if building in C++ mode.
3348         (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
3349         -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
3350         the C++ compiler.  Save/restore CXXFLAGS too.
3351         * configure: Regenerate.
3352
3353 2015-02-27  Pedro Alves  <palves@redhat.com>
3354
3355         * acinclude.m4: Include libiberty.m4.
3356         * configure.ac: Call libiberty_INIT.
3357         * config.in, configure: Regenerate.
3358
3359 2015-02-26  Pedro Alves  <palves@redhat.com>
3360
3361         * linux-low.c (linux_wait_1): When incrementing the PC past a
3362         program breakpoint always use the_low_target.breakpoint_len as
3363         increment, rather than the maximum between that and
3364         the_low_target.decr_pc_after_break.
3365
3366 2015-02-23  Pedro Alves  <palves@redhat.com>
3367
3368         * linux-low.c (check_stopped_by_breakpoint): Don't check if the
3369         thread was doing a step-over; always adjust the PC if
3370         we stepped over a permanent breakpoint.
3371         (linux_wait_1): If we stepped over breakpoint that was on top of a
3372         permanent breakpoint, manually advance the PC past it.
3373
3374 2015-02-23  Pedro Alves  <palves@redhat.com>
3375
3376         * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
3377         modes.
3378         (x86_fill_gregset, x86_store_gregset): Use it when handling
3379         $orig_eax.
3380
3381 2015-02-20  Pedro Alves  <palves@redhat.com>
3382
3383         * thread-db.c: Include "nat/linux-procfs.h".
3384         (thread_db_init): Skip listing new threads if the kernel supports
3385         PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
3386
3387 2015-02-20  Pedro Alves  <palves@redhat.com>
3388
3389         * linux-low.c (status_pending_p_callback): Use ptid_match.
3390
3391 2015-02-19  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3392
3393         PR breakpoints/16812
3394         * linux-low.c (wstatus_maybe_breakpoint): Remove.
3395         (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
3396         (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
3397
3398 2015-02-10  Antoine Tremblay <antoine.tremblay@ericsson.com>
3399
3400         PR breakpoints/15956
3401         * tracepoint.c (cmd_qtinit): Add check for current_thread.
3402
3403 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
3404
3405         * linux-low.c (linux_low_btrace_conf): Print size.
3406         * server.c (handle_btrace_conf_general_set): New.
3407         (hanle_general_set): Call handle_btrace_conf_general_set.
3408         (handle_query): Report Qbtrace-conf:bts:size as supported.
3409
3410 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
3411
3412         * linux-low.c (linux_low_enable_btrace): Update parameters.
3413         (linux_low_btrace_conf): New.
3414         (linux_target_ops)<to_btrace_conf>: Initialize.
3415         * server.c (current_btrace_conf): New.
3416         (handle_btrace_enable): Rename to ...
3417         (handle_btrace_enable_bts): ... this.  Pass &current_btrace_conf
3418         to target_enable_btrace.  Update comment.  Update users.
3419         (handle_qxfer_btrace_conf): New.
3420         (qxfer_packets): Add btrace-conf entry.
3421         (handle_query): Report qXfer:btrace-conf:read as supported packet.
3422         * target.h (target_ops)<enable_btrace>: Update parameters and comment.
3423         (target_ops)<read_btrace_conf>: New.
3424         (target_enable_btrace): Update parameters.
3425         (target_read_btrace_conf): New.
3426
3427 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
3428
3429         * server.c (handle_btrace_general_set): Remove call to
3430         target_supports_btrace.
3431         (supported_btrace_packets): New.
3432         (handle_query): Call supported_btrace_packets.
3433         * target.h: include btrace-common.h.
3434         (btrace_target_info): Removed.
3435         (supports_btrace, target_supports_btrace): Update parameters.
3436
3437 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
3438
3439         * Makefile.in (SFILES): Add common/btrace-common.c.
3440         (OBS): Add common/btrace-common.o.
3441         (btrace-common.o): Add build rules.
3442         * linux-low: Include btrace-common.h.
3443         (linux_low_read_btrace): Use struct btrace_data.  Call
3444         btrace_data_init and btrace_data_fini.
3445
3446 2015-02-06  Pedro Alves  <palves@redhat.com>
3447
3448         * thread-db.c (find_new_threads_callback): Add debug output.
3449
3450 2015-02-04  Pedro Alves  <palves@redhat.com>
3451
3452         * linux-low.c (handle_extended_wait): Don't resume LWPs here.
3453         (resume_stopped_resumed_lwps): New function.
3454         (linux_wait_for_event_filtered): Use it.
3455
3456 2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
3457
3458         * Makefile.in (SFILES): Add linux-personality.c.
3459         (linux-personality.o): New rule.
3460         * configure.srv (srv_linux_obj): Add linux-personality.o to the
3461         list of objects to be built.
3462         * linux-low.c: Include nat/linux-personality.h.
3463         (linux_create_inferior): Remove code to disable address space
3464         randomization (moved to ../nat/linux-personality.c).  Create
3465         cleanup to disable address space randomization.
3466
3467 2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
3468
3469         * Makefile.in (posix-strerror.o): New rule.
3470         (mingw-strerror.o): Likewise.
3471         * configure: Regenerated.
3472         * configure.ac: Source file ../common/common.host.  Initialize new
3473         variable srv_host_obs.  Add srv_host_obs to GDBSERVER_DEPFILES.
3474
3475 2015-01-14  Yao Qi  <yao@codesourcery.com>
3476
3477         * Makefile.in (SFILES): Add nat/ppc-linux.c.
3478         (ppc-linux.o): New rule.
3479         * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
3480         * configure.ac: AC_CHECK_FUNCS(getauxval).
3481         * config.in: Re-generated.
3482         * configure: Re-generated.
3483         * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
3484         ppc64_64bit_inferior_p
3485
3486 2015-01-14  Yao Qi  <yao@codesourcery.com>
3487
3488         * linux-ppc-low.c: Include "nat/ppc-linux.h".
3489          (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
3490         (PPC_FEATURE_HAS_ALTIVEC,  PPC_FEATURE_HAS_SPE): Likewise.
3491         (PT_ORIG_R3, PT_TRAP): Likewise.
3492         (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
3493         (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
3494         (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
3495
3496 2015-01-10  Joel Brobecker  <brobecker@adacore.com>
3497
3498         * i387-fp.c (i387_cache_to_xsave): In look over
3499         num_avx512_zmmh_high_registers, replace use of struct i387_xsave
3500         zmmh_low_space field by use of zmmh_high_space.
3501
3502 2015-01-09  Pedro Alves  <palves@redhat.com>
3503
3504         * linux-low.c (step_over_bkpt): Move higher up in the file.
3505         (handle_extended_wait): Don't store the stop_pc here.
3506         (get_stop_pc): Adjust comments and rename to ...
3507         (check_stopped_by_breakpoint): ... this.  Record whether the LWP
3508         stopped for a software breakpoint or hardware breakpoint.
3509         (thread_still_has_status_pending_p): New function.
3510         (status_pending_p_callback): Use
3511         thread_still_has_status_pending_p.  If the event is no longer
3512         interesting, resume the LWP.
3513         (handle_tracepoints): Add assert.
3514         (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
3515         (wstatus_maybe_breakpoint): New function.
3516         (cancel_breakpoint): Delete function.
3517         (check_stopped_by_watchpoint): New function, factored out from
3518         linux_low_filter_event.
3519         (lp_status_maybe_breakpoint): Delete function.
3520         (linux_low_filter_event): Remove filter_ptid argument.
3521         Leave thread group exits pending here.  Store the LWP's stop PC.
3522         Always leave events pending.
3523         (linux_wait_for_event_filtered): Pull all events out of the
3524         kernel, and leave them all pending.
3525         (count_events_callback, select_event_lwp_callback): Consider all
3526         events.
3527         (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
3528         (select_event_lwp): Only give preference to the stepping LWP in
3529         all-stop mode.  Adjust comments.
3530         (ignore_event): New function.
3531         (linux_wait_1): Delete 'retry' label.  Use ignore_event.  Remove
3532         references to cancel_breakpoints.  Adjust to renames.  Also give
3533         equal priority to all LWPs that have had events in non-stop mode.
3534         If reporting a software breakpoint event, unadjust the LWP's PC.
3535         (linux_wait): If linux_wait_1 returned an ignored event, retry.
3536         (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
3537         Adjust.
3538         (linux_resume_one_lwp): Store the LWP's PC.  Adjust.
3539         (resume_status_pending_p): Use thread_still_has_status_pending_p.
3540         (linux_stopped_by_watchpoint): Adjust.
3541         (linux_target_ops): Remove reference to linux_cancel_breakpoints.
3542         * linux-low.h (enum lwp_stop_reason): New.
3543         (struct lwp_info) <stop_pc>: Adjust comment.
3544         <stopped_by_watchpoint>: Delete field.
3545         <stop_reason>: New field.
3546         * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3547         * mem-break.c (software_breakpoint_inserted_here)
3548         (hardware_breakpoint_inserted_here): New function.
3549         * mem-break.h (software_breakpoint_inserted_here)
3550         (hardware_breakpoint_inserted_here): Declare.
3551         * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
3552         (cancel_breakpoints): Delete.
3553         * tracepoint.c (clear_installed_tracepoints, stop_tracing)
3554         (upload_fast_traceframes): Remove references to
3555         cancel_breakpoints.
3556
3557 2015-01-09  Pedro Alves  <palves@redhat.com>
3558
3559         * thread-db.c (find_new_threads_callback): Ignore thread if the
3560         kernel thread ID is -1.
3561
3562 2015-01-09  Pedro Alves  <palves@redhat.com>
3563
3564         * linux-low.c (linux_attach_fail_reason_string): Move to
3565         nat/linux-ptrace.c, and rename.
3566         (linux_attach_lwp): Update comment.
3567         (attach_proc_task_lwp_callback): New function.
3568         (linux_attach): Adjust to rename and use
3569         linux_proc_attach_tgid_threads.
3570         (linux_attach_fail_reason_string): Delete declaration.
3571
3572 2015-01-01  Joel Brobecker  <brobecker@adacore.com>
3573
3574         * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
3575         * server.c (gdbserver_version): Likewise.
3576
3577 2014-12-29  Sergio Durigan Junior  <sergiodj@redhat.com>
3578
3579         * remote-utils.c: Include ctype.h.
3580         (input_interrupt): Explicitly handle the case when the char
3581         received is the NUL byte.  Improve the printing of non-ASCII
3582         characters.
3583
3584 2014-12-16  Joel Brobecker  <brobecker@adacore.com>
3585
3586         * linux-low.c (linux_low_filter_event): Update call to
3587         linux_enable_event_reporting following the addition of
3588         a new parameter to that function.
3589
3590 2014-12-16  Catalin Udma  <catalin.udma@freescale.com>
3591
3592         PR server/17457
3593         * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
3594         (AARCH64_FPCR_REGNO): Likewise.
3595         (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
3596         (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
3597         (aarch64_store_fpregset): Likewise.
3598
3599 2014-12-15  Joel Brobecker  <brobecker@adacore.com>
3600
3601         * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
3602         Remove FIXME comment about assumption about N.
3603
3604 2014-12-13  Joel Brobecker  <brobecker@adacore.com>
3605
3606         * configure.ac: If large-file support is disabled in GDBserver,
3607         pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
3608         * configure: Regenerate.
3609
3610 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3611
3612         * linux-low.c (regsets_fetch_inferior_registers): Suppress the
3613         warning upon ENODATA from ptrace.
3614         * linux-s390-low.c (s390_store_tdb): New.
3615         (s390_regsets): Add regset for NT_S390_TDB.
3616
3617 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3618
3619         * linux-low.c (regsets_store_inferior_registers): Skip regsets
3620         without a fill_function.
3621         * linux-s390-low.c (s390_fill_last_break): Remove.
3622         (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
3623         (s390_arch_setup): Use regset's size instead of fill_function for
3624         loop end condition.
3625
3626 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3627
3628         * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
3629         the regset's store function when ptrace returned an error.
3630         * regcache.c (get_thread_regcache): Invalidate register cache
3631         before fetching inferior's registers.
3632
3633 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3634
3635         * linux-low.c (regsets_fetch_inferior_registers): Rephrase
3636         while-loop as for-loop.
3637         (regsets_store_inferior_registers): Likewise.
3638
3639 2014-11-28  Yao Qi  <yao@codesourcery.com>
3640
3641         * configure.ac(AC_CHECK_FUNCS): Remove readlink.
3642         * config.in, configure: Re-generate.
3643         * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
3644         is defined.
3645
3646 2014-11-21  Yao Qi  <yao@codesourcery.com>
3647
3648         * configure.ac: Don't invoke AC_FUNC_ALLOCA.
3649         (AC_CHECK_HEADERS): Remove malloc.h.
3650         * configure: Re-generated.
3651         * config.in: Re-generated.
3652         * server.h: Don't include alloca.h and malloc.h.
3653         * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
3654         Don't include malloc.h.
3655
3656 2014-11-17  Joel Brobecker  <brobecker@adacore.com>
3657
3658         * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
3659         corresponding ERRNO check in same block.
3660
3661 2014-11-12  Pedro Alves  <palves@redhat.com>
3662
3663         * server.c (cont_thread): Update comment.
3664         (start_inferior, attach_inferior): No longer clear cont_thread.
3665         (handle_v_cont): No longer set cont_thread.
3666         (captured_main): Clear cont_thread each time a GDB connects.
3667
3668 2014-11-12  Pedro Alves  <palves@redhat.com>
3669
3670         * linux-low.c (linux_wait_1): Don't force a wait for the Hc
3671         thread, and don't resume all threads if the Hc thread has exited.
3672
3673 2014-11-12  Pedro Alves  <palves@redhat.com>
3674
3675         * linux-low.c (linux_request_interrupt): Always send a SIGINT to
3676         the process group instead of to a specific LWP.
3677
3678 2014-10-15  Pedro Alves  <palves@redhat.com>
3679
3680         PR server/17487
3681         * win32-arm-low.c (arm_set_thread_context): Remove current_event
3682         parameter.
3683         (arm_set_thread_context): Delete.
3684         (the_low_target): Adjust.
3685         * win32-i386-low.c (debug_registers_changed)
3686         (debug_registers_used): Delete.
3687         (update_debug_registers_callback): New function.
3688         (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
3689         needing to update their debug registers.
3690         (win32_get_current_dr): New function.
3691         (x86_dr_low_get_addr, x86_dr_low_get_control)
3692         (x86_dr_low_get_status): Fetch the debug register from the thread
3693         record's context.
3694         (i386_initial_stuff): Adjust.
3695         (i386_get_thread_context): Remove current_event parameter.  Don't
3696         clear debug_registers_changed nor copy DR values to
3697         debug_reg_state.
3698         (i386_set_thread_context): Delete.
3699         (i386_prepare_to_resume): New function.
3700         (i386_thread_added): Mark the thread as needing to update irs
3701         debug registers.
3702         (the_low_target): Remove i386_set_thread_context and install
3703         i386_prepare_to_resume.
3704         * win32-low.c (win32_get_thread_context): Adjust.
3705         (win32_set_thread_context): Use SetThreadContext
3706         directly.
3707         (win32_prepare_to_resume): New function.
3708         (win32_require_context): New function, factored out from ...
3709         (thread_rec): ... this.
3710         (continue_one_thread): Call win32_prepare_to_resume on each thread
3711         we're about to continue.
3712         (win32_resume): Call win32_prepare_to_resume on the event thread.
3713         * win32-low.h (struct win32_thread_info)
3714         <debug_registers_changed>: New field.
3715         (struct win32_target_ops): Change prototype of set_thread_context,
3716         delete set_thread_context and add prepare_to_resume.
3717         (win32_require_context): New declaration.
3718
3719 2014-10-08  Gary Benson  <gbenson@redhat.com>
3720
3721         * server.h: Do not include common-exceptions.h.
3722
3723 2014-10-08  Gary Benson  <gbenson@redhat.com>
3724
3725         * server.h: Do not include cleanups.h.
3726
3727 2014-09-30  James Hogan  <james.hogan@imgtec.com>
3728
3729         * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
3730         mips64-dsp-linux.c.
3731
3732 2014-09-23  Yao Qi  <yao@codesourcery.com>
3733
3734         * linux-low.c (lp_status_maybe_breakpoint): New function.
3735         (linux_low_filter_event): Call lp_status_maybe_breakpoint.
3736         (count_events_callback): Likewise.
3737         (select_event_lwp_callback): Likewise.
3738         (cancel_breakpoints_callback): Likewise.
3739
3740 2014-09-19  Don Breazeal  <donb@codesourcery.com>
3741
3742         * linux-low.c (handle_extended_wait): Call
3743         linux_ptrace_get_extended_event.
3744         (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
3745         linux_is_extended_waitstatus.
3746
3747 2014-09-16  Joel Brobecker  <brobecker@adacore.com>
3748
3749         * Makefile.in (CPPFLAGS): Define.
3750         (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
3751         (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
3752
3753 2014-09-16  Gary Benson  <gbenson@redhat.com>
3754
3755         * inferiors.h (current_inferior): Renamed as...
3756         (current_thread): New variable.  All uses updated.
3757         * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
3758         (maybe_move_out_of_jump_pad): Likewise.
3759         (cancel_breakpoint): Likewise.
3760         (linux_low_filter_event): Likewise.
3761         (wait_for_sigstop): Likewise.
3762         (linux_resume_one_lwp): Likewise.
3763         (need_step_over_p): Likewise.
3764         (start_step_over): Likewise.
3765         (linux_stabilize_threads): Renamed save_inferior as saved_thread.
3766         * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
3767         * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
3768         and save_inferior as saved_thread.
3769         * regcache.c (get_thread_regcache): Renamed saved_inferior as
3770         saved_thread.
3771         (regcache_invalidate_thread): Likewise.
3772         * remote-utils.c (prepare_resume_reply): Likewise.
3773         * thread-db.c (thread_db_get_tls_address): Likewise.
3774         (disable_thread_event_reporting): Likewise.
3775         (remove_thread_event_breakpoints): Likewise.
3776         * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
3777         as saved_thread.
3778         * target.h (set_desired_inferior): Renamed as...
3779         (set_desired_thread): New declaration.  All uses updated.
3780         * server.c (myresume): Updated comment to reference thread instead
3781         of inferior.
3782         (handle_serial_event): Likewise.
3783         (handle_target_event): Likewise.
3784
3785 2014-09-12  Tom Tromey  <tromey@redhat.com>
3786             Gary Benson  <gbenson@redhat.com>
3787
3788         * regcache.h: Include common-regcache.h.
3789         (regcache_read_pc): Don't declare.
3790         * regcache.c (get_thread_regcache_for_ptid): New function.
3791
3792 2014-09-11  Tom Tromey  <tromey@redhat.com>
3793             Gary Benson  <gbenson@redhat.com>
3794
3795         * symbol.c: New file.
3796         * Makefile.in (SFILES): Add symbol.c.
3797         (OBS): Add symbol.o.
3798
3799 2014-09-11  Gary Benson  <gbenson@redhat.com>
3800
3801         * target.c (target_stop_ptid, target_continue_ptid): New
3802         functions.
3803
3804 2014-09-11  Tom Tromey  <tromey@redhat.com>
3805             Gary Benson  <gbenson@redhat.com>
3806
3807         * target.h: Include target/target.h.
3808         * target.c (target_read_memory, target_read_uint32)
3809         (target_write_memory): New functions.
3810
3811 2014-09-11  Gary Benson  <gbenson@redhat.com>
3812
3813         * server.h (debug_hw_points): Don't declare.
3814         * server.c (debug_hw_points): Don't define.  Replace all uses
3815         with show_debug_regs.
3816         * linux-aarch64-low.c (debug_hw_points): Don't define.  Replace
3817         all uses with show_debug_regs.
3818
3819 2014-09-08  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
3820
3821         * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
3822         endianness into account.
3823         (ppc_supply_ptrace_register): Likewise.
3824
3825 2014-09-03  James Hogan  <james.hogan@imgtec.com>
3826
3827         * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
3828         to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
3829
3830 2014-09-03  Gary Benson  <gbenson@redhat.com>
3831
3832         * linux-x86-low.c (x86_linux_prepare_to_resume): Use
3833         ALL_DEBUG_ADDRESS_REGISTERS.
3834
3835 2014-09-02  Gary Benson  <gbenson@redhat.com>
3836
3837         * i386-low.h: Renamed as...
3838         * x86-low.h: New file.  All type, function and variable name
3839         prefixes changed from "i386_" to "x86_".  All references updated.
3840         * i386-low.c: Renamed as...
3841         * x86-low.c: New file.  All type, function and variable name
3842         prefixes changed from "i386_" to "x86_".  All references updated.
3843
3844 2014-09-02  Gary Benson  <gbenson@redhat.com>
3845
3846         * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
3847         (x86_linux_new_thread): Likewise.
3848
3849 2014-08-29  Gary Benson  <gbenson@redhat.com>
3850
3851         * server.h (setjmp.h): Do not include.
3852         (toplevel): Do not declare.
3853         (common-exceptions.h): Include.
3854         (cleanups.h): Likewise.
3855         * server.c (toplevel): Do not define.
3856         (exit_code): New static global.
3857         (detach_or_kill_for_exit_cleanup): New function.
3858         (main): New function.  Original main renamed to...
3859         (captured_main): New function.
3860         * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
3861
3862 2014-08-29  Gary Benson  <gbenson@redhat.com>
3863
3864         * Makefile.in (SFILES): Add common/common-exceptions.c.
3865         (OBS): Add common-exceptions.o.
3866         (common-exceptions.o): New rule.
3867         * utils.c (prepare_to_throw_exception): New function.
3868
3869 2014-08-29  Gary Benson  <gbenson@redhat.com>
3870
3871         * config.in: Regenerate.
3872         * configure: Likewise.
3873
3874 2014-08-29  Gary Benson  <gbenson@redhat.com>
3875
3876         * Makefile.in (SFILES): Add common/cleanups.c.
3877         (OBS): cleanups.o.
3878         (cleanups.o): New rule.
3879
3880 2014-08-29  Gary Benson  <gbenson@redhat.com>
3881
3882         * utils.c (internal_vwarning): New function.
3883
3884 2014-08-28  Gary Benson  <gbenson@redhat.com>
3885
3886         * utils.h (fatal): Remove declaration.
3887         * utils.c (fatal): Remove function.
3888
3889 2014-08-28  Gary Benson  <gbenson@redhat.com>
3890
3891         * tracepoint.c (gdb_agent_init): Replace fatal with
3892         perror_with_name.
3893         (initialize_tracepoint): Likewise.
3894
3895 2014-08-28  Gary Benson  <gbenson@redhat.com>
3896
3897         * remote-utils.c (remote_prepare): Replace fatal with error.
3898
3899 2014-08-28  Gary Benson  <gbenson@redhat.com>
3900
3901         * linux-low.c (linux_async): Replace fatal with warning.
3902         Tidy up and return.
3903         (linux_start_non_stop): Return -1 if linux_async failed.
3904
3905 2014-08-28  Gary Benson  <gbenson@redhat.com>
3906
3907         * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
3908         gdb_assert.
3909         (i386_dr_low_get_addr): Remove vague comment.
3910         * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
3911         gdb_assert.
3912
3913 2014-08-28  Gary Benson  <gbenson@redhat.com>
3914
3915         * inferiors.c (get_thread_process): Replace check with gdb_assert.
3916         * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
3917         internal_error.
3918         (linux_resume_one_lwp): Likewise.
3919         * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
3920         gdb_assert.
3921         * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
3922         with internal_error.
3923         * regcache.c (get_thread_regcache): Replace check with gdb_assert.
3924         (init_register_cache): Replace fatal with gdb_assert_not_reached.
3925         (find_register_by_name): Replace fatal with internal_error.
3926         (find_regno): Likewise.
3927         * tdesc.c (init_target_desc): Replace check with gdb_assert.
3928         * thread-db.c (thread_db_create_event): Likewise.
3929         (thread_db_load_search): Likewise.
3930         (try_thread_db_load_1): Likewise.
3931         * tracepoint.c (get_jump_space_head): Replace fatal with
3932         internal_error.
3933         (claim_trampoline_space): Likewise.
3934         (have_fast_tracepoint_trampoline_buffer): Likewise.
3935         (cmd_qtstart): Likewise.
3936         (stop_tracing): Likewise.
3937         (fast_tracepoint_collecting): Likewise.
3938         (target_malloc): Likewise.
3939         (download_tracepoint): Likewise.
3940         (download_trace_state_variables): Replace check with gdb_assert.
3941         (upload_fast_traceframes): Replace fatal with internal_error.
3942
3943 2014-08-19  Tom Tromey  <tromey@redhat.com>
3944             Gary Benson  <gbenson@redhat.com>
3945
3946         * Makefile.in (SFILES): Add common/common-debug.c.
3947         (OBS): Add common-debug.o.
3948         (common-debug.o): New rule.
3949         * debug.h (debug_printf): Don't declare.
3950         * debug.c (debug_printf): Renamed and rewritten as...
3951         (debug_vprintf): New function.
3952
3953 2014-08-19  Gary Benson  <gbenson@redhat.com>
3954
3955         * utils.h: Do not include print-utils.h.
3956
3957 2014-08-19  Tom Tromey  <tromey@redhat.com>
3958             Gary Benson  <gbenson@redhat.com>
3959
3960         * server.h: Add static assertion.
3961         (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
3962
3963 2014-08-19  Tom Tromey  <tromey@redhat.com>
3964             Gary Benson  <gbenson@redhat.com>
3965
3966         * Makefile.in (SFILES): Add common/errors.c.
3967         (OBS): Add errors.o.
3968         (IPA_OBS): Add errors-ipa.o.
3969         (errors.o): New rule.
3970         (errors-ipa.o): Likewise.
3971         * utils.h (perror_with_name, error, warning): Don't declare.
3972         * utils.c (warning): Renamed and rewritten as...
3973         (vwarning): New function.
3974         (error): Renamed and rewritten as...
3975         (verror): New function.
3976         (internal_error): Renamed and rewritten as...
3977         (internal_verror): New function.
3978
3979 2014-08-07  Gary Benson  <gbenson@redhat.com>
3980
3981         * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
3982         * configure: Regenerate.
3983         * config.in: Likewise.
3984         * server.h: Do not include errno.h.
3985         * event-loop.c: Likewise.
3986         * hostio-errno.c: Likewise.
3987         * linux-low.c: Likewise.
3988         * remote-utils.c: Likewise.
3989         * spu-low.c: Likewise.
3990         * utils.c: Likewise.
3991         * gdbreplay.c: Unconditionally include errno.h.
3992
3993 2014-08-07  Gary Benson  <gbenson@redhat.com>
3994
3995         * server.h: Do not include string.h.
3996         * event-loop.c: Likewise.
3997         * linux-low.c: Likewise.
3998         * regcache.c: Likewise.
3999         * remote-utils.c: Likewise.
4000         * spu-low.c: Likewise.
4001         * utils.c: Likewise.
4002
4003 2014-08-07  Gary Benson  <gbenson@redhat.com>
4004
4005         * server.h: Do not include gdb_assert.h.
4006
4007 2014-08-07  Gary Benson  <gbenson@redhat.com>
4008
4009         * server.h: Do not include common-utils.h.
4010
4011 2014-08-07  Gary Benson  <gbenson@redhat.com>
4012
4013         * server.h: Do not include ptid.h.
4014         * notif.h: Likewise.
4015
4016 2014-08-07  Gary Benson  <gbenson@redhat.com>
4017
4018         * server.h: Do not include gdb_locale.h.
4019
4020 2014-08-07  Gary Benson  <gbenson@redhat.com>
4021
4022         * server.h: Do not include gdb/signals.h.
4023         * win32-low.c: Likewise.
4024
4025 2014-08-07  Gary Benson  <gbenson@redhat.com>
4026
4027         * server.h: Do not include pathmax.h.
4028
4029 2014-08-07  Gary Benson  <gbenson@redhat.com>
4030
4031         * server.h: Do not include libiberty.h.
4032         * linux-bfin-low.c: Likewise.
4033
4034 2014-08-07  Gary Benson  <gbenson@redhat.com>
4035
4036         * server.h: Do not include ansidecl.h.
4037
4038 2014-08-07  Gary Benson  <gbenson@redhat.com>
4039
4040         * linux-x86-low.c: Do not include stddef.h.
4041         * lynx-ppc-low.c: Likewise.
4042         * tracepoint.c: Likewise.
4043
4044 2014-08-07  Gary Benson  <gbenson@redhat.com>
4045
4046         * server.h: Do not include stdarg.h.
4047         * nto-low.c: Likewise.
4048
4049 2014-08-07  Gary Benson  <gbenson@redhat.com>
4050
4051         * server.h: Do not include stdlib.h.
4052         * inferiors.c: Likewise.
4053         * linux-low.c: Likewise.
4054         * regcache.c: Likewise.
4055         * spu-low.c: Likewise.
4056         * tracepoint.c: Likewise.
4057         * utils.c: Likewise.
4058
4059 2014-08-07  Gary Benson  <gbenson@redhat.com>
4060
4061         * server.h: Do not include stdio.h.
4062         * linux-low.c: Likewise.
4063         * remote-utils.c: Likewise.
4064         * spu-low.c: Likewise.
4065         * utils.c: Likewise.
4066         * wincecompat.c: Likewise.
4067
4068 2014-08-06  Gary Benson  <gbenson@redhat.com>
4069
4070         * regcache.c (init_register_cache): Move conditionals inside if.
4071
4072 2014-08-06  Gary Benson  <gbenson@redhat.com>
4073
4074         * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4075
4076 2014-07-31  Gary Benson  <gbenson@redhat.com>
4077
4078         * ax.h: Do not include server.h.
4079         * gdbthread.h: Likewise.
4080         * lynx-low.h: Likewise.
4081         * notif.h: Likewise.
4082
4083 2014-07-30  Gary Benson  <gbenson@redhat.com>
4084
4085         * server.h: Include common-defs.h.
4086         Do not include config.h or build-gnulib-gdbserver/config.h.
4087
4088 2014-07-30  Gary Benson  <gbenson@redhat.com>
4089
4090         * hostio-errno.c: Move server.h to top of includes list.
4091         * inferiors.c: Likewise.
4092         * linux-x86-low.c: Likewise.
4093         * notif.c: Include server.h.
4094
4095 2014-07-24  Tom Tromey  <tromey@redhat.com>
4096             Gary Benson  <gbenson@redhat.com>
4097
4098         * server.h (CORE_ADDR): Now unsigned.
4099
4100 2014-07-16  Pedro Alves  <palves@redhat.com>
4101
4102         * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
4103
4104 2014-07-15  Pedro Alves  <palves@redhat.com>
4105
4106         * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
4107         copy.
4108
4109 2014-07-11  Pedro Alves  <palves@redhat.com>
4110
4111         * linux-low.c (kill_wait_lwp): New function, based on
4112         kill_one_lwp_callback, but use my_waitpid directly.
4113         (kill_one_lwp_callback, linux_kill): Use it.
4114
4115 2014-06-23  Pedro Alves  <palves@redhat.com>
4116
4117         * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
4118         before setting DR0..DR3.
4119
4120 2014-06-20  Gary Benson  <gbenson@redhat.com>
4121
4122         * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
4123         * configure: Regenerated.
4124         * config.in: Likewise.
4125
4126 2014-06-20  Gary Benson  <gbenson@redhat.com>
4127
4128         * Makefile.in (SFILES): Update locations for files moved
4129         from common to nat.
4130         (object file files): Reordered.
4131
4132 2014-06-20  Gary Benson  <gbenson@redhat.com>
4133
4134         * i386-low.h (i386_dr_low_can_set_addr): Removed.
4135         (i386_dr_low_set_addr): Likewise.
4136         (i386_dr_low_get_addr): Likewise.
4137         (i386_dr_low_can_set_control): Likewise.
4138         (i386_dr_low_set_control): Likewise.
4139         (i386_dr_low_get_control): Likewise.
4140         (i386_dr_low_get_status): Likewise.
4141         (i386_get_debug_register_length): Likewise.
4142         * linux-x86-low.c (i386_dr_low_set_addr):
4143         Changed signature.  Made static.
4144         (i386_dr_low_get_addr): Likewise.
4145         (i386_dr_low_set_control): Likewise.
4146         (i386_dr_low_get_control): Likewise.
4147         (i386_dr_low_get_status): Likewise.
4148         (i386_dr_low): New global variable.
4149         * win32-i386-low.c (i386_dr_low_set_addr):
4150         Changed signature.  Made static.
4151         (i386_dr_low_get_addr): Likewise.
4152         (i386_dr_low_set_control): Likewise.
4153         (i386_dr_low_get_control): Likewise.
4154         (i386_dr_low_get_status): Likewise.
4155         (i386_dr_low): New global variable.
4156
4157 2014-06-20  Marcus Shawcroft  <marcus.shawcroft@arm.com>
4158
4159         * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
4160         * Makefile.in (AR, AR_FLAGS): Define.
4161         * configure: Regenerate.
4162
4163 2014-06-19  Gary Benson  <gbenson@redhat.com>
4164
4165         * Makefile.in (i386-dregs.o): New rule.
4166         * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
4167         * i386-low.c (target.h): Remove include.
4168         (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
4169         (DR_CONTROL_SHIFT): Likewise.
4170         (DR_CONTROL_SIZE): Likewise.
4171         (DR_RW_EXECUTE): Likewise.
4172         (DR_RW_WRITE): Likewise.
4173         (DR_RW_READ): Likewise.
4174         (DR_RW_IORW): Likewise.
4175         (DR_LEN_1): Likewise.
4176         (DR_LEN_2): Likewise.
4177         (DR_LEN_4): Likewise.
4178         (DR_LEN_8): Likewise.
4179         (DR_LOCAL_ENABLE_SHIFT): Likewise.
4180         (DR_GLOBAL_ENABLE_SHIFT): Likewise.
4181         (DR_ENABLE_SIZE): Likewise.
4182         (DR_LOCAL_SLOWDOWN): Likewise.
4183         (DR_GLOBAL_SLOWDOWN): Likewise.
4184         (DR_CONTROL_RESERVED): Likewise.
4185         (I386_DR_CONTROL_MASK): Likewise.
4186         (I386_DR_VACANT): Likewise.
4187         (I386_DR_LOCAL_ENABLE): Likewise.
4188         (I386_DR_GLOBAL_ENABLE): Likewise.
4189         (I386_DR_DISABLE): Likewise.
4190         (I386_DR_SET_RW_LEN): Likewise.
4191         (I386_DR_GET_RW_LEN): Likewise.
4192         (I386_DR_WATCH_HIT): Likewise.
4193         (i386_wp_op_t): Likewise.
4194         (i386_show_dr): Likewise.
4195         (i386_length_and_rw_bits): Likewise.
4196         (i386_insert_aligned_watchpoint): Likewise.
4197         (i386_remove_aligned_watchpoint): Likewise.
4198         (i386_handle_nonaligned_watchpoint): Likewise.
4199         i386_update_inferior_debug_regs(): Likewise.
4200         (i386_dr_insert_watchpoint): Likewise.
4201         (i386_dr_remove_watchpoint): Likewise.
4202         (i386_dr_region_ok_for_watchpoint): Likewise.
4203         (i386_dr_stopped_data_address): Likewise.
4204         (i386_dr_stopped_by_watchpoint): Likewise.
4205
4206 2014-06-19  Gary Benson  <gbenson@redhat.com>
4207
4208         * i386-low.c (i386_dr_show): Renamed to
4209         i386_show_dr and made static.  All uses updated.
4210         (i386_dr_length_and_rw_bits): Renamed to
4211         i386_length_and_rw_bits and made static.
4212         All uses updated.
4213         (i386_dr_insert_aligned_watchpoint): Renamed to
4214         i386_insert_aligned_watchpoint and made static.
4215         All uses updated.
4216         (i386_dr_remove_aligned_watchpoint): Renamed to
4217         i386_remove_aligned_watchpoint and made static.
4218         All uses updated.
4219         (i386_dr_update_inferior_debug_regs): Renamed to
4220         i386_update_inferior_debug_regs and made static.
4221         All uses updated.
4222
4223 2014-06-18  Gary Benson  <gbenson@redhat.com>
4224
4225         * i386-low.h (i386_dr_low_can_set_addr): New macro.
4226         (i386_dr_low_can_set_control): Likewise.
4227         (i386_get_debug_register_length): Likewise.
4228         * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
4229         (i386_dr_low_can_set_control): Likewise.
4230         (i386_get_debug_register_length): Likewise.
4231
4232 2014-06-17  Gary Benson  <gbenson@redhat.com>
4233
4234         * i386-low.h (i386-dregs.h): New include.
4235         (DR_FIRSTADDR): Now in i386-dregs.h.
4236         (DR_LASTADDR): Likewise.
4237         (DR_NADDR): Likewise.
4238         (DR_STATUS): Likewise.
4239         (DR_CONTROL): Likewise.
4240         (i386_debug_reg_state): Likewise.
4241         (i386_dr_insert_watchpoint): Likewise.
4242         (i386_dr_remove_watchpoint): Likewise.
4243         (i386_dr_region_ok_for_watchpoint): Likewise.
4244         (i386_dr_stopped_data_address): Likewise.
4245         (i386_dr_stopped_by_watchpoint): Likewise.
4246         * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
4247
4248 2014-06-18  Gary Benson  <gbenson@redhat.com>
4249
4250         * i386-low.h (i386_low_insert_watchpoint): Renamed to
4251         i386_dr_insert_watchpoint.
4252         (i386_low_remove_watchpoint): Renamed to
4253         i386_dr_remove_watchpoint.
4254         (i386_low_region_ok_for_watchpoint): Renamed to
4255         i386_dr_region_ok_for_watchpoint.
4256         (i386_low_stopped_data_address): Renamed to
4257         i386_dr_stopped_data_address.
4258         (i386_low_stopped_by_watchpoint): Renamed to
4259         i386_dr_stopped_by_watchpoint.
4260         * i386-low.c (i386_show_dr): Renamed to
4261         i386_dr_show and made nonstatic.  All uses updated.
4262         (i386_length_and_rw_bits): Renamed to
4263         i386_dr_length_and_rw_bits and made nonstatic.
4264         All uses updated.
4265         (i386_insert_aligned_watchpoint): Renamed to
4266         i386_dr_insert_aligned_watchpoint and made nonstatic.
4267         All uses updated.
4268         (i386_remove_aligned_watchpoint): Renamed to
4269         i386_dr_remove_aligned_watchpoint and made nonstatic.
4270         All uses updated.
4271         (i386_update_inferior_debug_regs): Renamed to
4272         i386_dr_update_inferior_debug_regs and made nonstatic.
4273         All uses updated.
4274         (i386_low_insert_watchpoint): Renamed to
4275         i386_dr_insert_watchpoint.  All uses updated.
4276         (i386_low_remove_watchpoint): Renamed to
4277         i386_dr_remove_watchpoint.  All uses updated.
4278         (i386_low_region_ok_for_watchpoint): Renamed to
4279         i386_dr_region_ok_for_watchpoint.  All uses updated.
4280         (i386_low_stopped_data_address): Renamed to
4281         i386_dr_stopped_data_address.  All uses updated.
4282         (i386_low_stopped_by_watchpoint): Renamed to
4283         i386_dr_stopped_by_watchpoint.  All uses updated.
4284
4285 2014-06-18  Gary Benson  <gbenson@redhat.com>
4286
4287         * i386-low.c (i386_dr_low_can_set_addr): New macro.
4288         (i386_dr_low_can_set_control): Likewise.
4289         (i386_insert_aligned_watchpoint): New check.
4290
4291 2014-06-18  Gary Benson  <gbenson@redhat.com>
4292
4293         * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
4294         Renamed to state.
4295
4296 2014-06-18  Gary Benson  <gbenson@redhat.com>
4297
4298         * i386-low.c (i386_length_and_rw_bits): Use internal_error
4299         instead of fatal and error.
4300         (i386_handle_nonaligned_watchpoint): Likewise.
4301
4302 2014-06-18  Gary Benson  <gbenson@redhat.com>
4303
4304         * i386-low.c (i386_get_debug_register_length): New macro.
4305         (TARGET_HAS_DR_LEN_8): Remove conditional.  Use above macro.
4306         (i386_show_dr): Use debug_printf instead of fprintf.  Use
4307         phex to format values.
4308
4309 2014-06-18  Gary Benson  <gbenson@redhat.com>
4310
4311         * i386-low.h: Comment changes.
4312         * i386-low.c: Likewise.
4313
4314 2014-06-18  Gary Benson  <gbenson@redhat.com>
4315
4316         * i386-low.c: Whitespace changes.
4317
4318 2014-06-12  Tom Tromey  <tromey@redhat.com>
4319
4320         * utils.c (freeargv): Remove.
4321
4322 2014-06-12  Tom Tromey  <tromey@redhat.com>
4323
4324         * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
4325         * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
4326         (parse_debug_format_options): Likewise.
4327         (gdbserver_usage): Likewise.
4328         * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
4329         (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
4330         (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
4331         against libiberty.
4332         ($(LIBGNU)): Depend on libiberty.
4333         (all-lib): Recurse into all subdirs.
4334         (install-only): Invoke "install" target in subdirs.
4335         (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
4336         targets.
4337         * configure: Rebuild.
4338         * configure.ac: Add ACX_CONFIGURE_DIR for libiberty.  Don't check
4339         for vasprintf, vsnprintf, or gettimeofday.
4340         * configure.srv: Don't add safe-ctype.o or lbasename.o to
4341         srv_tgtobj.
4342
4343 2014-06-05  Joel Brobecker  <brobecker@adacore.com>
4344
4345         * development.sh: Delete.
4346         * Makefile.in (config.status): Adjust dependency on development.sh.
4347         * configure.ac: Adjust development.sh source call.
4348         * configure: Regenerate.
4349
4350 2014-06-02  Pedro Alves  <palves@redhat.com>
4351
4352         * ax.c (gdb_free_agent_expr): New function.
4353         * ax.h (gdb_free_agent_expr): New declaration.
4354         * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
4355         list.
4356         (clear_breakpoint_conditions, clear_breakpoint_commands): Make
4357         static.
4358         (clear_breakpoint_conditions_and_commands): New function.
4359         * mem-break.h (clear_breakpoint_conditions): Delete declaration.
4360         (clear_breakpoint_conditions_and_commands): New declaration.
4361
4362 2014-05-23  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
4363
4364         * linux-aarch64-low.c (asm/ptrace.h): Include.
4365
4366 2014-05-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
4367
4368         Fix TLS access for -static -pthread.
4369         * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
4370         (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
4371         (thread_db_load_search, try_thread_db_load_1): Initialize it.
4372
4373 2014-05-20  Pedro Alves  <palves@redhat.com>
4374
4375         * linux-aarch64-low.c (aarch64_insert_point)
4376         (aarch64_remove_point): No longer check whether the type is
4377         supported here.  Adjust to new interface.
4378         (the_low_target): Install aarch64_supports_z_point_type as
4379         supports_z_point_type method.
4380         * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
4381         (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
4382         instead of a Z packet char.  Adjust.
4383         (arm_supports_z_point_type): New function.
4384         (arm_insert_point, arm_remove_point): Adjust to new interface.
4385         (the_low_target): Install arm_supports_z_point_type.
4386         * linux-crisv32-low.c (cris_supports_z_point_type): New function.
4387         (cris_insert_point, cris_remove_point): Adjust to new interface.
4388         Don't check whether the type is supported here.
4389         (the_low_target): Install cris_supports_z_point_type.
4390         * linux-low.c (linux_supports_z_point_type): New function.
4391         (linux_insert_point, linux_remove_point): Adjust to new interface.
4392         * linux-low.h (struct linux_target_ops) <insert_point,
4393         remove_point>: Take an enum raw_bkpt_type instead of a char.  Add
4394         raw_breakpoint pointer parameter.
4395         <supports_z_point_type>: New method.
4396         * linux-mips-low.c (mips_supports_z_point_type): New function.
4397         (mips_insert_point, mips_remove_point): Adjust to new interface.
4398         Use mips_supports_z_point_type.
4399         (the_low_target): Install mips_supports_z_point_type.
4400         * linux-ppc-low.c (the_low_target): Install NULL as
4401         supports_z_point_type method.
4402         * linux-s390-low.c (the_low_target): Install NULL as
4403         supports_z_point_type method.
4404         * linux-sparc-low.c (the_low_target): Install NULL as
4405         supports_z_point_type method.
4406         * linux-x86-low.c (x86_supports_z_point_type): New function.
4407         (x86_insert_point): Adjust to new insert_point interface.  Use
4408         insert_memory_breakpoint.  Adjust to new
4409         i386_low_insert_watchpoint interface.
4410         (x86_remove_point): Adjust to remove_point interface.  Use
4411         remove_memory_breakpoint.  Adjust to new
4412         i386_low_remove_watchpoint interface.
4413         (the_low_target): Install x86_supports_z_point_type.
4414         * lynx-low.c (lynx_target_ops): Install NULL as
4415         supports_z_point_type callback.
4416         * nto-low.c (nto_supports_z_point_type): New.
4417         (nto_insert_point, nto_remove_point): Adjust to new interface.
4418         (nto_target_ops): Install nto_supports_z_point_type.
4419         * mem-break.c: Adjust intro comment.
4420         (struct raw_breakpoint) <raw_type, size>: New fields.
4421         <inserted>: Update comment.
4422         <shlib_disabled>: Delete field.
4423         (enum bkpt_type) <gdb_breakpoint>: Delete value.
4424         <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
4425         gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
4426         (raw_bkpt_type_to_target_hw_bp_type): New function.
4427         (find_enabled_raw_code_breakpoint_at): New function.
4428         (find_raw_breakpoint_at): New type and size parameters.  Use them.
4429         (insert_memory_breakpoint): New function, based off
4430         set_raw_breakpoint_at.
4431         (remove_memory_breakpoint): New function.
4432         (set_raw_breakpoint_at): Reimplement.
4433         (set_breakpoint): New, based on set_breakpoint_at.
4434         (set_breakpoint_at): Reimplement.
4435         (delete_raw_breakpoint): Go through the_target->remove_point
4436         instead of assuming memory breakpoints.
4437         (find_gdb_breakpoint_at): Delete.
4438         (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
4439         (find_gdb_breakpoint): New function.
4440         (set_gdb_breakpoint_at): Delete.
4441         (z_type_supported): New function.
4442         (set_gdb_breakpoint_1): New function, loosely based off
4443         set_gdb_breakpoint_at.
4444         (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
4445         (delete_gdb_breakpoint_at): Delete.
4446         (delete_gdb_breakpoint_1): New function, loosely based off
4447         delete_gdb_breakpoint_at.
4448         (delete_gdb_breakpoint): New function.
4449         (clear_gdb_breakpoint_conditions): Rename to ...
4450         (clear_breakpoint_conditions): ... this.  Don't handle a NULL
4451         breakpoint.
4452         (add_condition_to_breakpoint): Make static.
4453         (add_breakpoint_condition): Take a struct breakpoint pointer
4454         instead of an address.  Adjust.
4455         (gdb_condition_true_at_breakpoint): Rename to ...
4456         (gdb_condition_true_at_breakpoint_z_type): ... this, and add
4457         z_type parameter.
4458         (gdb_condition_true_at_breakpoint): Reimplement.
4459         (add_breakpoint_commands): Take a struct breakpoint pointer
4460         instead of an address.  Adjust.
4461         (gdb_no_commands_at_breakpoint): Rename to ...
4462         (gdb_no_commands_at_breakpoint_z_type): ... this.  Add z_type
4463         parameter.  Return true if no breakpoint was found.  Change debug
4464         output.
4465         (gdb_no_commands_at_breakpoint): Reimplement.
4466         (run_breakpoint_commands): Rename to ...
4467         (run_breakpoint_commands_z_type): ... this.  Add z_type parameter,
4468         and change return type to boolean.
4469         (run_breakpoint_commands): New function.
4470         (gdb_breakpoint_here): Also check for Z1 breakpoints.
4471         (uninsert_raw_breakpoint): Don't try to reinsert a disabled
4472         breakpoint.  Go through the_target->remove_point instead of
4473         assuming memory breakpoint.
4474         (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
4475         software and hardware breakpoints.
4476         (reinsert_raw_breakpoint): Go through the_target->insert_point
4477         instead of assuming memory breakpoint.
4478         (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
4479         software and hardware breakpoints.
4480         (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
4481         Check both software and hardware breakpoints.
4482         (validate_inserted_breakpoint): Assert the breakpoint is a
4483         software breakpoint.  Set the inserted flag to -1 instead of
4484         setting shlib_disabled.
4485         (delete_disabled_breakpoints): Adjust.
4486         (validate_breakpoints): Only validate software breakpoints.
4487         Adjust to inserted flag change.
4488         (check_mem_read, check_mem_write): Skip breakpoint types other
4489         than software breakpoints.  Adjust to inserted flag change.
4490         * mem-break.h (enum raw_bkpt_type): New enum.
4491         (raw_breakpoint, struct process_info): Forward declare.
4492         (Z_packet_to_target_hw_bp_type): Delete declaration.
4493         (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
4494         (set_gdb_breakpoint, delete_gdb_breakpoint)
4495         (clear_breakpoint_conditions): New declarations.
4496         (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
4497         (breakpoint_inserted_here): Update comment.
4498         (add_breakpoint_condition, add_breakpoint_commands): Replace
4499         address parameter with a breakpoint pointer parameter.
4500         (gdb_breakpoint_here): Update comment.
4501         (delete_gdb_breakpoint_at): Delete.
4502         (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
4503         * server.c (process_point_options): Take a struct breakpoint
4504         pointer instead of an address.  Adjust.
4505         (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
4506         delete_gdb_breakpoint.
4507         * spu-low.c (spu_target_ops): Install NULL as
4508         supports_z_point_type method.
4509         * target.h: Include mem-break.h.
4510         (struct target_ops) <prepare_to_access_memory>: Update comment.
4511         <supports_z_point_type>: New field.
4512         <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4513         instead of a char.  Also take a raw breakpoint pointer.
4514         * win32-arm-low.c (the_low_target): Install NULL as
4515         supports_z_point_type.
4516         * win32-i386-low.c (i386_supports_z_point_type): New function.
4517         (i386_insert_point, i386_remove_point): Adjust to new interface.
4518         (the_low_target): Install i386_supports_z_point_type.
4519         * win32-low.c (win32_supports_z_point_type): New function.
4520         (win32_insert_point, win32_remove_point): Adjust to new interface.
4521         (win32_target_ops): Install win32_supports_z_point_type.
4522         * win32-low.h (struct win32_target_ops):
4523         <supports_z_point_type>: New method.
4524         <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4525         instead of a char.  Also take a raw breakpoint pointer.
4526
4527 2014-05-20  Pedro Alves  <palves@redhat.com>
4528
4529         * mem-break.h: Include break-common.h.
4530         (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4531         (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
4532         (Z_packet_to_target_hw_bp_type): New declaration.
4533         * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
4534         * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
4535         (Z_PACKET_ACCESS_WP): Delete macros.
4536         (Z_packet_to_hw_type): Delete function.
4537         * i386-low.h: Don't include break-common.h here.
4538         (Z_packet_to_hw_type): Delete declaration.
4539         * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
4540         Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4541         * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
4542         Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4543         * linux-aarch64-low.c: Don't include break-common.h here.
4544         (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4545         (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
4546         (Z_packet_to_target_hw_bp_type): Delete function.
4547         * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
4548         function.
4549         (mips_insert_point, mips_remove_point): Use
4550         Z_packet_to_target_hw_bp_type.
4551
4552 2014-05-20  Pedro Alves  <palves@redhat.com>
4553
4554         * linux-aarch64-low.c: Include break-common.h.
4555         (enum target_point_type): Delete.
4556         (Z_packet_to_point_type): Rename to ...
4557         (Z_packet_to_target_hw_bp_type): ... this, and return a
4558         target_hw_bp_type instead.
4559         (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
4560         instead of an enum target_point_type.
4561         (aarch64_point_encode_ctrl_reg): Likewise.  Compute type mask from
4562         breakpoint type.
4563         (aarch64_dr_state_insert_one_point)
4564         (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
4565         (aarch64_handle_aligned_watchpoint)
4566         (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
4567         Take an enum target_hw_bp_type instead of an enum
4568         target_point_type.
4569         (aarch64_supports_z_point_type): New function.
4570         (aarch64_insert_point, aarch64_remove_point): Use it.  Adjust to
4571         use Z_packet_to_target_hw_bp_type.
4572
4573 2014-05-20  Joel Brobecker  <brobecker@adacore.com>
4574
4575         * configure.ac: Only use -Werror by default when DEVELOPMENT
4576         is true.
4577         * configure: Regenerate.
4578
4579 2014-05-19  Jan Kratochvil  <jan.kratochvil@redhat.com>
4580
4581         Fix gdbserver qGetTLSAddr for x86_64 -m32.
4582         * linux-x86-low.c (X86_64_USER_REGS): New.
4583         (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
4584
4585 2014-04-28  Yao Qi  <yao@codesourcery.com>
4586
4587         * Makefile.in (i386-avx512.c): Fix the typo of generated file
4588         name.
4589
4590 2014-04-25  Pedro Alves  <palves@redhat.com>
4591
4592         PR server/16255
4593         * linux-low.c (linux_attach_fail_reason_string): New function.
4594         (linux_attach_lwp): Delete.
4595         (linux_attach_lwp_1): Rename to ...
4596         (linux_attach_lwp): ... this.  Take a ptid instead of a pid as
4597         argument.  Remove "initial" parameter.  Return int instead of
4598         void.  Don't error or warn here.
4599         (linux_attach): Adjust to call linux_attach_lwp.  Call error on
4600         failure to attach to the tgid.  Call warning when failing to
4601         attach to an lwp.
4602         * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
4603         argument.  Remove "initial" parameter.  Return int instead of
4604         void.  Don't error or warn here.
4605         (linux_attach_fail_reason_string): New declaration.
4606         * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
4607         interface change.  Use linux_attach_fail_reason_string.
4608
4609 2014-04-24  Michael Sturm  <michael.sturm@mintel.com>
4610             Walfred Tedeschi  <walfred.tedeschi@intel.com>
4611
4612         * Makefile.in: Added rules to handle new files
4613         i386-avx512.c i386-avx512-linux.c amd64-avx512.c
4614         amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
4615         * configure.srv (srv_i386_regobj): Add i386-avx512.o.
4616         (srv_i386_linux_regobj): Add i386-avx512-linux.o.
4617         (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
4618         (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
4619         x32-avx512-linux.o.
4620         (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
4621         (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
4622         (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
4623         i386/x32-avx512.xml.
4624         (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
4625         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
4626         i386/x32-avx512-linux.xml.
4627         * i387-fp.c (num_avx512_k_registers): New constant for number
4628         of K registers.
4629         (num_avx512_zmmh_low_registers): New constant for number of
4630         lower ZMM registers (0-15).
4631         (num_avx512_zmmh_high_registers): New constant for number of
4632         higher ZMM registers (16-31).
4633         (num_avx512_ymmh_registers): New contant for number of higher
4634         YMM registers (ymm16-31 added by avx521 on x86_64).
4635         (num_avx512_xmm_registers): New constant for number of higher
4636         XMM registers (xmm16-31 added by AVX512 on x86_64).
4637         (struct i387_xsave): Add space for AVX512 registers.
4638         (i387_cache_to_xsave): Change raw buffer size to 64 characters.
4639         Add code to handle AVX512 registers.
4640         (i387_xsave_to_cache): Add code to handle AVX512 registers.
4641         * linux-x86-low.c (init_registers_amd64_avx512_linux): New
4642         prototypei from generated file.
4643         (tdesc_amd64_avx512_linux): Likewise.
4644         (init_registers_x32_avx512_linux): Likewise.
4645         (tdesc_x32_avx512_linux): Likewise.
4646         (init_registers_i386_avx512_linux): Likewise.
4647         (tdesc_i386_avx512_linux): Likewise.
4648         (x86_64_regmap): Add AVX512 registers.
4649         (x86_linux_read_description): Add code to handle AVX512 XSTATE
4650         mask.
4651         (initialize_low_arch): Add code to initialize AVX512 registers.
4652
4653 2014-04-23  Pedro Alves  <palves@redhat.com>
4654
4655         * mem-break.c (find_gdb_breakpoint_at): Make static.
4656         * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
4657
4658 2014-04-23  Pedro Alves  <palves@redhat.com>
4659
4660         * i386-low.c: Don't include break-common.h here.
4661         (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4662         prototype to take target_hw_bp_type as argument instead of a Z
4663         packet char.
4664         * i386-low.h: Include break-common.h here.
4665         (Z_packet_to_hw_type): Declare.
4666         (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4667         prototypes.
4668         * linux-x86-low.c (x86_insert_point): Convert the packet number to
4669         a target_hw_bp_type before calling i386_low_insert_watchpoint.
4670         (x86_remove_point): Convert the packet number to a
4671         target_hw_bp_type before calling i386_low_remove_watchpoint.
4672         * win32-i386-low.c (i386_insert_point): Convert the packet number
4673         to a target_hw_bp_type before calling i386_low_insert_watchpoint.
4674         (i386_remove_point): Convert the packet number to a
4675         target_hw_bp_type before calling i386_low_remove_watchpoint.
4676
4677 2014-04-23  Pedro Alves  <palves@redhat.com>
4678
4679         * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
4680
4681 2014-04-10  Pedro Alves  <palves@redhat.com>
4682
4683         * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4684         Check if the condition or command is NULL before checking if the
4685         breakpoint is known.  On success, return true.
4686         * mem-break.h (add_breakpoint_condition): Document return.
4687         (add_breakpoint_commands): Add describing comment.
4688         * server.c (skip_to_semicolon): New function.
4689         (process_point_options): Use it.
4690
4691 2014-04-09  Pedro Alves  <palves@redhat.com>
4692
4693         * linux-low.c (linux_read_loadmap): Pass current_inferior directly
4694         to lwpid_of.
4695
4696 2014-02-27  Pedro Alves  <palves@redhat.com>
4697
4698         PR 12702
4699         * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
4700         macros.
4701         * linux-low.c (delete_lwp, handle_extended_wait): Add debug
4702         output.
4703         (last_thread_of_process_p): Take a PID argument instead of a
4704         thread pointer.
4705         (linux_wait_for_lwp): Delete.
4706         (num_lwps, check_zombie_leaders, not_stopped_callback): New
4707         functions.
4708         (linux_low_filter_event): New function, party factored out from
4709         linux_wait_for_event.
4710         (linux_wait_for_event): Rename to ...
4711         (linux_wait_for_event_filtered): ... this.  Add new filter ptid
4712         argument.  Partly rewrite.  Always use waitpid(-1, WNOHANG) and
4713         sigsuspend.  Check for zombie leaders.
4714         (linux_wait_for_event): Reimplement as wrapper around
4715         linux_wait_for_event_filtered.
4716         (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED.  Assume that if
4717         a normal or signal exit is seen, it's the whole process exiting.
4718         (wait_for_sigstop): No longer a for_each_inferior callback.
4719         Rewrite on top of linux_wait_for_event_filtered.
4720         (stop_all_lwps): Call wait_for_sigstop directly.
4721         * server.c (resume, handle_target_event): Handle
4722         TARGET_WAITKIND_NO_RESUMED.
4723
4724 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
4725
4726         * win32-low.c (psapi_get_dll_name,
4727         * win32_CreateToolhelp32Snapshot): Delete.
4728         (win32_CreateToolhelp32Snapshot, win32_Module32First)
4729         (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
4730         Delete.
4731         (handle_load_dll): Add function description.
4732         Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
4733
4734 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
4735
4736         * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
4737         Add comment.
4738         (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
4739         base address when calling win32_add_one_solib.
4740         (handle_load_dll): Delete local variable load_addr.
4741         Remove 0x1000 offset applied to DLL base address when calling
4742         win32_add_one_solib.
4743         (handle_unload_dll): Add comment.
4744
4745 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
4746
4747         * win32-low.c (win32_add_all_dlls): Renames
4748         win32_ensure_ntdll_loaded.  Rewrite function documentation.
4749         Adjust implementation to always load all DLLs.
4750         Add 0x1000 offset to DLL base address when calling
4751         win32_add_one_solib.
4752         (child_initialization_done): New static global.
4753         (do_initial_child_stuff): Set child_initialization_done to
4754         zero during child initialization, and 1 after.  Replace call
4755         to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
4756         Add comment.
4757         (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
4758         (handle_unload_dll): Add function documentation.
4759         (get_child_debug_event): Ignore load and unload DLL events
4760         during child initialization.
4761
4762 2014-02-20  Doug Evans  <dje@google.com>
4763
4764         Remove global all_lwps.
4765         * inferiors.h (ptid_of): Move here from linux-low.h.
4766         (pid_of, lwpid_of): Ditto.
4767         * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
4768         parameter is a struct thread_info * now.
4769         (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
4770         directly.  Pass &all_threads to find_inferior instead of &all_lwps.
4771         (aarch64_stopped_data_address): Fetch lwpid from current_inferior
4772         directly.
4773         (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
4774         (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
4775         * linux-arm-low.c (update_registers_callback): Update, "entry"
4776         parameter is a struct thread_info * now.
4777         Fetch lwpid from current_inferior directly.
4778         (arm_insert_point): Pass &all_threads to find_inferior instead of
4779         &all_lwps.
4780         (arm_remove_point): Ditto.
4781         (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
4782         (arm_prepare_to_resume): Fetch pid from thread.
4783         (arm_read_description): Fetch lwpid from current_inferior directly.
4784         * linux-low.c (all_lwps): Delete.
4785         (delete_lwp): Delete call to remove_inferior.
4786         (handle_extended_wait): Fetch lwpid from thread.
4787         (add_lwp): Don't set lwp->entry.id.  Remove call to
4788         add_inferior_to_list.
4789         (linux_attach_lwp_1): Fetch pid from current_inferior directly.
4790         (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
4791         (kill_one_lwp_callback): Ditto.
4792         (linux_kill): Don't dereference NULL pointer.
4793         Fetch ptid,lwpid from thread.
4794         (get_detach_signal): Fetch ptid from thread.
4795         (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
4796         Simplify call to regcache_invalidate_thread.
4797         (delete_lwp_callback): Update, "entry" parameter is a
4798         struct thread_info * now.  Fetch pid from thread.
4799         (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
4800         (status_pending_p_callback): Update, "entry" parameter is a
4801         struct thread_info * now.  Fetch ptid from thread.
4802         (find_lwp_pid): Update, "entry" parameter is a
4803         struct thread_info * now.
4804         (linux_wait_for_lwp): Fetch pid from thread.
4805         (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
4806         (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
4807         (enqueue_one_deferred_signal): Fetch lwpid from thread.
4808         (dequeue_one_deferred_signal): Ditto.
4809         (cancel_breakpoint): Fetch ptid from current_inferior.
4810         (linux_wait_for_event): Pass &all_threads to find_inferior,
4811         not &all_lwps.  Fetch ptid, lwpid from thread.
4812         (count_events_callback): Update, "entry" parameter is a
4813         struct thread_info * now.
4814         (select_singlestep_lwp_callback): Ditto.
4815         (select_event_lwp_callback): Ditto.
4816         (cancel_breakpoints_callback): Ditto.
4817         (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
4818         not &all_lwps.
4819         (select_event_lwp): Ditto.  Fetch ptid from event_thread.
4820         (unsuspend_one_lwp): Update, "entry" parameter is a
4821         struct thread_info * now.
4822         (unsuspend_all_lwps): Pass &all_threads to find_inferior,
4823         not &all_lwps.
4824         (linux_stabilize_threads): Ditto.  And for for_each_inferior.
4825         Fetch lwpid from thread, not lwp.
4826         (linux_wait_1): Fetch ptid, lwpid from current_inferior.
4827         Pass &all_threads to find_inferior, not &all_lwps.
4828         (send_sigstop): Fetch lwpid from thread, not lwp.
4829         (send_sigstop_callback): Update, "entry" parameter is a
4830         struct thread_info * now.
4831         (suspend_and_send_sigstop_callback): Ditto.
4832         (wait_for_sigstop): Ditto.  Fetch ptid, lwpid from thread, lwp.
4833         (stuck_in_jump_pad_callback): Update, "entry" parameter is a
4834         struct thread_info * now.
4835         (move_out_of_jump_pad_callback): Ditto.  Fetch ptid, lwpid
4836         from thread, lwp.
4837         (lwp_running): Update, "entry" parameter is a
4838         struct thread_info * now.
4839         (stop_all_lwps): Fetch ptid from thread.
4840         Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
4841         (linux_resume_one_lwp): Fetch lwpid from thread.
4842         (linux_set_resume_request): Update, "entry" parameter is a
4843         struct thread_info * now.  Fetch pid, lwpid from thread.
4844         (resume_status_pending_p): Update, "entry" parameter is a
4845         struct thread_info * now.
4846         (need_step_over_p): Ditto.  Fetch lwpid from thread.
4847         (start_step_over): Fetch lwpid from thread.
4848         (linux_resume_one_thread): Update, "entry" parameter is a
4849         struct thread_info * now.  Fetch lwpid from thread.
4850         (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
4851         (proceed_one_lwp): Update, "entry" parameter is a
4852         struct thread_info * now.  Fetch lwpid from thread.
4853         (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
4854         struct thread_info * now.
4855         (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
4856         (unstop_all_lwps): Ditto.  Fetch lwpid from thread.
4857         (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
4858         directly.
4859         (regsets_store_inferior_registers): Ditto.
4860         (fetch_register, store_register): Ditto.
4861         (linux_read_memory, linux_write_memory): Ditto.
4862         (linux_request_interrupt): Ditto.
4863         (linux_read_auxv): Ditto.
4864         (linux_xfer_siginfo): Ditto.
4865         (linux_qxfer_spu): Ditto.
4866         (linux_qxfer_libraries_svr4): Ditto.
4867         * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
4868         moved to inferiors.h.
4869         (get_lwp): Delete.
4870         (get_thread_lwp): Update.
4871         (struct lwp_info): Delete member "entry".  Simplify comment for
4872         member "thread".
4873         (all_lwps): Delete.
4874         * linux-mips-low.c (mips_read_description): Fetch lwpid from
4875         current_inferior directly.
4876         (update_watch_registers_callback): Update, "entry" parameter is a
4877         struct thread_info * now.  Fetch pid from thread.
4878         (mips_linux_prepare_to_resume): Fetch ptid from thread.
4879         (mips_insert_point): Fetch lwpid from current_inferior.
4880         Pass &all_threads to find_inferior, not &all_lwps.
4881         (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
4882         (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
4883         directly.
4884         (mips_stopped_data_address): Ditto.
4885         * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
4886         directly.
4887         * linux-tile-low.c (tile_arch_setup): Ditto.
4888         * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
4889         (update_debug_registers_callback): Update, "entry" parameter is a
4890         struct thread_info * now.  Fetch pid from thread.
4891         (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
4892         Pass &all_threads to find_inferior, not &all_lwps.
4893         (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
4894         (i386_dr_low_set_control): Fetch pid from current_inferior directly.
4895         Pass &all_threads to find_inferior, not &all_lwps.
4896         (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
4897         (i386_dr_low_get_status): Ditto.
4898         (x86_linux_prepare_to_resume): Fetch ptid from thread.
4899         (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
4900         (x86_linux_read_description): Ditto.
4901         * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
4902
4903 2014-02-20  Doug Evans  <dje@google.com>
4904
4905         * inferiors.c (get_first_inferior): Fix buglet.
4906
4907 2014-02-19  Doug Evans  <dje@google.com>
4908
4909         * gdbthread.h (add_thread): Change result type to struct thread_info *.
4910         * inferiors.c (add_thread): Change result type to struct thread_info *.
4911         All callers updated.
4912         (add_lwp): Call add_thread here instead of in callers.
4913         All callers updated.
4914         * linux-low.h (get_lwp_thread): Rewrite.
4915         (struct lwp_info): New member "thread".
4916
4917 2014-02-19  Doug Evans  <dje@google.com>
4918
4919         * linux-low.c (add_lwp): Change result to struct lwp_info *.
4920         All callers updated.
4921
4922 2014-02-19  Doug Evans  <dje@google.com>
4923
4924         * inferiors.c (add_thread): Fix whitespace.
4925
4926 2014-02-19  Doug Evans  <dje@google.com>
4927
4928         * dll.c (clear_dlls): Replace accessing list implemention details
4929         with API function.
4930         * gdbthread.h (get_first_thread): Declare.
4931         * inferiors.c (for_each_inferior_with_data): New function.
4932         (get_first_thread): New function.
4933         (find_thread_ptid): Simplify.
4934         (get_first_inferior): New function.
4935         (clear_list): Delete.
4936         (one_inferior_p): New function.
4937         (clear_inferior_list): New function.
4938         (clear_inferiors): Update.
4939         * inferiors.h (for_each_inferior_with_data): Declare.
4940         (clear_inferior_list): Declare.
4941         (one_inferior_p): Declare.
4942         (get_first_inferior): Declare.
4943         * linux-low.c (linux_wait_for_event): Replace accessing list
4944         implemention details with API function.
4945         * server.c (target_running): Ditto.
4946         (accumulate_file_name_length): New function.
4947         (emit_dll_description): New function.
4948         (handle_qxfer_libraries): Replace accessing list implemention
4949         details with API function.
4950         (handle_qxfer_threads_worker): New function.
4951         (handle_qxfer_threads_proper): Replace accessing list implemention
4952         details with API function.
4953         (handle_query): Ditto.
4954         (visit_actioned_threads_callback_ftype): New typedef.
4955         (visit_actioned_threads_data): New struct.
4956         (visit_actioned_threads): Rewrite to be find_inferior callback.
4957         (resume): Call find_inferior.
4958         (handle_status): Replace accessing list implemention
4959         details with API function.
4960         (process_serial_event): Replace accessing list implemention details
4961         with API function.
4962         * target.c (set_desired_inferior): Replace accessing list implemention
4963         details with API function.
4964         * tracepoint.c (same_process_p): New function.
4965         (gdb_agent_about_to_close): Replace accessing list implemention
4966         details with API function.
4967         * win32-low.c (child_delete_thread): Replace accessing list
4968         implemention details with API function.
4969         (match_dll_by_basename): New function.
4970         (dll_is_loaded_by_basename): New function.
4971         (win32_ensure_ntdll_loaded): Replace accessing list implemention
4972         details call to dll_is_loaded_by_basename.
4973
4974 2014-02-19  Doug Evans  <dje@google.com>
4975
4976         * dll.h (struct dll_info): Add comment.
4977         * gdbthread.h (struct thread_info): Add comment.
4978         (current_ptid): Simplify.
4979         * inferiors.c (add_process): Update.
4980         (remove_process): Update.
4981         * inferiors.h (struct process_info): Rename member "head" to "entry".
4982         * linux-low.c (delete_lwp): Update.
4983         (add_lwp): Update.
4984         (last_thread_of_process_p): Update.
4985         (kill_one_lwp_callback, linux_kill): Update.
4986         (status_pending_p_callback): Update.
4987         (wait_for_sigstop): Update.  Simplify read of ptid.
4988         (start_step_over): Update.
4989         * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
4990         (get_lwp_thread): Update.
4991         (struct lwp_info): Rename member "head" to "entry".
4992         * regcache.h (inferior_list_entry): Delete.
4993         * server.c (kill_inferior_callback): Update.
4994         (detach_or_kill_inferior_callback): Update.
4995         (print_started_pid): Update.
4996         (print_attached_pid): Update.
4997         (process_serial_event): Simplify read of ptid.
4998         * thread-db.c (thread_db_create_event): Update.
4999         (thread_db_get_tls_address): Update.
5000         * win32-low.c (current_inferior_ptid): Simplify.
5001
5002 2014-02-19  Tom Tromey  <tromey@redhat.com>
5003
5004         * target.h (struct target_ops) <supports_btrace>: Add target_ops
5005         argument.
5006         (target_supports_btrace): Update.
5007
5008 2014-02-14  Yao Qi  <yao@codesourcery.com>
5009
5010         * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
5011         (rsp-low-ipa.o): New target.
5012
5013 2014-02-12  Tom Tromey  <tromey@redhat.com>
5014
5015         * ax.c (gdb_parse_agent_expr): Use hex2bin, not
5016         convert_ascii_to_int.
5017         * regcache.c (registers_to_string): Likewise.
5018         * remote-utils.c (decode_M_packet): Likewise.
5019         * server.c (process_serial_event): Likewise.
5020
5021 2014-02-12  Tom Tromey  <tromey@redhat.com>
5022
5023         * server.c (handle_query, handle_v_run): Use hex2bin, not
5024         unhexify.
5025         * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
5026
5027 2014-02-12  Tom Tromey  <tromey@redhat.com>
5028
5029         * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
5030         convert_int_to_ascii.
5031         * regcache.c (registers_to_string, collect_register_as_string):
5032         Likewise.
5033         * remote-utils.c (look_up_one_symbol, relocate_instruction):
5034         Likewise.
5035         * server.c (process_serial_event): Likewise.
5036         * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
5037         (cmd_qtbuffer, cstr_to_hexstr): Likewise.
5038
5039 2014-02-12  Tom Tromey  <tromey@redhat.com>
5040
5041         * remote-utils.c (look_up_one_symbol, monitor_output): Use
5042         bin2hex, not hexify.
5043         * tracepoint.c (cmd_qtstatus): Likewise.
5044
5045 2014-02-12  Tom Tromey  <tromey@redhat.com>
5046
5047         * remote-utils.c (monitor_output): Pass explicit length to
5048         hexify.
5049
5050 2014-02-12  Tom Tromey  <tromey@redhat.com>
5051
5052         * tracepoint.c: Include rsp-low.h.
5053         * server.c: Include rsp-low.h.
5054         * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5055         (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5056         declare.
5057         * remote-utils.c: Include rsp-low.h.
5058         (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5059         (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5060         (convert_int_to_ascii, convert_ascii_to_int): Move to
5061         common/rsp-low.c.
5062         * regcache.c: Include rsp-low.h.
5063         * ax.c: Include rsp-low.h.
5064         * Makefile.in (SFILES): Add common/rsp-low.c.
5065         (OBS): Add rsp-low.o.
5066         (rsp-low.o): New target.
5067
5068 2014-02-12  Tom Tromey  <tromey@redhat.com>
5069
5070         * utils.h (pulongest, plongest, phex_nz): Don't declare.
5071         Include print-utils.h.
5072         * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5073         (plongest, thirty_two, phex_nz): Remove.
5074         * Makefile.in (SFILES): Add common/print-utils.c.
5075         (OBS): Add print-utils.o.
5076         (print-utils-ipa.o): New target.
5077         (print-utils.o): New target.
5078         (IPA_OBJS): Add print-utils-ipa.o.
5079
5080 2014-02-06  Tom Tromey  <tromey@redhat.com>
5081
5082         * Makefile.in (SFILES): Fix indentation.
5083
5084 2014-02-05  Doug Evans  <dje@google.com>
5085
5086         * linux-low.c (linux_wait_for_event): Improve comment.
5087         (linux_wait_1): Keep current_inferior in sync with event_child.
5088
5089 2014-01-22  Doug Evans  <dje@google.com>
5090
5091         * gdbthread.h (gdb_id_to_thread): Delete, unused.
5092
5093 2014-01-22  Doug Evans  <dje@google.com>
5094
5095         * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
5096         * configure: Regenerate.
5097         * config.in: Regenerate.
5098         * Makefile.in (SFILES): Add debug.c.
5099         (OBS): Add debug.o.
5100         * debug.c: New file.
5101         * debug.h: New file.
5102         * linux-aarch64-low.c (*): Update all debugging printfs to use
5103         debug_printf instead of fprintf.
5104         * linux-arm-low.c (*): Ditto.
5105         * linux-cris-low.c (*): Ditto.
5106         * linux-crisv32-low.c (*): Ditto.
5107         * linux-m32r-low.c (*): Ditto.
5108         * linux-sparc-low.c (*): Ditto.
5109         * linux-x86.c (*): Ditto.
5110         * linux-low.c (*): Ditto.
5111         (linux_wait_1): Add calls to debug_enter, debug_exit.
5112         (linux_wait): Remove redundant debugging printf.
5113         (stop_all_lwps): Add calls to debug_enter, debug_exit.
5114         (linux_resume, unstop_all_lwps): Ditto.
5115         * mem-break.c (*): Update all debugging printfs to use
5116         debug_printf instead of fprintf.
5117         * remote-utils.c (*): Ditto.
5118         * thread-db.c (*): Ditto.
5119         * server.c #include <ctype.h>, "gdb_vecs.h".
5120         (debug_threads): Moved to debug.c.
5121         (*): Update all debugging printfs to use debug_printf instead of
5122         fprintf.
5123         (start_inferior): Replace call to fflush with call to debug_flush.
5124         (monitor_show_help): Mention set debug-format.
5125         (parse_debug_format_options): New function.
5126         (handle_monitor_command): Handle "monitor set debug-format".
5127         (gdbserver_usage): Mention --debug-format.
5128         (main): Parse --debug-format.
5129         * server.h (debug_threads): Declaration moved to debug.h.
5130         #include "debug.h".
5131         * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
5132         trace_debug_1 that uses debug_printf.
5133         (tracepoint_look_up_symbols): Update all debugging printfs to use
5134         debug_printf instead of fprintf.
5135
5136 2014-01-20  Baruch Siach  <baruch@tkos.co.il>
5137
5138         * linux-xtensa-low.c: Include asm/ptrace.h instead of
5139         sys/ptrace.h.
5140
5141 2014-01-17  Pedro Alves  <palves@redhat.com>
5142
5143         PR build/16445
5144         * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
5145         defined after including gdb_proc_service.h.
5146
5147 2014-01-16  Doug Evans  <dje@google.com>
5148
5149         * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
5150         (match_dll): Use it.
5151
5152 2014-01-16  Markus Metzger  <markus.t.metzger@intel.com>
5153
5154         * target.h (target_ops) <read_btrace>: Change parameters and
5155         return type to allow error reporting.
5156         * server.c (handle_qxfer_btrace): Support delta reads.  Pass
5157         trace reading errors on.
5158         * linux-low.c (linux_low_read_btrace): Pass trace reading
5159         errors on.
5160         (linux_low_disable_btrace): New.
5161
5162 2014-01-15  Doug Evans  <dje@google.com>
5163
5164         * inferiors.c (thread_id_to_gdb_id): Delete.
5165         * inferiors.h (thread_id_to_gdb_id): Delete.
5166
5167 2014-01-13  Eli Zaretskii  <eliz@gnu.org>
5168
5169         * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
5170         "-I$(srcdir)/../".  Fixes MinGW compilation errors with old GCC
5171         versions.
5172
5173 2014-01-08  Pedro Alves  <palves@redhat.com>
5174
5175         * server.c (handle_status): Don't discard previous queued stop
5176         replies or thread's pending status here.
5177         (main) <disconnection>: Do it here instead.
5178
5179 2014-01-08  Pedro Alves  <palves@redhat.com>
5180
5181         * gdbthread.h (struct thread_info) <status_pending_p>: New field.
5182         * server.c (visit_actioned_threads, handle_pending_status): New
5183         function.
5184         (handle_v_cont): Factor out parts to ...
5185         (resume): ... this new function.  If in all-stop, and a thread
5186         being resumed has a pending status, report it without actually
5187         resuming.
5188         (myresume): Adjust to use the new 'resume' function.
5189         (clear_pending_status_callback, set_pending_status_callback)
5190         (find_status_pending_thread_callback): New functions.
5191         (handle_status): Handle the case of multiple threads having
5192         interesting statuses to report.  Report threads' real last signal
5193         instead of always reporting GDB_SIGNAL_TRAP.  Look for a thread
5194         with an interesting thread to report the status for, instead of
5195         always reporting the status of the first thread.
5196
5197 2014-01-01  Joel Brobecker  <brobecker@adacore.com>
5198
5199         * gdbserver.c (gdbserver_version): Set copyright year to 2014.
5200         * gdbreplay.c (gdbreplay_version): Likewise.
5201
5202 2013-12-18  Yufeng Zhang  <yufeng.zhang@arm.com>
5203
5204         * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
5205         iov.iov_len with the real length in use.
5206
5207 2013-12-13  Joel Brobecker  <brobecker@adacore.com>
5208
5209         * Makefile.in (safe-ctype.o, lbasename.o): New rules.
5210         * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
5211         for all targets that use win32-low.c.
5212         * win32-low.c (win32_ensure_ntdll_loaded): New function.
5213         (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
5214
5215 2013-12-13  Pedro Alves  <palves@redhat.com>
5216
5217         * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
5218         if equal to TARGET_WAITKIND_LOADED.
5219         * win32-low.c (cached_status): New static global.
5220         (win32_wait): Add declaration.
5221         (do_initial_child_stuff): Flush all initial pending debug events
5222         up to the initial breakpoint.
5223         (win32_wait): If CACHED_STATUS was set, return that instead
5224         of doing a real wait.  Remove the code resuming the execution
5225         of the inferior after receiving a TARGET_WAITKIND_LOADED event
5226         during the initial phase.  Also remove the code changing
5227         OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
5228         TARGET_WAITKIND_STOPPED.
5229
5230 2013-12-11  Yao Qi  <yao@codesourcery.com>
5231
5232         * notif.c (handle_notif_ack): Return 0 if no notification
5233         matches.
5234
5235 2013-11-20  Doug Evans  <dje@google.com>
5236
5237         * linux-low.c (linux_set_resume_request): Fix comment.
5238
5239 2013-11-20  Doug Evans  <dje@google.com>
5240
5241         * linux-low.c (resume_status_pending_p): Tweak comment.
5242
5243 2013-11-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
5244
5245         * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
5246         amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
5247         * configure.srv (srv_i386_regobj): Add i386-mpx.o.
5248         (srv_i386_linux_regobj): Add i386-mpx-linux.o.
5249         (srv_amd64_regobj): Add amd64-mpx.o.
5250         (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
5251         (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
5252         (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
5253         * i387-fp.c (num_pl_bnd_register) Added constant.
5254         (num_pl_bnd_cfg_registers) Added constant.
5255         (struct i387_xsave) Added reserved area and MPX fields.
5256         (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
5257         * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
5258         function.
5259         (tdesc_i386_mpx_linux): Add MPX amd64 target.
5260         (init_registers_amd64_mpx_linux): Declare new function.
5261         (tdesc_amd64_mpx_linux): Add MPX amd64 target.
5262         (x86_64_regmap): Add MPX registers.
5263         (x86_linux_read_description): Add MPX case.
5264         (initialize_low_arch): Initialize MPX targets.
5265
5266 2013-11-18  Tom Tromey  <tromey@redhat.com>
5267
5268         * configure: Rebuild.
5269         * configure.ac: Don't check for stdlib.h.
5270         * gdbreplay.c: Unconditionally include stdlib.h.
5271
5272 2013-11-18  Tom Tromey  <tromey@redhat.com>
5273
5274         * config.in: Rebuild.
5275         * configure: Rebuild.
5276         * configure.ac: Don't use AC_HEADER_DIRENT.
5277
5278 2013-11-18  Tom Tromey  <tromey@redhat.com>
5279
5280         * server.h: Don't check HAVE_STRING_H.
5281         * gdbreplay.c: Don't check HAVE_STRING_H.
5282         * configure: Rebuild.
5283
5284 2013-11-18  Tom Tromey  <tromey@redhat.com>
5285
5286         * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
5287         LIBGNU.
5288
5289 2013-11-08  Tom Tromey  <tromey@redhat.com>
5290
5291         * configure, config.in: Rebuild.
5292         * configure.ac: Remove unused configury.
5293
5294 2013-11-08  Tom Tromey  <tromey@redhat.com>
5295
5296         * acinclude.m4: Include common.m4, codeset.m4.
5297         * configure, config.in: Rebuild.
5298         * configure.ac: Use GDB_AC_COMMON.
5299
5300 2013-11-06  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5301
5302         * linux-s390-low.c (HWCAP_S390_TE): New define.
5303         (s390_arch_setup): Consider the TE field in the HWCAP for
5304         determining 'have_regset_tdb'.
5305
5306 2013-10-16  Sergio Durigan Junior  <sergiodj@redhat.com>
5307
5308         PR gdb/16014
5309         * tracepoint.c (download_tracepoint_1): Remove unnecessary double
5310         call to sizeof.
5311
5312 2013-10-02  Pedro Alves  <palves@redhat.com>
5313
5314         * server.c (process_serial_event): Don't output "GDBserver
5315         exiting" if GDB is connected through stdio.
5316         * target.c (mywait): Likewise, be silent if GDB is connected
5317         through stdio.
5318
5319 2013-10-01  Joel Brobecker  <brobecker@adacore.com>
5320
5321         * lynx-low.c (lynx_add_threads_after_attach): New function.
5322         (lynx_attach): Remove call to add_thread.  Add call to
5323         lynx_add_threads_after_attach instead.
5324
5325 2013-09-28  Mike Frysinger  <vapier@gentoo.org>
5326
5327         * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
5328         * config.in, configure: Regenerated.
5329
5330 2013-09-18  Yao Qi  <yao@codesourcery.com>
5331
5332         PR server/15959
5333         * server.c (start_inferior): Clear 'resume_info'.
5334
5335 2013-09-16  Jiong Wang  <jiwang@tilera.com>
5336
5337         * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
5338         for each register.
5339
5340 2013-09-16  Jiong Wang  <jiwang@tilera.com>
5341
5342         * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
5343         linux-tile-low.o to srv_tgtobj.
5344
5345 2013-09-16  Will Newton  <will.newton@linaro.org>
5346
5347         * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
5348         out regs.
5349
5350 2013-09-06  Pedro Alves  <palves@redhat.com>
5351
5352         * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
5353         (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
5354         (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
5355         (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
5356         (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
5357         (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
5358
5359 2013-09-06  Pedro Alves  <palves@redhat.com>
5360
5361         * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
5362         explicit header dependencies and use $COMPILE/$POSTCOMPILE.
5363
5364 2013-09-06  Pedro Alves  <palves@redhat.com>
5365
5366         * linux-amd64-ipa.c: Include tracepoint.h.
5367         * linux-i386-ipa.c: Include tracepoint.h.
5368
5369 2013-09-06  Ricard Wanderlof  <ricardw@axis.com>
5370
5371         * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
5372         (ps_get_thread_area): New function.
5373
5374 2013-09-06  Ricard Wanderlof  <ricardw@axis.com>
5375
5376         * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
5377         (initialize_low_arch): Call init_registers_crisv32 rather than
5378         init_register_crisv32.
5379
5380 2013-09-05  Pedro Alves  <palves@redhat.com>
5381
5382         * server.h (handle_vFile, hostio_last_error_from_errno): Move
5383         to ...
5384         * hostio.h: ... this new file.
5385         * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
5386         win32-low.c: Include hostio.h.
5387
5388 2013-09-05  Pedro Alves  <palves@redhat.com>
5389
5390         * server.h (gdb_client_data, handler_func, callback_handler_func)
5391         (delete_file_handler, add_file_handler, append_callback_event)
5392         (delete_callback_event, start_event_loop, initialize_event_loop):
5393         Move to event-loop.h and include it.
5394         * event-loop.h: New file.
5395
5396 2013-09-05  Pedro Alves  <palves@redhat.com>
5397
5398         * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
5399         * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
5400         (loaded_dll, unloaded_dll): Move to ...
5401         * dll.h: ... this new file.
5402         * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
5403
5404 2013-09-05  Pedro Alves  <palves@redhat.com>
5405
5406         * server.h (current_process, get_thread_process, all_processes)
5407         (add_inferior_to_list, for_each_inferior, current_inferior)
5408         (remove_inferior, add_process, remove_process, find_process_pid)
5409         (have_started_inferiors_p, have_attached_inferiors_p)
5410         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
5411         (clear_inferiors, find_inferior, find_inferior_id)
5412         (inferior_target_data, set_inferior_target_data)
5413         (inferior_regcache_data, set_inferior_regcache_data): Move to
5414         inferiors.h, and include it.
5415         * inferiors.h: New file.
5416
5417 2013-09-05  Pedro Alves  <palves@redhat.com>
5418
5419         * server.h (struct emit_ops, current_insn_ptr, emit_error):
5420         Move ...
5421         * ax.h: ... here.
5422
5423 2013-09-05  Pedro Alves  <palves@redhat.com>
5424
5425         * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
5426         tracepoint.h.
5427         * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
5428         (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
5429         (handle_tracepoint_general_set, handle_tracepoint_query)
5430         (tracepoint_finished_step, tracepoint_was_hit)
5431         (release_while_stepping_state_list, current_traceframe)
5432         (in_readonly_region, traceframe_read_mem)
5433         (fetch_traceframe_registers, traceframe_read_sdata)
5434         (traceframe_read_info, struct fast_tpoint_collect_status)
5435         (fast_tracepoint_collecting, force_unlock_trace_buffer)
5436         (handle_tracepoit_bkpts, initialize_low_tracepoint)
5437         (supply_fast_tracepoint_registers)
5438         (supply_static_tracepoint_registers, set_trampoline_buffer_space)
5439         (ipa_tdesc, claim_trampoline_space)
5440         (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
5441         (agent_mem_read, agent_get_trace_state_variable_value)
5442         (agent_set_trace_state_variable_value, agent_tsv_read)
5443         (agent_mem_read_string, get_raw_reg_func_addr)
5444         (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
5445         * tracepoint.h: ... this new file.
5446
5447 2013-09-05  Pedro Alves  <palves@redhat.com>
5448
5449         * server.h (perror_with_name, error, fatal, warning, paddress)
5450         (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
5451         include it.
5452         * utils.h: New file.
5453
5454 2013-09-05  Pedro Alves  <palves@redhat.com>
5455
5456         * server.h (remote_debug, noack_mode, transport_is_reliable)
5457         (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
5458         (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
5459         (getpkt, remote_prepare, remote_open, remote_close, write_ok)
5460         (write_enn, initialize_async_io, enable_async_io)
5461         (disable_async_io, check_remote_input_interrupt_request)
5462         (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
5463         (dead_thread_notify, prepare_resume_reply)
5464         (decode_address_to_semicolon, decode_address, decode_m_packet)
5465         (decode_M_packet, decode_X_packet, decode_xfer_write)
5466         (decode_search_memory_packet, unhexify, hexify)
5467         (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
5468         (look_up_one_symbol, relocate_instruction)
5469         (monitor_output): Move to remote-utils.h, and include it.
5470         * remote-utils.h: New file.
5471
5472 2013-09-05  Pedro Alves  <palves@redhat.com>
5473
5474         * server.h (_): Delete.
5475
5476 2013-09-02  Pedro Alves  <palves@redhat.com>
5477
5478         * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
5479         (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
5480         allocated.
5481         (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
5482
5483 2013-09-02  Pierre Muller  <muller@sourceware.org>
5484
5485         * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
5486         or WriteProcessMemory complete successfully and handle
5487         ERROR_PARTIAL_COPY error.
5488
5489 2013-09-02  Pedro Alves  <palves@redhat.com>
5490
5491         * server.c (gdb_read_memory): Return -1 on traceframe memory read
5492         error instead of EIO.
5493
5494 2013-08-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
5495
5496         PR server/15604
5497         * linux-low.c: Include filestuff.h.
5498         (linux_create_inferior) <pid == 0>: Call close_most_fds.
5499         * lynx-low.c: Include filestuff.h.
5500         (lynx_create_inferior) <pid == 0>: Call close_most_fds.
5501         * server.c: Include filestuff.h.
5502         (main): Call notice_open_fds.
5503         * spu-low.c: Include filestuff.h.
5504         (spu_create_inferior) <pid == 0>: Call close_most_fds.
5505
5506 2013-08-22  Luis Machado  <lgustavo@codesourcery.com>
5507
5508         * Makefile.in: Explain why ../target and ../nat are not
5509         listed as include file search paths.
5510         (linux-waitpid.o): New object file rule.
5511         * configure.srv (srv_native_linux_obj): New variable.
5512         Replace all occurrences of linux native object files with
5513         $srv_native_linux_obj.
5514         * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
5515         (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
5516         (linux_enable_event_reporting): Remove declaration.
5517         (my_waitpid): Moved to common/linux-waitpid.c.
5518         (linux_wait_for_event): Pass ptid when calling
5519         linux_enable_event_reporting.
5520         (linux_supports_tracefork_flag): Remove.
5521         (linux_enable_event_reporting): Likewise.
5522         (linux_tracefork_grandchild): Remove.
5523         (STACK_SIZE): Moved to common/linux-ptrace.c.
5524         (linux_tracefork_child): Remove.
5525         (linux_test_for_tracefork): Remove.
5526         (linux_look_up_symbols): Call linux_supports_traceclone.
5527         (initialize_low): Remove call to linux_test_for_tracefork.
5528         * linux-low.h (PTRACE_TYPE_ARG3): Move to
5529         common/linux-ptrace.h.
5530         (PTRACE_TYPE_ARG4): Likewise.
5531         Include linux-ptrace.h.
5532
5533 2013-08-21  Pedro Alves  <palves@redhat.com>
5534
5535         * config.in: Renegerate.
5536
5537 2013-08-19  Luis Machado  <lgustavo@codesourcery.com>
5538
5539         * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
5540         (SFILES): Remove $(srcdir)/common/target-common.c and
5541         add $(srcdir)/target/waitstatus.c.
5542         (OBS): Remove target-common.o and add waitstatus.o.
5543         (server_h): Remove $(srcdir)/../common/target-common.h and
5544         add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
5545         and $(srcdir)/../target/waitstatus.h.
5546         (target-common.o): Remove.
5547         (waitstatus.o): New target object file.
5548         * target.h: Do not include target-common.h and
5549         include target/resume.h, target/wait.h and
5550         target/waitstatus.h.
5551
5552 2013-08-13  Luis Machado  <lgustavo@codesourcery.com>
5553
5554         * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5555         to PTRACE_TYPE_ARG3.
5556         * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5557         to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
5558         PTRACE_TYPE_ARG4.
5559         * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
5560         (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
5561
5562 2013-07-27  Jie Zhang  <jie@codesourcery.com>
5563             Daniel Jacobowitz  <dan@codesourcery.com>
5564             Yao Qi  <yao@codesourcery.com>
5565
5566         * Makefile.in (SFILES): Add common/mips-linux-watch.c.
5567         (mips-linux-watch.o): New rule.
5568         (mips_linux_watch_h): New variable.
5569         * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
5570         srv_tgtobj.
5571         * linux-mips-low.c: Include mips-linux-watch.h.
5572         (struct arch_process_info, struct arch_lwp_info): New.
5573         (update_watch_registers_callback): New function.
5574         (mips_linux_new_process, mips_linux_new_thread) New functions.
5575         (mips_linux_prepare_to_resume, mips_insert_point): New
5576         functions.
5577         (mips_remove_point, mips_stopped_by_watchpoint): New
5578         functions.
5579         (rsp_bp_type_to_target_hw_bp_type): New function.
5580         (mips_stopped_data_address): New function.
5581         (the_low_target): Add watchpoint support functions.
5582
5583 2013-07-27  Yao Qi  <yao@codesourcery.com>
5584
5585         * i386-low.c: Include break-common.h.
5586         (enum target_hw_bp_type): Remove.
5587
5588 2013-07-24  Luis Machado  <lgustavo@codesourcery.com>
5589
5590         * Makefile.in (SFILES): /common/target-common.c.
5591         (OBS): Add target-common.o.
5592         (server_h): Add $(srcdir)/../common/target-common.h.
5593         (target-common.o): New target.
5594         * server.c (queue_stop_reply_callback): Free
5595         status string after use.
5596         * target.c (target_waitstatus_to_string): Remove.
5597         * target.h: Include target-common.h.
5598         (resume_kind): Likewise.
5599         (target_waitkind): Likewise.
5600         (target_waitstatus): Likewise.
5601         (TARGET_WNOHANG): Likewise.
5602
5603 2013-07-04  Yao Qi  <yao@codesourcery.com>
5604
5605         * Makefile.in (host_alias): Use @host_noncanonical@.
5606         (target_alias): Use @target_noncanonical@.
5607         * configure.ac: Use ACX_NONCANONICAL_TARGET and
5608         ACX_NONCANONICAL_HOST.
5609         * configure: Regenerated.
5610
5611         Revert:
5612         2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>
5613
5614         * configure.ac (version_host, version_target): Set and AC_SUBST them.
5615         * configure: Rebuild.
5616         * Makefile.in (version_host, version_target): Get from configure.
5617         (version.c): Use $(version_host) and $(version_target).
5618
5619 2013-07-03  Pedro Alves  <palves@redhat.com>
5620
5621         * Makefile.in (config.status): Depend on development.sh.
5622         * acinclude.m4: Include libmcheck.m4.
5623         * configure: Regenerate.
5624
5625 2013-07-02  Mircea Gherzan  <mircea.gherzan@intel.com>
5626
5627         * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
5628         attribute inside the parentheses.
5629         (winapi_DebugSetProcessKillOnExit): Ditto.
5630         (winapi_DebugBreakProcess): Ditto.
5631         (winapi_GenerateConsoleCtrlEvent): Ditto.
5632
5633 2013-07-02  Mircea Gherzan  <mircea.gherzan@intel.com>
5634
5635         * notif.h (notif_event): Add a dummy member to avoid compiler
5636         errors.
5637
5638 2013-07-01  Pedro Alves  <palves@redhat.com>
5639
5640         * hostio.c (HOSTIO_PATH_MAX): Define.
5641         (require_filename, handle_open, handle_unlink, handle_readlink):
5642         Use it.
5643
5644 2013-07-01  Pedro Alves  <palves@redhat.com>
5645
5646         * server.h: Include "pathmax.h".
5647         * linux-low.c: Don't include sys/param.h.
5648         (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
5649         MAXPATHLEN.
5650         * win32-low.c: Don't include sys/param.h.
5651         (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
5652
5653 2013-07-01  Pedro Alves  <palves@redhat.com>
5654
5655         * event-loop.c: Don't check HAVE_UNISTD_H before including
5656         <unistd.h>.
5657         * gdbreplay.c: Likewise.
5658         * remote-utils.c: Likewise.
5659         * server.c: Likewise.
5660         * configure.ac: Don't check for unistd.h.
5661         * configure: Regenerate.
5662
5663 2013-06-28  Tom Tromey  <tromey@redhat.com>
5664
5665         * Makefile.in (version.c): Use version.in, not
5666         common/version.in.
5667
5668 2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>
5669
5670         * configure.ac (version_host, version_target): Set and AC_SUBST them.
5671         * configure: Rebuild.
5672         * Makefile.in (version_host, version_target): Get from configure.
5673         (version.c): Use $(version_host) and $(version_target).
5674
5675 2013-06-10  Dmitry Kozlov <ddk@codesourcery.com>
5676
5677         Fix trace-status to output user name without trailing colon.
5678         * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
5679
5680 2013-06-10  Dmitry Kozlov <ddk@codesourcery.com>
5681
5682         Fix trace-status to output proper start-time and stop-time.
5683         * tracepoint.c (cmd_qtstatus): Modify trace-status output to
5684         output start time and stop time in hex as gdb expects.
5685
5686 2013-06-26  Pedro Alves  <pedro@codesourcery.com>
5687
5688         * tracepoint.c (build_traceframe_info_xml): Output trace state
5689         variables present in the trace buffer.
5690
5691 2013-06-24  Tom Tromey  <tromey@redhat.com>
5692
5693         * Makefile.in (version.c): Use bfd/version.h, common/version.in,
5694         create-version.sh.
5695         (version.o): Remove.
5696         * gdbreplay.c: Include version.h.
5697         (version, host_name): Don't declare.
5698         * server.h: Include version.h.
5699         (version, host_name): Don't declare.
5700
5701 2013-06-12  Pedro Alves  <palves@redhat.com>
5702
5703         * linux-x86-low.c (linux_is_elf64): Delete global.
5704         (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
5705         with local linux_pid_exe_is_elf_64_file use.
5706
5707 2013-06-11  Pedro Alves  <palves@redhat.com>
5708
5709         * linux-low.c (regset_disabled, disable_regset): New functions.
5710         (regsets_fetch_inferior_registers)
5711         (regsets_store_inferior_registers): Use them.
5712         (initialize_regsets_info); Don't allocate the disabled_regsets
5713         array here.
5714         * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
5715         comment.
5716
5717 2013-06-11  Pedro Alves  <palves@redhat.com>
5718
5719         * linux-low.c (initialize_regsets_info): Use xcalloc instead of
5720         xmalloc.
5721
5722 2013-06-11  Pedro Alves  <palves@redhat.com>
5723
5724         * linux-x86-low.c (initialize_low_arch): Call
5725         init_registers_x32_avx_linux.
5726
5727 2013-06-09  Jan Kratochvil  <jan.kratochvil@redhat.com>
5728
5729         Fix compatibility with Android Bionic.
5730         * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
5731         it is not empty.
5732
5733 2013-06-07  Pedro Alves  <palves@redhat.com>
5734
5735         PR server/14823
5736         * Makefile.in (OBS): Add tdesc.o.
5737         (IPA_OBJS): Add tdesc-ipa.o.
5738         (tdesc-ipa.o): New rule.
5739         * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
5740         interface.
5741         * linux-low.c (new_inferior): Delete.
5742         (disabled_regsets, num_regsets): Delete.
5743         (linux_add_process): Adjust to set the new per-process
5744         new_inferior flag.
5745         (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
5746         (linux_wait_for_lwp): Adjust.  Only call arch_setup if the event
5747         was a stop.  When calling arch_setup, switch the current inferior
5748         to the thread that got an event.
5749         (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
5750         (regsets_fetch_inferior_registers)
5751         (regsets_store_inferior_registers): New regsets_info parameter.
5752         Adjust to use it.
5753         (linux_register_in_regsets): New regs_info parameter.  Adjust to
5754         use it.
5755         (register_addr, fetch_register, store_register): New usrregs_info
5756         parameter.  Adjust to use it.
5757         (usr_fetch_inferior_registers, usr_store_inferior_registers): New
5758         parameter regs_info.  Adjust to use it.
5759         (linux_fetch_registers): Get the current inferior's regs_info, and
5760         adjust to use it.
5761         (linux_store_registers): Ditto.
5762         [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
5763         (initialize_low): Don't initialize the target_regsets here.  Call
5764         initialize_low_arch.
5765         * linux-low.h (target_regsets): Delete declaration.
5766         (struct regsets_info): New.
5767         (struct usrregs_info): New.
5768         (struct regs_info): New.
5769         (struct process_info_private) <new_inferior>: New field.
5770         (struct linux_target_ops): Delete the num_regs, regmap, and
5771         regset_bitmap fields.  New field regs_info.
5772         [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
5773         * i387-fp.c (num_xmm_registers): Delete.
5774         (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
5775         calls to new interface.
5776         (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
5777         (i387_xsave_to_cache): Adjust find_regno calls to new interface.
5778         Infer the number of xmm registers from the regcache's target
5779         description.
5780         * i387-fp.h (num_xmm_registers): Delete.
5781         * inferiors.c (add_thread): Don't install the thread's regcache
5782         here.
5783         * proc-service.c (gregset_info): Fetch the current inferior's
5784         regs_info.  Adjust to use it.
5785         * regcache.c: Include tdesc.h.
5786         (register_bytes, reg_defs, num_registers)
5787         (gdbserver_expedite_regs): Delete.
5788         (get_thread_regcache): If the thread doesn't have a regcache yet,
5789         create one, instead of aborting gdbserver.
5790         (regcache_invalidate_one): Rename to ...
5791         (regcache_invalidate_thread): ... this.
5792         (regcache_invalidate_one): New.
5793         (regcache_invalidate): Only invalidate registers of the current
5794         process.
5795         (init_register_cache): Add target_desc parameter, and use it.
5796         (new_register_cache): Ditto.  Assert the target description has a
5797         non zero registers_size.
5798         (regcache_cpy): Add assertions.  Adjust.
5799         (realloc_register_cache, set_register_cache): Delete.
5800         (registers_to_string, registers_from_string): Adjust.
5801         (find_register_by_name, find_regno, find_register_by_number)
5802         (register_cache_size): Add target_desc parameter, and use it.
5803         (free_register_cache_thread, free_register_cache_thread_one)
5804         (regcache_release, register_cache_size): New.
5805         (register_size): Add target_desc parameter, and use it.
5806         (register_data, supply_register, supply_register_zeroed)
5807         (supply_regblock, supply_register_by_name, collect_register)
5808         (collect_register_as_string, collect_register_by_name): Adjust.
5809         * regcache.h (struct target_desc): Forward declare.
5810         (struct regcache) <tdesc>: New field.
5811         (init_register_cache, new_register_cache): Add target_desc
5812         parameter.
5813         (regcache_invalidate_thread): Declare.
5814         (regcache_invalidate_one): Delete declaration.
5815         (regcache_release): Declare.
5816         (find_register_by_number, register_cache_size, register_size)
5817         (find_regno): Add target_desc parameter.
5818         (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
5819         declarations.
5820         * remote-utils.c: Include tdesc.h.
5821         (outreg, prepare_resume_reply): Adjust.
5822         * server.c: Include tdesc.h.
5823         (gdbserver_xmltarget): Delete declaration.
5824         (get_features_xml, process_serial_event): Adjust.
5825         * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
5826         declare.
5827         (struct process_info) <tdesc>: New field.
5828         (ipa_tdesc): Declare.
5829         * tdesc.c: New file.
5830         * tdesc.h: New file.
5831         * tracepoint.c: Include tdesc.h.
5832         [IN_PROCESS_AGENT] (ipa_tdesc): Define.
5833         (get_context_regcache): Adjust to pass ipa_tdesc down.
5834         (do_action_at_tracepoint): Adjust to get the register cache size
5835         from the context regcache's description.
5836         (traceframe_walk_blocks): Adjust to get the register cache size
5837         from the current trace frame's description.
5838         (traceframe_get_pc): Adjust to get current trace frame's
5839         description and pass it down.
5840         (gdb_collect): Adjust to get the register cache size from the
5841         IPA's description.
5842         * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
5843         (gdbserver_xmltarget): Delete.
5844         (initialize_low_tracepoint): Set the ipa's target description.
5845         * linux-i386-ipa.c (tdesc_i386_linux): Declare.
5846         (initialize_low_tracepoint): Set the ipa's target description.
5847         * linux-x86-low.c: Include tdesc.h.
5848         [__x86_64__] (is_64bit_tdesc): New.
5849         (ps_get_thread_area, x86_get_thread_area): Use it.
5850         (i386_cannot_store_register): Rename to ...
5851         (x86_cannot_store_register): ... this.  Use is_64bit_tdesc.
5852         (i386_cannot_fetch_register): Rename to ...
5853         (x86_cannot_fetch_register): ... this.  Use is_64bit_tdesc.
5854         (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
5855         to new interface.
5856         (target_regsets): Rename to ...
5857         (x86_regsets): ... this.
5858         (x86_get_pc, x86_set_pc): Adjust register_size calls to new
5859         interface.
5860         (x86_siginfo_fixup): Use is_64bit_tdesc.
5861         [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
5862         (tdesc_x32_avx_linux, tdesc_x32_linux)
5863         (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
5864         Declare.
5865         (x86_linux_update_xmltarget): Delete.
5866         (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
5867         (have_ptrace_getfpxregs, have_ptrace_getregset): New.
5868         (AMD64_LINUX_USER64_CS): New.
5869         (x86_linux_read_description): New, based on
5870         x86_linux_update_xmltarget.
5871         (same_process_callback): New.
5872         (x86_arch_setup_process_callback): New.
5873         (x86_linux_update_xmltarget): New.
5874         (x86_regsets_info): New.
5875         (amd64_linux_regs_info): New.
5876         (i386_linux_usrregs_info): New.
5877         (i386_linux_regs_info): New.
5878         (x86_linux_regs_info): New.
5879         (x86_arch_setup): Reimplement.
5880         (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
5881         (x86_emit_ops): Ditto.
5882         (the_low_target): Adjust.  Install x86_linux_regs_info,
5883         x86_cannot_fetch_register, and x86_cannot_store_register.
5884         (initialize_low_arch): New.
5885         * linux-ia64-low.c (tdesc_ia64): Declare.
5886         (ia64_fetch_register): Adjust.
5887         (ia64_usrregs_info, regs_info): New globals.
5888         (ia64_regs_info): New function.
5889         (the_low_target): Adjust.
5890         (initialize_low_arch): New function.
5891         * linux-sparc-low.c (tdesc_sparc64): Declare.
5892         (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
5893         Adjust.
5894         (sparc_arch_setup): New function.
5895         (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
5896         (the_low_target): Adjust.
5897         (initialize_low_arch): New function.
5898         * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
5899         (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
5900         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
5901         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
5902         (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
5903         (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
5904         (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
5905         (tdesc_powerpc_isa205_vsx64l): Declare.
5906         (ppc_cannot_store_register, ppc_collect_ptrace_register)
5907         (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
5908         (ppc_set_pc, ppc_get_hwcap): Adjust.
5909         (ppc_usrregs_info): Forward declare.
5910         (!__powerpc64__) ppc_regmap_adjusted: New global.
5911         (ppc_arch_setup): Adjust to the current process'es target
5912         description.
5913         (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
5914         (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
5915         (ppc_store_evrregset): Adjust.
5916         (target_regsets): Rename to ...
5917         (ppc_regsets): ... this, and make static.
5918         (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
5919         (ppc_regs_info): New function.
5920         (the_low_target): Adjust.
5921         (initialize_low_arch): New function.
5922         * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
5923         (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
5924         (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
5925         (tdesc_s390x_linux64v2): Declare.
5926         (s390_collect_ptrace_register, s390_supply_ptrace_register)
5927         (s390_fill_gregset, s390_store_last_break): Adjust.
5928         (target_regsets): Rename to ...
5929         (s390_regsets): ... this, and make static.
5930         (s390_get_pc, s390_set_pc): Adjust.
5931         (s390_get_hwcap): New target_desc parameter, and use it.
5932         [__s390x__] (have_hwcap_s390_high_gprs): New global.
5933         (s390_arch_setup): Adjust to set the current process'es target
5934         description.  Don't adjust the regmap.
5935         (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
5936         [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
5937         (regs_info_3264): New globals.
5938         (s390_regs_info): New function.
5939         (the_low_target): Adjust.
5940         (initialize_low_arch): New function.
5941         * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
5942         (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
5943         [__mips64] (init_registers_mips_linux)
5944         (init_registers_mips_dsp_linux): Delete defines.
5945         [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
5946         (have_dsp): New global.
5947         (mips_read_description): New, based on mips_arch_setup.
5948         (mips_arch_setup): Reimplement.
5949         (get_usrregs_info): New function.
5950         (mips_cannot_fetch_register, mips_cannot_store_register)
5951         (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
5952         (mips_fill_fpregset, mips_store_fpregset): Adjust.
5953         (target_regsets): Rename to ...
5954         (mips_regsets): ... this, and make static.
5955         (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
5956         (dsp_regs_info, regs_info): New globals.
5957         (mips_regs_info): New function.
5958         (the_low_target): Adjust.
5959         (initialize_low_arch): New function.
5960         * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
5961         (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
5962         Declare.
5963         (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
5964         (arm_read_description): New, with bits factored from
5965         arm_arch_setup.
5966         (arm_arch_setup): Reimplement.
5967         (target_regsets): Rename to ...
5968         (arm_regsets): ... this, and make static.
5969         (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
5970         (arm_regs_info): New function.
5971         (the_low_target): Adjust.
5972         (initialize_low_arch): New function.
5973         * linux-m68k-low.c (tdesc_m68k): Declare.
5974         (target_regsets): Rename to ...
5975         (m68k_regsets): ... this, and make static.
5976         (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
5977         (m68k_regs_info): New function.
5978         (m68k_arch_setup): New function.
5979         (the_low_target): Adjust.
5980         (initialize_low_arch): New function.
5981         * linux-sh-low.c (tdesc_sharch): Declare.
5982         (target_regsets): Rename to ...
5983         (sh_regsets): ... this, and make static.
5984         (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
5985         (sh_regs_info, sh_arch_setup): New functions.
5986         (the_low_target): Adjust.
5987         (initialize_low_arch): New function.
5988         * linux-bfin-low.c (tdesc_bfin): Declare.
5989         (bfin_arch_setup): New function.
5990         (bfin_usrregs_info, regs_info): New globals.
5991         (bfin_regs_info): New function.
5992         (the_low_target): Adjust.
5993         (initialize_low_arch): New function.
5994         * linux-cris-low.c (tdesc_cris): Declare.
5995         (cris_arch_setup): New function.
5996         (cris_usrregs_info, regs_info): New globals.
5997         (cris_regs_info): New function.
5998         (the_low_target): Adjust.
5999         (initialize_low_arch): New function.
6000         * linux-cris-low.c (tdesc_crisv32): Declare.
6001         (cris_arch_setup): New function.
6002         (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
6003         (cris_regs_info): New function.
6004         (the_low_target): Adjust.
6005         (initialize_low_arch): New function.
6006         * linux-m32r-low.c (tdesc_m32r): Declare.
6007         (m32r_arch_setup): New function.
6008         (m32r_usrregs_info, regs_info): New globals.
6009         (m32r_regs_info): Adjust.
6010         (initialize_low_arch): New function.
6011         * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
6012         (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
6013         (tic6x_usrregs_info): Forward declare.
6014         (tic6x_read_description): New function, based on ...
6015         (tic6x_arch_setup): ... this.  Reimplement.
6016         (target_regsets): Rename to ...
6017         (tic6x_regsets): ... this, and make static.
6018         (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
6019         (tic6x_regs_info): New function.
6020         (the_low_target): Adjust.
6021         (initialize_low_arch): New function.
6022         * linux-xtensa-low.c (tdesc_xtensa): Declare.
6023         (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
6024         (target_regsets): Rename to ...
6025         (xtensa_regsets): ... this, and make static.
6026         (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
6027         globals.
6028         (xtensa_arch_setup, xtensa_regs_info): New functions.
6029         (the_low_target): Adjust.
6030         (initialize_low_arch): New function.
6031         * linux-nios2-low.c (tdesc_nios2_linux): Declare.
6032         (nios2_arch_setup): Set the current process'es tdesc.
6033         (target_regsets): Rename to ...
6034         (nios2_regsets): ... this.
6035         (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
6036         (nios2_regs_info): New function.
6037         (the_low_target): Adjust.
6038         (initialize_low_arch): New function.
6039         * linux-aarch64-low.c (tdesc_aarch64): Declare.
6040         (aarch64_arch_setup): Set the current process'es tdesc.
6041         (target_regsets): Rename to ...
6042         (aarch64_regsets): ... this.
6043         (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
6044         (aarch64_regs_info): New function.
6045         (the_low_target): Adjust.
6046         (initialize_low_arch): New function.
6047         * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
6048         globals.
6049         (target_regsets): Rename to ...
6050         (tile_regsets): ... this.
6051         (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6052         (tile_regs_info): New function.
6053         (tile_arch_setup): Set the current process'es tdesc.
6054         (the_low_target): Adjust.
6055         (initialize_low_arch): New function.
6056         * spu-low.c (tdesc_spu): Declare.
6057         (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6058         * win32-arm-low.c (tdesc_arm): Declare.
6059         (arm_arch_setup): New function.
6060         (the_low_target): Install arm_arch_setup instead of
6061         init_registers_arm.
6062         * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6063         (init_windows_x86): Rename to ...
6064         (i386_arch_setup): ... this.  Set `win32_tdesc'.
6065         (the_low_target): Adjust.
6066         * win32-low.c (win32_tdesc): New global.
6067         (child_add_thread): Don't create the thread cache here.
6068         (do_initial_child_stuff): Set the new process'es tdesc.
6069         * win32-low.h (struct target_desc): Forward declare.
6070         (win32_tdesc): Declare.
6071         * lynx-i386-low.c (tdesc_i386): Declare global.
6072         (lynx_i386_arch_setup): Set `lynx_tdesc'.
6073         * lynx-low.c (lynx_tdesc): New global.
6074         (lynx_add_process): Set the new process'es tdesc.
6075         * lynx-low.h (struct target_desc): Forward declare.
6076         (lynx_tdesc): Declare global.
6077         * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
6078         (lynx_ppc_arch_setup): Set `lynx_tdesc'.
6079         * nto-low.c (nto_tdesc): New global.
6080         (do_attach): Set the new process'es tdesc.
6081         * nto-low.h (struct target_desc): Forward declare.
6082         (nto_tdesc): Declare.
6083         * nto-x86-low.c (tdesc_i386): Declare.
6084         (nto_x86_arch_setup): Set `nto_tdesc'.
6085
6086 2013-06-04  Gary Benson  <gbenson@redhat.com>
6087
6088         * server.c (handle_query): Add "augmented-libraries-svr4-read+"
6089         to qSupported response when appropriate.
6090         (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
6091         with nonzero-length annex.
6092         * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
6093         arguments supplied in annex.
6094
6095 2013-05-31  Doug Evans  <dje@google.com>
6096
6097         PR server/15594
6098         * linux-x86-low.c (ps_get_thread_area): Properly extend address to
6099         64 bits in 64-cross-32 environment.
6100
6101 2013-05-28  Pedro Alves  <palves@redhat.com>
6102
6103         * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
6104         (aarch64-without-fpu.c): Delete rule.
6105         * configure.srv (aarch64*-*-linux*): Remove references to
6106         aarch64-without-fpu.o and aarch64-without-fpu.xml.
6107         * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
6108         declaration.
6109
6110 2013-05-24  Pedro Alves  <palves@redhat.com>
6111
6112         * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
6113         instead of strchr/decode_address.  Error if the range isn't split
6114         with a ','.  Don't assume there's be a ':' in the action.
6115
6116 2013-05-23  Yao Qi  <yao@codesourcery.com>
6117             Pedro Alves  <palves@redhat.com>
6118
6119         * linux-low.c (lwp_in_step_range): New function.
6120         (linux_wait_1): If the thread was range stepping and stopped
6121         outside the stepping range, report the stop to GDB.  Otherwise,
6122         continue stepping.  Add range stepping debug output.
6123         (linux_set_resume_request): Copy the step range from the resume
6124         request to the lwp.
6125         (linux_supports_range_stepping): New.
6126         (linux_target_ops) <supports_range_stepping>: Set to
6127         linux_supports_range_stepping.
6128         * linux-low.h (struct linux_target_ops)
6129         <supports_range_stepping>: New field.
6130         (struct lwp_info) <step_range_start, step_range_end>: New fields.
6131         * linux-x86-low.c (x86_supports_range_stepping): New.
6132         (the_low_target) <supports_range_stepping>: Set to
6133         x86_supports_range_stepping.
6134         * server.c (handle_v_cont): Handle 'r' action.
6135         (handle_v_requests): Append ";r" if the target supports range
6136         stepping.
6137         * target.h (struct thread_resume) <step_range_start,
6138         step_range_end>: New fields.
6139         (struct target_ops) <supports_range_stepping>:
6140         New field.
6141         (target_supports_range_stepping): New macro.
6142
6143 2013-05-17  Joel Brobecker  <brobecker@adacore.com>
6144
6145         * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
6146         confusion in comment.
6147
6148 2013-05-17  Joel Brobecker  <brobecker@adacore.com>
6149
6150         * lynx-low.c (struct process_info_private): New type.
6151         (lynx_add_process): New function.
6152         (lynx_create_inferior, lynx_attach): Replace calls to
6153         add_process by calls to lynx_add_process.
6154         (lynx_resume): If PTID is null, then try using
6155         current_process()->private->last_wait_event_ptid.
6156         Add comments.
6157         (lynx_clear_inferiors): Delete.  The contents of that function
6158         has been inlined in lynx_mourn;
6159         (lynx_wait_1): Save the ptid in the process's private data.
6160         (lynx_mourn): Free the process' private data.  Replace call
6161         to lynx_clear_inferiors by call to clear_inferiors.
6162
6163 2013-05-17  Yao Qi  <yao@codesourcery.com>
6164
6165         * i386-low.c (i386_length_and_rw_bits): Move the comment to
6166         the right place.
6167
6168 2013-05-16  Luis Machado  <lgustavo@codesourcery.com>
6169
6170         * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
6171         PT_DATA_ADDR and PT_TEXT_END_ADDR.  Update comments.
6172         (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
6173         PT_TEXT_END_ADDR guards.  Update comments.
6174         (linux_target_op) <read_offsets>: Conditionally define to
6175         linux_read_offsets if the target is UCLIBC and if it defines
6176         PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
6177
6178 2013-05-06  Sandra Loosemore  <sandra@codesourcery.com>
6179             Andrew Jenner  <andrew@codesourcery.com>
6180
6181         * Makefile.in (SFILES): Add linux-nios2-low.c.
6182         (clean): Add action to delete nios2-linux.c.
6183         (nios2-linux.c): New rule.
6184         * configure.srv: Add nios2*-*-linux*.
6185         * linux-nios2-low.c: New.
6186
6187 2013-05-03  Hafiz Abid Qadeer  <abidh@codesourcery.com>
6188
6189         * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
6190
6191 2013-04-25  Hui Zhu  <hui@codesourcery.com>
6192
6193         PR gdb/15186
6194         * ax.c (ax_printf): Add fflush.
6195
6196 2013-04-22  Tom Tromey  <tromey@redhat.com>
6197
6198         * Makefile.in (SFILES): Add filestuff.c.
6199         (OBS): Add filestuff.o.
6200         (filestuff.o): New target.
6201         * config.in, configure: Rebuild.
6202         * configure.ac: Check for fdwalk, pipe2.
6203
6204 2013-04-17  Pedro Alves  <palves@redhat.com>
6205
6206         * configure.ac (USE_THREAD_DB): Delete variable.
6207         (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
6208         Don't AC_SUBST USE_THREAD_DB.
6209         * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
6210         * config.in, configure: Regenerate.
6211
6212 2013-04-16  Pedro Alves  <palves@redhat.com>
6213
6214         * linux-low.h (struct lwp_info) <thread_known>: Move under
6215         the USE_THREAD_DB #ifdef.
6216
6217 2013-04-16  Pedro Alves  <palves@redhat.com>
6218
6219         * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
6220         (linux-low.o): Delete rule.
6221         * linux-low.h: Always include "gdb_thread_db.h" instead of
6222         conditionally including thread_db.h.
6223         (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
6224         HAVE_THREAD_DB_H.
6225
6226 2013-04-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
6227
6228         * Makefile.in (install-only): Fix make install regression.
6229
6230 2013-04-05  Jan Kratochvil  <jan.kratochvil@redhat.com>
6231
6232         Convert man pages to texinfo, new gdbinit.5 texinfo page.
6233         * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
6234         installation.
6235         * gdbserver.1: Remove.
6236
6237 2013-03-22  Pedro Alves  <palves@redhat.com>
6238
6239         * linux-low.c (handle_extended_wait): Don't call
6240         linux_enable_event_reporting.
6241
6242 2013-03-15  Tony Theodore  <tonyt@logyst.com>
6243
6244         PR build/9098:
6245         * Makefile.in (SHELL): Use @SHELL@.
6246
6247 2013-03-14  Sergio Durigan Junior  <sergiodj@redhat.com>
6248
6249         * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
6250         compiler warning.
6251
6252 2013-03-13  Joel Brobecker  <brobecker@adacore.com>
6253
6254         * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
6255         Remove extraneous NULL element.
6256
6257 2013-03-13  Yao Qi  <yao@codesourcery.com>
6258
6259         * tracepoint.c (traceframe_read_tsv): Look for the last matched
6260         'V' block in trace frame.
6261
6262 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
6263
6264         * target.h (struct target_ops): Add btrace ops.
6265         (target_supports_btrace): New macro.
6266         (target_enable_btrace): New macro.
6267         (target_disable_btrace): New macro.
6268         (target_read_btrace): New macro.
6269         * gdbthread.h (struct thread_info): Add btrace field.
6270         * server.c: Include btrace-common.h.
6271         (handle_btrace_general_set): New function.
6272         (handle_btrace_enable): New function.
6273         (handle_btrace_disable): New function.
6274         (handle_general_set): Call handle_btrace_general_set.
6275         (handle_qxfer_btrace): New function.
6276         (struct qxfer qxfer_packets[]): Add btrace entry.
6277         * inferiors.c (remove_thread): Disable btrace.
6278         * linux-low: Include linux-btrace.h.
6279         (linux_low_enable_btrace): New function.
6280         (linux_low_read_btrace): New function.
6281         (linux_target_ops): Add btrace ops.
6282         * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
6283         Add srv_linux_btrace=yes.
6284         (x86_64-*-linux*): Add linux-btrace.o.
6285         Add srv_linux_btrace=yes.
6286         * configure.ac: Define HAVE_LINUX_BTRACE.
6287         * config.in: Regenerated.
6288         * configure: Regenerated.
6289
6290 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
6291
6292         * server.c (handle_qxfer): Preserve error message if -3 is
6293         returned.
6294         (qxfer): Document the -3 return value.
6295
6296 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
6297
6298         * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
6299         (linux_btrace_h): New variable.
6300         (linux-btrace.o): New rule.
6301
6302 2013-03-08  Stan Shebs  <stan@codesourcery.com>
6303             Hafiz Abid Qadeer  <abidh@codesourcery.com>
6304
6305         * tracepoint.c (trace_buffer_size): New global.
6306         (DEFAULT_TRACE_BUFFER_SIZE): New define.
6307         (init_trace_buffer): Change to one-argument function. Allocate
6308         trace buffer memory.
6309         (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
6310         handle QTBuffer:size packet.
6311         (cmd_bigqtbuffer_size): New function.
6312         (initialize_tracepoint): Call init_trace_buffer with
6313         DEFAULT_TRACE_BUFFER_SIZE.
6314         * server.c (handle_query): Add QTBuffer:size in the
6315         supported packets.
6316
6317 2013-03-07  Yao Qi  <yao@codesourcery.com>
6318
6319         * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
6320         (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
6321         of -1.
6322         (cmd_qtsp): Adjust condition.  Do post increment.
6323         Set cur_action and cur_step_action back to 0.
6324
6325 2013-03-07  Jeremy Bennett  <jeremy.bennett@embecosm.com>
6326
6327         PR server/15236
6328         * linux-low.c (linux_write_memory): Return early success if LEN is
6329         zero.
6330
6331 2013-03-05  Corinna Vinschen  <vinschen@redhat.de>
6332
6333         * configure.srv: Add x86_64-*-cygwin* as target.
6334
6335 2013-02-28  Tom Tromey  <tromey@redhat.com>
6336
6337         * configure.ac: Invoke AC_SYS_LARGEFILE.
6338         * configure, config.in: Rebuild.
6339
6340 2013-02-28  Corinna Vinschen  <vinschen@redhat.com>
6341
6342         * win32-low.c: Throughout, fix format strings and casts of
6343         printf-like functions to avoid type related warnings on all
6344         platforms.
6345         (get_child_debug_event): Print dwDebugEventCode as hex since
6346         that's how it's usually documented.
6347
6348 2013-02-28  Yao Qi  <yao@codesourcery.com>
6349
6350         * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
6351         pulongest.
6352
6353 2013-02-27  Jiong Wang  <jiwang@tilera.com>
6354
6355         * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
6356         (reg-tilegx32.c): New rule.
6357         * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
6358         * linux-tile-low.c (tile_arch_setup): New function.  Invoke
6359         different register info initializer according to elf class.
6360         (init_registers_tilgx32): New function.  The tilegx32 register info
6361         initializer.
6362         (tile_fill_gregset): Use "uint_reg_t" to represent register size.
6363         (tile_store_gregset): Likewise.
6364
6365 2013-02-27  Yao Qi  <yao@codesourcery.com>
6366
6367         * server.c (process_point_options): Print debug message when
6368         debug_threads is true.
6369
6370 2013-02-26  Yao Qi  <yao@codesourcery.com>
6371
6372         * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
6373
6374 2013-02-19  Pedro Alves  <palves@redhat.com>
6375             Kai Tietz <ktietz@redhat.com>
6376
6377         PR gdb/15161
6378
6379         * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
6380         instead of strtoul to extract address from packet.
6381         (process_serial_event) <'z'>: Likewise.
6382
6383 2013-02-18  Yao Qi  <yao@codesourcery.com>
6384
6385         * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
6386
6387 2013-02-14  Pedro Alves  <palves@redhat.com>
6388
6389         Plug memory leak.
6390
6391         * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
6392         TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
6393
6394 2013-02-14  Pedro Alves  <palves@redhat.com>
6395
6396         * tracepoint.c (cmd_qtdpsrc): Use savestring.
6397
6398 2013-02-14  Pedro Alves  <palves@redhat.com>
6399
6400         * tracepoint.c (save_string): Delete.
6401         (add_tracepoint_action): Use savestring instead of save_string.
6402
6403 2013-02-12  Pedro Alves  <palves@redhat.com>
6404
6405         * linux-xtensa-low.c: Ditto.
6406         * xtensa-xtregs.c: Ditto.
6407
6408 2013-02-12  Sanimir Agovic  <sanimir.agovic@intel.com>
6409
6410         * thread-db.c (thread_db_get_tls_address): NULL pointer check
6411         thread_db.
6412
6413 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
6414
6415         * linux-aarch64-low.c (aarch64_arch_setup): Clamp
6416         aarch64_num_wp_regs and aarch64_num_bp_regs to
6417         AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
6418
6419 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
6420
6421         * linux-aarch64-low.c (ps_get_thread_area): Replace
6422         PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
6423
6424 2013-02-04  Jim MacArthur  <jim.macarthur@arm.com>
6425             Marcus Shawcroft  <marcus.shawcroft@arm.com>
6426             Nigel Stephens  <nigel.stephens@arm.com>
6427             Yufeng Zhang  <yufeng.zhang@arm.com>
6428
6429         * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
6430         (aarch64.c, aarch64-without-fpu.c): New targets.
6431         * configure.srv (aarch64*-*-linux*): New.
6432         * linux-aarch64-low.c: New file.
6433
6434 2013-02-04  Marcus Shawcroft  <marcus.shawcroft@arm.com>
6435
6436         * linux-low.c (handle_extended_wait, linux_create_inferior)
6437         (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
6438         (dequeue_one_deferred_signal, linux_resume_one_thread)
6439         (fetch_register, linux_write_memory, linux_enable_event_reporting)
6440         (linux_tracefork_grandchild, linux_test_for_tracefork)
6441         (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
6442         PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
6443         where the argument is 0.
6444
6445 2013-01-25  Yao Qi  <yao@codesourcery.com>
6446
6447         * event-loop.c: Include "queue.h".
6448         (gdb_event_p): New typedef.
6449         (struct gdb_event) <next_event>: Remove.
6450         (event_queue): Change to QUEUE(gdb_event_p).
6451         (async_queue_event): Remove.
6452         (gdb_event_xfree): New.
6453         (initialize_event_loop): New.
6454         (process_event): Use API from QUEUE.
6455         (wait_for_event): Likewise.
6456         * server.c (main): Call initialize_event_loop.
6457         * server.h (initialize_event_loop): Declare.
6458
6459 2013-01-18  Yao Qi  <yao@codesourcery.com>
6460
6461         * ax.h (struct eval_agent_expr_context): New.
6462         (gdb_eval_agent_expr): Update declaration.
6463         * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
6464         TFRAME.  Add new argument CTX.
6465         * server.h (struct eval_agent_expr_context): Declare.
6466         (agent_mem_read, agent_tsv_read): Update declaration.
6467         (agent_mem_read_string): Likewise.
6468         * tracepoint.c (eval_tracepoint_agent_expr): Remove.
6469         (add_traceframe_block): Add new argument TPOINT.
6470         Increase TPOINT->traceframe_usage.
6471         (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
6472         eval_tracepoint_agent_expr.
6473         (condition_true_at_tracepoint): Likewise.
6474         (agent_mem_read): Remove argument TFRAME.  Add argument CTX.
6475         (agent_mem_read_string, agent_tsv_read): Likewise.
6476
6477 2013-01-16  Yao Qi  <yao@codesourcery.com>
6478
6479         * linux-low.c (linux_resume_one_lwp): Don't check
6480         'lwp->bp_reinsert != 0'.
6481
6482 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
6483             Pedro Alves  <palves@redhat.com>
6484
6485         * lynx-low.c (ptrace_request_to_str): Define a temporary
6486         macro and use it to simplify this function's implementation.
6487
6488 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
6489
6490         * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
6491         sets errno.
6492
6493 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
6494
6495         * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
6496
6497 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
6498
6499         * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
6500
6501 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
6502
6503         * lynx-low.c (lynx_resume): Use the resume_info parameter
6504         to determine the ptid for the lynx_ptrace call, unless
6505         it is equal to minus_one_ptid, in which case we use the
6506         ptid of the current_inferior.
6507         (lynx_wait_1): After having received a thread create/exit
6508         event, resume the inferior's execution using the signaling
6509         thread's ptid, rather than the old ptid.
6510
6511 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
6512
6513         * lynx-low.c (lynx_resume): Delete variable ret.
6514
6515 2013-01-01  Joel Brobecker  <brobecker@adacore.com>
6516
6517         * gdbreplay.c (gdbreplay_version): Update copyright year.
6518         * server.c (gdbserver_version): Likewise.
6519
6520 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
6521
6522         * lynx-low.c (lynx_wait_1): Add debug trace before adding
6523         new thread.
6524
6525 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
6526
6527         * lynx-low.c (ptrace_request_to_str): Add handling for
6528         PTRACE_GETTRACESIG.
6529
6530 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
6531
6532         * lynx-low.c (lynx_attach): Delete variable new_process.
6533
6534 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
6535
6536         * lynx-low.c (lynx_create_inferior): Delete variable
6537         new_process.
6538
6539 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
6540
6541         * lynx-low.c (ptrace_request_to_str): Do not handle
6542         PTRACE_GETTHREADLIST if this macro does not exist.
6543
6544 2012-12-15  Yao Qi  <yao@codesourcery.com>
6545
6546         * Makefile.in (OBS): Add notif.o.
6547         * notif.c, notif.h: New.
6548         * server.c: Include "notif.h".
6549         (struct vstop_notif) <next>: Remove.
6550         <base>: New field.
6551         (queue_stop_reply): Update.
6552         (push_event, send_next_stop_reply): Remove.
6553         (discard_queued_stop_replies): Update.
6554         (notif_stop): New variable.
6555         (handle_v_stopped): Remove.
6556         (handle_v_requests): Don't call handle_v_stopped.  Call
6557         handle_ack_notif instead.
6558         (queue_stop_reply_callback): Call notif_event_enque instead
6559         of queue_stop_reply.
6560         (handle_status): Don't call send_next_stop_reply, call
6561         notif_write_event instead.
6562         (kill_inferior_callback): Likewise.
6563         (detach_or_kill_inferior_callback): Likewise.
6564         (main): Call initialize_notif.
6565         (process_serial_event): Call QUEUE_is_empty.
6566         (handle_target_event): Call notif_push instead of push event.
6567         * server.h (push_event): Remove declaration.
6568
6569 2012-12-10  Tom Tromey  <tromey@redhat.com>
6570
6571         * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
6572         (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
6573         macros.
6574         (.c.o): Rewrite.
6575         (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
6576         (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
6577         (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
6578         (amd64-linux-ipa.o, ax.o): Rewrite.
6579         (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
6580         (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
6581         (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
6582         (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
6583         (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
6584         (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
6585         (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
6586         (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
6587         (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
6588         (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
6589         (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
6590         (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
6591         (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
6592         (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
6593         (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
6594         (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
6595         (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
6596         (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
6597         (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
6598         (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
6599         (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
6600         (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
6601         (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
6602         (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
6603         (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
6604         (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
6605         (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
6606         (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
6607         (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
6608         (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
6609         (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
6610         (reg-tilegx.o): Remove.
6611         (all_object_files): New macro.
6612         Include .deps files.
6613         * aclocal.m4, configure: Rebuild.
6614         * acinclude.m4: Include depstand.m4, lead-dot.m4.
6615         * configure.ac: Invoke ZW_CREATE_DEPDIR,
6616         ZW_PROG_COMPILER_DEPENDENCIES.  Compute GMAKE condition.
6617
6618 2012-12-05  Tom Tromey  <tromey@redhat.com>
6619
6620         PR gdb/14917:
6621         * server.h (current_insn_ptr, emit_error): Declare 'extern'.
6622
6623 2012-11-28  Markus Metzger  <markus.t.metzger@intel.com>
6624
6625         * configure.ac: Check for linux/perf_event.h.
6626         * config.in: Regenerated.
6627         * configure: Regenerated.
6628
6629 2012-11-26  Maxime Villard  <rustyBSD@gmx.fr>
6630
6631         * hostio.c (handle_readlink): Decrease buffer size
6632         parameter passed to readlink by one byte.
6633
6634 2012-11-26  Yao Qi  <yao@codesourcery.com>
6635
6636         * configure.ac (build_warnings): Append '-Wempty-body'.
6637         * configure: Regenerated.
6638         * linux-low.c (linux_create_inferior): Use braces for empty 'if'
6639         body.
6640
6641 2012-11-15  Pierre Muller  <muller@sourceware.org>
6642
6643         * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
6644         * config.in: Regenerate.
6645         * configure: Regenerate.
6646         * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
6647         Use "gdb_wait.h" header instead of <sys/wait.h> header.
6648         * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6649         * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
6650         header.
6651         * server.c: Remove HAVE_WAIT_H conditional.  Use "gdb_wait.h" header
6652         instead of <sys/wait.h> header.
6653         * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6654
6655 2012-11-13 Markus Metzger  <markus.t.metzger@intel.com>
6656
6657         * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
6658         (various make rules): Remove -DGDBSERVER
6659
6660 2012-11-09  Yao Qi  <yao@codesourcery.com>
6661
6662         * spu-low.c (current_ptid): Move it to ..
6663         * gdbthread.h: ... here.  New.
6664         * remote-utils.c (read_ptid): Use macro 'current_ptid'.
6665         * server.c (myresume, process_serial_event): Likewise.
6666         * thread-db.c (thread_db_find_new_threads): Likewise.
6667         * tracepoint.c (run_inferior_command): Likewise.
6668
6669 2012-10-01  Andrew Burgess  <aburgess@broadcom.com>
6670
6671         * server.c (handle_search_memory_1): Include access length in
6672         warning message.
6673
6674 2012-09-05  Michael Brandt  <michael.brandt@axis.com>
6675
6676         * linux-crisv32-low.c: Fix compile errors.
6677
6678 2012-09-04  Yao Qi  <yao@codesourcery.com>
6679
6680         * tracepoint.c (cmd_qtsv): Adjust debug message.
6681         Don't check CUR_TPOINT.
6682
6683 2012-08-28  Yao Qi  <yao@codesourcery.com>
6684
6685         * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
6686         * server.h: Include 'libiberty.h' and 'ansidecl.h'.
6687         (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
6688         Remove declarations of xmalloc, xreallloc, xstrdup and
6689         freeargv.
6690         * Makefile.in (libiberty_h): New.
6691         (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
6692         (linux-bfin-low.o): Append dependency 'libiberty.h'.
6693
6694 2012-08-23  Yao Qi  <yao@codesourcery.com>
6695
6696         * server.h: Remove declaration of 'xsnprintf'.
6697
6698 2012-08-22  Keith Seitz  <keiths@redhat.com>
6699
6700         * server.h: Include build-gnulib-gbserver/config.h.
6701         * gdbreplay.c: Likewise.
6702
6703 2012-08-08  Doug Evans  <dje@google.com>
6704
6705         * Makefile.in (SFILES): Add gdb_vecs.c.
6706         (OBS): Add gdb_vecs.o.
6707         (gdb_vecs_h, host_defs_h): New variables.
6708         (thread-db.o): Add $(gdb_vecs_h) dependency.
6709         (gdb_vecs.o): New rule.
6710         * thread-db.c: #include "gdb_vecs.h".
6711         (thread_db_load_search): Use a vector to iterate over path elements.
6712         Handle text appearing after "$pdir".
6713
6714         * configure.ac: Add check for strstr.
6715         * config.in: Regenerate.
6716         * configure: Regenerate.
6717
6718 2012-08-02  Ulrich Weigand  <ulrich.weigand@linaro.org>
6719
6720         * hostio.c (handle_pread): If pread fails, fall back to attempting
6721         lseek/read.
6722         (handle_pwrite): Likewise for pwrite.
6723
6724 2012-08-01  Ulrich Weigand  <ulrich.weigand@linaro.org>
6725
6726         * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
6727         between unsupported TYPE and unimplementable ADDR/LEN combination.
6728         (arm_insert_point): Act on new return value.
6729
6730 2012-07-31  Pedro Alves  <palves@redhat.com>
6731
6732         * server.c (process_point_options): Only skip tokens if we find
6733         one that is unrecognized.  Don't treat 'X' specially while
6734         skipping unrecognized tokens.
6735
6736 2012-07-30  Ulrich Weigand  <ulrich.weigand@linaro.org>
6737
6738         * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
6739         to 4-byte-align HW breakpoint addresses for Thumb.
6740
6741 2012-07-27  Yao Qi  <yao@codesourcery.com>
6742
6743         PR remote/14161.
6744
6745         * server.h: Declare gdb_agent_about_to_close.
6746         * target.c (kill_inferior): Include "agent.h".
6747         New.  Send command 'kill'.
6748         * target.h (kill_inferior): Removed macro.
6749         * tracepoint.c (gdb_agent_about_to_close): New.
6750         (gdb_agent_helper_thread): Handle command 'close'.
6751         Wait endlessly until the inferior stops.
6752         Install gdb_agent_remove_socket to atexit hook.
6753         (agent_socket_name): New static variable.
6754         (gdb_agent_socket_init): Replace local variable 'name' with
6755         'agent_socket_name'.
6756         (gdb_agent_remove_socket): New.
6757
6758 2012-07-27  Yao Qi  <yao@codesourcery.com>
6759
6760         * server.c (process_point_options): Stop at 'X' when parsing.
6761
6762 2012-07-19  Michael Eager  <eager@eagercon.com>
6763
6764         * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
6765         to hw_execute.
6766         * linux-x86-low.c (x86_insert_point, x86_remove_point):
6767         Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
6768         hardware breakpoint.
6769
6770 2012-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
6771
6772         * gdbserver/linux-low.c (initialize_low): Call
6773         linux_ptrace_init_warnings.
6774
6775 2012-07-02  Doug Evans  <dje@google.com>
6776
6777         * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
6778         pointer to int.
6779
6780 2012-07-02  Stan Shebs  <stan@codesourcery.com>
6781
6782         * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
6783         (ax.o): Add it to build rule.
6784         (ax-ipa.o): Ditto.
6785         (OBS): Add format.o.
6786         (IPA_OBS): Add format.o.
6787         * server.c (handle_query): Claim support for breakpoint commands.
6788         (process_point_options): Add command case.
6789         (process_serial_event): Leave running if there are printfs in
6790         effect.
6791         * mem-break.h (any_persistent_commands): Declare.
6792         (add_breakpoint_commands): Declare.
6793         (gdb_no_commands_at_breakpoint): Declare.
6794         (run_breakpoint_commands): Declare.
6795         * mem-break.c (struct point_command_list): New struct.
6796         (struct breakpoint): New field command_list.
6797         (any_persistent_commands): New function.
6798         (add_commands_to_breakpoint): New function.
6799         (add_breakpoint_commands): New function.
6800         (gdb_no_commands_at_breakpoint): New function.
6801         (run_breakpoint_commands): New function.
6802         * linux-low.c (linux_wait_1): Test for and run breakpoint commands
6803         locally.
6804         * ax.c: Include format.h.
6805         (ax_printf): New function.
6806         (gdb_eval_agent_expr): Add printf opcode.
6807
6808 2012-06-13  Yao Qi  <yao@codesourcery.com>
6809
6810         * server.c (start_inferior): Remove duplicated writes to fields
6811         'last_resume_kind' and 'last_status' of 'current_inferior'.
6812
6813 2012-06-12  Yao Qi  <yao@codesourcery.com>
6814             Pedro Alves  <palves@redhat.com>
6815
6816         * linux-low.c (linux_set_resume_request): Simplify predicate.  Add
6817         comment.
6818         * server.c (handle_v_cont): Extend comment.
6819
6820 2012-06-11  Yao Qi  <yao@codesourcery.com>
6821
6822         * linux-low.c (linux_attach): Add 'static'.
6823
6824 2012-06-06  Yao Qi  <yao@codesourcery.com>
6825
6826         * ax.c (gdb_eval_agent_expr): Print `top' in hex.
6827
6828 2012-06-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
6829
6830         Fix gcc -flto compilation warning.
6831         * server.c (main): Make variable multi_mode and attach volatile.
6832
6833 2012-05-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
6834
6835         * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
6836         if the platform doesn't know about it.
6837
6838 2012-05-30  Jeff Kenton  <jkenton@tilera.com>
6839
6840         * Makefile.in (SFILES): Add linux-tile-low.c.
6841         (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
6842         * configure.srv: Handle tilegx-*-linux*.
6843         * linux-tile-low.c: New file.
6844
6845 2012-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
6846
6847         * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
6848
6849 2012-05-24  Pedro Alves  <palves@redhat.com>
6850
6851         PR gdb/7205
6852
6853         Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
6854
6855 2012-05-24  Pedro Alves  <palves@redhat.com>
6856
6857         PR gdb/7205
6858
6859         Replace target_signal with gdb_signal throughout.
6860
6861 2012-05-22  Maciej W. Rozycki  <macro@codesourcery.com>
6862
6863         * linux-low.c (linux_store_registers): Avoid the copying sequence
6864         when no data has been retrieved by ptrace.
6865
6866 2012-05-22  Will Deacon  <will.deacon@arm.com>
6867
6868         * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
6869         Include asm/ptrace.h.
6870         (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
6871         already defined.
6872
6873 2012-05-21  Maciej W. Rozycki  <macro@codesourcery.com>
6874
6875         * linux-low.c (linux_store_registers): Don't re-retrieve data
6876         with ptrace that has already been obtained from /proc.  Always
6877         copy any data retrieved with ptrace to the buffer supplied.
6878
6879 2012-05-11  Yao Qi  <yao@codesourcery.com>
6880             Pedro Alves  <palves@redhat.com>
6881
6882         * linux-low.c (enum stopping_threads_kind): New.
6883         (stopping_threads): Change type to `enum stopping_threads_kind'.
6884         (handle_extended_wait): If stopping and suspending threads, leave
6885         the new_lwp suspended too.
6886         (linux_wait_for_event): Adjust.
6887         (stop_all_lwps): Set `stopping_threads' to
6888         STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
6889         whether we're suspending threads or just stopping them.  Assert no
6890         recursion happens.
6891
6892 2012-04-29  Yao Qi  <yao@codesourcery.com>
6893
6894         * server.h: Move some code to ...
6895         * gdbthread.h: ... here.  New.
6896         * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
6897         (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
6898         (nto-low.o, win32-low.o): Likewise.
6899         * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
6900         * regcache.c, remote-utils.c, server.c: Likewise.
6901         * target.c, tracepoint.c, win32-low.c: Likewise.
6902
6903 2012-04-24  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
6904
6905         * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
6906         (PTRACE_ARG4_TYPE): Likewise.
6907         (PTRACE_XFER_TYPE): Likewise.
6908         * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
6909         ptrace to PTRACE_ARG3_TYPE.
6910         * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
6911         (PTRACE_ARG4_TYPE): Likewise.
6912         (PTRACE_XFER_TYPE): Likewise.
6913         (linux_detach_one_lwp): Cast fourth argument of
6914         ptrace to long then PTRACE_ARG4_TYPE.
6915         (regsets_fetch_inferior_registers): Cast third argument of
6916         ptrace to long then PTRACE_ARG3_TYPE.
6917         (regsets_store_inferior_registers): Likewise.
6918
6919 2012-04-20  Pedro Alves  <palves@redhat.com>
6920
6921         * configure: Regenerate.
6922
6923 2012-04-19  Pedro Alves  <palves@redhat.com>
6924
6925         * Makefile.in (GNULIB_BUILDDIR): New.
6926         (LIBGNU, INCGNU, GNULIB_H): Adjust.
6927         (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
6928         (all, install-only, uninstall, clean-info, all-lib, clean): No
6929         longer pass GNULIB_FLAGS_TO_PASS.  Use subdir_do.
6930         (maintainer-clean realclean distclean): Use subdir_do.
6931         (subdir_do): New.
6932         (gnulib/import/Makefile): Adjust.  Replace gnulib/import with
6933         $(GNULIB_BUILDDIR).  Don't pass argument to config.status.
6934         * acinclude.m4: Include acx_configure_dir.m4.
6935         * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
6936         calls.  Call AC_PROG_RANLIB.  Configure gnulib using
6937         ACX_CONFIGURE_DIR.
6938         (GNULIB): New.
6939         (GNULIB_STDINT_H): Adjust.
6940         (AC_OUTPUT): Don't output gnulib/Makefile anymore.
6941         * gdbreplay.c: Include build-gnulib/config.h.
6942         * server.h: Likewise.
6943         * aclocal.m4: Regenerate.
6944         * config.in: Regenerate.
6945         * configure: Regenerate.
6946
6947 2012-04-19  Pedro Alves  <palves@redhat.com>
6948
6949         * Makefile.in (LIBGNU, INCGNU): Adjust.
6950         (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
6951         (all, install-only, uninstall, clean-info, all-lib, clean)
6952         (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
6953         * configure.ac: Adjust AC_OUTPUT output.
6954         * aclocal.m4: Regenerate.
6955         * configure: Regenerate.
6956
6957 2012-04-19  Pedro Alves  <palves@redhat.com>
6958
6959         * Makefile.in (generated_files): New.
6960         (server_h): Remove the explicit dependency on config.h, and depend
6961         on $generated_files.
6962
6963 2012-04-19  Pedro Alves  <palves@redhat.com>
6964
6965         * Makefile.in (INCGNU): Add -Ignulib.
6966
6967 2012-04-19  Pedro Alves  <palves@redhat.com>
6968
6969         * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
6970         (INCGNU): ... this, and spell out -I here.
6971         (GNULIB_LIB): Rename to ...
6972         (LIBGNU): ... this.
6973         (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
6974
6975 2012-04-19  Pedro Alves  <palves@redhat.com>
6976
6977         * config.in: Regenerate.
6978
6979 2012-04-19  Pedro Alves  <palves@redhat.com>
6980
6981         * configure.ac: Remove AC_CHECK_DECLS check for memmem.
6982         * server.h (memmem): Remove declaration.
6983         * config.in: Regenerate.
6984         * configure: Regenerate.
6985
6986 2012-04-19  Yao Qi  <yao@codesourcery.com>
6987
6988         * Makefile.in (SFILES): Add common/vec.c.
6989         (OBS): Add vec.o.
6990         (vec.o): New rule.
6991
6992 2012-04-19  Yao Qi  <yao@codesourcery.com>
6993
6994         * remote-utils.c (prepare_resume_reply): Replace with macro
6995         target_core_of_thread.
6996         * server.c (handle_qxfer_threads_proper): Likewise.
6997         * target.h (traget_core_of_thread): New macro.
6998
6999 2012-04-18  Pedro Alves  <palves@redhat.com>
7000
7001         * aclocal.m4: Regenerate.
7002         * configure: Regenerate.
7003
7004 2012-04-16  Yao Qi  <yao@codesourcery.com>
7005
7006         * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
7007         duplicated on address.
7008
7009 2012-04-16  Yao Qi  <yao@codesourcery.com>
7010
7011         * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
7012         (struct tracepoint_action_ops) <send>: New field.
7013         (m_tracepoint_action_send, r_tracepoint_action_send): New.
7014         (agent_expr_send, x_tracepoint_action_send): New.
7015         (l_tracepoint_action_send): New.
7016         (cmd_qtdp): Download and install tracepoint
7017         according to `use_agent'.
7018         (run_inferior_command): Add one more parameter `len'.
7019         Update callers.
7020         (tracepoint_send_agent): New.
7021         (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
7022
7023 2012-04-16  Yao Qi  <yao@codesourcery.com>
7024
7025         * tracepoint.c (download_tracepoints): Moved to ...
7026         (cmd_qtstart): ... here.
7027
7028 2012-04-14  Yao Qi  <yao@codesourcery.com>
7029
7030         * tracepoint.c: Include inttypes.h.
7031         (struct collect_memory_action): Use sized types.
7032         (struct tracepoint): Likewise.
7033         (cmd_qtdp, stop_tracing): Update print specifiers.
7034         (cmd_qtp, response_tracepoint): Likewise.
7035         (collect_data_at_tracepoint): Likewise.
7036         (collect_data_at_step): Likewise.
7037
7038 2012-04-14  Yao Qi  <yao@codesourcery.com>
7039
7040         Import gnulib module inttypes.
7041         * aclocal.m4, config.in, configure: Regenerated.
7042
7043 2012-04-14  Yao Qi  <yao@codesourcery.com>
7044
7045         * Makefile.in (maintainer-clean, realclean, distclean): Remove
7046         Makefile and config.status at last.
7047
7048 2012-04-13  Yao Qi  <yao@codesourcery.com>
7049
7050         * tracepoint.c: Include stdint.h unconditionally.
7051
7052 2012-04-13  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
7053
7054         * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7055         on BFD_HAVE_SYS_PROCFS_TYPE.
7056         * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7057         * configure: Regenerate.
7058         * config.in: Likewise.
7059
7060 2012-04-13  H.J. Lu  <hongjiu.lu@intel.com>
7061
7062         * Makefile.in (clean): Also remove x32.c x32-linux.c
7063         x32-avx.c x32-avx-linux.c.
7064         (x32.o): New target.
7065         (x32.c): Likewise.
7066         (x32-linux.o): Likewise.
7067         (x32-linux.c): Likewise.
7068         (x32-avx.o): Likewise.
7069         (x32-avx.c): Likewise.
7070         (x32-avx-linux.o): Likewise.
7071         (x32-avx-linux.c): Likewise.
7072
7073         * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
7074         (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
7075         (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7076         (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7077         (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
7078         i386/x32-avx-linux.xml.
7079
7080         * linux-x86-low.c (init_registers_x32_linux): New prototype.
7081         (init_registers_x32_avx_linux): Likwise.
7082         (x86_linux_update_xmltarget): Call init_registers_x32_linux
7083         or init_registers_x32_avx_linux if linux_is_elf64 is false.
7084
7085 2012-04-13  Pedro Alves  <palves@redhat.com>
7086
7087         * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
7088         (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
7089         (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
7090         (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
7091         the sub-make.
7092
7093 2012-04-12  H.J. Lu  <hongjiu.lu@intel.com>
7094
7095         * linux-x86-low.c (compat_x32_clock_t): New.
7096         (compat_x32_siginfo_t): Likewise.
7097         (compat_x32_siginfo_from_siginfo): Likewise.
7098         (siginfo_from_compat_x32_siginfo): Likewise.
7099         (linux_is_elf64): Likewise.
7100         (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
7101         and siginfo_from_compat_x32_siginfo for x32.
7102         (x86_arch_setup): Set linux_is_elf64.
7103
7104 2012-04-12  H.J. Lu  <hongjiu.lu@intel.com>
7105
7106         PR gdb/13969
7107         * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
7108         e_machine field.
7109         (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
7110         * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
7111         * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
7112         compatible with process.
7113
7114 2012-04-12  Yao Qi  <yao@codesourcery.com>
7115
7116         * Makefile.in: Define abs_top_srcdir and abs_srcdir.
7117         (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
7118         (install-only, install-info, clean): Handle sub dir gnulib.
7119         (all-lib, am--refresh): New targets.
7120         (memmem.o): Remove target.
7121         * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
7122         Invoke gl_EARLY.  Invoke AC_CHECK_PROGS for make.
7123         (AC_REPLACE_FUNCS): Remove memmem.
7124         Invoke gl_INIT and AM_INIT_AUTOMAKE.
7125         (AC_OUTPUT): Generate Makefile in gnulib/.
7126         * aclocal.m4, config.in, configure: Regenerated.
7127
7128 2012-04-10  Maciej W. Rozycki  <macro@codesourcery.com>
7129
7130         * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
7131
7132 2012-04-05  Pedro Alves  <palves@redhat.com>
7133
7134         -Werror=strict-aliasing
7135
7136         * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
7137         pointer.
7138
7139 2012-04-04  Pedro Alves  <palves@redhat.com>
7140
7141         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7142         (sparc_store_gregset_from_stack, sparc_store_gregset)
7143         (sparc_breakpoint_at): Fix formatting.
7144
7145 2012-03-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
7146
7147         * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
7148         are available.
7149         * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
7150         [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
7151         * config.in: Regenerate.
7152         * configure: Likewise.
7153
7154 2012-03-29  Pedro Alves  <palves@redhat.com>
7155
7156         * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
7157         Correct ptrace arguments.
7158
7159 2012-03-28  Pedro Alves  <palves@redhat.com>
7160
7161         * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
7162         (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
7163         (IA64_FR1_REGNUM): New defines.
7164         (ia64_fetch_register): New.
7165         (the_low_target): Install it.
7166         * linux-low.h (struct linux_target_ops) <fetch_register>: New
7167         field.
7168         * linux-low.c (linux_fetch_registers): Try the
7169         the_low_target.fetch_register hook first.
7170
7171         * linux-arm-low.c (the_low_target): Adjust.
7172         * linux-bfin-low.c (the_low_target): Adjust.
7173         * linux-cris-low.c (the_low_target): Adjust.
7174         * linux-crisv32-low.c (the_low_target): Adjust.
7175         * linux-m32r-low.c (the_low_target): Adjust.
7176         * linux-m68k-low.c (the_low_target): Adjust.
7177         * linux-mips-low.c (the_low_target): Adjust.
7178         * linux-ppc-low.c (the_low_target): Adjust.
7179         * linux-s390-low.c (the_low_target): Adjust.
7180         * linux-sh-low.c (the_low_target): Adjust.
7181         * linux-sparc-low.c (the_low_target): Adjust.
7182         * linux-tic6x-low.c (the_low_target): Adjust.
7183         * linux-x86-low.c (the_low_target): Adjust.
7184         * linux-xtensa-low.c (the_low_target): Adjust.
7185
7186 2012-03-26  Pedro Alves  <palves@redhat.com>
7187
7188         * server.c (handle_qxfer_libraries): Don't bail early if
7189         the_target->qxfer_libraries_svr4 is not NULL.
7190
7191 2012-03-26  Pedro Alves  <palves@redhat.com>
7192
7193         * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
7194
7195 2012-03-23  Pedro Alves  <palves@redhat.com>
7196
7197         * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
7198         "library-list-svr4" element's start tag when the the DSO list is
7199         empty.
7200
7201 2012-03-23  Pedro Alves  <palves@redhat.com>
7202
7203         * linux-low.c (read_one_ptr): Read the inferior's pointer through
7204         a variable whose type size is the same as the inferior's pointer
7205         size.
7206
7207 2012-03-21  Thomas Schwinge  <thomas@codesourcery.com>
7208
7209         * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
7210         struct siginfo.
7211         * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
7212         * linux-x86-low.c (x86_siginfo_fixup): Likewise.
7213         * linux-low.h: Include <signal.h>.
7214         (struct siginfo): Remove forward declaration.
7215         (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
7216         struct siginfo.
7217
7218 2012-03-21  Mike Frysinger  <vapier@gentoo.org>
7219
7220         * .gitignore: Ignore more files.
7221
7222 2012-03-19  Pedro Alves  <palves@redhat.com>
7223             Jan Kratochvil  <jan.kratochvil@redhat.com>
7224
7225         * server.c (cont_thread, general_thread): Add describing comments.
7226         (start_inferior): Clear `cont_thread'.
7227         (handle_v_cont): Don't set `cont_thread' if resuming all threads
7228         of a process.
7229
7230 2012-03-15  Yao Qi  <yao@codesourcery.com>
7231
7232         * tracepoint.c (install_tracepoint): Move duplicated tracepoint
7233         handling to ...
7234         (cmd_qtdp): ... here.
7235
7236 2012-03-15  Yao Qi  <yao@codesourcery.com>
7237
7238         * tracepoint.c (struct tracepoint_action_ops): New.
7239         (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
7240         (m_tracepoint_action_download): New.
7241         (r_tracepoint_action_download): New.
7242         (x_tracepoint_action_download): New.
7243         (l_tracepoint_action_download): New.
7244         (add_tracepoint_action): Install `action->ops' according type.
7245         (download_tracepoint_1): Move code `download' function pointer
7246         of various tracepoint_action_ops.
7247
7248 2012-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
7249
7250         * linux-low.c (linux_attach_lwp_1): New variable buffer.  Call
7251         linux_ptrace_attach_warnings.
7252
7253 2012-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
7254
7255         * Makefile.in (linux-ptrace.o): New.
7256         * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
7257         (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
7258         (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
7259         (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
7260         (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
7261         of these targets.
7262         * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
7263
7264 2012-03-08  Yao Qi  <yao@codesourcery.com>
7265             Pedro Alves  <palves@redhat.com>
7266
7267         Fix PR server/13392.
7268         * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
7269         offset of JMP insn.
7270         * tracepoint.c (remove_tracepoint): New.
7271         (cmd_qtdp): Call remove_tracepoint when failed to install.
7272
7273 2012-03-07  Pedro Alves  <palves@redhat.com>
7274
7275         * linux-low.c (get_detach_signal): New.
7276         (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
7277         Pass on pending signals to PTRACE_DETACH.  Check the result of the
7278         ptrace call.
7279         * server.c (program_signals, program_signals_p): New.
7280         (handle_general_set): Handle QProgramSignals.
7281         * server.h (program_signals, program_signals_p): Declare.
7282
7283 2012-03-05  Pedro Alves  <palves@redhat.com>
7284             Jan Kratochvil  <jan.kratochvil@redhat.com>
7285
7286         * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
7287         New comment why.
7288
7289 2012-03-03  Yao Qi  <yao@codesourcery.com>
7290
7291         * tracepoint.c (tracepoint_look_up_symbols): Update call to
7292         agent_look_up_symbols.
7293
7294 2012-03-03  Yao Qi  <yao@codesourcery.com>
7295
7296         * Makefile.in (linux-low.o): Keep dependence on agent.h.
7297         (linux-x86-low.o): Likewise.
7298         * server.h: Remove in_process_agent_loaded.
7299         * tracepoint.c (in_process_agent_loaded): Removed.  Moved it
7300         common/agent.c.
7301         Update callers.
7302
7303 2012-03-03  Yao Qi  <yao@codesourcery.com>
7304
7305         * tracepoint.c (gdb_agent_capability): New global.
7306         (in_process_agent_loaded_ust): Renamed to
7307         `in_process_agent_supports_ust'.
7308         Update callers.
7309         (in_process_agent_supports_ust): Call agent_capability_check.
7310         (clear_installed_tracepoints): Assert that agent supports
7311         agent.
7312
7313 2012-03-03  Yao Qi  <yao@codesourcery.com>
7314
7315         * linux-low.c (linux_supports_agent): New.
7316         (linux_target_ops): Initialize field `supports_agent' with
7317         linux_supports_agent.
7318         * target.h (struct target_ops) <supports_agent>: New.
7319         (target_supports_agent): New macro.
7320         * server.c (handle_general_set): Handle packet 'QAgent'.
7321         (handle_query): Send `QAgent+'.
7322         * Makefile.in (server.o): Depends on agent.h.
7323
7324 2012-03-03  Yao Qi  <yao@codesourcery.com>
7325
7326         * Makefile.in (OBS): Add agent.o.
7327         Add new rule for agent.o.
7328         Track dependence of tracepoint.c on agent.h.
7329         * tracepoint.c (run_inferior_command_1):
7330         (run_inferior_command): Call agent_run_command.
7331         (gdb_ust_connect_sync_socket): Deleted.  Move it to
7332         common/agent.c.
7333         (resume_thread, stop_thread): Likewise.
7334         (gdb_ust_socket_init): Renamed to ...
7335         (gdb_agent_socket_init): ... New.
7336         (gdb_ust_thread): Renamed to ...
7337         (gdb_agent_helper_thread): ... New.
7338         (gdb_ust_init): Move some code to ...
7339         (gdb_agent_init): ... here.  New.
7340         [HAVE_UST]: Call gdb_ust_init.
7341         (initialize_tracepoint_ftlib):  Call gdb_agent_init.
7342         * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
7343         * config.in, configure: Regenerated.
7344
7345 2012-03-02  Pedro Alves  <palves@redhat.com>
7346
7347         * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
7348         * linux-low.c (struct simple_pid_list): New.
7349         (stopped_pids): New a struct simple_pid_list pointer.
7350         (add_to_pid_list, pull_pid_from_list): New.
7351         (handle_extended_wait): Don't assume the first signal new children
7352         report is SIGSTOP.  Adjust call to pull_pid_from_list.
7353         (linux_wait_for_lwp): Adjust.
7354
7355 2012-03-02  Yao Qi  <yao@codesourcery.com>
7356
7357         * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
7358         debug log.
7359
7360 2012-03-02  Yao Qi  <yao@codesourcery.com>
7361
7362         * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
7363         `stop_pc' and `tpoint'.  Update caller.
7364
7365 2012-03-01  Maciej W. Rozycki  <macro@codesourcery.com>
7366
7367         * linux-low.h (linux_target_ops): Add regset_bitmap member.
7368         * linux-low.c (use_linux_regsets): New macro.
7369         [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
7370         [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
7371         (linux_register_in_regsets): New function.
7372         (usr_fetch_inferior_registers): Skip registers covered by
7373         regsets.
7374         (usr_store_inferior_registers): Likewise.
7375         (usr_fetch_inferior_registers): New macro.
7376         (usr_store_inferior_registers): Likewise.
7377         (linux_fetch_registers): Handle mixed regset/non-regset targets.
7378         (linux_store_registers): Likewise.
7379         * linux-mips-low.c (init_registers_mips_dsp_linux): New
7380         prototype.
7381         (init_registers_mips64_dsp_linux): Likewise.
7382         (init_registers_mips_linux): New macro.
7383         (init_registers_mips_dsp_linux): Likewise.
7384         (mips_dsp_num_regs): Likewise.
7385         (DSP_BASE, DSP_CONTROL): New fallback macros.
7386         (mips_base_regs): New macro.
7387         (mips_regmap): Use it.  Fix the size.
7388         (mips_dsp_regmap): New variable.
7389         (mips_dsp_regset_bitmap): Likewise.
7390         (mips_arch_setup): New function.
7391         (mips_cannot_fetch_register): Use the_low_target.regmap rather
7392         than mips_regmap.
7393         (mips_cannot_store_register): Likewise.
7394         (the_low_target): Update .arch_setup, .num_regs and .regmap
7395         initializers.  Add .regset_bitmap initializer.
7396         * linux-arm-low.c (the_low_target): Add .regset_bitmap
7397         initializer.
7398         * linux-bfin-low.c (the_low_target): Likewise.
7399         * linux-cris-low.c (the_low_target): Likewise.
7400         * linux-crisv32-low.c (the_low_target): Likewise.
7401         * linux-ia64-low.c (the_low_target): Likewise.
7402         * linux-m32r-low.c (the_low_target): Likewise.
7403         * linux-m68k-low.c (the_low_target): Likewise.
7404         * linux-ppc-low.c (the_low_target): Likewise.
7405         * linux-s390-low.c (the_low_target): Likewise.
7406         * linux-sh-low.c (the_low_target): Likewise.
7407         * linux-sparc-low.c (the_low_target): Likewise.
7408         * linux-tic6x-low.c (the_low_target): Likewise.
7409         * linux-x86-low.c (the_low_target): Likewise.
7410         * linux-xtensa-low.c (the_low_target): Likewise.
7411         * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
7412         mips64-dsp-linux.o to srv_regobj.  Add mips-dsp-linux.xml,
7413         mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
7414         srv_xmlfiles.
7415         * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
7416         (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
7417
7418 2012-02-29  Yao Qi  <yao@codesourcery.com>
7419             Pedro Alves  <palves@redhat.com>
7420
7421         * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
7422         `step_over_finished' is true.
7423
7424 2012-02-27  Pedro Alves  <palves@redhat.com>
7425
7426         * linux-low.c (pid_is_stopped): Delete, moved to common/.
7427         (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
7428
7429 2012-02-27  Pedro Alves  <palves@redhat.com>
7430
7431         PR server/9684
7432         * linux-low.c (pid_is_stopped): New.
7433         (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
7434
7435 2012-02-25  Luis Machado  <lgustavo@codesourcery.com>
7436
7437         * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
7438         of conditions.
7439
7440 2012-02-24  Maciej W. Rozycki  <macro@codesourcery.com>
7441
7442         * linux-mips-low.c (mips_regmap): Correct the index of $f9.
7443
7444 2012-02-24  Luis Machado  <lgustavo@codesourcery>
7445
7446         * server.c (handle_query): Advertise support for target-side
7447         breakpoint condition evaluation.
7448         (process_point_options): New function.
7449         (process_serial_event): When inserting a breakpoint, check for
7450         a target-side condition that should be evaluated.
7451
7452         * mem-break.c: Include regcache.h and ax.h.
7453         (point_cond_list_t): New data structure.
7454         (breakpoint) <cond_list>: New field.
7455         (find_gdb_breakpoint_at): Make non-static.
7456         (delete_gdb_breakpoint_at): Clear any target-side
7457         conditions.
7458         (clear_gdb_breakpoint_conditions): New function.
7459         (add_condition_to_breakpoint): Likewise.
7460         (add_breakpoint_condition): Likewise.
7461         (gdb_condition_true_at_breakpoint): Likewise.
7462         (gdb_breakpoint_here): Return result directly instead
7463         of going through a local variable.
7464
7465         * mem-break.h (find_gdb_breakpoint_at): New prototype.
7466         (clear_gdb_breakpoint_conditions): Likewise.
7467         (add_breakpoint_condition): Likewise.
7468         (gdb_condition_true_at_breakpoint): Likewise.
7469
7470         * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
7471         (need_step_over_p): Take target-side breakpoint condition into
7472         consideration.
7473
7474 2012-02-24  Luis Machado  <lgustavo@codesourcery>
7475
7476         * server.h: Include tracepoint.h.
7477         (agent_mem_read, agent_get_trace_state_variable_value,
7478         agent_set_trace_state_variable_value,
7479         agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
7480         get_set_tsv_func_addr): New prototypes.
7481
7482         * ax.h: New include file.
7483         * ax.c: New source file.
7484
7485         * tracepoint.c: Include ax.h.
7486         (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
7487         agent_expr, eval_result_type): Move to ax.h.
7488         (parse_agent_expr): Rename to ...
7489         (gdb_parse_agent_expr): ... this, make it non-static and move
7490         to ax.h.
7491         (unparse_agent_expr) Rename to ...
7492         (gdb_unparse_agent_expr): ... this, make it non-static and move
7493         to ax.h.
7494         (eval_agent_expr): Rename to ...
7495         (eval_tracepoint_agent_expr): ... this.
7496         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
7497         forward declarations.
7498         (add_tracepoint_action): Call gdb_parse_agent_expr (...).
7499         (agent_get_trace_state_variable_value): New function.
7500         (agent_set_trace_state_variable_value): New function.
7501         (cmd_qtdp): Call gdb_parse_agent_expr (...).
7502         (response_tracepoint): Call gdb_unparse_agent_expr (...).
7503         (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
7504         (condition_true_at_tracepoint): Likewise.
7505         (parse_agent_expr): Rename to ...
7506         (gdb_parse_agent_expr): ... this and move to ax.c.
7507         (unparse_agent_expr): Rename to ...
7508         (gdb_unparse_agent_expr): ... this and move to ax.c.
7509         (gdb_agent_op_name): Move to ax.c.
7510         (eval_agent_expr): Rename to ...
7511         (gdb_eval_agent_expr): ... this, use regcache passed as parameter
7512         and move to ax.c.
7513         (eval_tracepoint_agent_expr): New function.
7514         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
7515         non-static.
7516         (current_insn_ptr, emit_error, struct bytecode_address): Move to
7517         ax.c.
7518         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
7519         emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
7520         emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
7521         emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
7522         emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
7523         emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
7524         emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
7525         emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
7526         (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
7527         (compile_bytecodes): Remove forward declaration.
7528         (is_goto_target): Move to ax.c.
7529         (compile_bytecodes): Move to ax.c and call
7530         agent_get_trace_state_variable_value (...) and
7531         agent_set_trace_state_variable_value (...).
7532
7533         * Makefile.in: Update ax.c and IPA dependencies.
7534
7535 2012-02-24  Pedro Alves  <palves@redhat.com>
7536
7537         * tracepoint.c (cmd_bigqtbuffer): Rename as ...
7538         (cmd_bigqtbuffer_circular): ... this.  Only handle
7539         'QTBuffer:circular:'.
7540         (handle_tracepoint_general_set): Adjust.
7541
7542 2012-02-16  Yao Qi  <yao@codesourcery.com>
7543
7544         * inferiors.c: Move code to ...
7545         * dll.c: .... here.  New.
7546         * server.h: Declare clear_dlls.
7547         * Makefile.in (SFILES): Add dll.c.
7548         (OBS): Add dll.o
7549         (dll.o): New rule.
7550
7551 2012-02-11  Yao Qi  <yao@codesourcery.com>
7552
7553         * server.c: (handle_monitor_command): Add a new parameter
7554         `own_buf'.
7555         (handle_query): Update caller.
7556
7557 2012-02-09  Joel Brobecker  <brobecker@adacore.com>
7558
7559         * configure.ac: Add readlink to AC_CHECK_FUNCS list.
7560         * configure, config.in: Regenerate.
7561         * hostio.c: Provide an alternate implementation if HAVE_READLINK
7562         is not defined.
7563
7564 2012-02-02  Pedro Alves  <palves@redhat.com>
7565
7566         Try SIGKILL first, then PTRACE_KILL.
7567         * linux-low.c (linux_kill_one_lwp): New.
7568         (linux_kill_one_lwp): Rename to ...
7569         (kill_one_lwp_callback): ... this.  Use the new
7570         linux_kill_one_lwp.
7571
7572 2012-02-02  Pedro Alves  <palves@redhat.com>
7573
7574         * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
7575         inferior.
7576
7577 2012-01-27  Pedro Alves  <palves@redhat.com>
7578
7579         * linux-low.c (linux_child_pid_to_exec_file): Delete.
7580         (elf_64_file_p): Make static.
7581         (linux_pid_exe_is_elf_64_file): New.
7582         * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
7583         Delete declarations.
7584         (linux_pid_exe_is_elf_64_file): Declare.
7585         * linux-x86-low.c (x86_arch_setup): Use
7586         linux_pid_exe_is_elf_64_file.
7587
7588 2012-01-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
7589
7590         * linux-low.c (linux_wait_for_event_1): Rename to ...
7591         (linux_wait_for_event): ... here and merge it with former
7592         linux_wait_for_event - new variable wait_ptid, use it.
7593         (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
7594
7595 2012-01-23  Pedro Alves  <palves@redhat.com>
7596
7597         * server.c (main): Avoid yet another case of infinite loop while
7598         detaching/killing after a longjmp.
7599
7600 2012-01-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
7601
7602         Code cleanup.
7603         * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
7604
7605 2012-01-20  Ulrich Weigand  <ulrich.weigand@linaro.org>
7606
7607         * hostio.c (handle_readlink): New function.
7608         (handle_vFile): Call it to handle "vFile:readlink" packets.
7609
7610 2012-01-20  Pedro Alves  <palves@redhat.com>
7611             Ulrich Weigand  <ulrich.weigand@linaro.org>
7612
7613         * server.c (handle_v_requests): Only support vAttach and vRun to
7614         start multiple processes when in extended protocol mode.
7615
7616 2012-01-17  Pedro Alves  <palves@redhat.com>
7617
7618         * tracepoint.c (initialize_tracepoint): Use mmap instead of
7619         memalign plus mprotect to allocate the scratch buffer.
7620
7621 2012-01-13  Pedro Alves  <palves@redhat.com>
7622
7623         * server.c (attach_inferior): Clear `cont_thread'.
7624
7625 2012-01-13  Pedro Alves  <palves@redhat.com>
7626
7627         * server.c (main): Avoid infinite loop while detaching/killing
7628         after a longjmp.
7629
7630 2012-01-09  Doug Evans  <dje@google.com>
7631
7632         * server.c (start_inferior): Set last_ptid in --wrapper case.
7633
7634 2012-01-06  Yao Qi  <yao@codesourcery.com>
7635
7636         * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
7637         defined.
7638         [IN_PROCESS_AGENT] (debug_agent): New global variable.
7639
7640 2012-01-04  Yao Qi  <yao@codesourcery.com>
7641
7642         * tracepoint.c (cmd_qtdp): Print debug message
7643         for static tracepoint.
7644
7645 2012-01-04  Yao Qi  <yao@codesourcery.com>
7646
7647         * tracepoint.c (trace_vdebug): Differentiate debug message
7648         between gdbserver and IPA.
7649
7650 2012-01-03  Yao Qi  <yao@codesourcery.com>
7651
7652         * tracepoint.c (tracepoint_was_hit): Don't collect for
7653         static tracepoint.
7654
7655 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
7656
7657         * terminal.h: Reformat copyright header.
7658
7659 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
7660
7661         * server.c (gdbserver_version): Update copyright year.
7662         * gdbreplay.c (gdbreplay_version): Likewise.
7663
7664 2011-12-18  Jan Kratochvil  <jan.kratochvil@redhat.com>
7665
7666         * linux-low.c (linux_create_inferior): Put empty if clause for write.
7667
7668         Revert:
7669         2011-12-18  Hui Zhu  <teawater@gmail.com>
7670         * linux-low.c (linux_create_inferior): Save return value to ret.
7671
7672 2011-12-18  Hui Zhu  <teawater@gmail.com>
7673
7674         * linux-low.c (linux_create_inferior): Save return value to ret.
7675
7676 2011-12-16  Doug Evans  <dje@google.com>
7677
7678         * linux-low.c (linux_create_inferior): If stdio connection,
7679         redirect stdin from /dev/null, stdout to stderr.
7680         * remote-utils.c (remote_is_stdio): New static global.
7681         (remote_connection_is_stdio): New function.
7682         (remote_prepare): Handle stdio connection.
7683         (remote_open): Ditto.
7684         (remote_close): Don't close stdin for stdio connections.
7685         (read_prim,write_prim): New functions.  Replace all calls to
7686         read/write to these.
7687         * server.c (main): Watch for "-" argument.  Move call to
7688         remote_prepare before start_inferior.
7689         * server.h (STDIO_CONNECTION_NAME): New macro.
7690         (remote_connection_is_stdio): Declare.
7691
7692         * remote-utils.c (prepare_resume_reply): Remove extraneous \n
7693         in debugging output.
7694
7695 2011-12-15  Yao Qi  <yao@codesourcery.com>
7696
7697         * tracepoint.c: Include sys/syscall.h.
7698         (gdb_ust_thread): Remove preprocessor conditional.
7699
7700 2011-12-14  Pedro Alves  <pedro@codesourcery.com>
7701
7702         * linux-low.c (linux_detach_one_lwp): Call
7703         the_low_target.prepare_to_resume before detaching.
7704
7705 2011-12-14  Yao Qi  <yao@codesourcery.com>
7706
7707         * tracepoint.c (gdb_ust_thread): Don't ignore return value
7708         of write.
7709
7710 2011-12-14  Yao Qi  <yao@codesourcery.com>
7711
7712         * i386-low.c (i386_low_stopped_data_address): Initialize local
7713         variable `control'.
7714
7715 2011-12-13  Pedro Alves  <pedro@codesourcery.com>
7716
7717         PR remote/13492
7718
7719         * i386-low.c (i386_low_stopped_data_address): Avoid fetching
7720         DR_CONTROL unless necessary.  Extend comments.
7721         * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
7722         DR0-3 if not used.  If any watchpoint was set, clear DR_STATUS.
7723
7724 2011-12-13  Yao Qi  <yao@codesourcery.com>
7725
7726         * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
7727         macros.
7728         (upload_fast_traceframes, upload_fast_traceframes): Likewise.
7729
7730 2011-12-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
7731
7732         * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
7733         Print new debug message for such case.
7734
7735 2011-12-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
7736
7737         Fix overlapping memcpy.
7738         * mem-break.c (set_raw_breakpoint_at): New variable buf.  Use it for
7739         the read_inferior_memory transfer.
7740         (delete_fast_tracepoint_jump): New variable buf.  Use it for the
7741         write_inferior_memory transfer.
7742         (set_fast_tracepoint_jump): New variable buf.  Use it for the
7743         read_inferior_memory and write_inferior_memory transfers.
7744         (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
7745         (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
7746         Use it for the write_inferior_memory transfer.
7747         (check_mem_read, check_mem_write): New gdb_asserts for overlapping
7748         buffers.
7749
7750 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
7751
7752         * linux-low.c (fetch_register, store_register): Make code
7753         consistent, fix formatting.
7754
7755 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
7756
7757         * linux-low.c (usr_store_inferior_registers): Factor out code
7758         to handle individual registers into...
7759         (store_register): ... this new function.
7760
7761 2011-12-06  Ulrich Weigand  <uweigand@de.ibm.com>
7762
7763         * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
7764         (s390-linux32v2.o, s390-linux32v2.c): Likewise.
7765         (s390-linux64v1.o, s390-linux64v1.c): Likewise.
7766         (s390-linux64v2.o, s390-linux64v2.c): Likewise.
7767         (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
7768         (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
7769         * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
7770         (srv_xmlfiles): Add new XML files.
7771
7772         * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
7773         and <sys/uio.h>.
7774         (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
7775         (init_registers_s390_linux32v1): Add prototype.
7776         (init_registers_s390_linux32v2): Likewise.
7777         (init_registers_s390_linux64v1): Likewise.
7778         (init_registers_s390_linux64v2): Likewise.
7779         (init_registers_s390x_linux64v1): Likewise.
7780         (init_registers_s390x_linux64v2): Likewise.
7781         (s390_num_regs): Increment to 52.
7782         (s390_regmap): Add orig_r2 register.
7783         (s390_num_regs_3264): Increment to 68.
7784         (s390_regmap_3264): Add orig_r2 register.
7785         (s390_collect_ptrace_register): Handle orig_r2 register.
7786         (s390_supply_ptrace_register): Likewise.
7787         (s390_fill_last_break): New function.
7788         (s390_store_last_break): Likewise.
7789         (s390_fill_system_call): New function.
7790         (s390_store_system_call): Likewise.
7791         (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
7792         register sets.
7793         (s390_check_regset): New function.
7794         (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
7795         NT_S390_SYSTEM_CALL regsets and use appropriate description.
7796         Update target_regsets for available register sets.
7797
7798 2011-12-02  Paul Pluzhnikov  <ppluzhnikov@google.com>
7799             Jan Kratochvil  <jan.kratochvil@redhat.com>
7800
7801         * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
7802         (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
7803         New.
7804         (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
7805         * linux-low.h (struct process_info_private): New member r_debug.
7806         * server.c (handle_qxfer_libraries): Call
7807         the_target->qxfer_libraries_svr4.
7808         (handle_qxfer_libraries_svr4): New function.
7809         (qxfer_packets): New entry "libraries-svr4".
7810         (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
7811         * target.h (struct target_ops): New member qxfer_libraries_svr4.
7812         * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
7813         PACKET_qXfer_libraries_svr4.
7814
7815 2011-11-30  Ulrich Weigand  <uweigand@de.ibm.com>
7816
7817         * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
7818         PSW address/mask between 8-byte and 16-byte formats.
7819         (s390_supply_ptrace_register): Likewise.
7820         (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
7821         basic addressing mode bit.
7822
7823 2011-11-24  Stan Shebs  <stan@codesourcery.com>
7824
7825         * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
7826
7827 2011-11-17  Stan Shebs  <stan@codesourcery.com>
7828
7829         * tracepoint.c (struct tracepoint): New field traceframe_usage.
7830         (tracing_start_time): New global.
7831         (tracing_stop_time): New global.
7832         (tracing_user_name): New global.
7833         (tracing_notes): New global.
7834         (tracing_stop_note): New global.
7835         (cmd_qtstart): Set traceframe_usage, start_time.
7836         (stop_tracing): Set stop_time.
7837         (cmd_qtstatus): Report additional status.
7838         (cmd_qtp): New function.
7839         (handle_tracepoint_query): Call it.
7840         (cmd_qtnotes): New function.
7841         (handle_tracepoint_general_set): Call it.
7842         (get_timestamp): Rename from tsv_get_timestamp.
7843
7844 2011-11-14  Stan Shebs  <stan@codesourcery.com>
7845             Kwok Cheung Yeung  <kcy@codesourcery.com>
7846
7847         * linux-x86-low.c (small_jump_insn): New.
7848         (i386_install_fast_tracepoint_jump_pad): Add arguments for
7849         trampoline and error message, build a trampoline and issue a small
7850         jump instruction to it.
7851         (x86_install_fast_tracepoint_jump_pad): Add arguments for
7852         trampoline and error message.
7853         (x86_get_min_fast_tracepoint_insn_len): New.
7854         (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
7855         * linux-low.h (struct linux_target_ops): Add arguments to
7856         install_fast_tracepoint_jump_pad operation, add new operation.
7857         * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
7858         arguments.
7859         (linux_get_min_fast_tracepoint_insn_len): New function.
7860         (linux_target_op): Add new operation.
7861         * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
7862         (gdb_trampoline_buffer_end): Ditto.
7863         (gdb_trampoline_buffer_error): Ditto.
7864         (struct ipa_sym_addresses): Add fields for new IPA variables.
7865         (symbol_list): Add entries for new IPA variables.
7866         (struct tracepoint): Add fields to hold the address range of the
7867         trampoline used by the tracepoint.
7868         (trampoline_buffer_head): New static variable.
7869         (trampoline_buffer_tail): Ditto.
7870         (claim_trampoline_space): New function.
7871         (have_fast_tracepoint_trampoline_buffer): New function.
7872         (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
7873         structure.
7874         (install_fast_tracepoint): Ditto, also add error buffer argument.
7875         (cmd_qtminftpilen): New function.
7876         (handle_tracepoint_query): Add response to qTMinFTPILen packet.
7877         (fast_tracepoint_from_trampoline_address): New function.
7878         (fast_tracepoint_collecting): Handle trampoline as part of jump
7879         pad space.
7880         (set_trampoline_buffer_space): New function.
7881         (initialize_tracepoint): Initialize new IPA variables.
7882         * target.h (struct target_ops): Add arguments to
7883         install_fast_tracepoint_jump_pad operation, add new
7884         get_min_fast_tracepoint_insn_len operation.
7885         (target_get_min_fast_tracepoint_insn_len): New.
7886         (install_fast_tracepoint_jump_pad): Add arguments.
7887         * server.h (IPA_BUFSIZ): Define.
7888         * linux-i386-ipa.c: Include extra header files.
7889         (initialize_fast_tracepoint_trampoline_buffer): New function.
7890         (initialize_low_tracepoint): Call it.
7891         * server.h (set_trampoline_buffer_space): Declare.
7892         (claim_trampoline_space): Ditto.
7893         (have_fast_tracepoint_trampoline_buffer): Ditto.
7894
7895 2011-11-14  Yao Qi  <yao@codesourcery.com>
7896
7897         * server.c (handle_query): Handle InstallInTrace for qSupported.
7898         * tracepoint.c (add_tracepoint): Sort list.
7899         (install_tracepoint, download_tracepoint): New.
7900         (cmd_qtdp): Call them to install and download tracepoints.
7901         (sort_tracepoints): Removed.
7902         (cmd_qtstart): Update.
7903
7904 2011-11-14  Yao Qi  <yao@codesourcery.com>
7905
7906         * mem-break.c (inc_ref_fast_tracepoint_jump): New.
7907         * mem-break.h: Declare.
7908         * tracepoint.c (cmd_qtstart): Move some code to ...
7909         (clone_fast_tracepoint, install_fast_tracepoint): ... here.
7910         New.
7911         (download_tracepoints): Move some code to ...
7912         (download_tracepoint_1): ... here.  New.
7913
7914 2011-11-08  Yao Qi  <yao@codesourcery.com>
7915
7916         * remote-utils.c (relocate_instruction): A comment fix.
7917
7918 2011-11-07  Joel Brobecker  <brobecker@adacore.com>
7919
7920         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
7921         (i386_dr_low_get_control, i386_dr_low_get_status): Use
7922         dr_status_mirror and dr_control_mirror from debug_reg_state.
7923         (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
7924         (i386_initial_stuff): Remove use of deleted globals.
7925         (i386_get_thread_context, i386_set_thread_context,
7926         i386_thread_added): Use dr_status_mirror and dr_control_mirror
7927         from debug_reg_state.
7928
7929 2011-11-05  Yao Qi  <yao@codesourcery.com>
7930
7931         * tracepoint.c (gdb_collect): Loop over tracepoints of same
7932         address as TPOINT's.
7933
7934 2011-11-02  Stan Shebs  <stan@codesourcery.com>
7935
7936         * tracepoint.c (agent_mem_read_string): New function.
7937         (eval_agent_expr): Call it for tracenz.
7938         * server.c (handle_query): Report support for tracenz.
7939
7940 2011-11-02  Yao Qi  <yao@codesourcery.com>
7941
7942         * tracepoint.c (cmd_qtstart): Remove unused local variables.
7943
7944 2011-11-02  Yao Qi  <yao@codesourcery.com>
7945
7946         * target.h: Fix a typo in comment.
7947
7948 2011-10-31  Pedro Alves  <pedro@codesourcery.com>
7949
7950         * mem-break.c (check_mem_write): Add `myaddr' parameter.  Don't
7951         clobber the breakpoints' shadows with fast tracepoint jumps.
7952         * mem-break.h (check_mem_write): Add `myaddr' parameter.
7953         * target.c (write_inferior_memory): Also pass MYADDR down to
7954         check_mem_write.
7955
7956 2011-10-07  Ulrich Weigand  <ulrich.weigand@linaro.org>
7957
7958         * configure.ac: Check support for personality routine.
7959         * configure: Regenerate.
7960         * config.in: Likewise.
7961         * linux-low.c: Include <sys/personality.h>.
7962         Define ADDR_NO_RANDOMIZE if necessary.
7963         (linux_create_inferior): Disable address space randomization when
7964         forking inferior, if requested.
7965         (linux_supports_disable_randomization): New function.
7966         (linux_target_ops): Install it.
7967         * server.h (disable_randomization): Declare.
7968         * server.c (disable_randomization): New global variable.
7969         (handle_general_set): Handle QDisableRandomization.
7970         (handle_query): Likewise for qSupported.
7971         (main): Support --disable-randomization and --no-disable-randomization
7972         command line arguments.
7973         * target.h (struct target_ops): Add supports_disable_randomization.
7974         (target_supports_disable_randomization): New macro.
7975
7976 2011-09-29  Mike Frysinger  <vapier@gentoo.org>
7977
7978         * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
7979         ifdef check.
7980         [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
7981         [!PT_GETDSBT] (target_loadmap): New definition.
7982         (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
7983         (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
7984         LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
7985         and PT_GETDSBT to LINUX_LOADMAP.
7986         [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
7987         (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
7988
7989 2011-09-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
7990
7991         * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
7992         (arm_linux_hwbp_cap): New static variable.
7993         (arm_linux_get_hwbp_cap): Replace by ...
7994         (arm_linux_init_hwbp_cap): ... this new function.
7995         (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
7996         (arm_linux_get_hw_watchpoint_count): Likewise.
7997         (arm_linux_get_hw_watchpoint_max_length): Likewise.
7998         (arm_arch_setup): Call arm_linux_init_hwbp_cap.
7999         (arm_prepare_to_resume): Use perror_with_name instead of error.
8000
8001 2011-09-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
8002
8003         * linux-arm-low.c: Include <signal.h>.
8004         (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
8005         (struct arm_linux_hwbp_cap): New data type.
8006         (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
8007         (struct arm_linux_hw_breakpoint): New data type.
8008         (MAX_BPTS, MAX_WPTS): Define.
8009         (struct arch_process_info, struct arch_lwp_info): New data types.
8010         (arm_linux_get_hwbp_cap): New function.
8011         (arm_linux_get_hw_breakpoint_count): Likewise.
8012         (arm_linux_get_hw_watchpoint_count): Likewise.
8013         (arm_linux_get_hw_watchpoint_max_length): Likewise.
8014         (arm_hwbp_control_initialize): Likewise.
8015         (arm_hwbp_control_is_enabled): Likewise.
8016         (arm_hwbp_control_is_initialized): Likewise.
8017         (arm_hwbp_control_disable): Likewise.
8018         (arm_linux_hw_breakpoint_equal): Likewise.
8019         (arm_linux_hw_point_initialize): Likewise.
8020         (struct update_registers_data): New data structure.
8021         (update_registers_callback: New function.
8022         (arm_insert_point): Likewise.
8023         (arm_remove_point): Likewise.
8024         (arm_stopped_by_watchpoint): Likewise.
8025         (arm_stopped_data_address): Likewise.
8026         (arm_new_process): Likewise.
8027         (arm_new_thread): Likewise.
8028         (arm_prepare_to_resume): Likewise.
8029         (the_low_target): Register arm_insert_point, arm_remove_point,
8030         arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
8031         arm_new_thread, and arm_prepare_to_resume.
8032
8033 2011-09-15  Stan Shebs  <stan@codesourcery.com>
8034
8035         * server.h (struct emit_ops): Add compare-goto fields.
8036         * tracepoint.c (gdb_agent_op_sizes): New table.
8037         (emit_eq_goto): New function.
8038         (emit_ne_goto): New function.
8039         (emit_lt_goto): New function.
8040         (emit_le_goto): New function.
8041         (emit_gt_goto): New function.
8042         (emit_ge_goto): New function.
8043         (is_goto_target): New function.
8044         (compile_bytecodes): Recognize special cases of compare-goto
8045         combinations and call specialized emitters for them.
8046         * linux-x86-low.c (amd64_emit_eq_goto): New function.
8047         (amd64_emit_ne_goto): New function.
8048         (amd64_emit_lt_goto): New function.
8049         (amd64_emit_le_goto): New function.
8050         (amd64_emit_gt_goto): New function.
8051         (amd64_emit_ge_goto): New function.
8052         (amd64_emit_ops): Add the new functions.
8053         (i386_emit_eq_goto): New function.
8054         (i386_emit_ne_goto): New function.
8055         (i386_emit_lt_goto): New function.
8056         (i386_emit_le_goto): New function.
8057         (i386_emit_gt_goto): New function.
8058         (i386_emit_ge_goto): New function.
8059         (i386_emit_ops): Add the new functions.
8060
8061 2011-09-08  Stan Shebs  <stan@codesourcery.com>
8062
8063         * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8064         (i386_emit_epilogue): Restore %ebx.
8065
8066 2011-08-31  Jie Zhang  <jzhang918@gmail.com>
8067
8068         * server.c (step_thread): Remove definition.
8069         (process_serial_event): Don't handle Hs.
8070         * server.h (step_thread): Remove declaration.
8071         * target.c (set_desired_inferior): Remove use of step_thread.
8072
8073 2011-08-24  Luis Machado  <lgustavo@codesourcery.com>
8074
8075         * linux-low.c: Include linux-procfs.h.
8076         (linux_attach_lwp_1): Update comments.
8077         (linux_attach): Scan for existing threads when attaching to a
8078         process that is the tgid.
8079         * Makefile.in: Update dependencies.
8080
8081 2011-08-24  Luis Machado  <lgustavo@codesourcery.com>
8082
8083         * configure.srv: Add linux-procfs.o dependencies.
8084
8085 2011-08-14  Yao Qi  <yao@codesourcery.com>
8086
8087         * target.h (struct target_ops): Fix indent.
8088         * win32-low.c (win32_target_ops): Fix comment.
8089
8090 2011-08-14  Andrew Jenner  <andrew@codesourcery.com>
8091             Yao Qi  <yao@codesourcery.com>
8092
8093         * Makefile.in (clean): Remove tic6x-*.c files.
8094         (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
8095         (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
8096         (tic6x-c64xp-linux.c): Likewise.
8097         * configure.srv: Add support for tic6x-*-uclinux.
8098         * linux-tic6x-low.c: New.
8099         * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
8100
8101 2011-08-14  Andrew Stubbs <ams@codesourcery.com>
8102             Yao Qi  <yao@codesourcery.com>
8103
8104         * target.h (struct target_ops): Add read_loadmap.
8105         * linux-low.c (struct target_loadseg): New type.
8106         (struct target_loadmap): New type.
8107         (linux_read_loadmap): New function.
8108         (linux_target_ops): Add linux_read_loadmap.
8109         * server.c (handle_query): Support qXfer:fdpic:read packet.
8110         * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
8111         to NULL.
8112
8113 2011-08-05  Eli Zaretskii  <eliz@gnu.org>
8114
8115         * win32-low.c: Include <stdint.h>.
8116
8117 2011-07-22  Pedro Alves  <pedro@codesourcery.com>
8118
8119         * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
8120         to the inferior here.
8121         (i386_remove_aligned_watchpoint): Ditto.
8122         (i386_handle_nonaligned_watchpoint): Return immediate on fail to
8123         fit part of the watchpoint in the debug registers.
8124         (i386_update_inferior_debug_regs): New.
8125         (i386_low_insert_watchpoint): Work on a local mirror of the debug
8126         registers, and only update the inferior on success.
8127         (i386_low_remove_watchpoint): Ditto.
8128
8129 2011-07-22  Kwok Cheung Yeung  <kcy@codesourcery.com>
8130
8131         * linux-low.c (compare_ints, unique, list_threads, show_process,
8132         linux_core_of_thread): Delete.
8133         (linux_target_ops): Change linux_core_of_thread to
8134         linux_common_core_of_thread.
8135         (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
8136         * utils.c (malloc_failure): Change type of argument.
8137         (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
8138         * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
8139         common/linux-osdata.c, common/ptid.c and common/buffer.c.
8140         (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
8141         (IPA_OBJS): Add common-utils-ipa.o.
8142         (ptid_h, linux_osdata_h): New macros.
8143         (server_h): Add common/common-utils.h, common/xml-utils.h,
8144         common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
8145         common/ptid.h.
8146         (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
8147         ptid.o, buffer.o): New rules.
8148         (linux-low.o): Add common/linux-osdata.h as a dependency.
8149         * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
8150         * configure.ac: Add AC_HEADER_DIRENT check.
8151         * config.in: Regenerate.
8152         * configure: Regenerate.
8153         * remote-utils.c (xml_escape_text): Delete.
8154         (buffer_grow, buffer_free, buffer_init, buffer_finish,
8155         buffer_xml_printf): Move to common/buffer.c.
8156         * server.c (main): Remove call to initialize_inferiors.
8157         * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
8158         ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
8159         ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
8160         internal_error, gdb_assert, gdb_assert_fail): Delete.
8161         (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
8162         buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
8163         common/buffer.h.
8164         * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
8165         ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
8166         initialize_inferiors): Delete.
8167
8168 2011-07-20  Pedro Alves  <pedro@codesourcery.com>
8169
8170         * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
8171         symbol error.
8172
8173 2011-05-31  Pedro Alves  <pedro@codesourcery.com>
8174
8175         * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
8176         assertion.
8177         * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
8178
8179 2011-05-26  Yao Qi  <yao@codesourcery.com>
8180
8181         * Makefile.in (thread-db.o): Track dependence to
8182         common/gdb_thread_db.h.
8183         * thread-db.c: include gdb_thread_db.h from right place.
8184
8185 2011-05-16  Adrian Cornish  <gnu@bluedreamer.com>
8186
8187         * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
8188         __FILE__ and __LINE__ to internal_error.
8189
8190 2011-05-13  Doug Evans  <dje@google.com>
8191
8192         * thread-db.c (try_thread_db_load_from_sdir): New function.
8193         (try_thread_db_load_from_dir): New function.
8194         (thread_db_load_search): Handle $sdir, ignore $pdir.
8195         Remove trying of system directories if search of
8196         libthread-db-search-path fails, that is now done via $sdir.
8197
8198 2011-05-12  Kwok Cheung Yeung  <kcy@codesourcery.com>
8199
8200         * server.c (handle_query): Add EnableDisableTracepoints to the list
8201         of supported features.
8202         * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
8203         tracepoints.
8204         (cmd_qtenable_disable): New.
8205         (cmd_qtstart): Install tracepoints even if disabled.
8206         (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
8207         receiving a QTEnable or QTDisable packet.
8208         (gdb_collect): Skip data collection if fast tracepoint is disabled.
8209         (ust_marker_to_static_tracepoint): Do not ignore disabled static
8210         tracepoints.
8211         (gdb_probe): Skip data collection if static tracepoint is disabled.
8212
8213 2011-05-10  Doug Evans  <dje@google.com>
8214
8215         * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
8216
8217 2011-05-04  Doug Evans  <dje@google.com>
8218
8219         * linux-low.c (linux_join): Skip process lookup.
8220         * spu-low.c (spu_join): Ditto.
8221         * server.c (join_inferiors_callback): Delete.
8222         (process_serial_event): For 'D' packet (detach) call join_inferior
8223         directly.
8224
8225 2011-05-04  Joseph Myers  <joseph@codesourcery.com>
8226
8227         * README: Don't mention xscale*-*-linux*.
8228         * configure.srv (xscale*-*-linux*): Don't handle target.
8229
8230 2011-04-27  Nathan Froyd  <froydnj@codesourcery.com>
8231
8232         * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
8233         casting pointers.
8234         (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
8235         (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
8236         (i386_emit_void_call_2): Likewise.
8237
8238 2011-04-26  Yao Qi  <yao@codesourcery.com>
8239
8240         * linux-low.c: Move common macros to linux-ptrace.h.
8241         Include linux-ptrace.h.
8242         * Makefile.in (linux_ptrace_h): New.
8243         (linux-low.o): Depends on linux-ptrace.h.
8244
8245 2011-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
8246
8247         * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
8248         RUN_ONCE.  Comment for the LISTEN_DESC delete_file_handler call.
8249         (remote_prepare): New function with most of the TCP code from ...
8250         (remote_open): ... here.  Detect PORT here unconditionally.  Move also
8251         setting transport_is_reliable.
8252         * server.c (run_once): New variable.
8253         (gdbserver_usage): Document it.
8254         (main): Set run_once for `--once'.  Call remote_prepare.  Exit after
8255         the first run if RUN_ONCE.
8256         * server.h (run_once, remote_prepare): New declarations.
8257
8258 2011-04-19  Tom Tromey  <tromey@redhat.com>
8259
8260         * win32-low.c (handle_load_dll): Remove duplicate "the".
8261
8262 2011-04-07  Pierre Muller  <muller@ics.u-strasbg.fr>
8263
8264         Remove support for old Cygwin 1.5 versions.
8265         * win32-low.c (win32_create_inferior): Use new cygwin_path_list
8266         function to avoid warning.
8267         (win32_add_one_solib): Use cygwin_conv_path function to avoid
8268         warning.
8269
8270 2011-03-18  Pierre Muller  <muller@ics.u-strasbg.fr>
8271
8272         * gdbserver/server.h (Macro _): Define it if not available.
8273
8274 2011-03-14  Michael Snyder  <msnyder@vmware.com>
8275
8276         * hostio.c (handle_close): Remove unnecessary null test.
8277
8278 2011-03-10  Joel Brobecker  <brobecker@adacore.com>
8279
8280         * Makefile.in (maintainer-clean realclean distclean): Remove
8281         "make ...  subdir_do" command.
8282
8283 2011-03-10  Michael Snyder  <msnyder@vmware.com>
8284
8285         * tracepoint.c (tracepoint_finish_step): Fix loop variable.
8286
8287         * server.c (handle_v_run): Free alloced buffer on early return.
8288
8289 2011-03-09  Yao Qi  <yao@codesourcery.com>
8290
8291         Revert:
8292         2011-03-04  Yao Qi  <yao@codesourcery.com>
8293
8294         * Makefile.in: Remove GNU make feature --directory.
8295
8296         2011-03-05  Yao Qi  <yao@codesourcery.com>
8297
8298         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8299         (subdir_do): New make target.  Copied from gdb/Makefile.
8300         (maintainer-clean, realclean, distclean, clean): Call corresponding
8301         make targets in common/Makefile.
8302
8303         2011-02-11  Yao Qi  <yao@codesourcery.com>
8304
8305         * configure.ac: Call AC_PROG_RANLIB.
8306         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
8307         * configure: Regenerate.
8308
8309 2011-03-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
8310
8311         * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
8312
8313 2011-03-06  Yao Qi  <yao@codesourcery.com>
8314
8315         * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
8316
8317 2011-03-05  Yao Qi  <yao@codesourcery.com>
8318
8319         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8320         (subdir_do): New make target.  Copied from gdb/Makefile.
8321         (maintainer-clean, realclean, distclean, clean): Call corresponding
8322         make targets in common/Makefile.
8323
8324 2011-03-04  Yao Qi  <yao@codesourcery.com>
8325
8326         * Makefile.in: Remove GNU make feature --directory.
8327
8328 2011-03-04  Michael Snyder  <msnyder@vmware.com>
8329
8330         * server.c (queue_stop_reply): Call xmalloc not malloc.
8331
8332 2011-03-02  Michael Snyder  <msnyder@vmware.com>
8333
8334         * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
8335
8336 2011-02-28  Michael Snyder  <msnyder@vmware.com>
8337
8338         * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
8339         (cmd_qtframe): Ditto.
8340         (cmd_qtbuffer): Ditto.
8341         (cmd_bigqtbuffer): Ditto.
8342
8343         * utils.c (decimal2str): Initialize 'width' to nine, then
8344         don't mess with it.
8345
8346 2011-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
8347
8348         * hostio.c (require_data): Free *data, not data.
8349
8350 2011-02-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
8351
8352         * hostio.c (require_data): Use free, not xfree.
8353
8354 2011-02-27  Michael Snyder  <msnyder@vmware.com>
8355
8356         * server.c (handle_query): Discard unused value.
8357
8358         * hostio.c (require_data): Free malloc memory before returning
8359         error.
8360
8361 2011-02-26  Michael Snyder  <msnyder@vmware.com>
8362
8363         * linux-low.c (list_threads): Call closedir for dirent.
8364
8365 2011-02-27  Michael Snyder  <msnyder@vmware.com>
8366
8367         * i386-low.c (i386-length_and_rw_bits): Comment the fact that
8368         a case statement falls through.
8369
8370         * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
8371
8372         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
8373         in comparison.
8374
8375 2011-02-26  Michael Snyder  <msnyder@vmware.com>
8376
8377         * utils.c (decimal2str): Eliminate dead code and dead param.
8378         (pulongest): Drop dead param from call to decimal2str.
8379         (plongest): Ditto.
8380
8381 2011-02-24  Joel Brobecker  <brobecker@adacore.com>
8382
8383         Revert the following patch (not approved yet):
8384         2011-02-21  Hui Zhu  <teawater@gmail.com>
8385         * tracepoint.c (tp_printf): New function.
8386         (eval_agent_expr): Handle gdb_agent_op_printf.
8387
8388 2011-02-21  Hui Zhu  <teawater@gmail.com>
8389
8390         * tracepoint.c (tp_printf): New function.
8391         (eval_agent_expr): Handle gdb_agent_op_printf.
8392
8393 2011-02-18  Tom Tromey  <tromey@redhat.com>
8394
8395         * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
8396         (tracepoint.o): Likewise.
8397         * tracepoint.c (enum gdb_agent_op): Use ax.def.
8398         (gdb_agent_op_names): Likewise.
8399
8400 2011-02-18  Tom Tromey  <tromey@redhat.com>
8401
8402         * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
8403         gdb_agent_op_rot>: New constants.
8404         (gdb_agent_op_names): Add pick and roll.
8405         (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
8406         cases.
8407
8408 2011-02-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
8409
8410         * aclocal.m4: Regenerated with aclocal-1.11.1.
8411
8412 2011-02-14  Pedro Alves  <pedro@codesourcery.com>
8413
8414         * server.c (handle_qxfer_traceframe_info): New.
8415         (qxfer_packets): Register "traceframe-info".
8416         (handle_query): Report support for qXfer:traceframe-info:read+.
8417         * tracepoint.c (match_blocktype): New.
8418         (traceframe_find_block_type): Rename to ...
8419         (traceframe_walk_blocks): ... this.  Add callback filter argument,
8420         and use it.
8421         (traceframe_find_block_type): New, reimplemented on top of
8422         traceframe_walk_blocks.
8423         (build_traceframe_info_xml): New.
8424         (traceframe_read_info): New.
8425         * server.h (traceframe_read_info): Declare.
8426
8427 2011-02-11  Yao Qi  <yao@codesourcery.com>
8428
8429         * configure.ac: Call AC_PROG_RANLIB.
8430         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
8431         * configure: Regenerate.
8432
8433 2011-02-07  Pedro Alves  <pedro@codesourcery.com>
8434
8435         * server.c (gdb_read_memory): Change return semantics to allow
8436         partial transfers.
8437         (handle_search_memory_1): Adjust.
8438         (process_serial_event) <'m' packet>: Handle partial transfers.
8439         * tracepoint.c (traceframe_read_mem): Handle partial transfers.
8440
8441 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
8442
8443         * regcache.c (init_register_cache): Initialize
8444         regcache->register_status.
8445         (free_register_cache): Release regcache->register_status.
8446         (regcache_cpy): Copy register_status.
8447         (registers_to_string): Print 'x's for unavailable registers.
8448         (supply_register): Mark the register's status valid or
8449         unavailable, depending on whether a buffer was passed in or not.
8450         (supply_register_zeroed): New.
8451         (supply_regblock): Mark the registers' status valid or
8452         unavailable, depending on whether a buffer was passed in or not.
8453         * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
8454         (struct regcache): New `register_status' field.
8455         (supply_register_zeroed): Declare.
8456         * i387-fp.c (i387_xsave_to_cache): Zero out registers using
8457         supply_register_zeroed, rather than passing a NULL buffer to
8458         supply_register.
8459         * tracepoint.c (fetch_traceframe_registers): Update comment.
8460
8461 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
8462
8463         * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
8464         buffer explicit.
8465
8466 2011-01-25  Pedro Alves  <pedro@codesourcery.com>
8467
8468         * server.h (decode_xfer_write): Change prototype.
8469         * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
8470         and don't extract the annex here.
8471         * server.c (decode_xfer_read): Remove `annex' parameter,
8472         and don't extract the annex here.
8473         (decode_xfer): New.
8474         (struct qxfer): New.
8475         (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
8476         (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
8477         (handle_qxfer_statictrace): New functions, abstracted out from
8478         handle_query, and made to use the struct qxfer interface.
8479         (handle_threads_qxfer_proper): Rename to ...
8480         (handle_qxfer_threads_proper): ... this.
8481         (handle_threads_qxfer): Rename to ...
8482         (handle_qxfer_threads): ... this.  Adjust.
8483         (qxfer_packets): New array.
8484         (handle_qxfer): New function.
8485         (handle_query): Use handle_qxfer.
8486
8487 2011-01-05  Michael Snyder  <msnyder@msnyder-server.eng.vmware.com>
8488
8489         * gdbreplay.c: Shorten lines of >= 80 columns.
8490         * linux-low.c: Ditto.
8491         * linux-ppc-low.c: Ditto.
8492         * linux-s390-low.c: Ditto.
8493         * linux-sparc-low.c: Ditto.
8494         * linux-x86-low.c: Ditto.
8495         * linux-xtensa-low.c: Ditto.
8496         * mem-break.c: Ditto.
8497         * nto-low.c: Ditto.
8498         * regcache.h: Ditto.
8499         * remote-utils.c: Ditto.
8500         * server.c: Ditto.
8501         * server.h: Ditto.
8502         * thread-db.c: Ditto.
8503         * tracepoint.c: Ditto.
8504         * utils.c: Ditto.
8505         * win32-low.h: Ditto.
8506
8507 2011-01-05  Joel Brobecker  <brobecker@adacore.com>
8508
8509         * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
8510         update.
8511
8512 2011-01-01  Joel Brobecker  <brobecker@adacore.com>
8513
8514         * server.c (gdbserver_version): Update copyright year in version
8515         output.
8516         * gdbreplay.c (gdbreplay_version): Ditto.
8517
8518 2010-12-29  Jie Zhang  <jie.zhang@analog.com>
8519
8520         * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
8521         * linux-bfin-low.c: New file.
8522         * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
8523         PT_DATA_ADDR for BFIN targets.
8524         * Makefile.in (SFILES): Add linux-bfin-low.c.
8525         (clean): Remove reg-bfin.c.
8526         (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
8527         * README: Mention supported Blackfin targets.
8528
8529 2010-12-23  Mike Frysinger  <vapier@gentoo.org>
8530
8531         * .gitignore: New file.
8532
8533 2010-11-16  Mike Frysinger  <vapier@gentoo.org>
8534
8535         * linux-low.c (linux_tracefork_child): Add char* cast to arg.
8536
8537 2010-10-22  Jie Zhang  <jie@codesourcery.com>
8538
8539         * Makefile.in: Add FLAGS_TO_PASS variable.
8540         (install): Remove dependency of install-only and recursively
8541         invoke make for install-only.
8542
8543 2010-10-04  Doug Evans  <dje@google.com>
8544
8545         * Makefile.in (uninstall): Use $(DESTDIR).
8546
8547 2010-09-24  Pedro Alves  <pedro@codesourcery.com>
8548
8549         PR gdb/11842
8550
8551         * linux-x86-low.c (compat_siginfo_from_siginfo)
8552         (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
8553         si_code is < 0.  Check for si_code == SI_TIMER before checking for
8554         si_code < 0.
8555
8556 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
8557
8558         * lynx-i386-low.c: New file.
8559         * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
8560
8561 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
8562
8563         * lynx-low.c (ptrace_request_to_str): Remove handling for
8564         request values that have been removed in LynxOS 5.x.
8565
8566 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
8567
8568         * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
8569         <ptrace.h>
8570
8571 2010-09-09  Nathan Sidwell  <nathan@codesourcery.com>
8572
8573         * configure.ac: Add --enable-inprocess-agent option.
8574         * configure: Rebuilt.
8575
8576 2010-09-06  Yao Qi  <yao@codesourcery.com>
8577
8578         * linux-low.c (linux_kill): Remove unused variable.
8579         (linux_stabilize_threads): Likewise.
8580         * server.c (start_inferior): Likewise.
8581         (queue_stop_reply_callback): Likewise.
8582         * tracepoint.c (do_action_at_tracepoint): Likewise.
8583
8584 2010-09-06  Yao Qi  <yao@codesourcery.com>
8585
8586         * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
8587         on return.
8588
8589 2010-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
8590
8591         * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
8592
8593 2010-09-06  Pedro Alves  <pedro@codesourcery.com>
8594
8595         * Makefile.in (install-only): Replace $IPA_DEPFILES with
8596         "$(IPA_DEPFILES)".
8597
8598 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
8599
8600         * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
8601         gdbserver/lynx-ppc-low.c: New files.
8602         * Makefile.in (lynx_low_h): New variable.
8603         (lynx-low.o, lynx-ppc-low.o): New rules.
8604         * configure.ac: On LynxOS, link with -lnetinet.
8605         * configure.srv: Add handling of powerpc-*-lynxos* targets.
8606         * configure: regenerate.
8607
8608 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
8609
8610         * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
8611         * configure.ac: Add check for vasprintf and vsnprintf.
8612         * configure, config.in: Regenerate.
8613         * server.h (vasprintf, vsnprintf): Add conditional declarations.
8614
8615 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
8616
8617         * gdbreplay.c: Move include of alloca.h up, next to include of
8618         malloc.h.
8619         * server.h: Add include of malloc.h.
8620         * mem-break.c: Remove include of malloc.h.
8621         * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
8622
8623 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
8624
8625         * Makefile.in (memmem.o): Build with -Wno-error.
8626
8627 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
8628
8629         * utils.c (xsnprintf): Make non-static.
8630         * server.h: Add xsnprintf declaration.
8631         * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
8632         replace calls to snprintf by calls to xsnprintf throughout.
8633
8634 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
8635
8636         * configure.ac: Add configure check for alloca.
8637         * configure, config.in: Regenerate.
8638         * server.h: Include alloca.h if it exists.
8639         * gdbreplay.c: Include alloca.h if it exists.
8640
8641 2010-08-28  Pedro Alves  <pedro@codesourcery.com>
8642
8643         * linux-low.c (__SIGRTMIN): Define if not already defined.
8644         (linux_create_inferior): Check for __ANDROID__ rather than
8645         __SIGRTMIN.
8646         (enqueue_one_deferred_signal): Don't requeue non-RT signals that
8647         are already deferred.
8648         (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
8649         (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
8650         stopped and already has a pending signal to report.
8651         (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
8652         a pending signal to report or is moving out of a jump pad.
8653         (linux_init_signals): Check for __ANDROID__ rather than
8654         __SIGRTMIN.
8655
8656 2010-08-28  Pedro Alves  <pedro@codesourcery.com>
8657
8658         * linux-low.c (linux_stabilize_threads): Wrap debug output in a
8659         debug_threads check.  Avoid a linear search when not doing debug
8660         output.
8661
8662 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
8663
8664         * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
8665         (struct gdb_event) <fd>: Change type to gdb_fildes_t.
8666         (struct file_handler) <fd>: Change type to gdb_fildes_t.
8667         (process_event): Change local fd's type to gdb_fildes_t.
8668         (create_file_handler): Adjust prototype.
8669         (delete_file_handler): Adjust prototype.
8670         (handle_file_event): Adjust prototype.  Use pfildes.
8671         (create_file_event): Adjsut prototype.
8672         * remote-utils.c (remote_desc, listen_desc): Change type to
8673         gdb_fildes_t.
8674         * server.h: New gdb_fildes_t typedef.
8675         [USE_WIN32API]: Include winsock2.h.
8676         (delete_file_handler, add_file_handler): Adjust prototypes.
8677         (pfildes): Declare.
8678         * utils.c (pfildes): New.
8679
8680 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
8681
8682         * configure.ac (build_warnings): Add -Wno-char-subscripts.
8683         * configure: Regenerate.
8684
8685 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
8686
8687         * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
8688         (linux_done_accessing_memory): ... this.
8689         (linux_target_ops): Adjust.
8690         * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
8691         * nto-low.c (nto_target_ops): Adjust comment.
8692         * server.c (gdb_read_memory, gdb_write_memory): Adjust.
8693         * spu-low.c (spu_target_ops): Adjust comment.
8694         * target.h (target_ops): Rename unprepare_to_access_memory field
8695         to done_accessing_memory.
8696         (unprepare_to_access_memory): Rename to ...
8697         (done_accessing_memory): ... this.
8698
8699 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
8700
8701         * linux-low.c (linux_prepare_to_access_memory): New.
8702         (linux_unprepare_to_access_memory): New.
8703         (linux_target_ops): Install them.
8704         * server.c (read_memory): Rename to ...
8705         (gdb_read_memory): ... this.  Use
8706         prepare_to_access_memory/prepare_to_access_memory.
8707         (write_memory): Rename to ...
8708         (gdb_write_memory): ... this.  Use
8709         prepare_to_access_memory/prepare_to_access_memory.
8710         (handle_search_memory_1): Adjust.
8711         (process_serial_event): Adjust.
8712         * target.h (struct target_ops): New fields
8713         prepare_to_access_memory and unprepare_to_access_memory.
8714         (prepare_to_access_memory, unprepare_to_access_memory): New.
8715         * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
8716         prepare_to_access_memory/prepare_to_access_memory.
8717         * nto-low.c (nto_target_ops): Adjust.
8718         * spu-low.c (spu_target_ops): Adjust.
8719         * win32-low.c (win32_target_ops): Adjust.
8720
8721 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
8722
8723         * Makefile.in (WARN_CFLAGS): Get it from configure.
8724         (WERROR_CFLAGS): New.
8725         (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
8726         * configure.ac: Introduce --enable-werror, which adds -Werror to
8727         the compiler command line.  Enabled by default.  Disable with
8728         --disable-werror.  Add -Wdeclaration-after-statement
8729         Wpointer-arith and -Wformat-nonliteral to warning flags.
8730         * configure: Regenerate.
8731
8732 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
8733
8734         * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
8735
8736 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
8737
8738         * gdbreplay.c (remote_error): New.
8739         (gdbchar): New.
8740         (expect): Use gdbchar.  Check for error reading from GDB.
8741         Clarify sync error output.
8742         (play): Check for errors writing to GDB.
8743         * linux-low.c (sigchld_handler): Really ignore `write' errors.
8744         * remote-utils.c (getpkt): Check for errors writing to the remote
8745         descriptor.
8746
8747 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
8748
8749         * linux-low.c (linux_wait_1): Move non-debugging code out of
8750         `debug_threads' control.
8751
8752 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
8753
8754         * linux-low.c (linux_wait_1): Don't set last_status here.
8755         * server.c (push_event, queue_stop_reply_callback): Assert we're
8756         not pushing a TARGET_WAITKIND_IGNORE event.
8757         (start_inferior, start_inferior, attach_inferior, handle_v_cont)
8758         (myresume, handle_target_event): Set the thread's last_resume_kind
8759         and last_status from the target returned status.
8760
8761 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
8762
8763         PR threads/10729
8764
8765         * linux-x86-low.c (update_debug_registers_callback): New.
8766         (i386_dr_low_set_addr): Use it.
8767         (i386_dr_low_get_addr): New.
8768         (i386_dr_low_set_control): Use update_debug_registers_callback.
8769         (i386_dr_low_get_control): New.
8770         (i386_dr_low_get_status): Adjust.
8771         * linux-low.c (linux_stop_lwp): New.
8772         * linux-low.h (linux_stop_lwp): Declare.
8773
8774         * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
8775         argument instead of a i386_debug_reg_state.
8776         (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
8777         a i386_debug_reg_state.
8778         (i386_insert_aligned_watchpoint): Adjust.
8779         (i386_remove_aligned_watchpoint): Adjust.
8780         (i386_low_stopped_data_address): Read the debug registers from the
8781         inferior instead of from the mirrors.
8782         * i386-low.h (struct i386_debug_reg_state): Extend comment.
8783         (i386_dr_low_get_addr): Declare.
8784         (i386_dr_low_get_control): Declare.
8785         (i386_dr_low_get_status): Change prototype.
8786
8787         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
8788         (i386_dr_low_get_addr): New.
8789         (i386_dr_low_get_control): New.
8790         (i386_dr_low_get_status): Adjust prototype.  Return
8791         dr_status_mirror.
8792         (i386_initial_stuff): Clear dr_status_mirror and
8793         dr_control_mirror.
8794         (i386_get_thread_context): Adjust.
8795         (i386_set_thread_context): Adjust.
8796         (i386_thread_added): Adjust.
8797
8798 2010-08-24  Pedro Alves  <pedro@codesourcery.com>
8799
8800         * linux-low.h (linux_thread_area): Delete declaration.
8801
8802 2010-08-11  Thomas Schwinge  <thomas@codesourcery.com>
8803
8804         * linux-low.c (linux_wait_1): Correctly return the ptid of the child
8805         after its termination.
8806
8807 2010-08-09  Pedro Alves  <pedro@codesourcery.com>
8808
8809         * linux-low.c (gdb_wants_lwp_stopped): Delete.
8810         (gdb_wants_all_stopped): Delete.
8811         (linux_wait_1): Don't call them.
8812         * server.c (handle_v_cont): Tag all threads as want-stopped.
8813         (gdb_wants_thread_stopped): Fix comments.  Tag the thread that
8814         stopped as "client-wants-stopped".
8815
8816 2010-07-31  Pedro Alves  <pedro@codesourcery.com>
8817
8818         * Makefile.in (signals_h): New.
8819         (server_h): Depend on it.
8820         (server.o): Don't depend on $(signals_def).
8821         (signals.o): Depend on $(signals_def).
8822
8823 2010-07-31  Jan Kratochvil  <jan.kratochvil@redhat.com>
8824
8825         * Makefile.in (signals_def): New.
8826         (server_h): Append include/gdb/signals.h and signals_def.
8827         (server.o): Append signals_def.
8828
8829 2010-07-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
8830
8831         * server.c (handle_target_event): Use target_signal_to_host for
8832         resume_info.sig initialization.
8833         * target.h (struct thread_resume) <sig>: New comment.
8834
8835 2010-07-20  Ozkan Sezer  <sezeroz@gmail.com>
8836
8837         * server.c (handle_query): strcpy() the returned string from paddress()
8838         instead of sprintf().
8839         * utils.c (paddress): Return phex_nz().
8840
8841 2010-07-07  Joel Brobecker  <brobecker@adacore.com>
8842
8843         * server.c (handle_v_cont): Call mourn_inferior if process
8844         just exited.
8845         (myresume): Likewise.
8846
8847 2010-07-01  Pedro Alves  <pedro@codesourcery.com>
8848
8849         Static tracepoints, and integration with UST.
8850
8851         * configure.ac: Handle --with-ust.  substitute ustlibs and ustinc.
8852         * mem-break.c (uninsert_all_breakpoints)
8853         (reinsert_all_breakpoints): New.
8854         * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
8855         * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
8856         (gdb_agent_ust_loaded, helper_thread_id)
8857         (gdb_agent_helper_thread_id): New macros.
8858         (struct ipa_sym_addresses): Add addr_ust_loaded,
8859         addr_helper_thread_id, addr_cmd_buf.
8860         (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
8861         (in_process_agent_loaded_ust): New.
8862         (write_e_ust_not_loaded): New.
8863         (maybe_write_ipa_ust_not_loaded): New.
8864         (struct collect_static_trace_data_action): New.
8865         (enum tracepoint_type) <static_tracepoint>: New.
8866         (struct tracepoint) <handle>: Mention static tracepoints.
8867         (struct static_tracepoint_ctx): New.
8868         (CMD_BUF_SIZE): New.
8869         (add_tracepoint_action): Handle static tracepoint actions.
8870         (unprobe_marker_at): New.
8871         (clear_installed_tracepoints): Handle static tracepoints.
8872         (cmd_qtdp): Handle static tracepoints.
8873         (probe_marker_at): New.
8874         (cmd_qtstart): Handle static tracepoints.
8875         (response_tracepoint): Handle static tracepoints.
8876         (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
8877         (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
8878         (get_context_regcache): Handle static tracepoints.
8879         (do_action_at_tracepoint): Handle static tracepoint actions.
8880         (traceframe_find_block_type): Handle static trace data blocks.
8881         (traceframe_read_sdata): New.
8882         (download_tracepoints): Download static tracepoint actions.
8883         [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
8884         (GDB_PROBE_NAME): New.
8885         (ust_ops): New.
8886         (GET_UST_SYM): New.
8887         (USTF): New.
8888         (dlsym_ust): New.
8889         (ust_marker_to_static_tracepoint): New.
8890         (gdb_probe): New.
8891         (collect_ust_data_at_tracepoint): New.
8892         (gdb_ust_probe): New.
8893         (UNIX_PATH_MAX, SOCK_DIR): New.
8894         (gdb_ust_connect_sync_socket): New.
8895         (resume_thread, stop_thread): New.
8896         (run_inferior_command): New.
8897         (init_named_socket): New.
8898         (gdb_ust_socket_init): New.
8899         (cstr_to_hexstr): New.
8900         (next_st): New.
8901         (first_marker, next_marker): New.
8902         (response_ust_marker): New.
8903         (cmd_qtfstm, cmd_qtsstm): New.
8904         (unprobe_marker_at, probe_marker_at): New.
8905         (cmd_qtstmat, gdb_ust_thread): New.
8906         (gdb_ust_init): New.
8907         (initialize_tracepoint_ftlib): Call gdb_ust_init.
8908         * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
8909         (ST_REGENTRY): New.
8910         (x86_64_st_collect_regmap): New.
8911         (X86_64_NUM_ST_COLLECT_GREGS): New.
8912         (AMD64_RIP_REGNUM): New.
8913         (supply_static_tracepoint_registers): New.
8914         * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
8915         (ST_REGENTRY): New.
8916         (i386_st_collect_regmap): New.
8917         (i386_NUM_ST_COLLECT_GREGS): New.
8918         (supply_static_tracepoint_registers): New.
8919         * server.c (handle_query): Handle qXfer:statictrace:read.
8920         <qSupported>: Report support for StaticTracepoints, and
8921         qXfer:statictrace:read features.
8922         * server.h (traceframe_read_sdata)
8923         (supply_static_tracepoint_registers): Declare.
8924         * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
8925         (unpack_varlen_hex): Include in IPA build.
8926         * Makefile.in (ustlibs, ustinc): New.
8927         (IPA_OBJS): Add remote-utils-ipa.o.
8928         ($(IPA_LIB)): Link -ldl and -lpthread.
8929         (UST_CFLAGS): New.
8930         (IPAGENT_CFLAGS): Add UST_CFLAGS.
8931         * config.in, configure: Regenerate.
8932
8933 2010-06-20  Ian Lance Taylor  <iant@google.com>
8934             Pedro Alves  <pedro@codesourcery.com>
8935
8936         * linux-x86-low.c (always_true): Delete.
8937         (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
8938         trying to fool the compiler with always_true.
8939
8940 2010-06-20  Pedro Alves  <pedro@codesourcery.com>
8941
8942         * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
8943         conditions in gdbserver.
8944
8945 2010-06-19  Ulrich Weigand  <uweigand@de.ibm.com>
8946
8947         * spu-low.c (spu_read_memory): Wrap around local store limit.
8948         (spu_write_memory): Likewise.
8949
8950 2010-06-15  Pedro Alves  <pedro@codesourcery.com>
8951
8952         * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
8953         (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
8954         LONGEST uses.
8955         * server.h (struct emit_ops): Replace int64_t uses with LONGEST
8956         uses.
8957         * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
8958         uses with LONGEST uses.
8959
8960 2010-06-14  Stan Shebs  <stan@codesourcery.com>
8961             Pedro Alves  <pedro@codesourcery.com>
8962
8963         Bytecode compiler.
8964
8965         * linux-x86-low.c: Include limits.h.
8966         (add_insns): New.
8967         (always_true): New.
8968         (EMIT_ASM): New.
8969         (EMIT_ASM32): New.
8970         (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
8971         (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
8972         (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
8973         (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
8974         (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
8975         (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
8976         (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
8977         (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
8978         (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
8979         (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
8980         (amd64_emit_void_call_2): New.
8981         (amd64_emit_ops): New.
8982         (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
8983         (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
8984         (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
8985         (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
8986         (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
8987         (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
8988         (i386_emit_goto, i386_write_goto_address, i386_emit_const)
8989         (i386_emit_call, i386_emit_reg, i386_emit_pop)
8990         (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
8991         (i386_emit_stack_adjust, i386_emit_int_call_1)
8992         (i386_emit_void_call_2): New.
8993         (i386_emit_ops): New.
8994         (x86_emit_ops): New.
8995         (the_low_target): Install x86_emit_ops.
8996         * server.h (struct emit_ops): New.
8997         (get_raw_reg_func_addr): Declare.
8998         (current_insn_ptr, emit_error): Declare.
8999         * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
9000         (set_trace_state_variable_value): New defines.
9001         (struct ipa_sym_addresses): New fields addr_get_raw_reg,
9002         addr_get_trace_state_variable_value and
9003         addr_set_trace_state_variable_value.
9004         (symbol_list): New fields for get_raw_reg,
9005         get_trace_state_variable_value and set_trace_state_variable_value.
9006         (condfn): New typedef.
9007         (struct tracepoint): New field `compiled_cond'.
9008         (do_action_at_tracepoint): Clear compiled_cond.
9009         (get_trace_state_variable_value, set_trace_state_variable_value):
9010         Export in the IPA.
9011         (condition_true_at_tracepoint): If there's a compiled condition,
9012         run that.
9013         (current_insn_ptr, emit_error): New globals.
9014         (struct bytecode_address): New.
9015         (get_raw_reg_func_addr): New.
9016         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
9017         (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
9018         (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
9019         (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
9020         (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
9021         (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
9022         (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
9023         (compile_tracepoint_condition, compile_bytecodes): New.
9024         * target.h (emit_ops): Forward declare.
9025         (struct target_ops): New field emit_ops.
9026         (target_emit_ops): New.
9027         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
9028         * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
9029         * linux-low.c (linux_emit_ops): New.
9030         (linux_target_ops): Install it.
9031         * linux-low.h (struct linux_target_ops): New field emit_ops.
9032
9033 2010-06-14  Ulrich Weigand  <uweigand@de.ibm.com>
9034
9035         * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
9036         * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
9037
9038 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
9039             Stan Shebs  <stan@codesourcery.com>
9040
9041         * Makefile.in (IPA_DEPFILES, extra_libraries): New.
9042         (all): Depend on $(extra_libraries).
9043         (install-only): Install the IPA.
9044         (IPA_OBJS, IPA_LIB): New.
9045         (clean): Remove the IPA lib.
9046         (IPAGENT_CFLAGS): New.
9047         (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
9048         (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9049         (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9050         * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9051         * configure.ac: Check for atomic builtins support in the compiler.
9052         (IPA_DEPFILES, extra_libraries): Define.
9053         * configure.srv (ipa_obj): Add description.
9054         (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9055         (i[34567]86-*-linux*): Set ipa_obj.
9056         (x86_64-*-linux*): Set ipa_obj.
9057         * linux-low.c (stabilizing_threads): New.
9058         (supports_fast_tracepoints): New.
9059         (linux_detach): Stabilize threads before detaching.
9060         (handle_tracepoints): Handle internal tracing breakpoints.  Assert
9061         the lwp is either not stabilizing, or is moving out of a jump pad.
9062         (linux_fast_tracepoint_collecting): New.
9063         (maybe_move_out_of_jump_pad): New.
9064         (enqueue_one_deferred_signal): New.
9065         (dequeue_one_deferred_signal): New.
9066         (linux_wait_for_event_1): If moving out of a jump pad, defer
9067         pending signals to later.
9068         (linux_stabilize_threads): New.
9069         (linux_wait_1): Check if threads need moving out of jump pads, and
9070         do it if so.
9071         (stuck_in_jump_pad_callback): New.
9072         (move_out_of_jump_pad_callback): New.
9073         (lwp_running): New.
9074         (linux_resume_one_lwp): Handle moving out of jump pads.
9075         (linux_set_resume_request): Dequeue deferred signals.
9076         (need_step_over_p): Also step over fast tracepoint jumps.
9077         (start_step_over): Also uninsert fast tracepoint jumps.
9078         (finish_step_over): Also reinsert fast tracepoint jumps.
9079         (linux_install_fast_tracepoint_jump): New.
9080         (linux_target_ops): Install linux_stabilize_threads and
9081         linux_install_fast_tracepoint_jump_pad.
9082         * linux-low.h (linux_target_ops) <get_thread_area,
9083         install_fast_tracepoint_jump_pad>: New fields.
9084         (struct lwp_info) <collecting_fast_tracepoint,
9085         pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
9086         (linux_get_thread_area): Declare.
9087         * linux-x86-low.c (jump_insn): New.
9088         (x86_get_thread_area): New.
9089         (append_insns): New.
9090         (push_opcode): New.
9091         (amd64_install_fast_tracepoint_jump_pad): New.
9092         (i386_install_fast_tracepoint_jump_pad): New.
9093         (x86_install_fast_tracepoint_jump_pad): New.
9094         (the_low_target): Install x86_get_thread_area and
9095         x86_install_fast_tracepoint_jump_pad.
9096         * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
9097         (struct fast_tracepoint_jump): New.
9098         (fast_tracepoint_jump_insn): New.
9099         (fast_tracepoint_jump_shadow): New.
9100         (find_fast_tracepoint_jump_at): New.
9101         (fast_tracepoint_jump_here): New.
9102         (delete_fast_tracepoint_jump): New.
9103         (set_fast_tracepoint_jump): New.
9104         (uninsert_fast_tracepoint_jumps_at): New.
9105         (reinsert_fast_tracepoint_jumps_at): New.
9106         (set_breakpoint_at): Use write_inferior_memory.
9107         (uninsert_raw_breakpoint): Use write_inferior_memory.
9108         (check_mem_read): Mask out fast tracepoint jumps.
9109         (check_mem_write): Mask out fast tracepoint jumps.
9110         * mem-break.h (struct fast_tracepoint_jump): Forward declare.
9111         (set_fast_tracepoint_jump): Declare.
9112         (delete_fast_tracepoint_jump)
9113         (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
9114         (reinsert_fast_tracepoint_jumps_at): Declare.
9115         * regcache.c: Don't compile many functions when building the
9116         in-process agent library.
9117         (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
9118         the register buffer in the heap.
9119         (free_register_cache): If the register buffer isn't owned by the
9120         regcache, don't free it.
9121         (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
9122         pre-existing register caches.
9123         * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
9124         type.
9125         (convert_ascii_to_int): : Constify `from' parameter type.
9126         (decode_M_packet, decode_X_packet): Replace the `to' parameter by
9127         a `to_p' pointer to pointer parameter.  If TO_P is NULL, malloc
9128         the needed buffer in-place.
9129         (relocate_instruction): New.
9130         * server.c (handle_query) <qSymbols>: If the target supports
9131         tracepoints, give it a chance of looking up symbols.  Report
9132         support for fast tracepoints.
9133         (handle_status): Stabilize threads.
9134         (process_serial_event): Adjust.
9135         * server.h (struct fast_tracepoint_jump): Forward declare.
9136         (struct process_info) <fast_tracepoint_jumps>: New field.
9137         (convert_ascii_to_int, convert_int_to_ascii): Adjust.
9138         (decode_X_packet, decode_M_packet): Adjust.
9139         (relocate_instruction): Declare.
9140         (in_process_agent_loaded): Declare.
9141         (tracepoint_look_up_symbols): Declare.
9142         (struct fast_tpoint_collect_status): Declare.
9143         (fast_tracepoint_collecting): Declare.
9144         (force_unlock_trace_buffer): Declare.
9145         (handle_tracepoint_bkpts): Declare.
9146         (initialize_low_tracepoint)
9147         (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
9148         * target.h (struct target_ops) <stabilize_threads,
9149         install_fast_tracepoint_jump_pad>: New fields.
9150         (stabilize_threads, install_fast_tracepoint_jump_pad): New.
9151         * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
9152         [HAVE_STDINT_H]: Include stdint.h.
9153         (trace_debug_1): Rename to ...
9154         (trace_vdebug): ... this.
9155         (trace_debug): Rename to ...
9156         (trace_debug_1): ... this.  Add `level' parameter.
9157         (trace_debug): New.
9158         (ATTR_USED, ATTR_NOINLINE): New.
9159         (IP_AGENT_EXPORT): New.
9160         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9161         (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
9162         (about_to_request_buffer_space, trace_buffer_is_full)
9163         (stopping_tracepoint, expr_eval_result, error_tracepoint)
9164         (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
9165         (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
9166         (traceframe_write_count, traceframes_created)
9167         (trace_state_variables)
9168         New renaming defines.
9169         (struct ipa_sym_addresses): New.
9170         (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
9171         (symbol_list): New.
9172         (ipa_sym_addrs): New.
9173         (all_tracepoint_symbols_looked_up): New.
9174         (in_process_agent_loaded): New.
9175         (write_e_ipa_not_loaded): New.
9176         (maybe_write_ipa_not_loaded): New.
9177         (tracepoint_look_up_symbols): New.
9178         (debug_threads) [IN_PROCESS_AGENT]: New.
9179         (read_inferior_memory) [IN_PROCESS_AGENT]: New.
9180         (UNKNOWN_SIDE_EFFECTS): New.
9181         (stop_tracing): New.
9182         (flush_trace_buffer): New.
9183         (stop_tracing_bkpt): New.
9184         (flush_trace_buffer_bkpt): New.
9185         (read_inferior_integer): New.
9186         (read_inferior_uinteger): New.
9187         (read_inferior_data_pointer): New.
9188         (write_inferior_data_pointer): New.
9189         (write_inferior_integer): New.
9190         (write_inferior_uinteger): New.
9191         (struct collect_static_trace_data_action): Delete.
9192         (enum tracepoint_type): New.
9193         (struct tracepoint) <type>: New field `type'.
9194         <actions_str, step_actions, step_actions_str>: Only include in
9195         GDBserver.
9196         <orig_size, obj_addr_on_target, adjusted_insn_addr>
9197         <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
9198         (tracepoints): Use IP_AGENT_EXPORT.
9199         (last_tracepoint): Don't include in the IPA.
9200         (stopping_tracepoint): Use IP_AGENT_EXPORT.
9201         (trace_buffer_is_full): Use IP_AGENT_EXPORT.
9202         (alloced_trace_state_variables): New.
9203         (trace_state_variables): Use IP_AGENT_EXPORT.
9204         (traceframe_t): Delete unused variable.
9205         (circular_trace_buffer): Don't include in the IPA.
9206         (trace_buffer_start): Delete.
9207         (struct trace_buffer_control): New.
9208         (trace_buffer_free): Delete.
9209         (struct ipa_trace_buffer_control): New.
9210         (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
9211         (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
9212         New.
9213         (trace_buffer_ctrl): New.
9214         (TRACE_BUFFER_CTRL_CURR): New.
9215         (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
9216         Reimplement as macros.
9217         (trace_buffer_wrap): Delete.
9218         (traceframe_write_count, traceframe_read_count)
9219         (traceframes_created, tracing): Use IP_AGENT_EXPORT.
9220         (struct tracepoint_hit_ctx) <type>: New field.
9221         (struct fast_tracepoint_ctx): New.
9222         (memory_barrier): New.
9223         (cmpxchg): New.
9224         (record_tracepoint_error): Update atomically in the IPA.
9225         (clear_inferior_trace_buffer): New.
9226         (about_to_request_buffer_space): New.
9227         (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
9228         updating the same buffer.
9229         (add_tracepoint): Default the tracepoint's type to trap
9230         tracepoint, and orig_size to -1.
9231         (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
9232         internal variables.
9233         (create_trace_state_variable): New parameter `gdb'.  Handle it.
9234         (clear_installed_tracepoints): Clear fast tracepoint jumps.
9235         (cmd_qtdp): Handle fast tracepoints.
9236         (cmd_qtdv): Adjust.
9237         (max_jump_pad_size): New.
9238         (gdb_jump_pad_head): New.
9239         (get_jump_space_head): New.
9240         (claim_jump_space): New.
9241         (sort_tracepoints): New.
9242         (MAX_JUMP_SIZE): New.
9243         (cmd_qtstart): Handle fast tracepoints.  Sync tracepoints with the
9244         IPA.
9245         (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
9246         support.  Upload fast traceframes, and delete internal IPA
9247         breakpoints.
9248         (stop_tracing_handler): New.
9249         (flush_trace_buffer_handler): New.
9250         (cmd_qtstop): Upload fast tracepoints.
9251         (response_tracepoint): Handle fast tracepoints.
9252         (tracepoint_finished_step): Upload fast traceframes.  Set the
9253         tracepoint hit context's tracepoint type.
9254         (handle_tracepoint_bkpts): New.
9255         (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
9256         type.  Add comment about fast tracepoints.
9257         (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
9258         non-existing action_str field.
9259         (get_context_regcache): Handle fast tracepoints.
9260         (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
9261         to the regcache.
9262         (fast_tracepoint_from_jump_pad_address): New.
9263         (fast_tracepoint_from_ipa_tpoint_address): New.
9264         (collecting_t): New.
9265         (force_unlock_trace_buffer): New.
9266         (fast_tracepoint_collecting): New.
9267         (collecting): New.
9268         (gdb_collect): New.
9269         (write_inferior_data_ptr): New.
9270         (target_tp_heap): New.
9271         (target_malloc): New.
9272         (download_agent_expr): New.
9273         (UALIGN): New.
9274         (download_tracepoints): New.
9275         (download_trace_state_variables): New.
9276         (upload_fast_traceframes): New.
9277         (IPA_FIRST_TRACEFRAME): New.
9278         (IPA_NEXT_TRACEFRAME_1): New.
9279         (IPA_NEXT_TRACEFRAME): New.
9280         [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
9281         [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
9282         (gdb_jump_pad_buffer_end): New.
9283         [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
9284         (initialize_tracepoint): Adjust.
9285         [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
9286         buffer.  Initialize the low module.
9287         * utils.c (PREFIX, TOOLNAME): New.
9288         (malloc_failure): Use PREFIX.
9289         (error): In the IPA, an error causes an exit.
9290         (fatal, warning): Use PREFIX.
9291         (internal_error): Use TOOLNAME.
9292         (NUMCELLS): Increase to 10.
9293         * configure, config.in: Regenerate.
9294
9295 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
9296
9297         * server.c (handle_query) <qSupported>: Do two passes over the
9298         qSupported string to avoid nesting strtok.
9299
9300 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
9301
9302         * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
9303         (CDEPS): New.
9304         * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping.  Test also
9305         -Wl,--dynamic-list.
9306         * configure: Regenerate.
9307         * proc-service.list: New.
9308
9309 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
9310
9311         * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
9312         New comment.
9313
9314 2010-05-26  Ozkan Sezer  <sezeroz@gmail.com>
9315
9316         * gdbreplay.c (remote_open): Check error return from socket() call by
9317         its equality to -1 not by it being negative.
9318         * remote-utils.c (remote_open): Likewise.
9319
9320 2010-05-23  Pedro Alves  <pedro@codesourcery.com>
9321
9322         * config.h: Regenerate.
9323
9324 2010-05-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
9325
9326         * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
9327         doesn't provide PTRACE_GET_THREAD_AREA.
9328
9329 2010-05-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
9330
9331         * linux-m68k-low.c: Include <asm/ptrace.h>
9332         (ps_get_thread_area): Implement.
9333
9334 2010-05-03  Doug Evans  <dje@google.com>
9335
9336         * event-loop.c (struct callback_event): New struct.
9337         (callback_list): New global.
9338         (append_callback_event, delete_callback_event): New functions.
9339         (process_callback): New function.
9340         (start_event_loop): Call it.
9341         * remote-utils.c (NOT_SCHEDULED): Define.
9342         (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
9343         moved out of readchar.
9344         (readchar): Rewrite.  Call reschedule before returning.
9345         (reset_readchar): New function.
9346         (remote_close): Call it.
9347         (process_remaining, reschedule): New functions.
9348         * server.h (callback_handler_func): New typedef.
9349         (append_callback_event, delete_callback_event): Declare.
9350
9351 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
9352
9353         * proc-service.c (ps_pglobal_lookup): Use
9354         thread_db_look_up_one_symbol.
9355         * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
9356         parameter.  Use it instead of all_symbols_looked_up.
9357         * server.h (struct process_info) <all_symbols_looked_up>: Delete
9358         field.
9359         (all_symbols_looked_up): Don't declare.
9360         (look_up_one_symbol): Add new `may_ask_gdb' parameter.
9361         * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
9362         field.
9363         (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
9364         Set all_symbols_looked_up here.
9365         (thread_db_look_up_one_symbol): New.
9366         (thread_db_get_tls_address): Adjust.
9367         (thread_db_load_search, try_thread_db_load_1): Always allocate the
9368         thread_db object on the heap, and tentatively set it in the
9369         process structure.
9370         (thread_db_init): Don't set all_symbols_looked_up here.
9371         * linux-low.h (thread_db_look_up_one_symbol): Declare.
9372
9373 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
9374
9375         * linux-low.c (linux_kill, linux_detach): Adjust.
9376         (status_pending_p_callback): Remove redundant statement.  Check
9377         for !TARGET_WAITIKIND_IGNORE, instead of
9378         TARGET_WAITKIND_STOPPED.
9379         (handle_tracepoints): Make sure LWP is locked.  Adjust.
9380         (linux_wait_for_event_1): Adjust.
9381         (linux_cancel_breakpoints): New.
9382         (unsuspend_one_lwp): New.
9383         (unsuspend_all_lwps): New.
9384         (linux_wait_1): If finishing a step-over, unsuspend all lwps.
9385         (send_sigstop_callback): Change return type to int, add new
9386         `except' parameter and handle it.
9387         (suspend_and_send_sigstop_callback): New.
9388         (stop_all_lwps): Add new `suspend' and `expect' parameters, and
9389         pass them down.  If SUSPEND, also increment the lwp's suspend
9390         count.
9391         (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
9392         (need_step_over_p): Don't consider suspended LWPs.
9393         (start_step_over): Adjust.
9394         (proceed_one_lwp): Change return type to int, add new `except'
9395         parameter and handle it.
9396         (unsuspend_and_proceed_one_lwp): New.
9397         (proceed_all_lwps): Use find_inferior instead of
9398         for_each_inferior.
9399         (unstop_all_lwps): Add `unsuspend' parameter.  If UNSUSPEND, them
9400         also decrement the suspend count of LWPs.  Pass `except' down,
9401         instead of hacking its suspend count.
9402         (linux_pause_all): Add `freeze' parameter.  Adjust.
9403         (linux_unpause_all): New.
9404         (linux_target_ops): Install linux_unpause_all.
9405         * server.c (handle_status): Adjust.
9406         * target.h (struct target_ops): New fields `unpause_all' and
9407         `cancel_breakpoints'.  Add new parameter to `pause_all'.
9408         (pause_all): Add new `freeze' parameter.
9409         (unpause_all): New.
9410         (cancel_breakpoints): New.
9411         * tracepoint.c (clear_installed_tracepoints): Pause threads, and
9412         cancel breakpoints.
9413         (cmd_qtstart): Pause threads.
9414         (stop_tracing): Pause threads, and cancel breakpoints.
9415         * win32-low.c (win32_target_ops): Adjust.
9416
9417 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
9418
9419         * linux-low.c (linux_wait_for_event_1): Move passing the signal to
9420         the inferior right away from here...
9421         (linux_wait_1): ... to here, and adjust to check the thread's
9422         last_resume_kind instead of the lwp's step or stop_expected flags.
9423
9424 2010-05-02  Pedro Alves  <pedro@codesourcery.com>
9425
9426         * README: Use consistent `GDB' and `GDBserver' spellings.
9427
9428 2010-05-02  Pedro Alves  <pedro@codesourcery.com>
9429
9430         * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
9431         (linux_kill): Stop all lwps here.  Don't delete the main lwp here.
9432         (linux_detach_one_lwp): Assume the lwp is stopped.
9433         (any_thread_of): Delete.
9434         (linux_detach): Stop all lwps here.  Don't blindly delete all
9435         breakpoints.
9436         (delete_lwp_callback): New.
9437         (linux_mourn): Delete all lwps of the process that is gone.
9438         (linux_wait_1): Don't delete the last lwp of the process here.
9439         * mem-break.h (mark_breakpoints_out): Declare.
9440         * mem-break.c (mark_breakpoints_out): New.
9441         (free_all_breakpoints): Use it.
9442         * server.c (handle_target_event): If the process is gone, mark
9443         breakpoints out.
9444         * thread-db.c (struct thread_db) <create_bp>: New field.
9445         (thread_db_enable_reporting): Fix prototype.  Store a thread event
9446         breakpoint reference in the thread_db struct.
9447         (thread_db_load_search): Clear the thread_db object.
9448         (try_thread_db_load_1): Ditto.
9449         (switch_to_process): New.
9450         (disable_thread_event_reporting): Use it.
9451         (remove_thread_event_breakpoints): New.
9452         (thread_db_detach, thread_db_mourn): Use it.
9453
9454 2010-05-01  Pedro Alves  <pedro@codesourcery.com>
9455
9456         * linux-low.c (linux_enable_event_reporting): New.
9457         (linux_wait_for_event_1, handle_extended_wait): Use it.
9458
9459 2010-04-30  Pedro Alves  <pedro@codesourcery.com>
9460
9461         * linux-low.c (linux_kill_one_lwp, linux_kill)
9462         (linux_detach_one_lwp): Adjust to send_sigstop interface change.
9463         (send_sigstop): Take an lwp_info as parameter instead.  Queue a
9464         SIGSTOP even if the LWP is stopped.
9465         (send_sigstop_callback): New.
9466         (stop_all_lwps): Use send_sigstop_callback instead.
9467         (linux_resume_one_thread): Adjust.
9468         (proceed_one_lwp): Still proceed an LWP that the client has
9469         requested to stop, if we haven't reported it as stopped yet.  Make
9470         sure that LWPs the client want stopped, have a pending SIGSTOP.
9471
9472 2010-04-26  Doug Evans  <dje@google.com>
9473
9474         * server.c (handle_general_set): Make static.
9475
9476         * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
9477         Print received char after testing for error/eof instead of before.
9478         (input_interrupt): Tweak comment.
9479
9480 2010-04-23  Doug Evans  <dje@google.com>
9481
9482         * server.c (start_inferior): Print inferior argv if --debug.
9483
9484 2010-04-21  Aleksandar Ristovski  <aristovski@qnx.com>
9485
9486         * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
9487         * nto-x86-low.c: Include server.h
9488
9489 2010-04-20  Pierre Muller  <muller@ics.u-strasbg.fr>
9490
9491         * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
9492         be consistent with other sources of this directory.
9493         (init_registers_amd64): Correct name of source file of this function
9494         in the comment.
9495
9496 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
9497
9498         * configure.srv (x86_64-*-mingw*): New configuration for Windows
9499         64-bit executables.
9500
9501 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
9502
9503         * win32-i386-low.c: Add 64-bit support.
9504         (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
9505         (init_registers_amd64): Declare.
9506         (mappings): Add 64-bit version of array.
9507         (init_windows_x86): New function.
9508         (the_low_target): Change init_arch field to init_windows_x86.
9509
9510 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
9511
9512         * win32-low.c: Adapt to support also 64-bit architecture.
9513         (child_xfer_memory): Use uintptr_t type for local variable `addr'.
9514         (get_image_name): Use SIZE_T type for local variable `done'.
9515         (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
9516         (toolhelp_get_dll_name): Idem.
9517         (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
9518         Use uintptr_t typecast to avoid warning.
9519         (handle_unload_dll): Use uintptr_t typecast to avoid warning.
9520         (handle_exception): Use phex_nz to avoid warning.
9521         (win32_wait): Remove unused local variable `process'.
9522
9523 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
9524
9525         * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
9526         `amd64-avx.o'.
9527
9528 2010-04-17  Pierre Muller  <muller@ics.u-strasbg.fr>
9529
9530         * configure.ac: Use `ws2_32' library for srv_mingw.
9531         * configure: Regenerate.
9532         * gdbreplay.c: Include winsock2.h instead of winsock.h.
9533         * remote-utils.c: Likewise.
9534
9535 2010-04-17  H.J. Lu  <hongjiu.lu@intel.com>
9536
9537         * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
9538         if __x86_64__ is defined.
9539
9540 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
9541
9542         * configure: Regenerate.
9543
9544 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
9545
9546         * server.c (handle_query): Handle 'qGetTIBAddr' query.
9547         * target.h (target_ops): New get_tib_address field.
9548         * win32-low.h (win32_thread_info): Add thread_local_base field.
9549         * win32-low.c (child_add_thread): Add tlb argument.
9550         Set thread_local_base field to TLB.
9551         (get_child_debug_event): Adapt to child_add_thread change.
9552         (win32_get_tib_address): New function.
9553         (win32_target_ops): Set get_tib_address field to
9554         win32_get_tib_address.
9555         * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
9556
9557 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
9558
9559         * linux-low.c (linux_mourn): Also remove the process.
9560         * server.c (handle_target_event): Don't remove the process here.
9561         * nto-low.c (nto_mourn): New.
9562         (nto_target_ops): Install it.
9563         * spu-low.c (spu_mourn): New.
9564         (spu_target_ops): Install it.
9565         * win32-low.c (win32_mourn): New.
9566         (win32_target_ops): Install it.
9567
9568 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
9569
9570         * server.h (buffer_xml_printf): Remove redundant `;'.
9571
9572 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
9573
9574         * regcache.c (set_register_cache): Invalidate regcaches before
9575         changing the register cache layout.
9576         (regcache_invalidate_one): Allow a NULL regcache.
9577         * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
9578         regcaches before changing the register cache layout or the target
9579         regsets.
9580
9581 2010-04-12  H.J. Lu  <hongjiu.lu@intel.com>
9582
9583         * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
9584         variable warning on Linux/x86-64.
9585
9586 2010-04-11  Pedro Alves  <pedro@codesourcery.com>
9587
9588         GDBserver disconnected tracing support.
9589
9590         * linux-low.c (linux_remove_process): Delete.
9591         (add_lwp): Don't set last_resume_kind here.
9592         (linux_kill): Use `mourn'.
9593         (linux_detach): Use `thread_db_detach', and `mourn'.
9594         (linux_mourn): New.
9595         (linux_attach_lwp_1): Adjust comment.
9596         (linux_attach): last_resume_kind moved the thread_info; adjust.
9597         (status_pending_p_callback): Adjust.
9598         (linux_wait_for_event_1): Adjust.
9599         (count_events_callback, select_singlestep_lwp_callback)
9600         (select_event_lwp_callback, cancel_breakpoints_callback)
9601         (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
9602         (proceed_one_lwp): Adjust.
9603         (linux_async): Add debug output.
9604         (linux_thread_stopped): New.
9605         (linux_pause_all): New.
9606         (linux_target_ops): Install linux_mourn, linux_thread_stopped and
9607         linux_pause_all.
9608         * linux-low.h (struct lwp_info): Delete last_resume_kind field.
9609         (thread_db_free): Delete declaration.
9610         (thread_db_detach, thread_db_mourn): Declare.
9611         * thread-db.c (thread_db_init): Use thread_db_mourn.
9612         (thread_db_free): Delete, split in two.
9613         (disable_thread_event_reporting): New.
9614         (thread_db_detach): New.
9615         (thread_db_mourn): New.
9616
9617         * server.h (struct thread_info) <last_resume_kind>: New field.
9618         <attached>: Add comment.
9619         <gdb_detached>: New field.
9620         (handler_func): Change return type to int.
9621         (handle_serial_event, handle_target_event): Ditto.
9622         (gdb_connected): Declare.
9623         (tracing): Delete.
9624         (disconnected_tracing): Declare.
9625         (stop_tracing): Declare.
9626
9627         * server.c (handle_query) <qSupported>: Report support for
9628         disconnected tracing.
9629         (queue_stop_reply_callback): Account for running threads.
9630         (gdb_wants_thread_stopped): New.
9631         (gdb_wants_all_threads_stopped): New.
9632         (gdb_reattached_process): New.
9633         (handle_status): Clear the `gdb_detached' flag of all processes.
9634         In all-stop, stop all threads.
9635         (main): Be sure to leave tfind mode.  Handle disconnected tracing.
9636         (process_serial_event): If the remote connection breaks, or if an
9637         exit was forced with "monitor exit", force an event loop exit.
9638         Handle disconnected tracing on detach.
9639         (handle_serial_event): Adjust.
9640         (handle_target_event): If GDB isn't connected, forward events back
9641         to the inferior, unless the last process exited, in which case,
9642         exit gdbserver.  Adjust interface.
9643
9644         * remote-utils.c (remote_open): Don't block in accept.  Instead
9645         register an event loop source on the listen socket file
9646         descriptor.  Refactor bits into ...
9647         (listen_desc): ... this new global.
9648         (gdb_connected): ... this new function.
9649         (enable_async_notification): ... this new function.
9650         (handle_accept_event): ... this new function.
9651         (remote_close): Clear remote_desc.
9652
9653         * inferiors.c (add_thread): Set the new thread's last_resume_kind.
9654
9655         * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
9656         New fields.
9657         (mourn_inferior): Define.
9658         (target_process_qsupported): Avoid the dangling else problem.
9659         (thread_stopped): Define.
9660         (pause_all): Define.
9661         (target_waitstatus_to_string): Declare.
9662         * target.c (target_waitstatus_to_string): New.
9663
9664         * tracepoint.c (tracing): Make extern.
9665         (disconnected_tracing): New.
9666         (stop_tracing): Make extern.  Handle tracing stops due to GDB
9667         disconnecting.
9668         (cmd_qtdisconnected): New.
9669         (cmd_qtstatus): Report disconnected tracing status in trace reply.
9670         (handle_tracepoint_general_set): Handle QTDisconnected.
9671
9672         * event-loop.c (event_handler_func): Change return type to int.
9673         (process_event): Bail out if the event handler wants the event
9674         loop to stop.
9675         (handle_file_event): Ditto.
9676         (start_event_loop): Bail out if the event handler wants the event
9677         loop to stop.
9678
9679         * nto-low.c (nto_target_ops): Adjust.
9680         * spu-low.c (spu_wait): Don't remove the process here.
9681         (spu_target_ops): Adjust.
9682         * win32-low.c (win32_wait): Don't remove the process here.
9683         (win32_target_ops): Adjust.
9684
9685 2010-04-11  Pedro Alves  <pedro@codesourcery.com>
9686
9687         * regcache.c (realloc_register_cache): Invalidate inferior's
9688         regcache before recreating it.
9689
9690 2010-04-09  Pedro Alves  <pedro@codesourcery.com>
9691
9692         * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
9693
9694 2010-04-09  Stan Shebs  <stan@codesourcery.com>
9695             Pedro Alves  <pedro@codesourcery.com>
9696
9697         * server.h (LONGEST): New.
9698         (struct thread_info) <while_stepping>: New field.
9699         (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
9700         Declare.
9701         (initialize_tracepoint, handle_tracepoint_general_set)
9702         (handle_tracepoint_query, tracepoint_finished_step)
9703         (tracepoint_was_hit, release_while_stepping_state_list):
9704         (current_traceframe): Declare.
9705         * server.c (handle_general_set): Handle tracepoint packets.
9706         (read_memory): New.
9707         (write_memory): New.
9708         (handle_search_memory_1): Use read_memory.
9709         (handle_query): Report support for conditional tracepoints, trace
9710         state variables, and tracepoint sources.  Handle tracepoint
9711         queries.
9712         (main): Initialize the tracepoints module.
9713         (process_serial_event): Handle traceframe reads/writes.
9714
9715         * linux-low.c (handle_tracepoints): New.
9716         (linux_wait_1): Call it.
9717         (linux_resume_one_lwp): Handle while-stepping.
9718         (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
9719         (linux_target_ops): Install them.
9720         * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
9721         New field.
9722         * linux-x86-low.c (x86_supports_tracepoints): New.
9723         (the_low_target). Install it.
9724
9725         * mem-break.h (delete_breakpoint): Declare.
9726         * mem-break.c (delete_breakpoint): Make external.
9727
9728         * target.h (struct target_ops): Add `supports_tracepoints',
9729         `read_pc', and `write_pc' fields.
9730         (target_supports_tracepoints): Define.
9731         * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
9732         (phex_nz): New.
9733
9734         * regcache.h (struct regcache) <registers_owned>: New field.
9735         (init_register_cache, regcache_cpy): Declare.
9736         (regcache_read_pc, regcache_write_pc): Declare.
9737         (register_cache_size): Declare.
9738         (supply_regblock): Declare.
9739         * regcache.c (init_register_cache): New.
9740         (new_register_cache): Use it.
9741         (regcache_cpy): New.
9742         (register_cache_size): New.
9743         (supply_regblock): New.
9744         (regcache_read_pc, regcache_write_pc): New.
9745
9746         * tracepoint.c: New.
9747
9748         * Makefile.in (OBS): Add tracepoint.o.
9749         (tracepoint.o): New rule.
9750
9751 2010-04-08  H.J. Lu  <hongjiu.lu@intel.com>
9752
9753         * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
9754         (i386-mmx.o): New.
9755         (i386-mmx.c): Likewise.
9756         (i386-mmx-linux.o): Likewise.
9757         (i386-mmx-linux.c): Likewise.
9758
9759         * configure.srv (srv_i386_regobj): Add i386-mmx.o.
9760         (srv_i386_linux_regobj): Add i386-mmx-linux.o.
9761         (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
9762         (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
9763
9764         * linux-x86-low.c (init_registers_i386_mmx_linux): New.
9765         (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
9766         and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
9767
9768 2010-04-07  H.J. Lu  <hongjiu.lu@intel.com>
9769
9770         * Makefile.in (clean): Updated.
9771         (i386-avx.o): New.
9772         (i386-avx.c): Likewise.
9773         (i386-avx-linux.o): Likewise.
9774         (i386-avx-linux.c): Likewise.
9775         (amd64-avx.o): Likewise.
9776         (amd64-avx.c): Likewise.
9777         (amd64-avx-linux.o): Likewise.
9778         (amd64-avx-linux.c): Likewise.
9779
9780         * configure.srv (srv_i386_regobj): Add i386-avx.o.
9781         (srv_i386_linux_regobj): Add i386-avx-linux.o.
9782         (srv_amd64_regobj): Add amd64-avx.o.
9783         (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
9784         (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
9785         (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
9786         (srv_i386_xmlfiles): Add i386/i386-avx.xml.
9787         (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
9788         (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
9789         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
9790
9791         * i387-fp.c: Include "i386-xstate.h".
9792         (i387_xsave): New.
9793         (i387_cache_to_xsave): Likewise.
9794         (i387_xsave_to_cache): Likewise.
9795         (x86_xcr0): Likewise.
9796
9797         * i387-fp.h (i387_cache_to_xsave): Likewise.
9798         (i387_xsave_to_cache): Likewise.
9799         (x86_xcr0): Likewise.
9800
9801         * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
9802         * linux-crisv32-low.c (target_regsets): Likewise.
9803         * linux-m68k-low.c (target_regsets): Likewise.
9804         * linux-mips-low.c (target_regsets): Likewise.
9805         * linux-ppc-low.c (target_regsets): Likewise.
9806         * linux-s390-low.c (target_regsets): Likewise.
9807         * linux-sh-low.c (target_regsets): Likewise.
9808         * linux-sparc-low.c (target_regsets): Likewise.
9809         * linux-xtensa-low.c (target_regsets): Likewise.
9810
9811         * linux-low.c: Include <sys/uio.h>.
9812         (regsets_fetch_inferior_registers): Support nt_type.
9813         (regsets_store_inferior_registers): Likewise.
9814         (linux_process_qsupported): New.
9815         (linux_target_ops): Add linux_process_qsupported.
9816
9817         * linux-low.h (regset_info): Add nt_type.
9818         (linux_target_ops): Add process_qsupported.
9819
9820         * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
9821         and <sys/uio.h>.
9822         (init_registers_i386_avx_linux): New.
9823         (init_registers_amd64_avx_linux): Likewise.
9824         (xmltarget_i386_linux_no_xml): Likewise.
9825         (xmltarget_amd64_linux_no_xml): Likewise.
9826         (PTRACE_GETREGSET): Likewise.
9827         (PTRACE_SETREGSET): Likewise.
9828         (x86_fill_xstateregset): Likewise.
9829         (x86_store_xstateregset): Likewise.
9830         (use_xml): Likewise.
9831         (x86_linux_update_xmltarget): Likewise.
9832         (x86_linux_process_qsupported): Likewise.
9833         (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
9834         (x86_arch_setup): Don't call init_registers_amd64_linux nor
9835         init_registers_i386_linux here.  Call
9836         x86_linux_update_xmltarget.
9837         (the_low_target): Add x86_linux_process_qsupported.
9838
9839         * server.c (handle_query): Call target_process_qsupported.
9840
9841         * target.h (target_ops): Add process_qsupported.
9842         (target_process_qsupported): New.
9843
9844 2010-04-03  Pedro Alves  <pedro@codesourcery.com>
9845
9846         * inferiors.c (add_thread): Set last_status kind to
9847         TARGET_WAITKIND_IGNORE.
9848         * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
9849         fetch.  Use ptid_of.  Avoid unnecessary get_lwp_thread calls.
9850         (linux_wait_1): Move `thread' local definition to block that uses
9851         it.  Don't NULL initialize `event_child'.
9852         (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
9853         Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
9854         * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
9855
9856 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
9857
9858         * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
9859         an extended waitstatus, or by a watchpoint.
9860         (cancel_breakpoints_callback): Don't cancel a breakpoint if the
9861         thread was stepping or has been stopped by a watchpoint.
9862
9863 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
9864
9865         * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
9866         (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
9867         of another, then delete the previous, and validate all
9868         breakpoints.
9869         (validate_inserted_breakpoint): New.
9870         (delete_disabled_breakpoints): New.
9871         (validate_breakpoints): New.
9872         (check_mem_read): Validate breakpoints before trusting their
9873         shadow.  Delete disabled breakpoints.
9874         (check_mem_write): Validate breakpoints before trusting they
9875         should be inserted.  Delete disabled breakpoints.
9876         * mem-break.h (validate_breakpoints):
9877         * server.c (handle_query): Validate breakpoints when we see a
9878         qSymbol query.
9879
9880 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
9881
9882         * linux-low.c (linux_wait_1): Avoid setting need_step_over is
9883         there's a GDB breakpoint at stop_pc.  Always report a trap to GDB
9884         if we could tell there's a GDB breakpoint at stop_pc.
9885         (need_step_over_p): Don't do a step over if we find a GDB
9886         breakpoint at the resume PC.
9887
9888         * mem-break.c (struct raw_breakpoint): New.
9889         (enum bkpt_type): New type `gdb_breakpoint'.
9890         (struct breakpoint): Delete the `PC', `old_data' and `inserted'
9891         fields.  New field `raw'.
9892         (find_raw_breakpoint_at): New.
9893         (set_raw_breakpoint_at): Handle refcounting.  Create a raw
9894         breakpoint instead.
9895         (set_breakpoint_at): Adjust.
9896         (delete_raw_breakpoint): New.
9897         (release_breakpoint): New.
9898         (delete_breakpoint): Rename to...
9899         (delete_breakpoint_1): ... this.  Add proc parameter.  Use
9900         release_breakpoint.  Return ENOENT.
9901         (delete_breakpoint): Reimplement.
9902         (find_breakpoint_at): Delete.
9903         (find_gdb_breakpoint_at): New.
9904         (delete_breakpoint_at): Delete.
9905         (set_gdb_breakpoint_at): New.
9906         (delete_gdb_breakpoint_at): New.
9907         (gdb_breakpoint_here): New.
9908         (set_reinsert_breakpoint): Use release_breakpoint.
9909         (uninsert_breakpoint): Rename to ...
9910         (uninsert_raw_breakpoint): ... this.
9911         (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
9912         (reinsert_raw_breakpoint): Change parameter type to
9913         raw_breakpoint.
9914         (reinsert_breakpoints_at): Adjust to handle raw breakpoints
9915         instead.
9916         (check_breakpoints): Adjust.  Use release_breakpoint.
9917         (breakpoint_here): Rewrite using find_raw_breakpoint_at.
9918         (breakpoint_inserted_here): Ditto.
9919         (check_mem_read): Adjust to iterate over raw breakpoints instead.
9920         Don't trust the breakpoint's shadow if it is not inserted.
9921         (check_mem_write): Adjust to iterate over raw breakpoints instead.
9922         (delete_all_breakpoints): Adjust.
9923         (free_all_breakpoints): Mark all breakpoints as uninserted, and
9924         use delete_breakpoint_1.
9925
9926         * mem-break.h (breakpoints_supported): Delete declaration.
9927         (set_gdb_breakpoint_at): Declare.
9928         (gdb_breakpoint_here): Declare.
9929         (delete_breakpoint_at): Delete.
9930         (delete_gdb_breakpoint_at): Declare.
9931
9932         * server.h (struct raw_breakpoint): Forward declare.
9933         (struct process_info): New field `raw_breakpoints'.
9934
9935         * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
9936         breakpoints.
9937
9938 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
9939
9940         * linux-low.c (status_pending_p_callback): Fix comment.
9941         (linux_wait_for_event_1): Move most of the internal breakpoint
9942         handling from here...
9943         (linux_wait_1): ... to here.
9944         (count_events_callback): New.
9945         (select_singlestep_lwp_callback): New.
9946         (select_event_lwp_callback): New.
9947         (cancel_breakpoints_callback): New.
9948         (select_event_lwp): New.
9949         (linux_wait_1): Simplify internal breakpoint handling.  Give equal
9950         priority to all LWPs that have had events that should be reported
9951         to the client.  Cancel breakpoints when about to reporting the
9952         event to the client, not while stopping lwps.  No longer cancel
9953         finished single-steps here.
9954         (cancel_finished_single_step): Delete.
9955         (cancel_finished_single_steps): Delete.
9956
9957 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
9958
9959         * mem-break.c (enum bkpt_type): New.
9960         (struct breakpoint): New field `type'.
9961         (set_breakpoint_at): Change return type to struct breakpoint
9962         pointer.  Set type to `other_breakpoint' by default.
9963         (delete_breakpoint): Rewrite, supporting more than one breakpoint
9964         in the breakpoint list.
9965         (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
9966         (reinsert_breakpoint): Rename to ...
9967         (reinsert_raw_breakpoint): ... this.
9968         (reinsert_breakpoints_at): Adjust.
9969         * mem-break.h (struct breakpoint): Declare.
9970         (set_breakpoint_at): Change return type to struct breakpoint
9971         pointer.
9972
9973 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
9974
9975         * server.c (handle_query): Assign, not compare.
9976
9977 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
9978
9979         Teach linux gdbserver to step-over-breakpoints.
9980
9981         * linux-low.c (can_hardware_single_step): New.
9982         (supports_breakpoints): New.
9983         (handle_extended_wait): If stopping threads, read the stop pc of
9984         the new cloned LWP.
9985         (get_pc): New.
9986         (get_stop_pc): Add `lwp' parameter.  Handle it.  Bail out if the
9987         low target doesn't support retrieving the PC.
9988         (add_lwp): Set last_resume_kind to resume_continue.
9989         (linux_attach_lwp_1): Adjust comments.  Always set stop_expected.
9990         (linux_attach): Don't clear stop_expected.  Set the lwp's
9991         last_resume_kind to resume_stop.
9992         (linux_detach_one_lwp): Don't check for removed breakpoints.
9993         (check_removed_breakpoint): Delete.
9994         (status_pending_p): Rename to ...
9995         (status_pending_p_callback): ... this.  Don't check for removed
9996         breakpoints.  Don't consider threads that are stopped from GDB's
9997         perspective.
9998         (linux_wait_for_lwp): Always read the stop_pc here.
9999         (cancel_breakpoint): New.
10000         (step_over_bkpt): New global.
10001         (linux_wait_for_event_1): Implement stepping over breakpoints.
10002         (gdb_wants_lwp_stopped): New.
10003         (gdb_wants_all_stopped): New.
10004         (linux_wait_1): Tag threads as gdb-wants-stopped.  Cancel finished
10005         single-step traps here.  Store the thread's last reported target
10006         wait status.
10007         (send_sigstop): Don't clear stop_expected.  Always set it,
10008         instead.
10009         (mark_lwp_dead): Remove reference to pending_is_breakpoint.
10010         (cancel_finished_single_step): New.
10011         (cancel_finished_single_steps): New.
10012         (wait_for_sigstop): Don't cancel finished single-step traps here.
10013         (linux_resume_one_lwp): Don't check for removed breakpoints.
10014         Don't set `step' on non-hardware step archs.
10015         (linux_set_resume_request): Ignore resume_stop requests if already
10016         stopping or stopped.  Set the lwp's last_resume_kind.
10017         (resume_status_pending_p): Don't check for removed breakpoints.
10018         (need_step_over_p): New.
10019         (start_step_over): New.
10020         (finish_step_over): New.
10021         (linux_resume_one_thread): Always queue a sigstop for resume_stop
10022         requests.  Clear the thread's last reported target waitstatus.
10023         Don't use the `suspended' flag.  Don't consider pending breakpoints.
10024         (linux_resume): Start a step-over if necessary.
10025         (proceed_one_lwp): New.
10026         (proceed_all_lwps): New.
10027         (unstop_all_lwps): New.
10028         * linux-low.h (struct lwp_info): Rewrite comment for the
10029         `suspended' flag.  Add the `stop_pc' field.  Delete the
10030         `pending_stop_pc' field.  Tweak the `stepping' flag's comment.
10031         Add `'last_resume_kind' and `need_step_over' fields.
10032         * inferiors.c (struct thread_info): Delete, moved elsewhere.
10033         * mem-break.c (struct breakpoint): Delete `reinserting' flag.
10034         Delete `breakpoint_to_reinsert' field.  New flag `inserted'.
10035         (set_raw_breakpoint_at): New.
10036         (set_breakpoint_at): Rewrite to use it.
10037         (reinsert_breakpoint_handler): Delete.
10038         (set_reinsert_breakpoint): New.
10039         (reinsert_breakpoint_by_bp): Delete.
10040         (delete_reinsert_breakpoints): New.
10041         (uninsert_breakpoint): Rewrite.
10042         (uninsert_breakpoints_at): New.
10043         (reinsert_breakpoint): Rewrite.
10044         (reinsert_breakpoints_at): New.
10045         (check_breakpoints): Rewrite.
10046         (breakpoint_here): New.
10047         (breakpoint_inserted_here): New.
10048         (check_mem_read): Adjust.
10049         * mem-break.h (breakpoints_supported, breakpoint_here)
10050         (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10051         (reinsert_breakpoint_by_bp): Delete declaration.
10052         (delete_reinsert_breakpoints): Declare.
10053         (reinsert_breakpoint): Delete declaration.
10054         (reinsert_breakpoints_at): Declare.
10055         (uninsert_breakpoint): Delete declaration.
10056         (uninsert_breakpoints_at): Declare.
10057         (check_breakpoints): Adjust prototype.
10058         * server.h: Adjust include order.
10059         (struct thread_info): Declare here.  Add a `last_status' field.
10060
10061 2010-03-23  Michael Snyder  <msnyder@vmware.com>
10062
10063         * server.c (crc32): New function.
10064         (handle_query): Add handling for 'qCRC:' request.
10065
10066 2010-03-23  Pedro Alves  <pedro@codesourcery.com>
10067
10068         * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10069         lwp had been stopped by a watchpoint.
10070
10071 2010-03-16  Pedro Alves  <pedro@codesourcery.com>
10072
10073         * server.h (internal_error): Declare.
10074         (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
10075         * utils.c (internal_error): New function.
10076
10077 2010-03-15  Andreas Schwab  <schwab@redhat.com>
10078
10079         * configure.srv: Fix typo setting srv_regobj.
10080
10081 2010-03-15  Pedro Alves  <pedro@codesourcery.com>
10082
10083         * linux-low.c (fetch_register): Avoid passing a non string literal
10084         format to `error'.
10085         (usr_store_inferior_registers): Ditto.
10086
10087 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
10088
10089         * linux-low.c (linux_write_memory): Bail out early if peeking
10090         memory failed.
10091
10092 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
10093
10094         * linux-low.h (struct lwp_info): New fields
10095         `stopped_by_watchpoint' and `stopped_data_address'.
10096         * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
10097         here, and cache them in the lwp object.
10098         (wait_for_sigstop): Check stopped_by_watchpoint lwp field
10099         directly.
10100         (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
10101         field.
10102         (linux_stopped_by_watchpoint): Rewrite.
10103         (linux_stopped_data_address): Rewrite.
10104
10105 2010-03-06  Simo Melenius  <simo.melenius@iki.fi>
10106
10107         * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
10108         switching the current inferior, not before.
10109
10110 2010-03-01  H.J. Lu  <hongjiu.lu@intel.com>
10111
10112         * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
10113         reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
10114         i386-linux.c and amd64-linux.c.
10115         (reg-i386.o): Removed.
10116         (reg-i386.c): Likewise.
10117         (reg-i386-linux.o): Likewise.
10118         (reg-i386-linux.c): Likewise.
10119         (reg-x86-64.o): Likewise.
10120         (reg-x86-64.c): Likewise.
10121         (reg-x86-64-linux.o): Likewise.
10122         (reg-x86-64-linux.c): Likewise.
10123         (i386.o): New.
10124         (i386.c): Likewise.
10125         (i386-linux.o): Likewise.
10126         (i386-linux.c): Likewise.
10127         (amd64.o): Likewise.
10128         (amd64.c): Likewise.
10129         (amd64-linux.o): Likewise.
10130         (amd64-linux.c): Likewise.
10131
10132         * configure.srv (srv_i386_regobj): New.
10133         (srv_i386_linux_regobj): Likewise.
10134         (srv_amd64_regobj): Likewise.
10135         (srv_amd64_linux_regobj): Likewise.
10136         (srv_i386_32bit_xmlfiles): Likewise.
10137         (srv_i386_64bit_xmlfiles): Likewise.
10138         (srv_i386_xmlfiles): Likewise.
10139         (srv_amd64_xmlfiles): Likewise.
10140         (srv_i386_linux_xmlfiles): Likewise.
10141         (srv_amd64_linux_xmlfiles): Likewise.
10142         (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj.  Set
10143         srv_xmlfiles to $srv_i386_xmlfiles.
10144         (i[34567]86-*-mingw32ce*): Likewise.
10145         (i[34567]86-*-mingw*): Likewise.
10146         (i[34567]86-*-nto*): Likewise.
10147         (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
10148         and $srv_amd64_linux_regobj.  Set srv_xmlfiles to
10149         $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
10150         (x86_64-*-linux*): Likewise.
10151
10152         * linux-x86-low.c (init_registers_x86_64_linux): Removed.
10153         (init_registers_amd64_linux): New.
10154         (x86_arch_setup): Replace init_registers_x86_64_linux with
10155         init_registers_amd64_linux.
10156
10157 2010-02-23  Maxim Kuvyrkov  <maxim@codesourcery.com>
10158
10159         * configure.ac: Check for libdl.  If it is not available link against
10160         static libthread_db.
10161         * configure: Regenerate.
10162
10163 2010-02-22  Pedro Alves  <pedro@codesourcery.com>
10164
10165         PR9605
10166
10167         * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
10168         handing a read watchpoint.
10169         (i386_low_insert_watchpoint): Read watchpoints aren't supported.
10170
10171 2010-02-12  Doug Evans  <dje@google.com>
10172
10173         * linux-low.c (linux_supports_tracefork_flag): Document.
10174         (linux_look_up_symbols): Add comment.
10175
10176 2010-02-03  H.J. Lu  <hongjiu.lu@intel.com>
10177
10178         * regcache.c (supply_register): Clear regcache if buf is NULL.
10179
10180 2010-02-02  Nicolas Roche  <roche@sourceware.org>
10181             Joel Brobecker  <brobecker@adacore.com>
10182
10183         * inferiors.c (find_inferior): Add function documentation.
10184         (unloaded_dll): Handle the case where the unloaded dll has not
10185         been previously registered in the dll list.
10186
10187 2010-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
10188
10189         * linux-arm-low.c (thumb_breakpoint_len): Delete.
10190         (thumb2_breakpoint): New.
10191         (arm_breakpoint_at): Check for Thumb-2 breakpoints.
10192
10193 2010-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
10194
10195         * linux-low.c (get_stop_pc): Check for SIGTRAP.
10196         (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
10197         breakpoints.
10198
10199 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
10200
10201         * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
10202
10203 2010-01-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
10204
10205         * linux-s390-low.c (s390_collect_ptrace_register)
10206         (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
10207
10208 2010-01-21  Doug Evans  <dje@google.com>
10209
10210         * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
10211         (PTRACE_ARG4_TYPE): New macro.
10212         (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
10213         (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
10214         (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
10215         (usr_store_inferior_registers): Ditto.
10216         (linux_read_memory, linux_write_memory): Ditto.
10217         (linux_test_for_tracefork): Ditto.
10218
10219         * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
10220         Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
10221
10222 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
10223
10224         * proc-service.c (ps_lgetregs): Don't refetch registers from the
10225         target.
10226
10227 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
10228
10229         * spu-low.c (spu_fetch_registers, spu_store_registers): Change
10230         prototype to take a regcache.  Adjust.
10231
10232 2010-01-20  Pedro Alves  <pedro@codesourcery.com>
10233
10234         * regcache.h (struct thread_info): Forward declare.
10235         (struct regcache): New.
10236         (new_register_cache): Adjust prototype.
10237         (get_thread_regcache): Declare.
10238         (free_register_cache): Adjust prototype.
10239         (registers_to_string, registers_from_string): Ditto.
10240         (supply_register, supply_register_by_name, collect_register)
10241         (collect_register_as_string, collect_register_by_name): Ditto.
10242         * regcache.c (struct inferior_regcache_data): Delete.
10243         (get_regcache): Rename to ...
10244         (get_thread_regcache): ... this.  Adjust.  Switch inferior before
10245         fetching registers.
10246         (regcache_invalidate_one): Adjust.
10247         (regcache_invalidate): Fix prototype.
10248         (new_register_cache): Return the new register cache.
10249         (free_register_cache): Change prototype.
10250         (realloc_register_cache): Adjust.
10251         (registers_to_string): Change prototype to take a regcache.  Adjust.
10252         (registers_from_string): Ditto.
10253         (register_data): Ditto.
10254         (supply_register): Ditto.
10255         (supply_register_by_name): Ditto.
10256         (collect_register): Ditto.
10257         (collect_register_as_string): Ditto.
10258         (collect_register_by_name): Ditto.
10259         * server.c (process_serial_event): Adjust.
10260         * linux-low.h (regset_fill_func, regset_store_func): Change
10261         prototype.
10262         (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
10263         Change prototype.
10264         * linux-low.c (get_stop_pc): Adjust.
10265         (check_removed_breakpoint): Adjust.
10266         (linux_wait_for_event): Adjust.
10267         (linux_resume_one_lwp): Adjust.
10268         (fetch_register): Add regcache parameter.  Adjust.
10269         (usr_store_inferior_registers): Ditto.
10270         (regsets_fetch_inferior_registers): Ditto.
10271         (regsets_store_inferior_registers): Ditto.
10272         (linux_fetch_registers, linux_store_registers): Ditto.
10273         * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
10274         regcache.  Adjust.
10275         (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
10276         Ditto.
10277         * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
10278         prototype to take a regcache.
10279         (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
10280         * remote-utils.c (convert_ascii_to_int, outreg)
10281         (prepare_resume_reply): Change prototype to take a regcache.
10282         Adjust.
10283         * target.h (struct target_ops) <fetch_registers, store_registers>:
10284         Change prototype to take a regcache.
10285         (fetch_inferior_registers, store_inferior_registers): Change
10286         prototype to take a regcache.  Adjust.
10287         * proc-service.c (ps_lgetregs): Adjust.
10288         * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
10289         (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
10290         (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
10291         take a regcache.  Adjust.
10292         * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
10293         (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
10294         (arm_store_vfpregset, arm_get_pc, arm_set_pc):
10295         (arm_breakpoint_at): Change prototype to take a regcache.  Adjust.
10296         * linux-cris-low.c (cris_get_pc, cris_set_pc)
10297         (cris_cannot_fetch_register):
10298         (cris_breakpoint_at): Change prototype to take a regcache.
10299         Adjust.
10300         * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
10301         cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
10302         to take a regcache.  Adjust.
10303         (cris_breakpoint_at, cris_insert_point, cris_remove_point):
10304         Adjust.
10305         * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
10306         take a regcache.  Adjust.
10307         * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
10308         (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
10309         (m68k_set_pc): Change prototype to take a regcache.  Adjust.
10310         * linux-mips-low.c (mips_get_pc):
10311         (mips_set_pc): Change prototype to take a regcache.  Adjust.
10312         (mips_reinsert_addr): Adjust.
10313         (mips_collect_register): Change prototype to take a regcache.
10314         Adjust.
10315         (mips_supply_register):
10316         (mips_collect_register_32bit, mips_supply_register_32bit)
10317         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10318         (mips_store_fpregset): Ditto.
10319         * linux-ppc-low.c (ppc_supply_ptrace_register)
10320         (ppc_supply_ptrace_register): Ditto.
10321         (parse_spufs_run): Adjust.
10322         (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
10323         (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
10324         (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
10325         take a regcache.  Adjust.
10326         * linux-s390-low.c (s390_collect_ptrace_register)
10327         (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
10328         (s390_set_pc): Change prototype to take a regcache.  Adjust.
10329         (s390_arch_setup): Adjust.
10330         * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
10331         (sh_fill_gregset): Change prototype to take a regcache.  Adjust.
10332         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10333         (sparc_fill_gregset, sparc_store_gregset_from_stack)
10334         (sparc_store_gregset, sparc_get_pc): Change prototype to take a
10335         regcache.  Adjust.
10336         (sparc_breakpoint_at): Adjust.
10337         * linux-xtensa-low.c (xtensa_fill_gregset):
10338         (xtensa_store_gregset):
10339         (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
10340         (xtensa_set_pc): Change prototype to take a regcache.  Adjust.
10341         * nto-low.c (nto_fetch_registers, nto_store_registers): Change
10342         prototype to take a regcache.  Adjust.
10343         * win32-arm-low.c (arm_fetch_inferior_register)
10344         (arm_store_inferior_register): Change prototype to take a
10345         regcache.  Adjust.
10346         * win32-i386-low.c (i386_fetch_inferior_register)
10347         (i386_store_inferior_register): Change prototype to take a
10348         regcache.  Adjust.
10349         * win32-low.c (child_fetch_inferior_registers)
10350         (child_store_inferior_registers): Change prototype to take a
10351         regcache.  Adjust.
10352         (win32_wait): Adjust.
10353         (win32_fetch_inferior_registers): Change prototype to take a
10354         regcache.  Adjust.
10355         (win32_store_inferior_registers): Adjust.
10356         * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
10357         store_inferior_register>: Change prototype to take a regcache.
10358
10359 2010-01-20  Doug Evans  <dje@google.com>
10360
10361         * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
10362         #ifdef.
10363         (linux_wait_for_event1, linux_init_signals): Ditto.
10364         (W_STOPCODE): Provide definition if missing.
10365
10366 2010-01-13  Vladimir Prus  <vladimir@codesourcery.com>
10367
10368         * linux-low.c (linux_core_of_thread): New.
10369         (compare_ints, show_process, list_threads): New.
10370         (linux_qxfer_osdata): Report threads and cores.
10371         (linux_target_op): Register linux_core_of_thread.
10372         * remote-utils.c (prepare_resume_reply): Report the core.
10373         (buffer_xml_printf): Support %d specifier.
10374         * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
10375         New.
10376         (handle_query): Handle qXfer:threads.  Announce availability
10377         thereof.
10378         * target.h (struct target_ops): New field core_of_thread.
10379
10380 2010-01-04  Ulrich Weigand  <uweigand@de.ibm.com>
10381
10382         * Makefile.in (clean): Remove new generated files.
10383         (reg-s390.o, reg-s390.c): Remove rules.
10384         (reg-s390x.o, reg-s390x.c): Likewise.
10385         (s390-linux32.o, s390-linux32.c): Add rules.
10386         (s390-linux64.o, s390-linux64.c): Likewise.
10387         (s390x-linux64.o, s390x-linux64.c): Likewise.
10388         * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
10389         * linux-s390-low.c: Include <elf.h>.
10390         (HWCAP_S390_HIGH_GPRS): Define if undefined.
10391         (init_registers_s390): Remove prototype.
10392         (init_registers_s390x): Likewise.
10393         (init_registers_s390_linux32): Add prototype.
10394         (init_registers_s390_linux64): Likewise.
10395         (init_registers_s390x_linux64): Likewise.
10396         (s390_num_regs_3264): New define.
10397         (s390_regmap_3264): New global variable.
10398         (s390_cannot_fetch_register): Remove obsolete check.
10399         (s390_cannot_store_register): Likewise.
10400         (s390_collect_ptrace_register): Handle upper/lower register halves.
10401         (s390_supply_ptrace_register): Likewise.
10402         (s390_fill_gregset): Update to register number changes.
10403         (s390_get_hwcap): New routine.
10404         (s390_arch_setup): Detect 32-bit process running on 64-bit system.
10405         Install appropriate regmap and register set.
10406
10407 2010-01-01  Joel Brobecker  <brobecker@adacore.com>
10408
10409         * server.c (gdbserver_version): Update copyright year to 2010.
10410         * gdbreplay.c (gdbreplay_version): Likewise.
10411
10412 2009-12-28  Doug Evans  <dje@google.com>
10413
10414         * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
10415         elf/external.h.  Include <elf.h> instead but only if necessary.
10416
10417 2009-12-28  Pedro Alves  <pedro@codesourcery.com>
10418
10419         * linux-low.c (linux_remove_process): Remove `detaching'
10420         parameter.  Don't release/detach from thread_db here.
10421         (linux_kill): Release/detach from thread_db here, ...
10422         (linux_detach): ... and here, before actually detaching.
10423         (linux_wait_1): ... and here, when a process exits.
10424         * thread-db.c (any_thread_of): New.
10425         (thread_db_free): Switch the current inferior to a thread of the
10426         passed in process.
10427
10428 2009-12-21  Doug Evans  <dje@google.com>
10429
10430         * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
10431
10432         * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
10433         Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
10434         warning ifndef __NR_tkill.  Move setting of errno there too.
10435         Delete unnecessary resetting of errno after syscall.
10436         Minor comment changes to match gdb/linux-nat.c:kill_lwp.
10437
10438         * configure.ac: Check for dladdr.
10439         * config.in: Regenerate.
10440         * configure: Regenerate.
10441         * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
10442         (try_thread_db_load): Update.
10443
10444         * linux-low.c (my_waitpid): Delete unnecessary prototype.
10445
10446 2009-12-18  Doug Evans  <dje@google.com>
10447
10448         * event-loop.c: Include unistd.h if it exists.
10449
10450         * linux-low.c (my_waitpid): Move definition away from being in
10451         between linux_tracefork_child/linux_test_for_tracefork.
10452
10453         * gdb_proc_service.h (psaddr_t): Fix type.
10454         * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
10455         signature to match glibc.
10456
10457 2009-12-16  Doug Evans  <dje@google.com>
10458
10459         * linux-low.c (linux_read_memory): Fix argument to read.
10460
10461 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
10462
10463         * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
10464         events, don't leave current_inferior pointing at null.
10465
10466 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
10467
10468         * win32-low.c (LOG): Delete.
10469         (OUTMSG): Output to stderr.
10470         (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
10471         on compile time LOG macro.
10472         (win32_wait): Fix debug output.
10473
10474 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
10475
10476         * win32-low.c (win32_add_one_solib): If the dll name is
10477         "ntdll.dll", prepend the system directory to the dll path.
10478
10479 2009-11-17  Daniel Jacobowitz  <dan@codesourcery.com>
10480
10481         * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
10482
10483 2009-11-17  Nathan Sidwell  <nathan@codesourcery.com>
10484             Vladimir Prus  <vladimir@codesourcery.com>
10485
10486         * Makefile.in (reg-cf.o, reg-cf.c): New targets.
10487         * configure.ac: Check for __mcoldfire__ and set
10488         gdb_cv_m68k_is_coldfire.
10489         * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
10490         reg-cf.o and reg-m68k.o.
10491         * configure: Regenerated.
10492
10493 2009-11-16  Pedro Alves  <pedro@codesourcery.com>
10494
10495         * linux-low.c (linux_remove_process): Add `detaching' parameter.
10496         Pass it to thread_db_free.
10497         (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
10498         proper `detaching' argument to linux_remove_process.
10499         * linux-low.h (thread_db_free): Add `detaching' parameter.
10500         * thread-db.c (thread_db_init): Pass false as `detaching' argument
10501         to thread_db_free.
10502         (thread_db_free): Add `detaching' parameter.  Only
10503         call td_ta_clear_event if detaching from process.
10504
10505 2009-11-12  Maxim Kuvyrkov  <maxim@codesourcery.com>
10506
10507         * thread-db.c (thread_db_free): Fix typo.
10508
10509 2009-11-11  Paul Pluzhnikov  <ppluzhnikov@google.com>
10510
10511         PR gdb/10838
10512         * thread-db.c (thread_db_free): Call td_ta_clear_event.
10513
10514 2009-11-03  Nathan Sidwell  <nathan@codesourcery.com>
10515
10516         * configure.ac (i[34567]86-*): Check if we're targetting x86-64
10517         with an i686 compiler.
10518         * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
10519         needed.
10520         * configure: Rebuilt.
10521
10522 2009-10-29  Sandra Loosemore  <sandra@codesourcery.com>
10523
10524         PR gdb/10783
10525
10526         * server.c (handle_search_memory_1): Correct read_addr initialization
10527         in loop for searching subsequent chunks.
10528
10529 2009-10-29  Paul Pluzhnikov  <ppluzhnikov@google.com>
10530
10531         * configure.ac: New --with-libthread-db option.
10532         * thread-db.c: Allow direct dependence on libthread_db.
10533         (thread_db_free): Adjust.
10534         * config.in: Regenerate.
10535         * configure: Likewise.
10536
10537 2009-10-28  Paul Pluzhnikov  <ppluzhnikov@google.com>
10538
10539         PR gdb/10757
10540         * thread-db.c (attach_thread): New function.
10541         (maybe_attach_thread): Return success/failure.
10542         (find_new_threads_callback): Adjust.
10543         (thread_db_find_new_threads): Loop until no new threads.
10544
10545 2009-10-13  Pedro Alves  <pedro@codesourcery.com>
10546
10547         * proc-service.c (ps_lgetregs): Formatting.
10548
10549 2009-10-08  Paul Pluzhnikov  <ppluzhnikov@google.com>
10550
10551         * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
10552         * configure.ac: Adjust.
10553         * linux-low.h (struct process_info_private): Move members to struct
10554         thread_db.
10555         (thread_db_free, thread_db_handle_monitor_command): New prototype.
10556         * linux-low.c (linux_remove_process): Adjust.
10557         (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
10558         * server.c (handle_query): Move code ...
10559         (handle_monitor_command): ... here. New function.
10560         * target.h (struct target_ops): New member.
10561         * thread-db.c (struct thread_db): New.
10562         (libthread_db_search_path): New variable.
10563         (thread_db_create_event, thread_db_enable_reporting)
10564         (find_one_thread, maybe_attach_thread, find_new_threads_callback)
10565         (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
10566         (try_thread_db_load_1, dladdr_to_soname): New functions.
10567         (try_thread_db_load, thread_db_load_search): New functions.
10568         (thread_db_init): Search for libthread_db.
10569         (thread_db_free): New function.
10570         (thread_db_handle_monitor_command): Likewise.
10571         * config.in: Regenerate.
10572         * configure: Regenerate.
10573
10574 2009-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
10575
10576         * spu-low.c (spu_kill): Wait for inferior to terminate.
10577         Call clear_inferiors.
10578         (spu_detach): Call clear_inferiors.
10579
10580 2009-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10581
10582         * aclocal.m4: Regenerate.
10583         * config.in: Likewise.
10584         * configure: Likewise.
10585
10586 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
10587
10588         * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
10589         (parse_spufs_run): New function.
10590         (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
10591         (ppc_breakpoint_at): Handle SPU breakpoints.
10592
10593 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
10594
10595         * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
10596         (SPUFS_MAGIC): Define.
10597         (spu_enumerate_spu_ids): New function.
10598         (linux_qxfer_spu): New function.
10599         (linux_target_ops): Install linux_qxfer_spu.
10600
10601 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
10602
10603         * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
10604         and powerpc-cell64l.o to srv_regobj.  Add rs6000/powerpc-cell32l.xml
10605         and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
10606         * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
10607         (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
10608         (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
10609         * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
10610         (init_registers_powerpc_cell32l): Add prototype.
10611         (init_registers_powerpc_cell64l): Likewise.
10612         (ppc_arch_setup): Detect Cell/B.E. architecture.
10613
10614 2009-07-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10615
10616         * Makefile.in (datarootdir): New variable.
10617
10618 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
10619
10620         * linux-low.c (linux_write_memory): Update debugging output.
10621         * Makefile.in (clean): Add new descriptions.
10622         (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
10623         (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
10624         * configure.srv: Add new files for arm*-*-linux*.
10625         * linux-arm-low.c: Add new declarations.
10626         (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
10627         (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
10628         (HWCAP_VFPv3D16): New.
10629         (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
10630         instead of __IWMMXT__.
10631         (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
10632         (arm_arch_setup): New.
10633         (target_regsets): Remove #ifdef.  Add VFP regset.
10634         (the_low_target): Use arm_arch_setup.
10635
10636 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
10637
10638         * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
10639         the main thread again.
10640
10641 2009-07-06  Aleksandar Ristovski  <aristovski@qnx.com>
10642
10643         Adding Neutrino gdbserver.
10644         * configure: Regenerated.
10645         * configure.ac: Add case for srv_qnx and set LIBS accordingly.
10646         * configure.srv (i[34567]86-*-nto*): New target.
10647         * nto-low.c, nto-low.h, nto-x86-low.c: New files.
10648         * remote-utils.c [__QNX__]: Include sys/iomgr.h
10649         (nto_comctrl) [__QNX__]: New function.
10650         (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
10651
10652 2009-07-05  Danny Backx  <dannybackx@users.sourceforge.net>
10653
10654         * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
10655         srv_tgtobj.
10656
10657 2009-07-04  Danny Backx  <dannybackx@users.sourceforge.net>
10658             Pedro Alves  <pedro@codesourcery.com>
10659
10660         * win32-i386-low.c (i386_get_thread_context): Handle systems that
10661         don't support CONTEXT_EXTENDED_REGISTERS.
10662         (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
10663         (the_low_target): Install them.
10664         * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
10665         failing with ERROR_PIPE_NOT_CONNECTED.
10666
10667 2009-06-30  Doug Evans  <dje@google.com>
10668             Pierre Muller  <muller@ics.u-strasbg.fr>
10669
10670         Add h/w watchpoint support to x86-linux, win32-i386.
10671         * Makefile.in (SFILES): Add i386-low.c
10672         (i386_low_h): Define.
10673         (i386-low.o): Add dependencies.
10674         (linux-x86-low.o): Add i386-low.h dependency.
10675         (win32-i386-low.o): Ditto.
10676         * i386-low.c: New file.
10677         * i386-low.h: New file.
10678         * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
10679         (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
10680         * linux-low.c (linux_add_process): Initialize arch_private.
10681         (linux_remove_process): Free arch_private.
10682         (add_lwp): Initialize arch_private.
10683         (delete_lwp): Free arch_private.
10684         (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
10685         provided.
10686         * linux-low.h (process_info_private): New member arch_private.
10687         (lwp_info): New member arch_private.
10688         (linux_target_ops): New members new_process, new_thread,
10689         prepare_to_resume.
10690         (ptid_of): New macro.
10691         * linux-x86-low.c: Include stddef.h, i386-low.h.
10692         (arch_process_info): New struct.
10693         (arch_lwp_info): New struct.
10694         (x86_linux_dr_get, x86_linux_dr_set): New functions.
10695         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10696         (i386_dr_low_get_status): New function.
10697         (x86_insert_point, x86_remove_point): New functions.
10698         (x86_stopped_by_watchpoint): New function.
10699         (x86_stopped_data_address): New function.
10700         (x86_linux_new_process, x86_linux_new_thread): New functions.
10701         (x86_linux_prepare_to_resume): New function.
10702         (the_low_target): Add entries for insert_point, remove_point,
10703         stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
10704         prepare_to_resume.
10705         * server.c (debug_hw_points): New global.
10706         (monitor_show_help): Document set debug-hw-points.
10707         (handle_query): Process "set debug-hw-points".
10708         * server.h (debug_hw_points): Declare.
10709         (paddress): Declare.
10710         * utils.c (NUMCELLS, CELLSIZE): New macros.
10711         (get_sell, xsnprintf, paddress): New functions.
10712         * win32-arm-low.c (the_low_target): Add entries for insert_point,
10713         remove_point, stopped_by_watchpoint, stopped_data_address.
10714         * win32-i386-low.c: Include i386-low.h.
10715         (debug_reg_state): Replaces dr.
10716         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10717         (i386_dr_low_get_status): New function.
10718         (i386_insert_point, i386_remove_point): New functions.
10719         (i386_stopped_by_watchpoint): New function.
10720         (i386_stopped_data_address): New function.
10721         (i386_initial_stuff): Update.
10722         (get_thread_context,set_thread_context,i386_thread_added): Update.
10723         (the_low_target): Add entries for insert_point,
10724         remove_point, stopped_by_watchpoint, stopped_data_address.
10725         * win32-low.c (win32_insert_watchpoint): New function.
10726         (win32_remove_watchpoint): New function.
10727         (win32_stopped_by_watchpoint): New function.
10728         (win32_stopped_data_address): New function.
10729         (win32_target_ops): Add entries for insert_watchpoint,
10730         remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
10731         * win32-low.h (win32_target_ops): New members insert_point,
10732         remove_point, stopped_by_watchpoint, stopped_data_address.
10733
10734 2009-06-25  Pedro Alves  <pedro@codesourcery.com>
10735
10736         * server.c (process_serial_event): Re-return unsupported, not
10737         error, if the type isn't recognized.  Re-allow supporting only
10738         insert or remove packets.  Also call require_running for
10739         breakpoints.  Add missing break statement to default case.  Tidy.
10740         * target.h (struct target_ops): Rename insert_watchpoint to
10741         insert_point, and remove_watchpoint to remove_point.
10742
10743         * linux-low.h (struct linux_target_ops): Likewise.
10744         * linux-low.c (linux_insert_watchpoint): Rename to ...
10745         (linux_insert_point): ... this.  Adjust.
10746         (linux_remove_watchpoint): Rename to ...
10747         (linux_remove_point): ... this.  Adjust.
10748         (linux_target_ops): Adjust.
10749         * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
10750         (cris_insert_point): ... this.
10751         (cris_remove_watchpoint): Rename to ...
10752         (cris_remove_point): ... this.
10753         (the_low_target): Adjust.
10754
10755 2009-06-24  Pierre Muller  <muller@ics.u-strasbg.fr>
10756
10757         * server.c (handle_v_kill): Pass signal_pid to
10758         kill_inferior if multi_process is zero.
10759
10760 2009-06-23  Aleksandar Ristovski  <aristovski@qnx.com>
10761
10762         * server.c (process_serial_event): Add support for Z0 and Z1 packet.
10763         * target.h (target_ops): Comment for *_watchpoint to make it clear
10764         the functions can get types '0' and '1'.
10765
10766 2009-06-22  Aleksandar Ristovski  <aristovski@qnx.com>
10767
10768         * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
10769         * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
10770         * regcache.c (get_regcache): Likewise.
10771         * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
10772         * win32-low.c (child_fetch_inferior_registers): Remove check for
10773         regno 0.
10774
10775 2009-06-19  Aleksandar Ristovski  <aristovski@qnx.com>
10776             Pedro Alves <pedro@codesourcery.com>
10777
10778         * target.h (struct target_ops) <supports_multi_process>: New
10779         callback.
10780         (target_supports_multi_process): New.
10781         * server.c (handle_query): Even if GDB reports support, only
10782         enable multi-process if the target also supports it.  Report
10783         multi-process support only if the target backend supports it.
10784         * linux-low.c (linux_supports_multi_process): New function.
10785         (linux_target_ops): Install it as target_supports_multi_process
10786         callback.
10787
10788 2009-05-24  Doug Evans  <dje@google.com>
10789
10790         Global renaming of find_thread_pid to find_thread_ptid.
10791         * server.h (find_thread_ptid): Renamed from find_thread_pid.
10792         * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
10793         All callers updated.
10794
10795         * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
10796         to resume the newly created thread, don't call ptrace (PTRACE_CONT)
10797         directly.
10798
10799         * linux-low.c (get_stop_pc): Print pc if debug_threads.
10800         (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
10801         (linux_resume_one_lwp): Ditto.
10802
10803 2009-05-23  Doug Evans  <dje@google.com>
10804
10805         * linux-low.c (linux_resume_one_lwp): Change type of first arg
10806         from struct inferior_list_entry * to struct lwp_info *.
10807         All callers updated.
10808
10809 2009-05-13  Doug Evans  <dje@google.com>
10810
10811         * linux-x86-low.c: Don't include assert.h.
10812         (x86_siginfo_fixup): Use fatal, not assert.
10813         (x86_arch_setup): Fix comment.
10814
10815 2009-05-12  Doug Evans  <dje@google.com>
10816
10817         Biarch support for i386/amd64 gdbserver.
10818         * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
10819         Add linux-x86-low.c.
10820         (linux-i386-low.o, linux-x86-64-low.o): Delete.
10821         (linux-x86-low.o): Add.
10822         * linux-x86-64-low.c: Delete.
10823         * linux-i386-low.c: Delete.
10824         * linux-x86-low.c: New file.
10825         * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
10826         linux-x86-low.o.
10827         (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
10828         linux-x86-low.o.
10829         (x86_64-linux srv_regobj): Add reg-i386-linux.o.
10830         * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
10831         (linux_child_pid_to_exec_file): New function.
10832         (elf_64_header_p, elf_64_file_p): New functions.
10833         (siginfo_fixup): New function.
10834         (linux_xfer_siginfo): New local inf_siginfo.  Call siginfo_fixup to
10835         give target a chance to convert layout.
10836         * linux-low.h (linux_target_ops): New member siginfo_fixup.
10837         (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
10838
10839 2009-05-07  Doug Evans  <dje@google.com>
10840
10841         * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
10842         (regsets_store_inferior_registers): Ditto.
10843
10844 2009-05-06  Pedro Alves  <pedro@codesourcery.com>
10845
10846         PR server/10048
10847
10848         * linux-low.c (must_set_ptrace_flags): Delete.
10849         (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
10850         of the global.
10851         (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here.  Set
10852         `lwp->must_set_ptrace_flags' instead.
10853         (linux_wait_for_event_1): Set ptrace options here.
10854         (linux_wait_1): ... not here.
10855
10856 2009-04-30  Doug Evans  <dje@google.com>
10857
10858         * inferiors.c (started_inferior_callback): New function.
10859         (attached_inferior_callback): New function.
10860         (have_started_inferiors_p, have_attached_inferiors_p): New functions.
10861         * server.c (print_started_pid, print_attached_pid): New functions.
10862         (detach_or_kill_for_exit): New function.
10863         (main): Call it instead of for_each_inferior (kill_inferior_callback).
10864         * server.h (have_started_inferiors_p): Declare.
10865         (have_attached_inferiors_p): Declare.
10866
10867         * inferiors.c (remove_process): Fix memory leak, free process.
10868         * linux-low.c (linux_remove_process): New function.
10869         (linux_kill): Call it instead of remove_process.
10870         (linux_detach, linux_wait_1): Ditto.
10871
10872 2009-04-19  Danny Backx  <dannybackx@users.sourceforge.net>
10873
10874         * configure.srv: Add x86 Windows CE target.
10875
10876 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
10877
10878         * inferiors.c (get_thread_process): Make global.
10879         * server.h (get_thread_process): Add prototype.
10880         * thread-db.c (find_one_thread): Use get_thread_process
10881         instead of current_process.
10882         (thread_db_get_tls_address): Do not crash if called when
10883         thread layer is not yet initialized.
10884
10885 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
10886
10887         * remote-utils.c (prepare_resume_reply): Null-terminate packet.
10888         * spu-low.c (current_tid): Rename to ...
10889         (current_ptid): ... this.
10890         (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
10891         spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
10892         ptid_get_lwp (current_ptid) instead of current_tid.
10893         (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
10894         instead of current_tid.  Use find_process_pid to verify pid
10895         argument is valid.  Pass proper argument to remove_process.
10896         (spu_thread_alive): Compare current_ptid instead of current_tid.
10897         (spu_resume): Likewise.
10898
10899 2009-04-02  Pedro Alves  <pedro@codesourcery.com>
10900
10901         * linux-low.c (usr_store_inferior_registers): Declare local `pid'
10902         variable.
10903
10904 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
10905
10906         Implement the multiprocess extensions, and add linux multiprocess
10907         support.
10908
10909         * server.h (ULONGEST): Declare.
10910         (struct ptid, ptid_t): New.
10911         (minus_one_ptid, null_ptid): Declare.
10912         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10913         (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
10914         (struct inferior_list_entry): Change `id' type from unsigned from
10915         to ptid_t.
10916         (struct sym_cache, struct breakpoint, struct
10917         process_info_private): Forward declare.
10918         (struct process_info): Declare.
10919         (current_process): Declare.
10920         (all_processes): Declare.
10921         (initialize_inferiors): Declare.
10922         (add_thread): Adjust to use ptid_t.
10923         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
10924         (add_process, remove_process, find_thread_pid): Declare.
10925         (find_inferior_id): Adjust to use ptid_t.
10926         (cont_thread, general_thread, step_thread): Change type to ptid_t.
10927         (multi_process): Declare.
10928         (push_event): Adjust to use ptid_t.
10929         (read_ptid, write_ptid): Declare.
10930         (prepare_resume_reply): Adjust to use ptid_t.
10931         (clear_symbol_cache): Declare.
10932         * inferiors.c (all_processes): New.
10933         (null_ptid, minus_one_ptid): New.
10934         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10935         (ptid_get_tid, ptid_equal, ptid_is_pid): New.
10936         (add_thread): Change unsigned long to ptid.  Remove gdb_id
10937         parameter.  Adjust.
10938         (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
10939         (gdb_id_to_thread): Rename to ...
10940         (find_thread_pid): ... this.  Change unsigned long to ptid.
10941         (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
10942         (loaded_dll, pull_pid_from_list): Adjust.
10943         (add_process, remove_process, find_process_pid)
10944         (get_thread_process, current_process, initialize_inferiors): New.
10945         * target.h (struct thread_resume) <thread>: Change type to ptid_t.
10946         (struct target_waitstatus) <related_pid>: Ditto.
10947         (struct target_ops) <kill, detach>: Add `pid' argument.  Change
10948         return type to int.
10949         (struct target_ops) <join>: Add `pid' argument.
10950         (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
10951         (struct target_ops) <wait>: Add `ptid' field.  Change return type
10952         to ptid.
10953         (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
10954         (mywait): Add `ptid' argument.  Change return type to ptid_t.
10955         (target_pid_to_str): Declare.
10956         * target.c (set_desired_inferior): Adjust to use ptids.
10957         (mywait): Add new `ptid' argument.  Adjust.
10958         (target_pid_to_str): New.
10959         * mem-break.h (free_all_breakpoints): Declare.
10960         * mem-break.c (breakpoints): Delelete.
10961         (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
10962         (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
10963         to use per-process breakpoint list.
10964         (free_all_breakpoints): New.
10965         * remote-utils.c (struct sym_cache) <name>: Drop `const'.
10966         (symbol_cache, all_symbols_looked_up): Delete.
10967         (hexchars): New.
10968         (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
10969         read_ptid): New.
10970         (prepare_resume_reply): Change ptid argument's type from unsigned
10971         long to ptid_t.  Adjust.  Implement W;process and X;process.
10972         (free_sym_cache, clear_symbol_cache): New.
10973         (look_up_one_symbol): Adjust to per-process symbol cache.  *
10974         * server.c (cont_thread, general_thread, step_thread): Change type
10975         to ptid_t.
10976         (attached): Delete.
10977         (multi_process): New.
10978         (last_ptid): Change type to ptid_t.
10979         (struct vstop_notif) <ptid>: Change type to ptid_t.
10980         (queue_stop_reply, push_event): Change `ptid' argument's type to
10981         ptid_t.
10982         (discard_queued_stop_replies): Add `pid' argument.
10983         (start_inferior): Adjust to use ptids.  Adjust to mywait interface
10984         changes.  Don't reference the `attached' global.
10985         (attach_inferior): Adjust to mywait interface changes.
10986         (handle_query): Adjust to use ptids.  Parse GDB's qSupported
10987         features.  Handle and report "multiprocess+".  Handle
10988         "qAttached:PID".
10989         (handle_v_cont): Adjust to use ptids.  Adjust to mywait interface
10990         changes.
10991         (handle_v_kill): New.
10992         (handle_v_stopped): Adjust to use target_pid_to_str.
10993         (handle_v_requests): Allow multiple attaches and runs when
10994         multiprocess extensions are in effect.  Handle "vKill".
10995         (myresume): Adjust to use ptids.
10996         (queue_stop_reply_callback): Add `arg' parameter.  Handle it.
10997         (handle_status): Adjust to discard_queued_stop_replies interface
10998         change.
10999         (first_thread_of, kill_inferior_callback)
11000         (detach_or_kill_inferior_callback, join_inferiors_callback): New.
11001         (main): Call initialize_inferiors.  Adjust to use ptids, killing
11002         and detaching from all inferiors.  Handle multiprocess packet
11003         variants.
11004         * linux-low.h: Include gdb_proc_service.h.
11005         (struct process_info_private): New.
11006         (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
11007         <lwpid_of>: Use ptid_get_lwp.
11008         (get_lwp_thread): Adjust.
11009         (struct lwp_info): Add `dead' member.
11010         (find_lwp_pid): Declare.
11011         * linux-low.c (thread_db_active): Delete.
11012         (new_inferior): Adjust comment.
11013         (inferior_pid): Delete.
11014         (linux_add_process): New.
11015         (handle_extended_wait): Adjust.
11016         (add_lwp): Change unsigned long to ptid.
11017         (linux_create_inferior): Add process to processes table.  Adjust
11018         to use ptids.  Don't set new_inferior here.
11019         (linux_attach_lwp): Rename to ...
11020         (linux_attach_lwp_1): ... this.  Add `initial' argument.  Handle
11021         it.  Adjust to use ptids.
11022         (linux_attach_lwp): New.
11023         (linux_attach): Add process to processes table.  Don't set
11024         new_inferior here.
11025         (struct counter): New.
11026         (second_thread_of_pid_p, last_thread_of_process_p): New.
11027         (linux_kill_one_lwp): Add `args' parameter.  Handle it.  Adjust to
11028         multiple processes.
11029         (linux_kill): Add `pid' argument.  Handle it.  Adjust to multiple
11030         processes.  Remove process from process table.
11031         (linux_detach_one_lwp): Add `args' parameter.  Handle it.  Adjust
11032         to multiple processes.
11033         (any_thread_of): New.
11034         (linux_detach): Add `pid' argument, and handle it.  Remove process
11035         from processes table.
11036         (linux_join): Add `pid' argument.  Handle it.
11037         (linux_thread_alive): Change unsighed long argument to ptid_t.
11038         Consider dead lwps as not being alive.
11039         (status_pending_p): Rename `dummy' argument to `arg'.  Filter out
11040         threads we're not interested in.
11041         (same_lwp, find_lwp_pid): New.
11042         (linux_wait_for_lwp): Change `pid' argument's type from int to
11043         ptid_t.  Adjust.
11044         (linux_wait_for_event): Rename to ...
11045         (linux_wait_for_event_1): ... this.  Change `pid' argument's type
11046         from int to ptid_t.  Adjust.
11047         (linux_wait_for_event): New.
11048         (linux_wait_1): Add `ptid' argument.  Change return type to
11049         ptid_t.  Adjust.  Use last_thread_of_process_p.  Remove processes
11050         that exit from the process table.
11051         (linux_wait): Add `ptid' argument.  Change return type to ptid_t.
11052         Adjust.
11053         (mark_lwp_dead): New.
11054         (wait_for_sigstop): Adjust to use ptids.  If a process exits while
11055         stopping all threads, mark its main lwp as dead.
11056         (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11057         ptids.
11058         (fetch_register, usr_store_inferior_registers)
11059         (regsets_fetch_inferior_registers)
11060         (regsets_store_inferior_registers, linux_read_memory)
11061         (linux_write_memory): Inline `inferior_pid'.
11062         (linux_look_up_symbols): Adjust to use per-process
11063         `thread_db_active'.
11064         (linux_request_interrupt): Adjust to use ptids.
11065         (linux_read_auxv): Inline `inferior_pid'.
11066         (initialize_low): Don't reference thread_db_active.
11067         * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11068         * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11069         (ps_getpid): Return the pid of the current inferior.
11070         * thread-db.c (proc_handle, thread_agent): Delete.
11071         (thread_db_create_event, thread_db_enable_reporting): Adjust to
11072         per-process data.
11073         (find_one_thread): Change argument type to ptid_t.  Adjust to
11074         per-process data.
11075         (maybe_attach_thread): Adjust to per-process data and ptids.
11076         (thread_db_find_new_threads): Ditto.
11077         (thread_db_init): Ditto.
11078         * spu-low.c (spu_create_inferior, spu_attach): Add process to
11079         processes table.  Adjust to use ptids.
11080         (spu_kill, spu_detach): Adjust interface.  Remove process from
11081         processes table.
11082         (spu_join, spu_thread_alive): Adjust interface.
11083         (spu_wait): Adjust interface.  Remove process from processes
11084         table.  Adjust to use ptids.
11085         * win32-low.c (current_inferior_tid): Delete.
11086         (current_inferior_ptid): New.
11087         (debug_event_ptid): New.
11088         (thread_rec): Take a ptid.  Adjust.
11089         (child_add_thread): Add `pid' argument.  Adjust to use ptids.
11090         (child_delete_thread): Ditto.
11091         (do_initial_child_stuff): Add `attached' argument.  Add process to
11092         processes table.
11093         (child_fetch_inferior_registers, child_store_inferior_registers):
11094         Adjust.
11095         (win32_create_inferior): Pass 0 to do_initial_child_stuff.
11096         (win32_attach): Pass 1 to do_initial_child_stuff.
11097         (win32_kill): Adjust interface.  Remove process from processes
11098         table.
11099         (win32_detach): Ditto.
11100         (win32_join): Adjust interface.
11101         (win32_thread_alive): Take a ptid.
11102         (win32_resume): Adjust to use ptids.
11103         (get_child_debug_event): Ditto.
11104         (win32_wait): Adjust interface.  Remove exiting process from
11105         processes table.
11106
11107 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
11108
11109         Non-stop mode support.
11110
11111         * server.h (non_stop): Declare.
11112         (gdb_client_data, handler_func): Declare.
11113         (delete_file_handler, add_file_handler, start_event_loop):
11114         Declare.
11115         (handle_serial_event, handle_target_event, push_event)
11116         (putpkt_notif): Declare.
11117         * target.h (enum resume_kind): New.
11118         (struct thread_resume): Replace `step' field by `kind' field.
11119         (TARGET_WNOHANG): Define.
11120         (struct target_ops) <wait>: Add `options' argument.
11121         <supports_non_stop, async, start_non_stop>: New fields.
11122         (target_supports_non_stop, target_async): New.
11123         (start_non_stop): Declare.
11124         (mywait): Add `options' argument.
11125         * target.c (mywait): Add `options' argument.  Print child exit
11126         notifications here.
11127         (start_non_stop): New.
11128         * server.c (non_stop, own_buf, mem_buf): New globals.
11129         (struct vstop_notif): New.
11130         (notif_queue): New global.
11131         (queue_stop_reply, push_event, discard_queued_stop_replies)
11132         (send_next_stop_reply): New.
11133         (start_inferior): Adjust to use resume_kind.  Adjust to mywait
11134         interface changes.
11135         (attach_inferior): In non-stop mode, don't wait for the target
11136         here.
11137         (handle_general_set): Handle QNonStop.
11138         (handle_query): When handling qC, return the current general
11139         thread, instead of the first thread of the list.
11140         (handle_query): If the backend supports non-stop mode, include
11141         QNonStop+ in the qSupported query response.
11142         (handle_v_cont): Adjust to use resume_kind.  Handle resume_stop
11143         and non-stop mode.
11144         (handle_v_attach, handle_v_run): Handle non-stop mode.
11145         (handle_v_stopped): New.
11146         (handle_v_requests): Report support for vCont;t.  Handle vStopped.
11147         (myresume): Adjust to use resume_kind.  Handle non-stop.
11148         (queue_stop_reply_callback): New.
11149         (handle_status): Handle non-stop mode.
11150         (main): Clear non_stop flag on reconnection.  Use the event-loop.
11151         Refactor serial protocol handling from here ...
11152         (process_serial_event): ... to this new function.  When GDB
11153         selects any thread, select one here.  In non-stop mode, wait until
11154         GDB acks all pending events before exiting.
11155         (handle_serial_event, handle_target_event): New.
11156         * remote-utils.c (remote_open): Install remote_desc in the event
11157         loop.
11158         (remote_close): Remove remote_desc from the event loop.
11159         (putpkt_binary): Rename to...
11160         (putpkt_binary_1): ... this.  Add `is_notic' argument.  Handle it.
11161         (putpkt_binary): New as wrapper around putpkt_binary_1.
11162         (putpkt_notif): New.
11163         (prepare_resume_reply): In non-stop mode, don't change the
11164         general_thread.
11165         * event-loop.c: New.
11166         * Makefile.in (OBJ): Add event-loop.o.
11167         (event-loop.o): New rule.
11168
11169         * linux-low.h (pid_of): Moved here.
11170         (lwpid_of): New.
11171         (get_lwp_thread): Use lwpid_of.
11172         (struct lwp_info): Delete `lwpid' field.  Add `suspended' field.
11173         * linux-low.c (pid_of): Delete.
11174         (inferior_pid): Use lwpid_of.
11175         (linux_event_pipe): New.
11176         (target_is_async_p): New.
11177         (delete_lwp): New.
11178         (handle_extended_wait): Use lwpid_of.
11179         (add_lwp): Don't set lwpid field.
11180         (linux_attach_lwp): Adjust debug output.  Use lwpid_of.
11181         (linux_kill_one_lwp): If killing a running lwp, stop it first.
11182         Use lwpid_of.  Adjust to linux_wait_for_event interface changes.
11183         (linux_detach_one_lwp): If detaching from a running lwp, stop it
11184         first.  Adjust to linux_wait_for_event interface changes.  Use
11185         lwpid_of.
11186         (linux_detach): Don't delete the main lwp here.
11187         (linux_join): Use my_waitpid.  Avoid signal_pid.  Use lwpid_of.
11188         (status_pending_p): Don't consider explicitly suspended lwps.
11189         (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
11190         pointer.  Add OPTIONS argument.  Change return type to int.  Use
11191         my_waitpid instead of sleeping.  Handle WNOHANG.  Use lwpid_of.
11192         (linux_wait_for_event): Take an integer pid instead of a lwp_info
11193         pointer.  Add status pointer argument.  Return a pid instead of a
11194         status.  Use lwpid_of.  Adjust to linux_wait_for_lwp interface
11195         changes.  In non-stop mode, don't switch to a random thread.
11196         (linux_wait): Rename to...
11197         (linux_wait_1): ... this.  Add target_options argument, and handle
11198         it.  Adjust to use resume_kind.  Use lwpid_of.  In non-stop mode,
11199         don't handle the continue thread.  Handle TARGET_WNOHANG.  Merge
11200         clean exit and signal exit code.  Don't stop all threads in
11201         non-stop mode.  In all-stop mode, only stop all threads when
11202         reporting a stop to GDB.  Handle explicit thread stop requests.
11203         (async_file_flush, async_file_mark): New.
11204         (linux_wait): New.
11205         (send_sigstop): Use lwpid_of.
11206         (wait_for_sigstop): Use lwpid_of.  Adjust to linux_wait_for_event
11207         interface changes.  In non-stop mode, don't switch to a random
11208         thread.
11209         (linux_resume_one_lwp): Use lwpid_of.
11210         (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
11211         (linux_resume_one_thread): ... this.  Handle resume_stop.  In
11212         non-stop mode, don't look for pending flag in all threads.
11213         (resume_status_pending_p): Don't consider explicitly suspended
11214         threads.
11215         (my_waitpid): Reimplement.  Emulate __WALL.
11216         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11217         Use lwpid_of.
11218         (sigchld_handler, linux_supports_non_stop, linux_async)
11219         (linux_start_non_stop): New.
11220         (linux_target_ops): Register linux_supports_non_stop, linux_async
11221         and linux_start_non_stop.
11222         (initialize_low): Install SIGCHLD handler.
11223         * thread-db.c (thread_db_create_event, find_one_thread)
11224         (thread_db_get_tls_address): Use lwpid_of.
11225         * win32-low.c (win32_detach): Adjust to use resume_kind.
11226         (win32_wait): Add `options' argument.
11227         * spu-low.c (spu_resume): Adjust to use resume_kind.
11228         (spu_wait): Add `options' argument.
11229
11230 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
11231
11232         Decouple target code from remote protocol.
11233
11234         * target.h (enum target_waitkind): New.
11235         (struct target_waitstatus): New.
11236         (struct target_ops) <wait>: Return an unsigned long.  Take a
11237         target_waitstatus pointer instead of a char pointer.
11238         (mywait): Likewise.
11239         * target.c (mywait): Change prototype to return an unsigned long.
11240         Take a target_waitstatus pointer instead of a char pointer.  Adjust.
11241         * server.h (thread_from_wait, old_thread_from_wait): Delete
11242         declarations.
11243         (prepare_resume_reply): Change prototype to take a
11244         target_waitstatus.
11245         * server.c (thread_from_wait, old_thread_from_wait): Delete.
11246         (last_status, last_ptid): New.
11247         (start_inferior): Remove "statusptr" argument.  Adjust.  Return a
11248         pid instead of a signal.
11249         (attach_inferior): Remove "status" and "signal" parameters.
11250         Adjust.
11251         (handle_query): For qGetTLSAddr, parse the thread id with strtol,
11252         not as an address.
11253         (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
11254         (handle_v_requests, myresume): Remove "status" and "signal"
11255         parameters.  Adjust.
11256         (handle_status): New.
11257         (main): Delete local `status'.  Adjust.
11258         * remote-utils.c: Include target.h.
11259         (prepare_resume_reply): Change prototype to take a
11260         target_waitstatus.  Adjust.
11261
11262         * linux-low.c (linux_wait): Adjust to new target_ops->wait
11263         interface.
11264         * spu-low.c (spu_wait): Adjust.
11265         * win32-low.c (enum target_waitkind, struct target_waitstatus):
11266         Delete.
11267         (win32_wait): Adjust.
11268
11269 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
11270
11271         * target.h (struct thread_resume): Delete leave_stopped member.
11272         (struct target_ops): Add a `n' argument to the `resume' callback.
11273         * server.c (start_inferior): Adjust.
11274         (handle_v_cont, myresume): Adjust.
11275         * linux-low.c (check_removed_breakpoint): Adjust to resume
11276         interface change, and to removed leave_stopped field.
11277         (resume_ptr): Delete.
11278         (struct thread_resume_array): New.
11279         (linux_set_resume_request): Add new `arg' parameter.  Adjust to
11280         resume interface change.
11281         (linux_continue_one_thread, linux_queue_one_thread)
11282         (resume_status_pending_p): Check if the resume field is NULL
11283         instead of checking the leave_stopped member.
11284         (linux_resume): Adjust to the target resume interface change.
11285         * spu-low.c (spu_resume): Adjust to the target resume interface
11286         change.
11287         * win32-low.c (win32_detach, win32_resume): Ditto.
11288
11289 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
11290
11291         * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
11292         flag.
11293         (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
11294         pending.
11295         (linux_continue_one_thread): Only preserve the stepping flag if
11296         there's a pending breakpoint.
11297
11298 2009-03-31  Pedro Alves  <pedro@codesourcery.com>
11299
11300         * server.c (main): After the inferior having exited, call
11301         remote_close before exiting gdbserver.
11302
11303 2009-03-25  Thiago Jung Bauermann  <bauerman@br.ibm.com>
11304
11305         Fix size of FPSCR in Power 7 processors.
11306         * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
11307         (PPC_FEATURE_HAS_DFP): New #define.
11308         (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
11309         size of the FPSCR.
11310
11311 2009-03-23  Pedro Alves  <pedro@codesourcery.com>
11312
11313         * server.c (handle_query) Whitespace and formatting.
11314
11315 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
11316
11317         * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
11318         linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
11319         linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
11320         linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
11321         regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
11322         thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
11323         Makefile.in, configure.ac: Fix whitespace throughout.
11324         * configure: Regenerate.
11325
11326 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
11327
11328         * inferiors.c (find_inferior): Make it safe for the callback
11329         function to delete the currently iterated inferior.
11330
11331 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
11332
11333         * Makefile.in (linuw_low_h): Move higher.
11334         (thread-db.o): Depend on $(linux_low_h).
11335
11336 2009-03-17  Pedro Alves  <pedro@codesourcery.com>
11337
11338         Rename "process" to "lwp" throughout.
11339
11340         * linux-low.c (all_processes): Rename to...
11341         (all_lwps): ... this.
11342         (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
11343         (add_process): Rename to ...
11344         (add_lwp): ... this.  Adjust.
11345         (linux_create_inferior): Adjust.
11346         (linux_attach_lwp): Adjust.
11347         (linux_attach): Adjust.
11348         (linux_kill_one_process): Rename to ...
11349         (linux_kill_one_lwp): ... this.  Adjust.
11350         (linux_kill): Adjust.
11351         (linux_detach_one_process): Rename to ...
11352         (linux_detach_one_lwp): ... this.  Adjust.
11353         (linux_detach): Adjust.
11354         (check_removed_breakpoint): Adjust.
11355         (status_pending_p): Adjust.
11356         (linux_wait_for_process): Rename to ...
11357         (linux_wait_for_lwp): ... this.  Adjust.
11358         (linux_wait_for_event): Adjust.
11359         (send_sigstop): Adjust.
11360         (wait_for_sigstop): Adjust.
11361         (stop_all_processes): Rename to ...
11362         (stop_all_lwps): ... this.
11363         (linux_resume_one_process): Rename to ...
11364         (linux_resume_one_lwp): ... this.  Adjust.
11365         (linux_set_resume_request, linux_continue_one_thread)
11366         (linux_queue_one_thread, resume_status_pending_p)
11367         (usr_store_inferior_registers, regsets_store_inferior_registers)
11368         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11369         Adjust.
11370         * linux-low.h (get_process): Rename to ...
11371         (get_lwp): ... this.  Adjust.
11372         (get_thread_process): Rename to ...
11373         (get_thread_lwp): ... this.  Adjust.
11374         (get_process_thread): Rename to ...
11375         (get_lwp_thread): ... this.  Adjust.
11376         (struct process_info): Rename to ...
11377         (struct lwp_info): ... this.
11378         (all_processes): Rename to ...
11379         (all_lwps): ... this.
11380         * proc-service.c (ps_lgetregs): Adjust.
11381         * thread-db.c (thread_db_create_event, find_one_thread)
11382         (maybe_attach_thread, thread_db_get_tls_address): Adjust.
11383
11384 2009-03-14  Pedro Alves  <pedro@codesourcery.com>
11385
11386         * server.c (handle_query): Handle "qAttached".
11387
11388 2009-03-13  Nathan Sidwell  <nathan@codesourcery.com>
11389
11390         * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
11391         GPLv3, update license URL.
11392
11393 2009-03-01  Doug Evans  <dje@google.com>
11394
11395         * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
11396         (server_h): Add gdb_signals.h.
11397         (signals.o): Update.
11398         * server.h (target_signal_from_host,target_signal_to_host_p)
11399         (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
11400
11401 2009-02-14  Pierre Muller  <muller@ics.u-strasbg.fr>
11402
11403         * remote-utils.c (getpkt): Also generate remote-debug
11404         information if noack_mode is set.
11405
11406 2009-02-06  Pedro Alves  <pedro@codesourcery.com>
11407
11408         * server.c (handle_query): Report qXfer:siginfo:read and
11409         qXfer:siginfo:write as supported and handle them.
11410         * target.h (struct target_ops) <qxfer_siginfo>: New field.
11411         * linux-low.c (linux_xfer_siginfo): New.
11412         (linux_target_ops): Set it.
11413
11414 2009-01-26  Pedro Alves  <pedro@codesourcery.com>
11415
11416         * server.c (gdbserver_usage): Mention --remote-debug.
11417         (main): Accept '--remote-debug' switch.
11418
11419 2009-01-18  Doug Evans  <dje@google.com>
11420
11421         * regcache.c (new_register_cache): No need to check result of xcalloc.
11422         * server.c (handle_search_memory): Back out calls to xmalloc,
11423         result is checked and error is returned to user upon failure.
11424         (handle_query): Ditto.  Add more checks for result of malloc.
11425         (handle_v_cont): Check result of malloc, report error back to
11426         user upon failure.
11427         (handle_v_run): Ditto.  Call freeargv.
11428         * server.h (freeargv): Declare.
11429         * utils.c (freeargv): New fn.
11430
11431 2009-01-15  Doug Evans  <dje@google.com>
11432
11433         * gdbreplay.c (perror_with_name): Make arg const char *.
11434         * server.h (target_signal_to_name): Make return type const char *.
11435         * thread-db.c (thread_db_err_str): Make return type const char *.
11436         * utils.c (perror_with_name): Make arg const char *.
11437
11438 2009-01-14  Pedro Alves  <pedro@codesourcery.com>
11439
11440         * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
11441         when handling a EXIT_PROCESS_DEBUG_EVENT.
11442
11443 2009-01-06  Joel Brobecker  <brobecker@adacore.com>
11444
11445         * gdbreplay.c (gdbreplay_version): Update copyright year.
11446         * server.c (gdbserver_version): Likewise.
11447
11448 2009-01-05  Doug Evans  <dje@google.com>
11449
11450         * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
11451         (handle_extended_wait): Improve comment.
11452
11453 2008-12-13  Doug Evans  <dje@google.com>
11454
11455         * utils.c (xmalloc,xcalloc,xstrdup): New fns.
11456         * server.h (ATTR_MALLOC): New macro.
11457         (xmalloc,xcalloc,xstrdup): Declare.
11458         * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
11459         * inferiors.c: Ditto.
11460         * linux-low.c: Ditto.
11461         * mem-break.c: Ditto.
11462         * regcache.c: Ditto.
11463         * remote-utils.c: Ditto.
11464         * server.c: Ditto.
11465         * target.c: Ditto.
11466         * win32-low.c: Ditto.
11467
11468 2008-12-12  Doug Evans  <dje@google.com>
11469
11470         * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
11471         in debugging printf.
11472
11473         * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
11474
11475 2008-12-09  Doug Evans  <dje@google.com>
11476
11477         * linux-low.h (struct process_info): Delete member tid, unused.
11478         * thread-db.c (find_one_thread): Update.
11479         (maybe_attach_thread): Update.
11480
11481 2008-12-02  Pedro Alves  <pedro@codesourcery.com>
11482
11483         * target.h (struct target_ops): Add qxfer_osdata member.
11484         * linux-low.c: Include ctype.h and pwd.h and sys/types.h
11485         and dirent.h.
11486         (linux_qxfer_osdata): New functions.
11487         (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
11488         callback.
11489         * server.c (handle_query): Handle "qXfer:osdata:read:".
11490         * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
11491         (buffer_xml_printf): New functions.
11492         * server.h (struct buffer): New.
11493         (buffer_grow_str, buffer_grow_str0): New macros.
11494         (buffer_grow, buffer_free, buffer_init, buffer_finish)
11495         (buffer_xml_printf): Declare.
11496
11497 2008-11-24  Doug Evans  <dje@google.com>
11498
11499         * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
11500
11501 2008-11-24  Daniel Jacobowitz  <dan@codesourcery.com>
11502
11503         * server.c (handle_v_run): Always use the supplied argument list.
11504
11505 2008-11-19  Bob Wilson  <bob.wilson@acm.org>
11506
11507         * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
11508         (xtensa_regmap_table): Add entry for scompare1.
11509
11510 2008-11-18  Thiago Jung Bauermann  <bauerman@br.ibm.com>
11511
11512         * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
11513         powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
11514         powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
11515         powerpc-isa205-64l.o, powerpc-isa205-64l.c,
11516         powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
11517         powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
11518         * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
11519         XML target descriptions.
11520         * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
11521         when inferior is running on an ISA 2.05 or later processor.  Add
11522         special case to return offset for full 64-bit slot of FPSCR when
11523         in 32-bits.
11524
11525 2008-11-14  Daniel Gutson  <dgutson@codesourcery.com>
11526
11527         * Makefile.in (SFILES, clean): Added sparc64 files.
11528         (reg-sparc64.o, reg-sparc64.c): New.
11529         * configure.srv (sparc*-*-linux*): New configuration.
11530         * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
11531         syscall arguments for SPARC.
11532         (regsets_store_inferior_registers): Likewise.
11533         * linux-sparc-low.c: New file.
11534
11535 2008-10-21  Doug Evans  <dje@google.com>
11536
11537         * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
11538         (READLINE_DIR,READLINE_DEP): Delete.
11539         (INTERNAL_CFLAGS): Update.
11540         (LINTFLAGS): Update.
11541
11542 2008-10-10  Pedro Alves  <pedro@codesourcery.com>
11543
11544         * server.c (handle_v_run): If GDB didn't specify an argv, use the
11545         whole argv from the last run, not just argv[0].
11546
11547 2008-09-08  Pedro Alves  <pedro@codesourcery.com>
11548
11549         * regcache.c (new_register_cache): Return NULL if the register
11550         cache size isn't known yet.
11551         (free_register_cache): Avoid dereferencing a NULL regcache.
11552
11553 2008-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
11554
11555         * configure.srv: Merge MIPS and MIPS64.
11556
11557 2008-08-24  Maciej W. Rozycki  <macro@linux-mips.org>
11558
11559         * Makefile.in (uninstall): Apply $(EXEEXT) too.
11560
11561 2008-08-18  Luis Machado  <luisgpm@br.ibm.com>
11562
11563         * Makefile.in: Add required vsx dependencies.
11564
11565         * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
11566         Declare init_registers_powerpc_vsx32l.
11567         Declare init_registers_powerpc_vsx64l.
11568         Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
11569         (ppc_arch_setup): Check for VSX in hwcap.
11570         (ppc_fill_vsxregset): New function.
11571         (ppc_store_vsxregset): New function.
11572         Add new VSX entry in regset_info target_regsets.
11573
11574         * configure.srv: Add new VSX dependencies.
11575
11576 2008-08-12  Pedro Alves  <pedro@codesourcery.com>
11577
11578         * remote-utils.c (noack_mode, transport_is_reliable): New globals.
11579         (remote_open): Set or clear transport_is_reliable.
11580         (putpkt_binary): Don't expect acks in noack mode.
11581         (getpkt): Don't send ack/nac in noack mode.
11582         * server.c (handle_general_set): Handle QStartNoAckMode.
11583         (handle_query): If connected by tcp pass QStartNoAckMode+ in
11584         qSupported.
11585         (main): Reset noack_mode on every connection.
11586         * server.h (noack_mode): Declare.
11587
11588 2008-08-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11589
11590         * Makefile.in (GDBREPLAY_OBS): New variable.
11591         (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
11592
11593 2008-08-05  Ulrich Weigand  <uweigand@de.ibm.com>
11594             Daniel Jacobowitz  <dan@codesourcery.com>
11595
11596         * linux-low.c (linux_resume_one_process): Ignore ESRCH.
11597         (usr_store_inferior_registers): Likewise.
11598         (regsets_store_inferior_registers): Likewise.
11599
11600 2008-07-31  Rolf Jansen  <rj@surtec.com>
11601             Pedro Alves  <pedro@codesourcery.com>
11602
11603         * configure.ac: Check for memmem declaration.
11604         * server.c [HAVE_MALLOC_H]: Include malloc.h.
11605         (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
11606         (disable_packet_qfThreadInfo): Unconditionally compile.
11607         * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
11608         * configure, config.in: Regenerate.
11609
11610 2008-07-28  Doug Kwan  <dougkwan@google.com>
11611
11612         * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
11613         (linux_write_memory): Remove declaration of errno.
11614
11615 2008-07-12  Ulrich Weigand  <uweigand@de.ibm.com>
11616
11617         * linux-low.c (handle_extended_wait): Do not use "status"
11618         variable uninitialized.
11619
11620 2008-07-07  Pedro Alves  <pedro@codesourcery.com>
11621
11622         * server.c (handle_v_attach): Inhibit reporting dll changes.
11623
11624 2008-06-27  Pedro Alves  <pedro@codesourcery.com>
11625
11626         * remote-utils.c (prepare_resume_reply): If requested, don't
11627         output "thread:TID" in the T stop reply.
11628
11629         * server.c (disable_packet_vCont, disable_packet_Tthread)
11630         (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
11631         (handle_query): If requested, disable support for qC, qfThreadInfo
11632         and qsThreadInfo.
11633         (handle_v_requests): If requested, disable support for vCont.
11634         (gdbserver_show_disableable): New.
11635         (main): Handle --disable-packet and --disable-packet=LIST.
11636
11637         * server.h (disable_packet_vCont, disable_packet_Tthread)
11638         (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
11639
11640 2008-06-20  Carlos O'Donell  <carlos@codesourcery.com>
11641
11642         * server.c (gdbserver_usage): Mention --version.
11643
11644 2008-06-06  Daniel Jacobowitz  <dan@codesourcery.com>
11645
11646         * Makefile.in (gdbreplay.o): New rule.
11647
11648 2008-06-06  Joseph Myers  <joseph@codesourcery.com>
11649
11650         * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
11651         message, not gdbserver.
11652
11653 2008-06-05  Vladimir Prus  <vladimir@codesourcery.com>
11654             Nathan Sidwell  <nathan@codesourcery.com>
11655             Joseph Myers  <joseph@codesourcery.com>
11656
11657         * acinclude.m4: Include ../../config/acx.m4.
11658         * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
11659         * configure, config.in: Regenerate.
11660         * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
11661         * server.c (gdbserver_version): Print PKGVERSION.
11662         (gdbsrever_usage): Add stream parameter.  Print REPORT_BUGS_TO.
11663         (main): Adjust gdbserver_usage calls.
11664         * gdbreplay.c (version, host_name): Add declarations.
11665         (gdbreplay_version, gdbreplay_usage): New.
11666         (main): Accept --version and --help options.
11667
11668 2008-06-04  Daniel Jacobowitz  <dan@codesourcery.com>
11669
11670         * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
11671         (arm_breakpoint_at): Handle Thumb.
11672         (the_low_target): Add comment.
11673
11674 2008-05-29  Ulrich Weigand  <uweigand@de.ibm.com>
11675
11676         * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
11677
11678 2008-05-09  Doug Evans  <dje@google.com>
11679
11680         * server.h (decode_search_memory_packet): Declare.
11681         * remote-utils.c (decode_search_memory_packet): New fn.
11682         * server.c (handle_search_memory_1): New fn.
11683         (handle_search_memory): New fn.
11684         (handle_query): Process qSearch:memory packets.
11685
11686 2008-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
11687
11688         * regcache.c (registers_length): Remove.
11689         (set_register_cache): Verify that PBUFSIZ is large enough to hold a
11690         full register packet.
11691         * regcache.h (registers_length): Remove prototype.
11692         * server.h (PBUFSIZ): Define to 16384.
11693
11694 2008-05-03  Ulrich Weigand  <uweigand@de.ibm.com>
11695
11696         * configure.srv (powerpc*-*-linux*): Set srv_regobj to
11697         powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
11698         powerpc-64l.o, and powerpc-altivec64l.o.
11699         Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
11700         rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
11701         rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
11702         rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
11703         rs6000/power-linux.xml, and rs6000/power64-linux.xml
11704         to srv_xmlfiles.
11705
11706         * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
11707         (powerpc-32l.o, powerpc-32l.c): ... these new rules.
11708         (powerpc-32.o, powerpc-32.c): Remove, replace by ...
11709         (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
11710         (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
11711         (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
11712         (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
11713         (powerpc-64l.o, powerpc-64l.c): ... these new rules.
11714         (powerpc-64.o, powerpc-64.c): Remove, replace by ...
11715         (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
11716         (clean): Update.
11717
11718         * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
11719         (init_registers_powerpc_32l): ... this new prototype.
11720         (init_registers_powerpc_32): Remove, replace by ...
11721         (init_registers_powerpc_altivec32l): ... this new prototype.
11722         (init_registers_powerpc_e500): Remove, replace by ...
11723         (init_registers_powerpc_e500l): ... this new prototype.
11724         (init_registers_ppc64): Remove, replace by ...
11725         (init_registers_powerpc_64l): ... this new prototype.
11726         (init_registers_powerpc_64): Remove, replace by ...
11727         (init_registers_powerpc_altivec64l): ... this new prototype.
11728         (ppc_num_regs): Set to 73.
11729         (PT_ORIG_R3, PT_TRAP): Define if necessary.
11730         (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
11731         (ppc_cannot_store_register): Handle orig_r3 and trap.
11732         (ppc_arch_setup): Update init_registers_... calls.
11733         (ppc_fill_gregset): Handle orig_r3 and trap.
11734
11735         * inferiors.c (clear_inferiors): Reset current_inferior.
11736
11737 2008-04-23  Paolo Bonzini  <bonzini@gnu.org>
11738
11739         * acinclude.m4: Add override.m4.
11740         * configure: Regenerate.
11741
11742 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
11743
11744         * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
11745         initial call to init_register_ppc64.
11746
11747 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
11748
11749         * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
11750         single powerpc*-*-linux* case.
11751         (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
11752
11753 2008-04-17  Ulrich Weigand  <uweigand@de.ibm.com>
11754
11755         * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
11756         srv_regobj.  Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
11757         from reg_xmlfiles.
11758         * linux-ppc-low.c: Include <elf.h>.
11759         (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
11760         (ppc_hwcap): New global variable.
11761         (ppc_regmap): Remove __SPE__ #ifdef sections.
11762         (ppc_regmap_e500): New global variable.
11763         (ppc_cannot_store_register): Update __SPE__ special case.
11764         (ppc_get_hwcap): New function.
11765         (ppc_arch_setup): Use it to determine whether inferior supports
11766         AltiVec or SPE registers.  Set the_low_target.regmap if appropriate.
11767         (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
11768         Do not access registers if target does not support AltiVec.
11769         (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
11770         Do not access registers if target does not support SPE.
11771         (target_regsets): Unconditionally include AltiVec and SPE regsets.
11772
11773 2008-04-17  Daniel Jacobowitz  <dan@codesourcery.com>
11774
11775         * linux-low.c (disabled_regsets, num_regsets): New.
11776         (use_regsets_p): Delete.
11777         (linux_wait_for_process): Clear disabled_regsets.
11778         (regsets_fetch_inferior_registers): Check and set it.
11779         (regsets_store_inferior_registers): Likewise.
11780         (linux_fetch_registers, linux_store_registers): Do not use
11781         use_regsets_p.
11782         (initialize_low): Allocate disabled_regsets.
11783
11784 2008-04-14  Daniel Jacobowitz  <dan@codesourcery.com>
11785
11786         * Makefile.in (LIBOBJS): New.
11787         (OBS): Use LIBOBJS.
11788         (memmem.o): New rule.
11789         * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
11790         * configure: Regenerated.
11791
11792 2008-04-04  Ulrich Weigand  <uweigand@de.ibm.com>
11793
11794         * server.c (handle_query): Never return "unsupported" for
11795         qXfer:features:read queries.
11796
11797 2008-03-27  Ulrich Weigand  <uweigand@de.ibm.com>
11798
11799         * server.c (get_features_xml): Fix inverted condition.
11800         (handle_query): Always support qXfer:feature:read.
11801
11802 2008-03-10  Daniel Jacobowitz  <dan@codesourcery.com>
11803
11804         * server.c (wrapper_argv): New.
11805         (start_inferior): Handle wrapper_argv.  If set, expect an extra
11806         trap.
11807         (gdbserver_usage): Document --wrapper.
11808         (main): Parse --wrapper.
11809
11810 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
11811
11812         * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
11813         powerpc-*-linux* to srv_regobj and reg_xmlfiles.
11814         * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
11815         (ppc_set_pc): Likewise.
11816         (ppc_arch_setup): New function.
11817         (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
11818         of collect_register.
11819         (the_low_target): Use ppc_arch_setup as arch_setup initializer.
11820
11821 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
11822
11823         * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
11824         instead of linux-ppc64-low.o.
11825         * linux-ppc64-low.c: Remove file.
11826         * Makefile.in (SFILES): Remove linux-ppc64-low.c.
11827         (linux-ppc64-low.o): Remove rule.
11828
11829         * linux-ppc-low.c (init_registers_ppc64): Add prototype.
11830         (init_registers_powerpc_64): Likewise.
11831         (ppc_regmap): Conditionally define depending on __powerpc64__.
11832         (ppc_cannot_store_register): Do not special-case "fpscr" when
11833         compiled on __powerpc64__.
11834         (ppc_collect_ptrace_register): New function.
11835         (ppc_supply_ptrace_register): New function.
11836         (ppc_breakpoint): Change type to "unsigned int".
11837         (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
11838         (the_low_target): Conditionally provide initializers for the
11839         arch_setup member depending on __powerpc64__.  Install
11840         collect_ptrace_register and supply_ptrace_register members.
11841
11842 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
11843
11844         * regcache.h (gdbserver_xmltarget): Add extern declaration.
11845         * server.c (gdbserver_xmltarget): Define.
11846         (get_features_xml): Use it to replace "target.xml" and arch_string.
11847
11848         * configure.srv: Remove srv_xmltarget.  Add XML files that were
11849         mentioned there to srv_xmlfiles instead.  Remove conditional tests
11850         on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
11851         srv_xmlfiles and srv_regobj to include all possible choices.
11852         * configure.ac (srv_xmltarget): Remove.
11853         (srv_xmlfiles): Do not add "target.xml".
11854         (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
11855         checks for supplementary target information.
11856         * configure: Regenerate.
11857         * Makefile.in (XML_TARGET): Remove.
11858         (target.xml): Remove rule.
11859         (clean): Do not clean up target.xml.
11860         (.PRECIOUS): Do not mention target.xml.
11861
11862         * target.h (struct target_ops): Remove arch_string member.
11863         * linux-low.c (linux_arch_string): Remove.
11864         (linux_target_ops): Remove arch_string initializer.
11865         * linux-low.h (struct linux_target_ops): Remove arch_string member.
11866         * linux-i386-low.c (the_low_target): Remove arch_string initializer.
11867         * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
11868         * spu-low.c (spu_arch_string): Remove.
11869         (spu_target_ops): Remove arch_string initializer.
11870         * win32-low.c (win32_arch_string): Remove.
11871         (win32_target_ops): Remove arch_string initializer.
11872         * win32-low.h (struct win32_target_ops): Remove arch_string member.
11873         * win32-arm-low.c (the_low_target): Remove arch_string initializer.
11874         * win32-i368-low.c (the_low_target): Remove arch_string initializer.
11875
11876 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
11877
11878         * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
11879         by collect_ptrace_register and supply_ptrace_register hooks.
11880         * linux-low.c (fetch_register): Use supply_ptrace_register callback
11881         instead of checking for the_low_target.left_pad_xfer.
11882         (usr_store_inferior_registers): Use collect_ptrace_register callback
11883         instead of checking for the_low_target.left_pad_xfer.
11884
11885         * linux-s390-low.c (s390_collect_ptrace_register): New function.
11886         (s390_supply_ptrace_register): Likewise.
11887         (s390_fill_gregset): Call s390_collect_ptrace_register.
11888         (the_low_target): Update.
11889
11890         * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
11891         (ppc_supply_ptrace_register): Likewise.
11892         (the_low_target): Update.
11893
11894         * linux-i386-low.c (the_low_target): Update.
11895         * linux-x86-64-low.c (the_low_target): Update.
11896
11897 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
11898
11899         * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
11900         reg-s390.o and reg-s390x.o.
11901
11902         * linux-low.c (new_inferior): New global variable.
11903         (linux_create_inferior, linux_attach): Set it.
11904         (linux_wait_for_process): Call the_low_target.arch_setup after the
11905         target has stopped for the first time.
11906         (initialize_low): Do not call the_low_target.arch_setup.
11907
11908         * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
11909         (s390_set_pc): Likewise.
11910         (s390_arch_setup): New function.
11911         (the_low_target): Use s390_arch_setup as arch_setup routine.
11912
11913         * regcache.c (realloc_register_cache): New function.
11914         (set_register_cache): Call it for each existing regcache.
11915
11916 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
11917
11918         * server.h (init_registers): Remove prototype.
11919
11920         * linux-low.h (struct linux_target_ops): Add arch_setup field.
11921         * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
11922         instead of init_registers ().
11923         * linux-arm-low.c (init_registers_arm): Add prototype.
11924         (init_registers_arm_with_iwmmxt): Likewise.
11925         (the_low_target): Add initializer for arch_setup field.
11926         * linux-cris-low.c (init_registers_cris): Add prototype.
11927         (the_low_target): Add initializer for arch_setup field.
11928         * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
11929         (the_low_target): Add initializer for arch_setup field.
11930         * linux-i386-low.c (init_registers_i386_linux): Add prototype.
11931         (the_low_target): Add initializer for arch_setup field.
11932         * linux-ia64-low.c (init_registers_ia64): Add prototype.
11933         (the_low_target): Add initializer for arch_setup field.
11934         * linux-m32r-low.c (init_registers_m32r): Add prototype.
11935         (the_low_target): Add initializer for arch_setup field.
11936         * linux-m68k-low.c (init_registers_m68k): Add prototype.
11937         (the_low_target): Add initializer for arch_setup field.
11938         * linux-mips-low.c (init_registers_mips_linux): Add prototype.
11939         (init_registers_mips64_linux): Likewise.
11940         (the_low_target): Add initializer for arch_setup field.
11941         * linux-ppc-low.c (init_registers_ppc): Add prototype.
11942         (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
11943         (the_low_target): Add initializer for arch_setup field.
11944         * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
11945         (init_registers_powerpc_64): Likewise.
11946         (the_low_target): Add initializer for arch_setup field.
11947         * linux-s390-low.c (init_registers_s390): Add prototype.
11948         (init_registers_s390x): Likewise.
11949         (the_low_target): Add initializer for arch_setup field.
11950         * linux-sh-low.c (init_registers_sh): Add prototype.
11951         (the_low_target): Add initializer for arch_setup field.
11952         * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
11953         (the_low_target): Add initializer for arch_setup field.
11954         * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
11955         (the_low_target): Add initializer for arch_setup field.
11956
11957         * win32-low.h (struct win32_target_ops): Add arch_setup field.
11958         * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
11959         instead of init_registers ().
11960         * win32-arm-low.c (init_registers_arm): Add prototype.
11961         (the_low_target): Add initializer for arch_setup field.
11962         * win32-i386-low.c (init_registers_i386): Add prototype.
11963         (the_low_target): Add initializer for arch_setup field.
11964
11965         * spu-low.c (init_registers_spu): Add prototype.
11966         (initialize_low): Call initialie_registers_spu () instead of
11967         initialize_registers ().
11968
11969 2008-02-19  Pedro Alves  <pedro@codesourcery.com>
11970
11971         * server.c (handle_v_requests): When handling the vRun and vAttach
11972         packets, if already debugging a process, don't kill it.  Return an
11973         error instead.
11974
11975 2008-02-17  Daniel Jacobowitz  <dan@codesourcery.com>
11976
11977         * server.c (handle_query): Correct length check.
11978
11979 2008-02-14  Pedro Alves  <pedro_alves@portugalmail.pt>
11980
11981         * win32-low.c (do_initial_child_stuff): Add process handle
11982         parameter.  Set current_process_handle and current_process_id from the
11983         parameters. Clear globals.
11984         (win32_create_inferior): Don't set current_process_handle and
11985         current_process_id here.  Instead pass them on the call to
11986         do_initial_child_stuff.
11987         (win32_attach): Likewise.
11988         (win32_clear_inferiors): New.
11989         (win32_kill): Don't close the current process handle or the
11990         current thread handle here.  Instead call win32_clear_inferiors.
11991         (win32_detach): Don't open a new handle to the process.  Call
11992         win32_clear_inferiors.
11993         (win32_join): Don't rely on current_process_handle; open a new
11994         handle using the process id.
11995         (win32_wait): Call win32_clear_inferiors when the inferior process
11996         has exited.
11997
11998 2008-02-14  Daniel Jacobowitz  <dan@codesourcery.com>
11999
12000         * server.c (monitor_show_help): Add "exit".
12001
12002 2008-02-11  Maxim Grigoriev  <maxim2405@gmail.com>
12003
12004         * Makefile.in (SFILES): Add linux-xtensa-low.c.
12005         (clean): Add reg-xtensa.c.
12006         (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
12007         * configure.srv (xtensa*-*-linux*) New target.
12008         * linux-xtensa-low.c: New.
12009         * xtensa-xtregs.c: New.
12010
12011 2008-02-01  Pedro Alves  <pedro_alves@portugalmail.pt>
12012
12013         * hostio.c: Don't include errno.h.
12014         (errno_to_fileio_errno): Move to hostio-errno.
12015         * hostio.c: (hostio_error): Remove the error parameter.  Defer the
12016         error number outputting to the target->hostio_last_error callback.
12017         (hostio_packet_error): Use FILEIO_EINVAL directly.
12018         (handle_open, handle_pread, hostio_error, handle_unlink): Update
12019         calls to hostio_error.
12020         * hostio-errno.c: New.
12021         * server.h (hostio_last_error_from_errno): Declare.
12022         * target.h (target_ops): Add hostio_last_error member.
12023         * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
12024         as hostio_last_error handler.
12025         * spu-low.c (spu_target_ops): Likewise.
12026         * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
12027         (wince_hostio_last_error): New functions.
12028         (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
12029         as hostio_last_error handler.
12030         (win32_target_ops) [!_WIN32_WCE]: Register
12031         hostio_last_error_from_errno as hostio_last_error handler.
12032         * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
12033         (hostio-errno.o): New rule.
12034         * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
12035         * configure.srv (srv_hostio_err_objs): New variable.  Default to
12036         hostio-errno.o.
12037         (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
12038         * configure: Regenerate.
12039
12040 2008-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
12041
12042         * linux-low.c (linux_attach_lwp): Do not _exit after errors.
12043         (linux_kill, linux_detach): Clean up the process list.
12044         * remote-utils.c (remote_open): Improve port number parsing.
12045         (putpkt_binary, input_interrupt): Only send interrupts if the target
12046         is running.
12047         * server.c (extended_protocol): Make static.
12048         (attached): Define earlier.
12049         (exit_requested, response_needed, program_argv): New variables.
12050         (target_running): New.
12051         (start_inferior): Clear attached here.
12052         (attach_inferior): Set attached here.
12053         (require_running): Define.
12054         (handle_query): Use require_running and target_running.  Implement
12055         "monitor exit".
12056         (handle_v_attach, handle_v_run): New.
12057         (handle_v_requests): Use require_running.  Handle vAttach and vRun.
12058         (gdbserver_usage): Update.
12059         (main): Redo argument parsing.  Handle --debug and --multi.  Handle
12060         --attach along with other options or after the port.  Save
12061         program_argv.  Support no initial program.  Resynchronize
12062         communication with GDB after an error.  Handle "monitor exit".
12063         Use require_running and target_running.  Always allow the extended
12064         protocol.  Do not error out for Hc0 or Hc-1.  Do not automatically
12065         restart in extended mode.
12066         * README: Refer to the GDB manual.  Update --attach usage.
12067
12068 2007-12-20  Andreas Schwab  <schwab@suse.de>
12069
12070         * linux-low.c (STACK_SIZE): Define.
12071         (linux_tracefork_child): Use it.  Use __clone2 on ia64.
12072         (linux_test_for_tracefork): Likewise.
12073
12074 2007-12-18  Daniel Jacobowitz  <dan@codesourcery.com>
12075
12076         * linux-low.c (linux_wait_for_event): Update messages.  Do not
12077         reinsert auto-delete breakpoints.
12078         * mem-break.c (struct breakpoint): Change return type of handler to
12079         int.
12080         (set_breakpoint_at): Update handler type.
12081         (reinsert_breakpoint_handler): Return 1 instead of calling
12082         delete_breakpoint.
12083         (reinsert_breakpoint_by_bp): Check for the original breakpoint before
12084         setting a new one.
12085         (check_breakpoints): Delete auto-delete breakpoints and return 2.
12086         * mem-break.h (set_breakpoint_at): Update handler type.
12087         * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
12088         * win32-low.c (auto_delete_breakpoint): New.
12089         (get_child_debug_event): Use it.
12090
12091 2007-12-16  Daniel Jacobowitz  <dan@codesourcery.com>
12092
12093         * configure.ac: Check for pread and pwrite.
12094         * hostio.c (handle_pread): Fall back to lseek and read.
12095         (handle_pwrite): Fall back to lseek and write.
12096         * config.in, configure: Regenerated.
12097
12098 2007-12-07  Daniel Jacobowitz  <dan@codesourcery.com>
12099
12100         * server.c (myresume): Add own_buf argument.
12101         (main): Update calls.
12102
12103 2007-12-06  Daniel Jacobowitz  <dan@codesourcery.com>
12104
12105         * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
12106         * remote-utils.c (remote_open): Do not call disable_async_io.
12107         (block_async_io): Delete.
12108         (unblock_async_io): Make static.
12109         (initialize_async_io): New.
12110         * server.c (handle_v_cont): Handle async I/O here.
12111         (myresume): Likewise.  Move other common resume tasks here...
12112         (main): ... from here.  Call initialize_async_io.  Disable async
12113         I/O before the main loop.
12114         * server.h (initialize_async_io): Declare.
12115         (block_async_io, unblock_async_io): Delete prototypes.
12116         * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
12117
12118 2007-12-06  Mick Davis  <mickd@goanna.iinet.net.au>
12119
12120         * remote-utils.c (readchar): Allow binary data in received messages.
12121
12122 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
12123
12124         * win32-low.c (attaching): New global.
12125         (win32_create_inferior): Clear the `attaching' global.
12126         (win32_attach): Set the `attaching' global.
12127         (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
12128         attaching.  Only set a breakpoint at the entry point if not
12129         attaching.
12130
12131 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
12132
12133         * server.c (main): Don't report dll events on the initial
12134         connection on attaches.
12135
12136 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
12137
12138         * server.c (main): Relax numerical bases supported for the pid of
12139         the --attach command line argument.
12140
12141 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
12142
12143         * win32-low.c (win32_attach): Call OpenProcess before
12144         DebugActiveProcess, not after.  Add last error output to error
12145         call.
12146
12147 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
12148
12149         * win32-low.c (win32_get_thread_context)
12150         (win32_set_thread_context): New functions.
12151         (thread_rec): Use win32_get_thread_context.
12152         (continue_one_thread, win32_resume): Use win32_set_thread_context.
12153         * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
12154         field.
12155
12156 2007-12-03  Leo Zayas
12157             Pedro Alves  <pedro_alves@portugalmail.pt>
12158
12159         * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
12160         global variables.
12161         (child_add_thread): Minor cleanup.
12162         (child_continue): Resume artificially suspended threads before
12163         calling ContinueDebugEvent.
12164         (suspend_one_thread): New.
12165         (fake_breakpoint_event): New.
12166         (get_child_debug_event): Change return type to int.  Check here if
12167         gdb sent an interrupt request.  If a soft interrupt was requested,
12168         fake a breakpoint event.  Return 0 if there is no event to handle,
12169         and 1 otherwise.
12170         (win32_wait): Don't check here if gdb sent an interrupt request.
12171         Ensure there is a valid event to handle.
12172         (win32_request_interrupt): Add soft interruption method as last
12173         resort.
12174
12175 2007-12-03  Leo Zayas
12176             Pedro Alves  <pedro_alves@portugalmail.pt>
12177
12178         * win32-low.h (win32_thread_info): Add descriptions to the
12179         structure members.  Replace `suspend_count' counter by a
12180         `suspended' flag.
12181         * win32-low.c (thread_rec): Update condition of when to get the
12182         context from the inferior.  Rely on ContextFlags being set if it
12183         has already been retrieved.  Only suspend the inferior thread if
12184         we haven't already.  Warn if that fails.
12185         (continue_one_thread): s/suspend_count/suspended/.  Only call
12186         ResumeThread once.  Warn if that fails.
12187
12188 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
12189
12190         * win32-low.c (win32_wait): Don't read from the inferior when it
12191         has already exited.
12192
12193 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
12194
12195         * Makefile.in (win32_low_h): New variable.
12196         (win32-low.o): Add dependency on $(win32_low_h).
12197         (win32-arm-low.o, win32-i386-low.o): New rules.
12198
12199 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
12200
12201         * hostio.c: Correct copyright year.
12202
12203 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
12204
12205         * Makefile.in (OBS): Add hostio.o.
12206         (hostio.o): New rule.
12207         * server.h (handle_vFile): Declare.
12208         * hostio.c: New file.
12209         * server.c (handle_v_requests): Take packet_len and new_packet_len
12210         for binary packets.  Call handle_vFile.
12211         (main): Update call to handle_v_requests.
12212
12213 2007-11-05  Daniel Jacobowitz  <dan@codesourcery.com>
12214
12215         * linux-low.c: Include <sched.h>.
12216
12217 2007-11-01  Daniel Jacobowitz  <dan@codesourcery.com>
12218
12219         * linux-low.c (linux_tracefork_grandchild): New.
12220         (linux_tracefork_child): Use clone.
12221         (linux_test_for_tracefork): Use clone; allocate and free a stack.
12222
12223 2007-10-31  Joel Brobecker  <brobecker@adacore.com>
12224
12225         * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
12226
12227 2007-10-24  Daniel Jacobowitz  <dan@codesourcery.com>
12228
12229         * linux-low.c (handle_extended_wait): Handle unexpected signals.
12230
12231 2007-10-23  Daniel Jacobowitz  <dan@codesourcery.com>
12232
12233         * inferiors.c (change_inferior_id): Delete.
12234         (add_pid_to_list, pull_pid_from_list): New.
12235         * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
12236         (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
12237         (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
12238         (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
12239         (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
12240         (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
12241         (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
12242         (using_threads): Always set to 1.
12243         (handle_extended_wait): New.
12244         (add_process): Do not set TID.
12245         (linux_create_inferior): Set must_set_ptrace_flags.
12246         (linux_attach_lwp): Remove TID argument.  Do not check using_threads.
12247         Use PTRACE_SETOPTIONS.  Call new_thread_notify.  Update all callers.
12248         (linux_thread_alive): Rename TID argument to LWPID.
12249         (linux_wait_for_process): Handle unknown processes.  Do not use TID.
12250         (linux_wait_for_event): Do not use TID or check using_threads.  Update
12251         call to dead_thread_notify.  Call handle_extended_wait.
12252         (linux_create_inferior): Use PTRACE_SETOPTIONS.
12253         (send_sigstop): Delete sigstop_sent.
12254         (wait_for_sigstop): Avoid TID.
12255         (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
12256         (linux_test_for_tracefork): New.
12257         (linux_lookup_signals): Use thread_db_active and
12258         linux_supports_tracefork_flag.
12259         (initialize_low): Use thread_db_active and linux_test_for_tracefork.
12260         * linux-low.h (get_process_thread): Avoid TID.
12261         (struct process_ifo): Move thread_known and tid to the end.  Remove
12262         sigstop_sent.
12263         (linux_attach_lwp, thread_db_init): Update prototypes.
12264         * server.h (change_inferior_id): Delete prototype.
12265         (add_pid_to_list, pull_pid_from_list): New prototypes.
12266         * thread-db.c (thread_db_use_events): New.
12267         (find_first_thread): Rename to...
12268         (find_one_thread): ...this.  Update callers and messages.  Do not
12269         call fatal.  Check thread_db_use_events.  Do not call
12270         change_inferior_id or new_thread_notify.
12271         (maybe_attach_thread): Update.  Do not call new_thread_notify.
12272         (thread_db_init): Set thread_db_use_events.  Check use_events.
12273         * utils.c (fatal, warning): Correct message prefix.
12274
12275 2007-10-15  Daniel Jacobowitz  <dan@codesourcery.com>
12276
12277         * Makefile.in (clean): Remove new files.
12278         (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
12279         (powerpc-64.o, powerpc-64.c): New rules.
12280         * configure.srv: Use alternate register sets for powerpc64-*-linux*
12281         with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
12282         with SPE.
12283         * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
12284         SPE targets.
12285         (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
12286         (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
12287         (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
12288         (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
12289         (target_regsets): Add AltiVec and SPE register sets.
12290         * configure.ac: Check for AltiVec and SPE.
12291         * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
12292         (ppc_fill_vrregset, ppc_store_vrregset): New.
12293         (target_regsets): Add AltiVec register set.
12294         * configure: Regenerated.
12295
12296 2007-09-19  Daniel Jacobowitz  <dan@codesourcery.com>
12297
12298         * linux-low.c (O_LARGEFILE): Define.
12299         (linux_read_memory): Use /proc/PID/mem.
12300         * configure.ac: Use AC_GNU_SOURCE.  Check for pread64.
12301         * configure, config.in: Regenerated.
12302
12303 2007-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
12304
12305         * linux-low.c (linux_wait_for_event): Do not pass signals while
12306         single-stepping.
12307
12308 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
12309
12310         * win32-low.c (create_process): New.
12311         (win32_create_inferior): Use create_process instead of
12312         CreateProcess.  If create_process failed retry appending an ".exe"
12313         suffix.  Store the GetLastError result immediatelly after
12314         create_process calls and use it on the call to error.
12315
12316 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
12317
12318         * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
12319
12320 2007-08-23  Joel Brobecker  <brobecker@adacore.com>
12321
12322         * configure.ac: Switch license to GPLv3.
12323
12324 2007-08-01  Michael Snyder  <msnyder@access-company.com>
12325
12326         * remote-utils.c (putpkt_binary): Memory leak, free buf2.
12327
12328 2007-07-31  Pedro Alves  <pedro_alves@portugalmail.pt>
12329
12330         * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
12331         typedef.
12332         (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
12333         (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL.  Get
12334         CloseToolhelp32Snapshot.
12335         (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
12336         CloseToolhelp32Snapshot.
12337
12338 2007-07-27  Michael Snyder  <michael.snyder@access-company.com>
12339
12340         * server.c (main): Check for inferior exit before main loop.
12341
12342 2007-07-18  Pedro Alves  <pedro_alves@portugalmail.pt>
12343
12344         * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
12345         instead of on tmp_desc.
12346
12347 2007-07-17  Pedro Alves  <pedro_alves@portugalmail.pt>
12348             Daniel Jacobowitz  <dan@codesourcery.com>
12349
12350         * inferiors.c (all_dlls, dlls_changed, get_dll): New.
12351         (add_thread): Minor cleanups.
12352         (clear_inferiors): Move lower in the file.  Clear the DLL
12353         list.
12354         (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
12355         * remote-utils.c (prepare_resume_reply): Check dlls_changed.
12356         (xml_escape_text): New.
12357         * server.c (handle_query): Handle qXfer:libraries:read.  Report it
12358         for qSupported.
12359         (handle_v_cont): Report errors.
12360         (gdbserver_version): Update.
12361         (main): Correct size of own_buf.  Do not report initial DLL events.
12362         * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
12363         (unloaded_dll, xml_escape_text): New.
12364         * win32-low.c (enum target_waitkind): Update comments.
12365         (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
12366         (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
12367         (win32_EnumProcessModules, win32_GetModuleInformation)
12368         (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
12369         (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
12370         (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
12371         (win32_Module32First, win32_Module32Next, load_toolhelp)
12372         (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
12373         (get_child_debug_event): Handle DLL events.
12374         (win32_wait): Likewise.
12375
12376 2007-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
12377
12378         * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
12379         * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
12380
12381 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
12382
12383         * win32-low.c (handle_output_debug_string): Ignore event if not
12384         waiting.
12385
12386 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
12387
12388         * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
12389
12390 2007-07-03  Daniel Jacobowitz  <dan@codesourcery.com>
12391
12392         * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
12393
12394 2007-07-02  Daniel Jacobowitz  <dan@codesourcery.com>
12395
12396         * inferiors.c (change_inferior_id): Add comment.
12397         * linux-low.c (check_removed_breakpoint): Add an early
12398         prototype.  Improve debug output.
12399         (linux_attach): Doc update.
12400         (linux_detach_one_process, linux_detach): Clean up before releasing
12401         each process.
12402         (send_sigstop, wait_for_sigstop): Improve comments and debug output.
12403         * linux-low.h (struct process_info): Doc improvement.
12404         * mem-break.c (delete_all_breakpoints): New.
12405         * mem-break.h (delete_all_breakpoints): New prototype.
12406         * thread-db.c (find_first_thread): New.
12407         (thread_db_create_event): Call it instead of
12408         thread_db_find_new_threads.  Clean up unused variables.
12409         (maybe_attach_thread): Remove first thread handling.
12410         (thread_db_find_new_threads): Use find_first_thread.
12411         (thread_db_get_tls_address): Likewise.
12412
12413 2007-06-27  Daniel Jacobowitz  <dan@codesourcery.com>
12414
12415         * thread-db.c (thread_db_find_new_threads): Add prototype.
12416         (thread_db_create_event): Check for the main thread before adding
12417         a new thread.
12418         (maybe_attach_thread): Only enable event reporting if TID == 0.
12419         (thread_db_get_tls_address): Check for new threads.
12420
12421 2007-06-20  Daniel Jacobowitz  <dan@codesourcery.com>
12422
12423         * linux-low.c (linux_create_inferior): Try execv before execvp.
12424         * spu-low.c (spu_create_inferior): Likewise.
12425
12426 2007-06-13  Mike Frysinger  <vapier@gentoo.org>
12427
12428         * linux-low.c (linux_create_inferior): Change execv to execvp.
12429         * spu-low.c (spu_create_inferior): Likewies.
12430
12431 2007-06-13  Daniel Jacobowitz  <dan@codesourcery.com>
12432
12433         * Makefile.in (clean): Clean new files instead of deleted ones.
12434         (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
12435         (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
12436         rules.
12437         * configure.srv: Specify XML files and new regformats for MIPS and
12438         MIPS64 GNU/Linux.
12439         * linux-mips-low.c (mips_num_regs): Set to only used registers.
12440         (mips_regmap): Do not fetch $0.  Remove unused registers.  Add
12441         an entry for the restart register.
12442         (mips_cannot_fetch_register, mips_cannot_store_register)
12443         (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
12444         register names to match the XML descriptions.
12445         (mips_fill_gregset, mips_store_gregset): Likewise.  Handle the
12446         restart register instead of $0.
12447
12448 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
12449             Markus Deuling  <deuling@de.ibm.com>
12450
12451         * remote-utils.c (decode_xfer_write): New function.
12452         * server.h (decode_xfer_write): Add prototype.
12453         * server.c (handle_query): Add PACKET_LEN argument.  Support
12454         qXfer:spu:read and qXfer:spu:write packets.
12455         (main): Pass packet_len to handle_query.
12456         * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
12457         * target.h (target_ops): Add qxfer_spu.
12458
12459 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
12460
12461         * spu-low.c (spu_proc_xfer_spu): Do not return failure when
12462         accessing non-seekable spufs files.
12463
12464 2007-05-16  Markus Deuling  <deuling@de.ibm.com>
12465
12466         * server.c (handle_query): Add reply for qC packet.
12467
12468 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
12469             Leo Zayas  <lerele@champenstudios@com>
12470
12471         * server.h (check_remote_input_interrupt_request): New function.
12472         * remote_utils.c (INVALID_DESCRIPTOR): New define.
12473         (remote_desc): Initialize with INVALID_DESCRIPTOR.
12474         (input_interrupt): Expose on USE_WIN32API too.  Fix whitespace.
12475         (check_remote_input_interrupt_request): New function.
12476         * server.h (check_remote_input_interrupt_request): Declare.
12477         * win32-low.c (winapi_DebugBreakProcess,
12478         winapi_GenerateConsoleCtrlEvent): New typedefs.
12479         (get_child_debug_event): Lower Win32 debug event polling from 1 sec
12480         to 250 ms.
12481         (win32_wait): Check for remote interrupt request
12482         with check_remote_input_interrupt_request.
12483         (win32_request_interrupt): New function.
12484         (win32_target_op): Set request_interrupt to win32_request_interrupt.
12485
12486 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
12487
12488         * win32-low.c (debug_registers_changed,
12489         debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
12490         CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
12491         CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
12492         (thread_rec): Get context using the low target.
12493         (child_add_thread): Call thread_added on the low target,
12494         which does the same thing.
12495         (regptr): Delete.
12496         (do_initial_child_stuff): Remove debug registers references.
12497         Set context using the low target.  Resume threads after
12498         setting the contexts.
12499         (child_continue): Remove dead variable.  Remove debug
12500         registers references.
12501         (child_fetch_inferior_registers): Go through the low target.
12502         (do_child_store_inferior_registers): Remove.
12503         (child_store_inferior_registers): Go through the low target.
12504         (win32_resume): Remove debug registers references.
12505         Set context using the low target.
12506         (handle_exception): Change return type to void.  Don't record
12507         context here.  Set status to TARGET_WAITKIND_SPURIOUS on a
12508         first chance exception.
12509         (get_child_debug_event): Change return type to void.  Remove
12510         goto loop.  Always return after waiting for debug event.
12511         (win32_wait): Convert to switch statement.  Handle spurious
12512         events.
12513
12514         * win32-i386-low.c (debug_registers_changed,
12515         debug_registers_used): New.
12516         (initial_stuff): Rename to ...
12517         (i386_initial_stuff): ... this.  Clear debug registers
12518         state variables.
12519         (store_debug_registers): Delete.
12520         (i386_get_thread_context): New.
12521         (load_debug_registers): Delete.
12522         (i386_set_thread_context): New.
12523         (i386_thread_added): New.
12524         (single_step): Rename to ...
12525         (i386_single_step): ... this.
12526         (do_fetch_inferior_registers): Rename to ...
12527         (i386_fetch_inferior_register): ... this.
12528         (i386_store_inferior_register): New.
12529         (the_low_target): Adapt to new interface.
12530
12531         * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
12532         (arm_get_thread_context): New.
12533         (arm_set_thread_context): New.
12534         (regptr): New.
12535         (do_fetch_inferior_registers): Rename to ...
12536         (arm_fetch_inferior_register): ... this.
12537         (arm_store_inferior_register): New.
12538         (arm_wince_breakpoint): Reimplement as unsigned long.
12539         (arm_wince_breakpoint_len): Define.
12540         (the_low_target): Adapt to new interface.
12541
12542         * win32-low.h (target_ops): Remove regmap, store_debug_registers and
12543         load_debug_registers.  Add get_thread_context, set_thread_context,
12544         thread_added and store_inferior_register.  Rename
12545         fetch_inferior_registers to fetch_inferior_register.
12546         (regptr): Remove declaration.
12547
12548 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
12549
12550         * linux-low.c (linux_detach): Change return type to int.  Return 0.
12551         * spu-low.c (spu_detach): Likewise.
12552
12553 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
12554
12555         * target.h (target_ops): Change return type of detach to int.
12556         Add join.
12557         (join_inferior): New.
12558         * server.c (main): Don't skip detach support on mingw32.
12559         If the inferior doesn't support detaching return error.
12560         Call join_inferior instead of using waitpid.
12561         * linux-low.c (linux_join): New.
12562         (linux_target_op): Add linux_join.
12563         * spu-low.c (spu_join): New.
12564         (spu_target_ops): Add spu_join.
12565         * win32-low.c (win32_detach): Adapt to new interface.
12566         Reopen current_process_handle before detaching.  Issue a child
12567         resume before detaching.
12568         (win32_join): New.
12569         (win32_target_op): Add win32_join.
12570
12571 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
12572
12573         * win32-low.c (win32-attach): Fix return value.
12574         * target.h (target_ops): Describe ATTACH return values.
12575
12576 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
12577
12578         * win32-low.c (GETPROCADDRESS): Define.
12579         (winapi_DebugActiveProcessStop): Add WINAPI.  typedef as pointer.
12580         (winapi_DebugSetProcessKillOnExit): Likewise.
12581         (win32_create_inferior): Force usage of ansi CreateProcessA.
12582         (win32_attach): Use GETPROCADDRESS.
12583         (win32_detach): Likewise.
12584
12585 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
12586
12587         * win32-low.c (win32_wait): Don't use WSTOPSIG.
12588
12589 2007-03-30  Pedro Alves  <pedro_alves@portugalmail.pt>
12590
12591         * win32-low.c: Commit leftover changes from 2007-03-29.
12592
12593 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
12594
12595         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
12596         fields short instead of int.  Add explicit padding.
12597         (i387_cache_to_fsave): Remove unnecessary casts.
12598         (i387_fsave_to_cache): Doc fix.
12599         (i387_cache_to_fxsave): Remove unnecessary casts and masking.
12600
12601 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
12602
12603         * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
12604         (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
12605
12606 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
12607
12608         * configure.srv (arm*-*-mingw32ce*): Move near the other
12609         arm targets.
12610
12611 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
12612
12613         * configure.ac: Add errno checking.
12614         (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
12615         sys/file.h and malloc.h.
12616         (AC_CHECK_DECLS): Add perror.
12617         (srv_mingwce): Handle.
12618         * configure.srv (i[34567]86-*-cygwin*): Add
12619         win32-i386-low.o to srv_tgtobj.
12620         (i[34567]86-*-mingw*): Likewise.
12621         (arm*-*-mingw32ce*): Add case.
12622         * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12623         HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
12624         [__MINGW32CE__] (strerror): New function.
12625         [__MINGW32CE__] (errno): Define to GetLastError.
12626         [__MINGW32CE__] (COUNTOF): New macro.
12627         (remote_open): Remove extra close call.
12628         * mem-break.c (delete_breakpoint_at): New function.
12629         * mem-break.h (delete_breakpoint_at): Declare.
12630         * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12631         HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
12632         [USE_WIN32API] (read, write): Add char* casts.
12633         * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
12634         * server.h: Include wincecompat.h on Windows CE.
12635         [HAVE_ERRNO_H]: Check.
12636         (perror): Declare if not declared.
12637         * utils.c: Add stdlib.h, errno.h and malloc.h includes.
12638         (perror_with_name): Remove errno declaration.
12639         * wincecompat.h: New.
12640         * wincecompat.c: New.
12641         * win32-low.h: New.
12642         * win32-arm-low.c: New.
12643         * win32-i386-low.c: New.
12644         (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
12645         (OUTMSG2): Make it safe.
12646         (_T): New macro.
12647         (COUNTOF): New macro.
12648         (NUM_REGS): Get it from the low target.
12649         (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
12650         CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
12651         (thread_rec): Let low target handle debug registers.
12652         (child_add_thread): Likewise.
12653         (child_init_thread_list): Likewise.
12654         (continue_one_thread): Likewise.
12655         (regptr): New.
12656         (do_child_fetch_inferior_registers): Move to ...
12657         * win32-i386-low.c: ... here, and rename to ...
12658         (do_fetch_inferior_registers): ... this.
12659         * win32-low.c (child_fetch_inferior_registers):
12660         Go through the low target.
12661         (do_child_store_inferior_registers): Use regptr.
12662         (strwinerror): New function.
12663         (win32_create_inferior): Handle Windows CE.
12664         Use strwinerror instead of strerror on Windows error
12665         codes.  Add program to the error output.
12666         Don't close the main thread handle on Windows CE.
12667         (win32_attach): Use coredll.dll on Windows CE.
12668         (win32_kill): Close current process and current
12669         thread handles.
12670         (win32_detach): Use coredll.dll on Windows CE.
12671         (win32_resume): Let low target handle debug registers, and
12672         step request.
12673         (handle_exception): Add/Remove initial breakpoint.  Avoid
12674         non-existant WSTOPSIG on Windows CE.
12675         (win32_read_inferior_memory): Cast to remove warning.
12676         (win32_arch_string): Go through the low target.
12677         (initialize_low): Call set_breakpoint_data with the low
12678         target's breakpoint.
12679         * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
12680         FOP_REGNUM, mappings): Move to ...
12681         * win32-i386-low.c: ... here.
12682         * win32-low.c (win32_thread_info): Move to ...
12683         * win32-low.h: ... here.
12684         * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
12685         win32-arm-low.c and wincecompat.c.
12686         (all:): Add $EXEEXT.
12687         (install-only:): Likewise.
12688         (gdbserver:): Likewise.
12689         (gdbreplay:): Likewise.
12690         * config.in: Regenerate.
12691         * configure: Regenerate.
12692
12693 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
12694
12695         * win32-low.c: Rename typedef thread_info to
12696         win32_thread_info throughout.
12697
12698 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
12699
12700         * win32-i386-low.c: Rename to ...
12701         * win32-low.c: ... this.
12702         * configure.srv: Replace win32-i386-low.o with win32-low.o.
12703         * Makefile.in: Likewise.
12704
12705 2007-03-27  Pedro Alves  <pedro_alves@portugalmail.pt>
12706
12707         * remote-utils.c (monitor_output): Constify msg parameter.
12708         * server.h (monitor_output): Likewise.
12709         * win32-i386-low.c (handle_output_debug_string): New.
12710         (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
12711         handle_output_debug_string.
12712         (get_child_debug_event): Likewise.
12713
12714 2007-03-27  Mat Hostetter  <mat@lcs.mit.edu>
12715
12716         * server.c (main): Correct strtoul check.
12717
12718 2007-03-27  Jon Ringle  <jon@ringle.org>
12719
12720         * linux-low.c: Check __ARCH_HAS_MMU__ also.
12721
12722 2007-03-27  Brooks Moses  <brooks.moses@codesourcery.com>
12723
12724         * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
12725
12726 2007-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
12727
12728         * terminal.h: Check HAVE_SGTTY_H.
12729
12730 2007-02-27  Mat Hostetter  <mat@lcs.mit.edu>
12731
12732         * remote-utils.c (remote_open): Print out the assigned port number.
12733
12734 2007-02-26  Daniel Jacobowitz  <dan@codesourcery.com>
12735
12736         * remote-utils.c (monitor_output): New function.
12737         * server.c (debug_threads): Define here.
12738         (monitor_show_help): New function.
12739         (handle_query): Handle qRcmd.
12740         (main): Do not handle 'd' packet.
12741         * server.h (debug_threads, remote_debug, monitor_output): Declare.
12742         * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
12743         of debug_threads.
12744
12745 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
12746
12747         * Makefile.in (EXEEXT): New.
12748         (clean): Use $(EXEEXT).
12749
12750 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
12751
12752         * target.h (target_ops): Rename send_signal to request_interrupt,
12753         and remove enum target_signal parameter.
12754         * linux-low.c (linux_request_interrupt): Rename from
12755         linux_send_signal, and always send SIGINT.
12756         * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
12757         and always send SIGINT.
12758         * remote-utils.c (putpkt_binary): Call request_interrupt, instead
12759         of send_signal.
12760         (input_interrupt): Likewise.
12761
12762 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
12763
12764         * server.c (get_features_xml): Check if target implemented
12765         arch_string.
12766         * win32-i386-low.c (win32_arch_string): New.
12767         (win32_target_ops): Add win32_arch_string as arch_string member.
12768
12769 2007-02-22  Markus Deuling  <deuling@de.ibm.com>
12770
12771         * spu-low.c (spu_arch_string): New.
12772         (spu_target_ops): Add spu_arch_string.
12773
12774 2007-02-16  Daniel Jacobowitz  <dan@codesourcery.com>
12775
12776         * remote-utils.c: Remove HAVE_TERMINAL_H check.
12777         * configure.ac: Do not check for terminal.h.
12778         * configure, config.in: Regenerated.
12779
12780 2007-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
12781
12782         * Makefile.in (OBS): Add $(XML_BUILTIN).
12783         (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
12784         (clean): Update.
12785         (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
12786         (arm-with-iwmmxt.c): New.
12787         * config.in, configure: Regenerate.
12788         * configure.ac: Check for iWMMXt.  Handle srv_xmltarget,
12789         srv_xmlbuiltin, and srv_xmlfiles.  Define USE_XML.
12790         * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
12791         (arm*-*-linux*): Add iWMMXt and regset support.
12792         * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
12793         (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
12794         (arm_store_wmmxregset, target_regsets): New.
12795         * server.c (get_features_xml): Take annex argument.  Check builtin
12796         XML documents.
12797         (handle_query): Handle multiple annexes.
12798
12799 2007-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
12800
12801         * remote-utils.c [USE_WIN32API] (read, write): Define.
12802         (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
12803         write.
12804
12805 2007-01-09  Daniel Jacobowitz  <dan@codesourcery.com>
12806
12807         * linux-i386-low.c (the_low_target): Set arch_string.
12808         * linux-x86-64-low.c (the_low_target): Likewise.
12809         * linux-low.c (linux_arch_string): New.
12810         (linux_target_ops): Add it.
12811         * linux-low.h (struct linux_target_ops): Add arch_string.
12812         * server.c (write_qxfer_response): Use const void * for DATA.
12813         (get_features_xml): New.
12814         (handle_query): Handle qXfer:features:read.  Report it for qSupported.
12815         * target.h (struct target_ops): Add arch_string method.
12816
12817 2007-01-03  Denis Pilat  <denis.pilat@st.com>
12818             Daniel Jacobowitz  <dan@codesourcery.com>
12819
12820         * linux-low.c (linux_kill): Handle being called with no threads.
12821         * win32-i386-low.c (win32_kill): Likewise.
12822         (get_child_debug_event): Clear current_process_handle.
12823
12824 2006-12-30  Denis PILAT  <denis.pilat@st.com>
12825             Daniel Jacobowitz  <dan@codesourcery.com>
12826
12827         * remote-utils.c (remote_open): Check the type of specified
12828         serial port devices before opening them.
12829         * server.c (main): Kill the inferior if an error occurs during
12830         the first remote_open.
12831
12832 2006-12-05  Markus Deuling  <deuling@de.ibm.com>
12833
12834         * README: Update supported targets.
12835
12836 2006-11-28  Daniel Jacobowitz  <dan@codesourcery.com>
12837
12838         * Makefile.in (clean): Remove reg-mips64.c.
12839         (reg-mips64.c, reg-mips64.o): New rules.
12840         * configure.srv: Handle mips64.  Include regset support for mips.
12841         * linux-mips-low.c (union mips_register): New.
12842         (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
12843         (mips_breakpoint, mips_breakpoint_at): Use int.
12844         (mips_collect_register, mips_supply_register)
12845         (mips_collect_register_32bit, mips_supply_register_32bit)
12846         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12847         (mips_store_fpregset, target_regsets): New.
12848         * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
12849
12850 2006-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
12851
12852         * configure.srv: Add target "spu*-*-*".
12853         * Makefile.in (clean): Remove reg-spu.c.
12854         (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
12855         * spu-low.c: New file.
12856
12857 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
12858
12859         * configure.ac: Correct td_thr_tls_get_addr test.
12860         * configure: Regenerated.
12861
12862 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
12863
12864         * linux-low.c (linux_wait_for_event): Reformat.  Use the
12865         pass_signals array.
12866         * remote-utils.c (decode_address_to_semicolon): New.
12867         * server.c (pass_signals, handle_general_set): New.
12868         (handle_query): Mention QPassSignals for qSupported.
12869         (main): Call handle_general_set.
12870         * server.h (pass_signals, decode_address_to_semicolon): New.
12871
12872 2006-11-06  Daniel Jacobowitz  <dan@codesourcery.com>
12873
12874         * server.c (handle_query): Correct error handling for read_auxv.
12875
12876 2005-10-19  Ulrich Weigand  <uweigand@de.ibm.com>
12877
12878         * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
12879         and srv_linux_thread_db to yes.
12880         * linux-s390-low.c (s390_fill_gregset): New function.
12881         (target_regsets): Define data structure.
12882
12883 2006-10-17  Daniel Jacobowitz  <dan@codesourcery.com>
12884
12885         * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
12886         * configure.ac: Use it.  Define HAVE_TD_THR_TLS_GET_ADDR.
12887         * config.in, configure: Regenerated.
12888         * inferiors.c (gdb_id_to_thread): New function.
12889         (gdb_id_to_thread_id): Use it.
12890         * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
12891         * linux-low.h (struct process_info): Add th member.
12892         (thread_db_get_tls_address): New prototype.
12893         * remote-utils.c (decode_address): Make non-static.
12894         * server.c (handle_query): Handle qGetTLSAddr.
12895         * server.h (gdb_id_to_thread, decode_address): New prototypes.
12896         * target.h (struct target_ops): Add get_tls_address.
12897         * thread-db.c (maybe_attach_thread): Save the thread handle.
12898         (thread_db_get_tls_address): New.
12899
12900 2006-09-28  Daniel Jacobowitz  <dan@codesourcery.com>
12901
12902         * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
12903         (linux_resume_one_process): Take a siginfo_t *.  Update all
12904         callers.  Queue it if necessary.  Use PTRACE_SETSIGINFO.
12905         (struct pending_signals): Add a siginfo_t.
12906         (linux_wait_for_process): Always set last_status.
12907         (linux_wait_for_event): Use PTRACE_GETSIGINFO.
12908         (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
12909         * linux-low.h (struct process_info): Add last_status.
12910
12911 2006-09-21  Daniel Jacobowitz  <dan@codesourcery.com>
12912
12913         * remote-utils.c (try_rle): New function.
12914         (putpkt_binary): Use it.
12915
12916 2006-08-19  Daniel Jacobowitz  <dan@codesourcery.com>
12917
12918         * Makefile.in (clean): Clean reg-x86-64-linux.c.
12919         (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
12920         * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
12921         * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
12922         (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
12923         point registers.
12924
12925 2006-08-08  Richard Sandiford  <richard@codesourcery.com>
12926
12927         * server.c (terminal_fd): New variable.
12928         (old_foreground_pgrp): Likewise.
12929         (restore_old_foreground_pgrp): New function.
12930         (start_inferior): Record the terminal file descriptor in terminal_fd
12931         and its original foreground group in old_foreground_pgrp.  Register
12932         restore_old_foreground_pgrp with atexit().
12933
12934 2006-07-26  Daniel Jacobowitz  <dan@codesourcery.com>
12935
12936         * server.c (handle_query): Correct qPart to qXfer.
12937
12938 2006-07-22  Daniel Jacobowitz  <dan@codesourcery.com>
12939
12940         * configure.ac: Check for more headers which are missing on
12941         Windows.  Automatically supply -lwsock32 and USE_WIN32API.
12942         * configure.srv: Add Cygwin and mingw32.
12943         * remote-utils.c: Don't include headers unconditionally which
12944         are missing on mingw32.  Include <winsock.h> for mingw32.
12945         (remote_open): Adjust for mingw32 support.  Flush
12946         standard error after writing to it.
12947         (remote_close, putpkt_binary, input_interrupt, block_async_io)
12948         (unblock_async_io, enable_async_io, disable_async_io)
12949         (readchar, getpkt): Update for Winsock support.
12950         (prepare_resume_reply): Expect a protocol signal number.
12951         * server.c: Disable <sys/wait.h> on mingw32.
12952         (start_inferior): Adjust for mingw32 support.  Flush
12953         standard error after writing to it.
12954         (attach_inferior): Likewise.  Use protocol signal
12955         numbers.
12956         (main): Skip 'D' packet on mingw32.  Use protocol signal numbers
12957         and names.
12958         * win32-i386-low.c: New file.
12959         * Makefile.in (XM_CLIBS): Set.
12960         (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
12961         (win32-i386-low.o): New dependency rule.
12962         * linux-low.c (linux_wait): Use target signal numbers.
12963         * target.h (struct target_ops): Doc fix.
12964         * server.h (target_signal_to_name): New prototype.
12965         * gdbreplay.c: Don't include headers unconditionally which
12966         are missing on mingw32.  Include <winsock.h> for mingw32.
12967         (remote_close, remote_open): Adjust for Winsock support.
12968         * configure, config.in: Regenerated.
12969
12970 2006-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
12971
12972         * server.c (decode_xfer_read, write_qxfer_response): New.
12973         (handle_query): Take a packet length argument.  Handle
12974         qXfer:auxv:read instead of qPart:auxv:read.  Mention it in
12975         the qSupported response.
12976         (main): Update call to handle_query.
12977
12978 2006-06-22  Daniel Jacobowitz  <dan@codesourcery.com>
12979
12980         * remote-utils.c (remote_escape_output, remote_unescape_input): New.
12981         (putpkt_binary): Renamed from putpkt and adjusted for binary
12982         data.
12983         (putpkt): New wrapper for putpkt_binary.
12984         (readchar): Don't mask off the high bit.
12985         (decode_X_packet): New function.
12986         * server.c (main): Call putpkt_binary if a handler sets the packet
12987         length.  Save the length of the incoming packet.  Handle 'X'.
12988         * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
12989
12990 2006-06-21  Daniel Jacobowitz  <dan@codesourcery.com>
12991
12992         * server.c (handle_query): Handle qSupported.
12993
12994 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
12995
12996         * remote-utils.c (all_symbols_looked_up): New variable.
12997         (look_up_one_symbol): Check it.
12998         * server.h (look_up_one_symbol): New declaration.
12999         * thread-db.c (thread_db_init): Set all_symbols_looked_up.
13000
13001 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
13002
13003         * Makefile.in (linux-arm-low.o): Update dependencies.
13004         * linux-arm-low.c: Include "gdb_proc_service.h".
13005         (PTRACE_GET_THREAD_AREA): Define.
13006         (ps_get_thread_area): New function.
13007
13008 2006-05-09  Nathan Sidwell  <nathan@codesourcery.com>
13009
13010         * configure.srv (m68k*-*-uclinux*): New target.
13011         * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
13012         (linux_resume_one_process): Remove extraneous cast.
13013         (linux_read_offsets): New.
13014         (linux_target_op): Add linux_read_offsets on mmuless systems.
13015         * server.c (handle_query): Add qOffsets logic.
13016         * target.h (struct target_ops): Add read_offsets.
13017
13018 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
13019
13020         * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
13021         (PTRACE_GET_THREAD_AREA): Define.
13022         (ps_get_thread_area): New function.
13023         * Makefile.in (linux-i386-low.o, linux-mips-low.o)
13024         (linux-x86-64-low.o): Update.
13025
13026 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
13027
13028         * configure.ac: Remove checks for prfpregset_t.
13029         * gdb_proc_service.h: New file.
13030         * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
13031         new "gdb_proc_service.h".
13032         * proc-service.c: Likewise.
13033         (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
13034         (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
13035         * Makefile.in (gdb_proc_service_h): Updated.
13036         * configure, config.in: Regenerated.
13037
13038 2006-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
13039
13040         * remote-utils.c (prepare_resume_reply): Move declaration
13041         of gdb_id_from_wait to the top of the block.
13042
13043 2006-02-15  Daniel Jacobowitz  <dan@codesourcery.com>
13044
13045         * linux-low.c (regsets_store_inferior_registers): Read the regset
13046         from the target before filling it.
13047
13048 2006-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
13049
13050         * server.c (attach_inferior): Return SIGTRAP for a successful
13051         attach.
13052
13053 2006-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
13054
13055         * Makefile.in (OBS): Add version.o.
13056         (STAGESTUFF): Delete.
13057         (version.o): Add dependencies.
13058         (version.c): Replace rule.
13059         (clean): Remove version.c.
13060         * server.c (gdbserver_version): New.
13061         (gdbserver_usage): Use printf.
13062         (main): Handle --version and --help.
13063         * server.h (version, host_name): Add declarations.
13064
13065 2005-12-23  Eli Zaretskii  <eliz@gnu.org>
13066
13067         * linux-arm-low.c:
13068         * linux-arm-low.c:
13069         * inferiors.c:
13070         * i387-fp.h:
13071         * i387-fp.c:
13072         * gdbreplay.c:
13073         * regcache.c:
13074         * proc-service.c:
13075         * mem-break.h:
13076         * mem-break.c:
13077         * linux-x86-64-low.c:
13078         * linux-sh-low.c:
13079         * linux-s390-low.c:
13080         * linux-ppc64-low.c:
13081         * linux-ppc-low.c:
13082         * linux-mips-low.c:
13083         * linux-m68k-low.c:
13084         * linux-m32r-low.c:
13085         * linux-low.h:
13086         * linux-low.c:
13087         * linux-ia64-low.c:
13088         * linux-i386-low.c:
13089         * linux-crisv32-low.c:
13090         * thread-db.c:
13091         * terminal.h:
13092         * target.h:
13093         * target.c:
13094         * server.h:
13095         * server.c:
13096         * remote-utils.c:
13097         * regcache.h:
13098         * utils.c:
13099         * Makefile.in:
13100         * configure.ac:
13101         * gdbserver.1: Add (C) after Copyright.  Update the FSF
13102         address.
13103
13104 2005-11-13  Daniel Jacobowitz  <dan@codesourcery.com>
13105
13106         * linux-arm-low.c (arm_eabi_breakpoint): New variable.
13107         (arm_breakpoint_at): Recognize both breakpoints.
13108         (the_low_target): Use the correct breakpoint instruction.
13109
13110 2005-11-02  Daniel Jacobowitz  <dan@codesourcery.com>
13111
13112         * configure.srv (x86_64-*-linux*): Turn on thread_db support.
13113         * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
13114         (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
13115         (the_low_target): Update.
13116
13117 2005-10-25  Andreas Schwab  <schwab@suse.de>
13118
13119         * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
13120
13121         * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
13122         (ia64_num_regs): Reduce to 462.
13123
13124 2005-09-17  Daniel Jacobowitz  <dan@codesourcery.com>
13125
13126         * acinclude.m4: Correct quoting.
13127         * aclocal.m4: Regenerated.
13128
13129         Suggested by SZOKOVACS Robert <szo@ies.hu>:
13130         * thread-db.c (thread_db_err_str): Handle TD_VERSION.
13131         (thread_db_init): Call thread_db_err_str.
13132         * configure.ac: Check for TD_VERSION.
13133         * config.in, configure: Regenerated.
13134
13135 2005-07-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13136
13137         * server.h (error, fatal, warning): Add ATTR_FORMAT.
13138
13139 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
13140
13141         * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
13142         is not available.  Define HAVE_PTRACE_GETREGS if it is.
13143         * config.in, configure: Regenerated.
13144         * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
13145         * linux-i386-low.c, linux-m68k-low.c: Update to use
13146         HAVE_PTRACE_GETREGS.
13147         * linux-low.c (regsets_fetch_inferior_registers)
13148         (regsets_store_inferior_registers): Only return 0 if we processed
13149         GENERAL_REGS.
13150         * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
13151         * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
13152
13153 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
13154
13155         * inferiors.c (struct thread_info): Add gdb_id.
13156         (add_thread): Add gdb_id argument.
13157         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
13158         * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
13159         calls to add_thread.
13160         * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
13161         * server.c (handle_query): Use thread_to_gdb_id.
13162         (handle_v_cont, main): Use gdb_id_to_thread_id.
13163         * server.h (add_thread): Update prototype.
13164         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
13165         prototypes.
13166
13167 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
13168
13169         * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
13170         left-padded registers.
13171         * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
13172         * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
13173
13174 2005-07-01  Steve Ellcey  <sje@cup.hp.com>
13175
13176         * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
13177         * configure: Regenerate.
13178         * config.in: Regenerate.
13179         * server.h (NEED_DECLARATION_STRERROR):
13180         Replace with !HAVE_DECL_STRERROR.
13181
13182 2005-06-16  Daniel Jacobowitz  <dan@codesourcery.com>
13183
13184         * linux-low.c (linux_wait, linux_send_signal): Don't test
13185         an unsigned long variable for > 0 if it could be MAX_ULONG.
13186         * server.c (myresume): Likewise.
13187         * target.c (set_desired_inferior): Likewise.
13188
13189 2005-06-13  Mark Kettenis  <kettenis@gnu.org>
13190
13191         * configure.ac: Simplify and improve check for socklen_t.
13192         * configure, config.in: Regenerate.
13193
13194 2005-06-12  Daniel Jacobowitz  <dan@codesourcery.com>
13195
13196         * acconfig.h: Remove.
13197         * configure.ac: Add a test for socklen_t.  Use three-argument
13198         AC_DEFINE throughout.
13199         * config.in: Regenerated using autoheader 2.59.
13200         * configure: Regenerated.
13201
13202         * gdbreplay.c (socklen_t): Provide a default.
13203         (remote_open): Use socklen_t.
13204         * remote-utils.c (socklen_t): Provide a default.
13205         (remote_open): Use socklen_t.
13206         (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
13207         unsigned char.
13208
13209         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
13210         char for buffers.
13211         * linux-low.c (linux_read_memory, linux_write_memory)
13212         (linux_read_auxv): Likewise.
13213         * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
13214         (check_mem_write): Likewise.
13215         * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
13216         Likewise.
13217         * regcache.c (struct inferior_rgcache_data, registers_to_string)
13218         (registers_from_string, register_data): Likewise.
13219         * server.c (handle_query, main): Likewise.
13220         * server.h (convert_ascii_to_int, convert_int_to_ascii)
13221         (decode_M_packet): Likewise.
13222         * target.c (read_inferior_memory, write_inferior_memory): Likewise.
13223         * target.h (struct target_ops): Update read_memory, write_memory,
13224         and read_auxv.
13225         (read_inferior_memory, write_inferior_memory): Update.
13226         * linux-low.h (struct linux_target_ops): Change type of breakpoint
13227         to unsigned char *.
13228         * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
13229         linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
13230         linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
13231         linux-s390-low.c, linux-sh-low.c: Update for changes in
13232         read_inferior_memory and the_low_target->breakpoint.
13233
13234 2005-05-28  Daniel Jacobowitz  <dan@codesourcery.com>
13235
13236         * Makefile.in (SFILES): Add linux-ppc64-low.c.
13237         (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
13238         * configure.srv: Add powerpc64-*-linux*.
13239         * linux-ppc64-low.c: New file.
13240
13241 2005-05-23  Orjan Friberg  <orjanf@axis.com>
13242
13243         * linux-cris-low.c: New file with support for CRIS.
13244         * linux-crisv32-low.c: Ditto for CRISv32.
13245         * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
13246         (clean): Add reg-cris.c and reg-crisv32.c.
13247         Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
13248         reg-crisv32.o, and reg-crisv32.c to make rules.
13249         * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
13250         recognized targets.
13251
13252 2005-05-16  Ulrich Weigand  <uweigand@de.ibm.com>
13253
13254         * linux-low.c (fetch_register): Ensure buffer size is a multiple
13255         of sizeof (PTRACE_XFER_TYPE).
13256         (usr_store_inferior_registers): Likewise.  Zero out excess bytes.
13257
13258 2005-05-12  Orjan Friberg  <orjanf@axis.com>
13259
13260         * target.h (struct target_ops): Add insert_watchpoint,
13261         remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
13262         pointers for hardware watchpoint support.
13263         * linux-low.h (struct linux_target_ops): Ditto.
13264         * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
13265         (linux_stopped_by_watchpoint, linux_stopped_data_address): New.  Add
13266         to linux_target_ops.
13267         * remote-utils.c (prepare_resume_reply): Add watchpoint information to
13268         reply packet.
13269         * server.c (main): Recognize 'Z' and 'z' packets.
13270
13271 2005-05-10  Ulrich Weigand  <uweigand@de.ibm.com>
13272
13273         * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
13274         (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
13275         (the_low_target): Add new members.
13276
13277 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
13278
13279         * proc-service.c (ps_lgetregs): Search all_processes instead of
13280         all_threads.
13281
13282 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
13283
13284         * server.c (start_inferior): Change return type to int.
13285         (attach_inferior): Change sigptr to int *.
13286         (handle_v_cont, handle_v_requests): Change signal to int *.
13287         (main): Change signal to int.
13288
13289 2005-04-15  Kei Sakamoto  <sakamoto.kei@renesas.com>
13290
13291         * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
13292         * configure.srv: Add m32r*-*-linux*.
13293         * linux-m32r-low.c: New file.
13294
13295 2005-03-04  Daniel Jacobowitz  <dan@codesourcery.com>
13296
13297         * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
13298
13299 2005-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
13300
13301         * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
13302         Take unsigned long arguments for PIDs.
13303         * linux-low.c (add_process, linux_attach_lwp, linux_attach)
13304         (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
13305         (wait_for_sigstop, linux_resume_one_process)
13306         (regsets_fetch_inferior_registers, linux_send_signal)
13307         (linux_read_auxv): Likewise.  Update the types of variables holding
13308         PIDs.  Update format string specifiers.
13309         * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
13310         * remote-utils.c (prepare_resume_reply): Likewise.
13311         * server.c (cont_thread, general_thread, step_thread)
13312         (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
13313         unsigned long.
13314         (handle_query): Update format specifiers.
13315         (handle_v_cont, main): Use strtoul for thread IDs.
13316         * server.h (struct inferior_list_entry): Use unsigned long for ID.
13317         (add_thread, find_inferior_id, change_inferior_id, cont_thread)
13318         (general_thread, step_thread, thread_from_wait)
13319         (old_thread_from_wait): Update.
13320         * target.h (struct thread_resume): Use unsigned long for THREAD.
13321         (struct target_ops): Use unsigned long for arguments to attach and
13322         thread_alive.
13323
13324 2005-02-24  Daniel Jacobowitz  <dan@codesourcery.com>
13325
13326         * acinclude.m4: Include bfd/bfd.m4 directly.
13327         * configure.ac: Use AC_ARG_PROGRAM.  Suggested by Aron Griffis
13328         <agriffis@toolchain.org>.
13329         * aclocal.m4, configure: Regenerated.
13330
13331 2005-01-07  Andrew Cagney  <cagney@gnu.org>
13332
13333         * configure.ac: Rename configure.in, require autoconf 2.59.
13334         * configure: Re-generate.
13335
13336 2004-12-08  Daniel Jacobowitz  <dan@debian.org>
13337
13338         * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area.  Reset
13339         LIBS when finished.
13340         * aclocal.m4: Regenerated.
13341         * configure: Regenerated.
13342
13343 2004-11-21  Andreas Schwab  <schwab@suse.de>
13344
13345         * linux-m68k-low.c (m68k_num_gregs): Define.
13346         (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
13347         (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
13348         (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
13349         (m68k_breakpoint_at): New.  Add to the_low_target.
13350
13351         * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
13352         srv_linux_thread_db to yes.
13353
13354 2004-10-20  Joel Brobecker  <brobecker@gnat.com>
13355
13356         * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
13357         (ARCH_SET_FS): Likewise.
13358         (ARCH_GET_FS): Likewise.
13359         (ARCH_GET_GS): Likewise.
13360
13361 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
13362
13363         * linux-i386-low.c (ps_get_thread_area): New.
13364         * linux-x86-64-low.c (ps_get_thread_area): New.
13365         * linux-low.c: Include <sys/syscall.h>.
13366         (linux_kill_one_process): Don't kill the first thread here.
13367         (linux_kill): Kill the first thread here.
13368         (kill_lwp): New function.
13369         (send_sigstop, linux_send_signal): Use it.
13370         * proc-service.c: Clean up #ifdefs.
13371         (fpregset_info): Delete.
13372         (ps_lgetregs): Update and enable implementation.
13373         (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
13374         implementations.
13375         * remote-utils.c (struct sym_cache, symbol_cache): New.
13376         (input_interrupt): Print a clearer message.
13377         (async_io_enabled): New variable.
13378         (enable_async_io, disable_async_io): Use it.  Update comments.
13379         (look_up_one_symbol): Use the symbol cache.
13380         * thread-db.c (thread_db_look_up_symbols): New function.
13381         (thread_db_init): Update comments.  Call thread_db_look_up_symbols.
13382
13383 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
13384
13385         * configure.in: Test for -rdynamic.
13386         * configure: Regenerated.
13387         * Makefile (INTERNAL_LDFLAGS): New.
13388         (gdbserver, gdbreplay): Use it.
13389
13390 2004-09-02  Andrew Cagney  <cagney@gnu.org>
13391
13392         * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
13393
13394 2004-03-23  Daniel Jacobowitz  <drow@mvista.com>
13395
13396         * linux-low.c (linux_wait): Clear all_processes list also.
13397
13398 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
13399
13400         * linux-low.c: Include <errno.h>.  Remove extern declaration of
13401         errno.
13402
13403 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
13404
13405         * gdbreplay.c, server.h, utils.c: Update copyright years.
13406
13407 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
13408
13409         * server.c (main): Print child status or termination signal from
13410         variable 'signal', not 'sig'.
13411
13412 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
13413
13414         * linux-low.c (linux_read_memory): Change return type to
13415         int.  Check for and return error from ptrace().
13416         * target.c (read_inferior_memory): Change return type to int.  Pass
13417         back return status from the_target->read_memory().
13418         * target.h (struct target_ops): Adapt *read_memory() prototype.
13419         Update comment.
13420         (read_inferior_memory): Adapt prototype.
13421         * server.c (main): Return an error packet if
13422         read_inferior_memory() returns an error.
13423
13424 2004-03-04  Daniel Jacobowitz  <drow@mvista.com>
13425
13426         * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
13427         Unify with other clean targets.
13428
13429 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
13430
13431         * server.c (handle_v_cont): Call set_desired_inferior.
13432
13433 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
13434
13435         * remote-utils.c (prepare_resume_reply): Always supply "thread:".
13436
13437 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
13438
13439         * linux-low.c (linux_wait): Unblock async I/O.
13440         (linux_resume): Block and enable async I/O.
13441         * remote-utils.c (block_async_io, unblock_async_io): New functions.
13442         * server.h (block_async_io, unblock_async_io): Add prototypes.
13443
13444 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
13445
13446         * remote-utils.c (remote_open): Print a status notice after
13447         opening a TCP port.
13448         * server.c (attach_inferior): Print a status notice after
13449         attaching.
13450
13451 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
13452
13453         * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
13454
13455 2004-02-26  Daniel Jacobowitz  <drow@mvista.com>
13456
13457         * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
13458         error packet.
13459         * server.c, target.h: Update copyright years.
13460
13461 2004-02-25  Roland McGrath  <roland@redhat.com>
13462
13463         * target.h (struct target_ops): New member `read_auxv'.
13464         * server.c (handle_query): Handle qPart:auxv:read: query using that.
13465         * linux-low.c (linux_read_auxv): New function.
13466         (linux_target_ops): Initialize `read_auxv' member to that.
13467
13468 2004-02-17  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
13469
13470         Committed by Jim Blandy  <jimb@redhat.com>.
13471
13472         * linux-s390-low.c (s390_num_regs): Update.
13473         (s390_regmap): Remove control registers.  Use __s390x__ predefine
13474         instead of GPR_SIZE to distiguish s390 and s390x targets.
13475
13476 2004-01-31  Daniel Jacobowitz  <drow@mvista.com>
13477
13478         * linux-low.c: Update copyright year.
13479         (check_removed_breakpoint): Clear pending_is_breakpoint.
13480         (linux_set_resume_request, linux_queue_one_thread)
13481         (resume_status_pending_p): New functions.
13482         (linux_continue_one_thread): Use process->resume.
13483         (linux_resume): Only resume threads if there are no pending events.
13484         * linux-low.h (struct process_info): Add resume request
13485         pointer.
13486
13487 2004-01-30  Daniel Jacobowitz  <drow@mvista.com>
13488
13489         * regcache.c (new_register_cache): Clear the allocated register
13490         buffer.  Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
13491
13492 2003-10-13  Daniel Jacobowitz  <drow@mvista.com>
13493
13494         * linux-low.c (linux_resume): Take a struct thread_resume *
13495         argument.
13496         (linux_wait): Update call.
13497         (resume_ptr): New static variable.
13498         (linux_continue_one_thread): Renamed from
13499         linux_continue_one_process.  Use resume_ptr.
13500         (linux_resume): Use linux_continue_one_thread.
13501         * server.c (handle_v_cont, handle_v_requests): New functions.
13502         (myresume): New function.
13503         (main): Handle 'v' case.
13504         * target.h (struct thread_resume): New type.
13505         (struct target_ops): Change argument of "resume" to struct
13506         thread_resume *.
13507         (myresume): Delete macro.
13508
13509 2003-08-08  H.J. Lu  <hongjiu.lu@intel.com>
13510
13511         * Makefile.in (install-only): Create dest dir. Support DESTDIR.
13512         (uninstall): Support DESTDIR.
13513
13514 Mon Jul 21 20:09:34 UTC 2003  Brendan Conoboy  <blc@redhat.com>
13515
13516         * configure.srv: Add xscale*linux copy of arm*linux entry.
13517
13518 2003-07-24  Daniel Jacobowitz  <drow@mvista.com>
13519
13520         * linux-arm-low.c (arm_reinsert_addr): New function.
13521         (the_low_target): Add arm_reinsert_addr.
13522
13523 2003-07-08  Mark Kettenis  <kettenis@gnu.org>
13524
13525         * mem-break.c: Remove whitespace at end of file.
13526
13527 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
13528
13529         * configure.in: Check whether we need to prototype strerror.
13530         * server.h: Optionally prototype strerror.
13531         * gdbreplay.c (perror_with_name): Use strerror.
13532         * linux-low.c (linux_attach_lwp): Use strerror.
13533         * utils.c (perror_with_name): Use strerror.
13534         * config.in, configure: Regenerated.
13535
13536 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
13537
13538         * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
13539         SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
13540
13541 2003-06-20  Daniel Jacobowitz  <drow@mvista.com>
13542
13543         * Makefile.in (SFILES): Update.
13544         * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
13545         low-sun3.c: Remove files.
13546
13547 2003-06-17  Daniel Jacobowitz  <drow@mvista.com>
13548
13549         * linux-low.c: Move comment to linux_thread_alive where it belonged.
13550         (linux_detach_one_process, linux_detach): New functions.
13551         (linux_target_ops): Add linux_detach.
13552         * server.c (main): Handle 'D' packet.
13553         * target.h (struct target_ops): Add "detach" member.
13554         (detach_inferior): Define.
13555
13556 2003-06-13  Mark Kettenis  <kettenis@gnu.org>
13557
13558         From Kelley Cook  <kelleycook@wideopenwest.com>:
13559         * configure.srv: Accept i[34567]86 variants.
13560
13561 2003-06-05  Daniel Jacobowitz  <drow@mvista.com>
13562
13563         * linux-low.c (linux_wait_for_event): Correct comment typos.
13564         (linux_resume_one_process): Call check_removed_breakpoint.
13565         (linux_send_signal): New function.
13566         (linux_target_ops): Add linux_send_signal.
13567         * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
13568         of kill.
13569         * target.h (struct target_ops): Add send_signal.
13570
13571 2003-05-29  Jim Blandy  <jimb@redhat.com>
13572
13573         * linux-low.c (usr_store_inferior_registers): Transfer buf in
13574         PTRACE_XFER_TYPE-sized chunks, not int-sized chunks.  Otherwise,
13575         if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
13576         away part of the register's value.
13577
13578 2003-03-26  Daniel Jacobowitz  <drow@mvista.com>
13579
13580         * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
13581         (linux_wait_for_event, linux_init_signals): Likewise.
13582
13583 2003-03-17  Daniel Jacobowitz  <drow@mvista.com>
13584
13585         * configure.in: Check for stdlib.h.
13586         * configure: Regenerated.
13587         * config.in: Regenerated.
13588
13589 2003-01-04  Andreas Schwab  <schwab@suse.de>
13590
13591         * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
13592
13593 2003-01-02  Andrew Cagney  <ac131313@redhat.com>
13594
13595         * Makefile.in: Remove obsolete code.
13596
13597 2002-11-20  Daniel Jacobowitz  <drow@mvista.com>
13598
13599         * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
13600         defined(PT_FPR0_HI).
13601
13602 2002-11-17  Stuart Hughes  <seh@zee2.com>
13603
13604         * linux-arm-low.c (arm_num_regs): Increase.
13605         (arm_regmap): Include status register.
13606
13607 2002-11-17  Daniel Jacobowitz  <drow@mvista.com>
13608
13609         * linux-low.c (register_addr): Remove incorrect -1 check.
13610
13611 2002-08-29  Daniel Jacobowitz  <drow@mvista.com>
13612
13613         * linux-low.c (linux_create_inferior): Call setpgid.  Return
13614         the new PID.
13615         (unstopped_p, linux_signal_pid): Remove.
13616         (linux_target_ops): Remove linux_signal_pid.
13617         * remote-utils.c (putpkt, input_interrupt): Use signal_pid
13618         global instead of target method.
13619         * target.h (struct target_ops): Remove signal_pid.  Update comment
13620         for create_inferior.
13621         * server.c (signal_pid): New variable.
13622         (create_inferior): Set signal_pid.  Block SIGTTOU and SIGTTIN in
13623         gdbserver.  Set the child to be the foreground process group.
13624         (attach_inferior): Set signal_pid.
13625
13626 2002-08-23  Daniel Jacobowitz  <drow@mvista.com>
13627
13628         * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
13629
13630 2002-08-20  Jim Blandy  <jimb@redhat.com>
13631
13632         * Makefile.in (LDFLAGS): Allow the configure script to establish a
13633         default for this.
13634
13635 2002-08-01  Andrew Cagney  <cagney@redhat.com>
13636
13637         * Makefile.in: Make chill references obsolete.
13638
13639 2002-07-24  Kevin Buettner  <kevinb@redhat.com>
13640
13641         * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
13642         * configure: Regenerate.
13643         * config.in: Regenerate.
13644
13645 2002-07-09  David O'Brien  <obrien@FreeBSD.org>
13646
13647         * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
13648         (perror_with_name, remote_close, remote_open, expect, play): Static.
13649
13650 2002-07-04  Michal Ludvig  <mludvig@suse.cz>
13651
13652         * linux-x86-64-low.c (x86_64_regmap): Make it an array of
13653         byte offsets instead of an array of indexes.
13654         (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
13655
13656 2002-06-13  Daniel Jacobowitz  <drow@mvista.com>
13657
13658         * regcache.c: Add comment.
13659
13660 2002-06-11  Daniel Jacobowitz  <drow@mvista.com>
13661
13662         * thread-db.c: New file.
13663         * proc-service.c: New file.
13664         * acinclude.m4: New file.
13665         * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
13666         proc-service.o, and thread-db.o.
13667         (linux-low.o): Add USE_THREAD_DB.
13668         * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
13669         HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
13670         * aclocal.m4: Regenerated.
13671         * config.in: Regenerated.
13672         * configure: Regenerated.
13673         * configure.in: Check for proc_service.h, sys/procfs.h,
13674         thread_db.h, and linux/elf.h headrs.
13675         Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
13676         PRFPREGSET_T_BROKEN.  Introduce srv_thread_depfiles and USE_THREAD_DB.
13677         Check for -lthread_db and thread support.
13678         * configure.srv: Enable thread_db support for ARM, i386, MIPS,
13679         PowerPC, and SuperH.
13680         * i387-fp.c: Constify arguments.
13681         * i387-fp.h: Likewise.
13682         * inferiors.c: (struct thread_info): Renamed from
13683         `struct inferior_info'.  Remove PID member.  Use generic inferior
13684         list header.  All uses updated.
13685         (inferiors, signal_pid): Removed.
13686         (all_threads): New variable.
13687         (get_thread): Define.
13688         (add_inferior_to_list): New function.
13689         (for_each_inferior): New function.
13690         (change_inferior_id): New function.
13691         (add_inferior): Removed.
13692         (remove_inferior): New function.
13693         (add_thread): New function.
13694         (free_one_thread): New function.
13695         (remove_thread): New function.
13696         (clear_inferiors): Use for_each_inferior and free_one_thread.
13697         (find_inferior): New function.
13698         (find_inferior_id): New function.
13699         (inferior_target_data): Update argument type.
13700         (set_inferior_target_data): Likewise.
13701         (inferior_regcache_data): Likewise.
13702         (set_inferior_regcache_data): Likewise.
13703         * linux-low.c (linux_bp_reinsert): Remove.
13704         (all_processes, stopping_threads, using_thrads)
13705         (struct pending_signals, debug_threads, pid_of): New.
13706         (inferior_pid): Replace with macro.
13707         (struct inferior_linux_data): Remove.
13708         (get_stop_pc, add_process): New functions.
13709         (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
13710         Use add_process and add_thread.
13711         (linux_attach_lwp): New function, based on old linux_attach.  Use
13712         add_process and add_thread.  Set stop_expected for new threads.
13713         (linux_attach): New function.
13714         (linux_kill_one_process): New function.
13715         (linux_kill): Kill all LWPs.
13716         (linux_thread_alive): Use find_inferior_id.
13717         (check_removed_breakpoints, status_pending_p): New functions.
13718         (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
13719         Update.  Use WNOHANG.  Wait for cloned processes also.  Update process
13720         struct for the found process.
13721         (linux_wait_for_event): New function.
13722         (linux_wait): Use it.  Support LWPs.
13723         (send_sigstop, wait_for_sigstop, stop_all_processes)
13724         (linux_resume_one_process, linux_continue_one_process): New functions.
13725         (linux_resume): Support LWPs.
13726         (REGISTER_RAW_SIZE): Remove.
13727         (fetch_register): Use register_size instead.  Call supply_register.
13728         (usr_store_inferior_registers): Likewise.  Call collect_register.
13729         Fix recursive case.
13730         (regsets_fetch_inferior_registers): Improve error message.
13731         (regsets_store_inferior_registers): Add debugging.
13732         (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
13733         (unstopped_p, linux_signal_pid): New functions.
13734         (linux_target_ops): Add linux_signal_pid.
13735         (linux_init_signals): New function.
13736         (initialize_low): Call it.  Initialize using_threads.
13737         * regcache.c (inferior_regcache_data): Add valid
13738         flag.
13739         (get_regcache): Fetch registers lazily.  Add fetch argument
13740         and update all callers.
13741         (regcache_invalidate_one, regcache_invalidate): New
13742         functions.
13743         (new_register_cache): Renamed from create_register_cache.
13744         Return the new regcache.
13745         (free_register_cache): Change argument to a void *.
13746         (registers_to_string, registers_from_string): Call get_regcache
13747         with fetch flag set.
13748         (register_data): Make static.  Pass fetch flag to get_regcache.
13749         (supply_register): Call get_regcache with fetch flag clear.
13750         (collect_register): Call get_regcache with fetch flag set.
13751         (collect_register_as_string): New function.
13752         * regcache.h: Update.
13753         * remote-utils.c (putpkt): Flush after debug output and use
13754         stderr.
13755         Handle input interrupts while waiting for an ACK.
13756         (input_interrupt): Use signal_pid method.
13757         (getpkt): Flush after debug output and use stderr.
13758         (outreg): Use collect_register_as_string.
13759         (new_thread_notify, dead_thread_notify): New functions.
13760         (prepare_resume_reply): Check using_threads.  Set thread_from_wait
13761         and general_thread.
13762         (look_up_one_symbol): Flush after debug output.
13763         * server.c (step_thread, server_waiting): New variables.
13764         (start_inferior): Don't use signal_pid.  Update call to mywait.
13765         (attach_inferior): Update call to mywait.
13766         (handle_query): Handle qfThreadInfo and qsThreadInfo.
13767         (main): Don't fetch/store registers explicitly.  Use
13768         set_desired_inferior.  Support proposed ``Hs'' packet.  Update
13769         calls to mywait.
13770         * server.h: Update.
13771         (struct inferior_list, struct_inferior_list_entry): New.
13772         * target.c (set_desired_inferior): New.
13773         (write_inferior_memory): Constify.
13774         (mywait): New function.
13775         * target.h: Update.
13776         (struct target_ops): New signal_pid method.
13777         (mywait): Removed macro, added prototype.
13778
13779         * linux-low.h (regset_func): Removed.
13780         (regset_fill_func, regset_store_func): New.
13781         (enum regset_type): New.
13782         (struct regset_info): Add type field.  Use new operation types.
13783         (struct linux_target_ops): stop_pc renamed to get_pc.
13784         Add decr_pc_after_break and breakpoint_at.
13785         (get_process, get_thread_proess, get_process_thread)
13786         (strut process_info, all_processes, linux_attach_lwp)
13787         (thread_db_init): New.
13788
13789         * linux-arm-low.c (arm_get_pc, arm_set_pc,
13790         arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
13791         (the_low_target): Add new members.
13792         * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
13793         (i386_store_fpxregset): Constify.
13794         (target_regsets): Add new kind identifier.
13795         (i386_get_pc): Renamed from i386_stop_pc.  Simplify.
13796         (i386_set_pc): Add debugging.
13797         (i386_breakpoint_at): New function.
13798         (the_low_target): Add new members.
13799         * linux-mips-low.c (mips_get_pc, mips_set_pc)
13800         (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
13801         (mips_breakpoint_at): New.
13802         (the_low_target): Add new members.
13803         * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
13804         (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
13805         (the_low_target): Add new members.
13806         * linux-sh-low.c (sh_get_pc, sh_set_pc)
13807         (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
13808         (the_low_target): Add new members.
13809         * linux-x86-64-low.c (target_regsets): Add new kind
13810         identifier.
13811
13812 2002-05-15  Daniel Jacobowitz  <drow@mvista.com>
13813
13814         From Martin Pool <mbp@samba.org>:
13815         * server.c (gdbserver_usage): New function.
13816         (main): Call it.
13817
13818 2002-05-14  Daniel Jacobowitz  <drow@mvista.com>
13819
13820         * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
13821         stop_at -> stop_pc.
13822
13823 2002-05-04  Andrew Cagney  <ac131313@redhat.com>
13824
13825         * Makefile.in: Remove obsolete code.
13826
13827 2002-04-24  Michal Ludvig  <mludvig@suse.cz>
13828
13829         * linux-low.c (regsets_fetch_inferior_registers),
13830         (regsets_store_inferior_registers): Removed cast to int from
13831         ptrace() calls.
13832         * regcache.h: Added declaration of struct inferior_info.
13833
13834 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
13835
13836         * inferiors.c (struct inferior_info): Add regcache_data.
13837         (add_inferior): Call create_register_cache.
13838         (clear_inferiors): Call free_register_cache.
13839         (inferior_regcache_data, set_inferior_regcache_data): New functions.
13840         * regcache.c (struct inferior_regcache_data): New.
13841         (registers): Remove.
13842         (get_regcache): New function.
13843         (create_register_cache, free_register_cache): New functions.
13844         (set_register_cache): Don't initialize the register cache here.
13845         (registers_to_string, registers_from_string, register_data): Call
13846         get_regcache.
13847         * regcache.h: Add prototypes.
13848         * server.h: Likewise.
13849
13850 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
13851
13852         * mem-break.c: New file.
13853         * mem-break.h: New file.
13854         * Makefile.in: Add mem-break.o rule; update server.h
13855         dependencies.
13856         * inferiors.c (struct inferior_info): Add target_data
13857         member.
13858         (clear_inferiors): Free target_data member if set.
13859         (inferior_target_data, set_inferior_target_data): New functions.
13860         * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
13861         (i386_stop_pc, i386_set_pc): New.  Add to the_low_target.
13862         * linux-low.c (linux_bp_reinsert): New variable.
13863         (struct inferior_linux_data): New.
13864         (linux_create_inferior): Use set_inferior_target_data.
13865         (linux_attach): Likewise.  Call add_inferior.
13866         (linux_wait_for_one_inferior): New function.
13867         (linux_wait): Call it.
13868         (linux_write_memory): Add const.
13869         (initialize_low): Call set_breakpoint_data.
13870         * linux-low.h (struct linux_target_ops): Add breakpoint
13871         handling members.
13872         * server.c (attach_inferior): Remove extra add_inferior
13873         call.
13874         * server.h: Include mem-break.h.  Update inferior.c
13875         prototypes.
13876         * target.c (read_inferior_memory)
13877         (write_inferior_memory): New functions.
13878         * target.h (read_inferior_memory)
13879         (write_inferior_memory): Change macros to prototypes.
13880         (struct target_ops): Update comments.  Add const to write_memory
13881         definition.
13882
13883 2002-04-11  Daniel Jacobowitz  <drow@mvista.com>
13884
13885         * linux-low.c (usr_store_inferior_registers): Support
13886         registers which are allowed to fail to store.
13887         * linux-low.h (linux_target_ops): Likewise.
13888         * linux-ppc-low.c (ppc_regmap): Support FPSCR.
13889         (ppc_cannot_store_register): FPSCR may not be storable.
13890
13891 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13892
13893         * server.h: Include <string.h> if HAVE_STRING_H.
13894         * ChangeLog: Correct paths in last ChangeLog entry.
13895
13896 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13897
13898         * linux-low.h: Remove obsolete prototypes.
13899         (struct linux_target_ops): New.
13900         (extern the_low_target): New.
13901         * linux-low.c (num_regs, regmap): Remove declarations.
13902         (register_addr): Use the_low_target explicitly.
13903         (fetch_register): Likewise.
13904         (usr_fetch_inferior_registers): Likewise.
13905         (usr_store_inferior_registers): Likewise.
13906         * linux-arm-low.c (num_regs): Remove.
13907         (arm_num_regs): Define.
13908         (arm_regmap): Renamed from regmap, made static.
13909         (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
13910         made static.
13911         (arm_cannot_store_register): Renamed from cannot_store_register,
13912         made static.
13913         (the_low_target): New.
13914         * linux-i386-low.c (num_regs): Remove.
13915         (i386_num_regs): Define.
13916         (i386_regmap): Renamed from regmap, made static.
13917         (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
13918         made static.
13919         (i386_cannot_store_register): Renamed from cannot_store_register,
13920         made static.
13921         (the_low_target): New.
13922         * linux-ia64-low.c (num_regs): Remove.
13923         (ia64_num_regs): Define.
13924         (ia64_regmap): Renamed from regmap, made static.
13925         (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
13926         made static.
13927         (ia64_cannot_store_register): Renamed from cannot_store_register,
13928         made static.
13929         (the_low_target): New.
13930         * linux-m68k-low.c (num_regs): Remove.
13931         (m68k_num_regs): Define.
13932         (m68k_regmap): Renamed from regmap, made static.
13933         (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
13934         made static.
13935         (m68k_cannot_store_register): Renamed from cannot_store_register,
13936         made static.
13937         (the_low_target): New.
13938         * linux-mips-low.c (num_regs): Remove.
13939         (mips_num_regs): Define.
13940         (mips_regmap): Renamed from regmap, made static.
13941         (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
13942         made static.
13943         (mips_cannot_store_register): Renamed from cannot_store_register,
13944         made static.
13945         (the_low_target): New.
13946         * linux-ppc-low.c (num_regs): Remove.
13947         (ppc_num_regs): Define.
13948         (ppc_regmap): Renamed from regmap, made static.
13949         (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
13950         made static.
13951         (ppc_cannot_store_register): Renamed from cannot_store_register,
13952         made static.
13953         (the_low_target): New.
13954         * linux-s390-low.c (num_regs): Remove.
13955         (s390_num_regs): Define.
13956         (s390_regmap): Renamed from regmap, made static.
13957         (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
13958         made static.
13959         (s390_cannot_store_register): Renamed from cannot_store_register,
13960         made static.
13961         (the_low_target): New.
13962         * linux-sh-low.c (num_regs): Remove.
13963         (sh_num_regs): Define.
13964         (sh_regmap): Renamed from regmap, made static.
13965         (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
13966         made static.
13967         (sh_cannot_store_register): Renamed from cannot_store_register,
13968         made static.
13969         (the_low_target): New.
13970         * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
13971         (the_low_target): New.
13972
13973 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13974
13975         * Makefile.in: Add stamp-h target.
13976         * configure.in: Create stamp-h.
13977         * configure: Regenerated.
13978
13979 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13980
13981         * inferiors.c: New file.
13982         * target.c: New file.
13983         * target.h: New file.
13984         * Makefile.in:  Add target.o and inferiors.o.  Update
13985         dependencies.
13986         * linux-low.c (inferior_pid): New static variable,
13987         moved from server.c.
13988         (linux_create_inferior): Renamed from create_inferior.
13989         Call add_inferior.  Return 0 on success instead of a PID.
13990         (linux_attach): Renamed from myattach.
13991         (linux_kill): Renamed from kill_inferior.  Call clear_inferiors ().
13992         (linux_thread_alive): Renamed from mythread_alive.
13993         (linux_wait): Renamed from mywait.  Call clear_inferiors () if the
13994         child dies.
13995         (linux_resume): Renamed from myresume.  Add missing ``return 0''.
13996         (regsets_store_inferior_registers): Correct error message.
13997         Add missing ``return 0''.
13998         (linux_fetch_registers): Renamed from fetch_inferior_registers.
13999         (linux_store_registers): Renamed from store_inferior_registers.
14000         (linux_read_memory): Renamed from read_inferior_memory.
14001         (linux_write_memory): Renamed from write_inferior_memory.
14002         (linux_target_ops): New structure.
14003         (initialize_low): Call set_target_ops ().
14004         * remote-utils.c (unhexify): New function.
14005         (hexify): New function.
14006         (input_interrupt): Send signals to ``signal_pid''.
14007         * server.c (inferior_pid): Remove.
14008         (start_inferior): Update create_inferior call.
14009         (attach_inferior): Call add_inferior.
14010         (handle_query): New function.
14011         (main): Call handle_query for `q' packets.
14012         * server.h: Include "target.h".  Remove obsolete prototypes.
14013         Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
14014
14015 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
14016
14017         * Makefile.in: Add WARN_CFLAGS.  Update configury
14018         dependencies.
14019         * configure.in: Check for <string.h>
14020         * configure: Regenerate.
14021         * config.in: Regenerate.
14022         * gdbreplay.c: Include needed system headers.
14023         (remote_open): Remove strchr prototype.
14024         * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
14025         * regcache.c (supply_register): Change buf argument to const void *.
14026         (supply_register_by_name): Likewise.
14027         (collect_register): Change buf argument to void *.
14028         (collect_register_by_name): Likewise.
14029         * regcache.h: Add missing prototypes.
14030         * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
14031         * server.c (handle_query): New function.
14032         (attached): New static variable, moved out of main.
14033         (main): Quiet longjmp clobber warnings.
14034         * server.h: Add ATTR_NORETURN and ATTR_FORMAT.  Update prototypes.
14035         * utils.c (error): Remove NORETURN.
14036         (fatal): Likewise.