gdbserver/tracepoint.c: Remove whitespace
[external/binutils.git] / gdb / gdbserver / ChangeLog
1 2016-03-30  Simon Marchi  <simon.marchi@ericsson.com>
2
3         * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
4
5 2016-03-30  Marcin Kościelnicki  <koriakin@0x04.net>
6
7         * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
8         packets.
9         (relocate_instruction): Remove own_buf.
10         * server.c (own_buf): Make global.
11         (handle_v_requests): Make global.
12         * server.h (own_buf): New declaration.
13         (handle_v_requests): New prototype.
14
15 2016-03-29  Marcin Kościelnicki  <koriakin@0x04.net>
16
17         PR 18377
18         * linux-s390-low.c (add_insns): New function.
19         (s390_emit_prologue): New function.
20         (s390_emit_epilogue): New function.
21         (s390_emit_add): New function.
22         (s390_emit_sub): New function.
23         (s390_emit_mul): New function.
24         (s390_emit_lsh): New function.
25         (s390_emit_rsh_signed): New function.
26         (s390_emit_rsh_unsigned): New function.
27         (s390_emit_ext): New function.
28         (s390_emit_log_not): New function.
29         (s390_emit_bit_and): New function.
30         (s390_emit_bit_or): New function.
31         (s390_emit_bit_xor): New function.
32         (s390_emit_bit_not): New function.
33         (s390_emit_equal): New function.
34         (s390_emit_less_signed): New function.
35         (s390_emit_less_unsigned): New function.
36         (s390_emit_ref): New function.
37         (s390_emit_if_goto): New function.
38         (s390_emit_goto): New function.
39         (s390_write_goto_address): New function.
40         (s390_emit_litpool): New function.
41         (s390_emit_const): New function.
42         (s390_emit_call): New function.
43         (s390_emit_reg): New function.
44         (s390_emit_pop): New function.
45         (s390_emit_stack_flush): New function.
46         (s390_emit_zero_ext): New function.
47         (s390_emit_swap): New function.
48         (s390_emit_stack_adjust): New function.
49         (s390_emit_set_r2): New function.
50         (s390_emit_int_call_1): New function.
51         (s390_emit_void_call_2): New function.
52         (s390_emit_eq_goto): New function.
53         (s390_emit_ne_goto): New function.
54         (s390_emit_lt_goto): New function.
55         (s390_emit_le_goto): New function.
56         (s390_emit_gt_goto): New function.
57         (s390_emit_ge_goto): New function.
58         (s390x_emit_prologue): New function.
59         (s390x_emit_epilogue): New function.
60         (s390x_emit_add): New function.
61         (s390x_emit_sub): New function.
62         (s390x_emit_mul): New function.
63         (s390x_emit_lsh): New function.
64         (s390x_emit_rsh_signed): New function.
65         (s390x_emit_rsh_unsigned): New function.
66         (s390x_emit_ext): New function.
67         (s390x_emit_log_not): New function.
68         (s390x_emit_bit_and): New function.
69         (s390x_emit_bit_or): New function.
70         (s390x_emit_bit_xor): New function.
71         (s390x_emit_bit_not): New function.
72         (s390x_emit_equal): New function.
73         (s390x_emit_less_signed): New function.
74         (s390x_emit_less_unsigned): New function.
75         (s390x_emit_ref): New function.
76         (s390x_emit_if_goto): New function.
77         (s390x_emit_const): New function.
78         (s390x_emit_call): New function.
79         (s390x_emit_reg): New function.
80         (s390x_emit_pop): New function.
81         (s390x_emit_stack_flush): New function.
82         (s390x_emit_zero_ext): New function.
83         (s390x_emit_swap): New function.
84         (s390x_emit_stack_adjust): New function.
85         (s390x_emit_int_call_1): New function.
86         (s390x_emit_void_call_2): New function.
87         (s390x_emit_eq_goto): New function.
88         (s390x_emit_ne_goto): New function.
89         (s390x_emit_lt_goto): New function.
90         (s390x_emit_le_goto): New function.
91         (s390x_emit_gt_goto): New function.
92         (s390x_emit_ge_goto): New function.
93         (s390_emit_ops): New function.
94         (struct linux_target_ops): Fill in emit_ops hook.
95
96 2016-03-29  Marcin Kościelnicki  <koriakin@0x04.net>
97
98         PR 18377
99         * Makefile.in: Add s390 IPA files.
100         * configure.srv: Build IPA for s390.
101         * linux-s390-ipa.c: New file.
102         * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
103         (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
104         (tdesc_s390_linux32): Likewise.
105         (init_registers_s390_linux32v1): Likewise.
106         (tdesc_s390_linux32v1): Likewise.
107         (init_registers_s390_linux32v2): Likewise.
108         (tdesc_s390_linux32v2): Likewise.
109         (init_registers_s390_linux64): Likewise.
110         (tdesc_s390_linux64): Likewise.
111         (init_registers_s390_linux64v1): Likewise.
112         (tdesc_s390_linux64v1): Likewise.
113         (init_registers_s390_linux64v2): Likewise.
114         (tdesc_s390_linux64v2): Likewise.
115         (init_registers_s390_te_linux64): Likewise.
116         (tdesc_s390_te_linux64): Likewise.
117         (init_registers_s390_vx_linux64): Likewise.
118         (tdesc_s390_vx_linux64): Likewise.
119         (init_registers_s390_tevx_linux64): Likewise.
120         (tdesc_s390_tevx_linux64): Likewise.
121         (init_registers_s390x_linux64): Likewise.
122         (tdesc_s390x_linux64): Likewise.
123         (init_registers_s390x_linux64v1): Likewise.
124         (tdesc_s390x_linux64v1): Likewise.
125         (init_registers_s390x_linux64v2): Likewise.
126         (tdesc_s390x_linux64v2): Likewise.
127         (init_registers_s390x_te_linux64): Likewise.
128         (tdesc_s390x_te_linux64): Likewise.
129         (init_registers_s390x_vx_linux64): Likewise.
130         (tdesc_s390x_vx_linux64): Likewise.
131         (init_registers_s390x_tevx_linux64): Likewise.
132         (tdesc_s390x_tevx_linux64): Likewise.
133         (have_hwcap_s390_vx): New static variable.
134         (s390_arch_setup): Fill have_hwcap_s390_vx.
135         (s390_get_thread_area): New function.
136         (s390_ft_entry_gpr_esa): New const.
137         (s390_ft_entry_gpr_zarch): New const.
138         (s390_ft_entry_misc): New const.
139         (s390_ft_entry_fr): New const.
140         (s390_ft_entry_vr): New const.
141         (s390_ft_main_31): New const.
142         (s390_ft_main_64): New const.
143         (s390_ft_exit_fr): New const.
144         (s390_ft_exit_vr): New const.
145         (s390_ft_exit_misc): New const.
146         (s390_ft_exit_gpr_esa): New const.
147         (s390_ft_exit_gpr_zarch): New const.
148         (append_insns): New function.
149         (s390_relocate_instruction): New function.
150         (s390_install_fast_tracepoint_jump_pad): New function.
151         (s390_get_min_fast_tracepoint_insn_len): New function.
152         (s390_get_ipa_tdesc_idx): New function.
153         (struct linux_target_ops): Wire in the above functions.
154         (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
155         * linux-s390-tdesc.h: New file.
156
157 2016-03-29  Marcin Kościelnicki  <koriakin@0x04.net>
158
159         * linux-s390-low.c (s390_supports_tracepoints): New function.
160         (struct linux_target_ops): Fill supports_tracepoints hook.
161
162 2016-03-18  Yao Qi  <yao.qi@linaro.org>
163
164         * linux-low.c (lwp_signal_can_be_delivered): New function.
165         (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
166
167 2016-03-18  Yao Qi  <yao.qi@linaro.org>
168
169         * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
170         0 if signal is enqueued.  Remove 'signal' from one debugging
171         message.  Move one debugging message to some lines below.
172         Remove code setting 'signal' to 0.
173
174 2016-03-18  Yao Qi  <yao.qi@linaro.org>
175
176         * linux-low.c (linux_low_filter_event): Remove redundant
177         WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
178
179 2016-03-09  Marcin Kościelnicki  <koriakin@0x04.net>
180
181         * linux-ppc-low.c (ppc_supports_tracepoints): New function.
182         (struct linux_target_ops): Wire in the above.
183
184 2016-03-03  Yao Qi  <yao.qi@linaro.org>
185
186         * linux-low.c: Update comments to start_step_over.
187
188 2016-03-03  Yao Qi  <yao.qi@linaro.org>
189
190         PR server/19736
191         * linux-low.c (handle_extended_wait): Set child suspended
192         if event_lwp->bp_reinsert isn't zero.
193
194 2016-03-02  Yao Qi  <yao.qi@linaro.org>
195
196         * linux-low.c (linux_resume_one_lwp_throw): Replace code with
197         enqueue_pending_signal.
198
199 2016-03-02  Marcin Kościelnicki  <koriakin@0x04.net>
200
201         * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
202         is actually loaded.
203
204 2016-02-25  Marcin Kościelnicki  <koriakin@0x04.net>
205
206         * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
207         (s390_regmap_3264) [!__s390x__]: New global.
208         (s390_collect_ptrace_register): Skip map entries containing -1.
209         (s390_supply_ptrace_register): Ditto.
210         (s390_fill_gprs_high): New function.
211         (s390_store_gprs_high): New function.
212         (s390_regsets): Add NT_S390_HIGH_GPRS.
213         (s390_get_hwcap): Enable on 31-bit.
214         (have_hwcap_s390_high_gprs): Enable on 31-bit.
215         (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
216         Detect NT_S390_HIGH_GPRS.
217         (s390_usrregs_info_3264): Enable on 31-bit.
218         (s390_regs_info): Enable regs_info_3264 on 31-bit.
219         (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
220
221 2016-02-25  Marcin Kościelnicki  <koriakin@0x04.net>
222
223         PR gdb/13808
224         * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
225         * configure.srv: Ditto.
226         * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
227         (initialize_low_tracepoint): Remove ipa_tdesc assignment.
228         * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
229         (init_registers_amd64_linux): Remove prototype.
230         (tdesc_amd64_linux): Remove declaration.
231         (get_ipa_tdesc): New function.
232         (initialize_low_tracepoint): Remove ipa_tdesc assignment,
233         initialize remaining tdescs.
234         * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
235         (init_registers_i386_linux): Remove prototype.
236         (tdesc_i386_linux): Remove declaration.
237         (get_ipa_tdesc): New function.
238         (initialize_low_tracepoint): Remove ipa_tdesc assignment,
239         initialize remaining tdescs.
240         * linux-low.c (linux_get_ipa_tdesc_idx): New function.
241         (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
242         * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
243         * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
244         (x86_get_ipa_tdesc_idx): New function.
245         (the_low_target): Wire in x86_get_ipa_tdesc_idx.
246         * linux-x86-tdesc.h: New file.
247         * target.h (struct target_ops): Add get_ipa_tdesc_idx.
248         (target_get_ipa_tdesc_idx): New macro.
249         * tracepoint.c (ipa_tdesc_idx): New macro.
250         (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
251         (symbol_list): Add ipa_tdesc_idx.
252         (cmd_qtstart): Write ipa_tdesc_idx in the target.
253         (ipa_tdesc): Remove.
254         (ipa_tdesc_idx): New variable.
255         (get_context_regcache): Use get_ipa_tdesc.
256         (gdb_collect): Ditto.
257         (gdb_probe): Ditto.
258         * tracepoint.h (get_ipa_tdesc): New prototype.
259         (ipa_tdesc): Remove.
260
261 2016-02-24  Pedro Alves  <palves@redhat.com>
262
263         * linux-low.c (check_stopped_by_breakpoint): Rename to ...
264         (save_stop_reason): ... this.  Use GDB_ARCH_IS_TRAP_HWBKPT and
265         handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
266         Factor out common code between the USE_SIGTRAP_SIGINFO and
267         !USE_SIGTRAP_SIGINFO blocks.
268         (linux_low_filter_event): Call save_stop_reason instead of
269         check_stopped_by_breakpoint and check_stopped_by_watchpoint.
270         Update comments.
271         (linux_wait_1): Update comments.
272
273 2016-02-24  Wei-cheng Wang  <cole945@gmail.com>
274
275         * linux-ppc-low.c (ppc_supports_z_point_type): New function:
276         (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
277         (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
278         ppc_insert_point, ppc_remove_point.
279
280 2016-02-17  Marcin Kościelnicki  <koriakin@0x04.net>
281
282         * linux-s390-low.c (s390_supports_z_point_type): New function.
283         (struct linux_target_ops): Wire s390_supports_z_point_type in.
284
285 2016-02-16  Yao Qi  <yao.qi@linaro.org>
286
287         * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
288         PC.  Get pc from regcache_read_pc.
289
290 2016-02-12  Yao Qi  <yao.qi@linaro.org>
291
292         * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
293         or linux_get_pc_32bit.
294         (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
295
296 2016-02-12  Yao Qi  <yao.qi@linaro.org>
297
298         * linux-arm-low.c (get_next_pcs_ops): Initialize it with
299         arm_linux_get_next_pcs_fixup.
300
301 2016-02-12  Marcin Kościelnicki  <koriakin@0x04.net>
302
303         * tracepoint.c (x_tracepoint_action_download): Change
304         write_inferior_data_ptr to write_inferior_data_pointer.
305         (cmd_qtstart): Likewise.
306         (write_inferior_data_ptr): Remove.
307         (download_agent_expr): Change write_inferior_data_ptr to
308         write_inferior_data_pointer.
309         (download_tracepoint_1): Likewise.
310         (download_tracepoint): Likewise.
311         (download_trace_state_variables): Likewise.
312
313 2016-02-11  Wei-cheng Wang  <cole945@gmail.com>
314             Marcin Kościelnicki  <koriakin@0x04.net>
315
316         * tracepoint.c (struct tracepoint_action_ops): Remove.
317         (struct tracepoint_action): Remove ops.
318         (m_tracepoint_action_download, r_tracepoint_action_download)
319         (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
320         size and offset accordingly.
321         (m_tracepoint_action_ops, r_tracepoint_action_ops)
322         (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
323         (tracepoint_action_send, tracepoint_action_download): New functions.
324         Helpers for trace action handlers.
325         (add_tracepoint_action): Remove setup actions ops.
326         (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
327
328 2016-02-10  Yao Qi  <yao.qi@linaro.org>
329
330         * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
331
332 2016-02-09  Simon Marchi  <simon.marchi@ericsson.com>
333
334         * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
335         to AC_OUTPUT.
336         * configure: Regenerate.
337
338 2016-02-09  Simon Marchi  <simon.marchi@ericsson.com>
339
340         * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
341         void * to gdb_byte *.
342         * linux-low.c (siginfo_fixup): Likewise.
343         (linux_xfer_siginfo): Likewise.
344         * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
345         Likewise.
346         * linux-x86-low.c (x86_siginfo_fixup): Likewise.
347
348 2016-02-02  Walfred Tedeschi  <walfred.tedeschi@intel.com>
349
350         * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
351         to srv_tgtobj.
352         (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
353         to srv_tgtobj.
354         * linux-x86-low.c [__x86_64__]: Include
355         "nat/amd64-linux-siginfo.h".
356         (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
357         (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
358         (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
359         (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
360         (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
361         (cpt_si_fd, si_timerid, si_overrun): Move from
362         nat/amd64-linux-siginfo.c.
363         * Makefile.in (amd64-linux-siginfo.o:): New rule.
364
365 2016-01-28  Simon Marchi  <simon.marchi@ericsson.com>
366
367         * server.c (skip_to_semicolon):  Remove.
368         (process_point_options): Use strchrnul instead of
369         skip_to_semicolon.
370
371 2016-01-26  Yao Qi  <yao.qi@linaro.org>
372
373         * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
374         * linux-low.c (install_software_single_step_breakpoints): Don't
375         call regcache_read_pc.
376         * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
377         argument pc.
378
379 2016-01-26  Yao Qi  <yao.qi@linaro.org>
380
381         * linux-low.c (install_software_single_step_breakpoints): Call
382         regcache_read_pc instead of get_pc.
383
384 2016-01-26  Yao Qi  <yao.qi@linaro.org>
385
386         * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
387         (unblock_async_io): Rename to ...
388         (block_unblock_async_io): ... it.  New function.
389         (enable_async_io): Don't install SIGIO handler.  Unblock it
390         instead.
391         (disable_async_io): Don't ignore SIGIO.  Block it instead.
392         (initialize_async_io): Install SIGIO handler.  Don't call
393         unblock_async_io.
394
395 2016-01-26  Yao Qi  <yao.qi@linaro.org>
396
397         * remote-utils.c (getpkt): If the buffer isn't empty, and the
398         first character is '\003', call *the_target->request_interrupt.
399
400 2016-01-25  Yao Qi  <yao.qi@linaro.org>
401
402         * remote-utils.c (new_thread_notify): Remove.
403         (dead_thread_notify): Likewise.
404         * remote-utils.h (new_thread_notify): Remove declaration.
405         (dead_thread_notify): Likewise.
406
407 2016-01-23  Marcin Kościelnicki  <koriakin@0x04.net>
408
409         * gdb.trace/pending.exp: Fix expected message on continue.
410
411 2016-01-22  Marcin Kościelnicki  <koriakin@0x04.net>
412
413         * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
414         it works properly on big-endian machines where sizeof (CORE_ADDR)
415         != sizeof (void *).
416
417 2016-01-21  Pedro Alves  <palves@redhat.com>
418
419         * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
420         (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
421         * configure: Regenerate.
422
423 2016-01-21  Yao Qi  <yao.qi@linaro.org>
424
425         * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
426         is_thumb and set it according to CPSR saved on the stack.
427         (get_next_pcs_syscall_next_pc): Pass is_thumb to
428         arm_sigreturn_next_pc.
429
430 2016-01-18  Yao Qi  <yao.qi@linaro.org>
431
432         * linux-low.c (linux_set_pc_64bit): New function.
433         (linux_get_pc_64bit): New function.
434         * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
435         Declare.
436         * linux-sparc-low.c (debug_threads): Remove declaration.
437         (sparc_get_pc): Remove.
438         (the_low_target): Use linux_get_pc_64bit instead of
439         sparc_get_pc.
440         * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
441         (the_low_target): Use linux_get_pc_64bit and
442         linux_set_pc_64bit.
443
444 2016-01-18  Yao Qi  <yao.qi@linaro.org>
445
446         * linux-arm-low.c (debug_threads): Remove declaration.
447         (arm_get_pc, arm_set_pc): Remove.
448         (the_low_target): Use linux_get_pc_32bit and
449         linux_set_pc_32bit.
450         * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
451         (the_low_target): Use linux_get_pc_32bit and
452         linux_set_pc_32bit.
453         * linux-cris-low.c (debug_threads): Remove declaration.
454         (cris_get_pc, cris_set_pc,): Remove.
455         (the_low_target): Use linux_get_pc_32bit and
456         linux_set_pc_32bit.
457         * linux-crisv32-low.c (debug_threads): Remove declaration.
458         (cris_get_pc, cris_set_pc): Remove.
459         (the_low_target): Use linux_get_pc_32bit and
460         linux_set_pc_32bit.
461         * linux-low.c: Include inttypes.h.
462         (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
463         * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
464         * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
465         (the_low_target): Use linux_get_pc_32bit and
466         linux_set_pc_32bit.
467         * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
468         (the_low_target): Use linux_get_pc_32bit and
469         linux_set_pc_32bit.
470         * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
471         (the_low_target): Use linux_get_pc_32bit and
472         linux_set_pc_32bit.
473         * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
474         (the_low_target): Use linux_get_pc_32bit and
475         linux_set_pc_32bit.
476         * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
477         (the_low_target): Use linux_get_pc_32bit and
478         linux_set_pc_32bit.
479
480 2016-01-18  Gary Benson  <gbenson@redhat.com>
481
482         * configure.ac (AC_FUNC_FORK): New check.
483         * config.in: Regenerate.
484         * configure: Likewise.
485
486 2016-01-14  Yao Qi  <yao.qi@linaro.org>
487
488         * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
489         * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
490         * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
491         arm_get_next_pcs_ctor.
492
493 2016-01-12  Josh Stone  <jistone@redhat.com>
494             Philippe Waroquiers  <philippe.waroquiers@skynet.be>
495
496         * inferiors.h: Include "gdb_vecs.h".
497         (struct process_info): Add syscalls_to_catch.
498         * inferiors.c (remove_process): Free syscalls_to_catch.
499         * remote-utils.c (prepare_resume_reply): Report syscall_entry and
500         syscall_return stops.
501         * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
502         * server.c (handle_general_set): Handle QCatchSyscalls.
503         (handle_query): Report support for QCatchSyscalls.
504         * target.h (struct target_ops): Add supports_catch_syscall.
505         (target_supports_catch_syscall): New macro.
506         * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
507         (struct lwp_info): Add syscall_state.
508         * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
509         Maintain syscall_state and syscalls_to_catch across exec.
510         (get_syscall_trapinfo): New function, proxy to the_low_target.
511         (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
512         (linux_low_filter_event): Toggle syscall_state entry/return for
513         syscall traps, and set it ignored for all others.
514         (gdb_catching_syscalls_p): New function.
515         (gdb_catch_this_syscall_p): New function.
516         (linux_wait_1): Handle SYSCALL_SIGTRAP.
517         (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
518         (linux_supports_catch_syscall): New function.
519         (linux_target_ops): Install it.
520         * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
521         (the_low_target): Install it.
522
523 2016-01-12  Mike Frysinger  <vapier@gentoo.org>
524
525         * acinclude.m4: Include new ../warning.m4 file.
526         * configure: Regenerated.
527         * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
528
529 2016-01-12  Mike Frysinger  <vapier@gentoo.org>
530
531         * ax.c (is_goto_target): Mark static.
532         * linux-low.c (register_addr): Likewise.
533         (linux_fetch_registers, linux_store_registers): Likewise.
534         * mem-break.c (any_persistent_commands): Fix old prototype.
535         (add_commands_to_breakpoint): Mark static.
536         * regcache.c (find_register_by_name): Delete unused func.
537         * remote-utils.c (hex_or_minus_one): Mark static.
538         * server.c (monitor_show_help): Mark static.
539         (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
540         handle_v_requests): Likewise.
541
542 2016-01-12  Pedro Alves  <palves@redhat.com>
543
544         Remove use of the registered trademark symbol throughout.
545
546 2016-01-08  Yao Qi  <yao.qi@linaro.org>
547
548         * remote-utils.c (getpkt): If c is '\003', call target hook
549         request_interrupt.
550
551 2016-01-06  Yao Qi  <yao.qi@linaro.org>
552
553         * linux-aarch32-low.h (arm_abi_breakpoint): Move to
554         linux-aarch32-low.c.
555         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
556         (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
557         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
558         (thumb2_breakpoint): Declare.
559         * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
560         linux-aarch32-low.h.
561         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
562         (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
563         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
564
565 2016-01-01  Joel Brobecker  <brobecker@adacore.com>
566
567         * gdbreplay.c (gdbreplay_version): Change copyright year in
568         version message.
569         * server.c (gdbserver_version): Likewise.
570
571 2015-12-28  Patrick Palka  <patrick@parcs.ath.cx>
572
573         * server.c (crc32_table): Delete.
574         (crc32): Use libiberty's xcrc32 function.
575
576 2015-12-22  Joel Brobecker  <brobecker@adacore.com>
577
578         * lynx-low.c (lynx_delete_thread_callback): New function.
579         (lynx_mourn): Properly delete our process and all of its
580         threads.  Remove call to clear_inferiors.
581
582 2015-12-22  Joel Brobecker  <brobecker@adacore.com>
583
584         * target.c (thread_search_callback): Add check that
585         the thread_stopped target callback is not NULL before
586         calling it.
587
588 2015-12-21  Yao Qi  <yao.qi@linaro.org>
589
590         * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
591         arm breakpoint.
592
593 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
594
595         * server.c (handle_query): Call target_supports_software_single_step.
596
597 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
598
599         * linux-low.c (single_step): New function.
600         (linux_resume_one_lwp_throw): Call single_step.
601         (start_step_over): Likewise.
602
603 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
604
605         * Makefile.in (SFILES): Append arch/arm-linux.c,
606         arch/arm-get-next-pcs.c.
607         (arm-linux.o): New rule.
608         (arm-get-next-pcs.o): New rule.
609         * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
610         arm-linux.o.
611         * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro.  Moved
612         to linux-aarch32-low.c.
613         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
614         (arm_breakpoint_len, thumb_breakpoint): Likewise.
615         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
616         (thumb2_breakpoint_len): Likewise.
617         (arm_is_thumb_mode): Make non-static.
618         * linux-aarch32-low.h (arm_abi_breakpoint): New macro.  Moved
619         from linux-aarch32-low.c.
620         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
621         (arm_breakpoint_len, thumb_breakpoint): Likewise.
622         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
623         (thumb2_breakpoint_len): Likewise.
624         (arm_is_thumb_mode): New declaration.
625         * linux-arm-low.c: Include arch/arm-linux.h
626         aarch/arm-get-next-pcs.h, sys/syscall.h.
627         (get_next_pcs_ops): New struct.
628         (get_next_pcs_addr_bits_remove): New function.
629         (get_next_pcs_is_thumb): New function.
630         (get_next_pcs_read_memory_unsigned_integer): Likewise.
631         (arm_sigreturn_next_pc): Likewise.
632         (get_next_pcs_syscall_next_pc): Likewise.
633         (arm_gdbserver_get_next_pcs): Likewise.
634         (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
635         Initialize.
636         * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
637         * server.h: Include gdb_vecs.h.
638
639 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
640
641         * Makefile.in (SFILES): Append common/common-regcache.c.
642         (OBS): Append common-regcache.o.
643         (common-regcache.o): New rule.
644         * regcache.c (init_register_cache): Initialize cache to
645         REG_UNAVAILABLE.
646         (regcache_raw_read_unsigned): New function.
647         * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
648         register_status enum.
649
650 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
651
652         * linux-aarch64-low.c (the_low_targets): Rename
653         breakpoint_reinsert_addr to get_next_pcs.
654         * linux-arm-low.c (the_low_targets): Likewise.
655         * linux-bfin-low.c (the_low_targets): Likewise.
656         * linux-cris-low.c (the_low_targets): Likewise.
657         * linux-crisv32-low.c (the_low_targets): Likewise.
658         * linux-low.c (can_software_single_step): Likewise.
659         (install_software_single_step_breakpoints): New function.
660         (start_step_over): Use install_software_single_step_breakpoints.
661         * linux-low.h: New CORE_ADDR vector.
662         (struct linux_target_ops) Rename breakpoint_reinsert_addr to
663         get_next_pcs.
664         * linux-mips-low.c (the_low_targets): Likewise.
665         * linux-nios2-low.c (the_low_targets): Likewise.
666         * linux-sparc-low.c (the_low_targets): Likewise.
667
668 2015-12-17  Pedro Alves  <palves@redhat.com>
669
670         * linux-low.c (linux_kill_one_lwp): Remove references to
671         LinuxThreads.
672         (kill_lwp): Remove HAVE_TKILL_SYSCALL check.  No longer fall back
673         to 'kill'.
674         (linux_init_signals): Delete.
675         (initialize_low): Adjust.
676         * thread-db.c (thread_db_init): Remove LinuxThreads reference.
677
678 2015-12-16  Pedro Alves  <palves@redhat.com>
679
680         * configure.ac (compiler warning flags): When testing a
681         -Wno-foo option, check whether -Wfoo works instead.
682         * configure: Regenerate.
683
684 2015-12-11  Don Breazeal  <donb@codesourcery.com>
685
686         * server.c (process_serial_event): Don't exit from gdbserver
687         in remote mode if there are still active inferiors.
688
689 2015-12-11  Yao Qi  <yao.qi@linaro.org>
690
691         * linux-aarch64-low.c (aarch64_breakpoint_at): Call
692         arm_breakpoint_at if the process is 32-bit.
693
694 2015-12-11  Yao Qi  <yao.qi@linaro.org>
695
696         * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
697         arm breakpoint.
698
699 2015-12-07  Yao Qi  <yao.qi@linaro.org>
700
701         * configure.srv: Append arm.o to srv_tgtobj for
702         aarch64*-*-linux* target.
703         * linux-aarch32-low.c (arm_abi_breakpoint): New macro.  Moved
704         from linux-arm-low.c.
705         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
706         (arm_breakpoint_len, thumb_breakpoint): Likewise.
707         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
708         (thumb2_breakpoint_len): Likewise.
709         (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
710         (arm_breakpoint_kinds): Likewise.
711         (arm_breakpoint_kind_from_pc): Likewise.
712         (arm_sw_breakpoint_from_kind): Likewise.
713         (arm_breakpoint_kind_from_current_state): Likewise.
714         * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
715         (arm_sw_breakpoint_from_kind): Declare.
716         (arm_breakpoint_kind_from_current_state): Declare.
717         (arm_breakpoint_at): Declare.
718         * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
719         arm_sw_breakpoint_from_kind if process is 32-bit.
720         (aarch64_breakpoint_kind_from_pc): New function.
721         (aarch64_breakpoint_kind_from_current_state): New function.
722         (the_low_target): Initialize fields breakpoint_kind_from_pc
723         and breakpoint_kind_from_current_state.
724         * linux-arm-low.c (arm_breakpoint_kinds): Move to
725         linux-aarch32-low.c.
726         (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
727         (arm_breakpoint, arm_breakpoint_len): Likewise.
728         (thumb_breakpoint, thumb_breakpoint_len): Likewise.
729         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
730         (arm_is_thumb_mode): Likewise.
731         (arm_breakpoint_at): Likewise.
732         (arm_breakpoint_kind_from_pc): Likewise.
733         (arm_sw_breakpoint_from_kind): Likewise.
734         (arm_breakpoint_kind_from_current_state): Likewise.
735
736         Revert:
737         2015-08-04  Yao Qi  <yao.qi@linaro.org>
738
739         * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
740         0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
741         * server.c (extended_protocol): Remove "static".
742         * server.h (extended_protocol): Declare it.
743
744 2015-12-04  Josh Stone  <jistone@redhat.com>
745
746         * target.h (struct target_ops) <arch_setup>: Rename to ...
747         (struct target_ops) <post_create_inferior>: ... this.
748         (target_arch_setup): Rename to ...
749         (target_post_create_inferior): ... this, calling post_create_inferior.
750         * server.c (start_inferior): Update target_arch_setup calls to
751         target_post_create_inferior.
752         * linux-low.c (linux_low_ptrace_options): Forward declare.
753         (linux_arch_setup): Update its comment for general use.
754         (linux_post_create_inferior): New, run arch_setup and setup ptrace.
755         (struct linux_target_ops): Use linux_post_create_inferior.
756         * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
757         to post_create_inferior.
758         * nto-low.c (struct nto_target_ops): Likewise.
759         * spu-low.c (struct spu_target_ops): Likewise.
760         * win32-low.c (struct win32_target_ops): Likewise.
761
762 2015-12-03  Antoine Tremblay  <antoine.tremblay@ericsson.com>
763
764         * linux-arm-low.c: Remove duplicate arch/arm.h include.
765
766 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
767
768         * linux-arm-low.c (arm_reinsert_addr): Remove function.
769         (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
770         * linux-cris-low.c (cris_reinsert_addr> Remove function.
771         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
772         * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
773         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
774         * linux-mips-low.c (mips_reinsert_addr): Remove function.
775         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
776         * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
777         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
778         * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
779         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
780
781 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
782
783         * linux-low.c (linux_look_up_symbols): Don't call
784         linux_supports_traceclone.
785         * linux-low.h (thread_db_init): Remove use_events argument.
786         * thread-db.c (thread_db_use_event): Remove global variable.
787         (struct thread_db) <td_thr_event_enable_p>: Remove field.
788         (struct thread_db) <td_create_bp>: Remove field.
789         (thread_db_create_event): Remove function.
790         (thread_db_enable_reporting): Likewise.
791         (find_one_thread): Don't check for thread_db_use_events.
792         (attach_thread): Likewise.
793         (thread_db_load_search): Remove td_thr_event_enable_p initialization.
794         (try_thread_db_load_1): Don't check for thread_db_use_events.
795         (thread_db_init): Remove use_events argument and thread events
796         handling.
797         (remove_thread_event_breakpoints): Remove function.
798         (thread_db_detach): Remove call to remove_thred_event_breakpoints.
799
800 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
801
802         * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
803         New function.
804         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
805         * linux-arm-low.c (arm_supports_hardware_single_step): New function.
806         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
807         * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
808         (struct linux_target_ops) <bfin_supports_hardware_single_step>:
809         Initialize.
810         * linux-crisv32-low.c (cris_supports_hardware_single_step):
811         New function.
812         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
813         * linux-low.c (can_hardware_single_step): Use
814         supports_hardware_single_step.
815         (can_software_single_step): New function.
816         (start_step_over): Call can_software_single_step.
817         (linux_supports_hardware_single_step): New function.
818         (struct target_ops) <supports_software_single_step>: Initialize.
819         * linux-low.h (struct linux_target_ops)
820         <supports_hardware_single_step>: Initialize.
821         * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
822         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
823         * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
824         (struct linux_target_ops) <supports_hardware_single_step> Initialize.
825         * linux-s390-low.c (s390_supports_hardware_single_step): New function.
826         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
827         * linux-sh-low.c (sh_supports_hardware_single_step): New function.
828         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
829         * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
830         (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
831         Initialize.
832         * linux-tile-low.c (tile_supports_hardware_single_step): New function.
833         (struct linux_target_ops) <tile_supports_hardware_single_step>:
834         Initialize.
835         * linux-x86-low.c (x86_supports_hardware_single_step) New function.
836         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
837         * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
838         New function.
839         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
840         * target.h (struct target_ops): <supports_software_single_step>:
841         New field.
842         (target_supports_software_single_step): New macro.
843
844 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
845
846         * linux-low.c (linux_wait_1): Fix pc advance condition.
847         * mem-break.c (reinsert_breakpoint_inserted_here): New function.
848         * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
849
850 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
851
852         * linux-arm-low.c (arm_is_thumb_mode): New function.
853         (arm_breakpoint_at): Use arm_is_thumb_mode.
854         (arm_breakpoint_kind_from_current_state): New function.
855         (struct linux_target_ops) <breakpoint_kind_from_current_state>:
856         Initialize.
857         * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
858         (linux_breakpoint_kind_from_current_state): New function.
859         (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
860         * linux-low.h (struct linux_target_ops)
861         <breakpoint_kind_from_current_state>: New field.
862         * target.h (struct target_ops): Likewise.
863         (target_breakpoint_kind_from_current_state): New macro.
864
865 2015-11-30  Pedro Alves  <palves@redhat.com>
866
867         * linux-low.c (linux_resume): Wake up the event loop before
868         returning.
869
870 2015-11-30  Pedro Alves  <palves@redhat.com>
871
872         * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
873         check.
874         (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
875         to -1.
876         * target.c (struct thread_search): New structure.
877         (thread_search_callback): New function.
878         (prev_general_thread): New global.
879         (prepare_to_access_memory, done_accessing_memory): New functions.
880         * target.h (prepare_to_access_memory, done_accessing_memory):
881         Replace macros with function declarations.
882
883 2015-11-30  Pedro Alves  <palves@redhat.com>
884
885         PR 14618
886         * linux-low.c (linux_wait_1): If the last resumed thread is gone,
887         report TARGET_WAITKIND_NO_RESUMED.
888         * remote-utils.c (prepare_resume_reply): Handle
889         TARGET_WAITKIND_NO_RESUMED.
890         * server.c (report_no_resumed): New global.
891         (handle_query) <qSupported>: Handle "no-resumed+".  Report
892         "no-resumed+" support.
893         (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
894         return error if the client doesn't support no-resumed events.
895         (push_stop_notification): New function.
896         (handle_target_event): Use it.  Report TARGET_WAITKIND_NO_RESUMED
897         events if the client supports them.
898
899 2015-11-30  Pedro Alves  <palves@redhat.com>
900
901         * linux-low.c (thread_still_has_status_pending_p): Don't check
902         vCont;t here.
903         (lwp_resumed): New function.
904         (status_pending_p_callback): Return early if the LWP is not
905         supposed to be resumed.
906
907 2015-11-30  Pedro Alves  <palves@redhat.com>
908
909         * linux-low.c (handle_extended_wait): Assert that the LWP's
910         waitstatus is TARGET_WAITKIND_IGNORE.  If GDB wants to hear about
911         thread create events, leave the new child's status pending.
912         (linux_low_filter_event): If GDB wants to hear about thread exit
913         events, leave the LWP marked dead and don't delete it.
914         (linux_wait_for_event_filtered): Don't check for thread exit.
915         (filter_exit_event): New function.
916         (linux_wait_1): Use it, when returning an exit event.
917         (linux_resume_one_lwp_throw): Assert that the LWP's
918         waitstatus is TARGET_WAITKIND_IGNORE.
919         * remote-utils.c (prepare_resume_reply): Handle
920         TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
921         * server.c (report_thread_events): New global.
922         (handle_general_set): Handle QThreadEvents.
923         (handle_query) <qSupported>: Handle and report QThreadEvents+;
924         (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
925         TARGET_WAITKIND_THREAD_EXITED.
926         * server.h (report_thread_events): Declare.
927
928 2015-11-30  Pedro Alves  <palves@redhat.com>
929
930         * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
931         the thread's last_resume_kind was resume_stop.
932
933 2015-11-30  Pedro Alves  <palves@redhat.com>
934
935         * linux-low.c (linux_attach): In non-stop mode, wait for one stop
936         before returning.
937
938 2015-11-30  Pedro Alves  <palves@redhat.com>
939
940         * server.c (handle_v_requests): Handle vCtrlC.
941
942 2015-11-30  Pedro Alves  <palves@redhat.com>
943
944         * gdbthread.h (find_any_thread_of_pid): Declare.
945         * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
946         functions.
947         * server.c (handle_query): If current_thread is NULL, look for
948         another thread of the selected process.
949
950 2015-11-26  Daniel Colascione  <dancol@dancol.org>
951             Simon Marchi  <simon.marchi@ericsson.com>
952
953         * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
954         * server.c (handle_qxfer_threads_worker): Refactor to include thread
955         name in reply.
956         * target.h (struct target_ops) <thread_name>: New field.
957         (target_thread_name): New macro.
958
959 2015-11-23  Joel Brobecker  <brobecker@adacore.com>
960
961         * regcache.h (regcache_invalidate_pid): Add declaration.
962         * regcache.c (regcache_invalidate_pid): New function, extracted
963         from regcache_invalidate.
964         (regcache_invalidate): Reimplement using regcache_invalidate_pid.
965         Add trivial documentation comment.
966         * lynx-low.c: Use regcache_invalidate_pid instead of
967         regcache_invalidate.
968
969 2015-11-23  Joel Brobecker  <brobecker@adacore.com>
970
971         * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
972         and Elf64_auxv_t if the target is Android.
973
974 2015-11-22  Doug Evans  <xdje42@gmail.com>
975
976         * target.h: #include <sys/types.h>.
977
978 2015-11-19  Pedro Alves  <palves@redhat.com>
979
980         * linux-low.c (linux_process_qsupported): Change prototype.
981         Adjust.
982         * linux-low.h (struct linux_target_ops) <process_qsupported>:
983         Change prototype.
984         * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
985         and adjust to loop over all features.
986         * server.c (handle_query) <qSupported>: Adjust to call
987         target_process_qsupported once, passing it a vector of unprocessed
988         features.
989         * target.h (struct target_ops) <process_qsupported>: Change
990         prototype.
991         (target_process_qsupported): Adjust.
992
993 2015-11-19  Pedro Alves  <palves@redhat.com>
994
995         * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
996         mode.
997         * configure: Regenerate.
998
999 2015-11-19  Pedro Alves  <palves@redhat.com>
1000
1001         * configure: Regenerate.
1002
1003 2015-11-19  Yao Qi  <yao.qi@linaro.org>
1004
1005         * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
1006         type to uint32_t.
1007
1008 2015-11-19  Yao Qi  <yao.qi@linaro.org>
1009
1010         * linux-aarch64-low.c (enum aarch64_operand_type): New.
1011         (struct aarch64_operand): Move enum out.
1012
1013 2015-11-19  Yao Qi  <yao.qi@linaro.org>
1014
1015         * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
1016         struct user_fpsimd_state *.
1017         (aarch64_store_fpregset): Likewise.
1018
1019 2015-11-19  Yao Qi  <yao.qi@linaro.org>
1020
1021         * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
1022         struct user_pt_regs *.
1023         (aarch64_store_gregset): Likewise.
1024
1025 2015-11-18  Pedro Alves  <palves@redhat.com>
1026
1027         * Makefile.in (all_object_files): Add $IPA_OBJS.
1028
1029 2015-11-17  Pedro Alves  <palves@redhat.com>
1030
1031         * win32-low.c (win32_resume): Use gdb_signal_from_host,
1032         GDB_SIGNAL_0 and gdb_signal_to_string.
1033
1034 2015-11-17  Pedro Alves  <palves@redhat.com>
1035
1036         * win32-low.c (handle_output_debug_string): Remove parameter.
1037         (win32_kill): Remove our_status local and adjust call to
1038         handle_output_debug_string.
1039         (get_child_debug_event): Adjust call to
1040         handle_output_debug_string.
1041
1042 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
1043
1044         * linux-mips-low.c (mips_fill_gregset): Add cast.
1045         (mips_store_gregset): Likewise.
1046         (mips_fill_fpregset): Likewise.
1047         (mips_store_fpregset): Likewise.
1048
1049 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
1050
1051         * linux-mips-low.c (mips_add_watchpoint): Rename private to
1052         priv.
1053
1054 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
1055
1056         * linux-mips-low.c (mips_linux_new_thread): Change type of
1057         watch_type to enum target_hw_bp_type.
1058
1059 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
1060
1061                 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
1062                 Change return type to arm_hwbp_type.
1063
1064 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
1065
1066         * linux-aarch32-low.c (arm_fill_gregset): Add cast.
1067         (arm_store_gregset): Likewise.
1068         * linux-arm-low.c (arm_get_hwcap): Likewise.
1069         (arm_read_description): Likewise.
1070
1071 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
1072
1073         * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
1074
1075 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
1076
1077         * linux-ppc-low.c (ppc_get_hwcap): Add cast.
1078         (ppc_fill_vsxregset): Likewise.
1079         (ppc_store_vsxregset): Likewise.
1080         (ppc_fill_vrregset): Likewise.
1081         (ppc_store_vrregset): Likewise.
1082         (ppc_fill_evrregset): Likewise.
1083         (ppc_store_evrregset): Likewise.
1084
1085 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
1086
1087         * linux-ppc-low.c (ppc_usrregs_info): Remove
1088         forward-declaration.
1089         (ppc_arch_setup): Move lower in file.
1090
1091 2015-10-30  Simon Marchi  <simon.marchi@ericsson.com>
1092
1093         * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
1094         (ps_pdwrite): Likewise.
1095
1096 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
1097
1098         * linux-arm-low.c (arm_new_thread): Move pointer dereference
1099         to after assert checks.
1100
1101 2015-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1102
1103         * proc-service.c (ps_pdread): Add/adjust casts.
1104         (ps_pdwrite): Add/adjust casts.
1105
1106 2015-10-29  Simon Marchi  <simon.marchi@polymtl.ca>
1107
1108         * server.c (handle_search_memory_1): Cast return value of
1109         memmem.
1110
1111 2015-10-29  Simon Marchi  <simon.marchi@polymtl.ca>
1112
1113         * server.c (write_qxfer_response): Change type of data to
1114         gdb_byte *.
1115
1116 2015-10-29  Pedro Alves  <palves@redhat.com>
1117
1118         * mem-break.c (Z_packet_to_bkpt_type): Add cast.
1119
1120 2015-10-29  Pedro Alves  <palves@redhat.com>
1121
1122         * tracepoint.c (clear_installed_tracepoints): Add casts.
1123
1124 2015-10-29  Pedro Alves  <palves@redhat.com>
1125
1126         * server.c (handle_v_cont, process_serial_event): Add enum
1127         gdb_signal casts to signal parsing code.
1128
1129 2015-10-29  Pedro Alves  <palves@redhat.com>
1130
1131         * linux-low.h (NULL_REGSET): Define.
1132         * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1133         * linux-arm-low.c (arm_regsets): Likewise.
1134         * linux-crisv32-low.c (cris_regsets): Likewise.
1135         * linux-m68k-low.c (m68k_regsets): Likewise.
1136         * linux-mips-low.c (mips_regsets): Likewise.
1137         * linux-nios2-low.c (nios2_regsets): Likewise.
1138         * linux-ppc-low.c (ppc_regsets): Likewise.
1139         * linux-s390-low.c (s390_regsets): Likewise.
1140         * linux-sh-low.c (sh_regsets): Likewise.
1141         * linux-sparc-low.c (sparc_regsets): Likewise.
1142         * linux-tic6x-low.c (tic6x_regsets): Likewise.
1143         * linux-tile-low.c (tile_regsets): Likewise.
1144         * linux-x86-low.c (x86_regsets): Likewise.
1145         * linux-xtensa-low.c (xtensa_regsets): Likewise.
1146
1147 2015-10-29  Pedro Alves  <palves@redhat.com>
1148
1149         * linux-low.h (NULL_REGSET): Define.
1150         * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1151         * linux-arm-low.c (arm_regsets): Likewise.
1152         * linux-crisv32-low.c (cris_regsets): Likewise.
1153         * linux-m68k-low.c (m68k_regsets): Likewise.
1154         * linux-mips-low.c (mips_regsets): Likewise.
1155         * linux-nios2-low.c (nios2_regsets): Likewise.
1156         * linux-ppc-low.c (ppc_regsets): Likewise.
1157         * linux-s390-low.c (s390_regsets): Likewise.
1158         * linux-sh-low.c (sh_regsets): Likewise.
1159         * linux-sparc-low.c (sparc_regsets): Likewise.
1160         * linux-tic6x-low.c (tic6x_regsets): Likewise.
1161         * linux-tile-low.c (tile_regsets): Likewise.
1162         * linux-x86-low.c (x86_regsets): Likewise.
1163         * linux-xtensa-low.c (xtensa_regsets): Likewise.
1164
1165 2015-10-26  Doug Evans  <dje@google.com>
1166
1167         * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
1168
1169 2015-10-26  Doug Evans  <dje@google.com>
1170
1171         * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
1172
1173 2015-10-26  Doug Evans  <dje@google.com>
1174
1175         * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
1176         for debug_printf.
1177         (attach_thread, find_new_threads_callback): Ditto.
1178
1179 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1180
1181         * mem-break.h (set_breakpoint_data): Remove.
1182
1183 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1184
1185         * nto-low.c (nto_sw_breakpoint_from_kind): New function.
1186         (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1187         (initialize_low): Remove set_breakpoint_data call.
1188         * spu-low.c (spu_sw_breakpoint_from_kind): New function.
1189         (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
1190         (initialize_low): Remove set_breakpoint_data call.
1191         * win32-low.c (win32_sw_breakpoint_from_kind): New function.
1192         (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1193         (initialize_low): Remove set_breakpoint_data call.
1194
1195 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1196
1197         * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
1198         * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
1199         * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
1200         * target.h (target_breakpoint_kind_from_pc): New macro.
1201
1202 2015-10-22  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1203
1204         * linux-low.c (default_breakpoint_kind_from_pc): New function.
1205         (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
1206         the default breakpoint kind.
1207
1208 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1209
1210         * linux-arm-low.c (arm_supports_z_point_type): Add software
1211         breakpoint support.
1212
1213 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1214
1215         * linux-arm-low.c: Refactor breakpoint definitions.
1216         (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
1217         (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
1218
1219 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1220
1221         * Makefile.in: Add arm.c/o.
1222         * configure.srv: Likewise.
1223         * linux-arm-low.c (arm_breakpoint_kinds): New enum.
1224         (arm_breakpoint_kind_from_pc): New function.
1225         (arm_sw_breakpoint_from_kind): Return proper kind.
1226         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
1227
1228 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1229
1230         * linux-low.c (initialize_low): Ajdust for breakpoint global variables
1231         removal.
1232         * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
1233         (struct raw_breakpoint) <size>: Remove.
1234         (struct raw_breakpoint) <kind>: Add.
1235         (bp_size): New function.
1236         (bp_opcode): Likewise.
1237         (find_raw_breakpoint_at): Adjust for kind.
1238         (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
1239         (remove_memory_breakpoint): Adjust for kind call bp_size.
1240         (set_raw_breakpoint_at): Adjust for kind.
1241         (set_breakpoint): Likewise.
1242         (set_breakpoint_at): Call breakpoint_kind_from_pc.
1243         (delete_raw_breakpoint): Adjust for kind.
1244         (delete_breakpoint): Likewise.
1245         (find_gdb_breakpoint): Likewise.
1246         (set_gdb_breakpoint_1): Likewise.
1247         (set_gdb_breakpoint): Likewise.
1248         (delete_gdb_breakpoint_1): Likewise.
1249         (delete_gdb_breakpoint): Likewise.
1250         (uninsert_raw_breakpoint): Likewise.
1251         (reinsert_raw_breakpoint): Likewise.
1252         (set_breakpoint_data): Remove.
1253         (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
1254         (check_mem_read): Adjust for kind call bp_size.
1255         (check_mem_write): Adjust for kind call bp_size,bp_opcode.
1256         (clone_one_breakpoint): Adjust for kind.
1257         * mem-break.h (set_gdb_breakpoint): Likewise.
1258         (delete_gdb_breakpoint): Likewise.
1259         * server.c (process_serial_event): Likewise.
1260
1261 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1262
1263         * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
1264         (struct linux_target_ops) <breakpoint>: Remove.
1265         (struct linux_target_ops) <breakpoint_len>: Remove.
1266         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1267         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1268         * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
1269         (arm_sw_breakpoint_from_kind): New function.
1270         * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
1271         (struct linux_target_ops) <breakpoint>: Remove.
1272         (struct linux_target_ops) <breakpoint_len>: Remove.
1273         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1274         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1275         * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
1276         (struct linux_target_ops) <breakpoint>: Remove.
1277         (struct linux_target_ops) <breakpoint_len>: Remove.
1278         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1279         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1280         * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
1281         (struct linux_target_ops) <breakpoint>: Remove.
1282         (struct linux_target_ops) <breakpoint_len>: Remove.
1283         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1284         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1285         * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
1286         and sw_breakpoint_from_kind to increment the pc.
1287         (linux_breakpoint_kind_from_pc): New function.
1288         (linux_sw_breakpoint_from_kind): New function.
1289         (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
1290         (initialize_low): Call breakpoint_kind_from_pc and
1291         sw_breakpoint_from_kind to replace breakpoint_data/len.
1292         * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
1293         New field.
1294         (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
1295         * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
1296         (struct linux_target_ops) <breakpoint>: Remove.
1297         (struct linux_target_ops) <breakpoint_len>: Remove.
1298         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1299         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1300         * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
1301         (struct linux_target_ops) <breakpoint>: Remove.
1302         (struct linux_target_ops) <breakpoint_len>: Remove.
1303         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1304         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1305         * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
1306         (struct linux_target_ops) <breakpoint>: Remove.
1307         (struct linux_target_ops) <breakpoint_len>: Remove.
1308         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1309         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1310         * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
1311         (struct linux_target_ops) <breakpoint>: Remove.
1312         (struct linux_target_ops) <breakpoint_len>: Remove.
1313         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1314         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1315         * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
1316         (struct linux_target_ops) <breakpoint>: Remove.
1317         (struct linux_target_ops) <breakpoint_len>: Remove.
1318         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1319         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1320         * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
1321         (struct linux_target_ops) <breakpoint>: Remove.
1322         (struct linux_target_ops) <breakpoint_len>: Remove.
1323         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1324         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1325         * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
1326         (struct linux_target_ops) <breakpoint>: Remove.
1327         (struct linux_target_ops) <breakpoint_len>: Remove.
1328         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1329         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1330         * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
1331         (struct linux_target_ops) <breakpoint>: Remove.
1332         (struct linux_target_ops) <breakpoint_len>: Remove.
1333         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1334         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1335         * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
1336         (struct linux_target_ops) <breakpoint>: Remove.
1337         (struct linux_target_ops) <breakpoint_len>: Remove.
1338         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1339         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1340         * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
1341         * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
1342         (struct linux_target_ops) <breakpoint>: Remove.
1343         (struct linux_target_ops) <breakpoint_len>: Remove.
1344         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1345         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1346         * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
1347         (struct linux_target_ops) <breakpoint>: Remove.
1348         (struct linux_target_ops) <breakpoint_len>: Remove.
1349         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1350         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1351
1352 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1353
1354         * linux-cris-low.c (cris_get_pc): Remove void arg.
1355
1356 2015-10-16  Aleksandar Ristovski  <aristovski@qnx.com>
1357
1358         * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
1359         variable name.
1360
1361 2015-10-16  Aleksandar Ristovski  <aristovski@qnx.com>
1362
1363         * inferiors.c (thread_pid_matches_callback): New function.
1364         (find_thread_process): New function.
1365         (remove_thread): Reset current_thread.
1366         (remove_process): Assert threads have been removed first.
1367
1368 2015-10-15  Yao Qi  <yao.qi@linaro.org>
1369
1370         * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
1371         if it is 3.
1372         (aarch64_remove_point): Likewise.
1373         * regcache.c (regcache_register_size): New function.
1374
1375 2015-10-12  Yao Qi  <yao.qi@linaro.org>
1376
1377         * linux-aarch64-low.c: Update all callers as emit_load_store
1378         is renamed to aarch64_emit_load_store.
1379
1380 2015-10-12  Yao Qi  <yao.qi@linaro.org>
1381
1382         * linux-aarch64-low.c: Update all callers of function renaming
1383         from emit_insn to aarch64_emit_insn.
1384
1385 2015-10-12  Yao Qi  <yao.qi@linaro.org>
1386
1387         * linux-aarch64-low.c (enum aarch64_opcodes): Move to
1388         arch/aarch64-insn.h.
1389         (struct aarch64_memory_operand): Likewise.
1390         (ENCODE): Likewise.
1391         (emit_insn): Move to arch/aarch64-insn.c.
1392         (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
1393         (emit_load_store): Move to arch/aarch64-insn.c.
1394         (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
1395         (can_encode_int32): Remove.
1396
1397 2015-10-12  Yao Qi  <yao.qi@linaro.org>
1398
1399         * linux-aarch64-low.c (extract_signed_bitfield): Remove.
1400         (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
1401         (aarch64_relocate_instruction): Likewise.
1402         (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
1403         (struct aarch64_insn_visitor): Likewise.
1404
1405 2015-10-12  Yao Qi  <yao.qi@linaro.org>
1406
1407         * linux-aarch64-low.c (struct aarch64_insn_data): New.
1408         (struct aarch64_insn_visitor): New.
1409         (struct aarch64_insn_relocation_data): New.
1410         (aarch64_ftrace_insn_reloc_b): New function.
1411         (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1412         (aarch64_ftrace_insn_reloc_cb): Likewise.
1413         (aarch64_ftrace_insn_reloc_tb): Likewise.
1414         (aarch64_ftrace_insn_reloc_adr): Likewise.
1415         (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
1416         (aarch64_ftrace_insn_reloc_others): Likewise.
1417         (visitor): New.
1418         (aarch64_relocate_instruction): Use visitor.
1419
1420 2015-10-12  Yao Qi  <yao.qi@linaro.org>
1421
1422         * linux-aarch64-low.c (aarch64_relocate_instruction): Return
1423         int.  Add argument buf.
1424         (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
1425         aarch64_relocate_instruction.
1426
1427 2015-10-12  Yao Qi  <yao.qi@linaro.org>
1428
1429         * linux-aarch64-low.c (aarch64_relocate_instruction): Add
1430         argument insn.  Remove local variable insn.  Don't call
1431         target_read_uint32.
1432         (aarch64_install_fast_tracepoint_jump_pad): Call
1433         target_read_uint32.
1434
1435 2015-09-30  Yao Qi  <yao.qi@linaro.org>
1436
1437         * linux-aarch64-low.c (emit_movk): Shorten a long line.
1438         (emit_load_store_pair): Likewise.
1439
1440 2015-09-25  Simon Marchi  <simon.marchi@ericsson.com>
1441
1442         * dll.c (match_dll): Add cast(s).
1443         (unloaded_dll): Likewise.
1444         * linux-low.c (second_thread_of_pid_p): Likewise.
1445         (delete_lwp_callback): Likewise.
1446         (count_events_callback): Likewise.
1447         (select_event_lwp_callback): Likewise.
1448         (linux_set_resume_request): Likewise.
1449         * server.c (accumulate_file_name_length): Likewise.
1450         (emit_dll_description): Likewise.
1451         (handle_qxfer_threads_worker): Likewise.
1452         (visit_actioned_threads): Likewise.
1453         * thread-db.c (any_thread_of): Likewise.
1454         * tracepoint.c (same_process_p): Likewise.
1455         (match_blocktype): Likewise.
1456         (build_traceframe_info_xml): Likewise.
1457
1458 2015-09-25  Simon Marchi  <simon.marchi@ericsson.com>
1459
1460         * ax.c (gdb_parse_agent_expr): Add cast to allocation result
1461         assignment.
1462         (gdb_unparse_agent_expr): Likewise.
1463         * hostio.c (require_data): Likewise.
1464         (handle_pread): Likewise.
1465         * linux-low.c (disable_regset): Likewise.
1466         (fetch_register): Likewise.
1467         (store_register): Likewise.
1468         (get_dynamic): Likewise.
1469         (linux_qxfer_libraries_svr4): Likewise.
1470         * mem-break.c (delete_fast_tracepoint_jump): Likewise.
1471         (set_fast_tracepoint_jump): Likewise.
1472         (uninsert_fast_tracepoint_jumps_at): Likewise.
1473         (reinsert_fast_tracepoint_jumps_at): Likewise.
1474         (validate_inserted_breakpoint): Likewise.
1475         (clone_agent_expr): Likewise.
1476         * regcache.c (init_register_cache): Likewise.
1477         * remote-utils.c (putpkt_binary_1): Likewise.
1478         (decode_M_packet): Likewise.
1479         (decode_X_packet): Likewise.
1480         (look_up_one_symbol): Likewise.
1481         (relocate_instruction): Likewise.
1482         (monitor_output): Likewise.
1483         * server.c (handle_search_memory): Likewise.
1484         (handle_qxfer_exec_file): Likewise.
1485         (handle_qxfer_libraries): Likewise.
1486         (handle_qxfer): Likewise.
1487         (handle_query): Likewise.
1488         (handle_v_cont): Likewise.
1489         (handle_v_run): Likewise.
1490         (captured_main): Likewise.
1491         * target.c (write_inferior_memory): Likewise.
1492         * thread-db.c (try_thread_db_load_from_dir): Likewise.
1493         * tracepoint.c (init_trace_buffer): Likewise.
1494         (add_tracepoint_action): Likewise.
1495         (add_traceframe): Likewise.
1496         (add_traceframe_block): Likewise.
1497         (cmd_qtdpsrc): Likewise.
1498         (cmd_qtdv): Likewise.
1499         (cmd_qtstatus): Likewise.
1500         (response_source): Likewise.
1501         (response_tsv): Likewise.
1502         (cmd_qtnotes): Likewise.
1503         (gdb_collect): Likewise.
1504         (initialize_tracepoint): Likewise.
1505
1506 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
1507
1508         * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
1509         (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
1510         <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
1511         <NOP>: New.
1512         (enum aarch64_condition_codes): New enum.
1513         (w0): New static global.
1514         (fp): Likewise.
1515         (lr): Likewise.
1516         (struct aarch64_memory_operand) <type>: New
1517         MEMORY_OPERAND_POSTINDEX type.
1518         (postindex_memory_operand): New helper function.
1519         (emit_ret): New function.
1520         (emit_load_store_pair): New function, factored out of emit_stp
1521         with support for MEMORY_OPERAND_POSTINDEX.
1522         (emit_stp): Rewrite using emit_load_store_pair.
1523         (emit_ldp): New function.
1524         (emit_load_store): Likewise.
1525         (emit_ldr): Mention post-index instruction in comment.
1526         (emit_ldrh): New function.
1527         (emit_ldrb): New function.
1528         (emit_ldrsw): Mention post-index instruction in comment.
1529         (emit_str): Likewise.
1530         (emit_subs): New function.
1531         (emit_cmp): Likewise.
1532         (emit_and): Likewise.
1533         (emit_orr): Likewise.
1534         (emit_orn): Likewise.
1535         (emit_eor): Likewise.
1536         (emit_mvn): Likewise.
1537         (emit_lslv): Likewise.
1538         (emit_lsrv): Likewise.
1539         (emit_asrv): Likewise.
1540         (emit_mul): Likewise.
1541         (emit_sbfm): Likewise.
1542         (emit_sbfx): Likewise.
1543         (emit_ubfm): Likewise.
1544         (emit_ubfx): Likewise.
1545         (emit_csinc): Likewise.
1546         (emit_cset): Likewise.
1547         (emit_nop): Likewise.
1548         (emit_ops_insns): New helper function.
1549         (emit_pop): Likewise.
1550         (emit_push): Likewise.
1551         (aarch64_emit_prologue): New function.
1552         (aarch64_emit_epilogue): Likewise.
1553         (aarch64_emit_add): Likewise.
1554         (aarch64_emit_sub): Likewise.
1555         (aarch64_emit_mul): Likewise.
1556         (aarch64_emit_lsh): Likewise.
1557         (aarch64_emit_rsh_signed): Likewise.
1558         (aarch64_emit_rsh_unsigned): Likewise.
1559         (aarch64_emit_ext): Likewise.
1560         (aarch64_emit_log_not): Likewise.
1561         (aarch64_emit_bit_and): Likewise.
1562         (aarch64_emit_bit_or): Likewise.
1563         (aarch64_emit_bit_xor): Likewise.
1564         (aarch64_emit_bit_not): Likewise.
1565         (aarch64_emit_equal): Likewise.
1566         (aarch64_emit_less_signed): Likewise.
1567         (aarch64_emit_less_unsigned): Likewise.
1568         (aarch64_emit_ref): Likewise.
1569         (aarch64_emit_if_goto): Likewise.
1570         (aarch64_emit_goto): Likewise.
1571         (aarch64_write_goto_address): Likewise.
1572         (aarch64_emit_const): Likewise.
1573         (aarch64_emit_call): Likewise.
1574         (aarch64_emit_reg): Likewise.
1575         (aarch64_emit_pop): Likewise.
1576         (aarch64_emit_stack_flush): Likewise.
1577         (aarch64_emit_zero_ext): Likewise.
1578         (aarch64_emit_swap): Likewise.
1579         (aarch64_emit_stack_adjust): Likewise.
1580         (aarch64_emit_int_call_1): Likewise.
1581         (aarch64_emit_void_call_2): Likewise.
1582         (aarch64_emit_eq_goto): Likewise.
1583         (aarch64_emit_ne_goto): Likewise.
1584         (aarch64_emit_lt_goto): Likewise.
1585         (aarch64_emit_le_goto): Likewise.
1586         (aarch64_emit_gt_goto): Likewise.
1587         (aarch64_emit_ge_got): Likewise.
1588         (aarch64_emit_ops_impl): New static global variable.
1589         (aarch64_emit_ops): New target function, return
1590         &aarch64_emit_ops_impl.
1591         (struct linux_target_ops): Install it.
1592
1593 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
1594
1595         * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
1596         * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
1597         aarch64-ipa.o.
1598         * linux-aarch64-ipa.c: New file.
1599         * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
1600         and endian.h.
1601         (aarch64_get_thread_area): New target method.
1602         (extract_signed_bitfield): New helper function.
1603         (aarch64_decode_ldr_literal): New function.
1604         (enum aarch64_opcodes): New enum.
1605         (struct aarch64_register): New struct.
1606         (struct aarch64_operand): New struct.
1607         (x0): New static global.
1608         (x1): Likewise.
1609         (x2): Likewise.
1610         (x3): Likewise.
1611         (x4): Likewise.
1612         (w2): Likewise.
1613         (ip0): Likewise.
1614         (sp): Likewise.
1615         (xzr): Likewise.
1616         (aarch64_register): New helper function.
1617         (register_operand): Likewise.
1618         (immediate_operand): Likewise.
1619         (struct aarch64_memory_operand): New struct.
1620         (offset_memory_operand): New helper function.
1621         (preindex_memory_operand): Likewise.
1622         (enum aarch64_system_control_registers): New enum.
1623         (ENCODE): New macro.
1624         (emit_insn): New helper function.
1625         (emit_b): New function.
1626         (emit_bcond): Likewise.
1627         (emit_cb): Likewise.
1628         (emit_tb): Likewise.
1629         (emit_blr): Likewise.
1630         (emit_stp): Likewise.
1631         (emit_ldp_q_offset): Likewise.
1632         (emit_stp_q_offset): Likewise.
1633         (emit_load_store): Likewise.
1634         (emit_ldr): Likewise.
1635         (emit_ldrsw): Likewise.
1636         (emit_str): Likewise.
1637         (emit_ldaxr): Likewise.
1638         (emit_stxr): Likewise.
1639         (emit_stlr): Likewise.
1640         (emit_data_processing_reg): Likewise.
1641         (emit_data_processing): Likewise.
1642         (emit_add): Likewise.
1643         (emit_sub): Likewise.
1644         (emit_mov): Likewise.
1645         (emit_movk): Likewise.
1646         (emit_mov_addr): Likewise.
1647         (emit_mrs): Likewise.
1648         (emit_msr): Likewise.
1649         (emit_sevl): Likewise.
1650         (emit_wfe): Likewise.
1651         (append_insns): Likewise.
1652         (can_encode_int32_in): New helper function.
1653         (aarch64_relocate_instruction): New function.
1654         (aarch64_install_fast_tracepoint_jump_pad): Likewise.
1655         (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
1656         (struct linux_target_ops): Install aarch64_get_thread_area,
1657         aarch64_install_fast_tracepoint_jump_pad and
1658         aarch64_get_min_fast_tracepoint_insn_len.
1659
1660 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
1661
1662         * Makefile.in (aarch64-insn.o): New rule.
1663         * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
1664
1665 2015-09-21  Yao Qi  <yao.qi@linaro.org>
1666
1667         * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
1668
1669 2015-09-21  Yao Qi  <yao.qi@linaro.org>
1670
1671         * tracepoint.c (max_jump_pad_size): Remove.
1672
1673 2015-09-18  Yao Qi  <yao.qi@linaro.org>
1674
1675         * linux-aarch64-low.c: Don't include sys/uio.h.
1676         (ps_get_thread_area): Call aarch64_ps_get_thread_area.
1677
1678 2015-09-16  Wei-cheng Wang  <cole945@gmail.com>
1679
1680         * tracepoint.c (eval_result_type): Change prototype.
1681         (condition_true_at_tracepoint): Fix argument to compiled_cond.
1682
1683 2015-09-15  Pedro Alves  <palves@redhat.com>
1684
1685         * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
1686         Check whether to report exec events instead of checking whether
1687         multiprocess is enabled.
1688
1689 2015-09-15  Pedro Alves  <palves@redhat.com>
1690
1691         PR remote/18965
1692         * remote-utils.c (prepare_resume_reply): Merge
1693         TARGET_WAITKIND_VFORK_DONE switch case with the
1694         TARGET_WAITKIND_FORKED case.
1695
1696 2015-09-15  Yao Qi  <yao.qi@linaro.org>
1697
1698         * server.c (handle_query): Check string comparison using
1699         "else if" instead of "if".
1700
1701 2015-09-15  Yao Qi  <yao.qi@linaro.org>
1702
1703         * server.c (vCont_supported): New global variable.
1704         (handle_query): Set vCont_supported to 1 if "vContSupported+"
1705         matches.  Append ";vContSupported+" to own_buf.
1706         (handle_v_requests): Append ";s;S" to own_buf if target supports
1707         hardware single step or vCont_supported is false.
1708         (capture_main): Set vCont_supported to zero.
1709
1710 2015-09-15  Yao Qi  <yao.qi@linaro.org>
1711
1712         * linux-low.c (linux_supports_conditional_breakpoints): Rename
1713         it to ...
1714         (linux_supports_hardware_single_step): ... New function.
1715         (linux_target_ops): Update.
1716         * lynx-low.c (lynx_target_ops): Set field
1717         supports_hardware_single_step to target_can_do_hardware_single_step.
1718         * nto-low.c (nto_target_ops): Likewise.
1719         * spu-low.c (spu_target_ops): Likewise.
1720         * win32-low.c (win32_target_ops): Likewise.
1721         * target.c (target_can_do_hardware_single_step): New function.
1722         * target.h (struct target_ops) <supports_conditional_breakpoints>:
1723         Remove.  <supports_hardware_single_step>: New field.
1724         (target_supports_conditional_breakpoints): Remove.
1725         (target_supports_hardware_single_step): New macro.
1726         (target_can_do_hardware_single_step): Declare.
1727         * server.c (handle_query): Use target_supports_hardware_single_step
1728         instead of target_supports_conditional_breakpoints.
1729
1730 2015-09-15  Yao Qi  <yao.qi@linaro.org>
1731
1732         * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
1733         function.
1734         (struct linux_target_ops the_low_target): Install
1735         aarch64_linux_siginfo_fixup.
1736
1737 2015-09-11  Don Breazeal  <donb@codesourcery.com>
1738             Luis Machado  <lgustavo@codesourcery.com>
1739
1740         * linux-low.c (linux_mourn): Static declaration.
1741         (linux_arch_setup): Move in front of
1742         handle_extended_wait.
1743         (linux_arch_setup_thread): New function.
1744         (handle_extended_wait): Handle exec events.  Call
1745         linux_arch_setup_thread.  Make event_lwp argument a
1746         pointer-to-a-pointer.
1747         (check_zombie_leaders): Do not check stopped threads.
1748         (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
1749         (linux_low_filter_event): Add lwp and thread for exec'ing
1750         non-leader thread if leader thread has been deleted.
1751         Refactor code into linux_arch_setup_thread and call it.
1752         Pass child lwp pointer by reference to handle_extended_wait.
1753         (linux_wait_for_event_filtered): Update comment.
1754         (linux_wait_1): Prevent clobbering exec event status.
1755         (linux_supports_exec_events): New function.
1756         (linux_target_ops) <supports_exec_events>: Initialize new member.
1757         * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
1758         new member.
1759         * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
1760         * server.c (report_exec_events): New global variable.
1761         (handle_query): Handle qSupported query for exec-events feature.
1762         (captured_main): Initialize report_exec_events.
1763         * server.h (report_exec_events): Declare new global variable.
1764         * target.h (struct target_ops) <supports_exec_events>: New
1765         member.
1766         (target_supports_exec_events): New macro.
1767         * win32-low.c (win32_target_ops) <supports_exec_events>:
1768         Initialize new member.
1769
1770 2015-09-09  Markus Metzger  <markus.t.metzger@intel.com>
1771
1772         * linux-low.c (linux_low_enable_btrace): Remove.
1773         (linux_target_ops): Replace linux_low_enable_btrace with
1774         linux_enable_btrace.
1775
1776 2015-09-03  Yao Qi  <yao.qi@linaro.org>
1777
1778         * linux-aarch64-low.c (aarch64_insert_point): Call
1779         aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
1780         returns true.
1781
1782 2015-08-27  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1783
1784         * linux-low.c (check_stopped_by_breakpoint): Use
1785         GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
1786
1787 2015-08-27  Pedro Alves  <palves@redhat.com>
1788
1789         * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
1790
1791 2015-08-26  Simon Marchi  <simon.marchi@ericsson.com>
1792
1793         * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
1794         the XNEW-family equivalent.
1795         (compile_bytecodes): Likewise.
1796         * dll.c (loaded_dll): Likewise.
1797         * event-loop.c (append_callback_event): Likewise.
1798         (create_file_handler): Likewise.
1799         (create_file_event): Likewise.
1800         * hostio.c (handle_open): Likewise.
1801         * inferiors.c (add_thread): Likewise.
1802         (add_process): Likewise.
1803         * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
1804         * linux-arm-low.c (arm_new_process): Likewise.
1805         (arm_new_thread): Likewise.
1806         * linux-low.c (add_to_pid_list): Likewise.
1807         (linux_add_process): Likewise.
1808         (handle_extended_wait): Likewise.
1809         (add_lwp): Likewise.
1810         (enqueue_one_deferred_signal): Likewise.
1811         (enqueue_pending_signal): Likewise.
1812         (linux_resume_one_lwp_throw): Likewise.
1813         (linux_resume_one_thread): Likewise.
1814         (linux_read_memory): Likewise.
1815         (linux_write_memory): Likewise.
1816         * linux-mips-low.c (mips_linux_new_process): Likewise.
1817         (mips_linux_new_thread): Likewise.
1818         (mips_add_watchpoint): Likewise.
1819         * linux-x86-low.c (initialize_low_arch): Likewise.
1820         * lynx-low.c (lynx_add_process): Likewise.
1821         * mem-break.c (set_raw_breakpoint_at): Likewise.
1822         (set_breakpoint): Likewise.
1823         (add_condition_to_breakpoint): Likewise.
1824         (add_commands_to_breakpoint): Likewise.
1825         (clone_agent_expr): Likewise.
1826         (clone_one_breakpoint): Likewise.
1827         * regcache.c (new_register_cache): Likewise.
1828         * remote-utils.c (look_up_one_symbol): Likewise.
1829         * server.c (queue_stop_reply): Likewise.
1830         (start_inferior): Likewise.
1831         (queue_stop_reply_callback): Likewise.
1832         (handle_target_event): Likewise.
1833         * spu-low.c (fetch_ppc_memory): Likewise.
1834         (store_ppc_memory): Likewise.
1835         * target.c (set_target_ops): Likewise.
1836         * thread-db.c (thread_db_load_search): Likewise.
1837         (try_thread_db_load_1): Likewise.
1838         * tracepoint.c (add_tracepoint): Likewise.
1839         (add_tracepoint_action): Likewise.
1840         (create_trace_state_variable): Likewise.
1841         (cmd_qtdpsrc): Likewise.
1842         (cmd_qtro): Likewise.
1843         (add_while_stepping_state): Likewise.
1844         * win32-low.c (child_add_thread): Likewise.
1845         (get_image_name): Likewise.
1846
1847 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1848
1849         * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
1850
1851 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1852
1853         * Makefile.in (aarch64-linux.o): New rule.
1854         * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
1855         srv_tgtobj.
1856         * linux-aarch64-low.c: Include nat/aarch64-linux.h.
1857         (aarch64_init_debug_reg_state): Make it extern.
1858         (aarch64_linux_prepare_to_resume): Remove.
1859
1860 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1861
1862         * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
1863         lwp_arch_private_info and ptid_of_lwp.
1864
1865 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1866
1867         * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
1868         Find proc_info by find_process_pid.  All callers updated.
1869
1870 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1871
1872         * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
1873         Remove.
1874         (debug_reg_change_callback): Remove.
1875         (aarch64_notify_debug_reg_change): Remove.
1876
1877 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1878
1879         * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
1880         Call current_lwp_ptid.
1881
1882 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1883
1884         * linux-aarch64-low.c (debug_reg_change_callback): Use
1885         debug_printf.
1886
1887 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1888
1889         * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
1890
1891 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1892
1893         * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
1894
1895 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1896
1897         * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
1898         the code.
1899
1900 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1901
1902         * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
1903         Remove.
1904         (debug_reg_change_callback): Remove argument entry and add argument
1905         lwp.  Remove local variable thread.  Don't print thread id in the
1906         debugging output.  Don't check whether pid of thread equals to pid.
1907         (aarch64_notify_debug_reg_change): Don't set param.pid.  Call
1908         iterate_over_lwps instead find_inferior.
1909
1910 2015-08-24  Pedro Alves  <palves@redhat.com>
1911
1912         * inferiors.c (get_first_process): New function.
1913         * inferiors.h (get_first_process): New declaration.
1914         * remote-utils.c (read_ptid): Default to the first process in the
1915         list, instead of to the current thread's process.
1916
1917 2015-08-24  Pedro Alves  <palves@redhat.com>
1918
1919         * debug.c: Include gdb_sys_time.h instead of sys/time.h.
1920         * event-loop.c: Likewise.
1921         * remote-utils.c: Likewise.
1922         * tracepoint.c: Likewise.
1923
1924 2015-08-24  Pedro Alves  <palves@redhat.com>
1925
1926         * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
1927         ptid_get_lwp.
1928
1929 2015-08-21  Pedro Alves  <palves@redhat.com>
1930
1931         * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
1932         instead of literal 1.
1933
1934 2015-08-21  Pedro Alves  <palves@redhat.com>
1935
1936         * tdesc.c (default_description): Explicitly zero-initialize.
1937
1938 2015-08-21  Pedro Alves  <palves@redhat.com>
1939
1940         PR gdb/18749
1941         * inferiors.c (remove_thread): Discard any pending stop reply for
1942         this thread.
1943         * server.c (remove_all_on_match_pid): Rename to ...
1944         (remove_all_on_match_ptid): ... this.  Work with a filter ptid
1945         instead of a pid.
1946         (discard_queued_stop_replies): Change parameter to a ptid.  Now
1947         extern.
1948         (handle_v_kill, kill_inferior_callback, captured_main)
1949         (process_serial_event): Adjust.
1950         * server.h (discard_queued_stop_replies): Declare.
1951
1952 2015-08-21  Pedro Alves  <palves@redhat.com>
1953
1954         * linux-low.c (wait_for_sigstop): Always switch to no thread
1955         selected if the previously current thread dies.
1956         * lynx-low.c (lynx_request_interrupt): Use the first thread's
1957         process instead of the current thread's.
1958         * remote-utils.c (input_interrupt): Don't check if there's no
1959         current thread.
1960         * server.c (gdb_read_memory, gdb_write_memory): If setting the
1961         current thread to the general thread fails, error out.
1962         (handle_qxfer_auxv, handle_qxfer_libraries)
1963         (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
1964         (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
1965         (handle_query): Check if there's a thread selected instead of
1966         checking whether there's any thread in the thread list.
1967         (handle_qxfer_threads, handle_qxfer_btrace)
1968         (handle_qxfer_btrace_conf): Don't error out early if there's no
1969         thread in the thread list.
1970         (handle_v_cont, myresume): Don't set the current thread to the
1971         continue thread.
1972         (process_serial_event) <Hg handling>: Also set thread_id if the
1973         previous general thread is still alive.
1974         (process_serial_event) <g/G handling>: If setting the current
1975         thread to the general thread fails, error out.
1976         * spu-low.c (spu_resume, spu_request_interrupt): Use the first
1977         thread's lwp instead of the current thread's.
1978         * target.c (set_desired_thread): If the desired thread was not
1979         found, leave the current thread pointing to NULL.  Return an int
1980         (boolean) indicating success.
1981         * target.h (set_desired_thread): Change return type to int.
1982
1983 2015-08-20  Max Filippov  <jcmvbkbc@gmail.com>
1984
1985         * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
1986         * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
1987         #includes.
1988         (ps_get_thread_area): New function.
1989
1990 2015-08-19  Gary Benson  <gbenson@redhat.com>
1991
1992         * hostio.c (handle_pread): Do not attempt to read more data
1993         than hostio_reply_with_data can fit in a packet.
1994
1995 2015-08-18  Joel Brobecker  <brobecker@adacore.com>
1996
1997         * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
1998
1999 2015-08-14  Matthew Fortune  <matthew.fortune@imgtec.com>
2000
2001         * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
2002
2003 2015-08-06  Pedro Alves  <palves@redhat.com>
2004
2005         * tracepoint.c (expr_eval_result): Now an int.
2006
2007 2015-08-06  Pedro Alves  <palves@redhat.com>
2008
2009         * gdbthread.h (struct regcache): Forward declare.
2010         (struct thread_info) <regcache_data>: Now a struct regcache
2011         pointer.
2012         * inferiors.c (inferior_regcache_data)
2013         (set_inferior_regcache_data): Now work with struct regcache
2014         pointers.
2015         * inferiors.h (struct regcache): Forward declare.
2016         (inferior_regcache_data, set_inferior_regcache_data): Now work
2017         with struct regcache pointers.
2018         * regcache.c (get_thread_regcache, regcache_invalidate_thread)
2019         (free_register_cache_thread): Remove struct regcache pointer
2020         casts.
2021
2022 2015-08-06  Pedro Alves  <palves@redhat.com>
2023
2024         * server.c (captured_main): On error, print the exception message
2025         to stderr, and if run_once is set, throw a quit.
2026
2027 2015-08-06  Pedro Alves  <palves@redhat.com>
2028
2029         * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
2030         the current thread.
2031
2032 2015-08-06  Pedro Alves  <palves@redhat.com>
2033
2034         * linux-low.c (linux_write_memory): Rewrite debug output to avoid
2035         reading beyond the passed in buffer length.
2036
2037 2015-08-06  Pierre Langlois  <pierre.langlois@arm.com>
2038
2039         * tracepoint.c (symbol_list) <required>: Remove.
2040
2041 2015-08-06  Pedro Alves  <palves@redhat.com>
2042
2043         * linux-low.c (handle_extended_wait): Set the fork child's suspend
2044         count if stopping and suspending threads.
2045         (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
2046         stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
2047         (linux_detach): Complete an ongoing step-over.
2048         (lwp_suspended_inc, lwp_suspended_decr): New functions.  Use
2049         throughout.
2050         (resume_stopped_resumed_lwps): Don't resume a suspended thread.
2051         (linux_wait_1): If passing a signal to the inferior after
2052         finishing a step-over, unsuspend and re-resume all lwps.  If we
2053         see a single-step event but the thread should be continuing, don't
2054         pass the trap to gdb.
2055         (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
2056         internal_error instead of gdb_assert.
2057         (enqueue_pending_signal): New function.
2058         (check_ptrace_stopped_lwp_gone): Add debug output.
2059         (start_step_over): Use internal_error instead of gdb_assert.
2060         (complete_ongoing_step_over): New function.
2061         (linux_resume_one_thread): Don't resume a suspended thread.
2062         (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
2063         it stepping.
2064
2065 2015-08-06  Pedro Alves  <palves@redhat.com>
2066
2067         * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
2068         (linux_thread_alive): Use lwp_is_marked_dead.
2069         (extended_event_reported): Delete.
2070         (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
2071         instead of extended_event_reported.
2072         (mark_lwp_dead): Don't set the 'dead' flag.  Store the waitstatus
2073         as well.
2074         (lwp_is_marked_dead): New function.
2075         (lwp_running): Use lwp_is_marked_dead.
2076         * linux-low.h: Delete 'dead' field, and update 'waitstatus's
2077         comment.
2078
2079 2015-08-06  Pedro Alves  <palves@redhat.com>
2080
2081         * linux-low.c (linux_wait_1): Move fork event output out of the
2082         !report_to_gdb check.  Pass event_child->waitstatus to
2083         target_waitstatus_to_string instead of ourstatus.
2084
2085 2015-08-04  Yao Qi  <yao.qi@linaro.org>
2086
2087         * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
2088         if current_thread is 32 bit.
2089
2090 2015-08-04  Yao Qi  <yao.qi@linaro.org>
2091
2092         * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2093         0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2094         * server.c (extended_protocol): Remove "static".
2095         * server.h (extended_protocol): Declare it.
2096
2097 2015-08-04  Yao Qi  <yao.qi@linaro.org>
2098
2099         * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
2100         both aarch64 and aarch32.
2101         (aarch64_set_pc): Likewise.
2102
2103 2015-08-04  Yao Qi  <yao.qi@linaro.org>
2104
2105         * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
2106         to srv_regobj and append arm-core.xml arm-vfpv3.xml and
2107         arm-with-neon.xml to srv_xmlfiles.
2108         * linux-aarch64-low.c: Include linux-aarch32-low.h.
2109         (is_64bit_tdesc): New function.
2110         (aarch64_linux_read_description): New function.
2111         (aarch64_arch_setup): Call aarch64_linux_read_description.
2112         (regs_info): Rename to regs_info_aarch64.
2113         (aarch64_regs_info): Return right regs_info.
2114         (initialize_low_arch): Call initialize_low_arch_aarch32.
2115
2116 2015-08-04  Yao Qi  <yao.qi@linaro.org>
2117
2118         * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
2119         * linux-aarch32-low.c: New file.
2120         * linux-aarch32-low.h: New file.
2121         * linux-arm-low.c (arm_fill_gregset): Move it to
2122         linux-aarch32-low.c.
2123         (arm_store_gregset): Likewise.
2124         (arm_fill_vfpregset): Call arm_fill_vfpregset_num
2125         (arm_store_vfpregset): Call arm_store_vfpregset_num.
2126         (arm_arch_setup): Check if PTRACE_GETREGSET works.
2127         (regs_info): Rename to regs_info_arm.
2128         (arm_regs_info): Return regs_info_aarch32 if
2129         have_ptrace_getregset is 1 and target description is
2130         arm_with_neon or arm_with_vfpv3.
2131         (initialize_low_arch): Don't call init_registers_arm_with_neon.
2132         Call initialize_low_arch_aarch32 instead.
2133
2134 2015-08-04  Yao Qi  <yao.qi@linaro.org>
2135
2136         * linux-x86-low.c (have_ptrace_getregset): Move it to ...
2137         * linux-low.c: ... here.
2138         * linux-low.h (have_ptrace_getregset): Declare it.
2139
2140 2015-08-04  Pedro Alves  <palves@redhat.com>
2141
2142         * thread-db.c (struct thread_db): Use new typedefs.
2143         (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
2144         CHK calls.
2145         (disable_thread_event_reporting): Cast result of dlsym to
2146         destination function pointer type.
2147         (thread_db_mourn): Use td_ta_delete_ftype.
2148
2149 2015-08-03  Sandra Loosemore  <sandra@codesourcery.com>
2150
2151         * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
2152         arch variant.
2153         (CDX_BREAKPOINT): Define for R2.
2154         (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
2155         (the_low_target): Add comments.
2156
2157 2015-07-30  Yao Qi  <yao.qi@linaro.org>
2158
2159         * linux-arm-low.c (arm_hwcap): Remove it.
2160         (arm_read_description): New local variable arm_hwcap.  Don't
2161         set arm_hwcap to zero.
2162
2163 2015-07-30  Yao Qi  <yao.qi@linaro.org>
2164
2165         * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
2166         Use regcache->tdesc instead.
2167         (arm_store_wmmxregset): Likewise.
2168         (arm_fill_vfpregset): Likewise.
2169         (arm_store_vfpregset): Likewise.
2170
2171 2015-07-30  Yao Qi  <yao.qi@linaro.org>
2172
2173         * linux-arm-low.c: Include arch/arm.h.
2174         (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
2175         (arm_store_gregset): Likewise.
2176
2177 2015-07-29  Simon Marchi  <simon.marchi@ericsson.com>
2178
2179         * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
2180         ptrace's 4th parameter.
2181
2182 2015-07-27  Yao Qi  <yao.qi@linaro.org>
2183
2184         * configure.srv (case aarch64*-*-linux*): Don't set
2185         srv_linux_usrregs.
2186
2187 2015-07-24  Pedro Alves  <palves@redhat.c: Likewise.om>
2188
2189         * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
2190         sys/ptrace.h.
2191         * linux-arm-low.c: Likewise.
2192         * linux-cris-low.c: Likewise.
2193         * linux-crisv32-low.c: Likewise.
2194         * linux-low.c: Likewise.
2195         * linux-m68k-low.c: Likewise.
2196         * linux-mips-low.c: Likewise.
2197         * linux-nios2-low.c: Likewise.
2198         * linux-s390-low.c: Likewise.
2199         * linux-sparc-low.c: Likewise.
2200         * linux-tic6x-low.c: Likewise.
2201         * linux-tile-low.c: Likewise.
2202         * linux-x86-low.c: Likewise.
2203
2204 2015-07-24  Pedro Alves  <palves@redhat.com>
2205
2206         * config.in: Regenerate.
2207         * configure: Regenerate.
2208
2209 2015-07-24  Pedro Alves  <palves@redhat.com>
2210
2211         * acinclude.m4: Include ../ptrace.m4.
2212         * configure.ac: Call GDB_AC_PTRACE.
2213         * config.in, configure: Regenerate.
2214
2215 2015-07-24  Yao Qi  <yao.qi@linaro.org>
2216
2217         * linux-low.c (linux_create_inferior): Remove setting to
2218         proc->priv->new_inferior.
2219         (linux_attach): Likewise.
2220         (linux_low_filter_event): Likewise.
2221         * linux-low.h (struct process_info_private) <new_inferior>: Remove.
2222
2223 2015-07-24  Yao Qi  <yao.qi@linaro.org>
2224
2225         * linux-low.c (linux_arch_setup): New function.
2226         (linux_low_filter_event): If proc->tdesc is NULL and
2227         proc->attached is true, call the_low_target.arch_setup.
2228         Otherwise, keep status pending, and return.
2229         (linux_resume_one_lwp_throw): Don't call get_pc if
2230         thread->while_stepping isn't NULL.  Don't call
2231         get_thread_regcache if proc->tdesc is NULL.
2232         (need_step_over_p): Return 0 if proc->tdesc is NULL.
2233         (linux_target_ops): Install arch_setup.
2234         * server.c (start_inferior): Call the_target->arch_setup.
2235         * target.h (struct target_ops) <arch_setup>: New field.
2236         (target_arch_setup): New marco.
2237         * lynx-low.c (lynx_target_ops): Update.
2238         * nto-low.c (nto_target_ops): Update.
2239         * spu-low.c (spu_target_ops): Update.
2240         * win32-low.c (win32_target_ops): Update.
2241
2242 2015-07-24  Yao Qi  <yao.qi@linaro.org>
2243
2244         * linux-low.c (linux_add_process): Don't set
2245         proc->priv->new_inferior.
2246         (linux_create_inferior): Set proc->priv->new_inferior to 1.
2247         (linux_attach): Likewise.
2248
2249 2015-07-24  Yao Qi  <yao.qi@linaro.org>
2250
2251         * server.c (start_inferior): Code refactor.
2252
2253 2015-07-24  Yao Qi  <yao.qi@linaro.org>
2254
2255         * server.c (process_serial_event): Set general_thread.
2256
2257 2015-07-21  Yao Qi  <yao.qi@linaro.org>
2258
2259         * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
2260         aarch64_linux_get_debug_reg_capacity.
2261
2262 2015-07-17  Yao Qi  <yao.qi@linaro.org>
2263
2264         * Makefile.in (aarch64-linux-hw-point.o): New rule.
2265         * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
2266         * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
2267         (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
2268         (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
2269         (AARCH64_HWP_ALIGNMENT): Likewise.
2270         (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
2271         (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
2272         (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
2273         (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
2274         (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
2275         (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
2276         (struct aarch64_debug_reg_state): Likewise.
2277         (struct arch_lwp_info): Likewise.
2278         (aarch64_align_watchpoint): Likewise.
2279         (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
2280         (aarch64_watchpoint_length): Likewise.
2281         (aarch64_point_encode_ctrl_reg): Likewise
2282         (aarch64_point_is_aligned): Likewise.
2283         (aarch64_align_watchpoint): Likewise.
2284         (aarch64_linux_set_debug_regs):
2285         (aarch64_dr_state_insert_one_point): Likewise.
2286         (aarch64_dr_state_remove_one_point): Likewise.
2287         (aarch64_handle_breakpoint): Likewise.
2288         (aarch64_handle_aligned_watchpoint): Likewise.
2289         (aarch64_handle_unaligned_watchpoint): Likewise.
2290         (aarch64_handle_watchpoint): Likewise.
2291
2292 2015-07-17  Yao Qi  <yao.qi@linaro.org>
2293
2294         * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
2295         and don't aarch64_get_debug_reg_state.  All callers update.
2296         (aarch64_handle_aligned_watchpoint): Likewise.
2297         (aarch64_handle_unaligned_watchpoint): Likewise.
2298         (aarch64_handle_watchpoint): Likewise.
2299         (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
2300         (aarch64_remove_point): Likewise.
2301
2302 2015-07-17  Yao Qi  <yao.qi@linaro.org>
2303
2304         * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
2305         debug_printf.
2306         (aarch64_handle_unaligned_watchpoint): Likewise.
2307
2308 2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
2309
2310         Revert the previous 3 commits:
2311         Move gdb_regex* to common/
2312         Move linux_find_memory_regions_full & co.
2313         gdbserver build-id attribute generator
2314
2315 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
2316             Jan Kratochvil  <jan.kratochvil@redhat.com>
2317
2318         gdbserver build-id attribute generator.
2319         * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
2320         (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
2321         (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
2322         (find_phdr): New.
2323         (get_dynamic): Use find_pdhr to traverse program headers.
2324         (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
2325         (compare_mapping_entry_range, struct find_memory_region_callback_data)
2326         (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
2327         (get_hex_build_id): New.
2328         (linux_qxfer_libraries_svr4): Add optional build-id attribute
2329         to reply XML document.
2330
2331 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
2332             Jan Kratochvil  <jan.kratochvil@redhat.com>
2333
2334         * target.c: Include target/target-utils.h and fcntl.h.
2335         (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
2336         (target_fileio_read_stralloc): New functions.
2337
2338 2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
2339
2340         * Makefile.in (OBS): Add gdb_regex.o.
2341         (gdb_regex.o): New.
2342         * config.in: Rebuilt.
2343         * configure: Rebuilt.
2344
2345 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
2346             Jan Kratochvil  <jan.kratochvil@redhat.com>
2347
2348         Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
2349         * Makefile.in (OBS): Add target-utils.o.
2350         (linux-maps.o, target-utils.o): New.
2351         * configure.srv (srv_linux_obj): Add linux-maps.o.
2352
2353 2015-07-15  Pierre Langlois  <pierre.langlois@arm.com>
2354
2355         * linux-aarch64-low.c (aarch64_supports_range_stepping): New
2356         function, return 1.
2357         (the_low_target): Install it.
2358
2359 2015-07-14  Pedro Alves  <palves@redhat.com>
2360
2361         * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
2362         Instead, ignore ECHILD, and throw an error for other errnos.
2363
2364 2015-07-10  Pedro Alves  <palves@redhat.com>
2365
2366         * event-loop.c (struct callback_event) <data>: Change type to
2367         gdb_client_data instance instead of gdb_client_data pointer.
2368         (append_callback_event): Adjust.
2369
2370 2015-07-10  Pierre Langlois  <pierre.langlois@arm.com>
2371
2372         * linux-aarch64-low.c: Add comments for each linux_target_ops
2373         method.  Remove comments already covered in target_ops and
2374         linux_target_ops definitions.
2375         (the_low_target): Add comments for each unimplemented method.
2376
2377 2015-07-09  Yao Qi  <yao.qi@linaro.org>
2378
2379         * linux-aarch64-low.c (aarch64_regmap): Remove.
2380         (aarch64_usrregs_info): Remove.
2381         (regs_info): Set field usrregs to NULL.
2382
2383 2015-07-02  Markus Metzger  <markus.t.metzger@intel.com>
2384
2385         * linux-low.c: Include "rsp-low.h"
2386         (linux_low_encode_pt_config, linux_low_encode_raw): New.
2387         (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
2388         (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
2389         (handle_btrace_enable_pt): New.
2390         (handle_btrace_general_set): Support "pt".
2391         (handle_btrace_conf_general_set): Support "pt:size".
2392
2393 2015-06-29  Pierre Langlois  <pierre.langlois@arm.com>
2394
2395         * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
2396         Z_PACKET_SW_BP.
2397
2398 2015-06-29  Pierre Langlois  <pierre.langlois@arm.com>
2399
2400         * linux-aarch64-low.c: Remove comment about endianness.
2401         (aarch64_breakpoint): Change type to gdb_byte[].  Set to "brk #0".
2402         (aarch64_breakpoint_at): Change type of insn to gdb_byte[].  Use
2403         memcmp.
2404
2405 2015-06-24  Gary Benson  <gbenson@redhat.com>
2406
2407         * linux-i386-ipa.c (stdint.h): Do not include.
2408         * lynx-i386-low.c (stdint.h): Likewise.
2409         * lynx-ppc-low.c (stdint.h): Likewise.
2410         * mem-break.c (stdint.h): Likewise.
2411         * thread-db.c (stdint.h): Likewise.
2412         * tracepoint.c (stdint.h): Likewise.
2413         * win32-low.c (stdint.h): Likewise.
2414
2415 2015-06-18  Simon Marchi  <simon.marchi@ericsson.com>
2416
2417         * server.c (write_qxfer_response): Update call to
2418         remote_escape_output.
2419
2420 2015-06-15  Aleksandar Ristovski  <aristovski@qnx.com
2421             Jan Kratochvil  <jan.kratochvil@redhat.com>
2422
2423         Merge multiple hex conversions.
2424         * gdbreplay.c (tohex): Rename to 'fromhex'.
2425         (logchar): Use fromhex.
2426
2427 2015-06-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
2428
2429         * server.c (handle_qxfer_libraries): Set `version' attribute for
2430         <library-list>.
2431
2432 2015-06-10  Gary Benson  <gbenson@redhat.com>
2433
2434         * target.h (struct target_ops) <multifs_open>: New field.
2435         <multifs_unlink>: Likewise.
2436         <multifs_readlink>: Likewise.
2437         * linux-low.c (nat/linux-namespaces.h): New include.
2438         (linux_target_ops): Initialize the_target->multifs_open,
2439         the_target->multifs_unlink and the_target->multifs_readlink.
2440         * hostio.h (hostio_handle_new_gdb_connection): New declaration.
2441         * hostio.c (hostio_fs_pid): New static variable.
2442         (hostio_handle_new_gdb_connection): New function.
2443         (handle_setfs): Likewise.
2444         (handle_open): Use the_target->multifs_open as appropriate.
2445         (handle_unlink): Use the_target->multifs_unlink as appropriate.
2446         (handle_readlink): Use the_target->multifs_readlink as
2447         appropriate.
2448         (handle_vFile): Handle vFile:setfs packets.
2449         * server.c (handle_query): Call hostio_handle_new_gdb_connection
2450         after target_handle_new_gdb_connection.
2451
2452 2015-06-10  Gary Benson  <gbenson@redhat.com>
2453
2454         * configure.ac (AC_CHECK_FUNCS): Add setns.
2455         * config.in: Regenerate.
2456         * configure: Likewise.
2457         * Makefile.in (SFILES): Add nat/linux-namespaces.c.
2458         (linux-namespaces.o): New rule.
2459         * configure.srv (srv_linux_obj): Add linux-namespaces.o.
2460
2461 2015-06-09  Gary Benson <gbenson@redhat.com>
2462
2463         * hostio.c (handle_open): Process mode argument with
2464         fileio_to_host_mode.
2465
2466 2015-06-01  Yao Qi  <yao.qi@linaro.org>
2467
2468         * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
2469         * linux-x86-low.c: Likewise.
2470
2471 2015-05-28  Don Breazeal  <donb@codesourcery.com>
2472
2473         * linux-low.c (handle_extended_wait): Initialize
2474         thread_info.last_resume_kind for new fork children.
2475
2476 2015-05-15  Pedro Alves  <palves@redhat.com>
2477
2478         * target.h (target_handle_new_gdb_connection): Rewrite using if
2479         wrapped in do/while.
2480
2481 2015-05-14  Joel Brobecker  <brobecker@adacore.com>
2482
2483         * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
2484         * configure, config.in: Regenerate.
2485         * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
2486         Declare typedef.
2487
2488 2015-05-12  Don Breazeal  <donb@codesourcery.com>
2489
2490         * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
2491         PTRACE_EVENT_VFORK_DONE.
2492         (linux_low_ptrace_options, extended_event_reported): Add vfork
2493         events.
2494         * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
2495         and "vforkdone" for RSP 'T' Stop Reply Packet.
2496         * server.h (report_vfork_events): Declare
2497         global variable.
2498
2499 2015-05-12  Don Breazeal  <donb@codesourcery.com>
2500
2501         * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
2502         (the_low_target) <new_fork>: Initialize new member.
2503         * linux-arm-low.c (arm_new_fork): New function.
2504         (the_low_target) <new_fork>: Initialize new member.
2505         * linux-low.c (handle_extended_wait): Call new target function
2506         new_fork.
2507         * linux-low.h (struct linux_target_ops) <new_fork>: New member.
2508         * linux-mips-low.c (mips_add_watchpoint): New function
2509         extracted from mips_insert_point.
2510         (the_low_target) <new_fork>: Initialize new member.
2511         (mips_linux_new_fork): New function.
2512         (mips_insert_point): Call mips_add_watchpoint.
2513         * linux-x86-low.c (x86_linux_new_fork): New function.
2514         (the_low_target) <new_fork>: Initialize new member.
2515
2516 2015-05-12  Don Breazeal  <donb@codesourcery.com>
2517
2518         * linux-low.c (handle_extended_wait): Implement return value,
2519         rename argument 'event_child' to 'event_lwp', handle
2520         PTRACE_EVENT_FORK, call internal_error for unrecognized event.
2521         (linux_low_ptrace_options): New function.
2522         (linux_low_filter_event): Call linux_low_ptrace_options,
2523         use different argument fo linux_enable_event_reporting,
2524         use return value from handle_extended_wait.
2525         (extended_event_reported): New function.
2526         (linux_wait_1): Call extended_event_reported and set
2527         status to report fork events.
2528         (linux_write_memory): Add pid to debug message.
2529         (reset_lwp_ptrace_options_callback): New function.
2530         (linux_handle_new_gdb_connection): New function.
2531         (linux_target_ops): Initialize new structure member.
2532         * linux-low.h (struct lwp_info) <waitstatus>: New member.
2533         * lynx-low.c: Initialize new structure member.
2534         * remote-utils.c (prepare_resume_reply): Implement stop reason
2535         "fork" for "T" stop message.
2536         * server.c (handle_query): Call handle_new_gdb_connection.
2537         * server.h (report_fork_events): Declare global flag.
2538         * target.h (struct target_ops) <handle_new_gdb_connection>:
2539         New member.
2540         (target_handle_new_gdb_connection): New macro.
2541         * win32-low.c: Initialize new structure member.
2542
2543 2015-05-12  Don Breazeal  <donb@codesourcery.com>
2544
2545         * mem-break.c (APPEND_TO_LIST): Define macro.
2546         (clone_agent_expr): New function.
2547         (clone_one_breakpoint): New function.
2548         (clone_all_breakpoints): New function.
2549         * mem-break.h: Declare new functions.
2550
2551 2015-05-12  Don Breazeal  <donb@codesourcery.com>
2552
2553         * linux-low.c (linux_supports_fork_events): New function.
2554         (linux_supports_vfork_events): New function.
2555         (linux_target_ops): Initialize new structure members.
2556         (initialize_low): Call linux_check_ptrace_features.
2557         * lynx-low.c (lynx_target_ops): Initialize new structure
2558         members.
2559         * server.c (report_fork_events, report_vfork_events):
2560         New global flags.
2561         (handle_query): Add new features to qSupported packet and
2562         response.
2563         (captured_main): Initialize new global variables.
2564         * target.h (struct target_ops) <supports_fork_events>:
2565         New member.
2566         <supports_vfork_events>: New member.
2567         (target_supports_fork_events): New macro.
2568         (target_supports_vfork_events): New macro.
2569         * win32-low.c (win32_target_ops): Initialize new structure
2570         members.
2571
2572 2015-05-12  Gary Benson <gbenson@redhat.com>
2573
2574         * server.c (handle_qxfer_exec_file): Use current process
2575         if annex is empty.
2576
2577 2015-05-08  Sandra Loosemore  <sandra@codesourcery.com>
2578
2579         * linux-nios2-low.c: Include elf/common.h.  Adjust comments.
2580         Remove HAVE_PTRACE_GETREGS conditionals.
2581         (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
2582         instead of PTRACE_GETREGS and PTRACE_SETREGS.
2583
2584 2015-05-08  Yao Qi  <yao.qi@linaro.org>
2585
2586         * linux-low.c (linux_supports_conditional_breakpoints): New
2587         function.
2588         (linux_target_ops): Install new target method.
2589         * lynx-low.c (lynx_target_ops): Install NULL hook for
2590         supports_conditional_breakpoints.
2591         * nto-low.c (nto_target_ops): Likewise.
2592         * spu-low.c (spu_target_ops): Likewise.
2593         * win32-low.c (win32_target_ops): Likewise.
2594         * server.c (handle_query): Check
2595         target_supports_conditional_breakpoints.
2596         * target.h (struct target_ops) <supports_conditional_breakpoints>:
2597         New field.
2598         (target_supports_conditional_breakpoints): New macro.
2599
2600 2015-05-06  Pedro Alves  <palves@redhat.com>
2601
2602         PR server/18081
2603         * server.c (start_inferior): If the process exits, mourn it.
2604
2605 2015-04-21  Gary Benson <gbenson@redhat.com>
2606
2607         * hostio.c (fileio_open_flags_to_host): Factored out to
2608         fileio_to_host_openflags in common/fileio.c.  Single use
2609         updated.
2610
2611 2015-04-17  Max Filippov  <jcmvbkbc@gmail.com>
2612
2613         * linux-xtensa-low.c (xtensa_fill_gregset)
2614         (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
2615         XCHAL_HAVE_LOOP.
2616
2617 2015-04-17  Max Filippov  <jcmvbkbc@gmail.com>
2618
2619         * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
2620         (regs_info): Replace usrregs pointer with NULL.
2621
2622 2015-04-17  Gary Benson  <gbenson@redhat.com>
2623
2624         * target.h (struct target_ops) <pid_to_exec_file>: New field.
2625         * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
2626         * server.c (handle_qxfer_exec_file): New function.
2627         (qxfer_packets): Add exec-file entry.
2628         (handle_query): Report qXfer:exec-file:read as supported packet.
2629
2630 2015-04-14  Romain Naour <romain.naour@openwide.fr>  (tiny change)
2631
2632         * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
2633
2634 2015-04-09  Gary Benson <gbenson@redhat.com>
2635
2636         * hostio-errno.c (errno_to_fileio_error): Remove function.
2637         Update caller to use remote_fileio_to_fio_error.
2638
2639 2015-04-09  Yao Qi  <yao.qi@linaro.org>
2640
2641         * linux-low.c (linux_insert_point): Call
2642         insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
2643         (linux_remove_point): Call remove_memory_breakpoint if type is
2644         raw_bkpt_type_sw.
2645         * linux-x86-low.c (x86_insert_point): Don't call
2646         insert_memory_breakpoint.
2647         (x86_remove_point): Don't call remove_memory_breakpoint.
2648
2649 2015-04-01  Pedro Alves  <palves@redhat.com>
2650             Cleber Rosa  <crosa@redhat.com>
2651
2652         * server.c (gdbserver_usage): Reorganize and extend the usage
2653         message.
2654
2655 2015-03-24  Pedro Alves  <palves@redhat.com>
2656
2657         * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
2658         output.  Also dump TRAP_TRACE.
2659         (linux_low_filter_event): In debug output, distinguish a
2660         resume_stop SIGSTOP from a delayed SIGSTOP.
2661
2662 2015-03-24  Gary Benson  <gbenson@redhat.com>
2663
2664         * linux-x86-low.c (x86_linux_new_thread): Moved to
2665         nat/x86-linux.c.
2666         (x86_linux_prepare_to_resume): Likewise.
2667
2668 2015-03-24  Gary Benson  <gbenson@redhat.com>
2669
2670         * Makefile.in (x86-linux-dregs.o): New rule.
2671         * configure.srv: Add x86-linux-dregs.o to relevant targets.
2672         * linux-x86-low.c: Include nat/x86-linux-dregs.h.
2673         (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
2674         (x86_linux_dr_get): Likewise.
2675         (x86_linux_dr_set): Likewise.
2676         (update_debug_registers_callback): Likewise.
2677         (x86_linux_dr_set_addr): Likewise.
2678         (x86_linux_dr_get_addr): Likewise.
2679         (x86_linux_dr_set_control): Likewise.
2680         (x86_linux_dr_get_control): Likewise.
2681         (x86_linux_dr_get_status): Likewise.
2682         (x86_linux_update_debug_registers): Likewise.
2683
2684 2015-03-24  Gary Benson  <gbenson@redhat.com>
2685
2686         * linux-x86-low.c (x86_linux_update_debug_registers):
2687         New function, factored out from...
2688         (x86_linux_prepare_to_resume): ...this.
2689
2690 2015-03-24  Gary Benson  <gbenson@redhat.com>
2691
2692         * linux-x86-low.c (x86_linux_dr_get): Update comments.
2693         (x86_linux_dr_set): Likewise.
2694         (update_debug_registers_callback): Likewise.
2695         (x86_linux_dr_set_addr): Likewise.
2696         (x86_linux_dr_get_addr): Likewise.
2697         (x86_linux_dr_set_control): Likewise.
2698         (x86_linux_dr_get_control): Likewise.
2699         (x86_linux_dr_get_status): Likewise.
2700         (x86_linux_prepare_to_resume): Likewise.
2701
2702 2015-03-24  Gary Benson  <gbenson@redhat.com>
2703
2704         * linux-x86-low.c (x86_linux_dr_get): Add assertion.
2705         Use perror_with_name.  Pass string through gettext.
2706         (x86_linux_dr_set): Likewise.
2707
2708 2015-03-24  Gary Benson  <gbenson@redhat.com>
2709
2710         * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
2711         (x86_linux_dr_set_addr): ...this.
2712         (x86_dr_low_get_addr): Rename to...
2713         (x86_linux_dr_get_addr): ...this.
2714         (x86_dr_low_set_control): Rename to...
2715         (x86_linux_dr_set_control): ...this.
2716         (x86_dr_low_get_control): Rename to...
2717         (x86_linux_dr_get_control): ...this.
2718         (x86_dr_low_get_status): Rename to...
2719         (x86_linux_dr_get_status): ...this.
2720         (x86_dr_low): Update with new function names.
2721
2722 2015-03-24  Gary Benson  <gbenson@redhat.com>
2723
2724         * Makefile.in (x86-linux.o): New rule.
2725         * configure.srv: Add x86-linux.o to relevant targets.
2726         * linux-low.c (lwp_set_arch_private_info): New function.
2727         (lwp_arch_private_info): Likewise.
2728         * linux-x86-low.c: Include nat/x86-linux.h.
2729         (arch_lwp_info): Removed structure.
2730         (update_debug_registers_callback):
2731         Use lwp_set_debug_registers_changed.
2732         (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
2733         and lwp_set_debug_registers_changed.
2734         (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
2735
2736 2015-03-24  Gary Benson  <gbenson@redhat.com>
2737
2738         * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
2739         * linux-arm-low.c (arm_new_thread): Likewise.
2740         * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
2741         * linux-mips-low.c (mips_linux_new_thread): Likewise.
2742         * linux-x86-low.c (x86_linux_new_thread): Likewise.
2743         * linux-low.c (add_lwp): Update the_low_target.new_thread call.
2744
2745 2015-03-24  Gary Benson  <gbenson@redhat.com>
2746
2747         * linux-low.c (ptid_of_lwp): New function.
2748         (lwp_is_stopped): Likewise.
2749         (lwp_stop_reason): Likewise.
2750         * linux-x86-low.c (update_debug_registers_callback):
2751         Use lwp_is_stopped.
2752         (x86_linux_prepare_to_resume): Use ptid_of_lwp and
2753         lwp_stop_reason.
2754
2755 2015-03-24  Gary Benson  <gbenson@redhat.com>
2756
2757         * linux-low.h (linux_stop_lwp): Remove declaration.
2758
2759 2015-03-24  Gary Benson  <gbenson@redhat.com>
2760
2761         * linux-low.h: Include nat/linux-nat.h.
2762         * linux-low.c (iterate_over_lwps_args): New structure.
2763         (iterate_over_lwps_filter): New function.
2764         (iterate_over_lwps): Likewise.
2765         * linux-x86-low.c (update_debug_registers_callback):
2766         Update signature to what iterate_over_lwps expects.
2767         Remove PID check that iterate_over_lwps now performs.
2768         (x86_dr_low_set_addr): Use iterate_over_lwps.
2769         (x86_dr_low_set_control): Likewise.
2770
2771 2015-03-24  Gary Benson  <gbenson@redhat.com>
2772
2773         * linux-x86-low.c (x86_debug_reg_state): New function.
2774         (x86_linux_prepare_to_resume): Use the above.
2775
2776 2015-03-24  Gary Benson  <gbenson@redhat.com>
2777
2778         * linux-low.c (current_lwp_ptid): New function.
2779         * linux-x86-low.c: Include nat/linux-nat.h.
2780         (x86_dr_low_get_addr): Use current_lwp_ptid.
2781         (x86_dr_low_get_control): Likewise.
2782         (x86_dr_low_get_status): Likewise.
2783
2784 2015-03-20  Pedro Alves  <palves@redhat.com>
2785
2786         * tracepoint.c (cmd_qtstatus): Make "str" const.
2787
2788 2015-03-20  Pedro Alves  <palves@redhat.com>
2789
2790         * server.c (handle_general_set): Make "req_str" const.
2791
2792 2015-03-19  Pedro Alves  <palves@redhat.com>
2793
2794         * linux-low.c (linux_resume_one_lwp): Rename to ...
2795         (linux_resume_one_lwp_throw): ... this.  Don't handle ESRCH here,
2796         instead call perror_with_name.
2797         (check_ptrace_stopped_lwp_gone): New function.
2798         (linux_resume_one_lwp): Reimplement as wrapper around
2799         linux_resume_one_lwp_throw that swallows errors if the LWP is
2800         gone.
2801
2802 2015-03-19  Pedro Alves  <palves@redhat.com>
2803
2804         * linux-low.c (count_events_callback, select_event_lwp_callback):
2805         No longer check whether the thread has resume_stop as last resume
2806         kind.
2807
2808 2015-03-19 Pedro Alves  <palves@redhat.com>
2809
2810         * linux-low.c (count_events_callback, select_event_lwp_callback):
2811         Use the lwp's status_pending_p field, not the thread's.
2812
2813 2015-03-19  Pedro Alves  <palves@redhat.com>
2814
2815         * linux-low.c (select_event_lwp_callback): Update comments to
2816         no longer mention SIGTRAP.
2817
2818 2015-03-18  Gary Benson  <gbenson@redhat.com>
2819
2820         * server.c (handle_query): Do not report vFile:fstat as supported.
2821
2822 2015-03-11  Gary Benson  <gbenson@redhat.com>
2823
2824         * hostio.c (sys/types.h): New include.
2825         (sys/stat.h): Likewise.
2826         (common-remote-fileio.h): Likewise.
2827         (handle_fstat): New function.
2828         (handle_vFile): Handle vFile:fstat packets.
2829
2830 2015-03-11  Gary Benson  <gbenson@redhat.com>
2831
2832         * configure.ac (AC_CHECK_MEMBERS): Add checks for
2833         struct stat.st_blocks and struct stat.st_blksize.
2834         * configure: Regenerate.
2835         * config.in: Likewise.
2836         * Makefile.in (SFILES): Add common/common-remote-fileio.c.
2837         (OBS): Add common-remote-fileio.o.
2838         (common-remote-fileio.o): New rule.
2839
2840 2015-03-09  Pedro Alves  <palves@redhat.com>
2841
2842         * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
2843         'struct sockaddr' pointer in 'accept' call.
2844
2845 2015-03-09  Pedro Alves  <palves@redhat.com>
2846
2847         Revert:
2848         2015-03-07  Pedro Alves  <palves@redhat.com>
2849         * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2850         or <winsock2.h> here.  Instead include "gdb_socket.h".
2851         (remote_open): Use union gdb_sockaddr_u.
2852         * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2853         or <winsock2.h> here.  Instead include "gdb_socket.h".
2854         (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2855         * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2856         or <sys/un.h>.
2857         (init_named_socket, gdb_agent_helper_thread): Use union
2858         gdb_sockaddr_u.
2859
2860 2015-03-07  Pedro Alves  <palves@redhat.com>
2861
2862         * configure.ac (build_warnings): Move
2863         -Wdeclaration-after-statement to the C-specific set.
2864         * configure: Regenerate.
2865
2866 2015-03-07  Pedro Alves  <palves@redhat.com>
2867
2868         * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2869         or <winsock2.h> here.  Instead include "gdb_socket.h".
2870         (remote_open): Use union gdb_sockaddr_u.
2871         * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2872         or <winsock2.h> here.  Instead include "gdb_socket.h".
2873         (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2874         * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2875         or <sys/un.h>.
2876         (init_named_socket, gdb_agent_helper_thread): Use union
2877         gdb_sockaddr_u.
2878
2879 2015-03-07  Pedro Alves  <palves@redhat.com>
2880
2881         Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
2882         instead.
2883
2884 2015-03-06  Yao Qi  <yao.qi@linaro.org>
2885
2886         * linux-aarch64-low.c (aarch64_insert_point): Use
2887         show_debug_regs as a boolean.
2888         (aarch64_remove_point): Likewise.
2889
2890 2015-03-05  Pedro Alves  <palves@redhat.com>
2891
2892         * lynx-low.c (lynx_target_ops): Install NULL hooks for
2893         stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2894         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
2895         * nto-low.c (nto_target_ops): Likewise.
2896         * spu-low.c (spu_target_ops): Likewise.
2897         * win32-low.c (win32_target_ops): Likewise.
2898
2899 2015-03-04  Pedro Alves  <palves@redhat.com>
2900
2901         * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
2902         Decide whether a breakpoint triggered based on the SIGTRAP's
2903         siginfo.si_code.
2904         (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
2905         breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
2906         (linux_low_filter_event): Check for breakpoints before checking
2907         watchpoints.
2908         (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
2909         siginfo.si_code.
2910         (linux_stopped_by_sw_breakpoint)
2911         (linux_supports_stopped_by_sw_breakpoint)
2912         (linux_stopped_by_hw_breakpoint)
2913         (linux_supports_stopped_by_hw_breakpoint): New functions.
2914         (linux_target_ops): Install new target methods.
2915
2916 2015-03-04  Pedro Alves  <palves@redhat.com>
2917
2918         * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
2919         * server.c (swbreak_feature, hwbreak_feature): New globals.
2920         (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
2921         (captured_main): Clear swbreak_feature and hwbreak_feature.
2922         * server.h (swbreak_feature, hwbreak_feature): Declare.
2923         * target.h (struct target_ops) <stopped_by_sw_breakpoint,
2924         supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
2925         supports_stopped_by_hw_breakpoint>: New fields.
2926         (target_supports_stopped_by_sw_breakpoint)
2927         (target_stopped_by_sw_breakpoint)
2928         (target_supports_stopped_by_hw_breakpoint)
2929         (target_stopped_by_hw_breakpoint): Declare.
2930
2931 2015-03-04  Pedro Alves  <palves@redhat.com>
2932
2933         enum lwp_stop_reason -> enum target_stop_reason
2934         * linux-low.c (check_stopped_by_breakpoint): Adjust.
2935         (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
2936         (linux_wait_1, stuck_in_jump_pad_callback)
2937         (move_out_of_jump_pad_callback, linux_resume_one_lwp)
2938         (linux_stopped_by_watchpoint):
2939         * linux-low.h (enum lwp_stop_reason): Delete.
2940         (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
2941         * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2942
2943 2015-03-04  Yao Qi  <yao.qi@linaro.org>
2944
2945         * Makefile.in (SFILES): Add linux-aarch64-low.c.
2946
2947 2015-03-03  Gary Benson  <gbenson@redhat.com>
2948
2949         * hostio.c (handle_vFile): Fix prefix lengths.
2950
2951 2015-03-03  Markus Metzger  <markus.t.metzger@intel.com>
2952
2953         * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
2954         ptr_bits.
2955
2956 2015-03-02  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2957
2958         * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
2959         (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
2960         (clean): Add "rm -f" for above C files.
2961         * configure.srv (srv_regobj): Add s390-vx-linux64.o,
2962         s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
2963         (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
2964         s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
2965         * linux-s390-low.c (HWCAP_S390_VX): New macro.
2966         (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
2967         (init_registers_s390x_vx_linux64)
2968         (init_registers_s390x_tevx_linux64)
2969         (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
2970         (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
2971         declarations.
2972         (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
2973         (s390_store_vxrs_high): New functions.
2974         (s390_regsets): Add entries for NT_S390_VXRS_LOW and
2975         NT_S390_VXRS_HIGH.
2976         (s390_arch_setup): Add logic for selecting one of the new target
2977         descriptions.  Activate the new vector regsets if applicable.
2978         (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
2979         init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
2980         and init_registers_s390x_tevx_linux64.
2981
2982 2015-03-01  Pedro Alves  <palves@redhat.com>
2983
2984         * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
2985         parameter.
2986
2987 2015-02-27  Pedro Alves  <palves@redhat.com>
2988
2989         * linux-x86-low.c (u_debugreg_offset): New function.
2990         (x86_linux_dr_get, x86_linux_dr_set): Use it.
2991
2992 2015-02-27  Pedro Alves  <palves@redhat.com>
2993
2994         * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
2995         [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
2996         [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
2997         ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2998         (ps_lsetfpregs, ps_getpid)
2999         (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
3000         (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
3001         (ps_lsetxregs, ps_plog): Declare.
3002
3003 2015-02-27  Pedro Alves  <palves@redhat.com>
3004
3005         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
3006         IP_AGENT_EXPORT_FUNC.
3007         * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
3008         IP_AGENT_EXPORT_FUNC.
3009         * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
3010         (IP_AGENT_EXPORT): Delete.
3011         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3012         (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3013         (gdb_trampoline_buffer_error, collecting, gdb_collect)
3014         (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
3015         (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
3016         (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
3017         (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
3018         (traceframe_read_count, traceframe_write_count)
3019         (traceframes_created, trace_state_variables, get_raw_reg)
3020         (get_trace_state_variable_value, set_trace_state_variable_value)
3021         (ust_loaded, helper_thread_id, cmd_buf): Use
3022         IPA_SYM_EXPORTED_NAME.
3023         (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
3024         (tracepoints) Use IP_AGENT_EXPORT_VAR.
3025         (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
3026         IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3027         (last_tracepoint): Move into !IN_PROCESS_AGENT block.
3028         (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
3029         EXTERN_C_PUSH/EXTERN_C_POP.
3030         (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
3031         (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
3032         wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3033         (trace_buffer_ctrl, trace_buffer_ctrl_curr)
3034         (traceframe_write_count, traceframe_read_count)
3035         (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
3036         (about_to_request_buffer_space, get_trace_state_variable_value)
3037         (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
3038         (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
3039         EXTERN_C_PUSH/EXTERN_C_POP.
3040         (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
3041         (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
3042         (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
3043         and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3044         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3045         (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3046         (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
3047         * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
3048         Define.
3049         (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
3050         (IP_AGENT_EXPORT_VAR_DECL): Define.
3051         (tracing): Declare.
3052         (gdb_agent_get_raw_reg): Declare.
3053
3054 2015-02-27  Tom Tromey  <tromey@redhat.com>
3055             Pedro Alves  <palves@redhat.com>
3056
3057         Rename symbols whose names are reserved C++ keywords throughout.
3058
3059 2015-02-27  Pedro Alves  <palves@redhat.com>
3060
3061         * Makefile.in (COMPILER): New, get it from autoconf.
3062         (CXX): Get from autoconf instead.
3063         (COMPILE.pre): Use COMPILER.
3064         (CC-LD): Rename to ...
3065         (CC_LD): ... this.  Use COMPILER.
3066         (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
3067         (CXX_FOR_TARGET): Default to g++ instead of gcc.
3068         * acinclude.m4: Include build-with-cxx.m4.
3069         * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
3070         Disable -Werror by default if building in C++ mode.
3071         (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
3072         -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
3073         the C++ compiler.  Save/restore CXXFLAGS too.
3074         * configure: Regenerate.
3075
3076 2015-02-27  Pedro Alves  <palves@redhat.com>
3077
3078         * acinclude.m4: Include libiberty.m4.
3079         * configure.ac: Call libiberty_INIT.
3080         * config.in, configure: Regenerate.
3081
3082 2015-02-26  Pedro Alves  <palves@redhat.com>
3083
3084         * linux-low.c (linux_wait_1): When incrementing the PC past a
3085         program breakpoint always use the_low_target.breakpoint_len as
3086         increment, rather than the maximum between that and
3087         the_low_target.decr_pc_after_break.
3088
3089 2015-02-23  Pedro Alves  <palves@redhat.com>
3090
3091         * linux-low.c (check_stopped_by_breakpoint): Don't check if the
3092         thread was doing a step-over; always adjust the PC if
3093         we stepped over a permanent breakpoint.
3094         (linux_wait_1): If we stepped over breakpoint that was on top of a
3095         permanent breakpoint, manually advance the PC past it.
3096
3097 2015-02-23  Pedro Alves  <palves@redhat.com>
3098
3099         * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
3100         modes.
3101         (x86_fill_gregset, x86_store_gregset): Use it when handling
3102         $orig_eax.
3103
3104 2015-02-20  Pedro Alves  <palves@redhat.com>
3105
3106         * thread-db.c: Include "nat/linux-procfs.h".
3107         (thread_db_init): Skip listing new threads if the kernel supports
3108         PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
3109
3110 2015-02-20  Pedro Alves  <palves@redhat.com>
3111
3112         * linux-low.c (status_pending_p_callback): Use ptid_match.
3113
3114 2015-02-19  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3115
3116         PR breakpoints/16812
3117         * linux-low.c (wstatus_maybe_breakpoint): Remove.
3118         (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
3119         (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
3120
3121 2015-02-10  Antoine Tremblay <antoine.tremblay@ericsson.com>
3122
3123         PR breakpoints/15956
3124         * tracepoint.c (cmd_qtinit): Add check for current_thread.
3125
3126 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
3127
3128         * linux-low.c (linux_low_btrace_conf): Print size.
3129         * server.c (handle_btrace_conf_general_set): New.
3130         (hanle_general_set): Call handle_btrace_conf_general_set.
3131         (handle_query): Report Qbtrace-conf:bts:size as supported.
3132
3133 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
3134
3135         * linux-low.c (linux_low_enable_btrace): Update parameters.
3136         (linux_low_btrace_conf): New.
3137         (linux_target_ops)<to_btrace_conf>: Initialize.
3138         * server.c (current_btrace_conf): New.
3139         (handle_btrace_enable): Rename to ...
3140         (handle_btrace_enable_bts): ... this.  Pass &current_btrace_conf
3141         to target_enable_btrace.  Update comment.  Update users.
3142         (handle_qxfer_btrace_conf): New.
3143         (qxfer_packets): Add btrace-conf entry.
3144         (handle_query): Report qXfer:btrace-conf:read as supported packet.
3145         * target.h (target_ops)<enable_btrace>: Update parameters and comment.
3146         (target_ops)<read_btrace_conf>: New.
3147         (target_enable_btrace): Update parameters.
3148         (target_read_btrace_conf): New.
3149
3150 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
3151
3152         * server.c (handle_btrace_general_set): Remove call to
3153         target_supports_btrace.
3154         (supported_btrace_packets): New.
3155         (handle_query): Call supported_btrace_packets.
3156         * target.h: include btrace-common.h.
3157         (btrace_target_info): Removed.
3158         (supports_btrace, target_supports_btrace): Update parameters.
3159
3160 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
3161
3162         * Makefile.in (SFILES): Add common/btrace-common.c.
3163         (OBS): Add common/btrace-common.o.
3164         (btrace-common.o): Add build rules.
3165         * linux-low: Include btrace-common.h.
3166         (linux_low_read_btrace): Use struct btrace_data.  Call
3167         btrace_data_init and btrace_data_fini.
3168
3169 2015-02-06  Pedro Alves  <palves@redhat.com>
3170
3171         * thread-db.c (find_new_threads_callback): Add debug output.
3172
3173 2015-02-04  Pedro Alves  <palves@redhat.com>
3174
3175         * linux-low.c (handle_extended_wait): Don't resume LWPs here.
3176         (resume_stopped_resumed_lwps): New function.
3177         (linux_wait_for_event_filtered): Use it.
3178
3179 2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
3180
3181         * Makefile.in (SFILES): Add linux-personality.c.
3182         (linux-personality.o): New rule.
3183         * configure.srv (srv_linux_obj): Add linux-personality.o to the
3184         list of objects to be built.
3185         * linux-low.c: Include nat/linux-personality.h.
3186         (linux_create_inferior): Remove code to disable address space
3187         randomization (moved to ../nat/linux-personality.c).  Create
3188         cleanup to disable address space randomization.
3189
3190 2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
3191
3192         * Makefile.in (posix-strerror.o): New rule.
3193         (mingw-strerror.o): Likewise.
3194         * configure: Regenerated.
3195         * configure.ac: Source file ../common/common.host.  Initialize new
3196         variable srv_host_obs.  Add srv_host_obs to GDBSERVER_DEPFILES.
3197
3198 2015-01-14  Yao Qi  <yao@codesourcery.com>
3199
3200         * Makefile.in (SFILES): Add nat/ppc-linux.c.
3201         (ppc-linux.o): New rule.
3202         * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
3203         * configure.ac: AC_CHECK_FUNCS(getauxval).
3204         * config.in: Re-generated.
3205         * configure: Re-generated.
3206         * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
3207         ppc64_64bit_inferior_p
3208
3209 2015-01-14  Yao Qi  <yao@codesourcery.com>
3210
3211         * linux-ppc-low.c: Include "nat/ppc-linux.h".
3212          (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
3213         (PPC_FEATURE_HAS_ALTIVEC,  PPC_FEATURE_HAS_SPE): Likewise.
3214         (PT_ORIG_R3, PT_TRAP): Likewise.
3215         (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
3216         (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
3217         (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
3218
3219 2015-01-10  Joel Brobecker  <brobecker@adacore.com>
3220
3221         * i387-fp.c (i387_cache_to_xsave): In look over
3222         num_avx512_zmmh_high_registers, replace use of struct i387_xsave
3223         zmmh_low_space field by use of zmmh_high_space.
3224
3225 2015-01-09  Pedro Alves  <palves@redhat.com>
3226
3227         * linux-low.c (step_over_bkpt): Move higher up in the file.
3228         (handle_extended_wait): Don't store the stop_pc here.
3229         (get_stop_pc): Adjust comments and rename to ...
3230         (check_stopped_by_breakpoint): ... this.  Record whether the LWP
3231         stopped for a software breakpoint or hardware breakpoint.
3232         (thread_still_has_status_pending_p): New function.
3233         (status_pending_p_callback): Use
3234         thread_still_has_status_pending_p.  If the event is no longer
3235         interesting, resume the LWP.
3236         (handle_tracepoints): Add assert.
3237         (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
3238         (wstatus_maybe_breakpoint): New function.
3239         (cancel_breakpoint): Delete function.
3240         (check_stopped_by_watchpoint): New function, factored out from
3241         linux_low_filter_event.
3242         (lp_status_maybe_breakpoint): Delete function.
3243         (linux_low_filter_event): Remove filter_ptid argument.
3244         Leave thread group exits pending here.  Store the LWP's stop PC.
3245         Always leave events pending.
3246         (linux_wait_for_event_filtered): Pull all events out of the
3247         kernel, and leave them all pending.
3248         (count_events_callback, select_event_lwp_callback): Consider all
3249         events.
3250         (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
3251         (select_event_lwp): Only give preference to the stepping LWP in
3252         all-stop mode.  Adjust comments.
3253         (ignore_event): New function.
3254         (linux_wait_1): Delete 'retry' label.  Use ignore_event.  Remove
3255         references to cancel_breakpoints.  Adjust to renames.  Also give
3256         equal priority to all LWPs that have had events in non-stop mode.
3257         If reporting a software breakpoint event, unadjust the LWP's PC.
3258         (linux_wait): If linux_wait_1 returned an ignored event, retry.
3259         (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
3260         Adjust.
3261         (linux_resume_one_lwp): Store the LWP's PC.  Adjust.
3262         (resume_status_pending_p): Use thread_still_has_status_pending_p.
3263         (linux_stopped_by_watchpoint): Adjust.
3264         (linux_target_ops): Remove reference to linux_cancel_breakpoints.
3265         * linux-low.h (enum lwp_stop_reason): New.
3266         (struct lwp_info) <stop_pc>: Adjust comment.
3267         <stopped_by_watchpoint>: Delete field.
3268         <stop_reason>: New field.
3269         * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3270         * mem-break.c (software_breakpoint_inserted_here)
3271         (hardware_breakpoint_inserted_here): New function.
3272         * mem-break.h (software_breakpoint_inserted_here)
3273         (hardware_breakpoint_inserted_here): Declare.
3274         * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
3275         (cancel_breakpoints): Delete.
3276         * tracepoint.c (clear_installed_tracepoints, stop_tracing)
3277         (upload_fast_traceframes): Remove references to
3278         cancel_breakpoints.
3279
3280 2015-01-09  Pedro Alves  <palves@redhat.com>
3281
3282         * thread-db.c (find_new_threads_callback): Ignore thread if the
3283         kernel thread ID is -1.
3284
3285 2015-01-09  Pedro Alves  <palves@redhat.com>
3286
3287         * linux-low.c (linux_attach_fail_reason_string): Move to
3288         nat/linux-ptrace.c, and rename.
3289         (linux_attach_lwp): Update comment.
3290         (attach_proc_task_lwp_callback): New function.
3291         (linux_attach): Adjust to rename and use
3292         linux_proc_attach_tgid_threads.
3293         (linux_attach_fail_reason_string): Delete declaration.
3294
3295 2015-01-01  Joel Brobecker  <brobecker@adacore.com>
3296
3297         * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
3298         * server.c (gdbserver_version): Likewise.
3299
3300 2014-12-29  Sergio Durigan Junior  <sergiodj@redhat.com>
3301
3302         * remote-utils.c: Include ctype.h.
3303         (input_interrupt): Explicitly handle the case when the char
3304         received is the NUL byte.  Improve the printing of non-ASCII
3305         characters.
3306
3307 2014-12-16  Joel Brobecker  <brobecker@adacore.com>
3308
3309         * linux-low.c (linux_low_filter_event): Update call to
3310         linux_enable_event_reporting following the addition of
3311         a new parameter to that function.
3312
3313 2014-12-16  Catalin Udma  <catalin.udma@freescale.com>
3314
3315         PR server/17457
3316         * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
3317         (AARCH64_FPCR_REGNO): Likewise.
3318         (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
3319         (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
3320         (aarch64_store_fpregset): Likewise.
3321
3322 2014-12-15  Joel Brobecker  <brobecker@adacore.com>
3323
3324         * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
3325         Remove FIXME comment about assumption about N.
3326
3327 2014-12-13  Joel Brobecker  <brobecker@adacore.com>
3328
3329         * configure.ac: If large-file support is disabled in GDBserver,
3330         pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
3331         * configure: Regenerate.
3332
3333 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3334
3335         * linux-low.c (regsets_fetch_inferior_registers): Suppress the
3336         warning upon ENODATA from ptrace.
3337         * linux-s390-low.c (s390_store_tdb): New.
3338         (s390_regsets): Add regset for NT_S390_TDB.
3339
3340 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3341
3342         * linux-low.c (regsets_store_inferior_registers): Skip regsets
3343         without a fill_function.
3344         * linux-s390-low.c (s390_fill_last_break): Remove.
3345         (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
3346         (s390_arch_setup): Use regset's size instead of fill_function for
3347         loop end condition.
3348
3349 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3350
3351         * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
3352         the regset's store function when ptrace returned an error.
3353         * regcache.c (get_thread_regcache): Invalidate register cache
3354         before fetching inferior's registers.
3355
3356 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3357
3358         * linux-low.c (regsets_fetch_inferior_registers): Rephrase
3359         while-loop as for-loop.
3360         (regsets_store_inferior_registers): Likewise.
3361
3362 2014-11-28  Yao Qi  <yao@codesourcery.com>
3363
3364         * configure.ac(AC_CHECK_FUNCS): Remove readlink.
3365         * config.in, configure: Re-generate.
3366         * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
3367         is defined.
3368
3369 2014-11-21  Yao Qi  <yao@codesourcery.com>
3370
3371         * configure.ac: Don't invoke AC_FUNC_ALLOCA.
3372         (AC_CHECK_HEADERS): Remove malloc.h.
3373         * configure: Re-generated.
3374         * config.in: Re-generated.
3375         * server.h: Don't include alloca.h and malloc.h.
3376         * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
3377         Don't include malloc.h.
3378
3379 2014-11-17  Joel Brobecker  <brobecker@adacore.com>
3380
3381         * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
3382         corresponding ERRNO check in same block.
3383
3384 2014-11-12  Pedro Alves  <palves@redhat.com>
3385
3386         * server.c (cont_thread): Update comment.
3387         (start_inferior, attach_inferior): No longer clear cont_thread.
3388         (handle_v_cont): No longer set cont_thread.
3389         (captured_main): Clear cont_thread each time a GDB connects.
3390
3391 2014-11-12  Pedro Alves  <palves@redhat.com>
3392
3393         * linux-low.c (linux_wait_1): Don't force a wait for the Hc
3394         thread, and don't resume all threads if the Hc thread has exited.
3395
3396 2014-11-12  Pedro Alves  <palves@redhat.com>
3397
3398         * linux-low.c (linux_request_interrupt): Always send a SIGINT to
3399         the process group instead of to a specific LWP.
3400
3401 2014-10-15  Pedro Alves  <palves@redhat.com>
3402
3403         PR server/17487
3404         * win32-arm-low.c (arm_set_thread_context): Remove current_event
3405         parameter.
3406         (arm_set_thread_context): Delete.
3407         (the_low_target): Adjust.
3408         * win32-i386-low.c (debug_registers_changed)
3409         (debug_registers_used): Delete.
3410         (update_debug_registers_callback): New function.
3411         (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
3412         needing to update their debug registers.
3413         (win32_get_current_dr): New function.
3414         (x86_dr_low_get_addr, x86_dr_low_get_control)
3415         (x86_dr_low_get_status): Fetch the debug register from the thread
3416         record's context.
3417         (i386_initial_stuff): Adjust.
3418         (i386_get_thread_context): Remove current_event parameter.  Don't
3419         clear debug_registers_changed nor copy DR values to
3420         debug_reg_state.
3421         (i386_set_thread_context): Delete.
3422         (i386_prepare_to_resume): New function.
3423         (i386_thread_added): Mark the thread as needing to update irs
3424         debug registers.
3425         (the_low_target): Remove i386_set_thread_context and install
3426         i386_prepare_to_resume.
3427         * win32-low.c (win32_get_thread_context): Adjust.
3428         (win32_set_thread_context): Use SetThreadContext
3429         directly.
3430         (win32_prepare_to_resume): New function.
3431         (win32_require_context): New function, factored out from ...
3432         (thread_rec): ... this.
3433         (continue_one_thread): Call win32_prepare_to_resume on each thread
3434         we're about to continue.
3435         (win32_resume): Call win32_prepare_to_resume on the event thread.
3436         * win32-low.h (struct win32_thread_info)
3437         <debug_registers_changed>: New field.
3438         (struct win32_target_ops): Change prototype of set_thread_context,
3439         delete set_thread_context and add prepare_to_resume.
3440         (win32_require_context): New declaration.
3441
3442 2014-10-08  Gary Benson  <gbenson@redhat.com>
3443
3444         * server.h: Do not include common-exceptions.h.
3445
3446 2014-10-08  Gary Benson  <gbenson@redhat.com>
3447
3448         * server.h: Do not include cleanups.h.
3449
3450 2014-09-30  James Hogan  <james.hogan@imgtec.com>
3451
3452         * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
3453         mips64-dsp-linux.c.
3454
3455 2014-09-23  Yao Qi  <yao@codesourcery.com>
3456
3457         * linux-low.c (lp_status_maybe_breakpoint): New function.
3458         (linux_low_filter_event): Call lp_status_maybe_breakpoint.
3459         (count_events_callback): Likewise.
3460         (select_event_lwp_callback): Likewise.
3461         (cancel_breakpoints_callback): Likewise.
3462
3463 2014-09-19  Don Breazeal  <donb@codesourcery.com>
3464
3465         * linux-low.c (handle_extended_wait): Call
3466         linux_ptrace_get_extended_event.
3467         (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
3468         linux_is_extended_waitstatus.
3469
3470 2014-09-16  Joel Brobecker  <brobecker@adacore.com>
3471
3472         * Makefile.in (CPPFLAGS): Define.
3473         (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
3474         (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
3475
3476 2014-09-16  Gary Benson  <gbenson@redhat.com>
3477
3478         * inferiors.h (current_inferior): Renamed as...
3479         (current_thread): New variable.  All uses updated.
3480         * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
3481         (maybe_move_out_of_jump_pad): Likewise.
3482         (cancel_breakpoint): Likewise.
3483         (linux_low_filter_event): Likewise.
3484         (wait_for_sigstop): Likewise.
3485         (linux_resume_one_lwp): Likewise.
3486         (need_step_over_p): Likewise.
3487         (start_step_over): Likewise.
3488         (linux_stabilize_threads): Renamed save_inferior as saved_thread.
3489         * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
3490         * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
3491         and save_inferior as saved_thread.
3492         * regcache.c (get_thread_regcache): Renamed saved_inferior as
3493         saved_thread.
3494         (regcache_invalidate_thread): Likewise.
3495         * remote-utils.c (prepare_resume_reply): Likewise.
3496         * thread-db.c (thread_db_get_tls_address): Likewise.
3497         (disable_thread_event_reporting): Likewise.
3498         (remove_thread_event_breakpoints): Likewise.
3499         * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
3500         as saved_thread.
3501         * target.h (set_desired_inferior): Renamed as...
3502         (set_desired_thread): New declaration.  All uses updated.
3503         * server.c (myresume): Updated comment to reference thread instead
3504         of inferior.
3505         (handle_serial_event): Likewise.
3506         (handle_target_event): Likewise.
3507
3508 2014-09-12  Tom Tromey  <tromey@redhat.com>
3509             Gary Benson  <gbenson@redhat.com>
3510
3511         * regcache.h: Include common-regcache.h.
3512         (regcache_read_pc): Don't declare.
3513         * regcache.c (get_thread_regcache_for_ptid): New function.
3514
3515 2014-09-11  Tom Tromey  <tromey@redhat.com>
3516             Gary Benson  <gbenson@redhat.com>
3517
3518         * symbol.c: New file.
3519         * Makefile.in (SFILES): Add symbol.c.
3520         (OBS): Add symbol.o.
3521
3522 2014-09-11  Gary Benson  <gbenson@redhat.com>
3523
3524         * target.c (target_stop_ptid, target_continue_ptid): New
3525         functions.
3526
3527 2014-09-11  Tom Tromey  <tromey@redhat.com>
3528             Gary Benson  <gbenson@redhat.com>
3529
3530         * target.h: Include target/target.h.
3531         * target.c (target_read_memory, target_read_uint32)
3532         (target_write_memory): New functions.
3533
3534 2014-09-11  Gary Benson  <gbenson@redhat.com>
3535
3536         * server.h (debug_hw_points): Don't declare.
3537         * server.c (debug_hw_points): Don't define.  Replace all uses
3538         with show_debug_regs.
3539         * linux-aarch64-low.c (debug_hw_points): Don't define.  Replace
3540         all uses with show_debug_regs.
3541
3542 2014-09-08  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
3543
3544         * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
3545         endianness into account.
3546         (ppc_supply_ptrace_register): Likewise.
3547
3548 2014-09-03  James Hogan  <james.hogan@imgtec.com>
3549
3550         * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
3551         to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
3552
3553 2014-09-03  Gary Benson  <gbenson@redhat.com>
3554
3555         * linux-x86-low.c (x86_linux_prepare_to_resume): Use
3556         ALL_DEBUG_ADDRESS_REGISTERS.
3557
3558 2014-09-02  Gary Benson  <gbenson@redhat.com>
3559
3560         * i386-low.h: Renamed as...
3561         * x86-low.h: New file.  All type, function and variable name
3562         prefixes changed from "i386_" to "x86_".  All references updated.
3563         * i386-low.c: Renamed as...
3564         * x86-low.c: New file.  All type, function and variable name
3565         prefixes changed from "i386_" to "x86_".  All references updated.
3566
3567 2014-09-02  Gary Benson  <gbenson@redhat.com>
3568
3569         * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
3570         (x86_linux_new_thread): Likewise.
3571
3572 2014-08-29  Gary Benson  <gbenson@redhat.com>
3573
3574         * server.h (setjmp.h): Do not include.
3575         (toplevel): Do not declare.
3576         (common-exceptions.h): Include.
3577         (cleanups.h): Likewise.
3578         * server.c (toplevel): Do not define.
3579         (exit_code): New static global.
3580         (detach_or_kill_for_exit_cleanup): New function.
3581         (main): New function.  Original main renamed to...
3582         (captured_main): New function.
3583         * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
3584
3585 2014-08-29  Gary Benson  <gbenson@redhat.com>
3586
3587         * Makefile.in (SFILES): Add common/common-exceptions.c.
3588         (OBS): Add common-exceptions.o.
3589         (common-exceptions.o): New rule.
3590         * utils.c (prepare_to_throw_exception): New function.
3591
3592 2014-08-29  Gary Benson  <gbenson@redhat.com>
3593
3594         * config.in: Regenerate.
3595         * configure: Likewise.
3596
3597 2014-08-29  Gary Benson  <gbenson@redhat.com>
3598
3599         * Makefile.in (SFILES): Add common/cleanups.c.
3600         (OBS): cleanups.o.
3601         (cleanups.o): New rule.
3602
3603 2014-08-29  Gary Benson  <gbenson@redhat.com>
3604
3605         * utils.c (internal_vwarning): New function.
3606
3607 2014-08-28  Gary Benson  <gbenson@redhat.com>
3608
3609         * utils.h (fatal): Remove declaration.
3610         * utils.c (fatal): Remove function.
3611
3612 2014-08-28  Gary Benson  <gbenson@redhat.com>
3613
3614         * tracepoint.c (gdb_agent_init): Replace fatal with
3615         perror_with_name.
3616         (initialize_tracepoint): Likewise.
3617
3618 2014-08-28  Gary Benson  <gbenson@redhat.com>
3619
3620         * remote-utils.c (remote_prepare): Replace fatal with error.
3621
3622 2014-08-28  Gary Benson  <gbenson@redhat.com>
3623
3624         * linux-low.c (linux_async): Replace fatal with warning.
3625         Tidy up and return.
3626         (linux_start_non_stop): Return -1 if linux_async failed.
3627
3628 2014-08-28  Gary Benson  <gbenson@redhat.com>
3629
3630         * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
3631         gdb_assert.
3632         (i386_dr_low_get_addr): Remove vague comment.
3633         * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
3634         gdb_assert.
3635
3636 2014-08-28  Gary Benson  <gbenson@redhat.com>
3637
3638         * inferiors.c (get_thread_process): Replace check with gdb_assert.
3639         * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
3640         internal_error.
3641         (linux_resume_one_lwp): Likewise.
3642         * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
3643         gdb_assert.
3644         * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
3645         with internal_error.
3646         * regcache.c (get_thread_regcache): Replace check with gdb_assert.
3647         (init_register_cache): Replace fatal with gdb_assert_not_reached.
3648         (find_register_by_name): Replace fatal with internal_error.
3649         (find_regno): Likewise.
3650         * tdesc.c (init_target_desc): Replace check with gdb_assert.
3651         * thread-db.c (thread_db_create_event): Likewise.
3652         (thread_db_load_search): Likewise.
3653         (try_thread_db_load_1): Likewise.
3654         * tracepoint.c (get_jump_space_head): Replace fatal with
3655         internal_error.
3656         (claim_trampoline_space): Likewise.
3657         (have_fast_tracepoint_trampoline_buffer): Likewise.
3658         (cmd_qtstart): Likewise.
3659         (stop_tracing): Likewise.
3660         (fast_tracepoint_collecting): Likewise.
3661         (target_malloc): Likewise.
3662         (download_tracepoint): Likewise.
3663         (download_trace_state_variables): Replace check with gdb_assert.
3664         (upload_fast_traceframes): Replace fatal with internal_error.
3665
3666 2014-08-19  Tom Tromey  <tromey@redhat.com>
3667             Gary Benson  <gbenson@redhat.com>
3668
3669         * Makefile.in (SFILES): Add common/common-debug.c.
3670         (OBS): Add common-debug.o.
3671         (common-debug.o): New rule.
3672         * debug.h (debug_printf): Don't declare.
3673         * debug.c (debug_printf): Renamed and rewritten as...
3674         (debug_vprintf): New function.
3675
3676 2014-08-19  Gary Benson  <gbenson@redhat.com>
3677
3678         * utils.h: Do not include print-utils.h.
3679
3680 2014-08-19  Tom Tromey  <tromey@redhat.com>
3681             Gary Benson  <gbenson@redhat.com>
3682
3683         * server.h: Add static assertion.
3684         (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
3685
3686 2014-08-19  Tom Tromey  <tromey@redhat.com>
3687             Gary Benson  <gbenson@redhat.com>
3688
3689         * Makefile.in (SFILES): Add common/errors.c.
3690         (OBS): Add errors.o.
3691         (IPA_OBS): Add errors-ipa.o.
3692         (errors.o): New rule.
3693         (errors-ipa.o): Likewise.
3694         * utils.h (perror_with_name, error, warning): Don't declare.
3695         * utils.c (warning): Renamed and rewritten as...
3696         (vwarning): New function.
3697         (error): Renamed and rewritten as...
3698         (verror): New function.
3699         (internal_error): Renamed and rewritten as...
3700         (internal_verror): New function.
3701
3702 2014-08-07  Gary Benson  <gbenson@redhat.com>
3703
3704         * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
3705         * configure: Regenerate.
3706         * config.in: Likewise.
3707         * server.h: Do not include errno.h.
3708         * event-loop.c: Likewise.
3709         * hostio-errno.c: Likewise.
3710         * linux-low.c: Likewise.
3711         * remote-utils.c: Likewise.
3712         * spu-low.c: Likewise.
3713         * utils.c: Likewise.
3714         * gdbreplay.c: Unconditionally include errno.h.
3715
3716 2014-08-07  Gary Benson  <gbenson@redhat.com>
3717
3718         * server.h: Do not include string.h.
3719         * event-loop.c: Likewise.
3720         * linux-low.c: Likewise.
3721         * regcache.c: Likewise.
3722         * remote-utils.c: Likewise.
3723         * spu-low.c: Likewise.
3724         * utils.c: Likewise.
3725
3726 2014-08-07  Gary Benson  <gbenson@redhat.com>
3727
3728         * server.h: Do not include gdb_assert.h.
3729
3730 2014-08-07  Gary Benson  <gbenson@redhat.com>
3731
3732         * server.h: Do not include common-utils.h.
3733
3734 2014-08-07  Gary Benson  <gbenson@redhat.com>
3735
3736         * server.h: Do not include ptid.h.
3737         * notif.h: Likewise.
3738
3739 2014-08-07  Gary Benson  <gbenson@redhat.com>
3740
3741         * server.h: Do not include gdb_locale.h.
3742
3743 2014-08-07  Gary Benson  <gbenson@redhat.com>
3744
3745         * server.h: Do not include gdb/signals.h.
3746         * win32-low.c: Likewise.
3747
3748 2014-08-07  Gary Benson  <gbenson@redhat.com>
3749
3750         * server.h: Do not include pathmax.h.
3751
3752 2014-08-07  Gary Benson  <gbenson@redhat.com>
3753
3754         * server.h: Do not include libiberty.h.
3755         * linux-bfin-low.c: Likewise.
3756
3757 2014-08-07  Gary Benson  <gbenson@redhat.com>
3758
3759         * server.h: Do not include ansidecl.h.
3760
3761 2014-08-07  Gary Benson  <gbenson@redhat.com>
3762
3763         * linux-x86-low.c: Do not include stddef.h.
3764         * lynx-ppc-low.c: Likewise.
3765         * tracepoint.c: Likewise.
3766
3767 2014-08-07  Gary Benson  <gbenson@redhat.com>
3768
3769         * server.h: Do not include stdarg.h.
3770         * nto-low.c: Likewise.
3771
3772 2014-08-07  Gary Benson  <gbenson@redhat.com>
3773
3774         * server.h: Do not include stdlib.h.
3775         * inferiors.c: Likewise.
3776         * linux-low.c: Likewise.
3777         * regcache.c: Likewise.
3778         * spu-low.c: Likewise.
3779         * tracepoint.c: Likewise.
3780         * utils.c: Likewise.
3781
3782 2014-08-07  Gary Benson  <gbenson@redhat.com>
3783
3784         * server.h: Do not include stdio.h.
3785         * linux-low.c: Likewise.
3786         * remote-utils.c: Likewise.
3787         * spu-low.c: Likewise.
3788         * utils.c: Likewise.
3789         * wincecompat.c: Likewise.
3790
3791 2014-08-06  Gary Benson  <gbenson@redhat.com>
3792
3793         * regcache.c (init_register_cache): Move conditionals inside if.
3794
3795 2014-08-06  Gary Benson  <gbenson@redhat.com>
3796
3797         * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
3798
3799 2014-07-31  Gary Benson  <gbenson@redhat.com>
3800
3801         * ax.h: Do not include server.h.
3802         * gdbthread.h: Likewise.
3803         * lynx-low.h: Likewise.
3804         * notif.h: Likewise.
3805
3806 2014-07-30  Gary Benson  <gbenson@redhat.com>
3807
3808         * server.h: Include common-defs.h.
3809         Do not include config.h or build-gnulib-gdbserver/config.h.
3810
3811 2014-07-30  Gary Benson  <gbenson@redhat.com>
3812
3813         * hostio-errno.c: Move server.h to top of includes list.
3814         * inferiors.c: Likewise.
3815         * linux-x86-low.c: Likewise.
3816         * notif.c: Include server.h.
3817
3818 2014-07-24  Tom Tromey  <tromey@redhat.com>
3819             Gary Benson  <gbenson@redhat.com>
3820
3821         * server.h (CORE_ADDR): Now unsigned.
3822
3823 2014-07-16  Pedro Alves  <palves@redhat.com>
3824
3825         * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
3826
3827 2014-07-15  Pedro Alves  <palves@redhat.com>
3828
3829         * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
3830         copy.
3831
3832 2014-07-11  Pedro Alves  <palves@redhat.com>
3833
3834         * linux-low.c (kill_wait_lwp): New function, based on
3835         kill_one_lwp_callback, but use my_waitpid directly.
3836         (kill_one_lwp_callback, linux_kill): Use it.
3837
3838 2014-06-23  Pedro Alves  <palves@redhat.com>
3839
3840         * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
3841         before setting DR0..DR3.
3842
3843 2014-06-20  Gary Benson  <gbenson@redhat.com>
3844
3845         * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
3846         * configure: Regenerated.
3847         * config.in: Likewise.
3848
3849 2014-06-20  Gary Benson  <gbenson@redhat.com>
3850
3851         * Makefile.in (SFILES): Update locations for files moved
3852         from common to nat.
3853         (object file files): Reordered.
3854
3855 2014-06-20  Gary Benson  <gbenson@redhat.com>
3856
3857         * i386-low.h (i386_dr_low_can_set_addr): Removed.
3858         (i386_dr_low_set_addr): Likewise.
3859         (i386_dr_low_get_addr): Likewise.
3860         (i386_dr_low_can_set_control): Likewise.
3861         (i386_dr_low_set_control): Likewise.
3862         (i386_dr_low_get_control): Likewise.
3863         (i386_dr_low_get_status): Likewise.
3864         (i386_get_debug_register_length): Likewise.
3865         * linux-x86-low.c (i386_dr_low_set_addr):
3866         Changed signature.  Made static.
3867         (i386_dr_low_get_addr): Likewise.
3868         (i386_dr_low_set_control): Likewise.
3869         (i386_dr_low_get_control): Likewise.
3870         (i386_dr_low_get_status): Likewise.
3871         (i386_dr_low): New global variable.
3872         * win32-i386-low.c (i386_dr_low_set_addr):
3873         Changed signature.  Made static.
3874         (i386_dr_low_get_addr): Likewise.
3875         (i386_dr_low_set_control): Likewise.
3876         (i386_dr_low_get_control): Likewise.
3877         (i386_dr_low_get_status): Likewise.
3878         (i386_dr_low): New global variable.
3879
3880 2014-06-20  Marcus Shawcroft  <marcus.shawcroft@arm.com>
3881
3882         * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
3883         * Makefile.in (AR, AR_FLAGS): Define.
3884         * configure: Regenerate.
3885
3886 2014-06-19  Gary Benson  <gbenson@redhat.com>
3887
3888         * Makefile.in (i386-dregs.o): New rule.
3889         * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
3890         * i386-low.c (target.h): Remove include.
3891         (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
3892         (DR_CONTROL_SHIFT): Likewise.
3893         (DR_CONTROL_SIZE): Likewise.
3894         (DR_RW_EXECUTE): Likewise.
3895         (DR_RW_WRITE): Likewise.
3896         (DR_RW_READ): Likewise.
3897         (DR_RW_IORW): Likewise.
3898         (DR_LEN_1): Likewise.
3899         (DR_LEN_2): Likewise.
3900         (DR_LEN_4): Likewise.
3901         (DR_LEN_8): Likewise.
3902         (DR_LOCAL_ENABLE_SHIFT): Likewise.
3903         (DR_GLOBAL_ENABLE_SHIFT): Likewise.
3904         (DR_ENABLE_SIZE): Likewise.
3905         (DR_LOCAL_SLOWDOWN): Likewise.
3906         (DR_GLOBAL_SLOWDOWN): Likewise.
3907         (DR_CONTROL_RESERVED): Likewise.
3908         (I386_DR_CONTROL_MASK): Likewise.
3909         (I386_DR_VACANT): Likewise.
3910         (I386_DR_LOCAL_ENABLE): Likewise.
3911         (I386_DR_GLOBAL_ENABLE): Likewise.
3912         (I386_DR_DISABLE): Likewise.
3913         (I386_DR_SET_RW_LEN): Likewise.
3914         (I386_DR_GET_RW_LEN): Likewise.
3915         (I386_DR_WATCH_HIT): Likewise.
3916         (i386_wp_op_t): Likewise.
3917         (i386_show_dr): Likewise.
3918         (i386_length_and_rw_bits): Likewise.
3919         (i386_insert_aligned_watchpoint): Likewise.
3920         (i386_remove_aligned_watchpoint): Likewise.
3921         (i386_handle_nonaligned_watchpoint): Likewise.
3922         i386_update_inferior_debug_regs(): Likewise.
3923         (i386_dr_insert_watchpoint): Likewise.
3924         (i386_dr_remove_watchpoint): Likewise.
3925         (i386_dr_region_ok_for_watchpoint): Likewise.
3926         (i386_dr_stopped_data_address): Likewise.
3927         (i386_dr_stopped_by_watchpoint): Likewise.
3928
3929 2014-06-19  Gary Benson  <gbenson@redhat.com>
3930
3931         * i386-low.c (i386_dr_show): Renamed to
3932         i386_show_dr and made static.  All uses updated.
3933         (i386_dr_length_and_rw_bits): Renamed to
3934         i386_length_and_rw_bits and made static.
3935         All uses updated.
3936         (i386_dr_insert_aligned_watchpoint): Renamed to
3937         i386_insert_aligned_watchpoint and made static.
3938         All uses updated.
3939         (i386_dr_remove_aligned_watchpoint): Renamed to
3940         i386_remove_aligned_watchpoint and made static.
3941         All uses updated.
3942         (i386_dr_update_inferior_debug_regs): Renamed to
3943         i386_update_inferior_debug_regs and made static.
3944         All uses updated.
3945
3946 2014-06-18  Gary Benson  <gbenson@redhat.com>
3947
3948         * i386-low.h (i386_dr_low_can_set_addr): New macro.
3949         (i386_dr_low_can_set_control): Likewise.
3950         (i386_get_debug_register_length): Likewise.
3951         * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
3952         (i386_dr_low_can_set_control): Likewise.
3953         (i386_get_debug_register_length): Likewise.
3954
3955 2014-06-17  Gary Benson  <gbenson@redhat.com>
3956
3957         * i386-low.h (i386-dregs.h): New include.
3958         (DR_FIRSTADDR): Now in i386-dregs.h.
3959         (DR_LASTADDR): Likewise.
3960         (DR_NADDR): Likewise.
3961         (DR_STATUS): Likewise.
3962         (DR_CONTROL): Likewise.
3963         (i386_debug_reg_state): Likewise.
3964         (i386_dr_insert_watchpoint): Likewise.
3965         (i386_dr_remove_watchpoint): Likewise.
3966         (i386_dr_region_ok_for_watchpoint): Likewise.
3967         (i386_dr_stopped_data_address): Likewise.
3968         (i386_dr_stopped_by_watchpoint): Likewise.
3969         * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
3970
3971 2014-06-18  Gary Benson  <gbenson@redhat.com>
3972
3973         * i386-low.h (i386_low_insert_watchpoint): Renamed to
3974         i386_dr_insert_watchpoint.
3975         (i386_low_remove_watchpoint): Renamed to
3976         i386_dr_remove_watchpoint.
3977         (i386_low_region_ok_for_watchpoint): Renamed to
3978         i386_dr_region_ok_for_watchpoint.
3979         (i386_low_stopped_data_address): Renamed to
3980         i386_dr_stopped_data_address.
3981         (i386_low_stopped_by_watchpoint): Renamed to
3982         i386_dr_stopped_by_watchpoint.
3983         * i386-low.c (i386_show_dr): Renamed to
3984         i386_dr_show and made nonstatic.  All uses updated.
3985         (i386_length_and_rw_bits): Renamed to
3986         i386_dr_length_and_rw_bits and made nonstatic.
3987         All uses updated.
3988         (i386_insert_aligned_watchpoint): Renamed to
3989         i386_dr_insert_aligned_watchpoint and made nonstatic.
3990         All uses updated.
3991         (i386_remove_aligned_watchpoint): Renamed to
3992         i386_dr_remove_aligned_watchpoint and made nonstatic.
3993         All uses updated.
3994         (i386_update_inferior_debug_regs): Renamed to
3995         i386_dr_update_inferior_debug_regs and made nonstatic.
3996         All uses updated.
3997         (i386_low_insert_watchpoint): Renamed to
3998         i386_dr_insert_watchpoint.  All uses updated.
3999         (i386_low_remove_watchpoint): Renamed to
4000         i386_dr_remove_watchpoint.  All uses updated.
4001         (i386_low_region_ok_for_watchpoint): Renamed to
4002         i386_dr_region_ok_for_watchpoint.  All uses updated.
4003         (i386_low_stopped_data_address): Renamed to
4004         i386_dr_stopped_data_address.  All uses updated.
4005         (i386_low_stopped_by_watchpoint): Renamed to
4006         i386_dr_stopped_by_watchpoint.  All uses updated.
4007
4008 2014-06-18  Gary Benson  <gbenson@redhat.com>
4009
4010         * i386-low.c (i386_dr_low_can_set_addr): New macro.
4011         (i386_dr_low_can_set_control): Likewise.
4012         (i386_insert_aligned_watchpoint): New check.
4013
4014 2014-06-18  Gary Benson  <gbenson@redhat.com>
4015
4016         * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
4017         Renamed to state.
4018
4019 2014-06-18  Gary Benson  <gbenson@redhat.com>
4020
4021         * i386-low.c (i386_length_and_rw_bits): Use internal_error
4022         instead of fatal and error.
4023         (i386_handle_nonaligned_watchpoint): Likewise.
4024
4025 2014-06-18  Gary Benson  <gbenson@redhat.com>
4026
4027         * i386-low.c (i386_get_debug_register_length): New macro.
4028         (TARGET_HAS_DR_LEN_8): Remove conditional.  Use above macro.
4029         (i386_show_dr): Use debug_printf instead of fprintf.  Use
4030         phex to format values.
4031
4032 2014-06-18  Gary Benson  <gbenson@redhat.com>
4033
4034         * i386-low.h: Comment changes.
4035         * i386-low.c: Likewise.
4036
4037 2014-06-18  Gary Benson  <gbenson@redhat.com>
4038
4039         * i386-low.c: Whitespace changes.
4040
4041 2014-06-12  Tom Tromey  <tromey@redhat.com>
4042
4043         * utils.c (freeargv): Remove.
4044
4045 2014-06-12  Tom Tromey  <tromey@redhat.com>
4046
4047         * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
4048         * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
4049         (parse_debug_format_options): Likewise.
4050         (gdbserver_usage): Likewise.
4051         * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
4052         (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
4053         (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
4054         against libiberty.
4055         ($(LIBGNU)): Depend on libiberty.
4056         (all-lib): Recurse into all subdirs.
4057         (install-only): Invoke "install" target in subdirs.
4058         (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
4059         targets.
4060         * configure: Rebuild.
4061         * configure.ac: Add ACX_CONFIGURE_DIR for libiberty.  Don't check
4062         for vasprintf, vsnprintf, or gettimeofday.
4063         * configure.srv: Don't add safe-ctype.o or lbasename.o to
4064         srv_tgtobj.
4065
4066 2014-06-05  Joel Brobecker  <brobecker@adacore.com>
4067
4068         * development.sh: Delete.
4069         * Makefile.in (config.status): Adjust dependency on development.sh.
4070         * configure.ac: Adjust development.sh source call.
4071         * configure: Regenerate.
4072
4073 2014-06-02  Pedro Alves  <palves@redhat.com>
4074
4075         * ax.c (gdb_free_agent_expr): New function.
4076         * ax.h (gdb_free_agent_expr): New declaration.
4077         * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
4078         list.
4079         (clear_breakpoint_conditions, clear_breakpoint_commands): Make
4080         static.
4081         (clear_breakpoint_conditions_and_commands): New function.
4082         * mem-break.h (clear_breakpoint_conditions): Delete declaration.
4083         (clear_breakpoint_conditions_and_commands): New declaration.
4084
4085 2014-05-23  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
4086
4087         * linux-aarch64-low.c (asm/ptrace.h): Include.
4088
4089 2014-05-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
4090
4091         Fix TLS access for -static -pthread.
4092         * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
4093         (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
4094         (thread_db_load_search, try_thread_db_load_1): Initialize it.
4095
4096 2014-05-20  Pedro Alves  <palves@redhat.com>
4097
4098         * linux-aarch64-low.c (aarch64_insert_point)
4099         (aarch64_remove_point): No longer check whether the type is
4100         supported here.  Adjust to new interface.
4101         (the_low_target): Install aarch64_supports_z_point_type as
4102         supports_z_point_type method.
4103         * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
4104         (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
4105         instead of a Z packet char.  Adjust.
4106         (arm_supports_z_point_type): New function.
4107         (arm_insert_point, arm_remove_point): Adjust to new interface.
4108         (the_low_target): Install arm_supports_z_point_type.
4109         * linux-crisv32-low.c (cris_supports_z_point_type): New function.
4110         (cris_insert_point, cris_remove_point): Adjust to new interface.
4111         Don't check whether the type is supported here.
4112         (the_low_target): Install cris_supports_z_point_type.
4113         * linux-low.c (linux_supports_z_point_type): New function.
4114         (linux_insert_point, linux_remove_point): Adjust to new interface.
4115         * linux-low.h (struct linux_target_ops) <insert_point,
4116         remove_point>: Take an enum raw_bkpt_type instead of a char.  Add
4117         raw_breakpoint pointer parameter.
4118         <supports_z_point_type>: New method.
4119         * linux-mips-low.c (mips_supports_z_point_type): New function.
4120         (mips_insert_point, mips_remove_point): Adjust to new interface.
4121         Use mips_supports_z_point_type.
4122         (the_low_target): Install mips_supports_z_point_type.
4123         * linux-ppc-low.c (the_low_target): Install NULL as
4124         supports_z_point_type method.
4125         * linux-s390-low.c (the_low_target): Install NULL as
4126         supports_z_point_type method.
4127         * linux-sparc-low.c (the_low_target): Install NULL as
4128         supports_z_point_type method.
4129         * linux-x86-low.c (x86_supports_z_point_type): New function.
4130         (x86_insert_point): Adjust to new insert_point interface.  Use
4131         insert_memory_breakpoint.  Adjust to new
4132         i386_low_insert_watchpoint interface.
4133         (x86_remove_point): Adjust to remove_point interface.  Use
4134         remove_memory_breakpoint.  Adjust to new
4135         i386_low_remove_watchpoint interface.
4136         (the_low_target): Install x86_supports_z_point_type.
4137         * lynx-low.c (lynx_target_ops): Install NULL as
4138         supports_z_point_type callback.
4139         * nto-low.c (nto_supports_z_point_type): New.
4140         (nto_insert_point, nto_remove_point): Adjust to new interface.
4141         (nto_target_ops): Install nto_supports_z_point_type.
4142         * mem-break.c: Adjust intro comment.
4143         (struct raw_breakpoint) <raw_type, size>: New fields.
4144         <inserted>: Update comment.
4145         <shlib_disabled>: Delete field.
4146         (enum bkpt_type) <gdb_breakpoint>: Delete value.
4147         <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
4148         gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
4149         (raw_bkpt_type_to_target_hw_bp_type): New function.
4150         (find_enabled_raw_code_breakpoint_at): New function.
4151         (find_raw_breakpoint_at): New type and size parameters.  Use them.
4152         (insert_memory_breakpoint): New function, based off
4153         set_raw_breakpoint_at.
4154         (remove_memory_breakpoint): New function.
4155         (set_raw_breakpoint_at): Reimplement.
4156         (set_breakpoint): New, based on set_breakpoint_at.
4157         (set_breakpoint_at): Reimplement.
4158         (delete_raw_breakpoint): Go through the_target->remove_point
4159         instead of assuming memory breakpoints.
4160         (find_gdb_breakpoint_at): Delete.
4161         (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
4162         (find_gdb_breakpoint): New function.
4163         (set_gdb_breakpoint_at): Delete.
4164         (z_type_supported): New function.
4165         (set_gdb_breakpoint_1): New function, loosely based off
4166         set_gdb_breakpoint_at.
4167         (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
4168         (delete_gdb_breakpoint_at): Delete.
4169         (delete_gdb_breakpoint_1): New function, loosely based off
4170         delete_gdb_breakpoint_at.
4171         (delete_gdb_breakpoint): New function.
4172         (clear_gdb_breakpoint_conditions): Rename to ...
4173         (clear_breakpoint_conditions): ... this.  Don't handle a NULL
4174         breakpoint.
4175         (add_condition_to_breakpoint): Make static.
4176         (add_breakpoint_condition): Take a struct breakpoint pointer
4177         instead of an address.  Adjust.
4178         (gdb_condition_true_at_breakpoint): Rename to ...
4179         (gdb_condition_true_at_breakpoint_z_type): ... this, and add
4180         z_type parameter.
4181         (gdb_condition_true_at_breakpoint): Reimplement.
4182         (add_breakpoint_commands): Take a struct breakpoint pointer
4183         instead of an address.  Adjust.
4184         (gdb_no_commands_at_breakpoint): Rename to ...
4185         (gdb_no_commands_at_breakpoint_z_type): ... this.  Add z_type
4186         parameter.  Return true if no breakpoint was found.  Change debug
4187         output.
4188         (gdb_no_commands_at_breakpoint): Reimplement.
4189         (run_breakpoint_commands): Rename to ...
4190         (run_breakpoint_commands_z_type): ... this.  Add z_type parameter,
4191         and change return type to boolean.
4192         (run_breakpoint_commands): New function.
4193         (gdb_breakpoint_here): Also check for Z1 breakpoints.
4194         (uninsert_raw_breakpoint): Don't try to reinsert a disabled
4195         breakpoint.  Go through the_target->remove_point instead of
4196         assuming memory breakpoint.
4197         (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
4198         software and hardware breakpoints.
4199         (reinsert_raw_breakpoint): Go through the_target->insert_point
4200         instead of assuming memory breakpoint.
4201         (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
4202         software and hardware breakpoints.
4203         (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
4204         Check both software and hardware breakpoints.
4205         (validate_inserted_breakpoint): Assert the breakpoint is a
4206         software breakpoint.  Set the inserted flag to -1 instead of
4207         setting shlib_disabled.
4208         (delete_disabled_breakpoints): Adjust.
4209         (validate_breakpoints): Only validate software breakpoints.
4210         Adjust to inserted flag change.
4211         (check_mem_read, check_mem_write): Skip breakpoint types other
4212         than software breakpoints.  Adjust to inserted flag change.
4213         * mem-break.h (enum raw_bkpt_type): New enum.
4214         (raw_breakpoint, struct process_info): Forward declare.
4215         (Z_packet_to_target_hw_bp_type): Delete declaration.
4216         (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
4217         (set_gdb_breakpoint, delete_gdb_breakpoint)
4218         (clear_breakpoint_conditions): New declarations.
4219         (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
4220         (breakpoint_inserted_here): Update comment.
4221         (add_breakpoint_condition, add_breakpoint_commands): Replace
4222         address parameter with a breakpoint pointer parameter.
4223         (gdb_breakpoint_here): Update comment.
4224         (delete_gdb_breakpoint_at): Delete.
4225         (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
4226         * server.c (process_point_options): Take a struct breakpoint
4227         pointer instead of an address.  Adjust.
4228         (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
4229         delete_gdb_breakpoint.
4230         * spu-low.c (spu_target_ops): Install NULL as
4231         supports_z_point_type method.
4232         * target.h: Include mem-break.h.
4233         (struct target_ops) <prepare_to_access_memory>: Update comment.
4234         <supports_z_point_type>: New field.
4235         <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4236         instead of a char.  Also take a raw breakpoint pointer.
4237         * win32-arm-low.c (the_low_target): Install NULL as
4238         supports_z_point_type.
4239         * win32-i386-low.c (i386_supports_z_point_type): New function.
4240         (i386_insert_point, i386_remove_point): Adjust to new interface.
4241         (the_low_target): Install i386_supports_z_point_type.
4242         * win32-low.c (win32_supports_z_point_type): New function.
4243         (win32_insert_point, win32_remove_point): Adjust to new interface.
4244         (win32_target_ops): Install win32_supports_z_point_type.
4245         * win32-low.h (struct win32_target_ops):
4246         <supports_z_point_type>: New method.
4247         <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4248         instead of a char.  Also take a raw breakpoint pointer.
4249
4250 2014-05-20  Pedro Alves  <palves@redhat.com>
4251
4252         * mem-break.h: Include break-common.h.
4253         (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4254         (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
4255         (Z_packet_to_target_hw_bp_type): New declaration.
4256         * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
4257         * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
4258         (Z_PACKET_ACCESS_WP): Delete macros.
4259         (Z_packet_to_hw_type): Delete function.
4260         * i386-low.h: Don't include break-common.h here.
4261         (Z_packet_to_hw_type): Delete declaration.
4262         * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
4263         Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4264         * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
4265         Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4266         * linux-aarch64-low.c: Don't include break-common.h here.
4267         (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4268         (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
4269         (Z_packet_to_target_hw_bp_type): Delete function.
4270         * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
4271         function.
4272         (mips_insert_point, mips_remove_point): Use
4273         Z_packet_to_target_hw_bp_type.
4274
4275 2014-05-20  Pedro Alves  <palves@redhat.com>
4276
4277         * linux-aarch64-low.c: Include break-common.h.
4278         (enum target_point_type): Delete.
4279         (Z_packet_to_point_type): Rename to ...
4280         (Z_packet_to_target_hw_bp_type): ... this, and return a
4281         target_hw_bp_type instead.
4282         (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
4283         instead of an enum target_point_type.
4284         (aarch64_point_encode_ctrl_reg): Likewise.  Compute type mask from
4285         breakpoint type.
4286         (aarch64_dr_state_insert_one_point)
4287         (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
4288         (aarch64_handle_aligned_watchpoint)
4289         (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
4290         Take an enum target_hw_bp_type instead of an enum
4291         target_point_type.
4292         (aarch64_supports_z_point_type): New function.
4293         (aarch64_insert_point, aarch64_remove_point): Use it.  Adjust to
4294         use Z_packet_to_target_hw_bp_type.
4295
4296 2014-05-20  Joel Brobecker  <brobecker@adacore.com>
4297
4298         * configure.ac: Only use -Werror by default when DEVELOPMENT
4299         is true.
4300         * configure: Regenerate.
4301
4302 2014-05-19  Jan Kratochvil  <jan.kratochvil@redhat.com>
4303
4304         Fix gdbserver qGetTLSAddr for x86_64 -m32.
4305         * linux-x86-low.c (X86_64_USER_REGS): New.
4306         (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
4307
4308 2014-04-28  Yao Qi  <yao@codesourcery.com>
4309
4310         * Makefile.in (i386-avx512.c): Fix the typo of generated file
4311         name.
4312
4313 2014-04-25  Pedro Alves  <palves@redhat.com>
4314
4315         PR server/16255
4316         * linux-low.c (linux_attach_fail_reason_string): New function.
4317         (linux_attach_lwp): Delete.
4318         (linux_attach_lwp_1): Rename to ...
4319         (linux_attach_lwp): ... this.  Take a ptid instead of a pid as
4320         argument.  Remove "initial" parameter.  Return int instead of
4321         void.  Don't error or warn here.
4322         (linux_attach): Adjust to call linux_attach_lwp.  Call error on
4323         failure to attach to the tgid.  Call warning when failing to
4324         attach to an lwp.
4325         * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
4326         argument.  Remove "initial" parameter.  Return int instead of
4327         void.  Don't error or warn here.
4328         (linux_attach_fail_reason_string): New declaration.
4329         * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
4330         interface change.  Use linux_attach_fail_reason_string.
4331
4332 2014-04-24  Michael Sturm  <michael.sturm@mintel.com>
4333             Walfred Tedeschi  <walfred.tedeschi@intel.com>
4334
4335         * Makefile.in: Added rules to handle new files
4336         i386-avx512.c i386-avx512-linux.c amd64-avx512.c
4337         amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
4338         * configure.srv (srv_i386_regobj): Add i386-avx512.o.
4339         (srv_i386_linux_regobj): Add i386-avx512-linux.o.
4340         (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
4341         (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
4342         x32-avx512-linux.o.
4343         (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
4344         (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
4345         (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
4346         i386/x32-avx512.xml.
4347         (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
4348         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
4349         i386/x32-avx512-linux.xml.
4350         * i387-fp.c (num_avx512_k_registers): New constant for number
4351         of K registers.
4352         (num_avx512_zmmh_low_registers): New constant for number of
4353         lower ZMM registers (0-15).
4354         (num_avx512_zmmh_high_registers): New constant for number of
4355         higher ZMM registers (16-31).
4356         (num_avx512_ymmh_registers): New contant for number of higher
4357         YMM registers (ymm16-31 added by avx521 on x86_64).
4358         (num_avx512_xmm_registers): New constant for number of higher
4359         XMM registers (xmm16-31 added by AVX512 on x86_64).
4360         (struct i387_xsave): Add space for AVX512 registers.
4361         (i387_cache_to_xsave): Change raw buffer size to 64 characters.
4362         Add code to handle AVX512 registers.
4363         (i387_xsave_to_cache): Add code to handle AVX512 registers.
4364         * linux-x86-low.c (init_registers_amd64_avx512_linux): New
4365         prototypei from generated file.
4366         (tdesc_amd64_avx512_linux): Likewise.
4367         (init_registers_x32_avx512_linux): Likewise.
4368         (tdesc_x32_avx512_linux): Likewise.
4369         (init_registers_i386_avx512_linux): Likewise.
4370         (tdesc_i386_avx512_linux): Likewise.
4371         (x86_64_regmap): Add AVX512 registers.
4372         (x86_linux_read_description): Add code to handle AVX512 XSTATE
4373         mask.
4374         (initialize_low_arch): Add code to initialize AVX512 registers.
4375
4376 2014-04-23  Pedro Alves  <palves@redhat.com>
4377
4378         * mem-break.c (find_gdb_breakpoint_at): Make static.
4379         * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
4380
4381 2014-04-23  Pedro Alves  <palves@redhat.com>
4382
4383         * i386-low.c: Don't include break-common.h here.
4384         (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4385         prototype to take target_hw_bp_type as argument instead of a Z
4386         packet char.
4387         * i386-low.h: Include break-common.h here.
4388         (Z_packet_to_hw_type): Declare.
4389         (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4390         prototypes.
4391         * linux-x86-low.c (x86_insert_point): Convert the packet number to
4392         a target_hw_bp_type before calling i386_low_insert_watchpoint.
4393         (x86_remove_point): Convert the packet number to a
4394         target_hw_bp_type before calling i386_low_remove_watchpoint.
4395         * win32-i386-low.c (i386_insert_point): Convert the packet number
4396         to a target_hw_bp_type before calling i386_low_insert_watchpoint.
4397         (i386_remove_point): Convert the packet number to a
4398         target_hw_bp_type before calling i386_low_remove_watchpoint.
4399
4400 2014-04-23  Pedro Alves  <palves@redhat.com>
4401
4402         * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
4403
4404 2014-04-10  Pedro Alves  <palves@redhat.com>
4405
4406         * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4407         Check if the condition or command is NULL before checking if the
4408         breakpoint is known.  On success, return true.
4409         * mem-break.h (add_breakpoint_condition): Document return.
4410         (add_breakpoint_commands): Add describing comment.
4411         * server.c (skip_to_semicolon): New function.
4412         (process_point_options): Use it.
4413
4414 2014-04-09  Pedro Alves  <palves@redhat.com>
4415
4416         * linux-low.c (linux_read_loadmap): Pass current_inferior directly
4417         to lwpid_of.
4418
4419 2014-02-27  Pedro Alves  <palves@redhat.com>
4420
4421         PR 12702
4422         * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
4423         macros.
4424         * linux-low.c (delete_lwp, handle_extended_wait): Add debug
4425         output.
4426         (last_thread_of_process_p): Take a PID argument instead of a
4427         thread pointer.
4428         (linux_wait_for_lwp): Delete.
4429         (num_lwps, check_zombie_leaders, not_stopped_callback): New
4430         functions.
4431         (linux_low_filter_event): New function, party factored out from
4432         linux_wait_for_event.
4433         (linux_wait_for_event): Rename to ...
4434         (linux_wait_for_event_filtered): ... this.  Add new filter ptid
4435         argument.  Partly rewrite.  Always use waitpid(-1, WNOHANG) and
4436         sigsuspend.  Check for zombie leaders.
4437         (linux_wait_for_event): Reimplement as wrapper around
4438         linux_wait_for_event_filtered.
4439         (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED.  Assume that if
4440         a normal or signal exit is seen, it's the whole process exiting.
4441         (wait_for_sigstop): No longer a for_each_inferior callback.
4442         Rewrite on top of linux_wait_for_event_filtered.
4443         (stop_all_lwps): Call wait_for_sigstop directly.
4444         * server.c (resume, handle_target_event): Handle
4445         TARGET_WAITKIND_NO_RESUMED.
4446
4447 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
4448
4449         * win32-low.c (psapi_get_dll_name,
4450         * win32_CreateToolhelp32Snapshot): Delete.
4451         (win32_CreateToolhelp32Snapshot, win32_Module32First)
4452         (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
4453         Delete.
4454         (handle_load_dll): Add function description.
4455         Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
4456
4457 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
4458
4459         * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
4460         Add comment.
4461         (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
4462         base address when calling win32_add_one_solib.
4463         (handle_load_dll): Delete local variable load_addr.
4464         Remove 0x1000 offset applied to DLL base address when calling
4465         win32_add_one_solib.
4466         (handle_unload_dll): Add comment.
4467
4468 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
4469
4470         * win32-low.c (win32_add_all_dlls): Renames
4471         win32_ensure_ntdll_loaded.  Rewrite function documentation.
4472         Adjust implementation to always load all DLLs.
4473         Add 0x1000 offset to DLL base address when calling
4474         win32_add_one_solib.
4475         (child_initialization_done): New static global.
4476         (do_initial_child_stuff): Set child_initialization_done to
4477         zero during child initialization, and 1 after.  Replace call
4478         to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
4479         Add comment.
4480         (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
4481         (handle_unload_dll): Add function documentation.
4482         (get_child_debug_event): Ignore load and unload DLL events
4483         during child initialization.
4484
4485 2014-02-20  Doug Evans  <dje@google.com>
4486
4487         Remove global all_lwps.
4488         * inferiors.h (ptid_of): Move here from linux-low.h.
4489         (pid_of, lwpid_of): Ditto.
4490         * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
4491         parameter is a struct thread_info * now.
4492         (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
4493         directly.  Pass &all_threads to find_inferior instead of &all_lwps.
4494         (aarch64_stopped_data_address): Fetch lwpid from current_inferior
4495         directly.
4496         (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
4497         (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
4498         * linux-arm-low.c (update_registers_callback): Update, "entry"
4499         parameter is a struct thread_info * now.
4500         Fetch lwpid from current_inferior directly.
4501         (arm_insert_point): Pass &all_threads to find_inferior instead of
4502         &all_lwps.
4503         (arm_remove_point): Ditto.
4504         (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
4505         (arm_prepare_to_resume): Fetch pid from thread.
4506         (arm_read_description): Fetch lwpid from current_inferior directly.
4507         * linux-low.c (all_lwps): Delete.
4508         (delete_lwp): Delete call to remove_inferior.
4509         (handle_extended_wait): Fetch lwpid from thread.
4510         (add_lwp): Don't set lwp->entry.id.  Remove call to
4511         add_inferior_to_list.
4512         (linux_attach_lwp_1): Fetch pid from current_inferior directly.
4513         (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
4514         (kill_one_lwp_callback): Ditto.
4515         (linux_kill): Don't dereference NULL pointer.
4516         Fetch ptid,lwpid from thread.
4517         (get_detach_signal): Fetch ptid from thread.
4518         (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
4519         Simplify call to regcache_invalidate_thread.
4520         (delete_lwp_callback): Update, "entry" parameter is a
4521         struct thread_info * now.  Fetch pid from thread.
4522         (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
4523         (status_pending_p_callback): Update, "entry" parameter is a
4524         struct thread_info * now.  Fetch ptid from thread.
4525         (find_lwp_pid): Update, "entry" parameter is a
4526         struct thread_info * now.
4527         (linux_wait_for_lwp): Fetch pid from thread.
4528         (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
4529         (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
4530         (enqueue_one_deferred_signal): Fetch lwpid from thread.
4531         (dequeue_one_deferred_signal): Ditto.
4532         (cancel_breakpoint): Fetch ptid from current_inferior.
4533         (linux_wait_for_event): Pass &all_threads to find_inferior,
4534         not &all_lwps.  Fetch ptid, lwpid from thread.
4535         (count_events_callback): Update, "entry" parameter is a
4536         struct thread_info * now.
4537         (select_singlestep_lwp_callback): Ditto.
4538         (select_event_lwp_callback): Ditto.
4539         (cancel_breakpoints_callback): Ditto.
4540         (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
4541         not &all_lwps.
4542         (select_event_lwp): Ditto.  Fetch ptid from event_thread.
4543         (unsuspend_one_lwp): Update, "entry" parameter is a
4544         struct thread_info * now.
4545         (unsuspend_all_lwps): Pass &all_threads to find_inferior,
4546         not &all_lwps.
4547         (linux_stabilize_threads): Ditto.  And for for_each_inferior.
4548         Fetch lwpid from thread, not lwp.
4549         (linux_wait_1): Fetch ptid, lwpid from current_inferior.
4550         Pass &all_threads to find_inferior, not &all_lwps.
4551         (send_sigstop): Fetch lwpid from thread, not lwp.
4552         (send_sigstop_callback): Update, "entry" parameter is a
4553         struct thread_info * now.
4554         (suspend_and_send_sigstop_callback): Ditto.
4555         (wait_for_sigstop): Ditto.  Fetch ptid, lwpid from thread, lwp.
4556         (stuck_in_jump_pad_callback): Update, "entry" parameter is a
4557         struct thread_info * now.
4558         (move_out_of_jump_pad_callback): Ditto.  Fetch ptid, lwpid
4559         from thread, lwp.
4560         (lwp_running): Update, "entry" parameter is a
4561         struct thread_info * now.
4562         (stop_all_lwps): Fetch ptid from thread.
4563         Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
4564         (linux_resume_one_lwp): Fetch lwpid from thread.
4565         (linux_set_resume_request): Update, "entry" parameter is a
4566         struct thread_info * now.  Fetch pid, lwpid from thread.
4567         (resume_status_pending_p): Update, "entry" parameter is a
4568         struct thread_info * now.
4569         (need_step_over_p): Ditto.  Fetch lwpid from thread.
4570         (start_step_over): Fetch lwpid from thread.
4571         (linux_resume_one_thread): Update, "entry" parameter is a
4572         struct thread_info * now.  Fetch lwpid from thread.
4573         (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
4574         (proceed_one_lwp): Update, "entry" parameter is a
4575         struct thread_info * now.  Fetch lwpid from thread.
4576         (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
4577         struct thread_info * now.
4578         (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
4579         (unstop_all_lwps): Ditto.  Fetch lwpid from thread.
4580         (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
4581         directly.
4582         (regsets_store_inferior_registers): Ditto.
4583         (fetch_register, store_register): Ditto.
4584         (linux_read_memory, linux_write_memory): Ditto.
4585         (linux_request_interrupt): Ditto.
4586         (linux_read_auxv): Ditto.
4587         (linux_xfer_siginfo): Ditto.
4588         (linux_qxfer_spu): Ditto.
4589         (linux_qxfer_libraries_svr4): Ditto.
4590         * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
4591         moved to inferiors.h.
4592         (get_lwp): Delete.
4593         (get_thread_lwp): Update.
4594         (struct lwp_info): Delete member "entry".  Simplify comment for
4595         member "thread".
4596         (all_lwps): Delete.
4597         * linux-mips-low.c (mips_read_description): Fetch lwpid from
4598         current_inferior directly.
4599         (update_watch_registers_callback): Update, "entry" parameter is a
4600         struct thread_info * now.  Fetch pid from thread.
4601         (mips_linux_prepare_to_resume): Fetch ptid from thread.
4602         (mips_insert_point): Fetch lwpid from current_inferior.
4603         Pass &all_threads to find_inferior, not &all_lwps.
4604         (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
4605         (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
4606         directly.
4607         (mips_stopped_data_address): Ditto.
4608         * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
4609         directly.
4610         * linux-tile-low.c (tile_arch_setup): Ditto.
4611         * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
4612         (update_debug_registers_callback): Update, "entry" parameter is a
4613         struct thread_info * now.  Fetch pid from thread.
4614         (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
4615         Pass &all_threads to find_inferior, not &all_lwps.
4616         (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
4617         (i386_dr_low_set_control): Fetch pid from current_inferior directly.
4618         Pass &all_threads to find_inferior, not &all_lwps.
4619         (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
4620         (i386_dr_low_get_status): Ditto.
4621         (x86_linux_prepare_to_resume): Fetch ptid from thread.
4622         (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
4623         (x86_linux_read_description): Ditto.
4624         * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
4625
4626 2014-02-20  Doug Evans  <dje@google.com>
4627
4628         * inferiors.c (get_first_inferior): Fix buglet.
4629
4630 2014-02-19  Doug Evans  <dje@google.com>
4631
4632         * gdbthread.h (add_thread): Change result type to struct thread_info *.
4633         * inferiors.c (add_thread): Change result type to struct thread_info *.
4634         All callers updated.
4635         (add_lwp): Call add_thread here instead of in callers.
4636         All callers updated.
4637         * linux-low.h (get_lwp_thread): Rewrite.
4638         (struct lwp_info): New member "thread".
4639
4640 2014-02-19  Doug Evans  <dje@google.com>
4641
4642         * linux-low.c (add_lwp): Change result to struct lwp_info *.
4643         All callers updated.
4644
4645 2014-02-19  Doug Evans  <dje@google.com>
4646
4647         * inferiors.c (add_thread): Fix whitespace.
4648
4649 2014-02-19  Doug Evans  <dje@google.com>
4650
4651         * dll.c (clear_dlls): Replace accessing list implemention details
4652         with API function.
4653         * gdbthread.h (get_first_thread): Declare.
4654         * inferiors.c (for_each_inferior_with_data): New function.
4655         (get_first_thread): New function.
4656         (find_thread_ptid): Simplify.
4657         (get_first_inferior): New function.
4658         (clear_list): Delete.
4659         (one_inferior_p): New function.
4660         (clear_inferior_list): New function.
4661         (clear_inferiors): Update.
4662         * inferiors.h (for_each_inferior_with_data): Declare.
4663         (clear_inferior_list): Declare.
4664         (one_inferior_p): Declare.
4665         (get_first_inferior): Declare.
4666         * linux-low.c (linux_wait_for_event): Replace accessing list
4667         implemention details with API function.
4668         * server.c (target_running): Ditto.
4669         (accumulate_file_name_length): New function.
4670         (emit_dll_description): New function.
4671         (handle_qxfer_libraries): Replace accessing list implemention
4672         details with API function.
4673         (handle_qxfer_threads_worker): New function.
4674         (handle_qxfer_threads_proper): Replace accessing list implemention
4675         details with API function.
4676         (handle_query): Ditto.
4677         (visit_actioned_threads_callback_ftype): New typedef.
4678         (visit_actioned_threads_data): New struct.
4679         (visit_actioned_threads): Rewrite to be find_inferior callback.
4680         (resume): Call find_inferior.
4681         (handle_status): Replace accessing list implemention
4682         details with API function.
4683         (process_serial_event): Replace accessing list implemention details
4684         with API function.
4685         * target.c (set_desired_inferior): Replace accessing list implemention
4686         details with API function.
4687         * tracepoint.c (same_process_p): New function.
4688         (gdb_agent_about_to_close): Replace accessing list implemention
4689         details with API function.
4690         * win32-low.c (child_delete_thread): Replace accessing list
4691         implemention details with API function.
4692         (match_dll_by_basename): New function.
4693         (dll_is_loaded_by_basename): New function.
4694         (win32_ensure_ntdll_loaded): Replace accessing list implemention
4695         details call to dll_is_loaded_by_basename.
4696
4697 2014-02-19  Doug Evans  <dje@google.com>
4698
4699         * dll.h (struct dll_info): Add comment.
4700         * gdbthread.h (struct thread_info): Add comment.
4701         (current_ptid): Simplify.
4702         * inferiors.c (add_process): Update.
4703         (remove_process): Update.
4704         * inferiors.h (struct process_info): Rename member "head" to "entry".
4705         * linux-low.c (delete_lwp): Update.
4706         (add_lwp): Update.
4707         (last_thread_of_process_p): Update.
4708         (kill_one_lwp_callback, linux_kill): Update.
4709         (status_pending_p_callback): Update.
4710         (wait_for_sigstop): Update.  Simplify read of ptid.
4711         (start_step_over): Update.
4712         * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
4713         (get_lwp_thread): Update.
4714         (struct lwp_info): Rename member "head" to "entry".
4715         * regcache.h (inferior_list_entry): Delete.
4716         * server.c (kill_inferior_callback): Update.
4717         (detach_or_kill_inferior_callback): Update.
4718         (print_started_pid): Update.
4719         (print_attached_pid): Update.
4720         (process_serial_event): Simplify read of ptid.
4721         * thread-db.c (thread_db_create_event): Update.
4722         (thread_db_get_tls_address): Update.
4723         * win32-low.c (current_inferior_ptid): Simplify.
4724
4725 2014-02-19  Tom Tromey  <tromey@redhat.com>
4726
4727         * target.h (struct target_ops) <supports_btrace>: Add target_ops
4728         argument.
4729         (target_supports_btrace): Update.
4730
4731 2014-02-14  Yao Qi  <yao@codesourcery.com>
4732
4733         * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
4734         (rsp-low-ipa.o): New target.
4735
4736 2014-02-12  Tom Tromey  <tromey@redhat.com>
4737
4738         * ax.c (gdb_parse_agent_expr): Use hex2bin, not
4739         convert_ascii_to_int.
4740         * regcache.c (registers_to_string): Likewise.
4741         * remote-utils.c (decode_M_packet): Likewise.
4742         * server.c (process_serial_event): Likewise.
4743
4744 2014-02-12  Tom Tromey  <tromey@redhat.com>
4745
4746         * server.c (handle_query, handle_v_run): Use hex2bin, not
4747         unhexify.
4748         * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
4749
4750 2014-02-12  Tom Tromey  <tromey@redhat.com>
4751
4752         * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
4753         convert_int_to_ascii.
4754         * regcache.c (registers_to_string, collect_register_as_string):
4755         Likewise.
4756         * remote-utils.c (look_up_one_symbol, relocate_instruction):
4757         Likewise.
4758         * server.c (process_serial_event): Likewise.
4759         * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
4760         (cmd_qtbuffer, cstr_to_hexstr): Likewise.
4761
4762 2014-02-12  Tom Tromey  <tromey@redhat.com>
4763
4764         * remote-utils.c (look_up_one_symbol, monitor_output): Use
4765         bin2hex, not hexify.
4766         * tracepoint.c (cmd_qtstatus): Likewise.
4767
4768 2014-02-12  Tom Tromey  <tromey@redhat.com>
4769
4770         * remote-utils.c (monitor_output): Pass explicit length to
4771         hexify.
4772
4773 2014-02-12  Tom Tromey  <tromey@redhat.com>
4774
4775         * tracepoint.c: Include rsp-low.h.
4776         * server.c: Include rsp-low.h.
4777         * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
4778         (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
4779         declare.
4780         * remote-utils.c: Include rsp-low.h.
4781         (fromhex, hexchars, ishex, unhexify, tohex, hexify)
4782         (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
4783         (convert_int_to_ascii, convert_ascii_to_int): Move to
4784         common/rsp-low.c.
4785         * regcache.c: Include rsp-low.h.
4786         * ax.c: Include rsp-low.h.
4787         * Makefile.in (SFILES): Add common/rsp-low.c.
4788         (OBS): Add rsp-low.o.
4789         (rsp-low.o): New target.
4790
4791 2014-02-12  Tom Tromey  <tromey@redhat.com>
4792
4793         * utils.h (pulongest, plongest, phex_nz): Don't declare.
4794         Include print-utils.h.
4795         * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
4796         (plongest, thirty_two, phex_nz): Remove.
4797         * Makefile.in (SFILES): Add common/print-utils.c.
4798         (OBS): Add print-utils.o.
4799         (print-utils-ipa.o): New target.
4800         (print-utils.o): New target.
4801         (IPA_OBJS): Add print-utils-ipa.o.
4802
4803 2014-02-06  Tom Tromey  <tromey@redhat.com>
4804
4805         * Makefile.in (SFILES): Fix indentation.
4806
4807 2014-02-05  Doug Evans  <dje@google.com>
4808
4809         * linux-low.c (linux_wait_for_event): Improve comment.
4810         (linux_wait_1): Keep current_inferior in sync with event_child.
4811
4812 2014-01-22  Doug Evans  <dje@google.com>
4813
4814         * gdbthread.h (gdb_id_to_thread): Delete, unused.
4815
4816 2014-01-22  Doug Evans  <dje@google.com>
4817
4818         * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
4819         * configure: Regenerate.
4820         * config.in: Regenerate.
4821         * Makefile.in (SFILES): Add debug.c.
4822         (OBS): Add debug.o.
4823         * debug.c: New file.
4824         * debug.h: New file.
4825         * linux-aarch64-low.c (*): Update all debugging printfs to use
4826         debug_printf instead of fprintf.
4827         * linux-arm-low.c (*): Ditto.
4828         * linux-cris-low.c (*): Ditto.
4829         * linux-crisv32-low.c (*): Ditto.
4830         * linux-m32r-low.c (*): Ditto.
4831         * linux-sparc-low.c (*): Ditto.
4832         * linux-x86.c (*): Ditto.
4833         * linux-low.c (*): Ditto.
4834         (linux_wait_1): Add calls to debug_enter, debug_exit.
4835         (linux_wait): Remove redundant debugging printf.
4836         (stop_all_lwps): Add calls to debug_enter, debug_exit.
4837         (linux_resume, unstop_all_lwps): Ditto.
4838         * mem-break.c (*): Update all debugging printfs to use
4839         debug_printf instead of fprintf.
4840         * remote-utils.c (*): Ditto.
4841         * thread-db.c (*): Ditto.
4842         * server.c #include <ctype.h>, "gdb_vecs.h".
4843         (debug_threads): Moved to debug.c.
4844         (*): Update all debugging printfs to use debug_printf instead of
4845         fprintf.
4846         (start_inferior): Replace call to fflush with call to debug_flush.
4847         (monitor_show_help): Mention set debug-format.
4848         (parse_debug_format_options): New function.
4849         (handle_monitor_command): Handle "monitor set debug-format".
4850         (gdbserver_usage): Mention --debug-format.
4851         (main): Parse --debug-format.
4852         * server.h (debug_threads): Declaration moved to debug.h.
4853         #include "debug.h".
4854         * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
4855         trace_debug_1 that uses debug_printf.
4856         (tracepoint_look_up_symbols): Update all debugging printfs to use
4857         debug_printf instead of fprintf.
4858
4859 2014-01-20  Baruch Siach  <baruch@tkos.co.il>
4860
4861         * linux-xtensa-low.c: Include asm/ptrace.h instead of
4862         sys/ptrace.h.
4863
4864 2014-01-17  Pedro Alves  <palves@redhat.com>
4865
4866         PR build/16445
4867         * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
4868         defined after including gdb_proc_service.h.
4869
4870 2014-01-16  Doug Evans  <dje@google.com>
4871
4872         * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
4873         (match_dll): Use it.
4874
4875 2014-01-16  Markus Metzger  <markus.t.metzger@intel.com>
4876
4877         * target.h (target_ops) <read_btrace>: Change parameters and
4878         return type to allow error reporting.
4879         * server.c (handle_qxfer_btrace): Support delta reads.  Pass
4880         trace reading errors on.
4881         * linux-low.c (linux_low_read_btrace): Pass trace reading
4882         errors on.
4883         (linux_low_disable_btrace): New.
4884
4885 2014-01-15  Doug Evans  <dje@google.com>
4886
4887         * inferiors.c (thread_id_to_gdb_id): Delete.
4888         * inferiors.h (thread_id_to_gdb_id): Delete.
4889
4890 2014-01-13  Eli Zaretskii  <eliz@gnu.org>
4891
4892         * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
4893         "-I$(srcdir)/../".  Fixes MinGW compilation errors with old GCC
4894         versions.
4895
4896 2014-01-08  Pedro Alves  <palves@redhat.com>
4897
4898         * server.c (handle_status): Don't discard previous queued stop
4899         replies or thread's pending status here.
4900         (main) <disconnection>: Do it here instead.
4901
4902 2014-01-08  Pedro Alves  <palves@redhat.com>
4903
4904         * gdbthread.h (struct thread_info) <status_pending_p>: New field.
4905         * server.c (visit_actioned_threads, handle_pending_status): New
4906         function.
4907         (handle_v_cont): Factor out parts to ...
4908         (resume): ... this new function.  If in all-stop, and a thread
4909         being resumed has a pending status, report it without actually
4910         resuming.
4911         (myresume): Adjust to use the new 'resume' function.
4912         (clear_pending_status_callback, set_pending_status_callback)
4913         (find_status_pending_thread_callback): New functions.
4914         (handle_status): Handle the case of multiple threads having
4915         interesting statuses to report.  Report threads' real last signal
4916         instead of always reporting GDB_SIGNAL_TRAP.  Look for a thread
4917         with an interesting thread to report the status for, instead of
4918         always reporting the status of the first thread.
4919
4920 2014-01-01  Joel Brobecker  <brobecker@adacore.com>
4921
4922         * gdbserver.c (gdbserver_version): Set copyright year to 2014.
4923         * gdbreplay.c (gdbreplay_version): Likewise.
4924
4925 2013-12-18  Yufeng Zhang  <yufeng.zhang@arm.com>
4926
4927         * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
4928         iov.iov_len with the real length in use.
4929
4930 2013-12-13  Joel Brobecker  <brobecker@adacore.com>
4931
4932         * Makefile.in (safe-ctype.o, lbasename.o): New rules.
4933         * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
4934         for all targets that use win32-low.c.
4935         * win32-low.c (win32_ensure_ntdll_loaded): New function.
4936         (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
4937
4938 2013-12-13  Pedro Alves  <palves@redhat.com>
4939
4940         * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
4941         if equal to TARGET_WAITKIND_LOADED.
4942         * win32-low.c (cached_status): New static global.
4943         (win32_wait): Add declaration.
4944         (do_initial_child_stuff): Flush all initial pending debug events
4945         up to the initial breakpoint.
4946         (win32_wait): If CACHED_STATUS was set, return that instead
4947         of doing a real wait.  Remove the code resuming the execution
4948         of the inferior after receiving a TARGET_WAITKIND_LOADED event
4949         during the initial phase.  Also remove the code changing
4950         OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
4951         TARGET_WAITKIND_STOPPED.
4952
4953 2013-12-11  Yao Qi  <yao@codesourcery.com>
4954
4955         * notif.c (handle_notif_ack): Return 0 if no notification
4956         matches.
4957
4958 2013-11-20  Doug Evans  <dje@google.com>
4959
4960         * linux-low.c (linux_set_resume_request): Fix comment.
4961
4962 2013-11-20  Doug Evans  <dje@google.com>
4963
4964         * linux-low.c (resume_status_pending_p): Tweak comment.
4965
4966 2013-11-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4967
4968         * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
4969         amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
4970         * configure.srv (srv_i386_regobj): Add i386-mpx.o.
4971         (srv_i386_linux_regobj): Add i386-mpx-linux.o.
4972         (srv_amd64_regobj): Add amd64-mpx.o.
4973         (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
4974         (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
4975         (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
4976         * i387-fp.c (num_pl_bnd_register) Added constant.
4977         (num_pl_bnd_cfg_registers) Added constant.
4978         (struct i387_xsave) Added reserved area and MPX fields.
4979         (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
4980         * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
4981         function.
4982         (tdesc_i386_mpx_linux): Add MPX amd64 target.
4983         (init_registers_amd64_mpx_linux): Declare new function.
4984         (tdesc_amd64_mpx_linux): Add MPX amd64 target.
4985         (x86_64_regmap): Add MPX registers.
4986         (x86_linux_read_description): Add MPX case.
4987         (initialize_low_arch): Initialize MPX targets.
4988
4989 2013-11-18  Tom Tromey  <tromey@redhat.com>
4990
4991         * configure: Rebuild.
4992         * configure.ac: Don't check for stdlib.h.
4993         * gdbreplay.c: Unconditionally include stdlib.h.
4994
4995 2013-11-18  Tom Tromey  <tromey@redhat.com>
4996
4997         * config.in: Rebuild.
4998         * configure: Rebuild.
4999         * configure.ac: Don't use AC_HEADER_DIRENT.
5000
5001 2013-11-18  Tom Tromey  <tromey@redhat.com>
5002
5003         * server.h: Don't check HAVE_STRING_H.
5004         * gdbreplay.c: Don't check HAVE_STRING_H.
5005         * configure: Rebuild.
5006
5007 2013-11-18  Tom Tromey  <tromey@redhat.com>
5008
5009         * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
5010         LIBGNU.
5011
5012 2013-11-08  Tom Tromey  <tromey@redhat.com>
5013
5014         * configure, config.in: Rebuild.
5015         * configure.ac: Remove unused configury.
5016
5017 2013-11-08  Tom Tromey  <tromey@redhat.com>
5018
5019         * acinclude.m4: Include common.m4, codeset.m4.
5020         * configure, config.in: Rebuild.
5021         * configure.ac: Use GDB_AC_COMMON.
5022
5023 2013-11-06  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5024
5025         * linux-s390-low.c (HWCAP_S390_TE): New define.
5026         (s390_arch_setup): Consider the TE field in the HWCAP for
5027         determining 'have_regset_tdb'.
5028
5029 2013-10-16  Sergio Durigan Junior  <sergiodj@redhat.com>
5030
5031         PR gdb/16014
5032         * tracepoint.c (download_tracepoint_1): Remove unnecessary double
5033         call to sizeof.
5034
5035 2013-10-02  Pedro Alves  <palves@redhat.com>
5036
5037         * server.c (process_serial_event): Don't output "GDBserver
5038         exiting" if GDB is connected through stdio.
5039         * target.c (mywait): Likewise, be silent if GDB is connected
5040         through stdio.
5041
5042 2013-10-01  Joel Brobecker  <brobecker@adacore.com>
5043
5044         * lynx-low.c (lynx_add_threads_after_attach): New function.
5045         (lynx_attach): Remove call to add_thread.  Add call to
5046         lynx_add_threads_after_attach instead.
5047
5048 2013-09-28  Mike Frysinger  <vapier@gentoo.org>
5049
5050         * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
5051         * config.in, configure: Regenerated.
5052
5053 2013-09-18  Yao Qi  <yao@codesourcery.com>
5054
5055         PR server/15959
5056         * server.c (start_inferior): Clear 'resume_info'.
5057
5058 2013-09-16  Jiong Wang  <jiwang@tilera.com>
5059
5060         * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
5061         for each register.
5062
5063 2013-09-16  Jiong Wang  <jiwang@tilera.com>
5064
5065         * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
5066         linux-tile-low.o to srv_tgtobj.
5067
5068 2013-09-16  Will Newton  <will.newton@linaro.org>
5069
5070         * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
5071         out regs.
5072
5073 2013-09-06  Pedro Alves  <palves@redhat.com>
5074
5075         * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
5076         (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
5077         (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
5078         (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
5079         (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
5080         (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
5081
5082 2013-09-06  Pedro Alves  <palves@redhat.com>
5083
5084         * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
5085         explicit header dependencies and use $COMPILE/$POSTCOMPILE.
5086
5087 2013-09-06  Pedro Alves  <palves@redhat.com>
5088
5089         * linux-amd64-ipa.c: Include tracepoint.h.
5090         * linux-i386-ipa.c: Include tracepoint.h.
5091
5092 2013-09-06  Ricard Wanderlof  <ricardw@axis.com>
5093
5094         * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
5095         (ps_get_thread_area): New function.
5096
5097 2013-09-06  Ricard Wanderlof  <ricardw@axis.com>
5098
5099         * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
5100         (initialize_low_arch): Call init_registers_crisv32 rather than
5101         init_register_crisv32.
5102
5103 2013-09-05  Pedro Alves  <palves@redhat.com>
5104
5105         * server.h (handle_vFile, hostio_last_error_from_errno): Move
5106         to ...
5107         * hostio.h: ... this new file.
5108         * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
5109         win32-low.c: Include hostio.h.
5110
5111 2013-09-05  Pedro Alves  <palves@redhat.com>
5112
5113         * server.h (gdb_client_data, handler_func, callback_handler_func)
5114         (delete_file_handler, add_file_handler, append_callback_event)
5115         (delete_callback_event, start_event_loop, initialize_event_loop):
5116         Move to event-loop.h and include it.
5117         * event-loop.h: New file.
5118
5119 2013-09-05  Pedro Alves  <palves@redhat.com>
5120
5121         * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
5122         * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
5123         (loaded_dll, unloaded_dll): Move to ...
5124         * dll.h: ... this new file.
5125         * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
5126
5127 2013-09-05  Pedro Alves  <palves@redhat.com>
5128
5129         * server.h (current_process, get_thread_process, all_processes)
5130         (add_inferior_to_list, for_each_inferior, current_inferior)
5131         (remove_inferior, add_process, remove_process, find_process_pid)
5132         (have_started_inferiors_p, have_attached_inferiors_p)
5133         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
5134         (clear_inferiors, find_inferior, find_inferior_id)
5135         (inferior_target_data, set_inferior_target_data)
5136         (inferior_regcache_data, set_inferior_regcache_data): Move to
5137         inferiors.h, and include it.
5138         * inferiors.h: New file.
5139
5140 2013-09-05  Pedro Alves  <palves@redhat.com>
5141
5142         * server.h (struct emit_ops, current_insn_ptr, emit_error):
5143         Move ...
5144         * ax.h: ... here.
5145
5146 2013-09-05  Pedro Alves  <palves@redhat.com>
5147
5148         * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
5149         tracepoint.h.
5150         * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
5151         (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
5152         (handle_tracepoint_general_set, handle_tracepoint_query)
5153         (tracepoint_finished_step, tracepoint_was_hit)
5154         (release_while_stepping_state_list, current_traceframe)
5155         (in_readonly_region, traceframe_read_mem)
5156         (fetch_traceframe_registers, traceframe_read_sdata)
5157         (traceframe_read_info, struct fast_tpoint_collect_status)
5158         (fast_tracepoint_collecting, force_unlock_trace_buffer)
5159         (handle_tracepoit_bkpts, initialize_low_tracepoint)
5160         (supply_fast_tracepoint_registers)
5161         (supply_static_tracepoint_registers, set_trampoline_buffer_space)
5162         (ipa_tdesc, claim_trampoline_space)
5163         (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
5164         (agent_mem_read, agent_get_trace_state_variable_value)
5165         (agent_set_trace_state_variable_value, agent_tsv_read)
5166         (agent_mem_read_string, get_raw_reg_func_addr)
5167         (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
5168         * tracepoint.h: ... this new file.
5169
5170 2013-09-05  Pedro Alves  <palves@redhat.com>
5171
5172         * server.h (perror_with_name, error, fatal, warning, paddress)
5173         (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
5174         include it.
5175         * utils.h: New file.
5176
5177 2013-09-05  Pedro Alves  <palves@redhat.com>
5178
5179         * server.h (remote_debug, noack_mode, transport_is_reliable)
5180         (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
5181         (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
5182         (getpkt, remote_prepare, remote_open, remote_close, write_ok)
5183         (write_enn, initialize_async_io, enable_async_io)
5184         (disable_async_io, check_remote_input_interrupt_request)
5185         (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
5186         (dead_thread_notify, prepare_resume_reply)
5187         (decode_address_to_semicolon, decode_address, decode_m_packet)
5188         (decode_M_packet, decode_X_packet, decode_xfer_write)
5189         (decode_search_memory_packet, unhexify, hexify)
5190         (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
5191         (look_up_one_symbol, relocate_instruction)
5192         (monitor_output): Move to remote-utils.h, and include it.
5193         * remote-utils.h: New file.
5194
5195 2013-09-05  Pedro Alves  <palves@redhat.com>
5196
5197         * server.h (_): Delete.
5198
5199 2013-09-02  Pedro Alves  <palves@redhat.com>
5200
5201         * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
5202         (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
5203         allocated.
5204         (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
5205
5206 2013-09-02  Pierre Muller  <muller@sourceware.org>
5207
5208         * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
5209         or WriteProcessMemory complete successfully and handle
5210         ERROR_PARTIAL_COPY error.
5211
5212 2013-09-02  Pedro Alves  <palves@redhat.com>
5213
5214         * server.c (gdb_read_memory): Return -1 on traceframe memory read
5215         error instead of EIO.
5216
5217 2013-08-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
5218
5219         PR server/15604
5220         * linux-low.c: Include filestuff.h.
5221         (linux_create_inferior) <pid == 0>: Call close_most_fds.
5222         * lynx-low.c: Include filestuff.h.
5223         (lynx_create_inferior) <pid == 0>: Call close_most_fds.
5224         * server.c: Include filestuff.h.
5225         (main): Call notice_open_fds.
5226         * spu-low.c: Include filestuff.h.
5227         (spu_create_inferior) <pid == 0>: Call close_most_fds.
5228
5229 2013-08-22  Luis Machado  <lgustavo@codesourcery.com>
5230
5231         * Makefile.in: Explain why ../target and ../nat are not
5232         listed as include file search paths.
5233         (linux-waitpid.o): New object file rule.
5234         * configure.srv (srv_native_linux_obj): New variable.
5235         Replace all occurrences of linux native object files with
5236         $srv_native_linux_obj.
5237         * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
5238         (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
5239         (linux_enable_event_reporting): Remove declaration.
5240         (my_waitpid): Moved to common/linux-waitpid.c.
5241         (linux_wait_for_event): Pass ptid when calling
5242         linux_enable_event_reporting.
5243         (linux_supports_tracefork_flag): Remove.
5244         (linux_enable_event_reporting): Likewise.
5245         (linux_tracefork_grandchild): Remove.
5246         (STACK_SIZE): Moved to common/linux-ptrace.c.
5247         (linux_tracefork_child): Remove.
5248         (linux_test_for_tracefork): Remove.
5249         (linux_look_up_symbols): Call linux_supports_traceclone.
5250         (initialize_low): Remove call to linux_test_for_tracefork.
5251         * linux-low.h (PTRACE_TYPE_ARG3): Move to
5252         common/linux-ptrace.h.
5253         (PTRACE_TYPE_ARG4): Likewise.
5254         Include linux-ptrace.h.
5255
5256 2013-08-21  Pedro Alves  <palves@redhat.com>
5257
5258         * config.in: Renegerate.
5259
5260 2013-08-19  Luis Machado  <lgustavo@codesourcery.com>
5261
5262         * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
5263         (SFILES): Remove $(srcdir)/common/target-common.c and
5264         add $(srcdir)/target/waitstatus.c.
5265         (OBS): Remove target-common.o and add waitstatus.o.
5266         (server_h): Remove $(srcdir)/../common/target-common.h and
5267         add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
5268         and $(srcdir)/../target/waitstatus.h.
5269         (target-common.o): Remove.
5270         (waitstatus.o): New target object file.
5271         * target.h: Do not include target-common.h and
5272         include target/resume.h, target/wait.h and
5273         target/waitstatus.h.
5274
5275 2013-08-13  Luis Machado  <lgustavo@codesourcery.com>
5276
5277         * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5278         to PTRACE_TYPE_ARG3.
5279         * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5280         to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
5281         PTRACE_TYPE_ARG4.
5282         * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
5283         (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
5284
5285 2013-07-27  Jie Zhang  <jie@codesourcery.com>
5286             Daniel Jacobowitz  <dan@codesourcery.com>
5287             Yao Qi  <yao@codesourcery.com>
5288
5289         * Makefile.in (SFILES): Add common/mips-linux-watch.c.
5290         (mips-linux-watch.o): New rule.
5291         (mips_linux_watch_h): New variable.
5292         * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
5293         srv_tgtobj.
5294         * linux-mips-low.c: Include mips-linux-watch.h.
5295         (struct arch_process_info, struct arch_lwp_info): New.
5296         (update_watch_registers_callback): New function.
5297         (mips_linux_new_process, mips_linux_new_thread) New functions.
5298         (mips_linux_prepare_to_resume, mips_insert_point): New
5299         functions.
5300         (mips_remove_point, mips_stopped_by_watchpoint): New
5301         functions.
5302         (rsp_bp_type_to_target_hw_bp_type): New function.
5303         (mips_stopped_data_address): New function.
5304         (the_low_target): Add watchpoint support functions.
5305
5306 2013-07-27  Yao Qi  <yao@codesourcery.com>
5307
5308         * i386-low.c: Include break-common.h.
5309         (enum target_hw_bp_type): Remove.
5310
5311 2013-07-24  Luis Machado  <lgustavo@codesourcery.com>
5312
5313         * Makefile.in (SFILES): /common/target-common.c.
5314         (OBS): Add target-common.o.
5315         (server_h): Add $(srcdir)/../common/target-common.h.
5316         (target-common.o): New target.
5317         * server.c (queue_stop_reply_callback): Free
5318         status string after use.
5319         * target.c (target_waitstatus_to_string): Remove.
5320         * target.h: Include target-common.h.
5321         (resume_kind): Likewise.
5322         (target_waitkind): Likewise.
5323         (target_waitstatus): Likewise.
5324         (TARGET_WNOHANG): Likewise.
5325
5326 2013-07-04  Yao Qi  <yao@codesourcery.com>
5327
5328         * Makefile.in (host_alias): Use @host_noncanonical@.
5329         (target_alias): Use @target_noncanonical@.
5330         * configure.ac: Use ACX_NONCANONICAL_TARGET and
5331         ACX_NONCANONICAL_HOST.
5332         * configure: Regenerated.
5333
5334         Revert:
5335         2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>
5336
5337         * configure.ac (version_host, version_target): Set and AC_SUBST them.
5338         * configure: Rebuild.
5339         * Makefile.in (version_host, version_target): Get from configure.
5340         (version.c): Use $(version_host) and $(version_target).
5341
5342 2013-07-03  Pedro Alves  <palves@redhat.com>
5343
5344         * Makefile.in (config.status): Depend on development.sh.
5345         * acinclude.m4: Include libmcheck.m4.
5346         * configure: Regenerate.
5347
5348 2013-07-02  Mircea Gherzan  <mircea.gherzan@intel.com>
5349
5350         * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
5351         attribute inside the parentheses.
5352         (winapi_DebugSetProcessKillOnExit): Ditto.
5353         (winapi_DebugBreakProcess): Ditto.
5354         (winapi_GenerateConsoleCtrlEvent): Ditto.
5355
5356 2013-07-02  Mircea Gherzan  <mircea.gherzan@intel.com>
5357
5358         * notif.h (notif_event): Add a dummy member to avoid compiler
5359         errors.
5360
5361 2013-07-01  Pedro Alves  <palves@redhat.com>
5362
5363         * hostio.c (HOSTIO_PATH_MAX): Define.
5364         (require_filename, handle_open, handle_unlink, handle_readlink):
5365         Use it.
5366
5367 2013-07-01  Pedro Alves  <palves@redhat.com>
5368
5369         * server.h: Include "pathmax.h".
5370         * linux-low.c: Don't include sys/param.h.
5371         (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
5372         MAXPATHLEN.
5373         * win32-low.c: Don't include sys/param.h.
5374         (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
5375
5376 2013-07-01  Pedro Alves  <palves@redhat.com>
5377
5378         * event-loop.c: Don't check HAVE_UNISTD_H before including
5379         <unistd.h>.
5380         * gdbreplay.c: Likewise.
5381         * remote-utils.c: Likewise.
5382         * server.c: Likewise.
5383         * configure.ac: Don't check for unistd.h.
5384         * configure: Regenerate.
5385
5386 2013-06-28  Tom Tromey  <tromey@redhat.com>
5387
5388         * Makefile.in (version.c): Use version.in, not
5389         common/version.in.
5390
5391 2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>
5392
5393         * configure.ac (version_host, version_target): Set and AC_SUBST them.
5394         * configure: Rebuild.
5395         * Makefile.in (version_host, version_target): Get from configure.
5396         (version.c): Use $(version_host) and $(version_target).
5397
5398 2013-06-10  Dmitry Kozlov <ddk@codesourcery.com>
5399
5400         Fix trace-status to output user name without trailing colon.
5401         * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
5402
5403 2013-06-10  Dmitry Kozlov <ddk@codesourcery.com>
5404
5405         Fix trace-status to output proper start-time and stop-time.
5406         * tracepoint.c (cmd_qtstatus): Modify trace-status output to
5407         output start time and stop time in hex as gdb expects.
5408
5409 2013-06-26  Pedro Alves  <pedro@codesourcery.com>
5410
5411         * tracepoint.c (build_traceframe_info_xml): Output trace state
5412         variables present in the trace buffer.
5413
5414 2013-06-24  Tom Tromey  <tromey@redhat.com>
5415
5416         * Makefile.in (version.c): Use bfd/version.h, common/version.in,
5417         create-version.sh.
5418         (version.o): Remove.
5419         * gdbreplay.c: Include version.h.
5420         (version, host_name): Don't declare.
5421         * server.h: Include version.h.
5422         (version, host_name): Don't declare.
5423
5424 2013-06-12  Pedro Alves  <palves@redhat.com>
5425
5426         * linux-x86-low.c (linux_is_elf64): Delete global.
5427         (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
5428         with local linux_pid_exe_is_elf_64_file use.
5429
5430 2013-06-11  Pedro Alves  <palves@redhat.com>
5431
5432         * linux-low.c (regset_disabled, disable_regset): New functions.
5433         (regsets_fetch_inferior_registers)
5434         (regsets_store_inferior_registers): Use them.
5435         (initialize_regsets_info); Don't allocate the disabled_regsets
5436         array here.
5437         * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
5438         comment.
5439
5440 2013-06-11  Pedro Alves  <palves@redhat.com>
5441
5442         * linux-low.c (initialize_regsets_info): Use xcalloc instead of
5443         xmalloc.
5444
5445 2013-06-11  Pedro Alves  <palves@redhat.com>
5446
5447         * linux-x86-low.c (initialize_low_arch): Call
5448         init_registers_x32_avx_linux.
5449
5450 2013-06-09  Jan Kratochvil  <jan.kratochvil@redhat.com>
5451
5452         Fix compatibility with Android Bionic.
5453         * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
5454         it is not empty.
5455
5456 2013-06-07  Pedro Alves  <palves@redhat.com>
5457
5458         PR server/14823
5459         * Makefile.in (OBS): Add tdesc.o.
5460         (IPA_OBJS): Add tdesc-ipa.o.
5461         (tdesc-ipa.o): New rule.
5462         * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
5463         interface.
5464         * linux-low.c (new_inferior): Delete.
5465         (disabled_regsets, num_regsets): Delete.
5466         (linux_add_process): Adjust to set the new per-process
5467         new_inferior flag.
5468         (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
5469         (linux_wait_for_lwp): Adjust.  Only call arch_setup if the event
5470         was a stop.  When calling arch_setup, switch the current inferior
5471         to the thread that got an event.
5472         (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
5473         (regsets_fetch_inferior_registers)
5474         (regsets_store_inferior_registers): New regsets_info parameter.
5475         Adjust to use it.
5476         (linux_register_in_regsets): New regs_info parameter.  Adjust to
5477         use it.
5478         (register_addr, fetch_register, store_register): New usrregs_info
5479         parameter.  Adjust to use it.
5480         (usr_fetch_inferior_registers, usr_store_inferior_registers): New
5481         parameter regs_info.  Adjust to use it.
5482         (linux_fetch_registers): Get the current inferior's regs_info, and
5483         adjust to use it.
5484         (linux_store_registers): Ditto.
5485         [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
5486         (initialize_low): Don't initialize the target_regsets here.  Call
5487         initialize_low_arch.
5488         * linux-low.h (target_regsets): Delete declaration.
5489         (struct regsets_info): New.
5490         (struct usrregs_info): New.
5491         (struct regs_info): New.
5492         (struct process_info_private) <new_inferior>: New field.
5493         (struct linux_target_ops): Delete the num_regs, regmap, and
5494         regset_bitmap fields.  New field regs_info.
5495         [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
5496         * i387-fp.c (num_xmm_registers): Delete.
5497         (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
5498         calls to new interface.
5499         (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
5500         (i387_xsave_to_cache): Adjust find_regno calls to new interface.
5501         Infer the number of xmm registers from the regcache's target
5502         description.
5503         * i387-fp.h (num_xmm_registers): Delete.
5504         * inferiors.c (add_thread): Don't install the thread's regcache
5505         here.
5506         * proc-service.c (gregset_info): Fetch the current inferior's
5507         regs_info.  Adjust to use it.
5508         * regcache.c: Include tdesc.h.
5509         (register_bytes, reg_defs, num_registers)
5510         (gdbserver_expedite_regs): Delete.
5511         (get_thread_regcache): If the thread doesn't have a regcache yet,
5512         create one, instead of aborting gdbserver.
5513         (regcache_invalidate_one): Rename to ...
5514         (regcache_invalidate_thread): ... this.
5515         (regcache_invalidate_one): New.
5516         (regcache_invalidate): Only invalidate registers of the current
5517         process.
5518         (init_register_cache): Add target_desc parameter, and use it.
5519         (new_register_cache): Ditto.  Assert the target description has a
5520         non zero registers_size.
5521         (regcache_cpy): Add assertions.  Adjust.
5522         (realloc_register_cache, set_register_cache): Delete.
5523         (registers_to_string, registers_from_string): Adjust.
5524         (find_register_by_name, find_regno, find_register_by_number)
5525         (register_cache_size): Add target_desc parameter, and use it.
5526         (free_register_cache_thread, free_register_cache_thread_one)
5527         (regcache_release, register_cache_size): New.
5528         (register_size): Add target_desc parameter, and use it.
5529         (register_data, supply_register, supply_register_zeroed)
5530         (supply_regblock, supply_register_by_name, collect_register)
5531         (collect_register_as_string, collect_register_by_name): Adjust.
5532         * regcache.h (struct target_desc): Forward declare.
5533         (struct regcache) <tdesc>: New field.
5534         (init_register_cache, new_register_cache): Add target_desc
5535         parameter.
5536         (regcache_invalidate_thread): Declare.
5537         (regcache_invalidate_one): Delete declaration.
5538         (regcache_release): Declare.
5539         (find_register_by_number, register_cache_size, register_size)
5540         (find_regno): Add target_desc parameter.
5541         (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
5542         declarations.
5543         * remote-utils.c: Include tdesc.h.
5544         (outreg, prepare_resume_reply): Adjust.
5545         * server.c: Include tdesc.h.
5546         (gdbserver_xmltarget): Delete declaration.
5547         (get_features_xml, process_serial_event): Adjust.
5548         * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
5549         declare.
5550         (struct process_info) <tdesc>: New field.
5551         (ipa_tdesc): Declare.
5552         * tdesc.c: New file.
5553         * tdesc.h: New file.
5554         * tracepoint.c: Include tdesc.h.
5555         [IN_PROCESS_AGENT] (ipa_tdesc): Define.
5556         (get_context_regcache): Adjust to pass ipa_tdesc down.
5557         (do_action_at_tracepoint): Adjust to get the register cache size
5558         from the context regcache's description.
5559         (traceframe_walk_blocks): Adjust to get the register cache size
5560         from the current trace frame's description.
5561         (traceframe_get_pc): Adjust to get current trace frame's
5562         description and pass it down.
5563         (gdb_collect): Adjust to get the register cache size from the
5564         IPA's description.
5565         * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
5566         (gdbserver_xmltarget): Delete.
5567         (initialize_low_tracepoint): Set the ipa's target description.
5568         * linux-i386-ipa.c (tdesc_i386_linux): Declare.
5569         (initialize_low_tracepoint): Set the ipa's target description.
5570         * linux-x86-low.c: Include tdesc.h.
5571         [__x86_64__] (is_64bit_tdesc): New.
5572         (ps_get_thread_area, x86_get_thread_area): Use it.
5573         (i386_cannot_store_register): Rename to ...
5574         (x86_cannot_store_register): ... this.  Use is_64bit_tdesc.
5575         (i386_cannot_fetch_register): Rename to ...
5576         (x86_cannot_fetch_register): ... this.  Use is_64bit_tdesc.
5577         (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
5578         to new interface.
5579         (target_regsets): Rename to ...
5580         (x86_regsets): ... this.
5581         (x86_get_pc, x86_set_pc): Adjust register_size calls to new
5582         interface.
5583         (x86_siginfo_fixup): Use is_64bit_tdesc.
5584         [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
5585         (tdesc_x32_avx_linux, tdesc_x32_linux)
5586         (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
5587         Declare.
5588         (x86_linux_update_xmltarget): Delete.
5589         (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
5590         (have_ptrace_getfpxregs, have_ptrace_getregset): New.
5591         (AMD64_LINUX_USER64_CS): New.
5592         (x86_linux_read_description): New, based on
5593         x86_linux_update_xmltarget.
5594         (same_process_callback): New.
5595         (x86_arch_setup_process_callback): New.
5596         (x86_linux_update_xmltarget): New.
5597         (x86_regsets_info): New.
5598         (amd64_linux_regs_info): New.
5599         (i386_linux_usrregs_info): New.
5600         (i386_linux_regs_info): New.
5601         (x86_linux_regs_info): New.
5602         (x86_arch_setup): Reimplement.
5603         (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
5604         (x86_emit_ops): Ditto.
5605         (the_low_target): Adjust.  Install x86_linux_regs_info,
5606         x86_cannot_fetch_register, and x86_cannot_store_register.
5607         (initialize_low_arch): New.
5608         * linux-ia64-low.c (tdesc_ia64): Declare.
5609         (ia64_fetch_register): Adjust.
5610         (ia64_usrregs_info, regs_info): New globals.
5611         (ia64_regs_info): New function.
5612         (the_low_target): Adjust.
5613         (initialize_low_arch): New function.
5614         * linux-sparc-low.c (tdesc_sparc64): Declare.
5615         (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
5616         Adjust.
5617         (sparc_arch_setup): New function.
5618         (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
5619         (the_low_target): Adjust.
5620         (initialize_low_arch): New function.
5621         * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
5622         (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
5623         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
5624         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
5625         (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
5626         (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
5627         (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
5628         (tdesc_powerpc_isa205_vsx64l): Declare.
5629         (ppc_cannot_store_register, ppc_collect_ptrace_register)
5630         (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
5631         (ppc_set_pc, ppc_get_hwcap): Adjust.
5632         (ppc_usrregs_info): Forward declare.
5633         (!__powerpc64__) ppc_regmap_adjusted: New global.
5634         (ppc_arch_setup): Adjust to the current process'es target
5635         description.
5636         (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
5637         (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
5638         (ppc_store_evrregset): Adjust.
5639         (target_regsets): Rename to ...
5640         (ppc_regsets): ... this, and make static.
5641         (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
5642         (ppc_regs_info): New function.
5643         (the_low_target): Adjust.
5644         (initialize_low_arch): New function.
5645         * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
5646         (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
5647         (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
5648         (tdesc_s390x_linux64v2): Declare.
5649         (s390_collect_ptrace_register, s390_supply_ptrace_register)
5650         (s390_fill_gregset, s390_store_last_break): Adjust.
5651         (target_regsets): Rename to ...
5652         (s390_regsets): ... this, and make static.
5653         (s390_get_pc, s390_set_pc): Adjust.
5654         (s390_get_hwcap): New target_desc parameter, and use it.
5655         [__s390x__] (have_hwcap_s390_high_gprs): New global.
5656         (s390_arch_setup): Adjust to set the current process'es target
5657         description.  Don't adjust the regmap.
5658         (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
5659         [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
5660         (regs_info_3264): New globals.
5661         (s390_regs_info): New function.
5662         (the_low_target): Adjust.
5663         (initialize_low_arch): New function.
5664         * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
5665         (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
5666         [__mips64] (init_registers_mips_linux)
5667         (init_registers_mips_dsp_linux): Delete defines.
5668         [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
5669         (have_dsp): New global.
5670         (mips_read_description): New, based on mips_arch_setup.
5671         (mips_arch_setup): Reimplement.
5672         (get_usrregs_info): New function.
5673         (mips_cannot_fetch_register, mips_cannot_store_register)
5674         (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
5675         (mips_fill_fpregset, mips_store_fpregset): Adjust.
5676         (target_regsets): Rename to ...
5677         (mips_regsets): ... this, and make static.
5678         (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
5679         (dsp_regs_info, regs_info): New globals.
5680         (mips_regs_info): New function.
5681         (the_low_target): Adjust.
5682         (initialize_low_arch): New function.
5683         * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
5684         (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
5685         Declare.
5686         (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
5687         (arm_read_description): New, with bits factored from
5688         arm_arch_setup.
5689         (arm_arch_setup): Reimplement.
5690         (target_regsets): Rename to ...
5691         (arm_regsets): ... this, and make static.
5692         (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
5693         (arm_regs_info): New function.
5694         (the_low_target): Adjust.
5695         (initialize_low_arch): New function.
5696         * linux-m68k-low.c (tdesc_m68k): Declare.
5697         (target_regsets): Rename to ...
5698         (m68k_regsets): ... this, and make static.
5699         (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
5700         (m68k_regs_info): New function.
5701         (m68k_arch_setup): New function.
5702         (the_low_target): Adjust.
5703         (initialize_low_arch): New function.
5704         * linux-sh-low.c (tdesc_sharch): Declare.
5705         (target_regsets): Rename to ...
5706         (sh_regsets): ... this, and make static.
5707         (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
5708         (sh_regs_info, sh_arch_setup): New functions.
5709         (the_low_target): Adjust.
5710         (initialize_low_arch): New function.
5711         * linux-bfin-low.c (tdesc_bfin): Declare.
5712         (bfin_arch_setup): New function.
5713         (bfin_usrregs_info, regs_info): New globals.
5714         (bfin_regs_info): New function.
5715         (the_low_target): Adjust.
5716         (initialize_low_arch): New function.
5717         * linux-cris-low.c (tdesc_cris): Declare.
5718         (cris_arch_setup): New function.
5719         (cris_usrregs_info, regs_info): New globals.
5720         (cris_regs_info): New function.
5721         (the_low_target): Adjust.
5722         (initialize_low_arch): New function.
5723         * linux-cris-low.c (tdesc_crisv32): Declare.
5724         (cris_arch_setup): New function.
5725         (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
5726         (cris_regs_info): New function.
5727         (the_low_target): Adjust.
5728         (initialize_low_arch): New function.
5729         * linux-m32r-low.c (tdesc_m32r): Declare.
5730         (m32r_arch_setup): New function.
5731         (m32r_usrregs_info, regs_info): New globals.
5732         (m32r_regs_info): Adjust.
5733         (initialize_low_arch): New function.
5734         * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
5735         (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
5736         (tic6x_usrregs_info): Forward declare.
5737         (tic6x_read_description): New function, based on ...
5738         (tic6x_arch_setup): ... this.  Reimplement.
5739         (target_regsets): Rename to ...
5740         (tic6x_regsets): ... this, and make static.
5741         (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
5742         (tic6x_regs_info): New function.
5743         (the_low_target): Adjust.
5744         (initialize_low_arch): New function.
5745         * linux-xtensa-low.c (tdesc_xtensa): Declare.
5746         (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
5747         (target_regsets): Rename to ...
5748         (xtensa_regsets): ... this, and make static.
5749         (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
5750         globals.
5751         (xtensa_arch_setup, xtensa_regs_info): New functions.
5752         (the_low_target): Adjust.
5753         (initialize_low_arch): New function.
5754         * linux-nios2-low.c (tdesc_nios2_linux): Declare.
5755         (nios2_arch_setup): Set the current process'es tdesc.
5756         (target_regsets): Rename to ...
5757         (nios2_regsets): ... this.
5758         (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
5759         (nios2_regs_info): New function.
5760         (the_low_target): Adjust.
5761         (initialize_low_arch): New function.
5762         * linux-aarch64-low.c (tdesc_aarch64): Declare.
5763         (aarch64_arch_setup): Set the current process'es tdesc.
5764         (target_regsets): Rename to ...
5765         (aarch64_regsets): ... this.
5766         (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
5767         (aarch64_regs_info): New function.
5768         (the_low_target): Adjust.
5769         (initialize_low_arch): New function.
5770         * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
5771         globals.
5772         (target_regsets): Rename to ...
5773         (tile_regsets): ... this.
5774         (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
5775         (tile_regs_info): New function.
5776         (tile_arch_setup): Set the current process'es tdesc.
5777         (the_low_target): Adjust.
5778         (initialize_low_arch): New function.
5779         * spu-low.c (tdesc_spu): Declare.
5780         (spu_create_inferior, spu_attach): Set the new process'es tdesc.
5781         * win32-arm-low.c (tdesc_arm): Declare.
5782         (arm_arch_setup): New function.
5783         (the_low_target): Install arm_arch_setup instead of
5784         init_registers_arm.
5785         * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
5786         (init_windows_x86): Rename to ...
5787         (i386_arch_setup): ... this.  Set `win32_tdesc'.
5788         (the_low_target): Adjust.
5789         * win32-low.c (win32_tdesc): New global.
5790         (child_add_thread): Don't create the thread cache here.
5791         (do_initial_child_stuff): Set the new process'es tdesc.
5792         * win32-low.h (struct target_desc): Forward declare.
5793         (win32_tdesc): Declare.
5794         * lynx-i386-low.c (tdesc_i386): Declare global.
5795         (lynx_i386_arch_setup): Set `lynx_tdesc'.
5796         * lynx-low.c (lynx_tdesc): New global.
5797         (lynx_add_process): Set the new process'es tdesc.
5798         * lynx-low.h (struct target_desc): Forward declare.
5799         (lynx_tdesc): Declare global.
5800         * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
5801         (lynx_ppc_arch_setup): Set `lynx_tdesc'.
5802         * nto-low.c (nto_tdesc): New global.
5803         (do_attach): Set the new process'es tdesc.
5804         * nto-low.h (struct target_desc): Forward declare.
5805         (nto_tdesc): Declare.
5806         * nto-x86-low.c (tdesc_i386): Declare.
5807         (nto_x86_arch_setup): Set `nto_tdesc'.
5808
5809 2013-06-04  Gary Benson  <gbenson@redhat.com>
5810
5811         * server.c (handle_query): Add "augmented-libraries-svr4-read+"
5812         to qSupported response when appropriate.
5813         (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
5814         with nonzero-length annex.
5815         * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
5816         arguments supplied in annex.
5817
5818 2013-05-31  Doug Evans  <dje@google.com>
5819
5820         PR server/15594
5821         * linux-x86-low.c (ps_get_thread_area): Properly extend address to
5822         64 bits in 64-cross-32 environment.
5823
5824 2013-05-28  Pedro Alves  <palves@redhat.com>
5825
5826         * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
5827         (aarch64-without-fpu.c): Delete rule.
5828         * configure.srv (aarch64*-*-linux*): Remove references to
5829         aarch64-without-fpu.o and aarch64-without-fpu.xml.
5830         * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
5831         declaration.
5832
5833 2013-05-24  Pedro Alves  <palves@redhat.com>
5834
5835         * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
5836         instead of strchr/decode_address.  Error if the range isn't split
5837         with a ','.  Don't assume there's be a ':' in the action.
5838
5839 2013-05-23  Yao Qi  <yao@codesourcery.com>
5840             Pedro Alves  <palves@redhat.com>
5841
5842         * linux-low.c (lwp_in_step_range): New function.
5843         (linux_wait_1): If the thread was range stepping and stopped
5844         outside the stepping range, report the stop to GDB.  Otherwise,
5845         continue stepping.  Add range stepping debug output.
5846         (linux_set_resume_request): Copy the step range from the resume
5847         request to the lwp.
5848         (linux_supports_range_stepping): New.
5849         (linux_target_ops) <supports_range_stepping>: Set to
5850         linux_supports_range_stepping.
5851         * linux-low.h (struct linux_target_ops)
5852         <supports_range_stepping>: New field.
5853         (struct lwp_info) <step_range_start, step_range_end>: New fields.
5854         * linux-x86-low.c (x86_supports_range_stepping): New.
5855         (the_low_target) <supports_range_stepping>: Set to
5856         x86_supports_range_stepping.
5857         * server.c (handle_v_cont): Handle 'r' action.
5858         (handle_v_requests): Append ";r" if the target supports range
5859         stepping.
5860         * target.h (struct thread_resume) <step_range_start,
5861         step_range_end>: New fields.
5862         (struct target_ops) <supports_range_stepping>:
5863         New field.
5864         (target_supports_range_stepping): New macro.
5865
5866 2013-05-17  Joel Brobecker  <brobecker@adacore.com>
5867
5868         * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
5869         confusion in comment.
5870
5871 2013-05-17  Joel Brobecker  <brobecker@adacore.com>
5872
5873         * lynx-low.c (struct process_info_private): New type.
5874         (lynx_add_process): New function.
5875         (lynx_create_inferior, lynx_attach): Replace calls to
5876         add_process by calls to lynx_add_process.
5877         (lynx_resume): If PTID is null, then try using
5878         current_process()->private->last_wait_event_ptid.
5879         Add comments.
5880         (lynx_clear_inferiors): Delete.  The contents of that function
5881         has been inlined in lynx_mourn;
5882         (lynx_wait_1): Save the ptid in the process's private data.
5883         (lynx_mourn): Free the process' private data.  Replace call
5884         to lynx_clear_inferiors by call to clear_inferiors.
5885
5886 2013-05-17  Yao Qi  <yao@codesourcery.com>
5887
5888         * i386-low.c (i386_length_and_rw_bits): Move the comment to
5889         the right place.
5890
5891 2013-05-16  Luis Machado  <lgustavo@codesourcery.com>
5892
5893         * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
5894         PT_DATA_ADDR and PT_TEXT_END_ADDR.  Update comments.
5895         (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
5896         PT_TEXT_END_ADDR guards.  Update comments.
5897         (linux_target_op) <read_offsets>: Conditionally define to
5898         linux_read_offsets if the target is UCLIBC and if it defines
5899         PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
5900
5901 2013-05-06  Sandra Loosemore  <sandra@codesourcery.com>
5902             Andrew Jenner  <andrew@codesourcery.com>
5903
5904         * Makefile.in (SFILES): Add linux-nios2-low.c.
5905         (clean): Add action to delete nios2-linux.c.
5906         (nios2-linux.c): New rule.
5907         * configure.srv: Add nios2*-*-linux*.
5908         * linux-nios2-low.c: New.
5909
5910 2013-05-03  Hafiz Abid Qadeer  <abidh@codesourcery.com>
5911
5912         * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
5913
5914 2013-04-25  Hui Zhu  <hui@codesourcery.com>
5915
5916         PR gdb/15186
5917         * ax.c (ax_printf): Add fflush.
5918
5919 2013-04-22  Tom Tromey  <tromey@redhat.com>
5920
5921         * Makefile.in (SFILES): Add filestuff.c.
5922         (OBS): Add filestuff.o.
5923         (filestuff.o): New target.
5924         * config.in, configure: Rebuild.
5925         * configure.ac: Check for fdwalk, pipe2.
5926
5927 2013-04-17  Pedro Alves  <palves@redhat.com>
5928
5929         * configure.ac (USE_THREAD_DB): Delete variable.
5930         (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
5931         Don't AC_SUBST USE_THREAD_DB.
5932         * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
5933         * config.in, configure: Regenerate.
5934
5935 2013-04-16  Pedro Alves  <palves@redhat.com>
5936
5937         * linux-low.h (struct lwp_info) <thread_known>: Move under
5938         the USE_THREAD_DB #ifdef.
5939
5940 2013-04-16  Pedro Alves  <palves@redhat.com>
5941
5942         * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
5943         (linux-low.o): Delete rule.
5944         * linux-low.h: Always include "gdb_thread_db.h" instead of
5945         conditionally including thread_db.h.
5946         (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
5947         HAVE_THREAD_DB_H.
5948
5949 2013-04-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
5950
5951         * Makefile.in (install-only): Fix make install regression.
5952
5953 2013-04-05  Jan Kratochvil  <jan.kratochvil@redhat.com>
5954
5955         Convert man pages to texinfo, new gdbinit.5 texinfo page.
5956         * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
5957         installation.
5958         * gdbserver.1: Remove.
5959
5960 2013-03-22  Pedro Alves  <palves@redhat.com>
5961
5962         * linux-low.c (handle_extended_wait): Don't call
5963         linux_enable_event_reporting.
5964
5965 2013-03-15  Tony Theodore  <tonyt@logyst.com>
5966
5967         PR build/9098:
5968         * Makefile.in (SHELL): Use @SHELL@.
5969
5970 2013-03-14  Sergio Durigan Junior  <sergiodj@redhat.com>
5971
5972         * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
5973         compiler warning.
5974
5975 2013-03-13  Joel Brobecker  <brobecker@adacore.com>
5976
5977         * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
5978         Remove extraneous NULL element.
5979
5980 2013-03-13  Yao Qi  <yao@codesourcery.com>
5981
5982         * tracepoint.c (traceframe_read_tsv): Look for the last matched
5983         'V' block in trace frame.
5984
5985 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
5986
5987         * target.h (struct target_ops): Add btrace ops.
5988         (target_supports_btrace): New macro.
5989         (target_enable_btrace): New macro.
5990         (target_disable_btrace): New macro.
5991         (target_read_btrace): New macro.
5992         * gdbthread.h (struct thread_info): Add btrace field.
5993         * server.c: Include btrace-common.h.
5994         (handle_btrace_general_set): New function.
5995         (handle_btrace_enable): New function.
5996         (handle_btrace_disable): New function.
5997         (handle_general_set): Call handle_btrace_general_set.
5998         (handle_qxfer_btrace): New function.
5999         (struct qxfer qxfer_packets[]): Add btrace entry.
6000         * inferiors.c (remove_thread): Disable btrace.
6001         * linux-low: Include linux-btrace.h.
6002         (linux_low_enable_btrace): New function.
6003         (linux_low_read_btrace): New function.
6004         (linux_target_ops): Add btrace ops.
6005         * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
6006         Add srv_linux_btrace=yes.
6007         (x86_64-*-linux*): Add linux-btrace.o.
6008         Add srv_linux_btrace=yes.
6009         * configure.ac: Define HAVE_LINUX_BTRACE.
6010         * config.in: Regenerated.
6011         * configure: Regenerated.
6012
6013 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
6014
6015         * server.c (handle_qxfer): Preserve error message if -3 is
6016         returned.
6017         (qxfer): Document the -3 return value.
6018
6019 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
6020
6021         * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
6022         (linux_btrace_h): New variable.
6023         (linux-btrace.o): New rule.
6024
6025 2013-03-08  Stan Shebs  <stan@codesourcery.com>
6026             Hafiz Abid Qadeer  <abidh@codesourcery.com>
6027
6028         * tracepoint.c (trace_buffer_size): New global.
6029         (DEFAULT_TRACE_BUFFER_SIZE): New define.
6030         (init_trace_buffer): Change to one-argument function. Allocate
6031         trace buffer memory.
6032         (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
6033         handle QTBuffer:size packet.
6034         (cmd_bigqtbuffer_size): New function.
6035         (initialize_tracepoint): Call init_trace_buffer with
6036         DEFAULT_TRACE_BUFFER_SIZE.
6037         * server.c (handle_query): Add QTBuffer:size in the
6038         supported packets.
6039
6040 2013-03-07  Yao Qi  <yao@codesourcery.com>
6041
6042         * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
6043         (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
6044         of -1.
6045         (cmd_qtsp): Adjust condition.  Do post increment.
6046         Set cur_action and cur_step_action back to 0.
6047
6048 2013-03-07  Jeremy Bennett  <jeremy.bennett@embecosm.com>
6049
6050         PR server/15236
6051         * linux-low.c (linux_write_memory): Return early success if LEN is
6052         zero.
6053
6054 2013-03-05  Corinna Vinschen  <vinschen@redhat.de>
6055
6056         * configure.srv: Add x86_64-*-cygwin* as target.
6057
6058 2013-02-28  Tom Tromey  <tromey@redhat.com>
6059
6060         * configure.ac: Invoke AC_SYS_LARGEFILE.
6061         * configure, config.in: Rebuild.
6062
6063 2013-02-28  Corinna Vinschen  <vinschen@redhat.com>
6064
6065         * win32-low.c: Throughout, fix format strings and casts of
6066         printf-like functions to avoid type related warnings on all
6067         platforms.
6068         (get_child_debug_event): Print dwDebugEventCode as hex since
6069         that's how it's usually documented.
6070
6071 2013-02-28  Yao Qi  <yao@codesourcery.com>
6072
6073         * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
6074         pulongest.
6075
6076 2013-02-27  Jiong Wang  <jiwang@tilera.com>
6077
6078         * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
6079         (reg-tilegx32.c): New rule.
6080         * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
6081         * linux-tile-low.c (tile_arch_setup): New function.  Invoke
6082         different register info initializer according to elf class.
6083         (init_registers_tilgx32): New function.  The tilegx32 register info
6084         initializer.
6085         (tile_fill_gregset): Use "uint_reg_t" to represent register size.
6086         (tile_store_gregset): Likewise.
6087
6088 2013-02-27  Yao Qi  <yao@codesourcery.com>
6089
6090         * server.c (process_point_options): Print debug message when
6091         debug_threads is true.
6092
6093 2013-02-26  Yao Qi  <yao@codesourcery.com>
6094
6095         * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
6096
6097 2013-02-19  Pedro Alves  <palves@redhat.com>
6098             Kai Tietz <ktietz@redhat.com>
6099
6100         PR gdb/15161
6101
6102         * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
6103         instead of strtoul to extract address from packet.
6104         (process_serial_event) <'z'>: Likewise.
6105
6106 2013-02-18  Yao Qi  <yao@codesourcery.com>
6107
6108         * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
6109
6110 2013-02-14  Pedro Alves  <palves@redhat.com>
6111
6112         Plug memory leak.
6113
6114         * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
6115         TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
6116
6117 2013-02-14  Pedro Alves  <palves@redhat.com>
6118
6119         * tracepoint.c (cmd_qtdpsrc): Use savestring.
6120
6121 2013-02-14  Pedro Alves  <palves@redhat.com>
6122
6123         * tracepoint.c (save_string): Delete.
6124         (add_tracepoint_action): Use savestring instead of save_string.
6125
6126 2013-02-12  Pedro Alves  <palves@redhat.com>
6127
6128         * linux-xtensa-low.c: Ditto.
6129         * xtensa-xtregs.c: Ditto.
6130
6131 2013-02-12  Sanimir Agovic  <sanimir.agovic@intel.com>
6132
6133         * thread-db.c (thread_db_get_tls_address): NULL pointer check
6134         thread_db.
6135
6136 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
6137
6138         * linux-aarch64-low.c (aarch64_arch_setup): Clamp
6139         aarch64_num_wp_regs and aarch64_num_bp_regs to
6140         AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
6141
6142 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
6143
6144         * linux-aarch64-low.c (ps_get_thread_area): Replace
6145         PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
6146
6147 2013-02-04  Jim MacArthur  <jim.macarthur@arm.com>
6148             Marcus Shawcroft  <marcus.shawcroft@arm.com>
6149             Nigel Stephens  <nigel.stephens@arm.com>
6150             Yufeng Zhang  <yufeng.zhang@arm.com>
6151
6152         * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
6153         (aarch64.c, aarch64-without-fpu.c): New targets.
6154         * configure.srv (aarch64*-*-linux*): New.
6155         * linux-aarch64-low.c: New file.
6156
6157 2013-02-04  Marcus Shawcroft  <marcus.shawcroft@arm.com>
6158
6159         * linux-low.c (handle_extended_wait, linux_create_inferior)
6160         (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
6161         (dequeue_one_deferred_signal, linux_resume_one_thread)
6162         (fetch_register, linux_write_memory, linux_enable_event_reporting)
6163         (linux_tracefork_grandchild, linux_test_for_tracefork)
6164         (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
6165         PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
6166         where the argument is 0.
6167
6168 2013-01-25  Yao Qi  <yao@codesourcery.com>
6169
6170         * event-loop.c: Include "queue.h".
6171         (gdb_event_p): New typedef.
6172         (struct gdb_event) <next_event>: Remove.
6173         (event_queue): Change to QUEUE(gdb_event_p).
6174         (async_queue_event): Remove.
6175         (gdb_event_xfree): New.
6176         (initialize_event_loop): New.
6177         (process_event): Use API from QUEUE.
6178         (wait_for_event): Likewise.
6179         * server.c (main): Call initialize_event_loop.
6180         * server.h (initialize_event_loop): Declare.
6181
6182 2013-01-18  Yao Qi  <yao@codesourcery.com>
6183
6184         * ax.h (struct eval_agent_expr_context): New.
6185         (gdb_eval_agent_expr): Update declaration.
6186         * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
6187         TFRAME.  Add new argument CTX.
6188         * server.h (struct eval_agent_expr_context): Declare.
6189         (agent_mem_read, agent_tsv_read): Update declaration.
6190         (agent_mem_read_string): Likewise.
6191         * tracepoint.c (eval_tracepoint_agent_expr): Remove.
6192         (add_traceframe_block): Add new argument TPOINT.
6193         Increase TPOINT->traceframe_usage.
6194         (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
6195         eval_tracepoint_agent_expr.
6196         (condition_true_at_tracepoint): Likewise.
6197         (agent_mem_read): Remove argument TFRAME.  Add argument CTX.
6198         (agent_mem_read_string, agent_tsv_read): Likewise.
6199
6200 2013-01-16  Yao Qi  <yao@codesourcery.com>
6201
6202         * linux-low.c (linux_resume_one_lwp): Don't check
6203         'lwp->bp_reinsert != 0'.
6204
6205 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
6206             Pedro Alves  <palves@redhat.com>
6207
6208         * lynx-low.c (ptrace_request_to_str): Define a temporary
6209         macro and use it to simplify this function's implementation.
6210
6211 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
6212
6213         * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
6214         sets errno.
6215
6216 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
6217
6218         * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
6219
6220 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
6221
6222         * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
6223
6224 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
6225
6226         * lynx-low.c (lynx_resume): Use the resume_info parameter
6227         to determine the ptid for the lynx_ptrace call, unless
6228         it is equal to minus_one_ptid, in which case we use the
6229         ptid of the current_inferior.
6230         (lynx_wait_1): After having received a thread create/exit
6231         event, resume the inferior's execution using the signaling
6232         thread's ptid, rather than the old ptid.
6233
6234 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
6235
6236         * lynx-low.c (lynx_resume): Delete variable ret.
6237
6238 2013-01-01  Joel Brobecker  <brobecker@adacore.com>
6239
6240         * gdbreplay.c (gdbreplay_version): Update copyright year.
6241         * server.c (gdbserver_version): Likewise.
6242
6243 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
6244
6245         * lynx-low.c (lynx_wait_1): Add debug trace before adding
6246         new thread.
6247
6248 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
6249
6250         * lynx-low.c (ptrace_request_to_str): Add handling for
6251         PTRACE_GETTRACESIG.
6252
6253 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
6254
6255         * lynx-low.c (lynx_attach): Delete variable new_process.
6256
6257 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
6258
6259         * lynx-low.c (lynx_create_inferior): Delete variable
6260         new_process.
6261
6262 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
6263
6264         * lynx-low.c (ptrace_request_to_str): Do not handle
6265         PTRACE_GETTHREADLIST if this macro does not exist.
6266
6267 2012-12-15  Yao Qi  <yao@codesourcery.com>
6268
6269         * Makefile.in (OBS): Add notif.o.
6270         * notif.c, notif.h: New.
6271         * server.c: Include "notif.h".
6272         (struct vstop_notif) <next>: Remove.
6273         <base>: New field.
6274         (queue_stop_reply): Update.
6275         (push_event, send_next_stop_reply): Remove.
6276         (discard_queued_stop_replies): Update.
6277         (notif_stop): New variable.
6278         (handle_v_stopped): Remove.
6279         (handle_v_requests): Don't call handle_v_stopped.  Call
6280         handle_ack_notif instead.
6281         (queue_stop_reply_callback): Call notif_event_enque instead
6282         of queue_stop_reply.
6283         (handle_status): Don't call send_next_stop_reply, call
6284         notif_write_event instead.
6285         (kill_inferior_callback): Likewise.
6286         (detach_or_kill_inferior_callback): Likewise.
6287         (main): Call initialize_notif.
6288         (process_serial_event): Call QUEUE_is_empty.
6289         (handle_target_event): Call notif_push instead of push event.
6290         * server.h (push_event): Remove declaration.
6291
6292 2012-12-10  Tom Tromey  <tromey@redhat.com>
6293
6294         * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
6295         (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
6296         macros.
6297         (.c.o): Rewrite.
6298         (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
6299         (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
6300         (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
6301         (amd64-linux-ipa.o, ax.o): Rewrite.
6302         (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
6303         (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
6304         (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
6305         (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
6306         (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
6307         (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
6308         (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
6309         (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
6310         (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
6311         (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
6312         (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
6313         (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
6314         (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
6315         (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
6316         (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
6317         (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
6318         (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
6319         (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
6320         (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
6321         (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
6322         (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
6323         (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
6324         (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
6325         (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
6326         (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
6327         (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
6328         (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
6329         (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
6330         (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
6331         (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
6332         (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
6333         (reg-tilegx.o): Remove.
6334         (all_object_files): New macro.
6335         Include .deps files.
6336         * aclocal.m4, configure: Rebuild.
6337         * acinclude.m4: Include depstand.m4, lead-dot.m4.
6338         * configure.ac: Invoke ZW_CREATE_DEPDIR,
6339         ZW_PROG_COMPILER_DEPENDENCIES.  Compute GMAKE condition.
6340
6341 2012-12-05  Tom Tromey  <tromey@redhat.com>
6342
6343         PR gdb/14917:
6344         * server.h (current_insn_ptr, emit_error): Declare 'extern'.
6345
6346 2012-11-28  Markus Metzger  <markus.t.metzger@intel.com>
6347
6348         * configure.ac: Check for linux/perf_event.h.
6349         * config.in: Regenerated.
6350         * configure: Regenerated.
6351
6352 2012-11-26  Maxime Villard  <rustyBSD@gmx.fr>
6353
6354         * hostio.c (handle_readlink): Decrease buffer size
6355         parameter passed to readlink by one byte.
6356
6357 2012-11-26  Yao Qi  <yao@codesourcery.com>
6358
6359         * configure.ac (build_warnings): Append '-Wempty-body'.
6360         * configure: Regenerated.
6361         * linux-low.c (linux_create_inferior): Use braces for empty 'if'
6362         body.
6363
6364 2012-11-15  Pierre Muller  <muller@sourceware.org>
6365
6366         * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
6367         * config.in: Regenerate.
6368         * configure: Regenerate.
6369         * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
6370         Use "gdb_wait.h" header instead of <sys/wait.h> header.
6371         * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6372         * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
6373         header.
6374         * server.c: Remove HAVE_WAIT_H conditional.  Use "gdb_wait.h" header
6375         instead of <sys/wait.h> header.
6376         * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6377
6378 2012-11-13 Markus Metzger  <markus.t.metzger@intel.com>
6379
6380         * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
6381         (various make rules): Remove -DGDBSERVER
6382
6383 2012-11-09  Yao Qi  <yao@codesourcery.com>
6384
6385         * spu-low.c (current_ptid): Move it to ..
6386         * gdbthread.h: ... here.  New.
6387         * remote-utils.c (read_ptid): Use macro 'current_ptid'.
6388         * server.c (myresume, process_serial_event): Likewise.
6389         * thread-db.c (thread_db_find_new_threads): Likewise.
6390         * tracepoint.c (run_inferior_command): Likewise.
6391
6392 2012-10-01  Andrew Burgess  <aburgess@broadcom.com>
6393
6394         * server.c (handle_search_memory_1): Include access length in
6395         warning message.
6396
6397 2012-09-05  Michael Brandt  <michael.brandt@axis.com>
6398
6399         * linux-crisv32-low.c: Fix compile errors.
6400
6401 2012-09-04  Yao Qi  <yao@codesourcery.com>
6402
6403         * tracepoint.c (cmd_qtsv): Adjust debug message.
6404         Don't check CUR_TPOINT.
6405
6406 2012-08-28  Yao Qi  <yao@codesourcery.com>
6407
6408         * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
6409         * server.h: Include 'libiberty.h' and 'ansidecl.h'.
6410         (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
6411         Remove declarations of xmalloc, xreallloc, xstrdup and
6412         freeargv.
6413         * Makefile.in (libiberty_h): New.
6414         (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
6415         (linux-bfin-low.o): Append dependency 'libiberty.h'.
6416
6417 2012-08-23  Yao Qi  <yao@codesourcery.com>
6418
6419         * server.h: Remove declaration of 'xsnprintf'.
6420
6421 2012-08-22  Keith Seitz  <keiths@redhat.com>
6422
6423         * server.h: Include build-gnulib-gbserver/config.h.
6424         * gdbreplay.c: Likewise.
6425
6426 2012-08-08  Doug Evans  <dje@google.com>
6427
6428         * Makefile.in (SFILES): Add gdb_vecs.c.
6429         (OBS): Add gdb_vecs.o.
6430         (gdb_vecs_h, host_defs_h): New variables.
6431         (thread-db.o): Add $(gdb_vecs_h) dependency.
6432         (gdb_vecs.o): New rule.
6433         * thread-db.c: #include "gdb_vecs.h".
6434         (thread_db_load_search): Use a vector to iterate over path elements.
6435         Handle text appearing after "$pdir".
6436
6437         * configure.ac: Add check for strstr.
6438         * config.in: Regenerate.
6439         * configure: Regenerate.
6440
6441 2012-08-02  Ulrich Weigand  <ulrich.weigand@linaro.org>
6442
6443         * hostio.c (handle_pread): If pread fails, fall back to attempting
6444         lseek/read.
6445         (handle_pwrite): Likewise for pwrite.
6446
6447 2012-08-01  Ulrich Weigand  <ulrich.weigand@linaro.org>
6448
6449         * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
6450         between unsupported TYPE and unimplementable ADDR/LEN combination.
6451         (arm_insert_point): Act on new return value.
6452
6453 2012-07-31  Pedro Alves  <palves@redhat.com>
6454
6455         * server.c (process_point_options): Only skip tokens if we find
6456         one that is unrecognized.  Don't treat 'X' specially while
6457         skipping unrecognized tokens.
6458
6459 2012-07-30  Ulrich Weigand  <ulrich.weigand@linaro.org>
6460
6461         * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
6462         to 4-byte-align HW breakpoint addresses for Thumb.
6463
6464 2012-07-27  Yao Qi  <yao@codesourcery.com>
6465
6466         PR remote/14161.
6467
6468         * server.h: Declare gdb_agent_about_to_close.
6469         * target.c (kill_inferior): Include "agent.h".
6470         New.  Send command 'kill'.
6471         * target.h (kill_inferior): Removed macro.
6472         * tracepoint.c (gdb_agent_about_to_close): New.
6473         (gdb_agent_helper_thread): Handle command 'close'.
6474         Wait endlessly until the inferior stops.
6475         Install gdb_agent_remove_socket to atexit hook.
6476         (agent_socket_name): New static variable.
6477         (gdb_agent_socket_init): Replace local variable 'name' with
6478         'agent_socket_name'.
6479         (gdb_agent_remove_socket): New.
6480
6481 2012-07-27  Yao Qi  <yao@codesourcery.com>
6482
6483         * server.c (process_point_options): Stop at 'X' when parsing.
6484
6485 2012-07-19  Michael Eager  <eager@eagercon.com>
6486
6487         * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
6488         to hw_execute.
6489         * linux-x86-low.c (x86_insert_point, x86_remove_point):
6490         Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
6491         hardware breakpoint.
6492
6493 2012-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
6494
6495         * gdbserver/linux-low.c (initialize_low): Call
6496         linux_ptrace_init_warnings.
6497
6498 2012-07-02  Doug Evans  <dje@google.com>
6499
6500         * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
6501         pointer to int.
6502
6503 2012-07-02  Stan Shebs  <stan@codesourcery.com>
6504
6505         * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
6506         (ax.o): Add it to build rule.
6507         (ax-ipa.o): Ditto.
6508         (OBS): Add format.o.
6509         (IPA_OBS): Add format.o.
6510         * server.c (handle_query): Claim support for breakpoint commands.
6511         (process_point_options): Add command case.
6512         (process_serial_event): Leave running if there are printfs in
6513         effect.
6514         * mem-break.h (any_persistent_commands): Declare.
6515         (add_breakpoint_commands): Declare.
6516         (gdb_no_commands_at_breakpoint): Declare.
6517         (run_breakpoint_commands): Declare.
6518         * mem-break.c (struct point_command_list): New struct.
6519         (struct breakpoint): New field command_list.
6520         (any_persistent_commands): New function.
6521         (add_commands_to_breakpoint): New function.
6522         (add_breakpoint_commands): New function.
6523         (gdb_no_commands_at_breakpoint): New function.
6524         (run_breakpoint_commands): New function.
6525         * linux-low.c (linux_wait_1): Test for and run breakpoint commands
6526         locally.
6527         * ax.c: Include format.h.
6528         (ax_printf): New function.
6529         (gdb_eval_agent_expr): Add printf opcode.
6530
6531 2012-06-13  Yao Qi  <yao@codesourcery.com>
6532
6533         * server.c (start_inferior): Remove duplicated writes to fields
6534         'last_resume_kind' and 'last_status' of 'current_inferior'.
6535
6536 2012-06-12  Yao Qi  <yao@codesourcery.com>
6537             Pedro Alves  <palves@redhat.com>
6538
6539         * linux-low.c (linux_set_resume_request): Simplify predicate.  Add
6540         comment.
6541         * server.c (handle_v_cont): Extend comment.
6542
6543 2012-06-11  Yao Qi  <yao@codesourcery.com>
6544
6545         * linux-low.c (linux_attach): Add 'static'.
6546
6547 2012-06-06  Yao Qi  <yao@codesourcery.com>
6548
6549         * ax.c (gdb_eval_agent_expr): Print `top' in hex.
6550
6551 2012-06-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
6552
6553         Fix gcc -flto compilation warning.
6554         * server.c (main): Make variable multi_mode and attach volatile.
6555
6556 2012-05-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
6557
6558         * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
6559         if the platform doesn't know about it.
6560
6561 2012-05-30  Jeff Kenton  <jkenton@tilera.com>
6562
6563         * Makefile.in (SFILES): Add linux-tile-low.c.
6564         (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
6565         * configure.srv: Handle tilegx-*-linux*.
6566         * linux-tile-low.c: New file.
6567
6568 2012-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
6569
6570         * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
6571
6572 2012-05-24  Pedro Alves  <palves@redhat.com>
6573
6574         PR gdb/7205
6575
6576         Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
6577
6578 2012-05-24  Pedro Alves  <palves@redhat.com>
6579
6580         PR gdb/7205
6581
6582         Replace target_signal with gdb_signal throughout.
6583
6584 2012-05-22  Maciej W. Rozycki  <macro@codesourcery.com>
6585
6586         * linux-low.c (linux_store_registers): Avoid the copying sequence
6587         when no data has been retrieved by ptrace.
6588
6589 2012-05-22  Will Deacon  <will.deacon@arm.com>
6590
6591         * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
6592         Include asm/ptrace.h.
6593         (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
6594         already defined.
6595
6596 2012-05-21  Maciej W. Rozycki  <macro@codesourcery.com>
6597
6598         * linux-low.c (linux_store_registers): Don't re-retrieve data
6599         with ptrace that has already been obtained from /proc.  Always
6600         copy any data retrieved with ptrace to the buffer supplied.
6601
6602 2012-05-11  Yao Qi  <yao@codesourcery.com>
6603             Pedro Alves  <palves@redhat.com>
6604
6605         * linux-low.c (enum stopping_threads_kind): New.
6606         (stopping_threads): Change type to `enum stopping_threads_kind'.
6607         (handle_extended_wait): If stopping and suspending threads, leave
6608         the new_lwp suspended too.
6609         (linux_wait_for_event): Adjust.
6610         (stop_all_lwps): Set `stopping_threads' to
6611         STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
6612         whether we're suspending threads or just stopping them.  Assert no
6613         recursion happens.
6614
6615 2012-04-29  Yao Qi  <yao@codesourcery.com>
6616
6617         * server.h: Move some code to ...
6618         * gdbthread.h: ... here.  New.
6619         * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
6620         (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
6621         (nto-low.o, win32-low.o): Likewise.
6622         * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
6623         * regcache.c, remote-utils.c, server.c: Likewise.
6624         * target.c, tracepoint.c, win32-low.c: Likewise.
6625
6626 2012-04-24  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
6627
6628         * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
6629         (PTRACE_ARG4_TYPE): Likewise.
6630         (PTRACE_XFER_TYPE): Likewise.
6631         * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
6632         ptrace to PTRACE_ARG3_TYPE.
6633         * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
6634         (PTRACE_ARG4_TYPE): Likewise.
6635         (PTRACE_XFER_TYPE): Likewise.
6636         (linux_detach_one_lwp): Cast fourth argument of
6637         ptrace to long then PTRACE_ARG4_TYPE.
6638         (regsets_fetch_inferior_registers): Cast third argument of
6639         ptrace to long then PTRACE_ARG3_TYPE.
6640         (regsets_store_inferior_registers): Likewise.
6641
6642 2012-04-20  Pedro Alves  <palves@redhat.com>
6643
6644         * configure: Regenerate.
6645
6646 2012-04-19  Pedro Alves  <palves@redhat.com>
6647
6648         * Makefile.in (GNULIB_BUILDDIR): New.
6649         (LIBGNU, INCGNU, GNULIB_H): Adjust.
6650         (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
6651         (all, install-only, uninstall, clean-info, all-lib, clean): No
6652         longer pass GNULIB_FLAGS_TO_PASS.  Use subdir_do.
6653         (maintainer-clean realclean distclean): Use subdir_do.
6654         (subdir_do): New.
6655         (gnulib/import/Makefile): Adjust.  Replace gnulib/import with
6656         $(GNULIB_BUILDDIR).  Don't pass argument to config.status.
6657         * acinclude.m4: Include acx_configure_dir.m4.
6658         * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
6659         calls.  Call AC_PROG_RANLIB.  Configure gnulib using
6660         ACX_CONFIGURE_DIR.
6661         (GNULIB): New.
6662         (GNULIB_STDINT_H): Adjust.
6663         (AC_OUTPUT): Don't output gnulib/Makefile anymore.
6664         * gdbreplay.c: Include build-gnulib/config.h.
6665         * server.h: Likewise.
6666         * aclocal.m4: Regenerate.
6667         * config.in: Regenerate.
6668         * configure: Regenerate.
6669
6670 2012-04-19  Pedro Alves  <palves@redhat.com>
6671
6672         * Makefile.in (LIBGNU, INCGNU): Adjust.
6673         (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
6674         (all, install-only, uninstall, clean-info, all-lib, clean)
6675         (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
6676         * configure.ac: Adjust AC_OUTPUT output.
6677         * aclocal.m4: Regenerate.
6678         * configure: Regenerate.
6679
6680 2012-04-19  Pedro Alves  <palves@redhat.com>
6681
6682         * Makefile.in (generated_files): New.
6683         (server_h): Remove the explicit dependency on config.h, and depend
6684         on $generated_files.
6685
6686 2012-04-19  Pedro Alves  <palves@redhat.com>
6687
6688         * Makefile.in (INCGNU): Add -Ignulib.
6689
6690 2012-04-19  Pedro Alves  <palves@redhat.com>
6691
6692         * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
6693         (INCGNU): ... this, and spell out -I here.
6694         (GNULIB_LIB): Rename to ...
6695         (LIBGNU): ... this.
6696         (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
6697
6698 2012-04-19  Pedro Alves  <palves@redhat.com>
6699
6700         * config.in: Regenerate.
6701
6702 2012-04-19  Pedro Alves  <palves@redhat.com>
6703
6704         * configure.ac: Remove AC_CHECK_DECLS check for memmem.
6705         * server.h (memmem): Remove declaration.
6706         * config.in: Regenerate.
6707         * configure: Regenerate.
6708
6709 2012-04-19  Yao Qi  <yao@codesourcery.com>
6710
6711         * Makefile.in (SFILES): Add common/vec.c.
6712         (OBS): Add vec.o.
6713         (vec.o): New rule.
6714
6715 2012-04-19  Yao Qi  <yao@codesourcery.com>
6716
6717         * remote-utils.c (prepare_resume_reply): Replace with macro
6718         target_core_of_thread.
6719         * server.c (handle_qxfer_threads_proper): Likewise.
6720         * target.h (traget_core_of_thread): New macro.
6721
6722 2012-04-18  Pedro Alves  <palves@redhat.com>
6723
6724         * aclocal.m4: Regenerate.
6725         * configure: Regenerate.
6726
6727 2012-04-16  Yao Qi  <yao@codesourcery.com>
6728
6729         * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
6730         duplicated on address.
6731
6732 2012-04-16  Yao Qi  <yao@codesourcery.com>
6733
6734         * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
6735         (struct tracepoint_action_ops) <send>: New field.
6736         (m_tracepoint_action_send, r_tracepoint_action_send): New.
6737         (agent_expr_send, x_tracepoint_action_send): New.
6738         (l_tracepoint_action_send): New.
6739         (cmd_qtdp): Download and install tracepoint
6740         according to `use_agent'.
6741         (run_inferior_command): Add one more parameter `len'.
6742         Update callers.
6743         (tracepoint_send_agent): New.
6744         (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
6745
6746 2012-04-16  Yao Qi  <yao@codesourcery.com>
6747
6748         * tracepoint.c (download_tracepoints): Moved to ...
6749         (cmd_qtstart): ... here.
6750
6751 2012-04-14  Yao Qi  <yao@codesourcery.com>
6752
6753         * tracepoint.c: Include inttypes.h.
6754         (struct collect_memory_action): Use sized types.
6755         (struct tracepoint): Likewise.
6756         (cmd_qtdp, stop_tracing): Update print specifiers.
6757         (cmd_qtp, response_tracepoint): Likewise.
6758         (collect_data_at_tracepoint): Likewise.
6759         (collect_data_at_step): Likewise.
6760
6761 2012-04-14  Yao Qi  <yao@codesourcery.com>
6762
6763         Import gnulib module inttypes.
6764         * aclocal.m4, config.in, configure: Regenerated.
6765
6766 2012-04-14  Yao Qi  <yao@codesourcery.com>
6767
6768         * Makefile.in (maintainer-clean, realclean, distclean): Remove
6769         Makefile and config.status at last.
6770
6771 2012-04-13  Yao Qi  <yao@codesourcery.com>
6772
6773         * tracepoint.c: Include stdint.h unconditionally.
6774
6775 2012-04-13  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
6776
6777         * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
6778         on BFD_HAVE_SYS_PROCFS_TYPE.
6779         * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
6780         * configure: Regenerate.
6781         * config.in: Likewise.
6782
6783 2012-04-13  H.J. Lu  <hongjiu.lu@intel.com>
6784
6785         * Makefile.in (clean): Also remove x32.c x32-linux.c
6786         x32-avx.c x32-avx-linux.c.
6787         (x32.o): New target.
6788         (x32.c): Likewise.
6789         (x32-linux.o): Likewise.
6790         (x32-linux.c): Likewise.
6791         (x32-avx.o): Likewise.
6792         (x32-avx.c): Likewise.
6793         (x32-avx-linux.o): Likewise.
6794         (x32-avx-linux.c): Likewise.
6795
6796         * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
6797         (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
6798         (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
6799         (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
6800         (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
6801         i386/x32-avx-linux.xml.
6802
6803         * linux-x86-low.c (init_registers_x32_linux): New prototype.
6804         (init_registers_x32_avx_linux): Likwise.
6805         (x86_linux_update_xmltarget): Call init_registers_x32_linux
6806         or init_registers_x32_avx_linux if linux_is_elf64 is false.
6807
6808 2012-04-13  Pedro Alves  <palves@redhat.com>
6809
6810         * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
6811         (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
6812         (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
6813         (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
6814         the sub-make.
6815
6816 2012-04-12  H.J. Lu  <hongjiu.lu@intel.com>
6817
6818         * linux-x86-low.c (compat_x32_clock_t): New.
6819         (compat_x32_siginfo_t): Likewise.
6820         (compat_x32_siginfo_from_siginfo): Likewise.
6821         (siginfo_from_compat_x32_siginfo): Likewise.
6822         (linux_is_elf64): Likewise.
6823         (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
6824         and siginfo_from_compat_x32_siginfo for x32.
6825         (x86_arch_setup): Set linux_is_elf64.
6826
6827 2012-04-12  H.J. Lu  <hongjiu.lu@intel.com>
6828
6829         PR gdb/13969
6830         * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
6831         e_machine field.
6832         (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
6833         * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
6834         * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
6835         compatible with process.
6836
6837 2012-04-12  Yao Qi  <yao@codesourcery.com>
6838
6839         * Makefile.in: Define abs_top_srcdir and abs_srcdir.
6840         (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
6841         (install-only, install-info, clean): Handle sub dir gnulib.
6842         (all-lib, am--refresh): New targets.
6843         (memmem.o): Remove target.
6844         * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
6845         Invoke gl_EARLY.  Invoke AC_CHECK_PROGS for make.
6846         (AC_REPLACE_FUNCS): Remove memmem.
6847         Invoke gl_INIT and AM_INIT_AUTOMAKE.
6848         (AC_OUTPUT): Generate Makefile in gnulib/.
6849         * aclocal.m4, config.in, configure: Regenerated.
6850
6851 2012-04-10  Maciej W. Rozycki  <macro@codesourcery.com>
6852
6853         * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
6854
6855 2012-04-05  Pedro Alves  <palves@redhat.com>
6856
6857         -Werror=strict-aliasing
6858
6859         * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
6860         pointer.
6861
6862 2012-04-04  Pedro Alves  <palves@redhat.com>
6863
6864         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6865         (sparc_store_gregset_from_stack, sparc_store_gregset)
6866         (sparc_breakpoint_at): Fix formatting.
6867
6868 2012-03-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
6869
6870         * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
6871         are available.
6872         * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
6873         [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
6874         * config.in: Regenerate.
6875         * configure: Likewise.
6876
6877 2012-03-29  Pedro Alves  <palves@redhat.com>
6878
6879         * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
6880         Correct ptrace arguments.
6881
6882 2012-03-28  Pedro Alves  <palves@redhat.com>
6883
6884         * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
6885         (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
6886         (IA64_FR1_REGNUM): New defines.
6887         (ia64_fetch_register): New.
6888         (the_low_target): Install it.
6889         * linux-low.h (struct linux_target_ops) <fetch_register>: New
6890         field.
6891         * linux-low.c (linux_fetch_registers): Try the
6892         the_low_target.fetch_register hook first.
6893
6894         * linux-arm-low.c (the_low_target): Adjust.
6895         * linux-bfin-low.c (the_low_target): Adjust.
6896         * linux-cris-low.c (the_low_target): Adjust.
6897         * linux-crisv32-low.c (the_low_target): Adjust.
6898         * linux-m32r-low.c (the_low_target): Adjust.
6899         * linux-m68k-low.c (the_low_target): Adjust.
6900         * linux-mips-low.c (the_low_target): Adjust.
6901         * linux-ppc-low.c (the_low_target): Adjust.
6902         * linux-s390-low.c (the_low_target): Adjust.
6903         * linux-sh-low.c (the_low_target): Adjust.
6904         * linux-sparc-low.c (the_low_target): Adjust.
6905         * linux-tic6x-low.c (the_low_target): Adjust.
6906         * linux-x86-low.c (the_low_target): Adjust.
6907         * linux-xtensa-low.c (the_low_target): Adjust.
6908
6909 2012-03-26  Pedro Alves  <palves@redhat.com>
6910
6911         * server.c (handle_qxfer_libraries): Don't bail early if
6912         the_target->qxfer_libraries_svr4 is not NULL.
6913
6914 2012-03-26  Pedro Alves  <palves@redhat.com>
6915
6916         * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
6917
6918 2012-03-23  Pedro Alves  <palves@redhat.com>
6919
6920         * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
6921         "library-list-svr4" element's start tag when the the DSO list is
6922         empty.
6923
6924 2012-03-23  Pedro Alves  <palves@redhat.com>
6925
6926         * linux-low.c (read_one_ptr): Read the inferior's pointer through
6927         a variable whose type size is the same as the inferior's pointer
6928         size.
6929
6930 2012-03-21  Thomas Schwinge  <thomas@codesourcery.com>
6931
6932         * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
6933         struct siginfo.
6934         * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
6935         * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6936         * linux-low.h: Include <signal.h>.
6937         (struct siginfo): Remove forward declaration.
6938         (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
6939         struct siginfo.
6940
6941 2012-03-21  Mike Frysinger  <vapier@gentoo.org>
6942
6943         * .gitignore: Ignore more files.
6944
6945 2012-03-19  Pedro Alves  <palves@redhat.com>
6946             Jan Kratochvil  <jan.kratochvil@redhat.com>
6947
6948         * server.c (cont_thread, general_thread): Add describing comments.
6949         (start_inferior): Clear `cont_thread'.
6950         (handle_v_cont): Don't set `cont_thread' if resuming all threads
6951         of a process.
6952
6953 2012-03-15  Yao Qi  <yao@codesourcery.com>
6954
6955         * tracepoint.c (install_tracepoint): Move duplicated tracepoint
6956         handling to ...
6957         (cmd_qtdp): ... here.
6958
6959 2012-03-15  Yao Qi  <yao@codesourcery.com>
6960
6961         * tracepoint.c (struct tracepoint_action_ops): New.
6962         (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
6963         (m_tracepoint_action_download): New.
6964         (r_tracepoint_action_download): New.
6965         (x_tracepoint_action_download): New.
6966         (l_tracepoint_action_download): New.
6967         (add_tracepoint_action): Install `action->ops' according type.
6968         (download_tracepoint_1): Move code `download' function pointer
6969         of various tracepoint_action_ops.
6970
6971 2012-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
6972
6973         * linux-low.c (linux_attach_lwp_1): New variable buffer.  Call
6974         linux_ptrace_attach_warnings.
6975
6976 2012-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
6977
6978         * Makefile.in (linux-ptrace.o): New.
6979         * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
6980         (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
6981         (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
6982         (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
6983         (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
6984         of these targets.
6985         * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
6986
6987 2012-03-08  Yao Qi  <yao@codesourcery.com>
6988             Pedro Alves  <palves@redhat.com>
6989
6990         Fix PR server/13392.
6991         * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
6992         offset of JMP insn.
6993         * tracepoint.c (remove_tracepoint): New.
6994         (cmd_qtdp): Call remove_tracepoint when failed to install.
6995
6996 2012-03-07  Pedro Alves  <palves@redhat.com>
6997
6998         * linux-low.c (get_detach_signal): New.
6999         (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
7000         Pass on pending signals to PTRACE_DETACH.  Check the result of the
7001         ptrace call.
7002         * server.c (program_signals, program_signals_p): New.
7003         (handle_general_set): Handle QProgramSignals.
7004         * server.h (program_signals, program_signals_p): Declare.
7005
7006 2012-03-05  Pedro Alves  <palves@redhat.com>
7007             Jan Kratochvil  <jan.kratochvil@redhat.com>
7008
7009         * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
7010         New comment why.
7011
7012 2012-03-03  Yao Qi  <yao@codesourcery.com>
7013
7014         * tracepoint.c (tracepoint_look_up_symbols): Update call to
7015         agent_look_up_symbols.
7016
7017 2012-03-03  Yao Qi  <yao@codesourcery.com>
7018
7019         * Makefile.in (linux-low.o): Keep dependence on agent.h.
7020         (linux-x86-low.o): Likewise.
7021         * server.h: Remove in_process_agent_loaded.
7022         * tracepoint.c (in_process_agent_loaded): Removed.  Moved it
7023         common/agent.c.
7024         Update callers.
7025
7026 2012-03-03  Yao Qi  <yao@codesourcery.com>
7027
7028         * tracepoint.c (gdb_agent_capability): New global.
7029         (in_process_agent_loaded_ust): Renamed to
7030         `in_process_agent_supports_ust'.
7031         Update callers.
7032         (in_process_agent_supports_ust): Call agent_capability_check.
7033         (clear_installed_tracepoints): Assert that agent supports
7034         agent.
7035
7036 2012-03-03  Yao Qi  <yao@codesourcery.com>
7037
7038         * linux-low.c (linux_supports_agent): New.
7039         (linux_target_ops): Initialize field `supports_agent' with
7040         linux_supports_agent.
7041         * target.h (struct target_ops) <supports_agent>: New.
7042         (target_supports_agent): New macro.
7043         * server.c (handle_general_set): Handle packet 'QAgent'.
7044         (handle_query): Send `QAgent+'.
7045         * Makefile.in (server.o): Depends on agent.h.
7046
7047 2012-03-03  Yao Qi  <yao@codesourcery.com>
7048
7049         * Makefile.in (OBS): Add agent.o.
7050         Add new rule for agent.o.
7051         Track dependence of tracepoint.c on agent.h.
7052         * tracepoint.c (run_inferior_command_1):
7053         (run_inferior_command): Call agent_run_command.
7054         (gdb_ust_connect_sync_socket): Deleted.  Move it to
7055         common/agent.c.
7056         (resume_thread, stop_thread): Likewise.
7057         (gdb_ust_socket_init): Renamed to ...
7058         (gdb_agent_socket_init): ... New.
7059         (gdb_ust_thread): Renamed to ...
7060         (gdb_agent_helper_thread): ... New.
7061         (gdb_ust_init): Move some code to ...
7062         (gdb_agent_init): ... here.  New.
7063         [HAVE_UST]: Call gdb_ust_init.
7064         (initialize_tracepoint_ftlib):  Call gdb_agent_init.
7065         * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
7066         * config.in, configure: Regenerated.
7067
7068 2012-03-02  Pedro Alves  <palves@redhat.com>
7069
7070         * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
7071         * linux-low.c (struct simple_pid_list): New.
7072         (stopped_pids): New a struct simple_pid_list pointer.
7073         (add_to_pid_list, pull_pid_from_list): New.
7074         (handle_extended_wait): Don't assume the first signal new children
7075         report is SIGSTOP.  Adjust call to pull_pid_from_list.
7076         (linux_wait_for_lwp): Adjust.
7077
7078 2012-03-02  Yao Qi  <yao@codesourcery.com>
7079
7080         * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
7081         debug log.
7082
7083 2012-03-02  Yao Qi  <yao@codesourcery.com>
7084
7085         * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
7086         `stop_pc' and `tpoint'.  Update caller.
7087
7088 2012-03-01  Maciej W. Rozycki  <macro@codesourcery.com>
7089
7090         * linux-low.h (linux_target_ops): Add regset_bitmap member.
7091         * linux-low.c (use_linux_regsets): New macro.
7092         [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
7093         [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
7094         (linux_register_in_regsets): New function.
7095         (usr_fetch_inferior_registers): Skip registers covered by
7096         regsets.
7097         (usr_store_inferior_registers): Likewise.
7098         (usr_fetch_inferior_registers): New macro.
7099         (usr_store_inferior_registers): Likewise.
7100         (linux_fetch_registers): Handle mixed regset/non-regset targets.
7101         (linux_store_registers): Likewise.
7102         * linux-mips-low.c (init_registers_mips_dsp_linux): New
7103         prototype.
7104         (init_registers_mips64_dsp_linux): Likewise.
7105         (init_registers_mips_linux): New macro.
7106         (init_registers_mips_dsp_linux): Likewise.
7107         (mips_dsp_num_regs): Likewise.
7108         (DSP_BASE, DSP_CONTROL): New fallback macros.
7109         (mips_base_regs): New macro.
7110         (mips_regmap): Use it.  Fix the size.
7111         (mips_dsp_regmap): New variable.
7112         (mips_dsp_regset_bitmap): Likewise.
7113         (mips_arch_setup): New function.
7114         (mips_cannot_fetch_register): Use the_low_target.regmap rather
7115         than mips_regmap.
7116         (mips_cannot_store_register): Likewise.
7117         (the_low_target): Update .arch_setup, .num_regs and .regmap
7118         initializers.  Add .regset_bitmap initializer.
7119         * linux-arm-low.c (the_low_target): Add .regset_bitmap
7120         initializer.
7121         * linux-bfin-low.c (the_low_target): Likewise.
7122         * linux-cris-low.c (the_low_target): Likewise.
7123         * linux-crisv32-low.c (the_low_target): Likewise.
7124         * linux-ia64-low.c (the_low_target): Likewise.
7125         * linux-m32r-low.c (the_low_target): Likewise.
7126         * linux-m68k-low.c (the_low_target): Likewise.
7127         * linux-ppc-low.c (the_low_target): Likewise.
7128         * linux-s390-low.c (the_low_target): Likewise.
7129         * linux-sh-low.c (the_low_target): Likewise.
7130         * linux-sparc-low.c (the_low_target): Likewise.
7131         * linux-tic6x-low.c (the_low_target): Likewise.
7132         * linux-x86-low.c (the_low_target): Likewise.
7133         * linux-xtensa-low.c (the_low_target): Likewise.
7134         * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
7135         mips64-dsp-linux.o to srv_regobj.  Add mips-dsp-linux.xml,
7136         mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
7137         srv_xmlfiles.
7138         * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
7139         (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
7140
7141 2012-02-29  Yao Qi  <yao@codesourcery.com>
7142             Pedro Alves  <palves@redhat.com>
7143
7144         * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
7145         `step_over_finished' is true.
7146
7147 2012-02-27  Pedro Alves  <palves@redhat.com>
7148
7149         * linux-low.c (pid_is_stopped): Delete, moved to common/.
7150         (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
7151
7152 2012-02-27  Pedro Alves  <palves@redhat.com>
7153
7154         PR server/9684
7155         * linux-low.c (pid_is_stopped): New.
7156         (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
7157
7158 2012-02-25  Luis Machado  <lgustavo@codesourcery.com>
7159
7160         * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
7161         of conditions.
7162
7163 2012-02-24  Maciej W. Rozycki  <macro@codesourcery.com>
7164
7165         * linux-mips-low.c (mips_regmap): Correct the index of $f9.
7166
7167 2012-02-24  Luis Machado  <lgustavo@codesourcery>
7168
7169         * server.c (handle_query): Advertise support for target-side
7170         breakpoint condition evaluation.
7171         (process_point_options): New function.
7172         (process_serial_event): When inserting a breakpoint, check for
7173         a target-side condition that should be evaluated.
7174
7175         * mem-break.c: Include regcache.h and ax.h.
7176         (point_cond_list_t): New data structure.
7177         (breakpoint) <cond_list>: New field.
7178         (find_gdb_breakpoint_at): Make non-static.
7179         (delete_gdb_breakpoint_at): Clear any target-side
7180         conditions.
7181         (clear_gdb_breakpoint_conditions): New function.
7182         (add_condition_to_breakpoint): Likewise.
7183         (add_breakpoint_condition): Likewise.
7184         (gdb_condition_true_at_breakpoint): Likewise.
7185         (gdb_breakpoint_here): Return result directly instead
7186         of going through a local variable.
7187
7188         * mem-break.h (find_gdb_breakpoint_at): New prototype.
7189         (clear_gdb_breakpoint_conditions): Likewise.
7190         (add_breakpoint_condition): Likewise.
7191         (gdb_condition_true_at_breakpoint): Likewise.
7192
7193         * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
7194         (need_step_over_p): Take target-side breakpoint condition into
7195         consideration.
7196
7197 2012-02-24  Luis Machado  <lgustavo@codesourcery>
7198
7199         * server.h: Include tracepoint.h.
7200         (agent_mem_read, agent_get_trace_state_variable_value,
7201         agent_set_trace_state_variable_value,
7202         agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
7203         get_set_tsv_func_addr): New prototypes.
7204
7205         * ax.h: New include file.
7206         * ax.c: New source file.
7207
7208         * tracepoint.c: Include ax.h.
7209         (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
7210         agent_expr, eval_result_type): Move to ax.h.
7211         (parse_agent_expr): Rename to ...
7212         (gdb_parse_agent_expr): ... this, make it non-static and move
7213         to ax.h.
7214         (unparse_agent_expr) Rename to ...
7215         (gdb_unparse_agent_expr): ... this, make it non-static and move
7216         to ax.h.
7217         (eval_agent_expr): Rename to ...
7218         (eval_tracepoint_agent_expr): ... this.
7219         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
7220         forward declarations.
7221         (add_tracepoint_action): Call gdb_parse_agent_expr (...).
7222         (agent_get_trace_state_variable_value): New function.
7223         (agent_set_trace_state_variable_value): New function.
7224         (cmd_qtdp): Call gdb_parse_agent_expr (...).
7225         (response_tracepoint): Call gdb_unparse_agent_expr (...).
7226         (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
7227         (condition_true_at_tracepoint): Likewise.
7228         (parse_agent_expr): Rename to ...
7229         (gdb_parse_agent_expr): ... this and move to ax.c.
7230         (unparse_agent_expr): Rename to ...
7231         (gdb_unparse_agent_expr): ... this and move to ax.c.
7232         (gdb_agent_op_name): Move to ax.c.
7233         (eval_agent_expr): Rename to ...
7234         (gdb_eval_agent_expr): ... this, use regcache passed as parameter
7235         and move to ax.c.
7236         (eval_tracepoint_agent_expr): New function.
7237         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
7238         non-static.
7239         (current_insn_ptr, emit_error, struct bytecode_address): Move to
7240         ax.c.
7241         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
7242         emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
7243         emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
7244         emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
7245         emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
7246         emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
7247         emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
7248         emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
7249         (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
7250         (compile_bytecodes): Remove forward declaration.
7251         (is_goto_target): Move to ax.c.
7252         (compile_bytecodes): Move to ax.c and call
7253         agent_get_trace_state_variable_value (...) and
7254         agent_set_trace_state_variable_value (...).
7255
7256         * Makefile.in: Update ax.c and IPA dependencies.
7257
7258 2012-02-24  Pedro Alves  <palves@redhat.com>
7259
7260         * tracepoint.c (cmd_bigqtbuffer): Rename as ...
7261         (cmd_bigqtbuffer_circular): ... this.  Only handle
7262         'QTBuffer:circular:'.
7263         (handle_tracepoint_general_set): Adjust.
7264
7265 2012-02-16  Yao Qi  <yao@codesourcery.com>
7266
7267         * inferiors.c: Move code to ...
7268         * dll.c: .... here.  New.
7269         * server.h: Declare clear_dlls.
7270         * Makefile.in (SFILES): Add dll.c.
7271         (OBS): Add dll.o
7272         (dll.o): New rule.
7273
7274 2012-02-11  Yao Qi  <yao@codesourcery.com>
7275
7276         * server.c: (handle_monitor_command): Add a new parameter
7277         `own_buf'.
7278         (handle_query): Update caller.
7279
7280 2012-02-09  Joel Brobecker  <brobecker@adacore.com>
7281
7282         * configure.ac: Add readlink to AC_CHECK_FUNCS list.
7283         * configure, config.in: Regenerate.
7284         * hostio.c: Provide an alternate implementation if HAVE_READLINK
7285         is not defined.
7286
7287 2012-02-02  Pedro Alves  <palves@redhat.com>
7288
7289         Try SIGKILL first, then PTRACE_KILL.
7290         * linux-low.c (linux_kill_one_lwp): New.
7291         (linux_kill_one_lwp): Rename to ...
7292         (kill_one_lwp_callback): ... this.  Use the new
7293         linux_kill_one_lwp.
7294
7295 2012-02-02  Pedro Alves  <palves@redhat.com>
7296
7297         * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
7298         inferior.
7299
7300 2012-01-27  Pedro Alves  <palves@redhat.com>
7301
7302         * linux-low.c (linux_child_pid_to_exec_file): Delete.
7303         (elf_64_file_p): Make static.
7304         (linux_pid_exe_is_elf_64_file): New.
7305         * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
7306         Delete declarations.
7307         (linux_pid_exe_is_elf_64_file): Declare.
7308         * linux-x86-low.c (x86_arch_setup): Use
7309         linux_pid_exe_is_elf_64_file.
7310
7311 2012-01-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
7312
7313         * linux-low.c (linux_wait_for_event_1): Rename to ...
7314         (linux_wait_for_event): ... here and merge it with former
7315         linux_wait_for_event - new variable wait_ptid, use it.
7316         (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
7317
7318 2012-01-23  Pedro Alves  <palves@redhat.com>
7319
7320         * server.c (main): Avoid yet another case of infinite loop while
7321         detaching/killing after a longjmp.
7322
7323 2012-01-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
7324
7325         Code cleanup.
7326         * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
7327
7328 2012-01-20  Ulrich Weigand  <ulrich.weigand@linaro.org>
7329
7330         * hostio.c (handle_readlink): New function.
7331         (handle_vFile): Call it to handle "vFile:readlink" packets.
7332
7333 2012-01-20  Pedro Alves  <palves@redhat.com>
7334             Ulrich Weigand  <ulrich.weigand@linaro.org>
7335
7336         * server.c (handle_v_requests): Only support vAttach and vRun to
7337         start multiple processes when in extended protocol mode.
7338
7339 2012-01-17  Pedro Alves  <palves@redhat.com>
7340
7341         * tracepoint.c (initialize_tracepoint): Use mmap instead of
7342         memalign plus mprotect to allocate the scratch buffer.
7343
7344 2012-01-13  Pedro Alves  <palves@redhat.com>
7345
7346         * server.c (attach_inferior): Clear `cont_thread'.
7347
7348 2012-01-13  Pedro Alves  <palves@redhat.com>
7349
7350         * server.c (main): Avoid infinite loop while detaching/killing
7351         after a longjmp.
7352
7353 2012-01-09  Doug Evans  <dje@google.com>
7354
7355         * server.c (start_inferior): Set last_ptid in --wrapper case.
7356
7357 2012-01-06  Yao Qi  <yao@codesourcery.com>
7358
7359         * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
7360         defined.
7361         [IN_PROCESS_AGENT] (debug_agent): New global variable.
7362
7363 2012-01-04  Yao Qi  <yao@codesourcery.com>
7364
7365         * tracepoint.c (cmd_qtdp): Print debug message
7366         for static tracepoint.
7367
7368 2012-01-04  Yao Qi  <yao@codesourcery.com>
7369
7370         * tracepoint.c (trace_vdebug): Differentiate debug message
7371         between gdbserver and IPA.
7372
7373 2012-01-03  Yao Qi  <yao@codesourcery.com>
7374
7375         * tracepoint.c (tracepoint_was_hit): Don't collect for
7376         static tracepoint.
7377
7378 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
7379
7380         * terminal.h: Reformat copyright header.
7381
7382 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
7383
7384         * server.c (gdbserver_version): Update copyright year.
7385         * gdbreplay.c (gdbreplay_version): Likewise.
7386
7387 2011-12-18  Jan Kratochvil  <jan.kratochvil@redhat.com>
7388
7389         * linux-low.c (linux_create_inferior): Put empty if clause for write.
7390
7391         Revert:
7392         2011-12-18  Hui Zhu  <teawater@gmail.com>
7393         * linux-low.c (linux_create_inferior): Save return value to ret.
7394
7395 2011-12-18  Hui Zhu  <teawater@gmail.com>
7396
7397         * linux-low.c (linux_create_inferior): Save return value to ret.
7398
7399 2011-12-16  Doug Evans  <dje@google.com>
7400
7401         * linux-low.c (linux_create_inferior): If stdio connection,
7402         redirect stdin from /dev/null, stdout to stderr.
7403         * remote-utils.c (remote_is_stdio): New static global.
7404         (remote_connection_is_stdio): New function.
7405         (remote_prepare): Handle stdio connection.
7406         (remote_open): Ditto.
7407         (remote_close): Don't close stdin for stdio connections.
7408         (read_prim,write_prim): New functions.  Replace all calls to
7409         read/write to these.
7410         * server.c (main): Watch for "-" argument.  Move call to
7411         remote_prepare before start_inferior.
7412         * server.h (STDIO_CONNECTION_NAME): New macro.
7413         (remote_connection_is_stdio): Declare.
7414
7415         * remote-utils.c (prepare_resume_reply): Remove extraneous \n
7416         in debugging output.
7417
7418 2011-12-15  Yao Qi  <yao@codesourcery.com>
7419
7420         * tracepoint.c: Include sys/syscall.h.
7421         (gdb_ust_thread): Remove preprocessor conditional.
7422
7423 2011-12-14  Pedro Alves  <pedro@codesourcery.com>
7424
7425         * linux-low.c (linux_detach_one_lwp): Call
7426         the_low_target.prepare_to_resume before detaching.
7427
7428 2011-12-14  Yao Qi  <yao@codesourcery.com>
7429
7430         * tracepoint.c (gdb_ust_thread): Don't ignore return value
7431         of write.
7432
7433 2011-12-14  Yao Qi  <yao@codesourcery.com>
7434
7435         * i386-low.c (i386_low_stopped_data_address): Initialize local
7436         variable `control'.
7437
7438 2011-12-13  Pedro Alves  <pedro@codesourcery.com>
7439
7440         PR remote/13492
7441
7442         * i386-low.c (i386_low_stopped_data_address): Avoid fetching
7443         DR_CONTROL unless necessary.  Extend comments.
7444         * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
7445         DR0-3 if not used.  If any watchpoint was set, clear DR_STATUS.
7446
7447 2011-12-13  Yao Qi  <yao@codesourcery.com>
7448
7449         * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
7450         macros.
7451         (upload_fast_traceframes, upload_fast_traceframes): Likewise.
7452
7453 2011-12-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
7454
7455         * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
7456         Print new debug message for such case.
7457
7458 2011-12-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
7459
7460         Fix overlapping memcpy.
7461         * mem-break.c (set_raw_breakpoint_at): New variable buf.  Use it for
7462         the read_inferior_memory transfer.
7463         (delete_fast_tracepoint_jump): New variable buf.  Use it for the
7464         write_inferior_memory transfer.
7465         (set_fast_tracepoint_jump): New variable buf.  Use it for the
7466         read_inferior_memory and write_inferior_memory transfers.
7467         (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
7468         (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
7469         Use it for the write_inferior_memory transfer.
7470         (check_mem_read, check_mem_write): New gdb_asserts for overlapping
7471         buffers.
7472
7473 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
7474
7475         * linux-low.c (fetch_register, store_register): Make code
7476         consistent, fix formatting.
7477
7478 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
7479
7480         * linux-low.c (usr_store_inferior_registers): Factor out code
7481         to handle individual registers into...
7482         (store_register): ... this new function.
7483
7484 2011-12-06  Ulrich Weigand  <uweigand@de.ibm.com>
7485
7486         * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
7487         (s390-linux32v2.o, s390-linux32v2.c): Likewise.
7488         (s390-linux64v1.o, s390-linux64v1.c): Likewise.
7489         (s390-linux64v2.o, s390-linux64v2.c): Likewise.
7490         (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
7491         (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
7492         * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
7493         (srv_xmlfiles): Add new XML files.
7494
7495         * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
7496         and <sys/uio.h>.
7497         (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
7498         (init_registers_s390_linux32v1): Add prototype.
7499         (init_registers_s390_linux32v2): Likewise.
7500         (init_registers_s390_linux64v1): Likewise.
7501         (init_registers_s390_linux64v2): Likewise.
7502         (init_registers_s390x_linux64v1): Likewise.
7503         (init_registers_s390x_linux64v2): Likewise.
7504         (s390_num_regs): Increment to 52.
7505         (s390_regmap): Add orig_r2 register.
7506         (s390_num_regs_3264): Increment to 68.
7507         (s390_regmap_3264): Add orig_r2 register.
7508         (s390_collect_ptrace_register): Handle orig_r2 register.
7509         (s390_supply_ptrace_register): Likewise.
7510         (s390_fill_last_break): New function.
7511         (s390_store_last_break): Likewise.
7512         (s390_fill_system_call): New function.
7513         (s390_store_system_call): Likewise.
7514         (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
7515         register sets.
7516         (s390_check_regset): New function.
7517         (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
7518         NT_S390_SYSTEM_CALL regsets and use appropriate description.
7519         Update target_regsets for available register sets.
7520
7521 2011-12-02  Paul Pluzhnikov  <ppluzhnikov@google.com>
7522             Jan Kratochvil  <jan.kratochvil@redhat.com>
7523
7524         * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
7525         (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
7526         New.
7527         (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
7528         * linux-low.h (struct process_info_private): New member r_debug.
7529         * server.c (handle_qxfer_libraries): Call
7530         the_target->qxfer_libraries_svr4.
7531         (handle_qxfer_libraries_svr4): New function.
7532         (qxfer_packets): New entry "libraries-svr4".
7533         (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
7534         * target.h (struct target_ops): New member qxfer_libraries_svr4.
7535         * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
7536         PACKET_qXfer_libraries_svr4.
7537
7538 2011-11-30  Ulrich Weigand  <uweigand@de.ibm.com>
7539
7540         * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
7541         PSW address/mask between 8-byte and 16-byte formats.
7542         (s390_supply_ptrace_register): Likewise.
7543         (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
7544         basic addressing mode bit.
7545
7546 2011-11-24  Stan Shebs  <stan@codesourcery.com>
7547
7548         * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
7549
7550 2011-11-17  Stan Shebs  <stan@codesourcery.com>
7551
7552         * tracepoint.c (struct tracepoint): New field traceframe_usage.
7553         (tracing_start_time): New global.
7554         (tracing_stop_time): New global.
7555         (tracing_user_name): New global.
7556         (tracing_notes): New global.
7557         (tracing_stop_note): New global.
7558         (cmd_qtstart): Set traceframe_usage, start_time.
7559         (stop_tracing): Set stop_time.
7560         (cmd_qtstatus): Report additional status.
7561         (cmd_qtp): New function.
7562         (handle_tracepoint_query): Call it.
7563         (cmd_qtnotes): New function.
7564         (handle_tracepoint_general_set): Call it.
7565         (get_timestamp): Rename from tsv_get_timestamp.
7566
7567 2011-11-14  Stan Shebs  <stan@codesourcery.com>
7568             Kwok Cheung Yeung  <kcy@codesourcery.com>
7569
7570         * linux-x86-low.c (small_jump_insn): New.
7571         (i386_install_fast_tracepoint_jump_pad): Add arguments for
7572         trampoline and error message, build a trampoline and issue a small
7573         jump instruction to it.
7574         (x86_install_fast_tracepoint_jump_pad): Add arguments for
7575         trampoline and error message.
7576         (x86_get_min_fast_tracepoint_insn_len): New.
7577         (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
7578         * linux-low.h (struct linux_target_ops): Add arguments to
7579         install_fast_tracepoint_jump_pad operation, add new operation.
7580         * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
7581         arguments.
7582         (linux_get_min_fast_tracepoint_insn_len): New function.
7583         (linux_target_op): Add new operation.
7584         * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
7585         (gdb_trampoline_buffer_end): Ditto.
7586         (gdb_trampoline_buffer_error): Ditto.
7587         (struct ipa_sym_addresses): Add fields for new IPA variables.
7588         (symbol_list): Add entries for new IPA variables.
7589         (struct tracepoint): Add fields to hold the address range of the
7590         trampoline used by the tracepoint.
7591         (trampoline_buffer_head): New static variable.
7592         (trampoline_buffer_tail): Ditto.
7593         (claim_trampoline_space): New function.
7594         (have_fast_tracepoint_trampoline_buffer): New function.
7595         (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
7596         structure.
7597         (install_fast_tracepoint): Ditto, also add error buffer argument.
7598         (cmd_qtminftpilen): New function.
7599         (handle_tracepoint_query): Add response to qTMinFTPILen packet.
7600         (fast_tracepoint_from_trampoline_address): New function.
7601         (fast_tracepoint_collecting): Handle trampoline as part of jump
7602         pad space.
7603         (set_trampoline_buffer_space): New function.
7604         (initialize_tracepoint): Initialize new IPA variables.
7605         * target.h (struct target_ops): Add arguments to
7606         install_fast_tracepoint_jump_pad operation, add new
7607         get_min_fast_tracepoint_insn_len operation.
7608         (target_get_min_fast_tracepoint_insn_len): New.
7609         (install_fast_tracepoint_jump_pad): Add arguments.
7610         * server.h (IPA_BUFSIZ): Define.
7611         * linux-i386-ipa.c: Include extra header files.
7612         (initialize_fast_tracepoint_trampoline_buffer): New function.
7613         (initialize_low_tracepoint): Call it.
7614         * server.h (set_trampoline_buffer_space): Declare.
7615         (claim_trampoline_space): Ditto.
7616         (have_fast_tracepoint_trampoline_buffer): Ditto.
7617
7618 2011-11-14  Yao Qi  <yao@codesourcery.com>
7619
7620         * server.c (handle_query): Handle InstallInTrace for qSupported.
7621         * tracepoint.c (add_tracepoint): Sort list.
7622         (install_tracepoint, download_tracepoint): New.
7623         (cmd_qtdp): Call them to install and download tracepoints.
7624         (sort_tracepoints): Removed.
7625         (cmd_qtstart): Update.
7626
7627 2011-11-14  Yao Qi  <yao@codesourcery.com>
7628
7629         * mem-break.c (inc_ref_fast_tracepoint_jump): New.
7630         * mem-break.h: Declare.
7631         * tracepoint.c (cmd_qtstart): Move some code to ...
7632         (clone_fast_tracepoint, install_fast_tracepoint): ... here.
7633         New.
7634         (download_tracepoints): Move some code to ...
7635         (download_tracepoint_1): ... here.  New.
7636
7637 2011-11-08  Yao Qi  <yao@codesourcery.com>
7638
7639         * remote-utils.c (relocate_instruction): A comment fix.
7640
7641 2011-11-07  Joel Brobecker  <brobecker@adacore.com>
7642
7643         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
7644         (i386_dr_low_get_control, i386_dr_low_get_status): Use
7645         dr_status_mirror and dr_control_mirror from debug_reg_state.
7646         (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
7647         (i386_initial_stuff): Remove use of deleted globals.
7648         (i386_get_thread_context, i386_set_thread_context,
7649         i386_thread_added): Use dr_status_mirror and dr_control_mirror
7650         from debug_reg_state.
7651
7652 2011-11-05  Yao Qi  <yao@codesourcery.com>
7653
7654         * tracepoint.c (gdb_collect): Loop over tracepoints of same
7655         address as TPOINT's.
7656
7657 2011-11-02  Stan Shebs  <stan@codesourcery.com>
7658
7659         * tracepoint.c (agent_mem_read_string): New function.
7660         (eval_agent_expr): Call it for tracenz.
7661         * server.c (handle_query): Report support for tracenz.
7662
7663 2011-11-02  Yao Qi  <yao@codesourcery.com>
7664
7665         * tracepoint.c (cmd_qtstart): Remove unused local variables.
7666
7667 2011-11-02  Yao Qi  <yao@codesourcery.com>
7668
7669         * target.h: Fix a typo in comment.
7670
7671 2011-10-31  Pedro Alves  <pedro@codesourcery.com>
7672
7673         * mem-break.c (check_mem_write): Add `myaddr' parameter.  Don't
7674         clobber the breakpoints' shadows with fast tracepoint jumps.
7675         * mem-break.h (check_mem_write): Add `myaddr' parameter.
7676         * target.c (write_inferior_memory): Also pass MYADDR down to
7677         check_mem_write.
7678
7679 2011-10-07  Ulrich Weigand  <ulrich.weigand@linaro.org>
7680
7681         * configure.ac: Check support for personality routine.
7682         * configure: Regenerate.
7683         * config.in: Likewise.
7684         * linux-low.c: Include <sys/personality.h>.
7685         Define ADDR_NO_RANDOMIZE if necessary.
7686         (linux_create_inferior): Disable address space randomization when
7687         forking inferior, if requested.
7688         (linux_supports_disable_randomization): New function.
7689         (linux_target_ops): Install it.
7690         * server.h (disable_randomization): Declare.
7691         * server.c (disable_randomization): New global variable.
7692         (handle_general_set): Handle QDisableRandomization.
7693         (handle_query): Likewise for qSupported.
7694         (main): Support --disable-randomization and --no-disable-randomization
7695         command line arguments.
7696         * target.h (struct target_ops): Add supports_disable_randomization.
7697         (target_supports_disable_randomization): New macro.
7698
7699 2011-09-29  Mike Frysinger  <vapier@gentoo.org>
7700
7701         * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
7702         ifdef check.
7703         [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
7704         [!PT_GETDSBT] (target_loadmap): New definition.
7705         (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
7706         (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
7707         LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
7708         and PT_GETDSBT to LINUX_LOADMAP.
7709         [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
7710         (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
7711
7712 2011-09-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
7713
7714         * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
7715         (arm_linux_hwbp_cap): New static variable.
7716         (arm_linux_get_hwbp_cap): Replace by ...
7717         (arm_linux_init_hwbp_cap): ... this new function.
7718         (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
7719         (arm_linux_get_hw_watchpoint_count): Likewise.
7720         (arm_linux_get_hw_watchpoint_max_length): Likewise.
7721         (arm_arch_setup): Call arm_linux_init_hwbp_cap.
7722         (arm_prepare_to_resume): Use perror_with_name instead of error.
7723
7724 2011-09-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
7725
7726         * linux-arm-low.c: Include <signal.h>.
7727         (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
7728         (struct arm_linux_hwbp_cap): New data type.
7729         (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
7730         (struct arm_linux_hw_breakpoint): New data type.
7731         (MAX_BPTS, MAX_WPTS): Define.
7732         (struct arch_process_info, struct arch_lwp_info): New data types.
7733         (arm_linux_get_hwbp_cap): New function.
7734         (arm_linux_get_hw_breakpoint_count): Likewise.
7735         (arm_linux_get_hw_watchpoint_count): Likewise.
7736         (arm_linux_get_hw_watchpoint_max_length): Likewise.
7737         (arm_hwbp_control_initialize): Likewise.
7738         (arm_hwbp_control_is_enabled): Likewise.
7739         (arm_hwbp_control_is_initialized): Likewise.
7740         (arm_hwbp_control_disable): Likewise.
7741         (arm_linux_hw_breakpoint_equal): Likewise.
7742         (arm_linux_hw_point_initialize): Likewise.
7743         (struct update_registers_data): New data structure.
7744         (update_registers_callback: New function.
7745         (arm_insert_point): Likewise.
7746         (arm_remove_point): Likewise.
7747         (arm_stopped_by_watchpoint): Likewise.
7748         (arm_stopped_data_address): Likewise.
7749         (arm_new_process): Likewise.
7750         (arm_new_thread): Likewise.
7751         (arm_prepare_to_resume): Likewise.
7752         (the_low_target): Register arm_insert_point, arm_remove_point,
7753         arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
7754         arm_new_thread, and arm_prepare_to_resume.
7755
7756 2011-09-15  Stan Shebs  <stan@codesourcery.com>
7757
7758         * server.h (struct emit_ops): Add compare-goto fields.
7759         * tracepoint.c (gdb_agent_op_sizes): New table.
7760         (emit_eq_goto): New function.
7761         (emit_ne_goto): New function.
7762         (emit_lt_goto): New function.
7763         (emit_le_goto): New function.
7764         (emit_gt_goto): New function.
7765         (emit_ge_goto): New function.
7766         (is_goto_target): New function.
7767         (compile_bytecodes): Recognize special cases of compare-goto
7768         combinations and call specialized emitters for them.
7769         * linux-x86-low.c (amd64_emit_eq_goto): New function.
7770         (amd64_emit_ne_goto): New function.
7771         (amd64_emit_lt_goto): New function.
7772         (amd64_emit_le_goto): New function.
7773         (amd64_emit_gt_goto): New function.
7774         (amd64_emit_ge_goto): New function.
7775         (amd64_emit_ops): Add the new functions.
7776         (i386_emit_eq_goto): New function.
7777         (i386_emit_ne_goto): New function.
7778         (i386_emit_lt_goto): New function.
7779         (i386_emit_le_goto): New function.
7780         (i386_emit_gt_goto): New function.
7781         (i386_emit_ge_goto): New function.
7782         (i386_emit_ops): Add the new functions.
7783
7784 2011-09-08  Stan Shebs  <stan@codesourcery.com>
7785
7786         * linux-x86-low.c (i386_emit_prologue): Save %ebx.
7787         (i386_emit_epilogue): Restore %ebx.
7788
7789 2011-08-31  Jie Zhang  <jzhang918@gmail.com>
7790
7791         * server.c (step_thread): Remove definition.
7792         (process_serial_event): Don't handle Hs.
7793         * server.h (step_thread): Remove declaration.
7794         * target.c (set_desired_inferior): Remove use of step_thread.
7795
7796 2011-08-24  Luis Machado  <lgustavo@codesourcery.com>
7797
7798         * linux-low.c: Include linux-procfs.h.
7799         (linux_attach_lwp_1): Update comments.
7800         (linux_attach): Scan for existing threads when attaching to a
7801         process that is the tgid.
7802         * Makefile.in: Update dependencies.
7803
7804 2011-08-24  Luis Machado  <lgustavo@codesourcery.com>
7805
7806         * configure.srv: Add linux-procfs.o dependencies.
7807
7808 2011-08-14  Yao Qi  <yao@codesourcery.com>
7809
7810         * target.h (struct target_ops): Fix indent.
7811         * win32-low.c (win32_target_ops): Fix comment.
7812
7813 2011-08-14  Andrew Jenner  <andrew@codesourcery.com>
7814             Yao Qi  <yao@codesourcery.com>
7815
7816         * Makefile.in (clean): Remove tic6x-*.c files.
7817         (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
7818         (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
7819         (tic6x-c64xp-linux.c): Likewise.
7820         * configure.srv: Add support for tic6x-*-uclinux.
7821         * linux-tic6x-low.c: New.
7822         * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
7823
7824 2011-08-14  Andrew Stubbs <ams@codesourcery.com>
7825             Yao Qi  <yao@codesourcery.com>
7826
7827         * target.h (struct target_ops): Add read_loadmap.
7828         * linux-low.c (struct target_loadseg): New type.
7829         (struct target_loadmap): New type.
7830         (linux_read_loadmap): New function.
7831         (linux_target_ops): Add linux_read_loadmap.
7832         * server.c (handle_query): Support qXfer:fdpic:read packet.
7833         * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
7834         to NULL.
7835
7836 2011-08-05  Eli Zaretskii  <eliz@gnu.org>
7837
7838         * win32-low.c: Include <stdint.h>.
7839
7840 2011-07-22  Pedro Alves  <pedro@codesourcery.com>
7841
7842         * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
7843         to the inferior here.
7844         (i386_remove_aligned_watchpoint): Ditto.
7845         (i386_handle_nonaligned_watchpoint): Return immediate on fail to
7846         fit part of the watchpoint in the debug registers.
7847         (i386_update_inferior_debug_regs): New.
7848         (i386_low_insert_watchpoint): Work on a local mirror of the debug
7849         registers, and only update the inferior on success.
7850         (i386_low_remove_watchpoint): Ditto.
7851
7852 2011-07-22  Kwok Cheung Yeung  <kcy@codesourcery.com>
7853
7854         * linux-low.c (compare_ints, unique, list_threads, show_process,
7855         linux_core_of_thread): Delete.
7856         (linux_target_ops): Change linux_core_of_thread to
7857         linux_common_core_of_thread.
7858         (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
7859         * utils.c (malloc_failure): Change type of argument.
7860         (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
7861         * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
7862         common/linux-osdata.c, common/ptid.c and common/buffer.c.
7863         (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
7864         (IPA_OBJS): Add common-utils-ipa.o.
7865         (ptid_h, linux_osdata_h): New macros.
7866         (server_h): Add common/common-utils.h, common/xml-utils.h,
7867         common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
7868         common/ptid.h.
7869         (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
7870         ptid.o, buffer.o): New rules.
7871         (linux-low.o): Add common/linux-osdata.h as a dependency.
7872         * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
7873         * configure.ac: Add AC_HEADER_DIRENT check.
7874         * config.in: Regenerate.
7875         * configure: Regenerate.
7876         * remote-utils.c (xml_escape_text): Delete.
7877         (buffer_grow, buffer_free, buffer_init, buffer_finish,
7878         buffer_xml_printf): Move to common/buffer.c.
7879         * server.c (main): Remove call to initialize_inferiors.
7880         * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
7881         ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
7882         ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
7883         internal_error, gdb_assert, gdb_assert_fail): Delete.
7884         (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
7885         buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
7886         common/buffer.h.
7887         * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
7888         ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
7889         initialize_inferiors): Delete.
7890
7891 2011-07-20  Pedro Alves  <pedro@codesourcery.com>
7892
7893         * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
7894         symbol error.
7895
7896 2011-05-31  Pedro Alves  <pedro@codesourcery.com>
7897
7898         * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
7899         assertion.
7900         * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
7901
7902 2011-05-26  Yao Qi  <yao@codesourcery.com>
7903
7904         * Makefile.in (thread-db.o): Track dependence to
7905         common/gdb_thread_db.h.
7906         * thread-db.c: include gdb_thread_db.h from right place.
7907
7908 2011-05-16  Adrian Cornish  <gnu@bluedreamer.com>
7909
7910         * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
7911         __FILE__ and __LINE__ to internal_error.
7912
7913 2011-05-13  Doug Evans  <dje@google.com>
7914
7915         * thread-db.c (try_thread_db_load_from_sdir): New function.
7916         (try_thread_db_load_from_dir): New function.
7917         (thread_db_load_search): Handle $sdir, ignore $pdir.
7918         Remove trying of system directories if search of
7919         libthread-db-search-path fails, that is now done via $sdir.
7920
7921 2011-05-12  Kwok Cheung Yeung  <kcy@codesourcery.com>
7922
7923         * server.c (handle_query): Add EnableDisableTracepoints to the list
7924         of supported features.
7925         * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
7926         tracepoints.
7927         (cmd_qtenable_disable): New.
7928         (cmd_qtstart): Install tracepoints even if disabled.
7929         (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
7930         receiving a QTEnable or QTDisable packet.
7931         (gdb_collect): Skip data collection if fast tracepoint is disabled.
7932         (ust_marker_to_static_tracepoint): Do not ignore disabled static
7933         tracepoints.
7934         (gdb_probe): Skip data collection if static tracepoint is disabled.
7935
7936 2011-05-10  Doug Evans  <dje@google.com>
7937
7938         * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
7939
7940 2011-05-04  Doug Evans  <dje@google.com>
7941
7942         * linux-low.c (linux_join): Skip process lookup.
7943         * spu-low.c (spu_join): Ditto.
7944         * server.c (join_inferiors_callback): Delete.
7945         (process_serial_event): For 'D' packet (detach) call join_inferior
7946         directly.
7947
7948 2011-05-04  Joseph Myers  <joseph@codesourcery.com>
7949
7950         * README: Don't mention xscale*-*-linux*.
7951         * configure.srv (xscale*-*-linux*): Don't handle target.
7952
7953 2011-04-27  Nathan Froyd  <froydnj@codesourcery.com>
7954
7955         * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
7956         casting pointers.
7957         (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
7958         (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
7959         (i386_emit_void_call_2): Likewise.
7960
7961 2011-04-26  Yao Qi  <yao@codesourcery.com>
7962
7963         * linux-low.c: Move common macros to linux-ptrace.h.
7964         Include linux-ptrace.h.
7965         * Makefile.in (linux_ptrace_h): New.
7966         (linux-low.o): Depends on linux-ptrace.h.
7967
7968 2011-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
7969
7970         * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
7971         RUN_ONCE.  Comment for the LISTEN_DESC delete_file_handler call.
7972         (remote_prepare): New function with most of the TCP code from ...
7973         (remote_open): ... here.  Detect PORT here unconditionally.  Move also
7974         setting transport_is_reliable.
7975         * server.c (run_once): New variable.
7976         (gdbserver_usage): Document it.
7977         (main): Set run_once for `--once'.  Call remote_prepare.  Exit after
7978         the first run if RUN_ONCE.
7979         * server.h (run_once, remote_prepare): New declarations.
7980
7981 2011-04-19  Tom Tromey  <tromey@redhat.com>
7982
7983         * win32-low.c (handle_load_dll): Remove duplicate "the".
7984
7985 2011-04-07  Pierre Muller  <muller@ics.u-strasbg.fr>
7986
7987         Remove support for old Cygwin 1.5 versions.
7988         * win32-low.c (win32_create_inferior): Use new cygwin_path_list
7989         function to avoid warning.
7990         (win32_add_one_solib): Use cygwin_conv_path function to avoid
7991         warning.
7992
7993 2011-03-18  Pierre Muller  <muller@ics.u-strasbg.fr>
7994
7995         * gdbserver/server.h (Macro _): Define it if not available.
7996
7997 2011-03-14  Michael Snyder  <msnyder@vmware.com>
7998
7999         * hostio.c (handle_close): Remove unnecessary null test.
8000
8001 2011-03-10  Joel Brobecker  <brobecker@adacore.com>
8002
8003         * Makefile.in (maintainer-clean realclean distclean): Remove
8004         "make ...  subdir_do" command.
8005
8006 2011-03-10  Michael Snyder  <msnyder@vmware.com>
8007
8008         * tracepoint.c (tracepoint_finish_step): Fix loop variable.
8009
8010         * server.c (handle_v_run): Free alloced buffer on early return.
8011
8012 2011-03-09  Yao Qi  <yao@codesourcery.com>
8013
8014         Revert:
8015         2011-03-04  Yao Qi  <yao@codesourcery.com>
8016
8017         * Makefile.in: Remove GNU make feature --directory.
8018
8019         2011-03-05  Yao Qi  <yao@codesourcery.com>
8020
8021         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8022         (subdir_do): New make target.  Copied from gdb/Makefile.
8023         (maintainer-clean, realclean, distclean, clean): Call corresponding
8024         make targets in common/Makefile.
8025
8026         2011-02-11  Yao Qi  <yao@codesourcery.com>
8027
8028         * configure.ac: Call AC_PROG_RANLIB.
8029         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
8030         * configure: Regenerate.
8031
8032 2011-03-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
8033
8034         * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
8035
8036 2011-03-06  Yao Qi  <yao@codesourcery.com>
8037
8038         * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
8039
8040 2011-03-05  Yao Qi  <yao@codesourcery.com>
8041
8042         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8043         (subdir_do): New make target.  Copied from gdb/Makefile.
8044         (maintainer-clean, realclean, distclean, clean): Call corresponding
8045         make targets in common/Makefile.
8046
8047 2011-03-04  Yao Qi  <yao@codesourcery.com>
8048
8049         * Makefile.in: Remove GNU make feature --directory.
8050
8051 2011-03-04  Michael Snyder  <msnyder@vmware.com>
8052
8053         * server.c (queue_stop_reply): Call xmalloc not malloc.
8054
8055 2011-03-02  Michael Snyder  <msnyder@vmware.com>
8056
8057         * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
8058
8059 2011-02-28  Michael Snyder  <msnyder@vmware.com>
8060
8061         * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
8062         (cmd_qtframe): Ditto.
8063         (cmd_qtbuffer): Ditto.
8064         (cmd_bigqtbuffer): Ditto.
8065
8066         * utils.c (decimal2str): Initialize 'width' to nine, then
8067         don't mess with it.
8068
8069 2011-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
8070
8071         * hostio.c (require_data): Free *data, not data.
8072
8073 2011-02-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
8074
8075         * hostio.c (require_data): Use free, not xfree.
8076
8077 2011-02-27  Michael Snyder  <msnyder@vmware.com>
8078
8079         * server.c (handle_query): Discard unused value.
8080
8081         * hostio.c (require_data): Free malloc memory before returning
8082         error.
8083
8084 2011-02-26  Michael Snyder  <msnyder@vmware.com>
8085
8086         * linux-low.c (list_threads): Call closedir for dirent.
8087
8088 2011-02-27  Michael Snyder  <msnyder@vmware.com>
8089
8090         * i386-low.c (i386-length_and_rw_bits): Comment the fact that
8091         a case statement falls through.
8092
8093         * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
8094
8095         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
8096         in comparison.
8097
8098 2011-02-26  Michael Snyder  <msnyder@vmware.com>
8099
8100         * utils.c (decimal2str): Eliminate dead code and dead param.
8101         (pulongest): Drop dead param from call to decimal2str.
8102         (plongest): Ditto.
8103
8104 2011-02-24  Joel Brobecker  <brobecker@adacore.com>
8105
8106         Revert the following patch (not approved yet):
8107         2011-02-21  Hui Zhu  <teawater@gmail.com>
8108         * tracepoint.c (tp_printf): New function.
8109         (eval_agent_expr): Handle gdb_agent_op_printf.
8110
8111 2011-02-21  Hui Zhu  <teawater@gmail.com>
8112
8113         * tracepoint.c (tp_printf): New function.
8114         (eval_agent_expr): Handle gdb_agent_op_printf.
8115
8116 2011-02-18  Tom Tromey  <tromey@redhat.com>
8117
8118         * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
8119         (tracepoint.o): Likewise.
8120         * tracepoint.c (enum gdb_agent_op): Use ax.def.
8121         (gdb_agent_op_names): Likewise.
8122
8123 2011-02-18  Tom Tromey  <tromey@redhat.com>
8124
8125         * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
8126         gdb_agent_op_rot>: New constants.
8127         (gdb_agent_op_names): Add pick and roll.
8128         (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
8129         cases.
8130
8131 2011-02-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
8132
8133         * aclocal.m4: Regenerated with aclocal-1.11.1.
8134
8135 2011-02-14  Pedro Alves  <pedro@codesourcery.com>
8136
8137         * server.c (handle_qxfer_traceframe_info): New.
8138         (qxfer_packets): Register "traceframe-info".
8139         (handle_query): Report support for qXfer:traceframe-info:read+.
8140         * tracepoint.c (match_blocktype): New.
8141         (traceframe_find_block_type): Rename to ...
8142         (traceframe_walk_blocks): ... this.  Add callback filter argument,
8143         and use it.
8144         (traceframe_find_block_type): New, reimplemented on top of
8145         traceframe_walk_blocks.
8146         (build_traceframe_info_xml): New.
8147         (traceframe_read_info): New.
8148         * server.h (traceframe_read_info): Declare.
8149
8150 2011-02-11  Yao Qi  <yao@codesourcery.com>
8151
8152         * configure.ac: Call AC_PROG_RANLIB.
8153         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
8154         * configure: Regenerate.
8155
8156 2011-02-07  Pedro Alves  <pedro@codesourcery.com>
8157
8158         * server.c (gdb_read_memory): Change return semantics to allow
8159         partial transfers.
8160         (handle_search_memory_1): Adjust.
8161         (process_serial_event) <'m' packet>: Handle partial transfers.
8162         * tracepoint.c (traceframe_read_mem): Handle partial transfers.
8163
8164 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
8165
8166         * regcache.c (init_register_cache): Initialize
8167         regcache->register_status.
8168         (free_register_cache): Release regcache->register_status.
8169         (regcache_cpy): Copy register_status.
8170         (registers_to_string): Print 'x's for unavailable registers.
8171         (supply_register): Mark the register's status valid or
8172         unavailable, depending on whether a buffer was passed in or not.
8173         (supply_register_zeroed): New.
8174         (supply_regblock): Mark the registers' status valid or
8175         unavailable, depending on whether a buffer was passed in or not.
8176         * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
8177         (struct regcache): New `register_status' field.
8178         (supply_register_zeroed): Declare.
8179         * i387-fp.c (i387_xsave_to_cache): Zero out registers using
8180         supply_register_zeroed, rather than passing a NULL buffer to
8181         supply_register.
8182         * tracepoint.c (fetch_traceframe_registers): Update comment.
8183
8184 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
8185
8186         * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
8187         buffer explicit.
8188
8189 2011-01-25  Pedro Alves  <pedro@codesourcery.com>
8190
8191         * server.h (decode_xfer_write): Change prototype.
8192         * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
8193         and don't extract the annex here.
8194         * server.c (decode_xfer_read): Remove `annex' parameter,
8195         and don't extract the annex here.
8196         (decode_xfer): New.
8197         (struct qxfer): New.
8198         (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
8199         (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
8200         (handle_qxfer_statictrace): New functions, abstracted out from
8201         handle_query, and made to use the struct qxfer interface.
8202         (handle_threads_qxfer_proper): Rename to ...
8203         (handle_qxfer_threads_proper): ... this.
8204         (handle_threads_qxfer): Rename to ...
8205         (handle_qxfer_threads): ... this.  Adjust.
8206         (qxfer_packets): New array.
8207         (handle_qxfer): New function.
8208         (handle_query): Use handle_qxfer.
8209
8210 2011-01-05  Michael Snyder  <msnyder@msnyder-server.eng.vmware.com>
8211
8212         * gdbreplay.c: Shorten lines of >= 80 columns.
8213         * linux-low.c: Ditto.
8214         * linux-ppc-low.c: Ditto.
8215         * linux-s390-low.c: Ditto.
8216         * linux-sparc-low.c: Ditto.
8217         * linux-x86-low.c: Ditto.
8218         * linux-xtensa-low.c: Ditto.
8219         * mem-break.c: Ditto.
8220         * nto-low.c: Ditto.
8221         * regcache.h: Ditto.
8222         * remote-utils.c: Ditto.
8223         * server.c: Ditto.
8224         * server.h: Ditto.
8225         * thread-db.c: Ditto.
8226         * tracepoint.c: Ditto.
8227         * utils.c: Ditto.
8228         * win32-low.h: Ditto.
8229
8230 2011-01-05  Joel Brobecker  <brobecker@adacore.com>
8231
8232         * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
8233         update.
8234
8235 2011-01-01  Joel Brobecker  <brobecker@adacore.com>
8236
8237         * server.c (gdbserver_version): Update copyright year in version
8238         output.
8239         * gdbreplay.c (gdbreplay_version): Ditto.
8240
8241 2010-12-29  Jie Zhang  <jie.zhang@analog.com>
8242
8243         * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
8244         * linux-bfin-low.c: New file.
8245         * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
8246         PT_DATA_ADDR for BFIN targets.
8247         * Makefile.in (SFILES): Add linux-bfin-low.c.
8248         (clean): Remove reg-bfin.c.
8249         (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
8250         * README: Mention supported Blackfin targets.
8251
8252 2010-12-23  Mike Frysinger  <vapier@gentoo.org>
8253
8254         * .gitignore: New file.
8255
8256 2010-11-16  Mike Frysinger  <vapier@gentoo.org>
8257
8258         * linux-low.c (linux_tracefork_child): Add char* cast to arg.
8259
8260 2010-10-22  Jie Zhang  <jie@codesourcery.com>
8261
8262         * Makefile.in: Add FLAGS_TO_PASS variable.
8263         (install): Remove dependency of install-only and recursively
8264         invoke make for install-only.
8265
8266 2010-10-04  Doug Evans  <dje@google.com>
8267
8268         * Makefile.in (uninstall): Use $(DESTDIR).
8269
8270 2010-09-24  Pedro Alves  <pedro@codesourcery.com>
8271
8272         PR gdb/11842
8273
8274         * linux-x86-low.c (compat_siginfo_from_siginfo)
8275         (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
8276         si_code is < 0.  Check for si_code == SI_TIMER before checking for
8277         si_code < 0.
8278
8279 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
8280
8281         * lynx-i386-low.c: New file.
8282         * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
8283
8284 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
8285
8286         * lynx-low.c (ptrace_request_to_str): Remove handling for
8287         request values that have been removed in LynxOS 5.x.
8288
8289 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
8290
8291         * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
8292         <ptrace.h>
8293
8294 2010-09-09  Nathan Sidwell  <nathan@codesourcery.com>
8295
8296         * configure.ac: Add --enable-inprocess-agent option.
8297         * configure: Rebuilt.
8298
8299 2010-09-06  Yao Qi  <yao@codesourcery.com>
8300
8301         * linux-low.c (linux_kill): Remove unused variable.
8302         (linux_stabilize_threads): Likewise.
8303         * server.c (start_inferior): Likewise.
8304         (queue_stop_reply_callback): Likewise.
8305         * tracepoint.c (do_action_at_tracepoint): Likewise.
8306
8307 2010-09-06  Yao Qi  <yao@codesourcery.com>
8308
8309         * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
8310         on return.
8311
8312 2010-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
8313
8314         * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
8315
8316 2010-09-06  Pedro Alves  <pedro@codesourcery.com>
8317
8318         * Makefile.in (install-only): Replace $IPA_DEPFILES with
8319         "$(IPA_DEPFILES)".
8320
8321 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
8322
8323         * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
8324         gdbserver/lynx-ppc-low.c: New files.
8325         * Makefile.in (lynx_low_h): New variable.
8326         (lynx-low.o, lynx-ppc-low.o): New rules.
8327         * configure.ac: On LynxOS, link with -lnetinet.
8328         * configure.srv: Add handling of powerpc-*-lynxos* targets.
8329         * configure: regenerate.
8330
8331 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
8332
8333         * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
8334         * configure.ac: Add check for vasprintf and vsnprintf.
8335         * configure, config.in: Regenerate.
8336         * server.h (vasprintf, vsnprintf): Add conditional declarations.
8337
8338 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
8339
8340         * gdbreplay.c: Move include of alloca.h up, next to include of
8341         malloc.h.
8342         * server.h: Add include of malloc.h.
8343         * mem-break.c: Remove include of malloc.h.
8344         * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
8345
8346 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
8347
8348         * Makefile.in (memmem.o): Build with -Wno-error.
8349
8350 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
8351
8352         * utils.c (xsnprintf): Make non-static.
8353         * server.h: Add xsnprintf declaration.
8354         * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
8355         replace calls to snprintf by calls to xsnprintf throughout.
8356
8357 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
8358
8359         * configure.ac: Add configure check for alloca.
8360         * configure, config.in: Regenerate.
8361         * server.h: Include alloca.h if it exists.
8362         * gdbreplay.c: Include alloca.h if it exists.
8363
8364 2010-08-28  Pedro Alves  <pedro@codesourcery.com>
8365
8366         * linux-low.c (__SIGRTMIN): Define if not already defined.
8367         (linux_create_inferior): Check for __ANDROID__ rather than
8368         __SIGRTMIN.
8369         (enqueue_one_deferred_signal): Don't requeue non-RT signals that
8370         are already deferred.
8371         (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
8372         (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
8373         stopped and already has a pending signal to report.
8374         (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
8375         a pending signal to report or is moving out of a jump pad.
8376         (linux_init_signals): Check for __ANDROID__ rather than
8377         __SIGRTMIN.
8378
8379 2010-08-28  Pedro Alves  <pedro@codesourcery.com>
8380
8381         * linux-low.c (linux_stabilize_threads): Wrap debug output in a
8382         debug_threads check.  Avoid a linear search when not doing debug
8383         output.
8384
8385 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
8386
8387         * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
8388         (struct gdb_event) <fd>: Change type to gdb_fildes_t.
8389         (struct file_handler) <fd>: Change type to gdb_fildes_t.
8390         (process_event): Change local fd's type to gdb_fildes_t.
8391         (create_file_handler): Adjust prototype.
8392         (delete_file_handler): Adjust prototype.
8393         (handle_file_event): Adjust prototype.  Use pfildes.
8394         (create_file_event): Adjsut prototype.
8395         * remote-utils.c (remote_desc, listen_desc): Change type to
8396         gdb_fildes_t.
8397         * server.h: New gdb_fildes_t typedef.
8398         [USE_WIN32API]: Include winsock2.h.
8399         (delete_file_handler, add_file_handler): Adjust prototypes.
8400         (pfildes): Declare.
8401         * utils.c (pfildes): New.
8402
8403 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
8404
8405         * configure.ac (build_warnings): Add -Wno-char-subscripts.
8406         * configure: Regenerate.
8407
8408 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
8409
8410         * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
8411         (linux_done_accessing_memory): ... this.
8412         (linux_target_ops): Adjust.
8413         * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
8414         * nto-low.c (nto_target_ops): Adjust comment.
8415         * server.c (gdb_read_memory, gdb_write_memory): Adjust.
8416         * spu-low.c (spu_target_ops): Adjust comment.
8417         * target.h (target_ops): Rename unprepare_to_access_memory field
8418         to done_accessing_memory.
8419         (unprepare_to_access_memory): Rename to ...
8420         (done_accessing_memory): ... this.
8421
8422 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
8423
8424         * linux-low.c (linux_prepare_to_access_memory): New.
8425         (linux_unprepare_to_access_memory): New.
8426         (linux_target_ops): Install them.
8427         * server.c (read_memory): Rename to ...
8428         (gdb_read_memory): ... this.  Use
8429         prepare_to_access_memory/prepare_to_access_memory.
8430         (write_memory): Rename to ...
8431         (gdb_write_memory): ... this.  Use
8432         prepare_to_access_memory/prepare_to_access_memory.
8433         (handle_search_memory_1): Adjust.
8434         (process_serial_event): Adjust.
8435         * target.h (struct target_ops): New fields
8436         prepare_to_access_memory and unprepare_to_access_memory.
8437         (prepare_to_access_memory, unprepare_to_access_memory): New.
8438         * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
8439         prepare_to_access_memory/prepare_to_access_memory.
8440         * nto-low.c (nto_target_ops): Adjust.
8441         * spu-low.c (spu_target_ops): Adjust.
8442         * win32-low.c (win32_target_ops): Adjust.
8443
8444 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
8445
8446         * Makefile.in (WARN_CFLAGS): Get it from configure.
8447         (WERROR_CFLAGS): New.
8448         (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
8449         * configure.ac: Introduce --enable-werror, which adds -Werror to
8450         the compiler command line.  Enabled by default.  Disable with
8451         --disable-werror.  Add -Wdeclaration-after-statement
8452         Wpointer-arith and -Wformat-nonliteral to warning flags.
8453         * configure: Regenerate.
8454
8455 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
8456
8457         * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
8458
8459 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
8460
8461         * gdbreplay.c (remote_error): New.
8462         (gdbchar): New.
8463         (expect): Use gdbchar.  Check for error reading from GDB.
8464         Clarify sync error output.
8465         (play): Check for errors writing to GDB.
8466         * linux-low.c (sigchld_handler): Really ignore `write' errors.
8467         * remote-utils.c (getpkt): Check for errors writing to the remote
8468         descriptor.
8469
8470 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
8471
8472         * linux-low.c (linux_wait_1): Move non-debugging code out of
8473         `debug_threads' control.
8474
8475 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
8476
8477         * linux-low.c (linux_wait_1): Don't set last_status here.
8478         * server.c (push_event, queue_stop_reply_callback): Assert we're
8479         not pushing a TARGET_WAITKIND_IGNORE event.
8480         (start_inferior, start_inferior, attach_inferior, handle_v_cont)
8481         (myresume, handle_target_event): Set the thread's last_resume_kind
8482         and last_status from the target returned status.
8483
8484 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
8485
8486         PR threads/10729
8487
8488         * linux-x86-low.c (update_debug_registers_callback): New.
8489         (i386_dr_low_set_addr): Use it.
8490         (i386_dr_low_get_addr): New.
8491         (i386_dr_low_set_control): Use update_debug_registers_callback.
8492         (i386_dr_low_get_control): New.
8493         (i386_dr_low_get_status): Adjust.
8494         * linux-low.c (linux_stop_lwp): New.
8495         * linux-low.h (linux_stop_lwp): Declare.
8496
8497         * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
8498         argument instead of a i386_debug_reg_state.
8499         (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
8500         a i386_debug_reg_state.
8501         (i386_insert_aligned_watchpoint): Adjust.
8502         (i386_remove_aligned_watchpoint): Adjust.
8503         (i386_low_stopped_data_address): Read the debug registers from the
8504         inferior instead of from the mirrors.
8505         * i386-low.h (struct i386_debug_reg_state): Extend comment.
8506         (i386_dr_low_get_addr): Declare.
8507         (i386_dr_low_get_control): Declare.
8508         (i386_dr_low_get_status): Change prototype.
8509
8510         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
8511         (i386_dr_low_get_addr): New.
8512         (i386_dr_low_get_control): New.
8513         (i386_dr_low_get_status): Adjust prototype.  Return
8514         dr_status_mirror.
8515         (i386_initial_stuff): Clear dr_status_mirror and
8516         dr_control_mirror.
8517         (i386_get_thread_context): Adjust.
8518         (i386_set_thread_context): Adjust.
8519         (i386_thread_added): Adjust.
8520
8521 2010-08-24  Pedro Alves  <pedro@codesourcery.com>
8522
8523         * linux-low.h (linux_thread_area): Delete declaration.
8524
8525 2010-08-11  Thomas Schwinge  <thomas@codesourcery.com>
8526
8527         * linux-low.c (linux_wait_1): Correctly return the ptid of the child
8528         after its termination.
8529
8530 2010-08-09  Pedro Alves  <pedro@codesourcery.com>
8531
8532         * linux-low.c (gdb_wants_lwp_stopped): Delete.
8533         (gdb_wants_all_stopped): Delete.
8534         (linux_wait_1): Don't call them.
8535         * server.c (handle_v_cont): Tag all threads as want-stopped.
8536         (gdb_wants_thread_stopped): Fix comments.  Tag the thread that
8537         stopped as "client-wants-stopped".
8538
8539 2010-07-31  Pedro Alves  <pedro@codesourcery.com>
8540
8541         * Makefile.in (signals_h): New.
8542         (server_h): Depend on it.
8543         (server.o): Don't depend on $(signals_def).
8544         (signals.o): Depend on $(signals_def).
8545
8546 2010-07-31  Jan Kratochvil  <jan.kratochvil@redhat.com>
8547
8548         * Makefile.in (signals_def): New.
8549         (server_h): Append include/gdb/signals.h and signals_def.
8550         (server.o): Append signals_def.
8551
8552 2010-07-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
8553
8554         * server.c (handle_target_event): Use target_signal_to_host for
8555         resume_info.sig initialization.
8556         * target.h (struct thread_resume) <sig>: New comment.
8557
8558 2010-07-20  Ozkan Sezer  <sezeroz@gmail.com>
8559
8560         * server.c (handle_query): strcpy() the returned string from paddress()
8561         instead of sprintf().
8562         * utils.c (paddress): Return phex_nz().
8563
8564 2010-07-07  Joel Brobecker  <brobecker@adacore.com>
8565
8566         * server.c (handle_v_cont): Call mourn_inferior if process
8567         just exited.
8568         (myresume): Likewise.
8569
8570 2010-07-01  Pedro Alves  <pedro@codesourcery.com>
8571
8572         Static tracepoints, and integration with UST.
8573
8574         * configure.ac: Handle --with-ust.  substitute ustlibs and ustinc.
8575         * mem-break.c (uninsert_all_breakpoints)
8576         (reinsert_all_breakpoints): New.
8577         * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
8578         * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
8579         (gdb_agent_ust_loaded, helper_thread_id)
8580         (gdb_agent_helper_thread_id): New macros.
8581         (struct ipa_sym_addresses): Add addr_ust_loaded,
8582         addr_helper_thread_id, addr_cmd_buf.
8583         (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
8584         (in_process_agent_loaded_ust): New.
8585         (write_e_ust_not_loaded): New.
8586         (maybe_write_ipa_ust_not_loaded): New.
8587         (struct collect_static_trace_data_action): New.
8588         (enum tracepoint_type) <static_tracepoint>: New.
8589         (struct tracepoint) <handle>: Mention static tracepoints.
8590         (struct static_tracepoint_ctx): New.
8591         (CMD_BUF_SIZE): New.
8592         (add_tracepoint_action): Handle static tracepoint actions.
8593         (unprobe_marker_at): New.
8594         (clear_installed_tracepoints): Handle static tracepoints.
8595         (cmd_qtdp): Handle static tracepoints.
8596         (probe_marker_at): New.
8597         (cmd_qtstart): Handle static tracepoints.
8598         (response_tracepoint): Handle static tracepoints.
8599         (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
8600         (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
8601         (get_context_regcache): Handle static tracepoints.
8602         (do_action_at_tracepoint): Handle static tracepoint actions.
8603         (traceframe_find_block_type): Handle static trace data blocks.
8604         (traceframe_read_sdata): New.
8605         (download_tracepoints): Download static tracepoint actions.
8606         [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
8607         (GDB_PROBE_NAME): New.
8608         (ust_ops): New.
8609         (GET_UST_SYM): New.
8610         (USTF): New.
8611         (dlsym_ust): New.
8612         (ust_marker_to_static_tracepoint): New.
8613         (gdb_probe): New.
8614         (collect_ust_data_at_tracepoint): New.
8615         (gdb_ust_probe): New.
8616         (UNIX_PATH_MAX, SOCK_DIR): New.
8617         (gdb_ust_connect_sync_socket): New.
8618         (resume_thread, stop_thread): New.
8619         (run_inferior_command): New.
8620         (init_named_socket): New.
8621         (gdb_ust_socket_init): New.
8622         (cstr_to_hexstr): New.
8623         (next_st): New.
8624         (first_marker, next_marker): New.
8625         (response_ust_marker): New.
8626         (cmd_qtfstm, cmd_qtsstm): New.
8627         (unprobe_marker_at, probe_marker_at): New.
8628         (cmd_qtstmat, gdb_ust_thread): New.
8629         (gdb_ust_init): New.
8630         (initialize_tracepoint_ftlib): Call gdb_ust_init.
8631         * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
8632         (ST_REGENTRY): New.
8633         (x86_64_st_collect_regmap): New.
8634         (X86_64_NUM_ST_COLLECT_GREGS): New.
8635         (AMD64_RIP_REGNUM): New.
8636         (supply_static_tracepoint_registers): New.
8637         * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
8638         (ST_REGENTRY): New.
8639         (i386_st_collect_regmap): New.
8640         (i386_NUM_ST_COLLECT_GREGS): New.
8641         (supply_static_tracepoint_registers): New.
8642         * server.c (handle_query): Handle qXfer:statictrace:read.
8643         <qSupported>: Report support for StaticTracepoints, and
8644         qXfer:statictrace:read features.
8645         * server.h (traceframe_read_sdata)
8646         (supply_static_tracepoint_registers): Declare.
8647         * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
8648         (unpack_varlen_hex): Include in IPA build.
8649         * Makefile.in (ustlibs, ustinc): New.
8650         (IPA_OBJS): Add remote-utils-ipa.o.
8651         ($(IPA_LIB)): Link -ldl and -lpthread.
8652         (UST_CFLAGS): New.
8653         (IPAGENT_CFLAGS): Add UST_CFLAGS.
8654         * config.in, configure: Regenerate.
8655
8656 2010-06-20  Ian Lance Taylor  <iant@google.com>
8657             Pedro Alves  <pedro@codesourcery.com>
8658
8659         * linux-x86-low.c (always_true): Delete.
8660         (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
8661         trying to fool the compiler with always_true.
8662
8663 2010-06-20  Pedro Alves  <pedro@codesourcery.com>
8664
8665         * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
8666         conditions in gdbserver.
8667
8668 2010-06-19  Ulrich Weigand  <uweigand@de.ibm.com>
8669
8670         * spu-low.c (spu_read_memory): Wrap around local store limit.
8671         (spu_write_memory): Likewise.
8672
8673 2010-06-15  Pedro Alves  <pedro@codesourcery.com>
8674
8675         * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
8676         (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
8677         LONGEST uses.
8678         * server.h (struct emit_ops): Replace int64_t uses with LONGEST
8679         uses.
8680         * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
8681         uses with LONGEST uses.
8682
8683 2010-06-14  Stan Shebs  <stan@codesourcery.com>
8684             Pedro Alves  <pedro@codesourcery.com>
8685
8686         Bytecode compiler.
8687
8688         * linux-x86-low.c: Include limits.h.
8689         (add_insns): New.
8690         (always_true): New.
8691         (EMIT_ASM): New.
8692         (EMIT_ASM32): New.
8693         (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
8694         (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
8695         (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
8696         (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
8697         (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
8698         (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
8699         (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
8700         (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
8701         (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
8702         (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
8703         (amd64_emit_void_call_2): New.
8704         (amd64_emit_ops): New.
8705         (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
8706         (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
8707         (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
8708         (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
8709         (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
8710         (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
8711         (i386_emit_goto, i386_write_goto_address, i386_emit_const)
8712         (i386_emit_call, i386_emit_reg, i386_emit_pop)
8713         (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
8714         (i386_emit_stack_adjust, i386_emit_int_call_1)
8715         (i386_emit_void_call_2): New.
8716         (i386_emit_ops): New.
8717         (x86_emit_ops): New.
8718         (the_low_target): Install x86_emit_ops.
8719         * server.h (struct emit_ops): New.
8720         (get_raw_reg_func_addr): Declare.
8721         (current_insn_ptr, emit_error): Declare.
8722         * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
8723         (set_trace_state_variable_value): New defines.
8724         (struct ipa_sym_addresses): New fields addr_get_raw_reg,
8725         addr_get_trace_state_variable_value and
8726         addr_set_trace_state_variable_value.
8727         (symbol_list): New fields for get_raw_reg,
8728         get_trace_state_variable_value and set_trace_state_variable_value.
8729         (condfn): New typedef.
8730         (struct tracepoint): New field `compiled_cond'.
8731         (do_action_at_tracepoint): Clear compiled_cond.
8732         (get_trace_state_variable_value, set_trace_state_variable_value):
8733         Export in the IPA.
8734         (condition_true_at_tracepoint): If there's a compiled condition,
8735         run that.
8736         (current_insn_ptr, emit_error): New globals.
8737         (struct bytecode_address): New.
8738         (get_raw_reg_func_addr): New.
8739         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
8740         (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
8741         (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
8742         (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
8743         (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
8744         (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
8745         (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
8746         (compile_tracepoint_condition, compile_bytecodes): New.
8747         * target.h (emit_ops): Forward declare.
8748         (struct target_ops): New field emit_ops.
8749         (target_emit_ops): New.
8750         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
8751         * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
8752         * linux-low.c (linux_emit_ops): New.
8753         (linux_target_ops): Install it.
8754         * linux-low.h (struct linux_target_ops): New field emit_ops.
8755
8756 2010-06-14  Ulrich Weigand  <uweigand@de.ibm.com>
8757
8758         * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
8759         * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
8760
8761 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
8762             Stan Shebs  <stan@codesourcery.com>
8763
8764         * Makefile.in (IPA_DEPFILES, extra_libraries): New.
8765         (all): Depend on $(extra_libraries).
8766         (install-only): Install the IPA.
8767         (IPA_OBJS, IPA_LIB): New.
8768         (clean): Remove the IPA lib.
8769         (IPAGENT_CFLAGS): New.
8770         (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
8771         (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
8772         (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
8773         * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
8774         * configure.ac: Check for atomic builtins support in the compiler.
8775         (IPA_DEPFILES, extra_libraries): Define.
8776         * configure.srv (ipa_obj): Add description.
8777         (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
8778         (i[34567]86-*-linux*): Set ipa_obj.
8779         (x86_64-*-linux*): Set ipa_obj.
8780         * linux-low.c (stabilizing_threads): New.
8781         (supports_fast_tracepoints): New.
8782         (linux_detach): Stabilize threads before detaching.
8783         (handle_tracepoints): Handle internal tracing breakpoints.  Assert
8784         the lwp is either not stabilizing, or is moving out of a jump pad.
8785         (linux_fast_tracepoint_collecting): New.
8786         (maybe_move_out_of_jump_pad): New.
8787         (enqueue_one_deferred_signal): New.
8788         (dequeue_one_deferred_signal): New.
8789         (linux_wait_for_event_1): If moving out of a jump pad, defer
8790         pending signals to later.
8791         (linux_stabilize_threads): New.
8792         (linux_wait_1): Check if threads need moving out of jump pads, and
8793         do it if so.
8794         (stuck_in_jump_pad_callback): New.
8795         (move_out_of_jump_pad_callback): New.
8796         (lwp_running): New.
8797         (linux_resume_one_lwp): Handle moving out of jump pads.
8798         (linux_set_resume_request): Dequeue deferred signals.
8799         (need_step_over_p): Also step over fast tracepoint jumps.
8800         (start_step_over): Also uninsert fast tracepoint jumps.
8801         (finish_step_over): Also reinsert fast tracepoint jumps.
8802         (linux_install_fast_tracepoint_jump): New.
8803         (linux_target_ops): Install linux_stabilize_threads and
8804         linux_install_fast_tracepoint_jump_pad.
8805         * linux-low.h (linux_target_ops) <get_thread_area,
8806         install_fast_tracepoint_jump_pad>: New fields.
8807         (struct lwp_info) <collecting_fast_tracepoint,
8808         pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
8809         (linux_get_thread_area): Declare.
8810         * linux-x86-low.c (jump_insn): New.
8811         (x86_get_thread_area): New.
8812         (append_insns): New.
8813         (push_opcode): New.
8814         (amd64_install_fast_tracepoint_jump_pad): New.
8815         (i386_install_fast_tracepoint_jump_pad): New.
8816         (x86_install_fast_tracepoint_jump_pad): New.
8817         (the_low_target): Install x86_get_thread_area and
8818         x86_install_fast_tracepoint_jump_pad.
8819         * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
8820         (struct fast_tracepoint_jump): New.
8821         (fast_tracepoint_jump_insn): New.
8822         (fast_tracepoint_jump_shadow): New.
8823         (find_fast_tracepoint_jump_at): New.
8824         (fast_tracepoint_jump_here): New.
8825         (delete_fast_tracepoint_jump): New.
8826         (set_fast_tracepoint_jump): New.
8827         (uninsert_fast_tracepoint_jumps_at): New.
8828         (reinsert_fast_tracepoint_jumps_at): New.
8829         (set_breakpoint_at): Use write_inferior_memory.
8830         (uninsert_raw_breakpoint): Use write_inferior_memory.
8831         (check_mem_read): Mask out fast tracepoint jumps.
8832         (check_mem_write): Mask out fast tracepoint jumps.
8833         * mem-break.h (struct fast_tracepoint_jump): Forward declare.
8834         (set_fast_tracepoint_jump): Declare.
8835         (delete_fast_tracepoint_jump)
8836         (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
8837         (reinsert_fast_tracepoint_jumps_at): Declare.
8838         * regcache.c: Don't compile many functions when building the
8839         in-process agent library.
8840         (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
8841         the register buffer in the heap.
8842         (free_register_cache): If the register buffer isn't owned by the
8843         regcache, don't free it.
8844         (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
8845         pre-existing register caches.
8846         * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
8847         type.
8848         (convert_ascii_to_int): : Constify `from' parameter type.
8849         (decode_M_packet, decode_X_packet): Replace the `to' parameter by
8850         a `to_p' pointer to pointer parameter.  If TO_P is NULL, malloc
8851         the needed buffer in-place.
8852         (relocate_instruction): New.
8853         * server.c (handle_query) <qSymbols>: If the target supports
8854         tracepoints, give it a chance of looking up symbols.  Report
8855         support for fast tracepoints.
8856         (handle_status): Stabilize threads.
8857         (process_serial_event): Adjust.
8858         * server.h (struct fast_tracepoint_jump): Forward declare.
8859         (struct process_info) <fast_tracepoint_jumps>: New field.
8860         (convert_ascii_to_int, convert_int_to_ascii): Adjust.
8861         (decode_X_packet, decode_M_packet): Adjust.
8862         (relocate_instruction): Declare.
8863         (in_process_agent_loaded): Declare.
8864         (tracepoint_look_up_symbols): Declare.
8865         (struct fast_tpoint_collect_status): Declare.
8866         (fast_tracepoint_collecting): Declare.
8867         (force_unlock_trace_buffer): Declare.
8868         (handle_tracepoint_bkpts): Declare.
8869         (initialize_low_tracepoint)
8870         (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
8871         * target.h (struct target_ops) <stabilize_threads,
8872         install_fast_tracepoint_jump_pad>: New fields.
8873         (stabilize_threads, install_fast_tracepoint_jump_pad): New.
8874         * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
8875         [HAVE_STDINT_H]: Include stdint.h.
8876         (trace_debug_1): Rename to ...
8877         (trace_vdebug): ... this.
8878         (trace_debug): Rename to ...
8879         (trace_debug_1): ... this.  Add `level' parameter.
8880         (trace_debug): New.
8881         (ATTR_USED, ATTR_NOINLINE): New.
8882         (IP_AGENT_EXPORT): New.
8883         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8884         (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
8885         (about_to_request_buffer_space, trace_buffer_is_full)
8886         (stopping_tracepoint, expr_eval_result, error_tracepoint)
8887         (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
8888         (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
8889         (traceframe_write_count, traceframes_created)
8890         (trace_state_variables)
8891         New renaming defines.
8892         (struct ipa_sym_addresses): New.
8893         (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
8894         (symbol_list): New.
8895         (ipa_sym_addrs): New.
8896         (all_tracepoint_symbols_looked_up): New.
8897         (in_process_agent_loaded): New.
8898         (write_e_ipa_not_loaded): New.
8899         (maybe_write_ipa_not_loaded): New.
8900         (tracepoint_look_up_symbols): New.
8901         (debug_threads) [IN_PROCESS_AGENT]: New.
8902         (read_inferior_memory) [IN_PROCESS_AGENT]: New.
8903         (UNKNOWN_SIDE_EFFECTS): New.
8904         (stop_tracing): New.
8905         (flush_trace_buffer): New.
8906         (stop_tracing_bkpt): New.
8907         (flush_trace_buffer_bkpt): New.
8908         (read_inferior_integer): New.
8909         (read_inferior_uinteger): New.
8910         (read_inferior_data_pointer): New.
8911         (write_inferior_data_pointer): New.
8912         (write_inferior_integer): New.
8913         (write_inferior_uinteger): New.
8914         (struct collect_static_trace_data_action): Delete.
8915         (enum tracepoint_type): New.
8916         (struct tracepoint) <type>: New field `type'.
8917         <actions_str, step_actions, step_actions_str>: Only include in
8918         GDBserver.
8919         <orig_size, obj_addr_on_target, adjusted_insn_addr>
8920         <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
8921         (tracepoints): Use IP_AGENT_EXPORT.
8922         (last_tracepoint): Don't include in the IPA.
8923         (stopping_tracepoint): Use IP_AGENT_EXPORT.
8924         (trace_buffer_is_full): Use IP_AGENT_EXPORT.
8925         (alloced_trace_state_variables): New.
8926         (trace_state_variables): Use IP_AGENT_EXPORT.
8927         (traceframe_t): Delete unused variable.
8928         (circular_trace_buffer): Don't include in the IPA.
8929         (trace_buffer_start): Delete.
8930         (struct trace_buffer_control): New.
8931         (trace_buffer_free): Delete.
8932         (struct ipa_trace_buffer_control): New.
8933         (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
8934         (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
8935         New.
8936         (trace_buffer_ctrl): New.
8937         (TRACE_BUFFER_CTRL_CURR): New.
8938         (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
8939         Reimplement as macros.
8940         (trace_buffer_wrap): Delete.
8941         (traceframe_write_count, traceframe_read_count)
8942         (traceframes_created, tracing): Use IP_AGENT_EXPORT.
8943         (struct tracepoint_hit_ctx) <type>: New field.
8944         (struct fast_tracepoint_ctx): New.
8945         (memory_barrier): New.
8946         (cmpxchg): New.
8947         (record_tracepoint_error): Update atomically in the IPA.
8948         (clear_inferior_trace_buffer): New.
8949         (about_to_request_buffer_space): New.
8950         (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
8951         updating the same buffer.
8952         (add_tracepoint): Default the tracepoint's type to trap
8953         tracepoint, and orig_size to -1.
8954         (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
8955         internal variables.
8956         (create_trace_state_variable): New parameter `gdb'.  Handle it.
8957         (clear_installed_tracepoints): Clear fast tracepoint jumps.
8958         (cmd_qtdp): Handle fast tracepoints.
8959         (cmd_qtdv): Adjust.
8960         (max_jump_pad_size): New.
8961         (gdb_jump_pad_head): New.
8962         (get_jump_space_head): New.
8963         (claim_jump_space): New.
8964         (sort_tracepoints): New.
8965         (MAX_JUMP_SIZE): New.
8966         (cmd_qtstart): Handle fast tracepoints.  Sync tracepoints with the
8967         IPA.
8968         (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
8969         support.  Upload fast traceframes, and delete internal IPA
8970         breakpoints.
8971         (stop_tracing_handler): New.
8972         (flush_trace_buffer_handler): New.
8973         (cmd_qtstop): Upload fast tracepoints.
8974         (response_tracepoint): Handle fast tracepoints.
8975         (tracepoint_finished_step): Upload fast traceframes.  Set the
8976         tracepoint hit context's tracepoint type.
8977         (handle_tracepoint_bkpts): New.
8978         (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
8979         type.  Add comment about fast tracepoints.
8980         (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
8981         non-existing action_str field.
8982         (get_context_regcache): Handle fast tracepoints.
8983         (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
8984         to the regcache.
8985         (fast_tracepoint_from_jump_pad_address): New.
8986         (fast_tracepoint_from_ipa_tpoint_address): New.
8987         (collecting_t): New.
8988         (force_unlock_trace_buffer): New.
8989         (fast_tracepoint_collecting): New.
8990         (collecting): New.
8991         (gdb_collect): New.
8992         (write_inferior_data_ptr): New.
8993         (target_tp_heap): New.
8994         (target_malloc): New.
8995         (download_agent_expr): New.
8996         (UALIGN): New.
8997         (download_tracepoints): New.
8998         (download_trace_state_variables): New.
8999         (upload_fast_traceframes): New.
9000         (IPA_FIRST_TRACEFRAME): New.
9001         (IPA_NEXT_TRACEFRAME_1): New.
9002         (IPA_NEXT_TRACEFRAME): New.
9003         [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
9004         [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
9005         (gdb_jump_pad_buffer_end): New.
9006         [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
9007         (initialize_tracepoint): Adjust.
9008         [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
9009         buffer.  Initialize the low module.
9010         * utils.c (PREFIX, TOOLNAME): New.
9011         (malloc_failure): Use PREFIX.
9012         (error): In the IPA, an error causes an exit.
9013         (fatal, warning): Use PREFIX.
9014         (internal_error): Use TOOLNAME.
9015         (NUMCELLS): Increase to 10.
9016         * configure, config.in: Regenerate.
9017
9018 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
9019
9020         * server.c (handle_query) <qSupported>: Do two passes over the
9021         qSupported string to avoid nesting strtok.
9022
9023 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
9024
9025         * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
9026         (CDEPS): New.
9027         * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping.  Test also
9028         -Wl,--dynamic-list.
9029         * configure: Regenerate.
9030         * proc-service.list: New.
9031
9032 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
9033
9034         * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
9035         New comment.
9036
9037 2010-05-26  Ozkan Sezer  <sezeroz@gmail.com>
9038
9039         * gdbreplay.c (remote_open): Check error return from socket() call by
9040         its equality to -1 not by it being negative.
9041         * remote-utils.c (remote_open): Likewise.
9042
9043 2010-05-23  Pedro Alves  <pedro@codesourcery.com>
9044
9045         * config.h: Regenerate.
9046
9047 2010-05-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
9048
9049         * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
9050         doesn't provide PTRACE_GET_THREAD_AREA.
9051
9052 2010-05-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
9053
9054         * linux-m68k-low.c: Include <asm/ptrace.h>
9055         (ps_get_thread_area): Implement.
9056
9057 2010-05-03  Doug Evans  <dje@google.com>
9058
9059         * event-loop.c (struct callback_event): New struct.
9060         (callback_list): New global.
9061         (append_callback_event, delete_callback_event): New functions.
9062         (process_callback): New function.
9063         (start_event_loop): Call it.
9064         * remote-utils.c (NOT_SCHEDULED): Define.
9065         (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
9066         moved out of readchar.
9067         (readchar): Rewrite.  Call reschedule before returning.
9068         (reset_readchar): New function.
9069         (remote_close): Call it.
9070         (process_remaining, reschedule): New functions.
9071         * server.h (callback_handler_func): New typedef.
9072         (append_callback_event, delete_callback_event): Declare.
9073
9074 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
9075
9076         * proc-service.c (ps_pglobal_lookup): Use
9077         thread_db_look_up_one_symbol.
9078         * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
9079         parameter.  Use it instead of all_symbols_looked_up.
9080         * server.h (struct process_info) <all_symbols_looked_up>: Delete
9081         field.
9082         (all_symbols_looked_up): Don't declare.
9083         (look_up_one_symbol): Add new `may_ask_gdb' parameter.
9084         * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
9085         field.
9086         (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
9087         Set all_symbols_looked_up here.
9088         (thread_db_look_up_one_symbol): New.
9089         (thread_db_get_tls_address): Adjust.
9090         (thread_db_load_search, try_thread_db_load_1): Always allocate the
9091         thread_db object on the heap, and tentatively set it in the
9092         process structure.
9093         (thread_db_init): Don't set all_symbols_looked_up here.
9094         * linux-low.h (thread_db_look_up_one_symbol): Declare.
9095
9096 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
9097
9098         * linux-low.c (linux_kill, linux_detach): Adjust.
9099         (status_pending_p_callback): Remove redundant statement.  Check
9100         for !TARGET_WAITIKIND_IGNORE, instead of
9101         TARGET_WAITKIND_STOPPED.
9102         (handle_tracepoints): Make sure LWP is locked.  Adjust.
9103         (linux_wait_for_event_1): Adjust.
9104         (linux_cancel_breakpoints): New.
9105         (unsuspend_one_lwp): New.
9106         (unsuspend_all_lwps): New.
9107         (linux_wait_1): If finishing a step-over, unsuspend all lwps.
9108         (send_sigstop_callback): Change return type to int, add new
9109         `except' parameter and handle it.
9110         (suspend_and_send_sigstop_callback): New.
9111         (stop_all_lwps): Add new `suspend' and `expect' parameters, and
9112         pass them down.  If SUSPEND, also increment the lwp's suspend
9113         count.
9114         (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
9115         (need_step_over_p): Don't consider suspended LWPs.
9116         (start_step_over): Adjust.
9117         (proceed_one_lwp): Change return type to int, add new `except'
9118         parameter and handle it.
9119         (unsuspend_and_proceed_one_lwp): New.
9120         (proceed_all_lwps): Use find_inferior instead of
9121         for_each_inferior.
9122         (unstop_all_lwps): Add `unsuspend' parameter.  If UNSUSPEND, them
9123         also decrement the suspend count of LWPs.  Pass `except' down,
9124         instead of hacking its suspend count.
9125         (linux_pause_all): Add `freeze' parameter.  Adjust.
9126         (linux_unpause_all): New.
9127         (linux_target_ops): Install linux_unpause_all.
9128         * server.c (handle_status): Adjust.
9129         * target.h (struct target_ops): New fields `unpause_all' and
9130         `cancel_breakpoints'.  Add new parameter to `pause_all'.
9131         (pause_all): Add new `freeze' parameter.
9132         (unpause_all): New.
9133         (cancel_breakpoints): New.
9134         * tracepoint.c (clear_installed_tracepoints): Pause threads, and
9135         cancel breakpoints.
9136         (cmd_qtstart): Pause threads.
9137         (stop_tracing): Pause threads, and cancel breakpoints.
9138         * win32-low.c (win32_target_ops): Adjust.
9139
9140 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
9141
9142         * linux-low.c (linux_wait_for_event_1): Move passing the signal to
9143         the inferior right away from here...
9144         (linux_wait_1): ... to here, and adjust to check the thread's
9145         last_resume_kind instead of the lwp's step or stop_expected flags.
9146
9147 2010-05-02  Pedro Alves  <pedro@codesourcery.com>
9148
9149         * README: Use consistent `GDB' and `GDBserver' spellings.
9150
9151 2010-05-02  Pedro Alves  <pedro@codesourcery.com>
9152
9153         * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
9154         (linux_kill): Stop all lwps here.  Don't delete the main lwp here.
9155         (linux_detach_one_lwp): Assume the lwp is stopped.
9156         (any_thread_of): Delete.
9157         (linux_detach): Stop all lwps here.  Don't blindly delete all
9158         breakpoints.
9159         (delete_lwp_callback): New.
9160         (linux_mourn): Delete all lwps of the process that is gone.
9161         (linux_wait_1): Don't delete the last lwp of the process here.
9162         * mem-break.h (mark_breakpoints_out): Declare.
9163         * mem-break.c (mark_breakpoints_out): New.
9164         (free_all_breakpoints): Use it.
9165         * server.c (handle_target_event): If the process is gone, mark
9166         breakpoints out.
9167         * thread-db.c (struct thread_db) <create_bp>: New field.
9168         (thread_db_enable_reporting): Fix prototype.  Store a thread event
9169         breakpoint reference in the thread_db struct.
9170         (thread_db_load_search): Clear the thread_db object.
9171         (try_thread_db_load_1): Ditto.
9172         (switch_to_process): New.
9173         (disable_thread_event_reporting): Use it.
9174         (remove_thread_event_breakpoints): New.
9175         (thread_db_detach, thread_db_mourn): Use it.
9176
9177 2010-05-01  Pedro Alves  <pedro@codesourcery.com>
9178
9179         * linux-low.c (linux_enable_event_reporting): New.
9180         (linux_wait_for_event_1, handle_extended_wait): Use it.
9181
9182 2010-04-30  Pedro Alves  <pedro@codesourcery.com>
9183
9184         * linux-low.c (linux_kill_one_lwp, linux_kill)
9185         (linux_detach_one_lwp): Adjust to send_sigstop interface change.
9186         (send_sigstop): Take an lwp_info as parameter instead.  Queue a
9187         SIGSTOP even if the LWP is stopped.
9188         (send_sigstop_callback): New.
9189         (stop_all_lwps): Use send_sigstop_callback instead.
9190         (linux_resume_one_thread): Adjust.
9191         (proceed_one_lwp): Still proceed an LWP that the client has
9192         requested to stop, if we haven't reported it as stopped yet.  Make
9193         sure that LWPs the client want stopped, have a pending SIGSTOP.
9194
9195 2010-04-26  Doug Evans  <dje@google.com>
9196
9197         * server.c (handle_general_set): Make static.
9198
9199         * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
9200         Print received char after testing for error/eof instead of before.
9201         (input_interrupt): Tweak comment.
9202
9203 2010-04-23  Doug Evans  <dje@google.com>
9204
9205         * server.c (start_inferior): Print inferior argv if --debug.
9206
9207 2010-04-21  Aleksandar Ristovski  <aristovski@qnx.com>
9208
9209         * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
9210         * nto-x86-low.c: Include server.h
9211
9212 2010-04-20  Pierre Muller  <muller@ics.u-strasbg.fr>
9213
9214         * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
9215         be consistent with other sources of this directory.
9216         (init_registers_amd64): Correct name of source file of this function
9217         in the comment.
9218
9219 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
9220
9221         * configure.srv (x86_64-*-mingw*): New configuration for Windows
9222         64-bit executables.
9223
9224 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
9225
9226         * win32-i386-low.c: Add 64-bit support.
9227         (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
9228         (init_registers_amd64): Declare.
9229         (mappings): Add 64-bit version of array.
9230         (init_windows_x86): New function.
9231         (the_low_target): Change init_arch field to init_windows_x86.
9232
9233 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
9234
9235         * win32-low.c: Adapt to support also 64-bit architecture.
9236         (child_xfer_memory): Use uintptr_t type for local variable `addr'.
9237         (get_image_name): Use SIZE_T type for local variable `done'.
9238         (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
9239         (toolhelp_get_dll_name): Idem.
9240         (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
9241         Use uintptr_t typecast to avoid warning.
9242         (handle_unload_dll): Use uintptr_t typecast to avoid warning.
9243         (handle_exception): Use phex_nz to avoid warning.
9244         (win32_wait): Remove unused local variable `process'.
9245
9246 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
9247
9248         * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
9249         `amd64-avx.o'.
9250
9251 2010-04-17  Pierre Muller  <muller@ics.u-strasbg.fr>
9252
9253         * configure.ac: Use `ws2_32' library for srv_mingw.
9254         * configure: Regenerate.
9255         * gdbreplay.c: Include winsock2.h instead of winsock.h.
9256         * remote-utils.c: Likewise.
9257
9258 2010-04-17  H.J. Lu  <hongjiu.lu@intel.com>
9259
9260         * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
9261         if __x86_64__ is defined.
9262
9263 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
9264
9265         * configure: Regenerate.
9266
9267 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
9268
9269         * server.c (handle_query): Handle 'qGetTIBAddr' query.
9270         * target.h (target_ops): New get_tib_address field.
9271         * win32-low.h (win32_thread_info): Add thread_local_base field.
9272         * win32-low.c (child_add_thread): Add tlb argument.
9273         Set thread_local_base field to TLB.
9274         (get_child_debug_event): Adapt to child_add_thread change.
9275         (win32_get_tib_address): New function.
9276         (win32_target_ops): Set get_tib_address field to
9277         win32_get_tib_address.
9278         * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
9279
9280 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
9281
9282         * linux-low.c (linux_mourn): Also remove the process.
9283         * server.c (handle_target_event): Don't remove the process here.
9284         * nto-low.c (nto_mourn): New.
9285         (nto_target_ops): Install it.
9286         * spu-low.c (spu_mourn): New.
9287         (spu_target_ops): Install it.
9288         * win32-low.c (win32_mourn): New.
9289         (win32_target_ops): Install it.
9290
9291 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
9292
9293         * server.h (buffer_xml_printf): Remove redundant `;'.
9294
9295 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
9296
9297         * regcache.c (set_register_cache): Invalidate regcaches before
9298         changing the register cache layout.
9299         (regcache_invalidate_one): Allow a NULL regcache.
9300         * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
9301         regcaches before changing the register cache layout or the target
9302         regsets.
9303
9304 2010-04-12  H.J. Lu  <hongjiu.lu@intel.com>
9305
9306         * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
9307         variable warning on Linux/x86-64.
9308
9309 2010-04-11  Pedro Alves  <pedro@codesourcery.com>
9310
9311         GDBserver disconnected tracing support.
9312
9313         * linux-low.c (linux_remove_process): Delete.
9314         (add_lwp): Don't set last_resume_kind here.
9315         (linux_kill): Use `mourn'.
9316         (linux_detach): Use `thread_db_detach', and `mourn'.
9317         (linux_mourn): New.
9318         (linux_attach_lwp_1): Adjust comment.
9319         (linux_attach): last_resume_kind moved the thread_info; adjust.
9320         (status_pending_p_callback): Adjust.
9321         (linux_wait_for_event_1): Adjust.
9322         (count_events_callback, select_singlestep_lwp_callback)
9323         (select_event_lwp_callback, cancel_breakpoints_callback)
9324         (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
9325         (proceed_one_lwp): Adjust.
9326         (linux_async): Add debug output.
9327         (linux_thread_stopped): New.
9328         (linux_pause_all): New.
9329         (linux_target_ops): Install linux_mourn, linux_thread_stopped and
9330         linux_pause_all.
9331         * linux-low.h (struct lwp_info): Delete last_resume_kind field.
9332         (thread_db_free): Delete declaration.
9333         (thread_db_detach, thread_db_mourn): Declare.
9334         * thread-db.c (thread_db_init): Use thread_db_mourn.
9335         (thread_db_free): Delete, split in two.
9336         (disable_thread_event_reporting): New.
9337         (thread_db_detach): New.
9338         (thread_db_mourn): New.
9339
9340         * server.h (struct thread_info) <last_resume_kind>: New field.
9341         <attached>: Add comment.
9342         <gdb_detached>: New field.
9343         (handler_func): Change return type to int.
9344         (handle_serial_event, handle_target_event): Ditto.
9345         (gdb_connected): Declare.
9346         (tracing): Delete.
9347         (disconnected_tracing): Declare.
9348         (stop_tracing): Declare.
9349
9350         * server.c (handle_query) <qSupported>: Report support for
9351         disconnected tracing.
9352         (queue_stop_reply_callback): Account for running threads.
9353         (gdb_wants_thread_stopped): New.
9354         (gdb_wants_all_threads_stopped): New.
9355         (gdb_reattached_process): New.
9356         (handle_status): Clear the `gdb_detached' flag of all processes.
9357         In all-stop, stop all threads.
9358         (main): Be sure to leave tfind mode.  Handle disconnected tracing.
9359         (process_serial_event): If the remote connection breaks, or if an
9360         exit was forced with "monitor exit", force an event loop exit.
9361         Handle disconnected tracing on detach.
9362         (handle_serial_event): Adjust.
9363         (handle_target_event): If GDB isn't connected, forward events back
9364         to the inferior, unless the last process exited, in which case,
9365         exit gdbserver.  Adjust interface.
9366
9367         * remote-utils.c (remote_open): Don't block in accept.  Instead
9368         register an event loop source on the listen socket file
9369         descriptor.  Refactor bits into ...
9370         (listen_desc): ... this new global.
9371         (gdb_connected): ... this new function.
9372         (enable_async_notification): ... this new function.
9373         (handle_accept_event): ... this new function.
9374         (remote_close): Clear remote_desc.
9375
9376         * inferiors.c (add_thread): Set the new thread's last_resume_kind.
9377
9378         * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
9379         New fields.
9380         (mourn_inferior): Define.
9381         (target_process_qsupported): Avoid the dangling else problem.
9382         (thread_stopped): Define.
9383         (pause_all): Define.
9384         (target_waitstatus_to_string): Declare.
9385         * target.c (target_waitstatus_to_string): New.
9386
9387         * tracepoint.c (tracing): Make extern.
9388         (disconnected_tracing): New.
9389         (stop_tracing): Make extern.  Handle tracing stops due to GDB
9390         disconnecting.
9391         (cmd_qtdisconnected): New.
9392         (cmd_qtstatus): Report disconnected tracing status in trace reply.
9393         (handle_tracepoint_general_set): Handle QTDisconnected.
9394
9395         * event-loop.c (event_handler_func): Change return type to int.
9396         (process_event): Bail out if the event handler wants the event
9397         loop to stop.
9398         (handle_file_event): Ditto.
9399         (start_event_loop): Bail out if the event handler wants the event
9400         loop to stop.
9401
9402         * nto-low.c (nto_target_ops): Adjust.
9403         * spu-low.c (spu_wait): Don't remove the process here.
9404         (spu_target_ops): Adjust.
9405         * win32-low.c (win32_wait): Don't remove the process here.
9406         (win32_target_ops): Adjust.
9407
9408 2010-04-11  Pedro Alves  <pedro@codesourcery.com>
9409
9410         * regcache.c (realloc_register_cache): Invalidate inferior's
9411         regcache before recreating it.
9412
9413 2010-04-09  Pedro Alves  <pedro@codesourcery.com>
9414
9415         * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
9416
9417 2010-04-09  Stan Shebs  <stan@codesourcery.com>
9418             Pedro Alves  <pedro@codesourcery.com>
9419
9420         * server.h (LONGEST): New.
9421         (struct thread_info) <while_stepping>: New field.
9422         (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
9423         Declare.
9424         (initialize_tracepoint, handle_tracepoint_general_set)
9425         (handle_tracepoint_query, tracepoint_finished_step)
9426         (tracepoint_was_hit, release_while_stepping_state_list):
9427         (current_traceframe): Declare.
9428         * server.c (handle_general_set): Handle tracepoint packets.
9429         (read_memory): New.
9430         (write_memory): New.
9431         (handle_search_memory_1): Use read_memory.
9432         (handle_query): Report support for conditional tracepoints, trace
9433         state variables, and tracepoint sources.  Handle tracepoint
9434         queries.
9435         (main): Initialize the tracepoints module.
9436         (process_serial_event): Handle traceframe reads/writes.
9437
9438         * linux-low.c (handle_tracepoints): New.
9439         (linux_wait_1): Call it.
9440         (linux_resume_one_lwp): Handle while-stepping.
9441         (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
9442         (linux_target_ops): Install them.
9443         * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
9444         New field.
9445         * linux-x86-low.c (x86_supports_tracepoints): New.
9446         (the_low_target). Install it.
9447
9448         * mem-break.h (delete_breakpoint): Declare.
9449         * mem-break.c (delete_breakpoint): Make external.
9450
9451         * target.h (struct target_ops): Add `supports_tracepoints',
9452         `read_pc', and `write_pc' fields.
9453         (target_supports_tracepoints): Define.
9454         * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
9455         (phex_nz): New.
9456
9457         * regcache.h (struct regcache) <registers_owned>: New field.
9458         (init_register_cache, regcache_cpy): Declare.
9459         (regcache_read_pc, regcache_write_pc): Declare.
9460         (register_cache_size): Declare.
9461         (supply_regblock): Declare.
9462         * regcache.c (init_register_cache): New.
9463         (new_register_cache): Use it.
9464         (regcache_cpy): New.
9465         (register_cache_size): New.
9466         (supply_regblock): New.
9467         (regcache_read_pc, regcache_write_pc): New.
9468
9469         * tracepoint.c: New.
9470
9471         * Makefile.in (OBS): Add tracepoint.o.
9472         (tracepoint.o): New rule.
9473
9474 2010-04-08  H.J. Lu  <hongjiu.lu@intel.com>
9475
9476         * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
9477         (i386-mmx.o): New.
9478         (i386-mmx.c): Likewise.
9479         (i386-mmx-linux.o): Likewise.
9480         (i386-mmx-linux.c): Likewise.
9481
9482         * configure.srv (srv_i386_regobj): Add i386-mmx.o.
9483         (srv_i386_linux_regobj): Add i386-mmx-linux.o.
9484         (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
9485         (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
9486
9487         * linux-x86-low.c (init_registers_i386_mmx_linux): New.
9488         (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
9489         and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
9490
9491 2010-04-07  H.J. Lu  <hongjiu.lu@intel.com>
9492
9493         * Makefile.in (clean): Updated.
9494         (i386-avx.o): New.
9495         (i386-avx.c): Likewise.
9496         (i386-avx-linux.o): Likewise.
9497         (i386-avx-linux.c): Likewise.
9498         (amd64-avx.o): Likewise.
9499         (amd64-avx.c): Likewise.
9500         (amd64-avx-linux.o): Likewise.
9501         (amd64-avx-linux.c): Likewise.
9502
9503         * configure.srv (srv_i386_regobj): Add i386-avx.o.
9504         (srv_i386_linux_regobj): Add i386-avx-linux.o.
9505         (srv_amd64_regobj): Add amd64-avx.o.
9506         (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
9507         (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
9508         (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
9509         (srv_i386_xmlfiles): Add i386/i386-avx.xml.
9510         (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
9511         (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
9512         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
9513
9514         * i387-fp.c: Include "i386-xstate.h".
9515         (i387_xsave): New.
9516         (i387_cache_to_xsave): Likewise.
9517         (i387_xsave_to_cache): Likewise.
9518         (x86_xcr0): Likewise.
9519
9520         * i387-fp.h (i387_cache_to_xsave): Likewise.
9521         (i387_xsave_to_cache): Likewise.
9522         (x86_xcr0): Likewise.
9523
9524         * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
9525         * linux-crisv32-low.c (target_regsets): Likewise.
9526         * linux-m68k-low.c (target_regsets): Likewise.
9527         * linux-mips-low.c (target_regsets): Likewise.
9528         * linux-ppc-low.c (target_regsets): Likewise.
9529         * linux-s390-low.c (target_regsets): Likewise.
9530         * linux-sh-low.c (target_regsets): Likewise.
9531         * linux-sparc-low.c (target_regsets): Likewise.
9532         * linux-xtensa-low.c (target_regsets): Likewise.
9533
9534         * linux-low.c: Include <sys/uio.h>.
9535         (regsets_fetch_inferior_registers): Support nt_type.
9536         (regsets_store_inferior_registers): Likewise.
9537         (linux_process_qsupported): New.
9538         (linux_target_ops): Add linux_process_qsupported.
9539
9540         * linux-low.h (regset_info): Add nt_type.
9541         (linux_target_ops): Add process_qsupported.
9542
9543         * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
9544         and <sys/uio.h>.
9545         (init_registers_i386_avx_linux): New.
9546         (init_registers_amd64_avx_linux): Likewise.
9547         (xmltarget_i386_linux_no_xml): Likewise.
9548         (xmltarget_amd64_linux_no_xml): Likewise.
9549         (PTRACE_GETREGSET): Likewise.
9550         (PTRACE_SETREGSET): Likewise.
9551         (x86_fill_xstateregset): Likewise.
9552         (x86_store_xstateregset): Likewise.
9553         (use_xml): Likewise.
9554         (x86_linux_update_xmltarget): Likewise.
9555         (x86_linux_process_qsupported): Likewise.
9556         (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
9557         (x86_arch_setup): Don't call init_registers_amd64_linux nor
9558         init_registers_i386_linux here.  Call
9559         x86_linux_update_xmltarget.
9560         (the_low_target): Add x86_linux_process_qsupported.
9561
9562         * server.c (handle_query): Call target_process_qsupported.
9563
9564         * target.h (target_ops): Add process_qsupported.
9565         (target_process_qsupported): New.
9566
9567 2010-04-03  Pedro Alves  <pedro@codesourcery.com>
9568
9569         * inferiors.c (add_thread): Set last_status kind to
9570         TARGET_WAITKIND_IGNORE.
9571         * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
9572         fetch.  Use ptid_of.  Avoid unnecessary get_lwp_thread calls.
9573         (linux_wait_1): Move `thread' local definition to block that uses
9574         it.  Don't NULL initialize `event_child'.
9575         (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
9576         Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
9577         * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
9578
9579 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
9580
9581         * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
9582         an extended waitstatus, or by a watchpoint.
9583         (cancel_breakpoints_callback): Don't cancel a breakpoint if the
9584         thread was stepping or has been stopped by a watchpoint.
9585
9586 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
9587
9588         * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
9589         (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
9590         of another, then delete the previous, and validate all
9591         breakpoints.
9592         (validate_inserted_breakpoint): New.
9593         (delete_disabled_breakpoints): New.
9594         (validate_breakpoints): New.
9595         (check_mem_read): Validate breakpoints before trusting their
9596         shadow.  Delete disabled breakpoints.
9597         (check_mem_write): Validate breakpoints before trusting they
9598         should be inserted.  Delete disabled breakpoints.
9599         * mem-break.h (validate_breakpoints):
9600         * server.c (handle_query): Validate breakpoints when we see a
9601         qSymbol query.
9602
9603 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
9604
9605         * linux-low.c (linux_wait_1): Avoid setting need_step_over is
9606         there's a GDB breakpoint at stop_pc.  Always report a trap to GDB
9607         if we could tell there's a GDB breakpoint at stop_pc.
9608         (need_step_over_p): Don't do a step over if we find a GDB
9609         breakpoint at the resume PC.
9610
9611         * mem-break.c (struct raw_breakpoint): New.
9612         (enum bkpt_type): New type `gdb_breakpoint'.
9613         (struct breakpoint): Delete the `PC', `old_data' and `inserted'
9614         fields.  New field `raw'.
9615         (find_raw_breakpoint_at): New.
9616         (set_raw_breakpoint_at): Handle refcounting.  Create a raw
9617         breakpoint instead.
9618         (set_breakpoint_at): Adjust.
9619         (delete_raw_breakpoint): New.
9620         (release_breakpoint): New.
9621         (delete_breakpoint): Rename to...
9622         (delete_breakpoint_1): ... this.  Add proc parameter.  Use
9623         release_breakpoint.  Return ENOENT.
9624         (delete_breakpoint): Reimplement.
9625         (find_breakpoint_at): Delete.
9626         (find_gdb_breakpoint_at): New.
9627         (delete_breakpoint_at): Delete.
9628         (set_gdb_breakpoint_at): New.
9629         (delete_gdb_breakpoint_at): New.
9630         (gdb_breakpoint_here): New.
9631         (set_reinsert_breakpoint): Use release_breakpoint.
9632         (uninsert_breakpoint): Rename to ...
9633         (uninsert_raw_breakpoint): ... this.
9634         (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
9635         (reinsert_raw_breakpoint): Change parameter type to
9636         raw_breakpoint.
9637         (reinsert_breakpoints_at): Adjust to handle raw breakpoints
9638         instead.
9639         (check_breakpoints): Adjust.  Use release_breakpoint.
9640         (breakpoint_here): Rewrite using find_raw_breakpoint_at.
9641         (breakpoint_inserted_here): Ditto.
9642         (check_mem_read): Adjust to iterate over raw breakpoints instead.
9643         Don't trust the breakpoint's shadow if it is not inserted.
9644         (check_mem_write): Adjust to iterate over raw breakpoints instead.
9645         (delete_all_breakpoints): Adjust.
9646         (free_all_breakpoints): Mark all breakpoints as uninserted, and
9647         use delete_breakpoint_1.
9648
9649         * mem-break.h (breakpoints_supported): Delete declaration.
9650         (set_gdb_breakpoint_at): Declare.
9651         (gdb_breakpoint_here): Declare.
9652         (delete_breakpoint_at): Delete.
9653         (delete_gdb_breakpoint_at): Declare.
9654
9655         * server.h (struct raw_breakpoint): Forward declare.
9656         (struct process_info): New field `raw_breakpoints'.
9657
9658         * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
9659         breakpoints.
9660
9661 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
9662
9663         * linux-low.c (status_pending_p_callback): Fix comment.
9664         (linux_wait_for_event_1): Move most of the internal breakpoint
9665         handling from here...
9666         (linux_wait_1): ... to here.
9667         (count_events_callback): New.
9668         (select_singlestep_lwp_callback): New.
9669         (select_event_lwp_callback): New.
9670         (cancel_breakpoints_callback): New.
9671         (select_event_lwp): New.
9672         (linux_wait_1): Simplify internal breakpoint handling.  Give equal
9673         priority to all LWPs that have had events that should be reported
9674         to the client.  Cancel breakpoints when about to reporting the
9675         event to the client, not while stopping lwps.  No longer cancel
9676         finished single-steps here.
9677         (cancel_finished_single_step): Delete.
9678         (cancel_finished_single_steps): Delete.
9679
9680 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
9681
9682         * mem-break.c (enum bkpt_type): New.
9683         (struct breakpoint): New field `type'.
9684         (set_breakpoint_at): Change return type to struct breakpoint
9685         pointer.  Set type to `other_breakpoint' by default.
9686         (delete_breakpoint): Rewrite, supporting more than one breakpoint
9687         in the breakpoint list.
9688         (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
9689         (reinsert_breakpoint): Rename to ...
9690         (reinsert_raw_breakpoint): ... this.
9691         (reinsert_breakpoints_at): Adjust.
9692         * mem-break.h (struct breakpoint): Declare.
9693         (set_breakpoint_at): Change return type to struct breakpoint
9694         pointer.
9695
9696 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
9697
9698         * server.c (handle_query): Assign, not compare.
9699
9700 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
9701
9702         Teach linux gdbserver to step-over-breakpoints.
9703
9704         * linux-low.c (can_hardware_single_step): New.
9705         (supports_breakpoints): New.
9706         (handle_extended_wait): If stopping threads, read the stop pc of
9707         the new cloned LWP.
9708         (get_pc): New.
9709         (get_stop_pc): Add `lwp' parameter.  Handle it.  Bail out if the
9710         low target doesn't support retrieving the PC.
9711         (add_lwp): Set last_resume_kind to resume_continue.
9712         (linux_attach_lwp_1): Adjust comments.  Always set stop_expected.
9713         (linux_attach): Don't clear stop_expected.  Set the lwp's
9714         last_resume_kind to resume_stop.
9715         (linux_detach_one_lwp): Don't check for removed breakpoints.
9716         (check_removed_breakpoint): Delete.
9717         (status_pending_p): Rename to ...
9718         (status_pending_p_callback): ... this.  Don't check for removed
9719         breakpoints.  Don't consider threads that are stopped from GDB's
9720         perspective.
9721         (linux_wait_for_lwp): Always read the stop_pc here.
9722         (cancel_breakpoint): New.
9723         (step_over_bkpt): New global.
9724         (linux_wait_for_event_1): Implement stepping over breakpoints.
9725         (gdb_wants_lwp_stopped): New.
9726         (gdb_wants_all_stopped): New.
9727         (linux_wait_1): Tag threads as gdb-wants-stopped.  Cancel finished
9728         single-step traps here.  Store the thread's last reported target
9729         wait status.
9730         (send_sigstop): Don't clear stop_expected.  Always set it,
9731         instead.
9732         (mark_lwp_dead): Remove reference to pending_is_breakpoint.
9733         (cancel_finished_single_step): New.
9734         (cancel_finished_single_steps): New.
9735         (wait_for_sigstop): Don't cancel finished single-step traps here.
9736         (linux_resume_one_lwp): Don't check for removed breakpoints.
9737         Don't set `step' on non-hardware step archs.
9738         (linux_set_resume_request): Ignore resume_stop requests if already
9739         stopping or stopped.  Set the lwp's last_resume_kind.
9740         (resume_status_pending_p): Don't check for removed breakpoints.
9741         (need_step_over_p): New.
9742         (start_step_over): New.
9743         (finish_step_over): New.
9744         (linux_resume_one_thread): Always queue a sigstop for resume_stop
9745         requests.  Clear the thread's last reported target waitstatus.
9746         Don't use the `suspended' flag.  Don't consider pending breakpoints.
9747         (linux_resume): Start a step-over if necessary.
9748         (proceed_one_lwp): New.
9749         (proceed_all_lwps): New.
9750         (unstop_all_lwps): New.
9751         * linux-low.h (struct lwp_info): Rewrite comment for the
9752         `suspended' flag.  Add the `stop_pc' field.  Delete the
9753         `pending_stop_pc' field.  Tweak the `stepping' flag's comment.
9754         Add `'last_resume_kind' and `need_step_over' fields.
9755         * inferiors.c (struct thread_info): Delete, moved elsewhere.
9756         * mem-break.c (struct breakpoint): Delete `reinserting' flag.
9757         Delete `breakpoint_to_reinsert' field.  New flag `inserted'.
9758         (set_raw_breakpoint_at): New.
9759         (set_breakpoint_at): Rewrite to use it.
9760         (reinsert_breakpoint_handler): Delete.
9761         (set_reinsert_breakpoint): New.
9762         (reinsert_breakpoint_by_bp): Delete.
9763         (delete_reinsert_breakpoints): New.
9764         (uninsert_breakpoint): Rewrite.
9765         (uninsert_breakpoints_at): New.
9766         (reinsert_breakpoint): Rewrite.
9767         (reinsert_breakpoints_at): New.
9768         (check_breakpoints): Rewrite.
9769         (breakpoint_here): New.
9770         (breakpoint_inserted_here): New.
9771         (check_mem_read): Adjust.
9772         * mem-break.h (breakpoints_supported, breakpoint_here)
9773         (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
9774         (reinsert_breakpoint_by_bp): Delete declaration.
9775         (delete_reinsert_breakpoints): Declare.
9776         (reinsert_breakpoint): Delete declaration.
9777         (reinsert_breakpoints_at): Declare.
9778         (uninsert_breakpoint): Delete declaration.
9779         (uninsert_breakpoints_at): Declare.
9780         (check_breakpoints): Adjust prototype.
9781         * server.h: Adjust include order.
9782         (struct thread_info): Declare here.  Add a `last_status' field.
9783
9784 2010-03-23  Michael Snyder  <msnyder@vmware.com>
9785
9786         * server.c (crc32): New function.
9787         (handle_query): Add handling for 'qCRC:' request.
9788
9789 2010-03-23  Pedro Alves  <pedro@codesourcery.com>
9790
9791         * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
9792         lwp had been stopped by a watchpoint.
9793
9794 2010-03-16  Pedro Alves  <pedro@codesourcery.com>
9795
9796         * server.h (internal_error): Declare.
9797         (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
9798         * utils.c (internal_error): New function.
9799
9800 2010-03-15  Andreas Schwab  <schwab@redhat.com>
9801
9802         * configure.srv: Fix typo setting srv_regobj.
9803
9804 2010-03-15  Pedro Alves  <pedro@codesourcery.com>
9805
9806         * linux-low.c (fetch_register): Avoid passing a non string literal
9807         format to `error'.
9808         (usr_store_inferior_registers): Ditto.
9809
9810 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
9811
9812         * linux-low.c (linux_write_memory): Bail out early if peeking
9813         memory failed.
9814
9815 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
9816
9817         * linux-low.h (struct lwp_info): New fields
9818         `stopped_by_watchpoint' and `stopped_data_address'.
9819         * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
9820         here, and cache them in the lwp object.
9821         (wait_for_sigstop): Check stopped_by_watchpoint lwp field
9822         directly.
9823         (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
9824         field.
9825         (linux_stopped_by_watchpoint): Rewrite.
9826         (linux_stopped_data_address): Rewrite.
9827
9828 2010-03-06  Simo Melenius  <simo.melenius@iki.fi>
9829
9830         * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
9831         switching the current inferior, not before.
9832
9833 2010-03-01  H.J. Lu  <hongjiu.lu@intel.com>
9834
9835         * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
9836         reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
9837         i386-linux.c and amd64-linux.c.
9838         (reg-i386.o): Removed.
9839         (reg-i386.c): Likewise.
9840         (reg-i386-linux.o): Likewise.
9841         (reg-i386-linux.c): Likewise.
9842         (reg-x86-64.o): Likewise.
9843         (reg-x86-64.c): Likewise.
9844         (reg-x86-64-linux.o): Likewise.
9845         (reg-x86-64-linux.c): Likewise.
9846         (i386.o): New.
9847         (i386.c): Likewise.
9848         (i386-linux.o): Likewise.
9849         (i386-linux.c): Likewise.
9850         (amd64.o): Likewise.
9851         (amd64.c): Likewise.
9852         (amd64-linux.o): Likewise.
9853         (amd64-linux.c): Likewise.
9854
9855         * configure.srv (srv_i386_regobj): New.
9856         (srv_i386_linux_regobj): Likewise.
9857         (srv_amd64_regobj): Likewise.
9858         (srv_amd64_linux_regobj): Likewise.
9859         (srv_i386_32bit_xmlfiles): Likewise.
9860         (srv_i386_64bit_xmlfiles): Likewise.
9861         (srv_i386_xmlfiles): Likewise.
9862         (srv_amd64_xmlfiles): Likewise.
9863         (srv_i386_linux_xmlfiles): Likewise.
9864         (srv_amd64_linux_xmlfiles): Likewise.
9865         (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj.  Set
9866         srv_xmlfiles to $srv_i386_xmlfiles.
9867         (i[34567]86-*-mingw32ce*): Likewise.
9868         (i[34567]86-*-mingw*): Likewise.
9869         (i[34567]86-*-nto*): Likewise.
9870         (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
9871         and $srv_amd64_linux_regobj.  Set srv_xmlfiles to
9872         $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
9873         (x86_64-*-linux*): Likewise.
9874
9875         * linux-x86-low.c (init_registers_x86_64_linux): Removed.
9876         (init_registers_amd64_linux): New.
9877         (x86_arch_setup): Replace init_registers_x86_64_linux with
9878         init_registers_amd64_linux.
9879
9880 2010-02-23  Maxim Kuvyrkov  <maxim@codesourcery.com>
9881
9882         * configure.ac: Check for libdl.  If it is not available link against
9883         static libthread_db.
9884         * configure: Regenerate.
9885
9886 2010-02-22  Pedro Alves  <pedro@codesourcery.com>
9887
9888         PR9605
9889
9890         * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
9891         handing a read watchpoint.
9892         (i386_low_insert_watchpoint): Read watchpoints aren't supported.
9893
9894 2010-02-12  Doug Evans  <dje@google.com>
9895
9896         * linux-low.c (linux_supports_tracefork_flag): Document.
9897         (linux_look_up_symbols): Add comment.
9898
9899 2010-02-03  H.J. Lu  <hongjiu.lu@intel.com>
9900
9901         * regcache.c (supply_register): Clear regcache if buf is NULL.
9902
9903 2010-02-02  Nicolas Roche  <roche@sourceware.org>
9904             Joel Brobecker  <brobecker@adacore.com>
9905
9906         * inferiors.c (find_inferior): Add function documentation.
9907         (unloaded_dll): Handle the case where the unloaded dll has not
9908         been previously registered in the dll list.
9909
9910 2010-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
9911
9912         * linux-arm-low.c (thumb_breakpoint_len): Delete.
9913         (thumb2_breakpoint): New.
9914         (arm_breakpoint_at): Check for Thumb-2 breakpoints.
9915
9916 2010-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
9917
9918         * linux-low.c (get_stop_pc): Check for SIGTRAP.
9919         (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
9920         breakpoints.
9921
9922 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
9923
9924         * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
9925
9926 2010-01-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
9927
9928         * linux-s390-low.c (s390_collect_ptrace_register)
9929         (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
9930
9931 2010-01-21  Doug Evans  <dje@google.com>
9932
9933         * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
9934         (PTRACE_ARG4_TYPE): New macro.
9935         (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
9936         (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
9937         (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
9938         (usr_store_inferior_registers): Ditto.
9939         (linux_read_memory, linux_write_memory): Ditto.
9940         (linux_test_for_tracefork): Ditto.
9941
9942         * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
9943         Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
9944
9945 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
9946
9947         * proc-service.c (ps_lgetregs): Don't refetch registers from the
9948         target.
9949
9950 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
9951
9952         * spu-low.c (spu_fetch_registers, spu_store_registers): Change
9953         prototype to take a regcache.  Adjust.
9954
9955 2010-01-20  Pedro Alves  <pedro@codesourcery.com>
9956
9957         * regcache.h (struct thread_info): Forward declare.
9958         (struct regcache): New.
9959         (new_register_cache): Adjust prototype.
9960         (get_thread_regcache): Declare.
9961         (free_register_cache): Adjust prototype.
9962         (registers_to_string, registers_from_string): Ditto.
9963         (supply_register, supply_register_by_name, collect_register)
9964         (collect_register_as_string, collect_register_by_name): Ditto.
9965         * regcache.c (struct inferior_regcache_data): Delete.
9966         (get_regcache): Rename to ...
9967         (get_thread_regcache): ... this.  Adjust.  Switch inferior before
9968         fetching registers.
9969         (regcache_invalidate_one): Adjust.
9970         (regcache_invalidate): Fix prototype.
9971         (new_register_cache): Return the new register cache.
9972         (free_register_cache): Change prototype.
9973         (realloc_register_cache): Adjust.
9974         (registers_to_string): Change prototype to take a regcache.  Adjust.
9975         (registers_from_string): Ditto.
9976         (register_data): Ditto.
9977         (supply_register): Ditto.
9978         (supply_register_by_name): Ditto.
9979         (collect_register): Ditto.
9980         (collect_register_as_string): Ditto.
9981         (collect_register_by_name): Ditto.
9982         * server.c (process_serial_event): Adjust.
9983         * linux-low.h (regset_fill_func, regset_store_func): Change
9984         prototype.
9985         (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
9986         Change prototype.
9987         * linux-low.c (get_stop_pc): Adjust.
9988         (check_removed_breakpoint): Adjust.
9989         (linux_wait_for_event): Adjust.
9990         (linux_resume_one_lwp): Adjust.
9991         (fetch_register): Add regcache parameter.  Adjust.
9992         (usr_store_inferior_registers): Ditto.
9993         (regsets_fetch_inferior_registers): Ditto.
9994         (regsets_store_inferior_registers): Ditto.
9995         (linux_fetch_registers, linux_store_registers): Ditto.
9996         * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
9997         regcache.  Adjust.
9998         (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
9999         Ditto.
10000         * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
10001         prototype to take a regcache.
10002         (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
10003         * remote-utils.c (convert_ascii_to_int, outreg)
10004         (prepare_resume_reply): Change prototype to take a regcache.
10005         Adjust.
10006         * target.h (struct target_ops) <fetch_registers, store_registers>:
10007         Change prototype to take a regcache.
10008         (fetch_inferior_registers, store_inferior_registers): Change
10009         prototype to take a regcache.  Adjust.
10010         * proc-service.c (ps_lgetregs): Adjust.
10011         * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
10012         (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
10013         (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
10014         take a regcache.  Adjust.
10015         * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
10016         (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
10017         (arm_store_vfpregset, arm_get_pc, arm_set_pc):
10018         (arm_breakpoint_at): Change prototype to take a regcache.  Adjust.
10019         * linux-cris-low.c (cris_get_pc, cris_set_pc)
10020         (cris_cannot_fetch_register):
10021         (cris_breakpoint_at): Change prototype to take a regcache.
10022         Adjust.
10023         * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
10024         cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
10025         to take a regcache.  Adjust.
10026         (cris_breakpoint_at, cris_insert_point, cris_remove_point):
10027         Adjust.
10028         * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
10029         take a regcache.  Adjust.
10030         * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
10031         (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
10032         (m68k_set_pc): Change prototype to take a regcache.  Adjust.
10033         * linux-mips-low.c (mips_get_pc):
10034         (mips_set_pc): Change prototype to take a regcache.  Adjust.
10035         (mips_reinsert_addr): Adjust.
10036         (mips_collect_register): Change prototype to take a regcache.
10037         Adjust.
10038         (mips_supply_register):
10039         (mips_collect_register_32bit, mips_supply_register_32bit)
10040         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10041         (mips_store_fpregset): Ditto.
10042         * linux-ppc-low.c (ppc_supply_ptrace_register)
10043         (ppc_supply_ptrace_register): Ditto.
10044         (parse_spufs_run): Adjust.
10045         (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
10046         (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
10047         (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
10048         take a regcache.  Adjust.
10049         * linux-s390-low.c (s390_collect_ptrace_register)
10050         (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
10051         (s390_set_pc): Change prototype to take a regcache.  Adjust.
10052         (s390_arch_setup): Adjust.
10053         * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
10054         (sh_fill_gregset): Change prototype to take a regcache.  Adjust.
10055         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10056         (sparc_fill_gregset, sparc_store_gregset_from_stack)
10057         (sparc_store_gregset, sparc_get_pc): Change prototype to take a
10058         regcache.  Adjust.
10059         (sparc_breakpoint_at): Adjust.
10060         * linux-xtensa-low.c (xtensa_fill_gregset):
10061         (xtensa_store_gregset):
10062         (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
10063         (xtensa_set_pc): Change prototype to take a regcache.  Adjust.
10064         * nto-low.c (nto_fetch_registers, nto_store_registers): Change
10065         prototype to take a regcache.  Adjust.
10066         * win32-arm-low.c (arm_fetch_inferior_register)
10067         (arm_store_inferior_register): Change prototype to take a
10068         regcache.  Adjust.
10069         * win32-i386-low.c (i386_fetch_inferior_register)
10070         (i386_store_inferior_register): Change prototype to take a
10071         regcache.  Adjust.
10072         * win32-low.c (child_fetch_inferior_registers)
10073         (child_store_inferior_registers): Change prototype to take a
10074         regcache.  Adjust.
10075         (win32_wait): Adjust.
10076         (win32_fetch_inferior_registers): Change prototype to take a
10077         regcache.  Adjust.
10078         (win32_store_inferior_registers): Adjust.
10079         * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
10080         store_inferior_register>: Change prototype to take a regcache.
10081
10082 2010-01-20  Doug Evans  <dje@google.com>
10083
10084         * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
10085         #ifdef.
10086         (linux_wait_for_event1, linux_init_signals): Ditto.
10087         (W_STOPCODE): Provide definition if missing.
10088
10089 2010-01-13  Vladimir Prus  <vladimir@codesourcery.com>
10090
10091         * linux-low.c (linux_core_of_thread): New.
10092         (compare_ints, show_process, list_threads): New.
10093         (linux_qxfer_osdata): Report threads and cores.
10094         (linux_target_op): Register linux_core_of_thread.
10095         * remote-utils.c (prepare_resume_reply): Report the core.
10096         (buffer_xml_printf): Support %d specifier.
10097         * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
10098         New.
10099         (handle_query): Handle qXfer:threads.  Announce availability
10100         thereof.
10101         * target.h (struct target_ops): New field core_of_thread.
10102
10103 2010-01-04  Ulrich Weigand  <uweigand@de.ibm.com>
10104
10105         * Makefile.in (clean): Remove new generated files.
10106         (reg-s390.o, reg-s390.c): Remove rules.
10107         (reg-s390x.o, reg-s390x.c): Likewise.
10108         (s390-linux32.o, s390-linux32.c): Add rules.
10109         (s390-linux64.o, s390-linux64.c): Likewise.
10110         (s390x-linux64.o, s390x-linux64.c): Likewise.
10111         * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
10112         * linux-s390-low.c: Include <elf.h>.
10113         (HWCAP_S390_HIGH_GPRS): Define if undefined.
10114         (init_registers_s390): Remove prototype.
10115         (init_registers_s390x): Likewise.
10116         (init_registers_s390_linux32): Add prototype.
10117         (init_registers_s390_linux64): Likewise.
10118         (init_registers_s390x_linux64): Likewise.
10119         (s390_num_regs_3264): New define.
10120         (s390_regmap_3264): New global variable.
10121         (s390_cannot_fetch_register): Remove obsolete check.
10122         (s390_cannot_store_register): Likewise.
10123         (s390_collect_ptrace_register): Handle upper/lower register halves.
10124         (s390_supply_ptrace_register): Likewise.
10125         (s390_fill_gregset): Update to register number changes.
10126         (s390_get_hwcap): New routine.
10127         (s390_arch_setup): Detect 32-bit process running on 64-bit system.
10128         Install appropriate regmap and register set.
10129
10130 2010-01-01  Joel Brobecker  <brobecker@adacore.com>
10131
10132         * server.c (gdbserver_version): Update copyright year to 2010.
10133         * gdbreplay.c (gdbreplay_version): Likewise.
10134
10135 2009-12-28  Doug Evans  <dje@google.com>
10136
10137         * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
10138         elf/external.h.  Include <elf.h> instead but only if necessary.
10139
10140 2009-12-28  Pedro Alves  <pedro@codesourcery.com>
10141
10142         * linux-low.c (linux_remove_process): Remove `detaching'
10143         parameter.  Don't release/detach from thread_db here.
10144         (linux_kill): Release/detach from thread_db here, ...
10145         (linux_detach): ... and here, before actually detaching.
10146         (linux_wait_1): ... and here, when a process exits.
10147         * thread-db.c (any_thread_of): New.
10148         (thread_db_free): Switch the current inferior to a thread of the
10149         passed in process.
10150
10151 2009-12-21  Doug Evans  <dje@google.com>
10152
10153         * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
10154
10155         * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
10156         Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
10157         warning ifndef __NR_tkill.  Move setting of errno there too.
10158         Delete unnecessary resetting of errno after syscall.
10159         Minor comment changes to match gdb/linux-nat.c:kill_lwp.
10160
10161         * configure.ac: Check for dladdr.
10162         * config.in: Regenerate.
10163         * configure: Regenerate.
10164         * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
10165         (try_thread_db_load): Update.
10166
10167         * linux-low.c (my_waitpid): Delete unnecessary prototype.
10168
10169 2009-12-18  Doug Evans  <dje@google.com>
10170
10171         * event-loop.c: Include unistd.h if it exists.
10172
10173         * linux-low.c (my_waitpid): Move definition away from being in
10174         between linux_tracefork_child/linux_test_for_tracefork.
10175
10176         * gdb_proc_service.h (psaddr_t): Fix type.
10177         * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
10178         signature to match glibc.
10179
10180 2009-12-16  Doug Evans  <dje@google.com>
10181
10182         * linux-low.c (linux_read_memory): Fix argument to read.
10183
10184 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
10185
10186         * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
10187         events, don't leave current_inferior pointing at null.
10188
10189 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
10190
10191         * win32-low.c (LOG): Delete.
10192         (OUTMSG): Output to stderr.
10193         (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
10194         on compile time LOG macro.
10195         (win32_wait): Fix debug output.
10196
10197 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
10198
10199         * win32-low.c (win32_add_one_solib): If the dll name is
10200         "ntdll.dll", prepend the system directory to the dll path.
10201
10202 2009-11-17  Daniel Jacobowitz  <dan@codesourcery.com>
10203
10204         * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
10205
10206 2009-11-17  Nathan Sidwell  <nathan@codesourcery.com>
10207             Vladimir Prus  <vladimir@codesourcery.com>
10208
10209         * Makefile.in (reg-cf.o, reg-cf.c): New targets.
10210         * configure.ac: Check for __mcoldfire__ and set
10211         gdb_cv_m68k_is_coldfire.
10212         * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
10213         reg-cf.o and reg-m68k.o.
10214         * configure: Regenerated.
10215
10216 2009-11-16  Pedro Alves  <pedro@codesourcery.com>
10217
10218         * linux-low.c (linux_remove_process): Add `detaching' parameter.
10219         Pass it to thread_db_free.
10220         (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
10221         proper `detaching' argument to linux_remove_process.
10222         * linux-low.h (thread_db_free): Add `detaching' parameter.
10223         * thread-db.c (thread_db_init): Pass false as `detaching' argument
10224         to thread_db_free.
10225         (thread_db_free): Add `detaching' parameter.  Only
10226         call td_ta_clear_event if detaching from process.
10227
10228 2009-11-12  Maxim Kuvyrkov  <maxim@codesourcery.com>
10229
10230         * thread-db.c (thread_db_free): Fix typo.
10231
10232 2009-11-11  Paul Pluzhnikov  <ppluzhnikov@google.com>
10233
10234         PR gdb/10838
10235         * thread-db.c (thread_db_free): Call td_ta_clear_event.
10236
10237 2009-11-03  Nathan Sidwell  <nathan@codesourcery.com>
10238
10239         * configure.ac (i[34567]86-*): Check if we're targetting x86-64
10240         with an i686 compiler.
10241         * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
10242         needed.
10243         * configure: Rebuilt.
10244
10245 2009-10-29  Sandra Loosemore  <sandra@codesourcery.com>
10246
10247         PR gdb/10783
10248
10249         * server.c (handle_search_memory_1): Correct read_addr initialization
10250         in loop for searching subsequent chunks.
10251
10252 2009-10-29  Paul Pluzhnikov  <ppluzhnikov@google.com>
10253
10254         * configure.ac: New --with-libthread-db option.
10255         * thread-db.c: Allow direct dependence on libthread_db.
10256         (thread_db_free): Adjust.
10257         * config.in: Regenerate.
10258         * configure: Likewise.
10259
10260 2009-10-28  Paul Pluzhnikov  <ppluzhnikov@google.com>
10261
10262         PR gdb/10757
10263         * thread-db.c (attach_thread): New function.
10264         (maybe_attach_thread): Return success/failure.
10265         (find_new_threads_callback): Adjust.
10266         (thread_db_find_new_threads): Loop until no new threads.
10267
10268 2009-10-13  Pedro Alves  <pedro@codesourcery.com>
10269
10270         * proc-service.c (ps_lgetregs): Formatting.
10271
10272 2009-10-08  Paul Pluzhnikov  <ppluzhnikov@google.com>
10273
10274         * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
10275         * configure.ac: Adjust.
10276         * linux-low.h (struct process_info_private): Move members to struct
10277         thread_db.
10278         (thread_db_free, thread_db_handle_monitor_command): New prototype.
10279         * linux-low.c (linux_remove_process): Adjust.
10280         (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
10281         * server.c (handle_query): Move code ...
10282         (handle_monitor_command): ... here. New function.
10283         * target.h (struct target_ops): New member.
10284         * thread-db.c (struct thread_db): New.
10285         (libthread_db_search_path): New variable.
10286         (thread_db_create_event, thread_db_enable_reporting)
10287         (find_one_thread, maybe_attach_thread, find_new_threads_callback)
10288         (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
10289         (try_thread_db_load_1, dladdr_to_soname): New functions.
10290         (try_thread_db_load, thread_db_load_search): New functions.
10291         (thread_db_init): Search for libthread_db.
10292         (thread_db_free): New function.
10293         (thread_db_handle_monitor_command): Likewise.
10294         * config.in: Regenerate.
10295         * configure: Regenerate.
10296
10297 2009-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
10298
10299         * spu-low.c (spu_kill): Wait for inferior to terminate.
10300         Call clear_inferiors.
10301         (spu_detach): Call clear_inferiors.
10302
10303 2009-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10304
10305         * aclocal.m4: Regenerate.
10306         * config.in: Likewise.
10307         * configure: Likewise.
10308
10309 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
10310
10311         * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
10312         (parse_spufs_run): New function.
10313         (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
10314         (ppc_breakpoint_at): Handle SPU breakpoints.
10315
10316 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
10317
10318         * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
10319         (SPUFS_MAGIC): Define.
10320         (spu_enumerate_spu_ids): New function.
10321         (linux_qxfer_spu): New function.
10322         (linux_target_ops): Install linux_qxfer_spu.
10323
10324 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
10325
10326         * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
10327         and powerpc-cell64l.o to srv_regobj.  Add rs6000/powerpc-cell32l.xml
10328         and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
10329         * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
10330         (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
10331         (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
10332         * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
10333         (init_registers_powerpc_cell32l): Add prototype.
10334         (init_registers_powerpc_cell64l): Likewise.
10335         (ppc_arch_setup): Detect Cell/B.E. architecture.
10336
10337 2009-07-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10338
10339         * Makefile.in (datarootdir): New variable.
10340
10341 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
10342
10343         * linux-low.c (linux_write_memory): Update debugging output.
10344         * Makefile.in (clean): Add new descriptions.
10345         (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
10346         (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
10347         * configure.srv: Add new files for arm*-*-linux*.
10348         * linux-arm-low.c: Add new declarations.
10349         (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
10350         (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
10351         (HWCAP_VFPv3D16): New.
10352         (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
10353         instead of __IWMMXT__.
10354         (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
10355         (arm_arch_setup): New.
10356         (target_regsets): Remove #ifdef.  Add VFP regset.
10357         (the_low_target): Use arm_arch_setup.
10358
10359 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
10360
10361         * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
10362         the main thread again.
10363
10364 2009-07-06  Aleksandar Ristovski  <aristovski@qnx.com>
10365
10366         Adding Neutrino gdbserver.
10367         * configure: Regenerated.
10368         * configure.ac: Add case for srv_qnx and set LIBS accordingly.
10369         * configure.srv (i[34567]86-*-nto*): New target.
10370         * nto-low.c, nto-low.h, nto-x86-low.c: New files.
10371         * remote-utils.c [__QNX__]: Include sys/iomgr.h
10372         (nto_comctrl) [__QNX__]: New function.
10373         (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
10374
10375 2009-07-05  Danny Backx  <dannybackx@users.sourceforge.net>
10376
10377         * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
10378         srv_tgtobj.
10379
10380 2009-07-04  Danny Backx  <dannybackx@users.sourceforge.net>
10381             Pedro Alves  <pedro@codesourcery.com>
10382
10383         * win32-i386-low.c (i386_get_thread_context): Handle systems that
10384         don't support CONTEXT_EXTENDED_REGISTERS.
10385         (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
10386         (the_low_target): Install them.
10387         * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
10388         failing with ERROR_PIPE_NOT_CONNECTED.
10389
10390 2009-06-30  Doug Evans  <dje@google.com>
10391             Pierre Muller  <muller@ics.u-strasbg.fr>
10392
10393         Add h/w watchpoint support to x86-linux, win32-i386.
10394         * Makefile.in (SFILES): Add i386-low.c
10395         (i386_low_h): Define.
10396         (i386-low.o): Add dependencies.
10397         (linux-x86-low.o): Add i386-low.h dependency.
10398         (win32-i386-low.o): Ditto.
10399         * i386-low.c: New file.
10400         * i386-low.h: New file.
10401         * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
10402         (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
10403         * linux-low.c (linux_add_process): Initialize arch_private.
10404         (linux_remove_process): Free arch_private.
10405         (add_lwp): Initialize arch_private.
10406         (delete_lwp): Free arch_private.
10407         (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
10408         provided.
10409         * linux-low.h (process_info_private): New member arch_private.
10410         (lwp_info): New member arch_private.
10411         (linux_target_ops): New members new_process, new_thread,
10412         prepare_to_resume.
10413         (ptid_of): New macro.
10414         * linux-x86-low.c: Include stddef.h, i386-low.h.
10415         (arch_process_info): New struct.
10416         (arch_lwp_info): New struct.
10417         (x86_linux_dr_get, x86_linux_dr_set): New functions.
10418         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10419         (i386_dr_low_get_status): New function.
10420         (x86_insert_point, x86_remove_point): New functions.
10421         (x86_stopped_by_watchpoint): New function.
10422         (x86_stopped_data_address): New function.
10423         (x86_linux_new_process, x86_linux_new_thread): New functions.
10424         (x86_linux_prepare_to_resume): New function.
10425         (the_low_target): Add entries for insert_point, remove_point,
10426         stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
10427         prepare_to_resume.
10428         * server.c (debug_hw_points): New global.
10429         (monitor_show_help): Document set debug-hw-points.
10430         (handle_query): Process "set debug-hw-points".
10431         * server.h (debug_hw_points): Declare.
10432         (paddress): Declare.
10433         * utils.c (NUMCELLS, CELLSIZE): New macros.
10434         (get_sell, xsnprintf, paddress): New functions.
10435         * win32-arm-low.c (the_low_target): Add entries for insert_point,
10436         remove_point, stopped_by_watchpoint, stopped_data_address.
10437         * win32-i386-low.c: Include i386-low.h.
10438         (debug_reg_state): Replaces dr.
10439         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10440         (i386_dr_low_get_status): New function.
10441         (i386_insert_point, i386_remove_point): New functions.
10442         (i386_stopped_by_watchpoint): New function.
10443         (i386_stopped_data_address): New function.
10444         (i386_initial_stuff): Update.
10445         (get_thread_context,set_thread_context,i386_thread_added): Update.
10446         (the_low_target): Add entries for insert_point,
10447         remove_point, stopped_by_watchpoint, stopped_data_address.
10448         * win32-low.c (win32_insert_watchpoint): New function.
10449         (win32_remove_watchpoint): New function.
10450         (win32_stopped_by_watchpoint): New function.
10451         (win32_stopped_data_address): New function.
10452         (win32_target_ops): Add entries for insert_watchpoint,
10453         remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
10454         * win32-low.h (win32_target_ops): New members insert_point,
10455         remove_point, stopped_by_watchpoint, stopped_data_address.
10456
10457 2009-06-25  Pedro Alves  <pedro@codesourcery.com>
10458
10459         * server.c (process_serial_event): Re-return unsupported, not
10460         error, if the type isn't recognized.  Re-allow supporting only
10461         insert or remove packets.  Also call require_running for
10462         breakpoints.  Add missing break statement to default case.  Tidy.
10463         * target.h (struct target_ops): Rename insert_watchpoint to
10464         insert_point, and remove_watchpoint to remove_point.
10465
10466         * linux-low.h (struct linux_target_ops): Likewise.
10467         * linux-low.c (linux_insert_watchpoint): Rename to ...
10468         (linux_insert_point): ... this.  Adjust.
10469         (linux_remove_watchpoint): Rename to ...
10470         (linux_remove_point): ... this.  Adjust.
10471         (linux_target_ops): Adjust.
10472         * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
10473         (cris_insert_point): ... this.
10474         (cris_remove_watchpoint): Rename to ...
10475         (cris_remove_point): ... this.
10476         (the_low_target): Adjust.
10477
10478 2009-06-24  Pierre Muller  <muller@ics.u-strasbg.fr>
10479
10480         * server.c (handle_v_kill): Pass signal_pid to
10481         kill_inferior if multi_process is zero.
10482
10483 2009-06-23  Aleksandar Ristovski  <aristovski@qnx.com>
10484
10485         * server.c (process_serial_event): Add support for Z0 and Z1 packet.
10486         * target.h (target_ops): Comment for *_watchpoint to make it clear
10487         the functions can get types '0' and '1'.
10488
10489 2009-06-22  Aleksandar Ristovski  <aristovski@qnx.com>
10490
10491         * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
10492         * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
10493         * regcache.c (get_regcache): Likewise.
10494         * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
10495         * win32-low.c (child_fetch_inferior_registers): Remove check for
10496         regno 0.
10497
10498 2009-06-19  Aleksandar Ristovski  <aristovski@qnx.com>
10499             Pedro Alves <pedro@codesourcery.com>
10500
10501         * target.h (struct target_ops) <supports_multi_process>: New
10502         callback.
10503         (target_supports_multi_process): New.
10504         * server.c (handle_query): Even if GDB reports support, only
10505         enable multi-process if the target also supports it.  Report
10506         multi-process support only if the target backend supports it.
10507         * linux-low.c (linux_supports_multi_process): New function.
10508         (linux_target_ops): Install it as target_supports_multi_process
10509         callback.
10510
10511 2009-05-24  Doug Evans  <dje@google.com>
10512
10513         Global renaming of find_thread_pid to find_thread_ptid.
10514         * server.h (find_thread_ptid): Renamed from find_thread_pid.
10515         * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
10516         All callers updated.
10517
10518         * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
10519         to resume the newly created thread, don't call ptrace (PTRACE_CONT)
10520         directly.
10521
10522         * linux-low.c (get_stop_pc): Print pc if debug_threads.
10523         (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
10524         (linux_resume_one_lwp): Ditto.
10525
10526 2009-05-23  Doug Evans  <dje@google.com>
10527
10528         * linux-low.c (linux_resume_one_lwp): Change type of first arg
10529         from struct inferior_list_entry * to struct lwp_info *.
10530         All callers updated.
10531
10532 2009-05-13  Doug Evans  <dje@google.com>
10533
10534         * linux-x86-low.c: Don't include assert.h.
10535         (x86_siginfo_fixup): Use fatal, not assert.
10536         (x86_arch_setup): Fix comment.
10537
10538 2009-05-12  Doug Evans  <dje@google.com>
10539
10540         Biarch support for i386/amd64 gdbserver.
10541         * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
10542         Add linux-x86-low.c.
10543         (linux-i386-low.o, linux-x86-64-low.o): Delete.
10544         (linux-x86-low.o): Add.
10545         * linux-x86-64-low.c: Delete.
10546         * linux-i386-low.c: Delete.
10547         * linux-x86-low.c: New file.
10548         * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
10549         linux-x86-low.o.
10550         (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
10551         linux-x86-low.o.
10552         (x86_64-linux srv_regobj): Add reg-i386-linux.o.
10553         * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
10554         (linux_child_pid_to_exec_file): New function.
10555         (elf_64_header_p, elf_64_file_p): New functions.
10556         (siginfo_fixup): New function.
10557         (linux_xfer_siginfo): New local inf_siginfo.  Call siginfo_fixup to
10558         give target a chance to convert layout.
10559         * linux-low.h (linux_target_ops): New member siginfo_fixup.
10560         (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
10561
10562 2009-05-07  Doug Evans  <dje@google.com>
10563
10564         * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
10565         (regsets_store_inferior_registers): Ditto.
10566
10567 2009-05-06  Pedro Alves  <pedro@codesourcery.com>
10568
10569         PR server/10048
10570
10571         * linux-low.c (must_set_ptrace_flags): Delete.
10572         (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
10573         of the global.
10574         (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here.  Set
10575         `lwp->must_set_ptrace_flags' instead.
10576         (linux_wait_for_event_1): Set ptrace options here.
10577         (linux_wait_1): ... not here.
10578
10579 2009-04-30  Doug Evans  <dje@google.com>
10580
10581         * inferiors.c (started_inferior_callback): New function.
10582         (attached_inferior_callback): New function.
10583         (have_started_inferiors_p, have_attached_inferiors_p): New functions.
10584         * server.c (print_started_pid, print_attached_pid): New functions.
10585         (detach_or_kill_for_exit): New function.
10586         (main): Call it instead of for_each_inferior (kill_inferior_callback).
10587         * server.h (have_started_inferiors_p): Declare.
10588         (have_attached_inferiors_p): Declare.
10589
10590         * inferiors.c (remove_process): Fix memory leak, free process.
10591         * linux-low.c (linux_remove_process): New function.
10592         (linux_kill): Call it instead of remove_process.
10593         (linux_detach, linux_wait_1): Ditto.
10594
10595 2009-04-19  Danny Backx  <dannybackx@users.sourceforge.net>
10596
10597         * configure.srv: Add x86 Windows CE target.
10598
10599 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
10600
10601         * inferiors.c (get_thread_process): Make global.
10602         * server.h (get_thread_process): Add prototype.
10603         * thread-db.c (find_one_thread): Use get_thread_process
10604         instead of current_process.
10605         (thread_db_get_tls_address): Do not crash if called when
10606         thread layer is not yet initialized.
10607
10608 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
10609
10610         * remote-utils.c (prepare_resume_reply): Null-terminate packet.
10611         * spu-low.c (current_tid): Rename to ...
10612         (current_ptid): ... this.
10613         (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
10614         spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
10615         ptid_get_lwp (current_ptid) instead of current_tid.
10616         (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
10617         instead of current_tid.  Use find_process_pid to verify pid
10618         argument is valid.  Pass proper argument to remove_process.
10619         (spu_thread_alive): Compare current_ptid instead of current_tid.
10620         (spu_resume): Likewise.
10621
10622 2009-04-02  Pedro Alves  <pedro@codesourcery.com>
10623
10624         * linux-low.c (usr_store_inferior_registers): Declare local `pid'
10625         variable.
10626
10627 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
10628
10629         Implement the multiprocess extensions, and add linux multiprocess
10630         support.
10631
10632         * server.h (ULONGEST): Declare.
10633         (struct ptid, ptid_t): New.
10634         (minus_one_ptid, null_ptid): Declare.
10635         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10636         (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
10637         (struct inferior_list_entry): Change `id' type from unsigned from
10638         to ptid_t.
10639         (struct sym_cache, struct breakpoint, struct
10640         process_info_private): Forward declare.
10641         (struct process_info): Declare.
10642         (current_process): Declare.
10643         (all_processes): Declare.
10644         (initialize_inferiors): Declare.
10645         (add_thread): Adjust to use ptid_t.
10646         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
10647         (add_process, remove_process, find_thread_pid): Declare.
10648         (find_inferior_id): Adjust to use ptid_t.
10649         (cont_thread, general_thread, step_thread): Change type to ptid_t.
10650         (multi_process): Declare.
10651         (push_event): Adjust to use ptid_t.
10652         (read_ptid, write_ptid): Declare.
10653         (prepare_resume_reply): Adjust to use ptid_t.
10654         (clear_symbol_cache): Declare.
10655         * inferiors.c (all_processes): New.
10656         (null_ptid, minus_one_ptid): New.
10657         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10658         (ptid_get_tid, ptid_equal, ptid_is_pid): New.
10659         (add_thread): Change unsigned long to ptid.  Remove gdb_id
10660         parameter.  Adjust.
10661         (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
10662         (gdb_id_to_thread): Rename to ...
10663         (find_thread_pid): ... this.  Change unsigned long to ptid.
10664         (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
10665         (loaded_dll, pull_pid_from_list): Adjust.
10666         (add_process, remove_process, find_process_pid)
10667         (get_thread_process, current_process, initialize_inferiors): New.
10668         * target.h (struct thread_resume) <thread>: Change type to ptid_t.
10669         (struct target_waitstatus) <related_pid>: Ditto.
10670         (struct target_ops) <kill, detach>: Add `pid' argument.  Change
10671         return type to int.
10672         (struct target_ops) <join>: Add `pid' argument.
10673         (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
10674         (struct target_ops) <wait>: Add `ptid' field.  Change return type
10675         to ptid.
10676         (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
10677         (mywait): Add `ptid' argument.  Change return type to ptid_t.
10678         (target_pid_to_str): Declare.
10679         * target.c (set_desired_inferior): Adjust to use ptids.
10680         (mywait): Add new `ptid' argument.  Adjust.
10681         (target_pid_to_str): New.
10682         * mem-break.h (free_all_breakpoints): Declare.
10683         * mem-break.c (breakpoints): Delelete.
10684         (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
10685         (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
10686         to use per-process breakpoint list.
10687         (free_all_breakpoints): New.
10688         * remote-utils.c (struct sym_cache) <name>: Drop `const'.
10689         (symbol_cache, all_symbols_looked_up): Delete.
10690         (hexchars): New.
10691         (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
10692         read_ptid): New.
10693         (prepare_resume_reply): Change ptid argument's type from unsigned
10694         long to ptid_t.  Adjust.  Implement W;process and X;process.
10695         (free_sym_cache, clear_symbol_cache): New.
10696         (look_up_one_symbol): Adjust to per-process symbol cache.  *
10697         * server.c (cont_thread, general_thread, step_thread): Change type
10698         to ptid_t.
10699         (attached): Delete.
10700         (multi_process): New.
10701         (last_ptid): Change type to ptid_t.
10702         (struct vstop_notif) <ptid>: Change type to ptid_t.
10703         (queue_stop_reply, push_event): Change `ptid' argument's type to
10704         ptid_t.
10705         (discard_queued_stop_replies): Add `pid' argument.
10706         (start_inferior): Adjust to use ptids.  Adjust to mywait interface
10707         changes.  Don't reference the `attached' global.
10708         (attach_inferior): Adjust to mywait interface changes.
10709         (handle_query): Adjust to use ptids.  Parse GDB's qSupported
10710         features.  Handle and report "multiprocess+".  Handle
10711         "qAttached:PID".
10712         (handle_v_cont): Adjust to use ptids.  Adjust to mywait interface
10713         changes.
10714         (handle_v_kill): New.
10715         (handle_v_stopped): Adjust to use target_pid_to_str.
10716         (handle_v_requests): Allow multiple attaches and runs when
10717         multiprocess extensions are in effect.  Handle "vKill".
10718         (myresume): Adjust to use ptids.
10719         (queue_stop_reply_callback): Add `arg' parameter.  Handle it.
10720         (handle_status): Adjust to discard_queued_stop_replies interface
10721         change.
10722         (first_thread_of, kill_inferior_callback)
10723         (detach_or_kill_inferior_callback, join_inferiors_callback): New.
10724         (main): Call initialize_inferiors.  Adjust to use ptids, killing
10725         and detaching from all inferiors.  Handle multiprocess packet
10726         variants.
10727         * linux-low.h: Include gdb_proc_service.h.
10728         (struct process_info_private): New.
10729         (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
10730         <lwpid_of>: Use ptid_get_lwp.
10731         (get_lwp_thread): Adjust.
10732         (struct lwp_info): Add `dead' member.
10733         (find_lwp_pid): Declare.
10734         * linux-low.c (thread_db_active): Delete.
10735         (new_inferior): Adjust comment.
10736         (inferior_pid): Delete.
10737         (linux_add_process): New.
10738         (handle_extended_wait): Adjust.
10739         (add_lwp): Change unsigned long to ptid.
10740         (linux_create_inferior): Add process to processes table.  Adjust
10741         to use ptids.  Don't set new_inferior here.
10742         (linux_attach_lwp): Rename to ...
10743         (linux_attach_lwp_1): ... this.  Add `initial' argument.  Handle
10744         it.  Adjust to use ptids.
10745         (linux_attach_lwp): New.
10746         (linux_attach): Add process to processes table.  Don't set
10747         new_inferior here.
10748         (struct counter): New.
10749         (second_thread_of_pid_p, last_thread_of_process_p): New.
10750         (linux_kill_one_lwp): Add `args' parameter.  Handle it.  Adjust to
10751         multiple processes.
10752         (linux_kill): Add `pid' argument.  Handle it.  Adjust to multiple
10753         processes.  Remove process from process table.
10754         (linux_detach_one_lwp): Add `args' parameter.  Handle it.  Adjust
10755         to multiple processes.
10756         (any_thread_of): New.
10757         (linux_detach): Add `pid' argument, and handle it.  Remove process
10758         from processes table.
10759         (linux_join): Add `pid' argument.  Handle it.
10760         (linux_thread_alive): Change unsighed long argument to ptid_t.
10761         Consider dead lwps as not being alive.
10762         (status_pending_p): Rename `dummy' argument to `arg'.  Filter out
10763         threads we're not interested in.
10764         (same_lwp, find_lwp_pid): New.
10765         (linux_wait_for_lwp): Change `pid' argument's type from int to
10766         ptid_t.  Adjust.
10767         (linux_wait_for_event): Rename to ...
10768         (linux_wait_for_event_1): ... this.  Change `pid' argument's type
10769         from int to ptid_t.  Adjust.
10770         (linux_wait_for_event): New.
10771         (linux_wait_1): Add `ptid' argument.  Change return type to
10772         ptid_t.  Adjust.  Use last_thread_of_process_p.  Remove processes
10773         that exit from the process table.
10774         (linux_wait): Add `ptid' argument.  Change return type to ptid_t.
10775         Adjust.
10776         (mark_lwp_dead): New.
10777         (wait_for_sigstop): Adjust to use ptids.  If a process exits while
10778         stopping all threads, mark its main lwp as dead.
10779         (linux_set_resume_request, linux_resume_one_thread): Adjust to use
10780         ptids.
10781         (fetch_register, usr_store_inferior_registers)
10782         (regsets_fetch_inferior_registers)
10783         (regsets_store_inferior_registers, linux_read_memory)
10784         (linux_write_memory): Inline `inferior_pid'.
10785         (linux_look_up_symbols): Adjust to use per-process
10786         `thread_db_active'.
10787         (linux_request_interrupt): Adjust to use ptids.
10788         (linux_read_auxv): Inline `inferior_pid'.
10789         (initialize_low): Don't reference thread_db_active.
10790         * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
10791         * proc-service.c (ps_lgetregs): Use find_lwp_pid.
10792         (ps_getpid): Return the pid of the current inferior.
10793         * thread-db.c (proc_handle, thread_agent): Delete.
10794         (thread_db_create_event, thread_db_enable_reporting): Adjust to
10795         per-process data.
10796         (find_one_thread): Change argument type to ptid_t.  Adjust to
10797         per-process data.
10798         (maybe_attach_thread): Adjust to per-process data and ptids.
10799         (thread_db_find_new_threads): Ditto.
10800         (thread_db_init): Ditto.
10801         * spu-low.c (spu_create_inferior, spu_attach): Add process to
10802         processes table.  Adjust to use ptids.
10803         (spu_kill, spu_detach): Adjust interface.  Remove process from
10804         processes table.
10805         (spu_join, spu_thread_alive): Adjust interface.
10806         (spu_wait): Adjust interface.  Remove process from processes
10807         table.  Adjust to use ptids.
10808         * win32-low.c (current_inferior_tid): Delete.
10809         (current_inferior_ptid): New.
10810         (debug_event_ptid): New.
10811         (thread_rec): Take a ptid.  Adjust.
10812         (child_add_thread): Add `pid' argument.  Adjust to use ptids.
10813         (child_delete_thread): Ditto.
10814         (do_initial_child_stuff): Add `attached' argument.  Add process to
10815         processes table.
10816         (child_fetch_inferior_registers, child_store_inferior_registers):
10817         Adjust.
10818         (win32_create_inferior): Pass 0 to do_initial_child_stuff.
10819         (win32_attach): Pass 1 to do_initial_child_stuff.
10820         (win32_kill): Adjust interface.  Remove process from processes
10821         table.
10822         (win32_detach): Ditto.
10823         (win32_join): Adjust interface.
10824         (win32_thread_alive): Take a ptid.
10825         (win32_resume): Adjust to use ptids.
10826         (get_child_debug_event): Ditto.
10827         (win32_wait): Adjust interface.  Remove exiting process from
10828         processes table.
10829
10830 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
10831
10832         Non-stop mode support.
10833
10834         * server.h (non_stop): Declare.
10835         (gdb_client_data, handler_func): Declare.
10836         (delete_file_handler, add_file_handler, start_event_loop):
10837         Declare.
10838         (handle_serial_event, handle_target_event, push_event)
10839         (putpkt_notif): Declare.
10840         * target.h (enum resume_kind): New.
10841         (struct thread_resume): Replace `step' field by `kind' field.
10842         (TARGET_WNOHANG): Define.
10843         (struct target_ops) <wait>: Add `options' argument.
10844         <supports_non_stop, async, start_non_stop>: New fields.
10845         (target_supports_non_stop, target_async): New.
10846         (start_non_stop): Declare.
10847         (mywait): Add `options' argument.
10848         * target.c (mywait): Add `options' argument.  Print child exit
10849         notifications here.
10850         (start_non_stop): New.
10851         * server.c (non_stop, own_buf, mem_buf): New globals.
10852         (struct vstop_notif): New.
10853         (notif_queue): New global.
10854         (queue_stop_reply, push_event, discard_queued_stop_replies)
10855         (send_next_stop_reply): New.
10856         (start_inferior): Adjust to use resume_kind.  Adjust to mywait
10857         interface changes.
10858         (attach_inferior): In non-stop mode, don't wait for the target
10859         here.
10860         (handle_general_set): Handle QNonStop.
10861         (handle_query): When handling qC, return the current general
10862         thread, instead of the first thread of the list.
10863         (handle_query): If the backend supports non-stop mode, include
10864         QNonStop+ in the qSupported query response.
10865         (handle_v_cont): Adjust to use resume_kind.  Handle resume_stop
10866         and non-stop mode.
10867         (handle_v_attach, handle_v_run): Handle non-stop mode.
10868         (handle_v_stopped): New.
10869         (handle_v_requests): Report support for vCont;t.  Handle vStopped.
10870         (myresume): Adjust to use resume_kind.  Handle non-stop.
10871         (queue_stop_reply_callback): New.
10872         (handle_status): Handle non-stop mode.
10873         (main): Clear non_stop flag on reconnection.  Use the event-loop.
10874         Refactor serial protocol handling from here ...
10875         (process_serial_event): ... to this new function.  When GDB
10876         selects any thread, select one here.  In non-stop mode, wait until
10877         GDB acks all pending events before exiting.
10878         (handle_serial_event, handle_target_event): New.
10879         * remote-utils.c (remote_open): Install remote_desc in the event
10880         loop.
10881         (remote_close): Remove remote_desc from the event loop.
10882         (putpkt_binary): Rename to...
10883         (putpkt_binary_1): ... this.  Add `is_notic' argument.  Handle it.
10884         (putpkt_binary): New as wrapper around putpkt_binary_1.
10885         (putpkt_notif): New.
10886         (prepare_resume_reply): In non-stop mode, don't change the
10887         general_thread.
10888         * event-loop.c: New.
10889         * Makefile.in (OBJ): Add event-loop.o.
10890         (event-loop.o): New rule.
10891
10892         * linux-low.h (pid_of): Moved here.
10893         (lwpid_of): New.
10894         (get_lwp_thread): Use lwpid_of.
10895         (struct lwp_info): Delete `lwpid' field.  Add `suspended' field.
10896         * linux-low.c (pid_of): Delete.
10897         (inferior_pid): Use lwpid_of.
10898         (linux_event_pipe): New.
10899         (target_is_async_p): New.
10900         (delete_lwp): New.
10901         (handle_extended_wait): Use lwpid_of.
10902         (add_lwp): Don't set lwpid field.
10903         (linux_attach_lwp): Adjust debug output.  Use lwpid_of.
10904         (linux_kill_one_lwp): If killing a running lwp, stop it first.
10905         Use lwpid_of.  Adjust to linux_wait_for_event interface changes.
10906         (linux_detach_one_lwp): If detaching from a running lwp, stop it
10907         first.  Adjust to linux_wait_for_event interface changes.  Use
10908         lwpid_of.
10909         (linux_detach): Don't delete the main lwp here.
10910         (linux_join): Use my_waitpid.  Avoid signal_pid.  Use lwpid_of.
10911         (status_pending_p): Don't consider explicitly suspended lwps.
10912         (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
10913         pointer.  Add OPTIONS argument.  Change return type to int.  Use
10914         my_waitpid instead of sleeping.  Handle WNOHANG.  Use lwpid_of.
10915         (linux_wait_for_event): Take an integer pid instead of a lwp_info
10916         pointer.  Add status pointer argument.  Return a pid instead of a
10917         status.  Use lwpid_of.  Adjust to linux_wait_for_lwp interface
10918         changes.  In non-stop mode, don't switch to a random thread.
10919         (linux_wait): Rename to...
10920         (linux_wait_1): ... this.  Add target_options argument, and handle
10921         it.  Adjust to use resume_kind.  Use lwpid_of.  In non-stop mode,
10922         don't handle the continue thread.  Handle TARGET_WNOHANG.  Merge
10923         clean exit and signal exit code.  Don't stop all threads in
10924         non-stop mode.  In all-stop mode, only stop all threads when
10925         reporting a stop to GDB.  Handle explicit thread stop requests.
10926         (async_file_flush, async_file_mark): New.
10927         (linux_wait): New.
10928         (send_sigstop): Use lwpid_of.
10929         (wait_for_sigstop): Use lwpid_of.  Adjust to linux_wait_for_event
10930         interface changes.  In non-stop mode, don't switch to a random
10931         thread.
10932         (linux_resume_one_lwp): Use lwpid_of.
10933         (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
10934         (linux_resume_one_thread): ... this.  Handle resume_stop.  In
10935         non-stop mode, don't look for pending flag in all threads.
10936         (resume_status_pending_p): Don't consider explicitly suspended
10937         threads.
10938         (my_waitpid): Reimplement.  Emulate __WALL.
10939         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10940         Use lwpid_of.
10941         (sigchld_handler, linux_supports_non_stop, linux_async)
10942         (linux_start_non_stop): New.
10943         (linux_target_ops): Register linux_supports_non_stop, linux_async
10944         and linux_start_non_stop.
10945         (initialize_low): Install SIGCHLD handler.
10946         * thread-db.c (thread_db_create_event, find_one_thread)
10947         (thread_db_get_tls_address): Use lwpid_of.
10948         * win32-low.c (win32_detach): Adjust to use resume_kind.
10949         (win32_wait): Add `options' argument.
10950         * spu-low.c (spu_resume): Adjust to use resume_kind.
10951         (spu_wait): Add `options' argument.
10952
10953 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
10954
10955         Decouple target code from remote protocol.
10956
10957         * target.h (enum target_waitkind): New.
10958         (struct target_waitstatus): New.
10959         (struct target_ops) <wait>: Return an unsigned long.  Take a
10960         target_waitstatus pointer instead of a char pointer.
10961         (mywait): Likewise.
10962         * target.c (mywait): Change prototype to return an unsigned long.
10963         Take a target_waitstatus pointer instead of a char pointer.  Adjust.
10964         * server.h (thread_from_wait, old_thread_from_wait): Delete
10965         declarations.
10966         (prepare_resume_reply): Change prototype to take a
10967         target_waitstatus.
10968         * server.c (thread_from_wait, old_thread_from_wait): Delete.
10969         (last_status, last_ptid): New.
10970         (start_inferior): Remove "statusptr" argument.  Adjust.  Return a
10971         pid instead of a signal.
10972         (attach_inferior): Remove "status" and "signal" parameters.
10973         Adjust.
10974         (handle_query): For qGetTLSAddr, parse the thread id with strtol,
10975         not as an address.
10976         (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
10977         (handle_v_requests, myresume): Remove "status" and "signal"
10978         parameters.  Adjust.
10979         (handle_status): New.
10980         (main): Delete local `status'.  Adjust.
10981         * remote-utils.c: Include target.h.
10982         (prepare_resume_reply): Change prototype to take a
10983         target_waitstatus.  Adjust.
10984
10985         * linux-low.c (linux_wait): Adjust to new target_ops->wait
10986         interface.
10987         * spu-low.c (spu_wait): Adjust.
10988         * win32-low.c (enum target_waitkind, struct target_waitstatus):
10989         Delete.
10990         (win32_wait): Adjust.
10991
10992 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
10993
10994         * target.h (struct thread_resume): Delete leave_stopped member.
10995         (struct target_ops): Add a `n' argument to the `resume' callback.
10996         * server.c (start_inferior): Adjust.
10997         (handle_v_cont, myresume): Adjust.
10998         * linux-low.c (check_removed_breakpoint): Adjust to resume
10999         interface change, and to removed leave_stopped field.
11000         (resume_ptr): Delete.
11001         (struct thread_resume_array): New.
11002         (linux_set_resume_request): Add new `arg' parameter.  Adjust to
11003         resume interface change.
11004         (linux_continue_one_thread, linux_queue_one_thread)
11005         (resume_status_pending_p): Check if the resume field is NULL
11006         instead of checking the leave_stopped member.
11007         (linux_resume): Adjust to the target resume interface change.
11008         * spu-low.c (spu_resume): Adjust to the target resume interface
11009         change.
11010         * win32-low.c (win32_detach, win32_resume): Ditto.
11011
11012 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
11013
11014         * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
11015         flag.
11016         (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
11017         pending.
11018         (linux_continue_one_thread): Only preserve the stepping flag if
11019         there's a pending breakpoint.
11020
11021 2009-03-31  Pedro Alves  <pedro@codesourcery.com>
11022
11023         * server.c (main): After the inferior having exited, call
11024         remote_close before exiting gdbserver.
11025
11026 2009-03-25  Thiago Jung Bauermann  <bauerman@br.ibm.com>
11027
11028         Fix size of FPSCR in Power 7 processors.
11029         * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
11030         (PPC_FEATURE_HAS_DFP): New #define.
11031         (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
11032         size of the FPSCR.
11033
11034 2009-03-23  Pedro Alves  <pedro@codesourcery.com>
11035
11036         * server.c (handle_query) Whitespace and formatting.
11037
11038 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
11039
11040         * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
11041         linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
11042         linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
11043         linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
11044         regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
11045         thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
11046         Makefile.in, configure.ac: Fix whitespace throughout.
11047         * configure: Regenerate.
11048
11049 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
11050
11051         * inferiors.c (find_inferior): Make it safe for the callback
11052         function to delete the currently iterated inferior.
11053
11054 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
11055
11056         * Makefile.in (linuw_low_h): Move higher.
11057         (thread-db.o): Depend on $(linux_low_h).
11058
11059 2009-03-17  Pedro Alves  <pedro@codesourcery.com>
11060
11061         Rename "process" to "lwp" throughout.
11062
11063         * linux-low.c (all_processes): Rename to...
11064         (all_lwps): ... this.
11065         (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
11066         (add_process): Rename to ...
11067         (add_lwp): ... this.  Adjust.
11068         (linux_create_inferior): Adjust.
11069         (linux_attach_lwp): Adjust.
11070         (linux_attach): Adjust.
11071         (linux_kill_one_process): Rename to ...
11072         (linux_kill_one_lwp): ... this.  Adjust.
11073         (linux_kill): Adjust.
11074         (linux_detach_one_process): Rename to ...
11075         (linux_detach_one_lwp): ... this.  Adjust.
11076         (linux_detach): Adjust.
11077         (check_removed_breakpoint): Adjust.
11078         (status_pending_p): Adjust.
11079         (linux_wait_for_process): Rename to ...
11080         (linux_wait_for_lwp): ... this.  Adjust.
11081         (linux_wait_for_event): Adjust.
11082         (send_sigstop): Adjust.
11083         (wait_for_sigstop): Adjust.
11084         (stop_all_processes): Rename to ...
11085         (stop_all_lwps): ... this.
11086         (linux_resume_one_process): Rename to ...
11087         (linux_resume_one_lwp): ... this.  Adjust.
11088         (linux_set_resume_request, linux_continue_one_thread)
11089         (linux_queue_one_thread, resume_status_pending_p)
11090         (usr_store_inferior_registers, regsets_store_inferior_registers)
11091         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11092         Adjust.
11093         * linux-low.h (get_process): Rename to ...
11094         (get_lwp): ... this.  Adjust.
11095         (get_thread_process): Rename to ...
11096         (get_thread_lwp): ... this.  Adjust.
11097         (get_process_thread): Rename to ...
11098         (get_lwp_thread): ... this.  Adjust.
11099         (struct process_info): Rename to ...
11100         (struct lwp_info): ... this.
11101         (all_processes): Rename to ...
11102         (all_lwps): ... this.
11103         * proc-service.c (ps_lgetregs): Adjust.
11104         * thread-db.c (thread_db_create_event, find_one_thread)
11105         (maybe_attach_thread, thread_db_get_tls_address): Adjust.
11106
11107 2009-03-14  Pedro Alves  <pedro@codesourcery.com>
11108
11109         * server.c (handle_query): Handle "qAttached".
11110
11111 2009-03-13  Nathan Sidwell  <nathan@codesourcery.com>
11112
11113         * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
11114         GPLv3, update license URL.
11115
11116 2009-03-01  Doug Evans  <dje@google.com>
11117
11118         * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
11119         (server_h): Add gdb_signals.h.
11120         (signals.o): Update.
11121         * server.h (target_signal_from_host,target_signal_to_host_p)
11122         (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
11123
11124 2009-02-14  Pierre Muller  <muller@ics.u-strasbg.fr>
11125
11126         * remote-utils.c (getpkt): Also generate remote-debug
11127         information if noack_mode is set.
11128
11129 2009-02-06  Pedro Alves  <pedro@codesourcery.com>
11130
11131         * server.c (handle_query): Report qXfer:siginfo:read and
11132         qXfer:siginfo:write as supported and handle them.
11133         * target.h (struct target_ops) <qxfer_siginfo>: New field.
11134         * linux-low.c (linux_xfer_siginfo): New.
11135         (linux_target_ops): Set it.
11136
11137 2009-01-26  Pedro Alves  <pedro@codesourcery.com>
11138
11139         * server.c (gdbserver_usage): Mention --remote-debug.
11140         (main): Accept '--remote-debug' switch.
11141
11142 2009-01-18  Doug Evans  <dje@google.com>
11143
11144         * regcache.c (new_register_cache): No need to check result of xcalloc.
11145         * server.c (handle_search_memory): Back out calls to xmalloc,
11146         result is checked and error is returned to user upon failure.
11147         (handle_query): Ditto.  Add more checks for result of malloc.
11148         (handle_v_cont): Check result of malloc, report error back to
11149         user upon failure.
11150         (handle_v_run): Ditto.  Call freeargv.
11151         * server.h (freeargv): Declare.
11152         * utils.c (freeargv): New fn.
11153
11154 2009-01-15  Doug Evans  <dje@google.com>
11155
11156         * gdbreplay.c (perror_with_name): Make arg const char *.
11157         * server.h (target_signal_to_name): Make return type const char *.
11158         * thread-db.c (thread_db_err_str): Make return type const char *.
11159         * utils.c (perror_with_name): Make arg const char *.
11160
11161 2009-01-14  Pedro Alves  <pedro@codesourcery.com>
11162
11163         * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
11164         when handling a EXIT_PROCESS_DEBUG_EVENT.
11165
11166 2009-01-06  Joel Brobecker  <brobecker@adacore.com>
11167
11168         * gdbreplay.c (gdbreplay_version): Update copyright year.
11169         * server.c (gdbserver_version): Likewise.
11170
11171 2009-01-05  Doug Evans  <dje@google.com>
11172
11173         * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
11174         (handle_extended_wait): Improve comment.
11175
11176 2008-12-13  Doug Evans  <dje@google.com>
11177
11178         * utils.c (xmalloc,xcalloc,xstrdup): New fns.
11179         * server.h (ATTR_MALLOC): New macro.
11180         (xmalloc,xcalloc,xstrdup): Declare.
11181         * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
11182         * inferiors.c: Ditto.
11183         * linux-low.c: Ditto.
11184         * mem-break.c: Ditto.
11185         * regcache.c: Ditto.
11186         * remote-utils.c: Ditto.
11187         * server.c: Ditto.
11188         * target.c: Ditto.
11189         * win32-low.c: Ditto.
11190
11191 2008-12-12  Doug Evans  <dje@google.com>
11192
11193         * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
11194         in debugging printf.
11195
11196         * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
11197
11198 2008-12-09  Doug Evans  <dje@google.com>
11199
11200         * linux-low.h (struct process_info): Delete member tid, unused.
11201         * thread-db.c (find_one_thread): Update.
11202         (maybe_attach_thread): Update.
11203
11204 2008-12-02  Pedro Alves  <pedro@codesourcery.com>
11205
11206         * target.h (struct target_ops): Add qxfer_osdata member.
11207         * linux-low.c: Include ctype.h and pwd.h and sys/types.h
11208         and dirent.h.
11209         (linux_qxfer_osdata): New functions.
11210         (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
11211         callback.
11212         * server.c (handle_query): Handle "qXfer:osdata:read:".
11213         * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
11214         (buffer_xml_printf): New functions.
11215         * server.h (struct buffer): New.
11216         (buffer_grow_str, buffer_grow_str0): New macros.
11217         (buffer_grow, buffer_free, buffer_init, buffer_finish)
11218         (buffer_xml_printf): Declare.
11219
11220 2008-11-24  Doug Evans  <dje@google.com>
11221
11222         * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
11223
11224 2008-11-24  Daniel Jacobowitz  <dan@codesourcery.com>
11225
11226         * server.c (handle_v_run): Always use the supplied argument list.
11227
11228 2008-11-19  Bob Wilson  <bob.wilson@acm.org>
11229
11230         * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
11231         (xtensa_regmap_table): Add entry for scompare1.
11232
11233 2008-11-18  Thiago Jung Bauermann  <bauerman@br.ibm.com>
11234
11235         * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
11236         powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
11237         powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
11238         powerpc-isa205-64l.o, powerpc-isa205-64l.c,
11239         powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
11240         powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
11241         * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
11242         XML target descriptions.
11243         * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
11244         when inferior is running on an ISA 2.05 or later processor.  Add
11245         special case to return offset for full 64-bit slot of FPSCR when
11246         in 32-bits.
11247
11248 2008-11-14  Daniel Gutson  <dgutson@codesourcery.com>
11249
11250         * Makefile.in (SFILES, clean): Added sparc64 files.
11251         (reg-sparc64.o, reg-sparc64.c): New.
11252         * configure.srv (sparc*-*-linux*): New configuration.
11253         * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
11254         syscall arguments for SPARC.
11255         (regsets_store_inferior_registers): Likewise.
11256         * linux-sparc-low.c: New file.
11257
11258 2008-10-21  Doug Evans  <dje@google.com>
11259
11260         * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
11261         (READLINE_DIR,READLINE_DEP): Delete.
11262         (INTERNAL_CFLAGS): Update.
11263         (LINTFLAGS): Update.
11264
11265 2008-10-10  Pedro Alves  <pedro@codesourcery.com>
11266
11267         * server.c (handle_v_run): If GDB didn't specify an argv, use the
11268         whole argv from the last run, not just argv[0].
11269
11270 2008-09-08  Pedro Alves  <pedro@codesourcery.com>
11271
11272         * regcache.c (new_register_cache): Return NULL if the register
11273         cache size isn't known yet.
11274         (free_register_cache): Avoid dereferencing a NULL regcache.
11275
11276 2008-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
11277
11278         * configure.srv: Merge MIPS and MIPS64.
11279
11280 2008-08-24  Maciej W. Rozycki  <macro@linux-mips.org>
11281
11282         * Makefile.in (uninstall): Apply $(EXEEXT) too.
11283
11284 2008-08-18  Luis Machado  <luisgpm@br.ibm.com>
11285
11286         * Makefile.in: Add required vsx dependencies.
11287
11288         * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
11289         Declare init_registers_powerpc_vsx32l.
11290         Declare init_registers_powerpc_vsx64l.
11291         Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
11292         (ppc_arch_setup): Check for VSX in hwcap.
11293         (ppc_fill_vsxregset): New function.
11294         (ppc_store_vsxregset): New function.
11295         Add new VSX entry in regset_info target_regsets.
11296
11297         * configure.srv: Add new VSX dependencies.
11298
11299 2008-08-12  Pedro Alves  <pedro@codesourcery.com>
11300
11301         * remote-utils.c (noack_mode, transport_is_reliable): New globals.
11302         (remote_open): Set or clear transport_is_reliable.
11303         (putpkt_binary): Don't expect acks in noack mode.
11304         (getpkt): Don't send ack/nac in noack mode.
11305         * server.c (handle_general_set): Handle QStartNoAckMode.
11306         (handle_query): If connected by tcp pass QStartNoAckMode+ in
11307         qSupported.
11308         (main): Reset noack_mode on every connection.
11309         * server.h (noack_mode): Declare.
11310
11311 2008-08-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11312
11313         * Makefile.in (GDBREPLAY_OBS): New variable.
11314         (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
11315
11316 2008-08-05  Ulrich Weigand  <uweigand@de.ibm.com>
11317             Daniel Jacobowitz  <dan@codesourcery.com>
11318
11319         * linux-low.c (linux_resume_one_process): Ignore ESRCH.
11320         (usr_store_inferior_registers): Likewise.
11321         (regsets_store_inferior_registers): Likewise.
11322
11323 2008-07-31  Rolf Jansen  <rj@surtec.com>
11324             Pedro Alves  <pedro@codesourcery.com>
11325
11326         * configure.ac: Check for memmem declaration.
11327         * server.c [HAVE_MALLOC_H]: Include malloc.h.
11328         (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
11329         (disable_packet_qfThreadInfo): Unconditionally compile.
11330         * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
11331         * configure, config.in: Regenerate.
11332
11333 2008-07-28  Doug Kwan  <dougkwan@google.com>
11334
11335         * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
11336         (linux_write_memory): Remove declaration of errno.
11337
11338 2008-07-12  Ulrich Weigand  <uweigand@de.ibm.com>
11339
11340         * linux-low.c (handle_extended_wait): Do not use "status"
11341         variable uninitialized.
11342
11343 2008-07-07  Pedro Alves  <pedro@codesourcery.com>
11344
11345         * server.c (handle_v_attach): Inhibit reporting dll changes.
11346
11347 2008-06-27  Pedro Alves  <pedro@codesourcery.com>
11348
11349         * remote-utils.c (prepare_resume_reply): If requested, don't
11350         output "thread:TID" in the T stop reply.
11351
11352         * server.c (disable_packet_vCont, disable_packet_Tthread)
11353         (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
11354         (handle_query): If requested, disable support for qC, qfThreadInfo
11355         and qsThreadInfo.
11356         (handle_v_requests): If requested, disable support for vCont.
11357         (gdbserver_show_disableable): New.
11358         (main): Handle --disable-packet and --disable-packet=LIST.
11359
11360         * server.h (disable_packet_vCont, disable_packet_Tthread)
11361         (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
11362
11363 2008-06-20  Carlos O'Donell  <carlos@codesourcery.com>
11364
11365         * server.c (gdbserver_usage): Mention --version.
11366
11367 2008-06-06  Daniel Jacobowitz  <dan@codesourcery.com>
11368
11369         * Makefile.in (gdbreplay.o): New rule.
11370
11371 2008-06-06  Joseph Myers  <joseph@codesourcery.com>
11372
11373         * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
11374         message, not gdbserver.
11375
11376 2008-06-05  Vladimir Prus  <vladimir@codesourcery.com>
11377             Nathan Sidwell  <nathan@codesourcery.com>
11378             Joseph Myers  <joseph@codesourcery.com>
11379
11380         * acinclude.m4: Include ../../config/acx.m4.
11381         * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
11382         * configure, config.in: Regenerate.
11383         * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
11384         * server.c (gdbserver_version): Print PKGVERSION.
11385         (gdbsrever_usage): Add stream parameter.  Print REPORT_BUGS_TO.
11386         (main): Adjust gdbserver_usage calls.
11387         * gdbreplay.c (version, host_name): Add declarations.
11388         (gdbreplay_version, gdbreplay_usage): New.
11389         (main): Accept --version and --help options.
11390
11391 2008-06-04  Daniel Jacobowitz  <dan@codesourcery.com>
11392
11393         * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
11394         (arm_breakpoint_at): Handle Thumb.
11395         (the_low_target): Add comment.
11396
11397 2008-05-29  Ulrich Weigand  <uweigand@de.ibm.com>
11398
11399         * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
11400
11401 2008-05-09  Doug Evans  <dje@google.com>
11402
11403         * server.h (decode_search_memory_packet): Declare.
11404         * remote-utils.c (decode_search_memory_packet): New fn.
11405         * server.c (handle_search_memory_1): New fn.
11406         (handle_search_memory): New fn.
11407         (handle_query): Process qSearch:memory packets.
11408
11409 2008-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
11410
11411         * regcache.c (registers_length): Remove.
11412         (set_register_cache): Verify that PBUFSIZ is large enough to hold a
11413         full register packet.
11414         * regcache.h (registers_length): Remove prototype.
11415         * server.h (PBUFSIZ): Define to 16384.
11416
11417 2008-05-03  Ulrich Weigand  <uweigand@de.ibm.com>
11418
11419         * configure.srv (powerpc*-*-linux*): Set srv_regobj to
11420         powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
11421         powerpc-64l.o, and powerpc-altivec64l.o.
11422         Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
11423         rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
11424         rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
11425         rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
11426         rs6000/power-linux.xml, and rs6000/power64-linux.xml
11427         to srv_xmlfiles.
11428
11429         * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
11430         (powerpc-32l.o, powerpc-32l.c): ... these new rules.
11431         (powerpc-32.o, powerpc-32.c): Remove, replace by ...
11432         (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
11433         (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
11434         (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
11435         (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
11436         (powerpc-64l.o, powerpc-64l.c): ... these new rules.
11437         (powerpc-64.o, powerpc-64.c): Remove, replace by ...
11438         (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
11439         (clean): Update.
11440
11441         * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
11442         (init_registers_powerpc_32l): ... this new prototype.
11443         (init_registers_powerpc_32): Remove, replace by ...
11444         (init_registers_powerpc_altivec32l): ... this new prototype.
11445         (init_registers_powerpc_e500): Remove, replace by ...
11446         (init_registers_powerpc_e500l): ... this new prototype.
11447         (init_registers_ppc64): Remove, replace by ...
11448         (init_registers_powerpc_64l): ... this new prototype.
11449         (init_registers_powerpc_64): Remove, replace by ...
11450         (init_registers_powerpc_altivec64l): ... this new prototype.
11451         (ppc_num_regs): Set to 73.
11452         (PT_ORIG_R3, PT_TRAP): Define if necessary.
11453         (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
11454         (ppc_cannot_store_register): Handle orig_r3 and trap.
11455         (ppc_arch_setup): Update init_registers_... calls.
11456         (ppc_fill_gregset): Handle orig_r3 and trap.
11457
11458         * inferiors.c (clear_inferiors): Reset current_inferior.
11459
11460 2008-04-23  Paolo Bonzini  <bonzini@gnu.org>
11461
11462         * acinclude.m4: Add override.m4.
11463         * configure: Regenerate.
11464
11465 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
11466
11467         * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
11468         initial call to init_register_ppc64.
11469
11470 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
11471
11472         * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
11473         single powerpc*-*-linux* case.
11474         (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
11475
11476 2008-04-17  Ulrich Weigand  <uweigand@de.ibm.com>
11477
11478         * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
11479         srv_regobj.  Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
11480         from reg_xmlfiles.
11481         * linux-ppc-low.c: Include <elf.h>.
11482         (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
11483         (ppc_hwcap): New global variable.
11484         (ppc_regmap): Remove __SPE__ #ifdef sections.
11485         (ppc_regmap_e500): New global variable.
11486         (ppc_cannot_store_register): Update __SPE__ special case.
11487         (ppc_get_hwcap): New function.
11488         (ppc_arch_setup): Use it to determine whether inferior supports
11489         AltiVec or SPE registers.  Set the_low_target.regmap if appropriate.
11490         (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
11491         Do not access registers if target does not support AltiVec.
11492         (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
11493         Do not access registers if target does not support SPE.
11494         (target_regsets): Unconditionally include AltiVec and SPE regsets.
11495
11496 2008-04-17  Daniel Jacobowitz  <dan@codesourcery.com>
11497
11498         * linux-low.c (disabled_regsets, num_regsets): New.
11499         (use_regsets_p): Delete.
11500         (linux_wait_for_process): Clear disabled_regsets.
11501         (regsets_fetch_inferior_registers): Check and set it.
11502         (regsets_store_inferior_registers): Likewise.
11503         (linux_fetch_registers, linux_store_registers): Do not use
11504         use_regsets_p.
11505         (initialize_low): Allocate disabled_regsets.
11506
11507 2008-04-14  Daniel Jacobowitz  <dan@codesourcery.com>
11508
11509         * Makefile.in (LIBOBJS): New.
11510         (OBS): Use LIBOBJS.
11511         (memmem.o): New rule.
11512         * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
11513         * configure: Regenerated.
11514
11515 2008-04-04  Ulrich Weigand  <uweigand@de.ibm.com>
11516
11517         * server.c (handle_query): Never return "unsupported" for
11518         qXfer:features:read queries.
11519
11520 2008-03-27  Ulrich Weigand  <uweigand@de.ibm.com>
11521
11522         * server.c (get_features_xml): Fix inverted condition.
11523         (handle_query): Always support qXfer:feature:read.
11524
11525 2008-03-10  Daniel Jacobowitz  <dan@codesourcery.com>
11526
11527         * server.c (wrapper_argv): New.
11528         (start_inferior): Handle wrapper_argv.  If set, expect an extra
11529         trap.
11530         (gdbserver_usage): Document --wrapper.
11531         (main): Parse --wrapper.
11532
11533 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
11534
11535         * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
11536         powerpc-*-linux* to srv_regobj and reg_xmlfiles.
11537         * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
11538         (ppc_set_pc): Likewise.
11539         (ppc_arch_setup): New function.
11540         (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
11541         of collect_register.
11542         (the_low_target): Use ppc_arch_setup as arch_setup initializer.
11543
11544 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
11545
11546         * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
11547         instead of linux-ppc64-low.o.
11548         * linux-ppc64-low.c: Remove file.
11549         * Makefile.in (SFILES): Remove linux-ppc64-low.c.
11550         (linux-ppc64-low.o): Remove rule.
11551
11552         * linux-ppc-low.c (init_registers_ppc64): Add prototype.
11553         (init_registers_powerpc_64): Likewise.
11554         (ppc_regmap): Conditionally define depending on __powerpc64__.
11555         (ppc_cannot_store_register): Do not special-case "fpscr" when
11556         compiled on __powerpc64__.
11557         (ppc_collect_ptrace_register): New function.
11558         (ppc_supply_ptrace_register): New function.
11559         (ppc_breakpoint): Change type to "unsigned int".
11560         (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
11561         (the_low_target): Conditionally provide initializers for the
11562         arch_setup member depending on __powerpc64__.  Install
11563         collect_ptrace_register and supply_ptrace_register members.
11564
11565 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
11566
11567         * regcache.h (gdbserver_xmltarget): Add extern declaration.
11568         * server.c (gdbserver_xmltarget): Define.
11569         (get_features_xml): Use it to replace "target.xml" and arch_string.
11570
11571         * configure.srv: Remove srv_xmltarget.  Add XML files that were
11572         mentioned there to srv_xmlfiles instead.  Remove conditional tests
11573         on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
11574         srv_xmlfiles and srv_regobj to include all possible choices.
11575         * configure.ac (srv_xmltarget): Remove.
11576         (srv_xmlfiles): Do not add "target.xml".
11577         (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
11578         checks for supplementary target information.
11579         * configure: Regenerate.
11580         * Makefile.in (XML_TARGET): Remove.
11581         (target.xml): Remove rule.
11582         (clean): Do not clean up target.xml.
11583         (.PRECIOUS): Do not mention target.xml.
11584
11585         * target.h (struct target_ops): Remove arch_string member.
11586         * linux-low.c (linux_arch_string): Remove.
11587         (linux_target_ops): Remove arch_string initializer.
11588         * linux-low.h (struct linux_target_ops): Remove arch_string member.
11589         * linux-i386-low.c (the_low_target): Remove arch_string initializer.
11590         * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
11591         * spu-low.c (spu_arch_string): Remove.
11592         (spu_target_ops): Remove arch_string initializer.
11593         * win32-low.c (win32_arch_string): Remove.
11594         (win32_target_ops): Remove arch_string initializer.
11595         * win32-low.h (struct win32_target_ops): Remove arch_string member.
11596         * win32-arm-low.c (the_low_target): Remove arch_string initializer.
11597         * win32-i368-low.c (the_low_target): Remove arch_string initializer.
11598
11599 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
11600
11601         * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
11602         by collect_ptrace_register and supply_ptrace_register hooks.
11603         * linux-low.c (fetch_register): Use supply_ptrace_register callback
11604         instead of checking for the_low_target.left_pad_xfer.
11605         (usr_store_inferior_registers): Use collect_ptrace_register callback
11606         instead of checking for the_low_target.left_pad_xfer.
11607
11608         * linux-s390-low.c (s390_collect_ptrace_register): New function.
11609         (s390_supply_ptrace_register): Likewise.
11610         (s390_fill_gregset): Call s390_collect_ptrace_register.
11611         (the_low_target): Update.
11612
11613         * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
11614         (ppc_supply_ptrace_register): Likewise.
11615         (the_low_target): Update.
11616
11617         * linux-i386-low.c (the_low_target): Update.
11618         * linux-x86-64-low.c (the_low_target): Update.
11619
11620 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
11621
11622         * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
11623         reg-s390.o and reg-s390x.o.
11624
11625         * linux-low.c (new_inferior): New global variable.
11626         (linux_create_inferior, linux_attach): Set it.
11627         (linux_wait_for_process): Call the_low_target.arch_setup after the
11628         target has stopped for the first time.
11629         (initialize_low): Do not call the_low_target.arch_setup.
11630
11631         * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
11632         (s390_set_pc): Likewise.
11633         (s390_arch_setup): New function.
11634         (the_low_target): Use s390_arch_setup as arch_setup routine.
11635
11636         * regcache.c (realloc_register_cache): New function.
11637         (set_register_cache): Call it for each existing regcache.
11638
11639 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
11640
11641         * server.h (init_registers): Remove prototype.
11642
11643         * linux-low.h (struct linux_target_ops): Add arch_setup field.
11644         * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
11645         instead of init_registers ().
11646         * linux-arm-low.c (init_registers_arm): Add prototype.
11647         (init_registers_arm_with_iwmmxt): Likewise.
11648         (the_low_target): Add initializer for arch_setup field.
11649         * linux-cris-low.c (init_registers_cris): Add prototype.
11650         (the_low_target): Add initializer for arch_setup field.
11651         * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
11652         (the_low_target): Add initializer for arch_setup field.
11653         * linux-i386-low.c (init_registers_i386_linux): Add prototype.
11654         (the_low_target): Add initializer for arch_setup field.
11655         * linux-ia64-low.c (init_registers_ia64): Add prototype.
11656         (the_low_target): Add initializer for arch_setup field.
11657         * linux-m32r-low.c (init_registers_m32r): Add prototype.
11658         (the_low_target): Add initializer for arch_setup field.
11659         * linux-m68k-low.c (init_registers_m68k): Add prototype.
11660         (the_low_target): Add initializer for arch_setup field.
11661         * linux-mips-low.c (init_registers_mips_linux): Add prototype.
11662         (init_registers_mips64_linux): Likewise.
11663         (the_low_target): Add initializer for arch_setup field.
11664         * linux-ppc-low.c (init_registers_ppc): Add prototype.
11665         (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
11666         (the_low_target): Add initializer for arch_setup field.
11667         * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
11668         (init_registers_powerpc_64): Likewise.
11669         (the_low_target): Add initializer for arch_setup field.
11670         * linux-s390-low.c (init_registers_s390): Add prototype.
11671         (init_registers_s390x): Likewise.
11672         (the_low_target): Add initializer for arch_setup field.
11673         * linux-sh-low.c (init_registers_sh): Add prototype.
11674         (the_low_target): Add initializer for arch_setup field.
11675         * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
11676         (the_low_target): Add initializer for arch_setup field.
11677         * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
11678         (the_low_target): Add initializer for arch_setup field.
11679
11680         * win32-low.h (struct win32_target_ops): Add arch_setup field.
11681         * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
11682         instead of init_registers ().
11683         * win32-arm-low.c (init_registers_arm): Add prototype.
11684         (the_low_target): Add initializer for arch_setup field.
11685         * win32-i386-low.c (init_registers_i386): Add prototype.
11686         (the_low_target): Add initializer for arch_setup field.
11687
11688         * spu-low.c (init_registers_spu): Add prototype.
11689         (initialize_low): Call initialie_registers_spu () instead of
11690         initialize_registers ().
11691
11692 2008-02-19  Pedro Alves  <pedro@codesourcery.com>
11693
11694         * server.c (handle_v_requests): When handling the vRun and vAttach
11695         packets, if already debugging a process, don't kill it.  Return an
11696         error instead.
11697
11698 2008-02-17  Daniel Jacobowitz  <dan@codesourcery.com>
11699
11700         * server.c (handle_query): Correct length check.
11701
11702 2008-02-14  Pedro Alves  <pedro_alves@portugalmail.pt>
11703
11704         * win32-low.c (do_initial_child_stuff): Add process handle
11705         parameter.  Set current_process_handle and current_process_id from the
11706         parameters. Clear globals.
11707         (win32_create_inferior): Don't set current_process_handle and
11708         current_process_id here.  Instead pass them on the call to
11709         do_initial_child_stuff.
11710         (win32_attach): Likewise.
11711         (win32_clear_inferiors): New.
11712         (win32_kill): Don't close the current process handle or the
11713         current thread handle here.  Instead call win32_clear_inferiors.
11714         (win32_detach): Don't open a new handle to the process.  Call
11715         win32_clear_inferiors.
11716         (win32_join): Don't rely on current_process_handle; open a new
11717         handle using the process id.
11718         (win32_wait): Call win32_clear_inferiors when the inferior process
11719         has exited.
11720
11721 2008-02-14  Daniel Jacobowitz  <dan@codesourcery.com>
11722
11723         * server.c (monitor_show_help): Add "exit".
11724
11725 2008-02-11  Maxim Grigoriev  <maxim2405@gmail.com>
11726
11727         * Makefile.in (SFILES): Add linux-xtensa-low.c.
11728         (clean): Add reg-xtensa.c.
11729         (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
11730         * configure.srv (xtensa*-*-linux*) New target.
11731         * linux-xtensa-low.c: New.
11732         * xtensa-xtregs.c: New.
11733
11734 2008-02-01  Pedro Alves  <pedro_alves@portugalmail.pt>
11735
11736         * hostio.c: Don't include errno.h.
11737         (errno_to_fileio_errno): Move to hostio-errno.
11738         * hostio.c: (hostio_error): Remove the error parameter.  Defer the
11739         error number outputting to the target->hostio_last_error callback.
11740         (hostio_packet_error): Use FILEIO_EINVAL directly.
11741         (handle_open, handle_pread, hostio_error, handle_unlink): Update
11742         calls to hostio_error.
11743         * hostio-errno.c: New.
11744         * server.h (hostio_last_error_from_errno): Declare.
11745         * target.h (target_ops): Add hostio_last_error member.
11746         * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
11747         as hostio_last_error handler.
11748         * spu-low.c (spu_target_ops): Likewise.
11749         * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
11750         (wince_hostio_last_error): New functions.
11751         (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
11752         as hostio_last_error handler.
11753         (win32_target_ops) [!_WIN32_WCE]: Register
11754         hostio_last_error_from_errno as hostio_last_error handler.
11755         * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
11756         (hostio-errno.o): New rule.
11757         * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
11758         * configure.srv (srv_hostio_err_objs): New variable.  Default to
11759         hostio-errno.o.
11760         (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
11761         * configure: Regenerate.
11762
11763 2008-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
11764
11765         * linux-low.c (linux_attach_lwp): Do not _exit after errors.
11766         (linux_kill, linux_detach): Clean up the process list.
11767         * remote-utils.c (remote_open): Improve port number parsing.
11768         (putpkt_binary, input_interrupt): Only send interrupts if the target
11769         is running.
11770         * server.c (extended_protocol): Make static.
11771         (attached): Define earlier.
11772         (exit_requested, response_needed, program_argv): New variables.
11773         (target_running): New.
11774         (start_inferior): Clear attached here.
11775         (attach_inferior): Set attached here.
11776         (require_running): Define.
11777         (handle_query): Use require_running and target_running.  Implement
11778         "monitor exit".
11779         (handle_v_attach, handle_v_run): New.
11780         (handle_v_requests): Use require_running.  Handle vAttach and vRun.
11781         (gdbserver_usage): Update.
11782         (main): Redo argument parsing.  Handle --debug and --multi.  Handle
11783         --attach along with other options or after the port.  Save
11784         program_argv.  Support no initial program.  Resynchronize
11785         communication with GDB after an error.  Handle "monitor exit".
11786         Use require_running and target_running.  Always allow the extended
11787         protocol.  Do not error out for Hc0 or Hc-1.  Do not automatically
11788         restart in extended mode.
11789         * README: Refer to the GDB manual.  Update --attach usage.
11790
11791 2007-12-20  Andreas Schwab  <schwab@suse.de>
11792
11793         * linux-low.c (STACK_SIZE): Define.
11794         (linux_tracefork_child): Use it.  Use __clone2 on ia64.
11795         (linux_test_for_tracefork): Likewise.
11796
11797 2007-12-18  Daniel Jacobowitz  <dan@codesourcery.com>
11798
11799         * linux-low.c (linux_wait_for_event): Update messages.  Do not
11800         reinsert auto-delete breakpoints.
11801         * mem-break.c (struct breakpoint): Change return type of handler to
11802         int.
11803         (set_breakpoint_at): Update handler type.
11804         (reinsert_breakpoint_handler): Return 1 instead of calling
11805         delete_breakpoint.
11806         (reinsert_breakpoint_by_bp): Check for the original breakpoint before
11807         setting a new one.
11808         (check_breakpoints): Delete auto-delete breakpoints and return 2.
11809         * mem-break.h (set_breakpoint_at): Update handler type.
11810         * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
11811         * win32-low.c (auto_delete_breakpoint): New.
11812         (get_child_debug_event): Use it.
11813
11814 2007-12-16  Daniel Jacobowitz  <dan@codesourcery.com>
11815
11816         * configure.ac: Check for pread and pwrite.
11817         * hostio.c (handle_pread): Fall back to lseek and read.
11818         (handle_pwrite): Fall back to lseek and write.
11819         * config.in, configure: Regenerated.
11820
11821 2007-12-07  Daniel Jacobowitz  <dan@codesourcery.com>
11822
11823         * server.c (myresume): Add own_buf argument.
11824         (main): Update calls.
11825
11826 2007-12-06  Daniel Jacobowitz  <dan@codesourcery.com>
11827
11828         * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
11829         * remote-utils.c (remote_open): Do not call disable_async_io.
11830         (block_async_io): Delete.
11831         (unblock_async_io): Make static.
11832         (initialize_async_io): New.
11833         * server.c (handle_v_cont): Handle async I/O here.
11834         (myresume): Likewise.  Move other common resume tasks here...
11835         (main): ... from here.  Call initialize_async_io.  Disable async
11836         I/O before the main loop.
11837         * server.h (initialize_async_io): Declare.
11838         (block_async_io, unblock_async_io): Delete prototypes.
11839         * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
11840
11841 2007-12-06  Mick Davis  <mickd@goanna.iinet.net.au>
11842
11843         * remote-utils.c (readchar): Allow binary data in received messages.
11844
11845 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11846
11847         * win32-low.c (attaching): New global.
11848         (win32_create_inferior): Clear the `attaching' global.
11849         (win32_attach): Set the `attaching' global.
11850         (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
11851         attaching.  Only set a breakpoint at the entry point if not
11852         attaching.
11853
11854 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11855
11856         * server.c (main): Don't report dll events on the initial
11857         connection on attaches.
11858
11859 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11860
11861         * server.c (main): Relax numerical bases supported for the pid of
11862         the --attach command line argument.
11863
11864 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11865
11866         * win32-low.c (win32_attach): Call OpenProcess before
11867         DebugActiveProcess, not after.  Add last error output to error
11868         call.
11869
11870 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11871
11872         * win32-low.c (win32_get_thread_context)
11873         (win32_set_thread_context): New functions.
11874         (thread_rec): Use win32_get_thread_context.
11875         (continue_one_thread, win32_resume): Use win32_set_thread_context.
11876         * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
11877         field.
11878
11879 2007-12-03  Leo Zayas
11880             Pedro Alves  <pedro_alves@portugalmail.pt>
11881
11882         * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
11883         global variables.
11884         (child_add_thread): Minor cleanup.
11885         (child_continue): Resume artificially suspended threads before
11886         calling ContinueDebugEvent.
11887         (suspend_one_thread): New.
11888         (fake_breakpoint_event): New.
11889         (get_child_debug_event): Change return type to int.  Check here if
11890         gdb sent an interrupt request.  If a soft interrupt was requested,
11891         fake a breakpoint event.  Return 0 if there is no event to handle,
11892         and 1 otherwise.
11893         (win32_wait): Don't check here if gdb sent an interrupt request.
11894         Ensure there is a valid event to handle.
11895         (win32_request_interrupt): Add soft interruption method as last
11896         resort.
11897
11898 2007-12-03  Leo Zayas
11899             Pedro Alves  <pedro_alves@portugalmail.pt>
11900
11901         * win32-low.h (win32_thread_info): Add descriptions to the
11902         structure members.  Replace `suspend_count' counter by a
11903         `suspended' flag.
11904         * win32-low.c (thread_rec): Update condition of when to get the
11905         context from the inferior.  Rely on ContextFlags being set if it
11906         has already been retrieved.  Only suspend the inferior thread if
11907         we haven't already.  Warn if that fails.
11908         (continue_one_thread): s/suspend_count/suspended/.  Only call
11909         ResumeThread once.  Warn if that fails.
11910
11911 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
11912
11913         * win32-low.c (win32_wait): Don't read from the inferior when it
11914         has already exited.
11915
11916 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
11917
11918         * Makefile.in (win32_low_h): New variable.
11919         (win32-low.o): Add dependency on $(win32_low_h).
11920         (win32-arm-low.o, win32-i386-low.o): New rules.
11921
11922 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
11923
11924         * hostio.c: Correct copyright year.
11925
11926 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
11927
11928         * Makefile.in (OBS): Add hostio.o.
11929         (hostio.o): New rule.
11930         * server.h (handle_vFile): Declare.
11931         * hostio.c: New file.
11932         * server.c (handle_v_requests): Take packet_len and new_packet_len
11933         for binary packets.  Call handle_vFile.
11934         (main): Update call to handle_v_requests.
11935
11936 2007-11-05  Daniel Jacobowitz  <dan@codesourcery.com>
11937
11938         * linux-low.c: Include <sched.h>.
11939
11940 2007-11-01  Daniel Jacobowitz  <dan@codesourcery.com>
11941
11942         * linux-low.c (linux_tracefork_grandchild): New.
11943         (linux_tracefork_child): Use clone.
11944         (linux_test_for_tracefork): Use clone; allocate and free a stack.
11945
11946 2007-10-31  Joel Brobecker  <brobecker@adacore.com>
11947
11948         * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
11949
11950 2007-10-24  Daniel Jacobowitz  <dan@codesourcery.com>
11951
11952         * linux-low.c (handle_extended_wait): Handle unexpected signals.
11953
11954 2007-10-23  Daniel Jacobowitz  <dan@codesourcery.com>
11955
11956         * inferiors.c (change_inferior_id): Delete.
11957         (add_pid_to_list, pull_pid_from_list): New.
11958         * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
11959         (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
11960         (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
11961         (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
11962         (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
11963         (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
11964         (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
11965         (using_threads): Always set to 1.
11966         (handle_extended_wait): New.
11967         (add_process): Do not set TID.
11968         (linux_create_inferior): Set must_set_ptrace_flags.
11969         (linux_attach_lwp): Remove TID argument.  Do not check using_threads.
11970         Use PTRACE_SETOPTIONS.  Call new_thread_notify.  Update all callers.
11971         (linux_thread_alive): Rename TID argument to LWPID.
11972         (linux_wait_for_process): Handle unknown processes.  Do not use TID.
11973         (linux_wait_for_event): Do not use TID or check using_threads.  Update
11974         call to dead_thread_notify.  Call handle_extended_wait.
11975         (linux_create_inferior): Use PTRACE_SETOPTIONS.
11976         (send_sigstop): Delete sigstop_sent.
11977         (wait_for_sigstop): Avoid TID.
11978         (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
11979         (linux_test_for_tracefork): New.
11980         (linux_lookup_signals): Use thread_db_active and
11981         linux_supports_tracefork_flag.
11982         (initialize_low): Use thread_db_active and linux_test_for_tracefork.
11983         * linux-low.h (get_process_thread): Avoid TID.
11984         (struct process_ifo): Move thread_known and tid to the end.  Remove
11985         sigstop_sent.
11986         (linux_attach_lwp, thread_db_init): Update prototypes.
11987         * server.h (change_inferior_id): Delete prototype.
11988         (add_pid_to_list, pull_pid_from_list): New prototypes.
11989         * thread-db.c (thread_db_use_events): New.
11990         (find_first_thread): Rename to...
11991         (find_one_thread): ...this.  Update callers and messages.  Do not
11992         call fatal.  Check thread_db_use_events.  Do not call
11993         change_inferior_id or new_thread_notify.
11994         (maybe_attach_thread): Update.  Do not call new_thread_notify.
11995         (thread_db_init): Set thread_db_use_events.  Check use_events.
11996         * utils.c (fatal, warning): Correct message prefix.
11997
11998 2007-10-15  Daniel Jacobowitz  <dan@codesourcery.com>
11999
12000         * Makefile.in (clean): Remove new files.
12001         (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
12002         (powerpc-64.o, powerpc-64.c): New rules.
12003         * configure.srv: Use alternate register sets for powerpc64-*-linux*
12004         with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
12005         with SPE.
12006         * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
12007         SPE targets.
12008         (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
12009         (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
12010         (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
12011         (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
12012         (target_regsets): Add AltiVec and SPE register sets.
12013         * configure.ac: Check for AltiVec and SPE.
12014         * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
12015         (ppc_fill_vrregset, ppc_store_vrregset): New.
12016         (target_regsets): Add AltiVec register set.
12017         * configure: Regenerated.
12018
12019 2007-09-19  Daniel Jacobowitz  <dan@codesourcery.com>
12020
12021         * linux-low.c (O_LARGEFILE): Define.
12022         (linux_read_memory): Use /proc/PID/mem.
12023         * configure.ac: Use AC_GNU_SOURCE.  Check for pread64.
12024         * configure, config.in: Regenerated.
12025
12026 2007-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
12027
12028         * linux-low.c (linux_wait_for_event): Do not pass signals while
12029         single-stepping.
12030
12031 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
12032
12033         * win32-low.c (create_process): New.
12034         (win32_create_inferior): Use create_process instead of
12035         CreateProcess.  If create_process failed retry appending an ".exe"
12036         suffix.  Store the GetLastError result immediatelly after
12037         create_process calls and use it on the call to error.
12038
12039 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
12040
12041         * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
12042
12043 2007-08-23  Joel Brobecker  <brobecker@adacore.com>
12044
12045         * configure.ac: Switch license to GPLv3.
12046
12047 2007-08-01  Michael Snyder  <msnyder@access-company.com>
12048
12049         * remote-utils.c (putpkt_binary): Memory leak, free buf2.
12050
12051 2007-07-31  Pedro Alves  <pedro_alves@portugalmail.pt>
12052
12053         * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
12054         typedef.
12055         (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
12056         (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL.  Get
12057         CloseToolhelp32Snapshot.
12058         (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
12059         CloseToolhelp32Snapshot.
12060
12061 2007-07-27  Michael Snyder  <michael.snyder@access-company.com>
12062
12063         * server.c (main): Check for inferior exit before main loop.
12064
12065 2007-07-18  Pedro Alves  <pedro_alves@portugalmail.pt>
12066
12067         * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
12068         instead of on tmp_desc.
12069
12070 2007-07-17  Pedro Alves  <pedro_alves@portugalmail.pt>
12071             Daniel Jacobowitz  <dan@codesourcery.com>
12072
12073         * inferiors.c (all_dlls, dlls_changed, get_dll): New.
12074         (add_thread): Minor cleanups.
12075         (clear_inferiors): Move lower in the file.  Clear the DLL
12076         list.
12077         (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
12078         * remote-utils.c (prepare_resume_reply): Check dlls_changed.
12079         (xml_escape_text): New.
12080         * server.c (handle_query): Handle qXfer:libraries:read.  Report it
12081         for qSupported.
12082         (handle_v_cont): Report errors.
12083         (gdbserver_version): Update.
12084         (main): Correct size of own_buf.  Do not report initial DLL events.
12085         * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
12086         (unloaded_dll, xml_escape_text): New.
12087         * win32-low.c (enum target_waitkind): Update comments.
12088         (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
12089         (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
12090         (win32_EnumProcessModules, win32_GetModuleInformation)
12091         (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
12092         (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
12093         (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
12094         (win32_Module32First, win32_Module32Next, load_toolhelp)
12095         (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
12096         (get_child_debug_event): Handle DLL events.
12097         (win32_wait): Likewise.
12098
12099 2007-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
12100
12101         * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
12102         * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
12103
12104 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
12105
12106         * win32-low.c (handle_output_debug_string): Ignore event if not
12107         waiting.
12108
12109 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
12110
12111         * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
12112
12113 2007-07-03  Daniel Jacobowitz  <dan@codesourcery.com>
12114
12115         * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
12116
12117 2007-07-02  Daniel Jacobowitz  <dan@codesourcery.com>
12118
12119         * inferiors.c (change_inferior_id): Add comment.
12120         * linux-low.c (check_removed_breakpoint): Add an early
12121         prototype.  Improve debug output.
12122         (linux_attach): Doc update.
12123         (linux_detach_one_process, linux_detach): Clean up before releasing
12124         each process.
12125         (send_sigstop, wait_for_sigstop): Improve comments and debug output.
12126         * linux-low.h (struct process_info): Doc improvement.
12127         * mem-break.c (delete_all_breakpoints): New.
12128         * mem-break.h (delete_all_breakpoints): New prototype.
12129         * thread-db.c (find_first_thread): New.
12130         (thread_db_create_event): Call it instead of
12131         thread_db_find_new_threads.  Clean up unused variables.
12132         (maybe_attach_thread): Remove first thread handling.
12133         (thread_db_find_new_threads): Use find_first_thread.
12134         (thread_db_get_tls_address): Likewise.
12135
12136 2007-06-27  Daniel Jacobowitz  <dan@codesourcery.com>
12137
12138         * thread-db.c (thread_db_find_new_threads): Add prototype.
12139         (thread_db_create_event): Check for the main thread before adding
12140         a new thread.
12141         (maybe_attach_thread): Only enable event reporting if TID == 0.
12142         (thread_db_get_tls_address): Check for new threads.
12143
12144 2007-06-20  Daniel Jacobowitz  <dan@codesourcery.com>
12145
12146         * linux-low.c (linux_create_inferior): Try execv before execvp.
12147         * spu-low.c (spu_create_inferior): Likewise.
12148
12149 2007-06-13  Mike Frysinger  <vapier@gentoo.org>
12150
12151         * linux-low.c (linux_create_inferior): Change execv to execvp.
12152         * spu-low.c (spu_create_inferior): Likewies.
12153
12154 2007-06-13  Daniel Jacobowitz  <dan@codesourcery.com>
12155
12156         * Makefile.in (clean): Clean new files instead of deleted ones.
12157         (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
12158         (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
12159         rules.
12160         * configure.srv: Specify XML files and new regformats for MIPS and
12161         MIPS64 GNU/Linux.
12162         * linux-mips-low.c (mips_num_regs): Set to only used registers.
12163         (mips_regmap): Do not fetch $0.  Remove unused registers.  Add
12164         an entry for the restart register.
12165         (mips_cannot_fetch_register, mips_cannot_store_register)
12166         (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
12167         register names to match the XML descriptions.
12168         (mips_fill_gregset, mips_store_gregset): Likewise.  Handle the
12169         restart register instead of $0.
12170
12171 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
12172             Markus Deuling  <deuling@de.ibm.com>
12173
12174         * remote-utils.c (decode_xfer_write): New function.
12175         * server.h (decode_xfer_write): Add prototype.
12176         * server.c (handle_query): Add PACKET_LEN argument.  Support
12177         qXfer:spu:read and qXfer:spu:write packets.
12178         (main): Pass packet_len to handle_query.
12179         * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
12180         * target.h (target_ops): Add qxfer_spu.
12181
12182 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
12183
12184         * spu-low.c (spu_proc_xfer_spu): Do not return failure when
12185         accessing non-seekable spufs files.
12186
12187 2007-05-16  Markus Deuling  <deuling@de.ibm.com>
12188
12189         * server.c (handle_query): Add reply for qC packet.
12190
12191 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
12192             Leo Zayas  <lerele@champenstudios@com>
12193
12194         * server.h (check_remote_input_interrupt_request): New function.
12195         * remote_utils.c (INVALID_DESCRIPTOR): New define.
12196         (remote_desc): Initialize with INVALID_DESCRIPTOR.
12197         (input_interrupt): Expose on USE_WIN32API too.  Fix whitespace.
12198         (check_remote_input_interrupt_request): New function.
12199         * server.h (check_remote_input_interrupt_request): Declare.
12200         * win32-low.c (winapi_DebugBreakProcess,
12201         winapi_GenerateConsoleCtrlEvent): New typedefs.
12202         (get_child_debug_event): Lower Win32 debug event polling from 1 sec
12203         to 250 ms.
12204         (win32_wait): Check for remote interrupt request
12205         with check_remote_input_interrupt_request.
12206         (win32_request_interrupt): New function.
12207         (win32_target_op): Set request_interrupt to win32_request_interrupt.
12208
12209 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
12210
12211         * win32-low.c (debug_registers_changed,
12212         debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
12213         CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
12214         CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
12215         (thread_rec): Get context using the low target.
12216         (child_add_thread): Call thread_added on the low target,
12217         which does the same thing.
12218         (regptr): Delete.
12219         (do_initial_child_stuff): Remove debug registers references.
12220         Set context using the low target.  Resume threads after
12221         setting the contexts.
12222         (child_continue): Remove dead variable.  Remove debug
12223         registers references.
12224         (child_fetch_inferior_registers): Go through the low target.
12225         (do_child_store_inferior_registers): Remove.
12226         (child_store_inferior_registers): Go through the low target.
12227         (win32_resume): Remove debug registers references.
12228         Set context using the low target.
12229         (handle_exception): Change return type to void.  Don't record
12230         context here.  Set status to TARGET_WAITKIND_SPURIOUS on a
12231         first chance exception.
12232         (get_child_debug_event): Change return type to void.  Remove
12233         goto loop.  Always return after waiting for debug event.
12234         (win32_wait): Convert to switch statement.  Handle spurious
12235         events.
12236
12237         * win32-i386-low.c (debug_registers_changed,
12238         debug_registers_used): New.
12239         (initial_stuff): Rename to ...
12240         (i386_initial_stuff): ... this.  Clear debug registers
12241         state variables.
12242         (store_debug_registers): Delete.
12243         (i386_get_thread_context): New.
12244         (load_debug_registers): Delete.
12245         (i386_set_thread_context): New.
12246         (i386_thread_added): New.
12247         (single_step): Rename to ...
12248         (i386_single_step): ... this.
12249         (do_fetch_inferior_registers): Rename to ...
12250         (i386_fetch_inferior_register): ... this.
12251         (i386_store_inferior_register): New.
12252         (the_low_target): Adapt to new interface.
12253
12254         * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
12255         (arm_get_thread_context): New.
12256         (arm_set_thread_context): New.
12257         (regptr): New.
12258         (do_fetch_inferior_registers): Rename to ...
12259         (arm_fetch_inferior_register): ... this.
12260         (arm_store_inferior_register): New.
12261         (arm_wince_breakpoint): Reimplement as unsigned long.
12262         (arm_wince_breakpoint_len): Define.
12263         (the_low_target): Adapt to new interface.
12264
12265         * win32-low.h (target_ops): Remove regmap, store_debug_registers and
12266         load_debug_registers.  Add get_thread_context, set_thread_context,
12267         thread_added and store_inferior_register.  Rename
12268         fetch_inferior_registers to fetch_inferior_register.
12269         (regptr): Remove declaration.
12270
12271 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
12272
12273         * linux-low.c (linux_detach): Change return type to int.  Return 0.
12274         * spu-low.c (spu_detach): Likewise.
12275
12276 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
12277
12278         * target.h (target_ops): Change return type of detach to int.
12279         Add join.
12280         (join_inferior): New.
12281         * server.c (main): Don't skip detach support on mingw32.
12282         If the inferior doesn't support detaching return error.
12283         Call join_inferior instead of using waitpid.
12284         * linux-low.c (linux_join): New.
12285         (linux_target_op): Add linux_join.
12286         * spu-low.c (spu_join): New.
12287         (spu_target_ops): Add spu_join.
12288         * win32-low.c (win32_detach): Adapt to new interface.
12289         Reopen current_process_handle before detaching.  Issue a child
12290         resume before detaching.
12291         (win32_join): New.
12292         (win32_target_op): Add win32_join.
12293
12294 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
12295
12296         * win32-low.c (win32-attach): Fix return value.
12297         * target.h (target_ops): Describe ATTACH return values.
12298
12299 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
12300
12301         * win32-low.c (GETPROCADDRESS): Define.
12302         (winapi_DebugActiveProcessStop): Add WINAPI.  typedef as pointer.
12303         (winapi_DebugSetProcessKillOnExit): Likewise.
12304         (win32_create_inferior): Force usage of ansi CreateProcessA.
12305         (win32_attach): Use GETPROCADDRESS.
12306         (win32_detach): Likewise.
12307
12308 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
12309
12310         * win32-low.c (win32_wait): Don't use WSTOPSIG.
12311
12312 2007-03-30  Pedro Alves  <pedro_alves@portugalmail.pt>
12313
12314         * win32-low.c: Commit leftover changes from 2007-03-29.
12315
12316 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
12317
12318         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
12319         fields short instead of int.  Add explicit padding.
12320         (i387_cache_to_fsave): Remove unnecessary casts.
12321         (i387_fsave_to_cache): Doc fix.
12322         (i387_cache_to_fxsave): Remove unnecessary casts and masking.
12323
12324 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
12325
12326         * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
12327         (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
12328
12329 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
12330
12331         * configure.srv (arm*-*-mingw32ce*): Move near the other
12332         arm targets.
12333
12334 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
12335
12336         * configure.ac: Add errno checking.
12337         (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
12338         sys/file.h and malloc.h.
12339         (AC_CHECK_DECLS): Add perror.
12340         (srv_mingwce): Handle.
12341         * configure.srv (i[34567]86-*-cygwin*): Add
12342         win32-i386-low.o to srv_tgtobj.
12343         (i[34567]86-*-mingw*): Likewise.
12344         (arm*-*-mingw32ce*): Add case.
12345         * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12346         HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
12347         [__MINGW32CE__] (strerror): New function.
12348         [__MINGW32CE__] (errno): Define to GetLastError.
12349         [__MINGW32CE__] (COUNTOF): New macro.
12350         (remote_open): Remove extra close call.
12351         * mem-break.c (delete_breakpoint_at): New function.
12352         * mem-break.h (delete_breakpoint_at): Declare.
12353         * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12354         HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
12355         [USE_WIN32API] (read, write): Add char* casts.
12356         * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
12357         * server.h: Include wincecompat.h on Windows CE.
12358         [HAVE_ERRNO_H]: Check.
12359         (perror): Declare if not declared.
12360         * utils.c: Add stdlib.h, errno.h and malloc.h includes.
12361         (perror_with_name): Remove errno declaration.
12362         * wincecompat.h: New.
12363         * wincecompat.c: New.
12364         * win32-low.h: New.
12365         * win32-arm-low.c: New.
12366         * win32-i386-low.c: New.
12367         (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
12368         (OUTMSG2): Make it safe.
12369         (_T): New macro.
12370         (COUNTOF): New macro.
12371         (NUM_REGS): Get it from the low target.
12372         (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
12373         CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
12374         (thread_rec): Let low target handle debug registers.
12375         (child_add_thread): Likewise.
12376         (child_init_thread_list): Likewise.
12377         (continue_one_thread): Likewise.
12378         (regptr): New.
12379         (do_child_fetch_inferior_registers): Move to ...
12380         * win32-i386-low.c: ... here, and rename to ...
12381         (do_fetch_inferior_registers): ... this.
12382         * win32-low.c (child_fetch_inferior_registers):
12383         Go through the low target.
12384         (do_child_store_inferior_registers): Use regptr.
12385         (strwinerror): New function.
12386         (win32_create_inferior): Handle Windows CE.
12387         Use strwinerror instead of strerror on Windows error
12388         codes.  Add program to the error output.
12389         Don't close the main thread handle on Windows CE.
12390         (win32_attach): Use coredll.dll on Windows CE.
12391         (win32_kill): Close current process and current
12392         thread handles.
12393         (win32_detach): Use coredll.dll on Windows CE.
12394         (win32_resume): Let low target handle debug registers, and
12395         step request.
12396         (handle_exception): Add/Remove initial breakpoint.  Avoid
12397         non-existant WSTOPSIG on Windows CE.
12398         (win32_read_inferior_memory): Cast to remove warning.
12399         (win32_arch_string): Go through the low target.
12400         (initialize_low): Call set_breakpoint_data with the low
12401         target's breakpoint.
12402         * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
12403         FOP_REGNUM, mappings): Move to ...
12404         * win32-i386-low.c: ... here.
12405         * win32-low.c (win32_thread_info): Move to ...
12406         * win32-low.h: ... here.
12407         * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
12408         win32-arm-low.c and wincecompat.c.
12409         (all:): Add $EXEEXT.
12410         (install-only:): Likewise.
12411         (gdbserver:): Likewise.
12412         (gdbreplay:): Likewise.
12413         * config.in: Regenerate.
12414         * configure: Regenerate.
12415
12416 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
12417
12418         * win32-low.c: Rename typedef thread_info to
12419         win32_thread_info throughout.
12420
12421 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
12422
12423         * win32-i386-low.c: Rename to ...
12424         * win32-low.c: ... this.
12425         * configure.srv: Replace win32-i386-low.o with win32-low.o.
12426         * Makefile.in: Likewise.
12427
12428 2007-03-27  Pedro Alves  <pedro_alves@portugalmail.pt>
12429
12430         * remote-utils.c (monitor_output): Constify msg parameter.
12431         * server.h (monitor_output): Likewise.
12432         * win32-i386-low.c (handle_output_debug_string): New.
12433         (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
12434         handle_output_debug_string.
12435         (get_child_debug_event): Likewise.
12436
12437 2007-03-27  Mat Hostetter  <mat@lcs.mit.edu>
12438
12439         * server.c (main): Correct strtoul check.
12440
12441 2007-03-27  Jon Ringle  <jon@ringle.org>
12442
12443         * linux-low.c: Check __ARCH_HAS_MMU__ also.
12444
12445 2007-03-27  Brooks Moses  <brooks.moses@codesourcery.com>
12446
12447         * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
12448
12449 2007-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
12450
12451         * terminal.h: Check HAVE_SGTTY_H.
12452
12453 2007-02-27  Mat Hostetter  <mat@lcs.mit.edu>
12454
12455         * remote-utils.c (remote_open): Print out the assigned port number.
12456
12457 2007-02-26  Daniel Jacobowitz  <dan@codesourcery.com>
12458
12459         * remote-utils.c (monitor_output): New function.
12460         * server.c (debug_threads): Define here.
12461         (monitor_show_help): New function.
12462         (handle_query): Handle qRcmd.
12463         (main): Do not handle 'd' packet.
12464         * server.h (debug_threads, remote_debug, monitor_output): Declare.
12465         * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
12466         of debug_threads.
12467
12468 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
12469
12470         * Makefile.in (EXEEXT): New.
12471         (clean): Use $(EXEEXT).
12472
12473 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
12474
12475         * target.h (target_ops): Rename send_signal to request_interrupt,
12476         and remove enum target_signal parameter.
12477         * linux-low.c (linux_request_interrupt): Rename from
12478         linux_send_signal, and always send SIGINT.
12479         * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
12480         and always send SIGINT.
12481         * remote-utils.c (putpkt_binary): Call request_interrupt, instead
12482         of send_signal.
12483         (input_interrupt): Likewise.
12484
12485 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
12486
12487         * server.c (get_features_xml): Check if target implemented
12488         arch_string.
12489         * win32-i386-low.c (win32_arch_string): New.
12490         (win32_target_ops): Add win32_arch_string as arch_string member.
12491
12492 2007-02-22  Markus Deuling  <deuling@de.ibm.com>
12493
12494         * spu-low.c (spu_arch_string): New.
12495         (spu_target_ops): Add spu_arch_string.
12496
12497 2007-02-16  Daniel Jacobowitz  <dan@codesourcery.com>
12498
12499         * remote-utils.c: Remove HAVE_TERMINAL_H check.
12500         * configure.ac: Do not check for terminal.h.
12501         * configure, config.in: Regenerated.
12502
12503 2007-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
12504
12505         * Makefile.in (OBS): Add $(XML_BUILTIN).
12506         (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
12507         (clean): Update.
12508         (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
12509         (arm-with-iwmmxt.c): New.
12510         * config.in, configure: Regenerate.
12511         * configure.ac: Check for iWMMXt.  Handle srv_xmltarget,
12512         srv_xmlbuiltin, and srv_xmlfiles.  Define USE_XML.
12513         * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
12514         (arm*-*-linux*): Add iWMMXt and regset support.
12515         * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
12516         (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
12517         (arm_store_wmmxregset, target_regsets): New.
12518         * server.c (get_features_xml): Take annex argument.  Check builtin
12519         XML documents.
12520         (handle_query): Handle multiple annexes.
12521
12522 2007-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
12523
12524         * remote-utils.c [USE_WIN32API] (read, write): Define.
12525         (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
12526         write.
12527
12528 2007-01-09  Daniel Jacobowitz  <dan@codesourcery.com>
12529
12530         * linux-i386-low.c (the_low_target): Set arch_string.
12531         * linux-x86-64-low.c (the_low_target): Likewise.
12532         * linux-low.c (linux_arch_string): New.
12533         (linux_target_ops): Add it.
12534         * linux-low.h (struct linux_target_ops): Add arch_string.
12535         * server.c (write_qxfer_response): Use const void * for DATA.
12536         (get_features_xml): New.
12537         (handle_query): Handle qXfer:features:read.  Report it for qSupported.
12538         * target.h (struct target_ops): Add arch_string method.
12539
12540 2007-01-03  Denis Pilat  <denis.pilat@st.com>
12541             Daniel Jacobowitz  <dan@codesourcery.com>
12542
12543         * linux-low.c (linux_kill): Handle being called with no threads.
12544         * win32-i386-low.c (win32_kill): Likewise.
12545         (get_child_debug_event): Clear current_process_handle.
12546
12547 2006-12-30  Denis PILAT  <denis.pilat@st.com>
12548             Daniel Jacobowitz  <dan@codesourcery.com>
12549
12550         * remote-utils.c (remote_open): Check the type of specified
12551         serial port devices before opening them.
12552         * server.c (main): Kill the inferior if an error occurs during
12553         the first remote_open.
12554
12555 2006-12-05  Markus Deuling  <deuling@de.ibm.com>
12556
12557         * README: Update supported targets.
12558
12559 2006-11-28  Daniel Jacobowitz  <dan@codesourcery.com>
12560
12561         * Makefile.in (clean): Remove reg-mips64.c.
12562         (reg-mips64.c, reg-mips64.o): New rules.
12563         * configure.srv: Handle mips64.  Include regset support for mips.
12564         * linux-mips-low.c (union mips_register): New.
12565         (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
12566         (mips_breakpoint, mips_breakpoint_at): Use int.
12567         (mips_collect_register, mips_supply_register)
12568         (mips_collect_register_32bit, mips_supply_register_32bit)
12569         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12570         (mips_store_fpregset, target_regsets): New.
12571         * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
12572
12573 2006-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
12574
12575         * configure.srv: Add target "spu*-*-*".
12576         * Makefile.in (clean): Remove reg-spu.c.
12577         (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
12578         * spu-low.c: New file.
12579
12580 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
12581
12582         * configure.ac: Correct td_thr_tls_get_addr test.
12583         * configure: Regenerated.
12584
12585 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
12586
12587         * linux-low.c (linux_wait_for_event): Reformat.  Use the
12588         pass_signals array.
12589         * remote-utils.c (decode_address_to_semicolon): New.
12590         * server.c (pass_signals, handle_general_set): New.
12591         (handle_query): Mention QPassSignals for qSupported.
12592         (main): Call handle_general_set.
12593         * server.h (pass_signals, decode_address_to_semicolon): New.
12594
12595 2006-11-06  Daniel Jacobowitz  <dan@codesourcery.com>
12596
12597         * server.c (handle_query): Correct error handling for read_auxv.
12598
12599 2005-10-19  Ulrich Weigand  <uweigand@de.ibm.com>
12600
12601         * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
12602         and srv_linux_thread_db to yes.
12603         * linux-s390-low.c (s390_fill_gregset): New function.
12604         (target_regsets): Define data structure.
12605
12606 2006-10-17  Daniel Jacobowitz  <dan@codesourcery.com>
12607
12608         * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
12609         * configure.ac: Use it.  Define HAVE_TD_THR_TLS_GET_ADDR.
12610         * config.in, configure: Regenerated.
12611         * inferiors.c (gdb_id_to_thread): New function.
12612         (gdb_id_to_thread_id): Use it.
12613         * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
12614         * linux-low.h (struct process_info): Add th member.
12615         (thread_db_get_tls_address): New prototype.
12616         * remote-utils.c (decode_address): Make non-static.
12617         * server.c (handle_query): Handle qGetTLSAddr.
12618         * server.h (gdb_id_to_thread, decode_address): New prototypes.
12619         * target.h (struct target_ops): Add get_tls_address.
12620         * thread-db.c (maybe_attach_thread): Save the thread handle.
12621         (thread_db_get_tls_address): New.
12622
12623 2006-09-28  Daniel Jacobowitz  <dan@codesourcery.com>
12624
12625         * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
12626         (linux_resume_one_process): Take a siginfo_t *.  Update all
12627         callers.  Queue it if necessary.  Use PTRACE_SETSIGINFO.
12628         (struct pending_signals): Add a siginfo_t.
12629         (linux_wait_for_process): Always set last_status.
12630         (linux_wait_for_event): Use PTRACE_GETSIGINFO.
12631         (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
12632         * linux-low.h (struct process_info): Add last_status.
12633
12634 2006-09-21  Daniel Jacobowitz  <dan@codesourcery.com>
12635
12636         * remote-utils.c (try_rle): New function.
12637         (putpkt_binary): Use it.
12638
12639 2006-08-19  Daniel Jacobowitz  <dan@codesourcery.com>
12640
12641         * Makefile.in (clean): Clean reg-x86-64-linux.c.
12642         (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
12643         * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
12644         * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
12645         (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
12646         point registers.
12647
12648 2006-08-08  Richard Sandiford  <richard@codesourcery.com>
12649
12650         * server.c (terminal_fd): New variable.
12651         (old_foreground_pgrp): Likewise.
12652         (restore_old_foreground_pgrp): New function.
12653         (start_inferior): Record the terminal file descriptor in terminal_fd
12654         and its original foreground group in old_foreground_pgrp.  Register
12655         restore_old_foreground_pgrp with atexit().
12656
12657 2006-07-26  Daniel Jacobowitz  <dan@codesourcery.com>
12658
12659         * server.c (handle_query): Correct qPart to qXfer.
12660
12661 2006-07-22  Daniel Jacobowitz  <dan@codesourcery.com>
12662
12663         * configure.ac: Check for more headers which are missing on
12664         Windows.  Automatically supply -lwsock32 and USE_WIN32API.
12665         * configure.srv: Add Cygwin and mingw32.
12666         * remote-utils.c: Don't include headers unconditionally which
12667         are missing on mingw32.  Include <winsock.h> for mingw32.
12668         (remote_open): Adjust for mingw32 support.  Flush
12669         standard error after writing to it.
12670         (remote_close, putpkt_binary, input_interrupt, block_async_io)
12671         (unblock_async_io, enable_async_io, disable_async_io)
12672         (readchar, getpkt): Update for Winsock support.
12673         (prepare_resume_reply): Expect a protocol signal number.
12674         * server.c: Disable <sys/wait.h> on mingw32.
12675         (start_inferior): Adjust for mingw32 support.  Flush
12676         standard error after writing to it.
12677         (attach_inferior): Likewise.  Use protocol signal
12678         numbers.
12679         (main): Skip 'D' packet on mingw32.  Use protocol signal numbers
12680         and names.
12681         * win32-i386-low.c: New file.
12682         * Makefile.in (XM_CLIBS): Set.
12683         (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
12684         (win32-i386-low.o): New dependency rule.
12685         * linux-low.c (linux_wait): Use target signal numbers.
12686         * target.h (struct target_ops): Doc fix.
12687         * server.h (target_signal_to_name): New prototype.
12688         * gdbreplay.c: Don't include headers unconditionally which
12689         are missing on mingw32.  Include <winsock.h> for mingw32.
12690         (remote_close, remote_open): Adjust for Winsock support.
12691         * configure, config.in: Regenerated.
12692
12693 2006-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
12694
12695         * server.c (decode_xfer_read, write_qxfer_response): New.
12696         (handle_query): Take a packet length argument.  Handle
12697         qXfer:auxv:read instead of qPart:auxv:read.  Mention it in
12698         the qSupported response.
12699         (main): Update call to handle_query.
12700
12701 2006-06-22  Daniel Jacobowitz  <dan@codesourcery.com>
12702
12703         * remote-utils.c (remote_escape_output, remote_unescape_input): New.
12704         (putpkt_binary): Renamed from putpkt and adjusted for binary
12705         data.
12706         (putpkt): New wrapper for putpkt_binary.
12707         (readchar): Don't mask off the high bit.
12708         (decode_X_packet): New function.
12709         * server.c (main): Call putpkt_binary if a handler sets the packet
12710         length.  Save the length of the incoming packet.  Handle 'X'.
12711         * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
12712
12713 2006-06-21  Daniel Jacobowitz  <dan@codesourcery.com>
12714
12715         * server.c (handle_query): Handle qSupported.
12716
12717 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
12718
12719         * remote-utils.c (all_symbols_looked_up): New variable.
12720         (look_up_one_symbol): Check it.
12721         * server.h (look_up_one_symbol): New declaration.
12722         * thread-db.c (thread_db_init): Set all_symbols_looked_up.
12723
12724 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
12725
12726         * Makefile.in (linux-arm-low.o): Update dependencies.
12727         * linux-arm-low.c: Include "gdb_proc_service.h".
12728         (PTRACE_GET_THREAD_AREA): Define.
12729         (ps_get_thread_area): New function.
12730
12731 2006-05-09  Nathan Sidwell  <nathan@codesourcery.com>
12732
12733         * configure.srv (m68k*-*-uclinux*): New target.
12734         * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
12735         (linux_resume_one_process): Remove extraneous cast.
12736         (linux_read_offsets): New.
12737         (linux_target_op): Add linux_read_offsets on mmuless systems.
12738         * server.c (handle_query): Add qOffsets logic.
12739         * target.h (struct target_ops): Add read_offsets.
12740
12741 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
12742
12743         * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
12744         (PTRACE_GET_THREAD_AREA): Define.
12745         (ps_get_thread_area): New function.
12746         * Makefile.in (linux-i386-low.o, linux-mips-low.o)
12747         (linux-x86-64-low.o): Update.
12748
12749 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
12750
12751         * configure.ac: Remove checks for prfpregset_t.
12752         * gdb_proc_service.h: New file.
12753         * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
12754         new "gdb_proc_service.h".
12755         * proc-service.c: Likewise.
12756         (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
12757         (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
12758         * Makefile.in (gdb_proc_service_h): Updated.
12759         * configure, config.in: Regenerated.
12760
12761 2006-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
12762
12763         * remote-utils.c (prepare_resume_reply): Move declaration
12764         of gdb_id_from_wait to the top of the block.
12765
12766 2006-02-15  Daniel Jacobowitz  <dan@codesourcery.com>
12767
12768         * linux-low.c (regsets_store_inferior_registers): Read the regset
12769         from the target before filling it.
12770
12771 2006-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
12772
12773         * server.c (attach_inferior): Return SIGTRAP for a successful
12774         attach.
12775
12776 2006-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
12777
12778         * Makefile.in (OBS): Add version.o.
12779         (STAGESTUFF): Delete.
12780         (version.o): Add dependencies.
12781         (version.c): Replace rule.
12782         (clean): Remove version.c.
12783         * server.c (gdbserver_version): New.
12784         (gdbserver_usage): Use printf.
12785         (main): Handle --version and --help.
12786         * server.h (version, host_name): Add declarations.
12787
12788 2005-12-23  Eli Zaretskii  <eliz@gnu.org>
12789
12790         * linux-arm-low.c:
12791         * linux-arm-low.c:
12792         * inferiors.c:
12793         * i387-fp.h:
12794         * i387-fp.c:
12795         * gdbreplay.c:
12796         * regcache.c:
12797         * proc-service.c:
12798         * mem-break.h:
12799         * mem-break.c:
12800         * linux-x86-64-low.c:
12801         * linux-sh-low.c:
12802         * linux-s390-low.c:
12803         * linux-ppc64-low.c:
12804         * linux-ppc-low.c:
12805         * linux-mips-low.c:
12806         * linux-m68k-low.c:
12807         * linux-m32r-low.c:
12808         * linux-low.h:
12809         * linux-low.c:
12810         * linux-ia64-low.c:
12811         * linux-i386-low.c:
12812         * linux-crisv32-low.c:
12813         * thread-db.c:
12814         * terminal.h:
12815         * target.h:
12816         * target.c:
12817         * server.h:
12818         * server.c:
12819         * remote-utils.c:
12820         * regcache.h:
12821         * utils.c:
12822         * Makefile.in:
12823         * configure.ac:
12824         * gdbserver.1: Add (C) after Copyright.  Update the FSF
12825         address.
12826
12827 2005-11-13  Daniel Jacobowitz  <dan@codesourcery.com>
12828
12829         * linux-arm-low.c (arm_eabi_breakpoint): New variable.
12830         (arm_breakpoint_at): Recognize both breakpoints.
12831         (the_low_target): Use the correct breakpoint instruction.
12832
12833 2005-11-02  Daniel Jacobowitz  <dan@codesourcery.com>
12834
12835         * configure.srv (x86_64-*-linux*): Turn on thread_db support.
12836         * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
12837         (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
12838         (the_low_target): Update.
12839
12840 2005-10-25  Andreas Schwab  <schwab@suse.de>
12841
12842         * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
12843
12844         * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
12845         (ia64_num_regs): Reduce to 462.
12846
12847 2005-09-17  Daniel Jacobowitz  <dan@codesourcery.com>
12848
12849         * acinclude.m4: Correct quoting.
12850         * aclocal.m4: Regenerated.
12851
12852         Suggested by SZOKOVACS Robert <szo@ies.hu>:
12853         * thread-db.c (thread_db_err_str): Handle TD_VERSION.
12854         (thread_db_init): Call thread_db_err_str.
12855         * configure.ac: Check for TD_VERSION.
12856         * config.in, configure: Regenerated.
12857
12858 2005-07-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12859
12860         * server.h (error, fatal, warning): Add ATTR_FORMAT.
12861
12862 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
12863
12864         * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
12865         is not available.  Define HAVE_PTRACE_GETREGS if it is.
12866         * config.in, configure: Regenerated.
12867         * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
12868         * linux-i386-low.c, linux-m68k-low.c: Update to use
12869         HAVE_PTRACE_GETREGS.
12870         * linux-low.c (regsets_fetch_inferior_registers)
12871         (regsets_store_inferior_registers): Only return 0 if we processed
12872         GENERAL_REGS.
12873         * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
12874         * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
12875
12876 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
12877
12878         * inferiors.c (struct thread_info): Add gdb_id.
12879         (add_thread): Add gdb_id argument.
12880         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
12881         * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
12882         calls to add_thread.
12883         * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
12884         * server.c (handle_query): Use thread_to_gdb_id.
12885         (handle_v_cont, main): Use gdb_id_to_thread_id.
12886         * server.h (add_thread): Update prototype.
12887         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
12888         prototypes.
12889
12890 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
12891
12892         * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
12893         left-padded registers.
12894         * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
12895         * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
12896
12897 2005-07-01  Steve Ellcey  <sje@cup.hp.com>
12898
12899         * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
12900         * configure: Regenerate.
12901         * config.in: Regenerate.
12902         * server.h (NEED_DECLARATION_STRERROR):
12903         Replace with !HAVE_DECL_STRERROR.
12904
12905 2005-06-16  Daniel Jacobowitz  <dan@codesourcery.com>
12906
12907         * linux-low.c (linux_wait, linux_send_signal): Don't test
12908         an unsigned long variable for > 0 if it could be MAX_ULONG.
12909         * server.c (myresume): Likewise.
12910         * target.c (set_desired_inferior): Likewise.
12911
12912 2005-06-13  Mark Kettenis  <kettenis@gnu.org>
12913
12914         * configure.ac: Simplify and improve check for socklen_t.
12915         * configure, config.in: Regenerate.
12916
12917 2005-06-12  Daniel Jacobowitz  <dan@codesourcery.com>
12918
12919         * acconfig.h: Remove.
12920         * configure.ac: Add a test for socklen_t.  Use three-argument
12921         AC_DEFINE throughout.
12922         * config.in: Regenerated using autoheader 2.59.
12923         * configure: Regenerated.
12924
12925         * gdbreplay.c (socklen_t): Provide a default.
12926         (remote_open): Use socklen_t.
12927         * remote-utils.c (socklen_t): Provide a default.
12928         (remote_open): Use socklen_t.
12929         (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
12930         unsigned char.
12931
12932         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
12933         char for buffers.
12934         * linux-low.c (linux_read_memory, linux_write_memory)
12935         (linux_read_auxv): Likewise.
12936         * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
12937         (check_mem_write): Likewise.
12938         * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
12939         Likewise.
12940         * regcache.c (struct inferior_rgcache_data, registers_to_string)
12941         (registers_from_string, register_data): Likewise.
12942         * server.c (handle_query, main): Likewise.
12943         * server.h (convert_ascii_to_int, convert_int_to_ascii)
12944         (decode_M_packet): Likewise.
12945         * target.c (read_inferior_memory, write_inferior_memory): Likewise.
12946         * target.h (struct target_ops): Update read_memory, write_memory,
12947         and read_auxv.
12948         (read_inferior_memory, write_inferior_memory): Update.
12949         * linux-low.h (struct linux_target_ops): Change type of breakpoint
12950         to unsigned char *.
12951         * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
12952         linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
12953         linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
12954         linux-s390-low.c, linux-sh-low.c: Update for changes in
12955         read_inferior_memory and the_low_target->breakpoint.
12956
12957 2005-05-28  Daniel Jacobowitz  <dan@codesourcery.com>
12958
12959         * Makefile.in (SFILES): Add linux-ppc64-low.c.
12960         (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
12961         * configure.srv: Add powerpc64-*-linux*.
12962         * linux-ppc64-low.c: New file.
12963
12964 2005-05-23  Orjan Friberg  <orjanf@axis.com>
12965
12966         * linux-cris-low.c: New file with support for CRIS.
12967         * linux-crisv32-low.c: Ditto for CRISv32.
12968         * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
12969         (clean): Add reg-cris.c and reg-crisv32.c.
12970         Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
12971         reg-crisv32.o, and reg-crisv32.c to make rules.
12972         * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
12973         recognized targets.
12974
12975 2005-05-16  Ulrich Weigand  <uweigand@de.ibm.com>
12976
12977         * linux-low.c (fetch_register): Ensure buffer size is a multiple
12978         of sizeof (PTRACE_XFER_TYPE).
12979         (usr_store_inferior_registers): Likewise.  Zero out excess bytes.
12980
12981 2005-05-12  Orjan Friberg  <orjanf@axis.com>
12982
12983         * target.h (struct target_ops): Add insert_watchpoint,
12984         remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
12985         pointers for hardware watchpoint support.
12986         * linux-low.h (struct linux_target_ops): Ditto.
12987         * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
12988         (linux_stopped_by_watchpoint, linux_stopped_data_address): New.  Add
12989         to linux_target_ops.
12990         * remote-utils.c (prepare_resume_reply): Add watchpoint information to
12991         reply packet.
12992         * server.c (main): Recognize 'Z' and 'z' packets.
12993
12994 2005-05-10  Ulrich Weigand  <uweigand@de.ibm.com>
12995
12996         * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
12997         (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
12998         (the_low_target): Add new members.
12999
13000 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
13001
13002         * proc-service.c (ps_lgetregs): Search all_processes instead of
13003         all_threads.
13004
13005 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
13006
13007         * server.c (start_inferior): Change return type to int.
13008         (attach_inferior): Change sigptr to int *.
13009         (handle_v_cont, handle_v_requests): Change signal to int *.
13010         (main): Change signal to int.
13011
13012 2005-04-15  Kei Sakamoto  <sakamoto.kei@renesas.com>
13013
13014         * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
13015         * configure.srv: Add m32r*-*-linux*.
13016         * linux-m32r-low.c: New file.
13017
13018 2005-03-04  Daniel Jacobowitz  <dan@codesourcery.com>
13019
13020         * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
13021
13022 2005-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
13023
13024         * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
13025         Take unsigned long arguments for PIDs.
13026         * linux-low.c (add_process, linux_attach_lwp, linux_attach)
13027         (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
13028         (wait_for_sigstop, linux_resume_one_process)
13029         (regsets_fetch_inferior_registers, linux_send_signal)
13030         (linux_read_auxv): Likewise.  Update the types of variables holding
13031         PIDs.  Update format string specifiers.
13032         * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
13033         * remote-utils.c (prepare_resume_reply): Likewise.
13034         * server.c (cont_thread, general_thread, step_thread)
13035         (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
13036         unsigned long.
13037         (handle_query): Update format specifiers.
13038         (handle_v_cont, main): Use strtoul for thread IDs.
13039         * server.h (struct inferior_list_entry): Use unsigned long for ID.
13040         (add_thread, find_inferior_id, change_inferior_id, cont_thread)
13041         (general_thread, step_thread, thread_from_wait)
13042         (old_thread_from_wait): Update.
13043         * target.h (struct thread_resume): Use unsigned long for THREAD.
13044         (struct target_ops): Use unsigned long for arguments to attach and
13045         thread_alive.
13046
13047 2005-02-24  Daniel Jacobowitz  <dan@codesourcery.com>
13048
13049         * acinclude.m4: Include bfd/bfd.m4 directly.
13050         * configure.ac: Use AC_ARG_PROGRAM.  Suggested by Aron Griffis
13051         <agriffis@toolchain.org>.
13052         * aclocal.m4, configure: Regenerated.
13053
13054 2005-01-07  Andrew Cagney  <cagney@gnu.org>
13055
13056         * configure.ac: Rename configure.in, require autoconf 2.59.
13057         * configure: Re-generate.
13058
13059 2004-12-08  Daniel Jacobowitz  <dan@debian.org>
13060
13061         * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area.  Reset
13062         LIBS when finished.
13063         * aclocal.m4: Regenerated.
13064         * configure: Regenerated.
13065
13066 2004-11-21  Andreas Schwab  <schwab@suse.de>
13067
13068         * linux-m68k-low.c (m68k_num_gregs): Define.
13069         (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
13070         (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
13071         (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
13072         (m68k_breakpoint_at): New.  Add to the_low_target.
13073
13074         * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
13075         srv_linux_thread_db to yes.
13076
13077 2004-10-20  Joel Brobecker  <brobecker@gnat.com>
13078
13079         * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
13080         (ARCH_SET_FS): Likewise.
13081         (ARCH_GET_FS): Likewise.
13082         (ARCH_GET_GS): Likewise.
13083
13084 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
13085
13086         * linux-i386-low.c (ps_get_thread_area): New.
13087         * linux-x86-64-low.c (ps_get_thread_area): New.
13088         * linux-low.c: Include <sys/syscall.h>.
13089         (linux_kill_one_process): Don't kill the first thread here.
13090         (linux_kill): Kill the first thread here.
13091         (kill_lwp): New function.
13092         (send_sigstop, linux_send_signal): Use it.
13093         * proc-service.c: Clean up #ifdefs.
13094         (fpregset_info): Delete.
13095         (ps_lgetregs): Update and enable implementation.
13096         (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
13097         implementations.
13098         * remote-utils.c (struct sym_cache, symbol_cache): New.
13099         (input_interrupt): Print a clearer message.
13100         (async_io_enabled): New variable.
13101         (enable_async_io, disable_async_io): Use it.  Update comments.
13102         (look_up_one_symbol): Use the symbol cache.
13103         * thread-db.c (thread_db_look_up_symbols): New function.
13104         (thread_db_init): Update comments.  Call thread_db_look_up_symbols.
13105
13106 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
13107
13108         * configure.in: Test for -rdynamic.
13109         * configure: Regenerated.
13110         * Makefile (INTERNAL_LDFLAGS): New.
13111         (gdbserver, gdbreplay): Use it.
13112
13113 2004-09-02  Andrew Cagney  <cagney@gnu.org>
13114
13115         * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
13116
13117 2004-03-23  Daniel Jacobowitz  <drow@mvista.com>
13118
13119         * linux-low.c (linux_wait): Clear all_processes list also.
13120
13121 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
13122
13123         * linux-low.c: Include <errno.h>.  Remove extern declaration of
13124         errno.
13125
13126 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
13127
13128         * gdbreplay.c, server.h, utils.c: Update copyright years.
13129
13130 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
13131
13132         * server.c (main): Print child status or termination signal from
13133         variable 'signal', not 'sig'.
13134
13135 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
13136
13137         * linux-low.c (linux_read_memory): Change return type to
13138         int.  Check for and return error from ptrace().
13139         * target.c (read_inferior_memory): Change return type to int.  Pass
13140         back return status from the_target->read_memory().
13141         * target.h (struct target_ops): Adapt *read_memory() prototype.
13142         Update comment.
13143         (read_inferior_memory): Adapt prototype.
13144         * server.c (main): Return an error packet if
13145         read_inferior_memory() returns an error.
13146
13147 2004-03-04  Daniel Jacobowitz  <drow@mvista.com>
13148
13149         * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
13150         Unify with other clean targets.
13151
13152 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
13153
13154         * server.c (handle_v_cont): Call set_desired_inferior.
13155
13156 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
13157
13158         * remote-utils.c (prepare_resume_reply): Always supply "thread:".
13159
13160 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
13161
13162         * linux-low.c (linux_wait): Unblock async I/O.
13163         (linux_resume): Block and enable async I/O.
13164         * remote-utils.c (block_async_io, unblock_async_io): New functions.
13165         * server.h (block_async_io, unblock_async_io): Add prototypes.
13166
13167 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
13168
13169         * remote-utils.c (remote_open): Print a status notice after
13170         opening a TCP port.
13171         * server.c (attach_inferior): Print a status notice after
13172         attaching.
13173
13174 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
13175
13176         * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
13177
13178 2004-02-26  Daniel Jacobowitz  <drow@mvista.com>
13179
13180         * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
13181         error packet.
13182         * server.c, target.h: Update copyright years.
13183
13184 2004-02-25  Roland McGrath  <roland@redhat.com>
13185
13186         * target.h (struct target_ops): New member `read_auxv'.
13187         * server.c (handle_query): Handle qPart:auxv:read: query using that.
13188         * linux-low.c (linux_read_auxv): New function.
13189         (linux_target_ops): Initialize `read_auxv' member to that.
13190
13191 2004-02-17  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
13192
13193         Committed by Jim Blandy  <jimb@redhat.com>.
13194
13195         * linux-s390-low.c (s390_num_regs): Update.
13196         (s390_regmap): Remove control registers.  Use __s390x__ predefine
13197         instead of GPR_SIZE to distiguish s390 and s390x targets.
13198
13199 2004-01-31  Daniel Jacobowitz  <drow@mvista.com>
13200
13201         * linux-low.c: Update copyright year.
13202         (check_removed_breakpoint): Clear pending_is_breakpoint.
13203         (linux_set_resume_request, linux_queue_one_thread)
13204         (resume_status_pending_p): New functions.
13205         (linux_continue_one_thread): Use process->resume.
13206         (linux_resume): Only resume threads if there are no pending events.
13207         * linux-low.h (struct process_info): Add resume request
13208         pointer.
13209
13210 2004-01-30  Daniel Jacobowitz  <drow@mvista.com>
13211
13212         * regcache.c (new_register_cache): Clear the allocated register
13213         buffer.  Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
13214
13215 2003-10-13  Daniel Jacobowitz  <drow@mvista.com>
13216
13217         * linux-low.c (linux_resume): Take a struct thread_resume *
13218         argument.
13219         (linux_wait): Update call.
13220         (resume_ptr): New static variable.
13221         (linux_continue_one_thread): Renamed from
13222         linux_continue_one_process.  Use resume_ptr.
13223         (linux_resume): Use linux_continue_one_thread.
13224         * server.c (handle_v_cont, handle_v_requests): New functions.
13225         (myresume): New function.
13226         (main): Handle 'v' case.
13227         * target.h (struct thread_resume): New type.
13228         (struct target_ops): Change argument of "resume" to struct
13229         thread_resume *.
13230         (myresume): Delete macro.
13231
13232 2003-08-08  H.J. Lu  <hongjiu.lu@intel.com>
13233
13234         * Makefile.in (install-only): Create dest dir. Support DESTDIR.
13235         (uninstall): Support DESTDIR.
13236
13237 Mon Jul 21 20:09:34 UTC 2003  Brendan Conoboy  <blc@redhat.com>
13238
13239         * configure.srv: Add xscale*linux copy of arm*linux entry.
13240
13241 2003-07-24  Daniel Jacobowitz  <drow@mvista.com>
13242
13243         * linux-arm-low.c (arm_reinsert_addr): New function.
13244         (the_low_target): Add arm_reinsert_addr.
13245
13246 2003-07-08  Mark Kettenis  <kettenis@gnu.org>
13247
13248         * mem-break.c: Remove whitespace at end of file.
13249
13250 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
13251
13252         * configure.in: Check whether we need to prototype strerror.
13253         * server.h: Optionally prototype strerror.
13254         * gdbreplay.c (perror_with_name): Use strerror.
13255         * linux-low.c (linux_attach_lwp): Use strerror.
13256         * utils.c (perror_with_name): Use strerror.
13257         * config.in, configure: Regenerated.
13258
13259 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
13260
13261         * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
13262         SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
13263
13264 2003-06-20  Daniel Jacobowitz  <drow@mvista.com>
13265
13266         * Makefile.in (SFILES): Update.
13267         * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
13268         low-sun3.c: Remove files.
13269
13270 2003-06-17  Daniel Jacobowitz  <drow@mvista.com>
13271
13272         * linux-low.c: Move comment to linux_thread_alive where it belonged.
13273         (linux_detach_one_process, linux_detach): New functions.
13274         (linux_target_ops): Add linux_detach.
13275         * server.c (main): Handle 'D' packet.
13276         * target.h (struct target_ops): Add "detach" member.
13277         (detach_inferior): Define.
13278
13279 2003-06-13  Mark Kettenis  <kettenis@gnu.org>
13280
13281         From Kelley Cook  <kelleycook@wideopenwest.com>:
13282         * configure.srv: Accept i[34567]86 variants.
13283
13284 2003-06-05  Daniel Jacobowitz  <drow@mvista.com>
13285
13286         * linux-low.c (linux_wait_for_event): Correct comment typos.
13287         (linux_resume_one_process): Call check_removed_breakpoint.
13288         (linux_send_signal): New function.
13289         (linux_target_ops): Add linux_send_signal.
13290         * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
13291         of kill.
13292         * target.h (struct target_ops): Add send_signal.
13293
13294 2003-05-29  Jim Blandy  <jimb@redhat.com>
13295
13296         * linux-low.c (usr_store_inferior_registers): Transfer buf in
13297         PTRACE_XFER_TYPE-sized chunks, not int-sized chunks.  Otherwise,
13298         if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
13299         away part of the register's value.
13300
13301 2003-03-26  Daniel Jacobowitz  <drow@mvista.com>
13302
13303         * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
13304         (linux_wait_for_event, linux_init_signals): Likewise.
13305
13306 2003-03-17  Daniel Jacobowitz  <drow@mvista.com>
13307
13308         * configure.in: Check for stdlib.h.
13309         * configure: Regenerated.
13310         * config.in: Regenerated.
13311
13312 2003-01-04  Andreas Schwab  <schwab@suse.de>
13313
13314         * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
13315
13316 2003-01-02  Andrew Cagney  <ac131313@redhat.com>
13317
13318         * Makefile.in: Remove obsolete code.
13319
13320 2002-11-20  Daniel Jacobowitz  <drow@mvista.com>
13321
13322         * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
13323         defined(PT_FPR0_HI).
13324
13325 2002-11-17  Stuart Hughes  <seh@zee2.com>
13326
13327         * linux-arm-low.c (arm_num_regs): Increase.
13328         (arm_regmap): Include status register.
13329
13330 2002-11-17  Daniel Jacobowitz  <drow@mvista.com>
13331
13332         * linux-low.c (register_addr): Remove incorrect -1 check.
13333
13334 2002-08-29  Daniel Jacobowitz  <drow@mvista.com>
13335
13336         * linux-low.c (linux_create_inferior): Call setpgid.  Return
13337         the new PID.
13338         (unstopped_p, linux_signal_pid): Remove.
13339         (linux_target_ops): Remove linux_signal_pid.
13340         * remote-utils.c (putpkt, input_interrupt): Use signal_pid
13341         global instead of target method.
13342         * target.h (struct target_ops): Remove signal_pid.  Update comment
13343         for create_inferior.
13344         * server.c (signal_pid): New variable.
13345         (create_inferior): Set signal_pid.  Block SIGTTOU and SIGTTIN in
13346         gdbserver.  Set the child to be the foreground process group.
13347         (attach_inferior): Set signal_pid.
13348
13349 2002-08-23  Daniel Jacobowitz  <drow@mvista.com>
13350
13351         * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
13352
13353 2002-08-20  Jim Blandy  <jimb@redhat.com>
13354
13355         * Makefile.in (LDFLAGS): Allow the configure script to establish a
13356         default for this.
13357
13358 2002-08-01  Andrew Cagney  <cagney@redhat.com>
13359
13360         * Makefile.in: Make chill references obsolete.
13361
13362 2002-07-24  Kevin Buettner  <kevinb@redhat.com>
13363
13364         * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
13365         * configure: Regenerate.
13366         * config.in: Regenerate.
13367
13368 2002-07-09  David O'Brien  <obrien@FreeBSD.org>
13369
13370         * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
13371         (perror_with_name, remote_close, remote_open, expect, play): Static.
13372
13373 2002-07-04  Michal Ludvig  <mludvig@suse.cz>
13374
13375         * linux-x86-64-low.c (x86_64_regmap): Make it an array of
13376         byte offsets instead of an array of indexes.
13377         (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
13378
13379 2002-06-13  Daniel Jacobowitz  <drow@mvista.com>
13380
13381         * regcache.c: Add comment.
13382
13383 2002-06-11  Daniel Jacobowitz  <drow@mvista.com>
13384
13385         * thread-db.c: New file.
13386         * proc-service.c: New file.
13387         * acinclude.m4: New file.
13388         * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
13389         proc-service.o, and thread-db.o.
13390         (linux-low.o): Add USE_THREAD_DB.
13391         * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
13392         HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
13393         * aclocal.m4: Regenerated.
13394         * config.in: Regenerated.
13395         * configure: Regenerated.
13396         * configure.in: Check for proc_service.h, sys/procfs.h,
13397         thread_db.h, and linux/elf.h headrs.
13398         Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
13399         PRFPREGSET_T_BROKEN.  Introduce srv_thread_depfiles and USE_THREAD_DB.
13400         Check for -lthread_db and thread support.
13401         * configure.srv: Enable thread_db support for ARM, i386, MIPS,
13402         PowerPC, and SuperH.
13403         * i387-fp.c: Constify arguments.
13404         * i387-fp.h: Likewise.
13405         * inferiors.c: (struct thread_info): Renamed from
13406         `struct inferior_info'.  Remove PID member.  Use generic inferior
13407         list header.  All uses updated.
13408         (inferiors, signal_pid): Removed.
13409         (all_threads): New variable.
13410         (get_thread): Define.
13411         (add_inferior_to_list): New function.
13412         (for_each_inferior): New function.
13413         (change_inferior_id): New function.
13414         (add_inferior): Removed.
13415         (remove_inferior): New function.
13416         (add_thread): New function.
13417         (free_one_thread): New function.
13418         (remove_thread): New function.
13419         (clear_inferiors): Use for_each_inferior and free_one_thread.
13420         (find_inferior): New function.
13421         (find_inferior_id): New function.
13422         (inferior_target_data): Update argument type.
13423         (set_inferior_target_data): Likewise.
13424         (inferior_regcache_data): Likewise.
13425         (set_inferior_regcache_data): Likewise.
13426         * linux-low.c (linux_bp_reinsert): Remove.
13427         (all_processes, stopping_threads, using_thrads)
13428         (struct pending_signals, debug_threads, pid_of): New.
13429         (inferior_pid): Replace with macro.
13430         (struct inferior_linux_data): Remove.
13431         (get_stop_pc, add_process): New functions.
13432         (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
13433         Use add_process and add_thread.
13434         (linux_attach_lwp): New function, based on old linux_attach.  Use
13435         add_process and add_thread.  Set stop_expected for new threads.
13436         (linux_attach): New function.
13437         (linux_kill_one_process): New function.
13438         (linux_kill): Kill all LWPs.
13439         (linux_thread_alive): Use find_inferior_id.
13440         (check_removed_breakpoints, status_pending_p): New functions.
13441         (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
13442         Update.  Use WNOHANG.  Wait for cloned processes also.  Update process
13443         struct for the found process.
13444         (linux_wait_for_event): New function.
13445         (linux_wait): Use it.  Support LWPs.
13446         (send_sigstop, wait_for_sigstop, stop_all_processes)
13447         (linux_resume_one_process, linux_continue_one_process): New functions.
13448         (linux_resume): Support LWPs.
13449         (REGISTER_RAW_SIZE): Remove.
13450         (fetch_register): Use register_size instead.  Call supply_register.
13451         (usr_store_inferior_registers): Likewise.  Call collect_register.
13452         Fix recursive case.
13453         (regsets_fetch_inferior_registers): Improve error message.
13454         (regsets_store_inferior_registers): Add debugging.
13455         (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
13456         (unstopped_p, linux_signal_pid): New functions.
13457         (linux_target_ops): Add linux_signal_pid.
13458         (linux_init_signals): New function.
13459         (initialize_low): Call it.  Initialize using_threads.
13460         * regcache.c (inferior_regcache_data): Add valid
13461         flag.
13462         (get_regcache): Fetch registers lazily.  Add fetch argument
13463         and update all callers.
13464         (regcache_invalidate_one, regcache_invalidate): New
13465         functions.
13466         (new_register_cache): Renamed from create_register_cache.
13467         Return the new regcache.
13468         (free_register_cache): Change argument to a void *.
13469         (registers_to_string, registers_from_string): Call get_regcache
13470         with fetch flag set.
13471         (register_data): Make static.  Pass fetch flag to get_regcache.
13472         (supply_register): Call get_regcache with fetch flag clear.
13473         (collect_register): Call get_regcache with fetch flag set.
13474         (collect_register_as_string): New function.
13475         * regcache.h: Update.
13476         * remote-utils.c (putpkt): Flush after debug output and use
13477         stderr.
13478         Handle input interrupts while waiting for an ACK.
13479         (input_interrupt): Use signal_pid method.
13480         (getpkt): Flush after debug output and use stderr.
13481         (outreg): Use collect_register_as_string.
13482         (new_thread_notify, dead_thread_notify): New functions.
13483         (prepare_resume_reply): Check using_threads.  Set thread_from_wait
13484         and general_thread.
13485         (look_up_one_symbol): Flush after debug output.
13486         * server.c (step_thread, server_waiting): New variables.
13487         (start_inferior): Don't use signal_pid.  Update call to mywait.
13488         (attach_inferior): Update call to mywait.
13489         (handle_query): Handle qfThreadInfo and qsThreadInfo.
13490         (main): Don't fetch/store registers explicitly.  Use
13491         set_desired_inferior.  Support proposed ``Hs'' packet.  Update
13492         calls to mywait.
13493         * server.h: Update.
13494         (struct inferior_list, struct_inferior_list_entry): New.
13495         * target.c (set_desired_inferior): New.
13496         (write_inferior_memory): Constify.
13497         (mywait): New function.
13498         * target.h: Update.
13499         (struct target_ops): New signal_pid method.
13500         (mywait): Removed macro, added prototype.
13501
13502         * linux-low.h (regset_func): Removed.
13503         (regset_fill_func, regset_store_func): New.
13504         (enum regset_type): New.
13505         (struct regset_info): Add type field.  Use new operation types.
13506         (struct linux_target_ops): stop_pc renamed to get_pc.
13507         Add decr_pc_after_break and breakpoint_at.
13508         (get_process, get_thread_proess, get_process_thread)
13509         (strut process_info, all_processes, linux_attach_lwp)
13510         (thread_db_init): New.
13511
13512         * linux-arm-low.c (arm_get_pc, arm_set_pc,
13513         arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
13514         (the_low_target): Add new members.
13515         * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
13516         (i386_store_fpxregset): Constify.
13517         (target_regsets): Add new kind identifier.
13518         (i386_get_pc): Renamed from i386_stop_pc.  Simplify.
13519         (i386_set_pc): Add debugging.
13520         (i386_breakpoint_at): New function.
13521         (the_low_target): Add new members.
13522         * linux-mips-low.c (mips_get_pc, mips_set_pc)
13523         (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
13524         (mips_breakpoint_at): New.
13525         (the_low_target): Add new members.
13526         * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
13527         (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
13528         (the_low_target): Add new members.
13529         * linux-sh-low.c (sh_get_pc, sh_set_pc)
13530         (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
13531         (the_low_target): Add new members.
13532         * linux-x86-64-low.c (target_regsets): Add new kind
13533         identifier.
13534
13535 2002-05-15  Daniel Jacobowitz  <drow@mvista.com>
13536
13537         From Martin Pool <mbp@samba.org>:
13538         * server.c (gdbserver_usage): New function.
13539         (main): Call it.
13540
13541 2002-05-14  Daniel Jacobowitz  <drow@mvista.com>
13542
13543         * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
13544         stop_at -> stop_pc.
13545
13546 2002-05-04  Andrew Cagney  <ac131313@redhat.com>
13547
13548         * Makefile.in: Remove obsolete code.
13549
13550 2002-04-24  Michal Ludvig  <mludvig@suse.cz>
13551
13552         * linux-low.c (regsets_fetch_inferior_registers),
13553         (regsets_store_inferior_registers): Removed cast to int from
13554         ptrace() calls.
13555         * regcache.h: Added declaration of struct inferior_info.
13556
13557 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
13558
13559         * inferiors.c (struct inferior_info): Add regcache_data.
13560         (add_inferior): Call create_register_cache.
13561         (clear_inferiors): Call free_register_cache.
13562         (inferior_regcache_data, set_inferior_regcache_data): New functions.
13563         * regcache.c (struct inferior_regcache_data): New.
13564         (registers): Remove.
13565         (get_regcache): New function.
13566         (create_register_cache, free_register_cache): New functions.
13567         (set_register_cache): Don't initialize the register cache here.
13568         (registers_to_string, registers_from_string, register_data): Call
13569         get_regcache.
13570         * regcache.h: Add prototypes.
13571         * server.h: Likewise.
13572
13573 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
13574
13575         * mem-break.c: New file.
13576         * mem-break.h: New file.
13577         * Makefile.in: Add mem-break.o rule; update server.h
13578         dependencies.
13579         * inferiors.c (struct inferior_info): Add target_data
13580         member.
13581         (clear_inferiors): Free target_data member if set.
13582         (inferior_target_data, set_inferior_target_data): New functions.
13583         * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
13584         (i386_stop_pc, i386_set_pc): New.  Add to the_low_target.
13585         * linux-low.c (linux_bp_reinsert): New variable.
13586         (struct inferior_linux_data): New.
13587         (linux_create_inferior): Use set_inferior_target_data.
13588         (linux_attach): Likewise.  Call add_inferior.
13589         (linux_wait_for_one_inferior): New function.
13590         (linux_wait): Call it.
13591         (linux_write_memory): Add const.
13592         (initialize_low): Call set_breakpoint_data.
13593         * linux-low.h (struct linux_target_ops): Add breakpoint
13594         handling members.
13595         * server.c (attach_inferior): Remove extra add_inferior
13596         call.
13597         * server.h: Include mem-break.h.  Update inferior.c
13598         prototypes.
13599         * target.c (read_inferior_memory)
13600         (write_inferior_memory): New functions.
13601         * target.h (read_inferior_memory)
13602         (write_inferior_memory): Change macros to prototypes.
13603         (struct target_ops): Update comments.  Add const to write_memory
13604         definition.
13605
13606 2002-04-11  Daniel Jacobowitz  <drow@mvista.com>
13607
13608         * linux-low.c (usr_store_inferior_registers): Support
13609         registers which are allowed to fail to store.
13610         * linux-low.h (linux_target_ops): Likewise.
13611         * linux-ppc-low.c (ppc_regmap): Support FPSCR.
13612         (ppc_cannot_store_register): FPSCR may not be storable.
13613
13614 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13615
13616         * server.h: Include <string.h> if HAVE_STRING_H.
13617         * ChangeLog: Correct paths in last ChangeLog entry.
13618
13619 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13620
13621         * linux-low.h: Remove obsolete prototypes.
13622         (struct linux_target_ops): New.
13623         (extern the_low_target): New.
13624         * linux-low.c (num_regs, regmap): Remove declarations.
13625         (register_addr): Use the_low_target explicitly.
13626         (fetch_register): Likewise.
13627         (usr_fetch_inferior_registers): Likewise.
13628         (usr_store_inferior_registers): Likewise.
13629         * linux-arm-low.c (num_regs): Remove.
13630         (arm_num_regs): Define.
13631         (arm_regmap): Renamed from regmap, made static.
13632         (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
13633         made static.
13634         (arm_cannot_store_register): Renamed from cannot_store_register,
13635         made static.
13636         (the_low_target): New.
13637         * linux-i386-low.c (num_regs): Remove.
13638         (i386_num_regs): Define.
13639         (i386_regmap): Renamed from regmap, made static.
13640         (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
13641         made static.
13642         (i386_cannot_store_register): Renamed from cannot_store_register,
13643         made static.
13644         (the_low_target): New.
13645         * linux-ia64-low.c (num_regs): Remove.
13646         (ia64_num_regs): Define.
13647         (ia64_regmap): Renamed from regmap, made static.
13648         (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
13649         made static.
13650         (ia64_cannot_store_register): Renamed from cannot_store_register,
13651         made static.
13652         (the_low_target): New.
13653         * linux-m68k-low.c (num_regs): Remove.
13654         (m68k_num_regs): Define.
13655         (m68k_regmap): Renamed from regmap, made static.
13656         (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
13657         made static.
13658         (m68k_cannot_store_register): Renamed from cannot_store_register,
13659         made static.
13660         (the_low_target): New.
13661         * linux-mips-low.c (num_regs): Remove.
13662         (mips_num_regs): Define.
13663         (mips_regmap): Renamed from regmap, made static.
13664         (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
13665         made static.
13666         (mips_cannot_store_register): Renamed from cannot_store_register,
13667         made static.
13668         (the_low_target): New.
13669         * linux-ppc-low.c (num_regs): Remove.
13670         (ppc_num_regs): Define.
13671         (ppc_regmap): Renamed from regmap, made static.
13672         (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
13673         made static.
13674         (ppc_cannot_store_register): Renamed from cannot_store_register,
13675         made static.
13676         (the_low_target): New.
13677         * linux-s390-low.c (num_regs): Remove.
13678         (s390_num_regs): Define.
13679         (s390_regmap): Renamed from regmap, made static.
13680         (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
13681         made static.
13682         (s390_cannot_store_register): Renamed from cannot_store_register,
13683         made static.
13684         (the_low_target): New.
13685         * linux-sh-low.c (num_regs): Remove.
13686         (sh_num_regs): Define.
13687         (sh_regmap): Renamed from regmap, made static.
13688         (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
13689         made static.
13690         (sh_cannot_store_register): Renamed from cannot_store_register,
13691         made static.
13692         (the_low_target): New.
13693         * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
13694         (the_low_target): New.
13695
13696 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13697
13698         * Makefile.in: Add stamp-h target.
13699         * configure.in: Create stamp-h.
13700         * configure: Regenerated.
13701
13702 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13703
13704         * inferiors.c: New file.
13705         * target.c: New file.
13706         * target.h: New file.
13707         * Makefile.in:  Add target.o and inferiors.o.  Update
13708         dependencies.
13709         * linux-low.c (inferior_pid): New static variable,
13710         moved from server.c.
13711         (linux_create_inferior): Renamed from create_inferior.
13712         Call add_inferior.  Return 0 on success instead of a PID.
13713         (linux_attach): Renamed from myattach.
13714         (linux_kill): Renamed from kill_inferior.  Call clear_inferiors ().
13715         (linux_thread_alive): Renamed from mythread_alive.
13716         (linux_wait): Renamed from mywait.  Call clear_inferiors () if the
13717         child dies.
13718         (linux_resume): Renamed from myresume.  Add missing ``return 0''.
13719         (regsets_store_inferior_registers): Correct error message.
13720         Add missing ``return 0''.
13721         (linux_fetch_registers): Renamed from fetch_inferior_registers.
13722         (linux_store_registers): Renamed from store_inferior_registers.
13723         (linux_read_memory): Renamed from read_inferior_memory.
13724         (linux_write_memory): Renamed from write_inferior_memory.
13725         (linux_target_ops): New structure.
13726         (initialize_low): Call set_target_ops ().
13727         * remote-utils.c (unhexify): New function.
13728         (hexify): New function.
13729         (input_interrupt): Send signals to ``signal_pid''.
13730         * server.c (inferior_pid): Remove.
13731         (start_inferior): Update create_inferior call.
13732         (attach_inferior): Call add_inferior.
13733         (handle_query): New function.
13734         (main): Call handle_query for `q' packets.
13735         * server.h: Include "target.h".  Remove obsolete prototypes.
13736         Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
13737
13738 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13739
13740         * Makefile.in: Add WARN_CFLAGS.  Update configury
13741         dependencies.
13742         * configure.in: Check for <string.h>
13743         * configure: Regenerate.
13744         * config.in: Regenerate.
13745         * gdbreplay.c: Include needed system headers.
13746         (remote_open): Remove strchr prototype.
13747         * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
13748         * regcache.c (supply_register): Change buf argument to const void *.
13749         (supply_register_by_name): Likewise.
13750         (collect_register): Change buf argument to void *.
13751         (collect_register_by_name): Likewise.
13752         * regcache.h: Add missing prototypes.
13753         * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
13754         * server.c (handle_query): New function.
13755         (attached): New static variable, moved out of main.
13756         (main): Quiet longjmp clobber warnings.
13757         * server.h: Add ATTR_NORETURN and ATTR_FORMAT.  Update prototypes.
13758         * utils.c (error): Remove NORETURN.
13759         (fatal): Likewise.