gdbserver/s390: Add fast tracepoint support.
[external/binutils.git] / gdb / gdbserver / ChangeLog
1 2016-03-29  Marcin Kościelnicki  <koriakin@0x04.net>
2
3         PR 18377
4         * Makefile.in: Add s390 IPA files.
5         * configure.srv: Build IPA for s390.
6         * linux-s390-ipa.c: New file.
7         * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
8         (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
9         (tdesc_s390_linux32): Likewise.
10         (init_registers_s390_linux32v1): Likewise.
11         (tdesc_s390_linux32v1): Likewise.
12         (init_registers_s390_linux32v2): Likewise.
13         (tdesc_s390_linux32v2): Likewise.
14         (init_registers_s390_linux64): Likewise.
15         (tdesc_s390_linux64): Likewise.
16         (init_registers_s390_linux64v1): Likewise.
17         (tdesc_s390_linux64v1): Likewise.
18         (init_registers_s390_linux64v2): Likewise.
19         (tdesc_s390_linux64v2): Likewise.
20         (init_registers_s390_te_linux64): Likewise.
21         (tdesc_s390_te_linux64): Likewise.
22         (init_registers_s390_vx_linux64): Likewise.
23         (tdesc_s390_vx_linux64): Likewise.
24         (init_registers_s390_tevx_linux64): Likewise.
25         (tdesc_s390_tevx_linux64): Likewise.
26         (init_registers_s390x_linux64): Likewise.
27         (tdesc_s390x_linux64): Likewise.
28         (init_registers_s390x_linux64v1): Likewise.
29         (tdesc_s390x_linux64v1): Likewise.
30         (init_registers_s390x_linux64v2): Likewise.
31         (tdesc_s390x_linux64v2): Likewise.
32         (init_registers_s390x_te_linux64): Likewise.
33         (tdesc_s390x_te_linux64): Likewise.
34         (init_registers_s390x_vx_linux64): Likewise.
35         (tdesc_s390x_vx_linux64): Likewise.
36         (init_registers_s390x_tevx_linux64): Likewise.
37         (tdesc_s390x_tevx_linux64): Likewise.
38         (have_hwcap_s390_vx): New static variable.
39         (s390_arch_setup): Fill have_hwcap_s390_vx.
40         (s390_get_thread_area): New function.
41         (s390_ft_entry_gpr_esa): New const.
42         (s390_ft_entry_gpr_zarch): New const.
43         (s390_ft_entry_misc): New const.
44         (s390_ft_entry_fr): New const.
45         (s390_ft_entry_vr): New const.
46         (s390_ft_main_31): New const.
47         (s390_ft_main_64): New const.
48         (s390_ft_exit_fr): New const.
49         (s390_ft_exit_vr): New const.
50         (s390_ft_exit_misc): New const.
51         (s390_ft_exit_gpr_esa): New const.
52         (s390_ft_exit_gpr_zarch): New const.
53         (append_insns): New function.
54         (s390_relocate_instruction): New function.
55         (s390_install_fast_tracepoint_jump_pad): New function.
56         (s390_get_min_fast_tracepoint_insn_len): New function.
57         (s390_get_ipa_tdesc_idx): New function.
58         (struct linux_target_ops): Wire in the above functions.
59         (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
60         * linux-s390-tdesc.h: New file.
61
62 2016-03-29  Marcin Kościelnicki  <koriakin@0x04.net>
63
64         * linux-s390-low.c (s390_supports_tracepoints): New function.
65         (struct linux_target_ops): Fill supports_tracepoints hook.
66
67 2016-03-18  Yao Qi  <yao.qi@linaro.org>
68
69         * linux-low.c (lwp_signal_can_be_delivered): New function.
70         (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
71
72 2016-03-18  Yao Qi  <yao.qi@linaro.org>
73
74         * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
75         0 if signal is enqueued.  Remove 'signal' from one debugging
76         message.  Move one debugging message to some lines below.
77         Remove code setting 'signal' to 0.
78
79 2016-03-18  Yao Qi  <yao.qi@linaro.org>
80
81         * linux-low.c (linux_low_filter_event): Remove redundant
82         WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
83
84 2016-03-09  Marcin Kościelnicki  <koriakin@0x04.net>
85
86         * linux-ppc-low.c (ppc_supports_tracepoints): New function.
87         (struct linux_target_ops): Wire in the above.
88
89 2016-03-03  Yao Qi  <yao.qi@linaro.org>
90
91         * linux-low.c: Update comments to start_step_over.
92
93 2016-03-03  Yao Qi  <yao.qi@linaro.org>
94
95         PR server/19736
96         * linux-low.c (handle_extended_wait): Set child suspended
97         if event_lwp->bp_reinsert isn't zero.
98
99 2016-03-02  Yao Qi  <yao.qi@linaro.org>
100
101         * linux-low.c (linux_resume_one_lwp_throw): Replace code with
102         enqueue_pending_signal.
103
104 2016-03-02  Marcin Kościelnicki  <koriakin@0x04.net>
105
106         * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
107         is actually loaded.
108
109 2016-02-25  Marcin Kościelnicki  <koriakin@0x04.net>
110
111         * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
112         (s390_regmap_3264) [!__s390x__]: New global.
113         (s390_collect_ptrace_register): Skip map entries containing -1.
114         (s390_supply_ptrace_register): Ditto.
115         (s390_fill_gprs_high): New function.
116         (s390_store_gprs_high): New function.
117         (s390_regsets): Add NT_S390_HIGH_GPRS.
118         (s390_get_hwcap): Enable on 31-bit.
119         (have_hwcap_s390_high_gprs): Enable on 31-bit.
120         (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
121         Detect NT_S390_HIGH_GPRS.
122         (s390_usrregs_info_3264): Enable on 31-bit.
123         (s390_regs_info): Enable regs_info_3264 on 31-bit.
124         (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
125
126 2016-02-25  Marcin Kościelnicki  <koriakin@0x04.net>
127
128         PR gdb/13808
129         * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
130         * configure.srv: Ditto.
131         * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
132         (initialize_low_tracepoint): Remove ipa_tdesc assignment.
133         * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
134         (init_registers_amd64_linux): Remove prototype.
135         (tdesc_amd64_linux): Remove declaration.
136         (get_ipa_tdesc): New function.
137         (initialize_low_tracepoint): Remove ipa_tdesc assignment,
138         initialize remaining tdescs.
139         * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
140         (init_registers_i386_linux): Remove prototype.
141         (tdesc_i386_linux): Remove declaration.
142         (get_ipa_tdesc): New function.
143         (initialize_low_tracepoint): Remove ipa_tdesc assignment,
144         initialize remaining tdescs.
145         * linux-low.c (linux_get_ipa_tdesc_idx): New function.
146         (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
147         * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
148         * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
149         (x86_get_ipa_tdesc_idx): New function.
150         (the_low_target): Wire in x86_get_ipa_tdesc_idx.
151         * linux-x86-tdesc.h: New file.
152         * target.h (struct target_ops): Add get_ipa_tdesc_idx.
153         (target_get_ipa_tdesc_idx): New macro.
154         * tracepoint.c (ipa_tdesc_idx): New macro.
155         (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
156         (symbol_list): Add ipa_tdesc_idx.
157         (cmd_qtstart): Write ipa_tdesc_idx in the target.
158         (ipa_tdesc): Remove.
159         (ipa_tdesc_idx): New variable.
160         (get_context_regcache): Use get_ipa_tdesc.
161         (gdb_collect): Ditto.
162         (gdb_probe): Ditto.
163         * tracepoint.h (get_ipa_tdesc): New prototype.
164         (ipa_tdesc): Remove.
165
166 2016-02-24  Pedro Alves  <palves@redhat.com>
167
168         * linux-low.c (check_stopped_by_breakpoint): Rename to ...
169         (save_stop_reason): ... this.  Use GDB_ARCH_IS_TRAP_HWBKPT and
170         handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
171         Factor out common code between the USE_SIGTRAP_SIGINFO and
172         !USE_SIGTRAP_SIGINFO blocks.
173         (linux_low_filter_event): Call save_stop_reason instead of
174         check_stopped_by_breakpoint and check_stopped_by_watchpoint.
175         Update comments.
176         (linux_wait_1): Update comments.
177
178 2016-02-24  Wei-cheng Wang  <cole945@gmail.com>
179
180         * linux-ppc-low.c (ppc_supports_z_point_type): New function:
181         (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
182         (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
183         ppc_insert_point, ppc_remove_point.
184
185 2016-02-17  Marcin Kościelnicki  <koriakin@0x04.net>
186
187         * linux-s390-low.c (s390_supports_z_point_type): New function.
188         (struct linux_target_ops): Wire s390_supports_z_point_type in.
189
190 2016-02-16  Yao Qi  <yao.qi@linaro.org>
191
192         * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
193         PC.  Get pc from regcache_read_pc.
194
195 2016-02-12  Yao Qi  <yao.qi@linaro.org>
196
197         * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
198         or linux_get_pc_32bit.
199         (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
200
201 2016-02-12  Yao Qi  <yao.qi@linaro.org>
202
203         * linux-arm-low.c (get_next_pcs_ops): Initialize it with
204         arm_linux_get_next_pcs_fixup.
205
206 2016-02-12  Marcin Kościelnicki  <koriakin@0x04.net>
207
208         * tracepoint.c (x_tracepoint_action_download): Change
209         write_inferior_data_ptr to write_inferior_data_pointer.
210         (cmd_qtstart): Likewise.
211         (write_inferior_data_ptr): Remove.
212         (download_agent_expr): Change write_inferior_data_ptr to
213         write_inferior_data_pointer.
214         (download_tracepoint_1): Likewise.
215         (download_tracepoint): Likewise.
216         (download_trace_state_variables): Likewise.
217
218 2016-02-11  Wei-cheng Wang  <cole945@gmail.com>
219             Marcin Kościelnicki  <koriakin@0x04.net>
220
221         * tracepoint.c (struct tracepoint_action_ops): Remove.
222         (struct tracepoint_action): Remove ops.
223         (m_tracepoint_action_download, r_tracepoint_action_download)
224         (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
225         size and offset accordingly.
226         (m_tracepoint_action_ops, r_tracepoint_action_ops)
227         (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
228         (tracepoint_action_send, tracepoint_action_download): New functions.
229         Helpers for trace action handlers.
230         (add_tracepoint_action): Remove setup actions ops.
231         (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
232
233 2016-02-10  Yao Qi  <yao.qi@linaro.org>
234
235         * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
236
237 2016-02-09  Simon Marchi  <simon.marchi@ericsson.com>
238
239         * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
240         to AC_OUTPUT.
241         * configure: Regenerate.
242
243 2016-02-09  Simon Marchi  <simon.marchi@ericsson.com>
244
245         * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
246         void * to gdb_byte *.
247         * linux-low.c (siginfo_fixup): Likewise.
248         (linux_xfer_siginfo): Likewise.
249         * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
250         Likewise.
251         * linux-x86-low.c (x86_siginfo_fixup): Likewise.
252
253 2016-02-02  Walfred Tedeschi  <walfred.tedeschi@intel.com>
254
255         * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
256         to srv_tgtobj.
257         (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
258         to srv_tgtobj.
259         * linux-x86-low.c [__x86_64__]: Include
260         "nat/amd64-linux-siginfo.h".
261         (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
262         (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
263         (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
264         (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
265         (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
266         (cpt_si_fd, si_timerid, si_overrun): Move from
267         nat/amd64-linux-siginfo.c.
268         * Makefile.in (amd64-linux-siginfo.o:): New rule.
269
270 2016-01-28  Simon Marchi  <simon.marchi@ericsson.com>
271
272         * server.c (skip_to_semicolon):  Remove.
273         (process_point_options): Use strchrnul instead of
274         skip_to_semicolon.
275
276 2016-01-26  Yao Qi  <yao.qi@linaro.org>
277
278         * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
279         * linux-low.c (install_software_single_step_breakpoints): Don't
280         call regcache_read_pc.
281         * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
282         argument pc.
283
284 2016-01-26  Yao Qi  <yao.qi@linaro.org>
285
286         * linux-low.c (install_software_single_step_breakpoints): Call
287         regcache_read_pc instead of get_pc.
288
289 2016-01-26  Yao Qi  <yao.qi@linaro.org>
290
291         * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
292         (unblock_async_io): Rename to ...
293         (block_unblock_async_io): ... it.  New function.
294         (enable_async_io): Don't install SIGIO handler.  Unblock it
295         instead.
296         (disable_async_io): Don't ignore SIGIO.  Block it instead.
297         (initialize_async_io): Install SIGIO handler.  Don't call
298         unblock_async_io.
299
300 2016-01-26  Yao Qi  <yao.qi@linaro.org>
301
302         * remote-utils.c (getpkt): If the buffer isn't empty, and the
303         first character is '\003', call *the_target->request_interrupt.
304
305 2016-01-25  Yao Qi  <yao.qi@linaro.org>
306
307         * remote-utils.c (new_thread_notify): Remove.
308         (dead_thread_notify): Likewise.
309         * remote-utils.h (new_thread_notify): Remove declaration.
310         (dead_thread_notify): Likewise.
311
312 2016-01-23  Marcin Kościelnicki  <koriakin@0x04.net>
313
314         * gdb.trace/pending.exp: Fix expected message on continue.
315
316 2016-01-22  Marcin Kościelnicki  <koriakin@0x04.net>
317
318         * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
319         it works properly on big-endian machines where sizeof (CORE_ADDR)
320         != sizeof (void *).
321
322 2016-01-21  Pedro Alves  <palves@redhat.com>
323
324         * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
325         (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
326         * configure: Regenerate.
327
328 2016-01-21  Yao Qi  <yao.qi@linaro.org>
329
330         * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
331         is_thumb and set it according to CPSR saved on the stack.
332         (get_next_pcs_syscall_next_pc): Pass is_thumb to
333         arm_sigreturn_next_pc.
334
335 2016-01-18  Yao Qi  <yao.qi@linaro.org>
336
337         * linux-low.c (linux_set_pc_64bit): New function.
338         (linux_get_pc_64bit): New function.
339         * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
340         Declare.
341         * linux-sparc-low.c (debug_threads): Remove declaration.
342         (sparc_get_pc): Remove.
343         (the_low_target): Use linux_get_pc_64bit instead of
344         sparc_get_pc.
345         * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
346         (the_low_target): Use linux_get_pc_64bit and
347         linux_set_pc_64bit.
348
349 2016-01-18  Yao Qi  <yao.qi@linaro.org>
350
351         * linux-arm-low.c (debug_threads): Remove declaration.
352         (arm_get_pc, arm_set_pc): Remove.
353         (the_low_target): Use linux_get_pc_32bit and
354         linux_set_pc_32bit.
355         * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
356         (the_low_target): Use linux_get_pc_32bit and
357         linux_set_pc_32bit.
358         * linux-cris-low.c (debug_threads): Remove declaration.
359         (cris_get_pc, cris_set_pc,): Remove.
360         (the_low_target): Use linux_get_pc_32bit and
361         linux_set_pc_32bit.
362         * linux-crisv32-low.c (debug_threads): Remove declaration.
363         (cris_get_pc, cris_set_pc): Remove.
364         (the_low_target): Use linux_get_pc_32bit and
365         linux_set_pc_32bit.
366         * linux-low.c: Include inttypes.h.
367         (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
368         * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
369         * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
370         (the_low_target): Use linux_get_pc_32bit and
371         linux_set_pc_32bit.
372         * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
373         (the_low_target): Use linux_get_pc_32bit and
374         linux_set_pc_32bit.
375         * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
376         (the_low_target): Use linux_get_pc_32bit and
377         linux_set_pc_32bit.
378         * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
379         (the_low_target): Use linux_get_pc_32bit and
380         linux_set_pc_32bit.
381         * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
382         (the_low_target): Use linux_get_pc_32bit and
383         linux_set_pc_32bit.
384
385 2016-01-18  Gary Benson  <gbenson@redhat.com>
386
387         * configure.ac (AC_FUNC_FORK): New check.
388         * config.in: Regenerate.
389         * configure: Likewise.
390
391 2016-01-14  Yao Qi  <yao.qi@linaro.org>
392
393         * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
394         * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
395         * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
396         arm_get_next_pcs_ctor.
397
398 2016-01-12  Josh Stone  <jistone@redhat.com>
399             Philippe Waroquiers  <philippe.waroquiers@skynet.be>
400
401         * inferiors.h: Include "gdb_vecs.h".
402         (struct process_info): Add syscalls_to_catch.
403         * inferiors.c (remove_process): Free syscalls_to_catch.
404         * remote-utils.c (prepare_resume_reply): Report syscall_entry and
405         syscall_return stops.
406         * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
407         * server.c (handle_general_set): Handle QCatchSyscalls.
408         (handle_query): Report support for QCatchSyscalls.
409         * target.h (struct target_ops): Add supports_catch_syscall.
410         (target_supports_catch_syscall): New macro.
411         * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
412         (struct lwp_info): Add syscall_state.
413         * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
414         Maintain syscall_state and syscalls_to_catch across exec.
415         (get_syscall_trapinfo): New function, proxy to the_low_target.
416         (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
417         (linux_low_filter_event): Toggle syscall_state entry/return for
418         syscall traps, and set it ignored for all others.
419         (gdb_catching_syscalls_p): New function.
420         (gdb_catch_this_syscall_p): New function.
421         (linux_wait_1): Handle SYSCALL_SIGTRAP.
422         (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
423         (linux_supports_catch_syscall): New function.
424         (linux_target_ops): Install it.
425         * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
426         (the_low_target): Install it.
427
428 2016-01-12  Mike Frysinger  <vapier@gentoo.org>
429
430         * acinclude.m4: Include new ../warning.m4 file.
431         * configure: Regenerated.
432         * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
433
434 2016-01-12  Mike Frysinger  <vapier@gentoo.org>
435
436         * ax.c (is_goto_target): Mark static.
437         * linux-low.c (register_addr): Likewise.
438         (linux_fetch_registers, linux_store_registers): Likewise.
439         * mem-break.c (any_persistent_commands): Fix old prototype.
440         (add_commands_to_breakpoint): Mark static.
441         * regcache.c (find_register_by_name): Delete unused func.
442         * remote-utils.c (hex_or_minus_one): Mark static.
443         * server.c (monitor_show_help): Mark static.
444         (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
445         handle_v_requests): Likewise.
446
447 2016-01-12  Pedro Alves  <palves@redhat.com>
448
449         Remove use of the registered trademark symbol throughout.
450
451 2016-01-08  Yao Qi  <yao.qi@linaro.org>
452
453         * remote-utils.c (getpkt): If c is '\003', call target hook
454         request_interrupt.
455
456 2016-01-06  Yao Qi  <yao.qi@linaro.org>
457
458         * linux-aarch32-low.h (arm_abi_breakpoint): Move to
459         linux-aarch32-low.c.
460         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
461         (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
462         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
463         (thumb2_breakpoint): Declare.
464         * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
465         linux-aarch32-low.h.
466         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
467         (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
468         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
469
470 2016-01-01  Joel Brobecker  <brobecker@adacore.com>
471
472         * gdbreplay.c (gdbreplay_version): Change copyright year in
473         version message.
474         * server.c (gdbserver_version): Likewise.
475
476 2015-12-28  Patrick Palka  <patrick@parcs.ath.cx>
477
478         * server.c (crc32_table): Delete.
479         (crc32): Use libiberty's xcrc32 function.
480
481 2015-12-22  Joel Brobecker  <brobecker@adacore.com>
482
483         * lynx-low.c (lynx_delete_thread_callback): New function.
484         (lynx_mourn): Properly delete our process and all of its
485         threads.  Remove call to clear_inferiors.
486
487 2015-12-22  Joel Brobecker  <brobecker@adacore.com>
488
489         * target.c (thread_search_callback): Add check that
490         the thread_stopped target callback is not NULL before
491         calling it.
492
493 2015-12-21  Yao Qi  <yao.qi@linaro.org>
494
495         * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
496         arm breakpoint.
497
498 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
499
500         * server.c (handle_query): Call target_supports_software_single_step.
501
502 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
503
504         * linux-low.c (single_step): New function.
505         (linux_resume_one_lwp_throw): Call single_step.
506         (start_step_over): Likewise.
507
508 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
509
510         * Makefile.in (SFILES): Append arch/arm-linux.c,
511         arch/arm-get-next-pcs.c.
512         (arm-linux.o): New rule.
513         (arm-get-next-pcs.o): New rule.
514         * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
515         arm-linux.o.
516         * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro.  Moved
517         to linux-aarch32-low.c.
518         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
519         (arm_breakpoint_len, thumb_breakpoint): Likewise.
520         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
521         (thumb2_breakpoint_len): Likewise.
522         (arm_is_thumb_mode): Make non-static.
523         * linux-aarch32-low.h (arm_abi_breakpoint): New macro.  Moved
524         from linux-aarch32-low.c.
525         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
526         (arm_breakpoint_len, thumb_breakpoint): Likewise.
527         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
528         (thumb2_breakpoint_len): Likewise.
529         (arm_is_thumb_mode): New declaration.
530         * linux-arm-low.c: Include arch/arm-linux.h
531         aarch/arm-get-next-pcs.h, sys/syscall.h.
532         (get_next_pcs_ops): New struct.
533         (get_next_pcs_addr_bits_remove): New function.
534         (get_next_pcs_is_thumb): New function.
535         (get_next_pcs_read_memory_unsigned_integer): Likewise.
536         (arm_sigreturn_next_pc): Likewise.
537         (get_next_pcs_syscall_next_pc): Likewise.
538         (arm_gdbserver_get_next_pcs): Likewise.
539         (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
540         Initialize.
541         * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
542         * server.h: Include gdb_vecs.h.
543
544 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
545
546         * Makefile.in (SFILES): Append common/common-regcache.c.
547         (OBS): Append common-regcache.o.
548         (common-regcache.o): New rule.
549         * regcache.c (init_register_cache): Initialize cache to
550         REG_UNAVAILABLE.
551         (regcache_raw_read_unsigned): New function.
552         * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
553         register_status enum.
554
555 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
556
557         * linux-aarch64-low.c (the_low_targets): Rename
558         breakpoint_reinsert_addr to get_next_pcs.
559         * linux-arm-low.c (the_low_targets): Likewise.
560         * linux-bfin-low.c (the_low_targets): Likewise.
561         * linux-cris-low.c (the_low_targets): Likewise.
562         * linux-crisv32-low.c (the_low_targets): Likewise.
563         * linux-low.c (can_software_single_step): Likewise.
564         (install_software_single_step_breakpoints): New function.
565         (start_step_over): Use install_software_single_step_breakpoints.
566         * linux-low.h: New CORE_ADDR vector.
567         (struct linux_target_ops) Rename breakpoint_reinsert_addr to
568         get_next_pcs.
569         * linux-mips-low.c (the_low_targets): Likewise.
570         * linux-nios2-low.c (the_low_targets): Likewise.
571         * linux-sparc-low.c (the_low_targets): Likewise.
572
573 2015-12-17  Pedro Alves  <palves@redhat.com>
574
575         * linux-low.c (linux_kill_one_lwp): Remove references to
576         LinuxThreads.
577         (kill_lwp): Remove HAVE_TKILL_SYSCALL check.  No longer fall back
578         to 'kill'.
579         (linux_init_signals): Delete.
580         (initialize_low): Adjust.
581         * thread-db.c (thread_db_init): Remove LinuxThreads reference.
582
583 2015-12-16  Pedro Alves  <palves@redhat.com>
584
585         * configure.ac (compiler warning flags): When testing a
586         -Wno-foo option, check whether -Wfoo works instead.
587         * configure: Regenerate.
588
589 2015-12-11  Don Breazeal  <donb@codesourcery.com>
590
591         * server.c (process_serial_event): Don't exit from gdbserver
592         in remote mode if there are still active inferiors.
593
594 2015-12-11  Yao Qi  <yao.qi@linaro.org>
595
596         * linux-aarch64-low.c (aarch64_breakpoint_at): Call
597         arm_breakpoint_at if the process is 32-bit.
598
599 2015-12-11  Yao Qi  <yao.qi@linaro.org>
600
601         * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
602         arm breakpoint.
603
604 2015-12-07  Yao Qi  <yao.qi@linaro.org>
605
606         * configure.srv: Append arm.o to srv_tgtobj for
607         aarch64*-*-linux* target.
608         * linux-aarch32-low.c (arm_abi_breakpoint): New macro.  Moved
609         from linux-arm-low.c.
610         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
611         (arm_breakpoint_len, thumb_breakpoint): Likewise.
612         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
613         (thumb2_breakpoint_len): Likewise.
614         (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
615         (arm_breakpoint_kinds): Likewise.
616         (arm_breakpoint_kind_from_pc): Likewise.
617         (arm_sw_breakpoint_from_kind): Likewise.
618         (arm_breakpoint_kind_from_current_state): Likewise.
619         * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
620         (arm_sw_breakpoint_from_kind): Declare.
621         (arm_breakpoint_kind_from_current_state): Declare.
622         (arm_breakpoint_at): Declare.
623         * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
624         arm_sw_breakpoint_from_kind if process is 32-bit.
625         (aarch64_breakpoint_kind_from_pc): New function.
626         (aarch64_breakpoint_kind_from_current_state): New function.
627         (the_low_target): Initialize fields breakpoint_kind_from_pc
628         and breakpoint_kind_from_current_state.
629         * linux-arm-low.c (arm_breakpoint_kinds): Move to
630         linux-aarch32-low.c.
631         (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
632         (arm_breakpoint, arm_breakpoint_len): Likewise.
633         (thumb_breakpoint, thumb_breakpoint_len): Likewise.
634         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
635         (arm_is_thumb_mode): Likewise.
636         (arm_breakpoint_at): Likewise.
637         (arm_breakpoint_kind_from_pc): Likewise.
638         (arm_sw_breakpoint_from_kind): Likewise.
639         (arm_breakpoint_kind_from_current_state): Likewise.
640
641         Revert:
642         2015-08-04  Yao Qi  <yao.qi@linaro.org>
643
644         * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
645         0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
646         * server.c (extended_protocol): Remove "static".
647         * server.h (extended_protocol): Declare it.
648
649 2015-12-04  Josh Stone  <jistone@redhat.com>
650
651         * target.h (struct target_ops) <arch_setup>: Rename to ...
652         (struct target_ops) <post_create_inferior>: ... this.
653         (target_arch_setup): Rename to ...
654         (target_post_create_inferior): ... this, calling post_create_inferior.
655         * server.c (start_inferior): Update target_arch_setup calls to
656         target_post_create_inferior.
657         * linux-low.c (linux_low_ptrace_options): Forward declare.
658         (linux_arch_setup): Update its comment for general use.
659         (linux_post_create_inferior): New, run arch_setup and setup ptrace.
660         (struct linux_target_ops): Use linux_post_create_inferior.
661         * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
662         to post_create_inferior.
663         * nto-low.c (struct nto_target_ops): Likewise.
664         * spu-low.c (struct spu_target_ops): Likewise.
665         * win32-low.c (struct win32_target_ops): Likewise.
666
667 2015-12-03  Antoine Tremblay  <antoine.tremblay@ericsson.com>
668
669         * linux-arm-low.c: Remove duplicate arch/arm.h include.
670
671 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
672
673         * linux-arm-low.c (arm_reinsert_addr): Remove function.
674         (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
675         * linux-cris-low.c (cris_reinsert_addr> Remove function.
676         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
677         * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
678         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
679         * linux-mips-low.c (mips_reinsert_addr): Remove function.
680         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
681         * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
682         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
683         * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
684         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
685
686 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
687
688         * linux-low.c (linux_look_up_symbols): Don't call
689         linux_supports_traceclone.
690         * linux-low.h (thread_db_init): Remove use_events argument.
691         * thread-db.c (thread_db_use_event): Remove global variable.
692         (struct thread_db) <td_thr_event_enable_p>: Remove field.
693         (struct thread_db) <td_create_bp>: Remove field.
694         (thread_db_create_event): Remove function.
695         (thread_db_enable_reporting): Likewise.
696         (find_one_thread): Don't check for thread_db_use_events.
697         (attach_thread): Likewise.
698         (thread_db_load_search): Remove td_thr_event_enable_p initialization.
699         (try_thread_db_load_1): Don't check for thread_db_use_events.
700         (thread_db_init): Remove use_events argument and thread events
701         handling.
702         (remove_thread_event_breakpoints): Remove function.
703         (thread_db_detach): Remove call to remove_thred_event_breakpoints.
704
705 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
706
707         * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
708         New function.
709         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
710         * linux-arm-low.c (arm_supports_hardware_single_step): New function.
711         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
712         * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
713         (struct linux_target_ops) <bfin_supports_hardware_single_step>:
714         Initialize.
715         * linux-crisv32-low.c (cris_supports_hardware_single_step):
716         New function.
717         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
718         * linux-low.c (can_hardware_single_step): Use
719         supports_hardware_single_step.
720         (can_software_single_step): New function.
721         (start_step_over): Call can_software_single_step.
722         (linux_supports_hardware_single_step): New function.
723         (struct target_ops) <supports_software_single_step>: Initialize.
724         * linux-low.h (struct linux_target_ops)
725         <supports_hardware_single_step>: Initialize.
726         * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
727         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
728         * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
729         (struct linux_target_ops) <supports_hardware_single_step> Initialize.
730         * linux-s390-low.c (s390_supports_hardware_single_step): New function.
731         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
732         * linux-sh-low.c (sh_supports_hardware_single_step): New function.
733         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
734         * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
735         (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
736         Initialize.
737         * linux-tile-low.c (tile_supports_hardware_single_step): New function.
738         (struct linux_target_ops) <tile_supports_hardware_single_step>:
739         Initialize.
740         * linux-x86-low.c (x86_supports_hardware_single_step) New function.
741         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
742         * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
743         New function.
744         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
745         * target.h (struct target_ops): <supports_software_single_step>:
746         New field.
747         (target_supports_software_single_step): New macro.
748
749 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
750
751         * linux-low.c (linux_wait_1): Fix pc advance condition.
752         * mem-break.c (reinsert_breakpoint_inserted_here): New function.
753         * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
754
755 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
756
757         * linux-arm-low.c (arm_is_thumb_mode): New function.
758         (arm_breakpoint_at): Use arm_is_thumb_mode.
759         (arm_breakpoint_kind_from_current_state): New function.
760         (struct linux_target_ops) <breakpoint_kind_from_current_state>:
761         Initialize.
762         * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
763         (linux_breakpoint_kind_from_current_state): New function.
764         (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
765         * linux-low.h (struct linux_target_ops)
766         <breakpoint_kind_from_current_state>: New field.
767         * target.h (struct target_ops): Likewise.
768         (target_breakpoint_kind_from_current_state): New macro.
769
770 2015-11-30  Pedro Alves  <palves@redhat.com>
771
772         * linux-low.c (linux_resume): Wake up the event loop before
773         returning.
774
775 2015-11-30  Pedro Alves  <palves@redhat.com>
776
777         * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
778         check.
779         (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
780         to -1.
781         * target.c (struct thread_search): New structure.
782         (thread_search_callback): New function.
783         (prev_general_thread): New global.
784         (prepare_to_access_memory, done_accessing_memory): New functions.
785         * target.h (prepare_to_access_memory, done_accessing_memory):
786         Replace macros with function declarations.
787
788 2015-11-30  Pedro Alves  <palves@redhat.com>
789
790         PR 14618
791         * linux-low.c (linux_wait_1): If the last resumed thread is gone,
792         report TARGET_WAITKIND_NO_RESUMED.
793         * remote-utils.c (prepare_resume_reply): Handle
794         TARGET_WAITKIND_NO_RESUMED.
795         * server.c (report_no_resumed): New global.
796         (handle_query) <qSupported>: Handle "no-resumed+".  Report
797         "no-resumed+" support.
798         (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
799         return error if the client doesn't support no-resumed events.
800         (push_stop_notification): New function.
801         (handle_target_event): Use it.  Report TARGET_WAITKIND_NO_RESUMED
802         events if the client supports them.
803
804 2015-11-30  Pedro Alves  <palves@redhat.com>
805
806         * linux-low.c (thread_still_has_status_pending_p): Don't check
807         vCont;t here.
808         (lwp_resumed): New function.
809         (status_pending_p_callback): Return early if the LWP is not
810         supposed to be resumed.
811
812 2015-11-30  Pedro Alves  <palves@redhat.com>
813
814         * linux-low.c (handle_extended_wait): Assert that the LWP's
815         waitstatus is TARGET_WAITKIND_IGNORE.  If GDB wants to hear about
816         thread create events, leave the new child's status pending.
817         (linux_low_filter_event): If GDB wants to hear about thread exit
818         events, leave the LWP marked dead and don't delete it.
819         (linux_wait_for_event_filtered): Don't check for thread exit.
820         (filter_exit_event): New function.
821         (linux_wait_1): Use it, when returning an exit event.
822         (linux_resume_one_lwp_throw): Assert that the LWP's
823         waitstatus is TARGET_WAITKIND_IGNORE.
824         * remote-utils.c (prepare_resume_reply): Handle
825         TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
826         * server.c (report_thread_events): New global.
827         (handle_general_set): Handle QThreadEvents.
828         (handle_query) <qSupported>: Handle and report QThreadEvents+;
829         (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
830         TARGET_WAITKIND_THREAD_EXITED.
831         * server.h (report_thread_events): Declare.
832
833 2015-11-30  Pedro Alves  <palves@redhat.com>
834
835         * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
836         the thread's last_resume_kind was resume_stop.
837
838 2015-11-30  Pedro Alves  <palves@redhat.com>
839
840         * linux-low.c (linux_attach): In non-stop mode, wait for one stop
841         before returning.
842
843 2015-11-30  Pedro Alves  <palves@redhat.com>
844
845         * server.c (handle_v_requests): Handle vCtrlC.
846
847 2015-11-30  Pedro Alves  <palves@redhat.com>
848
849         * gdbthread.h (find_any_thread_of_pid): Declare.
850         * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
851         functions.
852         * server.c (handle_query): If current_thread is NULL, look for
853         another thread of the selected process.
854
855 2015-11-26  Daniel Colascione  <dancol@dancol.org>
856             Simon Marchi  <simon.marchi@ericsson.com>
857
858         * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
859         * server.c (handle_qxfer_threads_worker): Refactor to include thread
860         name in reply.
861         * target.h (struct target_ops) <thread_name>: New field.
862         (target_thread_name): New macro.
863
864 2015-11-23  Joel Brobecker  <brobecker@adacore.com>
865
866         * regcache.h (regcache_invalidate_pid): Add declaration.
867         * regcache.c (regcache_invalidate_pid): New function, extracted
868         from regcache_invalidate.
869         (regcache_invalidate): Reimplement using regcache_invalidate_pid.
870         Add trivial documentation comment.
871         * lynx-low.c: Use regcache_invalidate_pid instead of
872         regcache_invalidate.
873
874 2015-11-23  Joel Brobecker  <brobecker@adacore.com>
875
876         * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
877         and Elf64_auxv_t if the target is Android.
878
879 2015-11-22  Doug Evans  <xdje42@gmail.com>
880
881         * target.h: #include <sys/types.h>.
882
883 2015-11-19  Pedro Alves  <palves@redhat.com>
884
885         * linux-low.c (linux_process_qsupported): Change prototype.
886         Adjust.
887         * linux-low.h (struct linux_target_ops) <process_qsupported>:
888         Change prototype.
889         * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
890         and adjust to loop over all features.
891         * server.c (handle_query) <qSupported>: Adjust to call
892         target_process_qsupported once, passing it a vector of unprocessed
893         features.
894         * target.h (struct target_ops) <process_qsupported>: Change
895         prototype.
896         (target_process_qsupported): Adjust.
897
898 2015-11-19  Pedro Alves  <palves@redhat.com>
899
900         * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
901         mode.
902         * configure: Regenerate.
903
904 2015-11-19  Pedro Alves  <palves@redhat.com>
905
906         * configure: Regenerate.
907
908 2015-11-19  Yao Qi  <yao.qi@linaro.org>
909
910         * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
911         type to uint32_t.
912
913 2015-11-19  Yao Qi  <yao.qi@linaro.org>
914
915         * linux-aarch64-low.c (enum aarch64_operand_type): New.
916         (struct aarch64_operand): Move enum out.
917
918 2015-11-19  Yao Qi  <yao.qi@linaro.org>
919
920         * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
921         struct user_fpsimd_state *.
922         (aarch64_store_fpregset): Likewise.
923
924 2015-11-19  Yao Qi  <yao.qi@linaro.org>
925
926         * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
927         struct user_pt_regs *.
928         (aarch64_store_gregset): Likewise.
929
930 2015-11-18  Pedro Alves  <palves@redhat.com>
931
932         * Makefile.in (all_object_files): Add $IPA_OBJS.
933
934 2015-11-17  Pedro Alves  <palves@redhat.com>
935
936         * win32-low.c (win32_resume): Use gdb_signal_from_host,
937         GDB_SIGNAL_0 and gdb_signal_to_string.
938
939 2015-11-17  Pedro Alves  <palves@redhat.com>
940
941         * win32-low.c (handle_output_debug_string): Remove parameter.
942         (win32_kill): Remove our_status local and adjust call to
943         handle_output_debug_string.
944         (get_child_debug_event): Adjust call to
945         handle_output_debug_string.
946
947 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
948
949         * linux-mips-low.c (mips_fill_gregset): Add cast.
950         (mips_store_gregset): Likewise.
951         (mips_fill_fpregset): Likewise.
952         (mips_store_fpregset): Likewise.
953
954 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
955
956         * linux-mips-low.c (mips_add_watchpoint): Rename private to
957         priv.
958
959 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
960
961         * linux-mips-low.c (mips_linux_new_thread): Change type of
962         watch_type to enum target_hw_bp_type.
963
964 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
965
966                 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
967                 Change return type to arm_hwbp_type.
968
969 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
970
971         * linux-aarch32-low.c (arm_fill_gregset): Add cast.
972         (arm_store_gregset): Likewise.
973         * linux-arm-low.c (arm_get_hwcap): Likewise.
974         (arm_read_description): Likewise.
975
976 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
977
978         * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
979
980 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
981
982         * linux-ppc-low.c (ppc_get_hwcap): Add cast.
983         (ppc_fill_vsxregset): Likewise.
984         (ppc_store_vsxregset): Likewise.
985         (ppc_fill_vrregset): Likewise.
986         (ppc_store_vrregset): Likewise.
987         (ppc_fill_evrregset): Likewise.
988         (ppc_store_evrregset): Likewise.
989
990 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
991
992         * linux-ppc-low.c (ppc_usrregs_info): Remove
993         forward-declaration.
994         (ppc_arch_setup): Move lower in file.
995
996 2015-10-30  Simon Marchi  <simon.marchi@ericsson.com>
997
998         * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
999         (ps_pdwrite): Likewise.
1000
1001 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
1002
1003         * linux-arm-low.c (arm_new_thread): Move pointer dereference
1004         to after assert checks.
1005
1006 2015-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1007
1008         * proc-service.c (ps_pdread): Add/adjust casts.
1009         (ps_pdwrite): Add/adjust casts.
1010
1011 2015-10-29  Simon Marchi  <simon.marchi@polymtl.ca>
1012
1013         * server.c (handle_search_memory_1): Cast return value of
1014         memmem.
1015
1016 2015-10-29  Simon Marchi  <simon.marchi@polymtl.ca>
1017
1018         * server.c (write_qxfer_response): Change type of data to
1019         gdb_byte *.
1020
1021 2015-10-29  Pedro Alves  <palves@redhat.com>
1022
1023         * mem-break.c (Z_packet_to_bkpt_type): Add cast.
1024
1025 2015-10-29  Pedro Alves  <palves@redhat.com>
1026
1027         * tracepoint.c (clear_installed_tracepoints): Add casts.
1028
1029 2015-10-29  Pedro Alves  <palves@redhat.com>
1030
1031         * server.c (handle_v_cont, process_serial_event): Add enum
1032         gdb_signal casts to signal parsing code.
1033
1034 2015-10-29  Pedro Alves  <palves@redhat.com>
1035
1036         * linux-low.h (NULL_REGSET): Define.
1037         * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1038         * linux-arm-low.c (arm_regsets): Likewise.
1039         * linux-crisv32-low.c (cris_regsets): Likewise.
1040         * linux-m68k-low.c (m68k_regsets): Likewise.
1041         * linux-mips-low.c (mips_regsets): Likewise.
1042         * linux-nios2-low.c (nios2_regsets): Likewise.
1043         * linux-ppc-low.c (ppc_regsets): Likewise.
1044         * linux-s390-low.c (s390_regsets): Likewise.
1045         * linux-sh-low.c (sh_regsets): Likewise.
1046         * linux-sparc-low.c (sparc_regsets): Likewise.
1047         * linux-tic6x-low.c (tic6x_regsets): Likewise.
1048         * linux-tile-low.c (tile_regsets): Likewise.
1049         * linux-x86-low.c (x86_regsets): Likewise.
1050         * linux-xtensa-low.c (xtensa_regsets): Likewise.
1051
1052 2015-10-29  Pedro Alves  <palves@redhat.com>
1053
1054         * linux-low.h (NULL_REGSET): Define.
1055         * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1056         * linux-arm-low.c (arm_regsets): Likewise.
1057         * linux-crisv32-low.c (cris_regsets): Likewise.
1058         * linux-m68k-low.c (m68k_regsets): Likewise.
1059         * linux-mips-low.c (mips_regsets): Likewise.
1060         * linux-nios2-low.c (nios2_regsets): Likewise.
1061         * linux-ppc-low.c (ppc_regsets): Likewise.
1062         * linux-s390-low.c (s390_regsets): Likewise.
1063         * linux-sh-low.c (sh_regsets): Likewise.
1064         * linux-sparc-low.c (sparc_regsets): Likewise.
1065         * linux-tic6x-low.c (tic6x_regsets): Likewise.
1066         * linux-tile-low.c (tile_regsets): Likewise.
1067         * linux-x86-low.c (x86_regsets): Likewise.
1068         * linux-xtensa-low.c (xtensa_regsets): Likewise.
1069
1070 2015-10-26  Doug Evans  <dje@google.com>
1071
1072         * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
1073
1074 2015-10-26  Doug Evans  <dje@google.com>
1075
1076         * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
1077
1078 2015-10-26  Doug Evans  <dje@google.com>
1079
1080         * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
1081         for debug_printf.
1082         (attach_thread, find_new_threads_callback): Ditto.
1083
1084 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1085
1086         * mem-break.h (set_breakpoint_data): Remove.
1087
1088 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1089
1090         * nto-low.c (nto_sw_breakpoint_from_kind): New function.
1091         (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1092         (initialize_low): Remove set_breakpoint_data call.
1093         * spu-low.c (spu_sw_breakpoint_from_kind): New function.
1094         (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
1095         (initialize_low): Remove set_breakpoint_data call.
1096         * win32-low.c (win32_sw_breakpoint_from_kind): New function.
1097         (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1098         (initialize_low): Remove set_breakpoint_data call.
1099
1100 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1101
1102         * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
1103         * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
1104         * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
1105         * target.h (target_breakpoint_kind_from_pc): New macro.
1106
1107 2015-10-22  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1108
1109         * linux-low.c (default_breakpoint_kind_from_pc): New function.
1110         (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
1111         the default breakpoint kind.
1112
1113 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1114
1115         * linux-arm-low.c (arm_supports_z_point_type): Add software
1116         breakpoint support.
1117
1118 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1119
1120         * linux-arm-low.c: Refactor breakpoint definitions.
1121         (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
1122         (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
1123
1124 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1125
1126         * Makefile.in: Add arm.c/o.
1127         * configure.srv: Likewise.
1128         * linux-arm-low.c (arm_breakpoint_kinds): New enum.
1129         (arm_breakpoint_kind_from_pc): New function.
1130         (arm_sw_breakpoint_from_kind): Return proper kind.
1131         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
1132
1133 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1134
1135         * linux-low.c (initialize_low): Ajdust for breakpoint global variables
1136         removal.
1137         * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
1138         (struct raw_breakpoint) <size>: Remove.
1139         (struct raw_breakpoint) <kind>: Add.
1140         (bp_size): New function.
1141         (bp_opcode): Likewise.
1142         (find_raw_breakpoint_at): Adjust for kind.
1143         (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
1144         (remove_memory_breakpoint): Adjust for kind call bp_size.
1145         (set_raw_breakpoint_at): Adjust for kind.
1146         (set_breakpoint): Likewise.
1147         (set_breakpoint_at): Call breakpoint_kind_from_pc.
1148         (delete_raw_breakpoint): Adjust for kind.
1149         (delete_breakpoint): Likewise.
1150         (find_gdb_breakpoint): Likewise.
1151         (set_gdb_breakpoint_1): Likewise.
1152         (set_gdb_breakpoint): Likewise.
1153         (delete_gdb_breakpoint_1): Likewise.
1154         (delete_gdb_breakpoint): Likewise.
1155         (uninsert_raw_breakpoint): Likewise.
1156         (reinsert_raw_breakpoint): Likewise.
1157         (set_breakpoint_data): Remove.
1158         (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
1159         (check_mem_read): Adjust for kind call bp_size.
1160         (check_mem_write): Adjust for kind call bp_size,bp_opcode.
1161         (clone_one_breakpoint): Adjust for kind.
1162         * mem-break.h (set_gdb_breakpoint): Likewise.
1163         (delete_gdb_breakpoint): Likewise.
1164         * server.c (process_serial_event): Likewise.
1165
1166 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1167
1168         * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
1169         (struct linux_target_ops) <breakpoint>: Remove.
1170         (struct linux_target_ops) <breakpoint_len>: Remove.
1171         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1172         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1173         * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
1174         (arm_sw_breakpoint_from_kind): New function.
1175         * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
1176         (struct linux_target_ops) <breakpoint>: Remove.
1177         (struct linux_target_ops) <breakpoint_len>: Remove.
1178         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1179         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1180         * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
1181         (struct linux_target_ops) <breakpoint>: Remove.
1182         (struct linux_target_ops) <breakpoint_len>: Remove.
1183         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1184         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1185         * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
1186         (struct linux_target_ops) <breakpoint>: Remove.
1187         (struct linux_target_ops) <breakpoint_len>: Remove.
1188         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1189         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1190         * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
1191         and sw_breakpoint_from_kind to increment the pc.
1192         (linux_breakpoint_kind_from_pc): New function.
1193         (linux_sw_breakpoint_from_kind): New function.
1194         (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
1195         (initialize_low): Call breakpoint_kind_from_pc and
1196         sw_breakpoint_from_kind to replace breakpoint_data/len.
1197         * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
1198         New field.
1199         (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
1200         * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
1201         (struct linux_target_ops) <breakpoint>: Remove.
1202         (struct linux_target_ops) <breakpoint_len>: Remove.
1203         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1204         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1205         * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
1206         (struct linux_target_ops) <breakpoint>: Remove.
1207         (struct linux_target_ops) <breakpoint_len>: Remove.
1208         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1209         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1210         * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
1211         (struct linux_target_ops) <breakpoint>: Remove.
1212         (struct linux_target_ops) <breakpoint_len>: Remove.
1213         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1214         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1215         * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
1216         (struct linux_target_ops) <breakpoint>: Remove.
1217         (struct linux_target_ops) <breakpoint_len>: Remove.
1218         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1219         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1220         * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
1221         (struct linux_target_ops) <breakpoint>: Remove.
1222         (struct linux_target_ops) <breakpoint_len>: Remove.
1223         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1224         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1225         * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
1226         (struct linux_target_ops) <breakpoint>: Remove.
1227         (struct linux_target_ops) <breakpoint_len>: Remove.
1228         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1229         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1230         * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
1231         (struct linux_target_ops) <breakpoint>: Remove.
1232         (struct linux_target_ops) <breakpoint_len>: Remove.
1233         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1234         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1235         * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
1236         (struct linux_target_ops) <breakpoint>: Remove.
1237         (struct linux_target_ops) <breakpoint_len>: Remove.
1238         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1239         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1240         * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
1241         (struct linux_target_ops) <breakpoint>: Remove.
1242         (struct linux_target_ops) <breakpoint_len>: Remove.
1243         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1244         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1245         * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
1246         * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
1247         (struct linux_target_ops) <breakpoint>: Remove.
1248         (struct linux_target_ops) <breakpoint_len>: Remove.
1249         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1250         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1251         * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
1252         (struct linux_target_ops) <breakpoint>: Remove.
1253         (struct linux_target_ops) <breakpoint_len>: Remove.
1254         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1255         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1256
1257 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1258
1259         * linux-cris-low.c (cris_get_pc): Remove void arg.
1260
1261 2015-10-16  Aleksandar Ristovski  <aristovski@qnx.com>
1262
1263         * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
1264         variable name.
1265
1266 2015-10-16  Aleksandar Ristovski  <aristovski@qnx.com>
1267
1268         * inferiors.c (thread_pid_matches_callback): New function.
1269         (find_thread_process): New function.
1270         (remove_thread): Reset current_thread.
1271         (remove_process): Assert threads have been removed first.
1272
1273 2015-10-15  Yao Qi  <yao.qi@linaro.org>
1274
1275         * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
1276         if it is 3.
1277         (aarch64_remove_point): Likewise.
1278         * regcache.c (regcache_register_size): New function.
1279
1280 2015-10-12  Yao Qi  <yao.qi@linaro.org>
1281
1282         * linux-aarch64-low.c: Update all callers as emit_load_store
1283         is renamed to aarch64_emit_load_store.
1284
1285 2015-10-12  Yao Qi  <yao.qi@linaro.org>
1286
1287         * linux-aarch64-low.c: Update all callers of function renaming
1288         from emit_insn to aarch64_emit_insn.
1289
1290 2015-10-12  Yao Qi  <yao.qi@linaro.org>
1291
1292         * linux-aarch64-low.c (enum aarch64_opcodes): Move to
1293         arch/aarch64-insn.h.
1294         (struct aarch64_memory_operand): Likewise.
1295         (ENCODE): Likewise.
1296         (emit_insn): Move to arch/aarch64-insn.c.
1297         (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
1298         (emit_load_store): Move to arch/aarch64-insn.c.
1299         (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
1300         (can_encode_int32): Remove.
1301
1302 2015-10-12  Yao Qi  <yao.qi@linaro.org>
1303
1304         * linux-aarch64-low.c (extract_signed_bitfield): Remove.
1305         (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
1306         (aarch64_relocate_instruction): Likewise.
1307         (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
1308         (struct aarch64_insn_visitor): Likewise.
1309
1310 2015-10-12  Yao Qi  <yao.qi@linaro.org>
1311
1312         * linux-aarch64-low.c (struct aarch64_insn_data): New.
1313         (struct aarch64_insn_visitor): New.
1314         (struct aarch64_insn_relocation_data): New.
1315         (aarch64_ftrace_insn_reloc_b): New function.
1316         (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1317         (aarch64_ftrace_insn_reloc_cb): Likewise.
1318         (aarch64_ftrace_insn_reloc_tb): Likewise.
1319         (aarch64_ftrace_insn_reloc_adr): Likewise.
1320         (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
1321         (aarch64_ftrace_insn_reloc_others): Likewise.
1322         (visitor): New.
1323         (aarch64_relocate_instruction): Use visitor.
1324
1325 2015-10-12  Yao Qi  <yao.qi@linaro.org>
1326
1327         * linux-aarch64-low.c (aarch64_relocate_instruction): Return
1328         int.  Add argument buf.
1329         (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
1330         aarch64_relocate_instruction.
1331
1332 2015-10-12  Yao Qi  <yao.qi@linaro.org>
1333
1334         * linux-aarch64-low.c (aarch64_relocate_instruction): Add
1335         argument insn.  Remove local variable insn.  Don't call
1336         target_read_uint32.
1337         (aarch64_install_fast_tracepoint_jump_pad): Call
1338         target_read_uint32.
1339
1340 2015-09-30  Yao Qi  <yao.qi@linaro.org>
1341
1342         * linux-aarch64-low.c (emit_movk): Shorten a long line.
1343         (emit_load_store_pair): Likewise.
1344
1345 2015-09-25  Simon Marchi  <simon.marchi@ericsson.com>
1346
1347         * dll.c (match_dll): Add cast(s).
1348         (unloaded_dll): Likewise.
1349         * linux-low.c (second_thread_of_pid_p): Likewise.
1350         (delete_lwp_callback): Likewise.
1351         (count_events_callback): Likewise.
1352         (select_event_lwp_callback): Likewise.
1353         (linux_set_resume_request): Likewise.
1354         * server.c (accumulate_file_name_length): Likewise.
1355         (emit_dll_description): Likewise.
1356         (handle_qxfer_threads_worker): Likewise.
1357         (visit_actioned_threads): Likewise.
1358         * thread-db.c (any_thread_of): Likewise.
1359         * tracepoint.c (same_process_p): Likewise.
1360         (match_blocktype): Likewise.
1361         (build_traceframe_info_xml): Likewise.
1362
1363 2015-09-25  Simon Marchi  <simon.marchi@ericsson.com>
1364
1365         * ax.c (gdb_parse_agent_expr): Add cast to allocation result
1366         assignment.
1367         (gdb_unparse_agent_expr): Likewise.
1368         * hostio.c (require_data): Likewise.
1369         (handle_pread): Likewise.
1370         * linux-low.c (disable_regset): Likewise.
1371         (fetch_register): Likewise.
1372         (store_register): Likewise.
1373         (get_dynamic): Likewise.
1374         (linux_qxfer_libraries_svr4): Likewise.
1375         * mem-break.c (delete_fast_tracepoint_jump): Likewise.
1376         (set_fast_tracepoint_jump): Likewise.
1377         (uninsert_fast_tracepoint_jumps_at): Likewise.
1378         (reinsert_fast_tracepoint_jumps_at): Likewise.
1379         (validate_inserted_breakpoint): Likewise.
1380         (clone_agent_expr): Likewise.
1381         * regcache.c (init_register_cache): Likewise.
1382         * remote-utils.c (putpkt_binary_1): Likewise.
1383         (decode_M_packet): Likewise.
1384         (decode_X_packet): Likewise.
1385         (look_up_one_symbol): Likewise.
1386         (relocate_instruction): Likewise.
1387         (monitor_output): Likewise.
1388         * server.c (handle_search_memory): Likewise.
1389         (handle_qxfer_exec_file): Likewise.
1390         (handle_qxfer_libraries): Likewise.
1391         (handle_qxfer): Likewise.
1392         (handle_query): Likewise.
1393         (handle_v_cont): Likewise.
1394         (handle_v_run): Likewise.
1395         (captured_main): Likewise.
1396         * target.c (write_inferior_memory): Likewise.
1397         * thread-db.c (try_thread_db_load_from_dir): Likewise.
1398         * tracepoint.c (init_trace_buffer): Likewise.
1399         (add_tracepoint_action): Likewise.
1400         (add_traceframe): Likewise.
1401         (add_traceframe_block): Likewise.
1402         (cmd_qtdpsrc): Likewise.
1403         (cmd_qtdv): Likewise.
1404         (cmd_qtstatus): Likewise.
1405         (response_source): Likewise.
1406         (response_tsv): Likewise.
1407         (cmd_qtnotes): Likewise.
1408         (gdb_collect): Likewise.
1409         (initialize_tracepoint): Likewise.
1410
1411 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
1412
1413         * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
1414         (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
1415         <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
1416         <NOP>: New.
1417         (enum aarch64_condition_codes): New enum.
1418         (w0): New static global.
1419         (fp): Likewise.
1420         (lr): Likewise.
1421         (struct aarch64_memory_operand) <type>: New
1422         MEMORY_OPERAND_POSTINDEX type.
1423         (postindex_memory_operand): New helper function.
1424         (emit_ret): New function.
1425         (emit_load_store_pair): New function, factored out of emit_stp
1426         with support for MEMORY_OPERAND_POSTINDEX.
1427         (emit_stp): Rewrite using emit_load_store_pair.
1428         (emit_ldp): New function.
1429         (emit_load_store): Likewise.
1430         (emit_ldr): Mention post-index instruction in comment.
1431         (emit_ldrh): New function.
1432         (emit_ldrb): New function.
1433         (emit_ldrsw): Mention post-index instruction in comment.
1434         (emit_str): Likewise.
1435         (emit_subs): New function.
1436         (emit_cmp): Likewise.
1437         (emit_and): Likewise.
1438         (emit_orr): Likewise.
1439         (emit_orn): Likewise.
1440         (emit_eor): Likewise.
1441         (emit_mvn): Likewise.
1442         (emit_lslv): Likewise.
1443         (emit_lsrv): Likewise.
1444         (emit_asrv): Likewise.
1445         (emit_mul): Likewise.
1446         (emit_sbfm): Likewise.
1447         (emit_sbfx): Likewise.
1448         (emit_ubfm): Likewise.
1449         (emit_ubfx): Likewise.
1450         (emit_csinc): Likewise.
1451         (emit_cset): Likewise.
1452         (emit_nop): Likewise.
1453         (emit_ops_insns): New helper function.
1454         (emit_pop): Likewise.
1455         (emit_push): Likewise.
1456         (aarch64_emit_prologue): New function.
1457         (aarch64_emit_epilogue): Likewise.
1458         (aarch64_emit_add): Likewise.
1459         (aarch64_emit_sub): Likewise.
1460         (aarch64_emit_mul): Likewise.
1461         (aarch64_emit_lsh): Likewise.
1462         (aarch64_emit_rsh_signed): Likewise.
1463         (aarch64_emit_rsh_unsigned): Likewise.
1464         (aarch64_emit_ext): Likewise.
1465         (aarch64_emit_log_not): Likewise.
1466         (aarch64_emit_bit_and): Likewise.
1467         (aarch64_emit_bit_or): Likewise.
1468         (aarch64_emit_bit_xor): Likewise.
1469         (aarch64_emit_bit_not): Likewise.
1470         (aarch64_emit_equal): Likewise.
1471         (aarch64_emit_less_signed): Likewise.
1472         (aarch64_emit_less_unsigned): Likewise.
1473         (aarch64_emit_ref): Likewise.
1474         (aarch64_emit_if_goto): Likewise.
1475         (aarch64_emit_goto): Likewise.
1476         (aarch64_write_goto_address): Likewise.
1477         (aarch64_emit_const): Likewise.
1478         (aarch64_emit_call): Likewise.
1479         (aarch64_emit_reg): Likewise.
1480         (aarch64_emit_pop): Likewise.
1481         (aarch64_emit_stack_flush): Likewise.
1482         (aarch64_emit_zero_ext): Likewise.
1483         (aarch64_emit_swap): Likewise.
1484         (aarch64_emit_stack_adjust): Likewise.
1485         (aarch64_emit_int_call_1): Likewise.
1486         (aarch64_emit_void_call_2): Likewise.
1487         (aarch64_emit_eq_goto): Likewise.
1488         (aarch64_emit_ne_goto): Likewise.
1489         (aarch64_emit_lt_goto): Likewise.
1490         (aarch64_emit_le_goto): Likewise.
1491         (aarch64_emit_gt_goto): Likewise.
1492         (aarch64_emit_ge_got): Likewise.
1493         (aarch64_emit_ops_impl): New static global variable.
1494         (aarch64_emit_ops): New target function, return
1495         &aarch64_emit_ops_impl.
1496         (struct linux_target_ops): Install it.
1497
1498 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
1499
1500         * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
1501         * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
1502         aarch64-ipa.o.
1503         * linux-aarch64-ipa.c: New file.
1504         * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
1505         and endian.h.
1506         (aarch64_get_thread_area): New target method.
1507         (extract_signed_bitfield): New helper function.
1508         (aarch64_decode_ldr_literal): New function.
1509         (enum aarch64_opcodes): New enum.
1510         (struct aarch64_register): New struct.
1511         (struct aarch64_operand): New struct.
1512         (x0): New static global.
1513         (x1): Likewise.
1514         (x2): Likewise.
1515         (x3): Likewise.
1516         (x4): Likewise.
1517         (w2): Likewise.
1518         (ip0): Likewise.
1519         (sp): Likewise.
1520         (xzr): Likewise.
1521         (aarch64_register): New helper function.
1522         (register_operand): Likewise.
1523         (immediate_operand): Likewise.
1524         (struct aarch64_memory_operand): New struct.
1525         (offset_memory_operand): New helper function.
1526         (preindex_memory_operand): Likewise.
1527         (enum aarch64_system_control_registers): New enum.
1528         (ENCODE): New macro.
1529         (emit_insn): New helper function.
1530         (emit_b): New function.
1531         (emit_bcond): Likewise.
1532         (emit_cb): Likewise.
1533         (emit_tb): Likewise.
1534         (emit_blr): Likewise.
1535         (emit_stp): Likewise.
1536         (emit_ldp_q_offset): Likewise.
1537         (emit_stp_q_offset): Likewise.
1538         (emit_load_store): Likewise.
1539         (emit_ldr): Likewise.
1540         (emit_ldrsw): Likewise.
1541         (emit_str): Likewise.
1542         (emit_ldaxr): Likewise.
1543         (emit_stxr): Likewise.
1544         (emit_stlr): Likewise.
1545         (emit_data_processing_reg): Likewise.
1546         (emit_data_processing): Likewise.
1547         (emit_add): Likewise.
1548         (emit_sub): Likewise.
1549         (emit_mov): Likewise.
1550         (emit_movk): Likewise.
1551         (emit_mov_addr): Likewise.
1552         (emit_mrs): Likewise.
1553         (emit_msr): Likewise.
1554         (emit_sevl): Likewise.
1555         (emit_wfe): Likewise.
1556         (append_insns): Likewise.
1557         (can_encode_int32_in): New helper function.
1558         (aarch64_relocate_instruction): New function.
1559         (aarch64_install_fast_tracepoint_jump_pad): Likewise.
1560         (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
1561         (struct linux_target_ops): Install aarch64_get_thread_area,
1562         aarch64_install_fast_tracepoint_jump_pad and
1563         aarch64_get_min_fast_tracepoint_insn_len.
1564
1565 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
1566
1567         * Makefile.in (aarch64-insn.o): New rule.
1568         * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
1569
1570 2015-09-21  Yao Qi  <yao.qi@linaro.org>
1571
1572         * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
1573
1574 2015-09-21  Yao Qi  <yao.qi@linaro.org>
1575
1576         * tracepoint.c (max_jump_pad_size): Remove.
1577
1578 2015-09-18  Yao Qi  <yao.qi@linaro.org>
1579
1580         * linux-aarch64-low.c: Don't include sys/uio.h.
1581         (ps_get_thread_area): Call aarch64_ps_get_thread_area.
1582
1583 2015-09-16  Wei-cheng Wang  <cole945@gmail.com>
1584
1585         * tracepoint.c (eval_result_type): Change prototype.
1586         (condition_true_at_tracepoint): Fix argument to compiled_cond.
1587
1588 2015-09-15  Pedro Alves  <palves@redhat.com>
1589
1590         * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
1591         Check whether to report exec events instead of checking whether
1592         multiprocess is enabled.
1593
1594 2015-09-15  Pedro Alves  <palves@redhat.com>
1595
1596         PR remote/18965
1597         * remote-utils.c (prepare_resume_reply): Merge
1598         TARGET_WAITKIND_VFORK_DONE switch case with the
1599         TARGET_WAITKIND_FORKED case.
1600
1601 2015-09-15  Yao Qi  <yao.qi@linaro.org>
1602
1603         * server.c (handle_query): Check string comparison using
1604         "else if" instead of "if".
1605
1606 2015-09-15  Yao Qi  <yao.qi@linaro.org>
1607
1608         * server.c (vCont_supported): New global variable.
1609         (handle_query): Set vCont_supported to 1 if "vContSupported+"
1610         matches.  Append ";vContSupported+" to own_buf.
1611         (handle_v_requests): Append ";s;S" to own_buf if target supports
1612         hardware single step or vCont_supported is false.
1613         (capture_main): Set vCont_supported to zero.
1614
1615 2015-09-15  Yao Qi  <yao.qi@linaro.org>
1616
1617         * linux-low.c (linux_supports_conditional_breakpoints): Rename
1618         it to ...
1619         (linux_supports_hardware_single_step): ... New function.
1620         (linux_target_ops): Update.
1621         * lynx-low.c (lynx_target_ops): Set field
1622         supports_hardware_single_step to target_can_do_hardware_single_step.
1623         * nto-low.c (nto_target_ops): Likewise.
1624         * spu-low.c (spu_target_ops): Likewise.
1625         * win32-low.c (win32_target_ops): Likewise.
1626         * target.c (target_can_do_hardware_single_step): New function.
1627         * target.h (struct target_ops) <supports_conditional_breakpoints>:
1628         Remove.  <supports_hardware_single_step>: New field.
1629         (target_supports_conditional_breakpoints): Remove.
1630         (target_supports_hardware_single_step): New macro.
1631         (target_can_do_hardware_single_step): Declare.
1632         * server.c (handle_query): Use target_supports_hardware_single_step
1633         instead of target_supports_conditional_breakpoints.
1634
1635 2015-09-15  Yao Qi  <yao.qi@linaro.org>
1636
1637         * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
1638         function.
1639         (struct linux_target_ops the_low_target): Install
1640         aarch64_linux_siginfo_fixup.
1641
1642 2015-09-11  Don Breazeal  <donb@codesourcery.com>
1643             Luis Machado  <lgustavo@codesourcery.com>
1644
1645         * linux-low.c (linux_mourn): Static declaration.
1646         (linux_arch_setup): Move in front of
1647         handle_extended_wait.
1648         (linux_arch_setup_thread): New function.
1649         (handle_extended_wait): Handle exec events.  Call
1650         linux_arch_setup_thread.  Make event_lwp argument a
1651         pointer-to-a-pointer.
1652         (check_zombie_leaders): Do not check stopped threads.
1653         (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
1654         (linux_low_filter_event): Add lwp and thread for exec'ing
1655         non-leader thread if leader thread has been deleted.
1656         Refactor code into linux_arch_setup_thread and call it.
1657         Pass child lwp pointer by reference to handle_extended_wait.
1658         (linux_wait_for_event_filtered): Update comment.
1659         (linux_wait_1): Prevent clobbering exec event status.
1660         (linux_supports_exec_events): New function.
1661         (linux_target_ops) <supports_exec_events>: Initialize new member.
1662         * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
1663         new member.
1664         * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
1665         * server.c (report_exec_events): New global variable.
1666         (handle_query): Handle qSupported query for exec-events feature.
1667         (captured_main): Initialize report_exec_events.
1668         * server.h (report_exec_events): Declare new global variable.
1669         * target.h (struct target_ops) <supports_exec_events>: New
1670         member.
1671         (target_supports_exec_events): New macro.
1672         * win32-low.c (win32_target_ops) <supports_exec_events>:
1673         Initialize new member.
1674
1675 2015-09-09  Markus Metzger  <markus.t.metzger@intel.com>
1676
1677         * linux-low.c (linux_low_enable_btrace): Remove.
1678         (linux_target_ops): Replace linux_low_enable_btrace with
1679         linux_enable_btrace.
1680
1681 2015-09-03  Yao Qi  <yao.qi@linaro.org>
1682
1683         * linux-aarch64-low.c (aarch64_insert_point): Call
1684         aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
1685         returns true.
1686
1687 2015-08-27  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1688
1689         * linux-low.c (check_stopped_by_breakpoint): Use
1690         GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
1691
1692 2015-08-27  Pedro Alves  <palves@redhat.com>
1693
1694         * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
1695
1696 2015-08-26  Simon Marchi  <simon.marchi@ericsson.com>
1697
1698         * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
1699         the XNEW-family equivalent.
1700         (compile_bytecodes): Likewise.
1701         * dll.c (loaded_dll): Likewise.
1702         * event-loop.c (append_callback_event): Likewise.
1703         (create_file_handler): Likewise.
1704         (create_file_event): Likewise.
1705         * hostio.c (handle_open): Likewise.
1706         * inferiors.c (add_thread): Likewise.
1707         (add_process): Likewise.
1708         * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
1709         * linux-arm-low.c (arm_new_process): Likewise.
1710         (arm_new_thread): Likewise.
1711         * linux-low.c (add_to_pid_list): Likewise.
1712         (linux_add_process): Likewise.
1713         (handle_extended_wait): Likewise.
1714         (add_lwp): Likewise.
1715         (enqueue_one_deferred_signal): Likewise.
1716         (enqueue_pending_signal): Likewise.
1717         (linux_resume_one_lwp_throw): Likewise.
1718         (linux_resume_one_thread): Likewise.
1719         (linux_read_memory): Likewise.
1720         (linux_write_memory): Likewise.
1721         * linux-mips-low.c (mips_linux_new_process): Likewise.
1722         (mips_linux_new_thread): Likewise.
1723         (mips_add_watchpoint): Likewise.
1724         * linux-x86-low.c (initialize_low_arch): Likewise.
1725         * lynx-low.c (lynx_add_process): Likewise.
1726         * mem-break.c (set_raw_breakpoint_at): Likewise.
1727         (set_breakpoint): Likewise.
1728         (add_condition_to_breakpoint): Likewise.
1729         (add_commands_to_breakpoint): Likewise.
1730         (clone_agent_expr): Likewise.
1731         (clone_one_breakpoint): Likewise.
1732         * regcache.c (new_register_cache): Likewise.
1733         * remote-utils.c (look_up_one_symbol): Likewise.
1734         * server.c (queue_stop_reply): Likewise.
1735         (start_inferior): Likewise.
1736         (queue_stop_reply_callback): Likewise.
1737         (handle_target_event): Likewise.
1738         * spu-low.c (fetch_ppc_memory): Likewise.
1739         (store_ppc_memory): Likewise.
1740         * target.c (set_target_ops): Likewise.
1741         * thread-db.c (thread_db_load_search): Likewise.
1742         (try_thread_db_load_1): Likewise.
1743         * tracepoint.c (add_tracepoint): Likewise.
1744         (add_tracepoint_action): Likewise.
1745         (create_trace_state_variable): Likewise.
1746         (cmd_qtdpsrc): Likewise.
1747         (cmd_qtro): Likewise.
1748         (add_while_stepping_state): Likewise.
1749         * win32-low.c (child_add_thread): Likewise.
1750         (get_image_name): Likewise.
1751
1752 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1753
1754         * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
1755
1756 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1757
1758         * Makefile.in (aarch64-linux.o): New rule.
1759         * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
1760         srv_tgtobj.
1761         * linux-aarch64-low.c: Include nat/aarch64-linux.h.
1762         (aarch64_init_debug_reg_state): Make it extern.
1763         (aarch64_linux_prepare_to_resume): Remove.
1764
1765 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1766
1767         * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
1768         lwp_arch_private_info and ptid_of_lwp.
1769
1770 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1771
1772         * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
1773         Find proc_info by find_process_pid.  All callers updated.
1774
1775 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1776
1777         * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
1778         Remove.
1779         (debug_reg_change_callback): Remove.
1780         (aarch64_notify_debug_reg_change): Remove.
1781
1782 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1783
1784         * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
1785         Call current_lwp_ptid.
1786
1787 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1788
1789         * linux-aarch64-low.c (debug_reg_change_callback): Use
1790         debug_printf.
1791
1792 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1793
1794         * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
1795
1796 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1797
1798         * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
1799
1800 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1801
1802         * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
1803         the code.
1804
1805 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1806
1807         * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
1808         Remove.
1809         (debug_reg_change_callback): Remove argument entry and add argument
1810         lwp.  Remove local variable thread.  Don't print thread id in the
1811         debugging output.  Don't check whether pid of thread equals to pid.
1812         (aarch64_notify_debug_reg_change): Don't set param.pid.  Call
1813         iterate_over_lwps instead find_inferior.
1814
1815 2015-08-24  Pedro Alves  <palves@redhat.com>
1816
1817         * inferiors.c (get_first_process): New function.
1818         * inferiors.h (get_first_process): New declaration.
1819         * remote-utils.c (read_ptid): Default to the first process in the
1820         list, instead of to the current thread's process.
1821
1822 2015-08-24  Pedro Alves  <palves@redhat.com>
1823
1824         * debug.c: Include gdb_sys_time.h instead of sys/time.h.
1825         * event-loop.c: Likewise.
1826         * remote-utils.c: Likewise.
1827         * tracepoint.c: Likewise.
1828
1829 2015-08-24  Pedro Alves  <palves@redhat.com>
1830
1831         * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
1832         ptid_get_lwp.
1833
1834 2015-08-21  Pedro Alves  <palves@redhat.com>
1835
1836         * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
1837         instead of literal 1.
1838
1839 2015-08-21  Pedro Alves  <palves@redhat.com>
1840
1841         * tdesc.c (default_description): Explicitly zero-initialize.
1842
1843 2015-08-21  Pedro Alves  <palves@redhat.com>
1844
1845         PR gdb/18749
1846         * inferiors.c (remove_thread): Discard any pending stop reply for
1847         this thread.
1848         * server.c (remove_all_on_match_pid): Rename to ...
1849         (remove_all_on_match_ptid): ... this.  Work with a filter ptid
1850         instead of a pid.
1851         (discard_queued_stop_replies): Change parameter to a ptid.  Now
1852         extern.
1853         (handle_v_kill, kill_inferior_callback, captured_main)
1854         (process_serial_event): Adjust.
1855         * server.h (discard_queued_stop_replies): Declare.
1856
1857 2015-08-21  Pedro Alves  <palves@redhat.com>
1858
1859         * linux-low.c (wait_for_sigstop): Always switch to no thread
1860         selected if the previously current thread dies.
1861         * lynx-low.c (lynx_request_interrupt): Use the first thread's
1862         process instead of the current thread's.
1863         * remote-utils.c (input_interrupt): Don't check if there's no
1864         current thread.
1865         * server.c (gdb_read_memory, gdb_write_memory): If setting the
1866         current thread to the general thread fails, error out.
1867         (handle_qxfer_auxv, handle_qxfer_libraries)
1868         (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
1869         (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
1870         (handle_query): Check if there's a thread selected instead of
1871         checking whether there's any thread in the thread list.
1872         (handle_qxfer_threads, handle_qxfer_btrace)
1873         (handle_qxfer_btrace_conf): Don't error out early if there's no
1874         thread in the thread list.
1875         (handle_v_cont, myresume): Don't set the current thread to the
1876         continue thread.
1877         (process_serial_event) <Hg handling>: Also set thread_id if the
1878         previous general thread is still alive.
1879         (process_serial_event) <g/G handling>: If setting the current
1880         thread to the general thread fails, error out.
1881         * spu-low.c (spu_resume, spu_request_interrupt): Use the first
1882         thread's lwp instead of the current thread's.
1883         * target.c (set_desired_thread): If the desired thread was not
1884         found, leave the current thread pointing to NULL.  Return an int
1885         (boolean) indicating success.
1886         * target.h (set_desired_thread): Change return type to int.
1887
1888 2015-08-20  Max Filippov  <jcmvbkbc@gmail.com>
1889
1890         * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
1891         * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
1892         #includes.
1893         (ps_get_thread_area): New function.
1894
1895 2015-08-19  Gary Benson  <gbenson@redhat.com>
1896
1897         * hostio.c (handle_pread): Do not attempt to read more data
1898         than hostio_reply_with_data can fit in a packet.
1899
1900 2015-08-18  Joel Brobecker  <brobecker@adacore.com>
1901
1902         * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
1903
1904 2015-08-14  Matthew Fortune  <matthew.fortune@imgtec.com>
1905
1906         * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
1907
1908 2015-08-06  Pedro Alves  <palves@redhat.com>
1909
1910         * tracepoint.c (expr_eval_result): Now an int.
1911
1912 2015-08-06  Pedro Alves  <palves@redhat.com>
1913
1914         * gdbthread.h (struct regcache): Forward declare.
1915         (struct thread_info) <regcache_data>: Now a struct regcache
1916         pointer.
1917         * inferiors.c (inferior_regcache_data)
1918         (set_inferior_regcache_data): Now work with struct regcache
1919         pointers.
1920         * inferiors.h (struct regcache): Forward declare.
1921         (inferior_regcache_data, set_inferior_regcache_data): Now work
1922         with struct regcache pointers.
1923         * regcache.c (get_thread_regcache, regcache_invalidate_thread)
1924         (free_register_cache_thread): Remove struct regcache pointer
1925         casts.
1926
1927 2015-08-06  Pedro Alves  <palves@redhat.com>
1928
1929         * server.c (captured_main): On error, print the exception message
1930         to stderr, and if run_once is set, throw a quit.
1931
1932 2015-08-06  Pedro Alves  <palves@redhat.com>
1933
1934         * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
1935         the current thread.
1936
1937 2015-08-06  Pedro Alves  <palves@redhat.com>
1938
1939         * linux-low.c (linux_write_memory): Rewrite debug output to avoid
1940         reading beyond the passed in buffer length.
1941
1942 2015-08-06  Pierre Langlois  <pierre.langlois@arm.com>
1943
1944         * tracepoint.c (symbol_list) <required>: Remove.
1945
1946 2015-08-06  Pedro Alves  <palves@redhat.com>
1947
1948         * linux-low.c (handle_extended_wait): Set the fork child's suspend
1949         count if stopping and suspending threads.
1950         (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1951         stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1952         (linux_detach): Complete an ongoing step-over.
1953         (lwp_suspended_inc, lwp_suspended_decr): New functions.  Use
1954         throughout.
1955         (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1956         (linux_wait_1): If passing a signal to the inferior after
1957         finishing a step-over, unsuspend and re-resume all lwps.  If we
1958         see a single-step event but the thread should be continuing, don't
1959         pass the trap to gdb.
1960         (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1961         internal_error instead of gdb_assert.
1962         (enqueue_pending_signal): New function.
1963         (check_ptrace_stopped_lwp_gone): Add debug output.
1964         (start_step_over): Use internal_error instead of gdb_assert.
1965         (complete_ongoing_step_over): New function.
1966         (linux_resume_one_thread): Don't resume a suspended thread.
1967         (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1968         it stepping.
1969
1970 2015-08-06  Pedro Alves  <palves@redhat.com>
1971
1972         * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1973         (linux_thread_alive): Use lwp_is_marked_dead.
1974         (extended_event_reported): Delete.
1975         (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1976         instead of extended_event_reported.
1977         (mark_lwp_dead): Don't set the 'dead' flag.  Store the waitstatus
1978         as well.
1979         (lwp_is_marked_dead): New function.
1980         (lwp_running): Use lwp_is_marked_dead.
1981         * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1982         comment.
1983
1984 2015-08-06  Pedro Alves  <palves@redhat.com>
1985
1986         * linux-low.c (linux_wait_1): Move fork event output out of the
1987         !report_to_gdb check.  Pass event_child->waitstatus to
1988         target_waitstatus_to_string instead of ourstatus.
1989
1990 2015-08-04  Yao Qi  <yao.qi@linaro.org>
1991
1992         * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1993         if current_thread is 32 bit.
1994
1995 2015-08-04  Yao Qi  <yao.qi@linaro.org>
1996
1997         * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1998         0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1999         * server.c (extended_protocol): Remove "static".
2000         * server.h (extended_protocol): Declare it.
2001
2002 2015-08-04  Yao Qi  <yao.qi@linaro.org>
2003
2004         * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
2005         both aarch64 and aarch32.
2006         (aarch64_set_pc): Likewise.
2007
2008 2015-08-04  Yao Qi  <yao.qi@linaro.org>
2009
2010         * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
2011         to srv_regobj and append arm-core.xml arm-vfpv3.xml and
2012         arm-with-neon.xml to srv_xmlfiles.
2013         * linux-aarch64-low.c: Include linux-aarch32-low.h.
2014         (is_64bit_tdesc): New function.
2015         (aarch64_linux_read_description): New function.
2016         (aarch64_arch_setup): Call aarch64_linux_read_description.
2017         (regs_info): Rename to regs_info_aarch64.
2018         (aarch64_regs_info): Return right regs_info.
2019         (initialize_low_arch): Call initialize_low_arch_aarch32.
2020
2021 2015-08-04  Yao Qi  <yao.qi@linaro.org>
2022
2023         * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
2024         * linux-aarch32-low.c: New file.
2025         * linux-aarch32-low.h: New file.
2026         * linux-arm-low.c (arm_fill_gregset): Move it to
2027         linux-aarch32-low.c.
2028         (arm_store_gregset): Likewise.
2029         (arm_fill_vfpregset): Call arm_fill_vfpregset_num
2030         (arm_store_vfpregset): Call arm_store_vfpregset_num.
2031         (arm_arch_setup): Check if PTRACE_GETREGSET works.
2032         (regs_info): Rename to regs_info_arm.
2033         (arm_regs_info): Return regs_info_aarch32 if
2034         have_ptrace_getregset is 1 and target description is
2035         arm_with_neon or arm_with_vfpv3.
2036         (initialize_low_arch): Don't call init_registers_arm_with_neon.
2037         Call initialize_low_arch_aarch32 instead.
2038
2039 2015-08-04  Yao Qi  <yao.qi@linaro.org>
2040
2041         * linux-x86-low.c (have_ptrace_getregset): Move it to ...
2042         * linux-low.c: ... here.
2043         * linux-low.h (have_ptrace_getregset): Declare it.
2044
2045 2015-08-04  Pedro Alves  <palves@redhat.com>
2046
2047         * thread-db.c (struct thread_db): Use new typedefs.
2048         (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
2049         CHK calls.
2050         (disable_thread_event_reporting): Cast result of dlsym to
2051         destination function pointer type.
2052         (thread_db_mourn): Use td_ta_delete_ftype.
2053
2054 2015-08-03  Sandra Loosemore  <sandra@codesourcery.com>
2055
2056         * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
2057         arch variant.
2058         (CDX_BREAKPOINT): Define for R2.
2059         (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
2060         (the_low_target): Add comments.
2061
2062 2015-07-30  Yao Qi  <yao.qi@linaro.org>
2063
2064         * linux-arm-low.c (arm_hwcap): Remove it.
2065         (arm_read_description): New local variable arm_hwcap.  Don't
2066         set arm_hwcap to zero.
2067
2068 2015-07-30  Yao Qi  <yao.qi@linaro.org>
2069
2070         * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
2071         Use regcache->tdesc instead.
2072         (arm_store_wmmxregset): Likewise.
2073         (arm_fill_vfpregset): Likewise.
2074         (arm_store_vfpregset): Likewise.
2075
2076 2015-07-30  Yao Qi  <yao.qi@linaro.org>
2077
2078         * linux-arm-low.c: Include arch/arm.h.
2079         (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
2080         (arm_store_gregset): Likewise.
2081
2082 2015-07-29  Simon Marchi  <simon.marchi@ericsson.com>
2083
2084         * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
2085         ptrace's 4th parameter.
2086
2087 2015-07-27  Yao Qi  <yao.qi@linaro.org>
2088
2089         * configure.srv (case aarch64*-*-linux*): Don't set
2090         srv_linux_usrregs.
2091
2092 2015-07-24  Pedro Alves  <palves@redhat.c: Likewise.om>
2093
2094         * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
2095         sys/ptrace.h.
2096         * linux-arm-low.c: Likewise.
2097         * linux-cris-low.c: Likewise.
2098         * linux-crisv32-low.c: Likewise.
2099         * linux-low.c: Likewise.
2100         * linux-m68k-low.c: Likewise.
2101         * linux-mips-low.c: Likewise.
2102         * linux-nios2-low.c: Likewise.
2103         * linux-s390-low.c: Likewise.
2104         * linux-sparc-low.c: Likewise.
2105         * linux-tic6x-low.c: Likewise.
2106         * linux-tile-low.c: Likewise.
2107         * linux-x86-low.c: Likewise.
2108
2109 2015-07-24  Pedro Alves  <palves@redhat.com>
2110
2111         * config.in: Regenerate.
2112         * configure: Regenerate.
2113
2114 2015-07-24  Pedro Alves  <palves@redhat.com>
2115
2116         * acinclude.m4: Include ../ptrace.m4.
2117         * configure.ac: Call GDB_AC_PTRACE.
2118         * config.in, configure: Regenerate.
2119
2120 2015-07-24  Yao Qi  <yao.qi@linaro.org>
2121
2122         * linux-low.c (linux_create_inferior): Remove setting to
2123         proc->priv->new_inferior.
2124         (linux_attach): Likewise.
2125         (linux_low_filter_event): Likewise.
2126         * linux-low.h (struct process_info_private) <new_inferior>: Remove.
2127
2128 2015-07-24  Yao Qi  <yao.qi@linaro.org>
2129
2130         * linux-low.c (linux_arch_setup): New function.
2131         (linux_low_filter_event): If proc->tdesc is NULL and
2132         proc->attached is true, call the_low_target.arch_setup.
2133         Otherwise, keep status pending, and return.
2134         (linux_resume_one_lwp_throw): Don't call get_pc if
2135         thread->while_stepping isn't NULL.  Don't call
2136         get_thread_regcache if proc->tdesc is NULL.
2137         (need_step_over_p): Return 0 if proc->tdesc is NULL.
2138         (linux_target_ops): Install arch_setup.
2139         * server.c (start_inferior): Call the_target->arch_setup.
2140         * target.h (struct target_ops) <arch_setup>: New field.
2141         (target_arch_setup): New marco.
2142         * lynx-low.c (lynx_target_ops): Update.
2143         * nto-low.c (nto_target_ops): Update.
2144         * spu-low.c (spu_target_ops): Update.
2145         * win32-low.c (win32_target_ops): Update.
2146
2147 2015-07-24  Yao Qi  <yao.qi@linaro.org>
2148
2149         * linux-low.c (linux_add_process): Don't set
2150         proc->priv->new_inferior.
2151         (linux_create_inferior): Set proc->priv->new_inferior to 1.
2152         (linux_attach): Likewise.
2153
2154 2015-07-24  Yao Qi  <yao.qi@linaro.org>
2155
2156         * server.c (start_inferior): Code refactor.
2157
2158 2015-07-24  Yao Qi  <yao.qi@linaro.org>
2159
2160         * server.c (process_serial_event): Set general_thread.
2161
2162 2015-07-21  Yao Qi  <yao.qi@linaro.org>
2163
2164         * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
2165         aarch64_linux_get_debug_reg_capacity.
2166
2167 2015-07-17  Yao Qi  <yao.qi@linaro.org>
2168
2169         * Makefile.in (aarch64-linux-hw-point.o): New rule.
2170         * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
2171         * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
2172         (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
2173         (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
2174         (AARCH64_HWP_ALIGNMENT): Likewise.
2175         (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
2176         (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
2177         (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
2178         (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
2179         (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
2180         (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
2181         (struct aarch64_debug_reg_state): Likewise.
2182         (struct arch_lwp_info): Likewise.
2183         (aarch64_align_watchpoint): Likewise.
2184         (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
2185         (aarch64_watchpoint_length): Likewise.
2186         (aarch64_point_encode_ctrl_reg): Likewise
2187         (aarch64_point_is_aligned): Likewise.
2188         (aarch64_align_watchpoint): Likewise.
2189         (aarch64_linux_set_debug_regs):
2190         (aarch64_dr_state_insert_one_point): Likewise.
2191         (aarch64_dr_state_remove_one_point): Likewise.
2192         (aarch64_handle_breakpoint): Likewise.
2193         (aarch64_handle_aligned_watchpoint): Likewise.
2194         (aarch64_handle_unaligned_watchpoint): Likewise.
2195         (aarch64_handle_watchpoint): Likewise.
2196
2197 2015-07-17  Yao Qi  <yao.qi@linaro.org>
2198
2199         * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
2200         and don't aarch64_get_debug_reg_state.  All callers update.
2201         (aarch64_handle_aligned_watchpoint): Likewise.
2202         (aarch64_handle_unaligned_watchpoint): Likewise.
2203         (aarch64_handle_watchpoint): Likewise.
2204         (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
2205         (aarch64_remove_point): Likewise.
2206
2207 2015-07-17  Yao Qi  <yao.qi@linaro.org>
2208
2209         * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
2210         debug_printf.
2211         (aarch64_handle_unaligned_watchpoint): Likewise.
2212
2213 2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
2214
2215         Revert the previous 3 commits:
2216         Move gdb_regex* to common/
2217         Move linux_find_memory_regions_full & co.
2218         gdbserver build-id attribute generator
2219
2220 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
2221             Jan Kratochvil  <jan.kratochvil@redhat.com>
2222
2223         gdbserver build-id attribute generator.
2224         * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
2225         (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
2226         (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
2227         (find_phdr): New.
2228         (get_dynamic): Use find_pdhr to traverse program headers.
2229         (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
2230         (compare_mapping_entry_range, struct find_memory_region_callback_data)
2231         (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
2232         (get_hex_build_id): New.
2233         (linux_qxfer_libraries_svr4): Add optional build-id attribute
2234         to reply XML document.
2235
2236 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
2237             Jan Kratochvil  <jan.kratochvil@redhat.com>
2238
2239         * target.c: Include target/target-utils.h and fcntl.h.
2240         (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
2241         (target_fileio_read_stralloc): New functions.
2242
2243 2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
2244
2245         * Makefile.in (OBS): Add gdb_regex.o.
2246         (gdb_regex.o): New.
2247         * config.in: Rebuilt.
2248         * configure: Rebuilt.
2249
2250 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
2251             Jan Kratochvil  <jan.kratochvil@redhat.com>
2252
2253         Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
2254         * Makefile.in (OBS): Add target-utils.o.
2255         (linux-maps.o, target-utils.o): New.
2256         * configure.srv (srv_linux_obj): Add linux-maps.o.
2257
2258 2015-07-15  Pierre Langlois  <pierre.langlois@arm.com>
2259
2260         * linux-aarch64-low.c (aarch64_supports_range_stepping): New
2261         function, return 1.
2262         (the_low_target): Install it.
2263
2264 2015-07-14  Pedro Alves  <palves@redhat.com>
2265
2266         * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
2267         Instead, ignore ECHILD, and throw an error for other errnos.
2268
2269 2015-07-10  Pedro Alves  <palves@redhat.com>
2270
2271         * event-loop.c (struct callback_event) <data>: Change type to
2272         gdb_client_data instance instead of gdb_client_data pointer.
2273         (append_callback_event): Adjust.
2274
2275 2015-07-10  Pierre Langlois  <pierre.langlois@arm.com>
2276
2277         * linux-aarch64-low.c: Add comments for each linux_target_ops
2278         method.  Remove comments already covered in target_ops and
2279         linux_target_ops definitions.
2280         (the_low_target): Add comments for each unimplemented method.
2281
2282 2015-07-09  Yao Qi  <yao.qi@linaro.org>
2283
2284         * linux-aarch64-low.c (aarch64_regmap): Remove.
2285         (aarch64_usrregs_info): Remove.
2286         (regs_info): Set field usrregs to NULL.
2287
2288 2015-07-02  Markus Metzger  <markus.t.metzger@intel.com>
2289
2290         * linux-low.c: Include "rsp-low.h"
2291         (linux_low_encode_pt_config, linux_low_encode_raw): New.
2292         (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
2293         (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
2294         (handle_btrace_enable_pt): New.
2295         (handle_btrace_general_set): Support "pt".
2296         (handle_btrace_conf_general_set): Support "pt:size".
2297
2298 2015-06-29  Pierre Langlois  <pierre.langlois@arm.com>
2299
2300         * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
2301         Z_PACKET_SW_BP.
2302
2303 2015-06-29  Pierre Langlois  <pierre.langlois@arm.com>
2304
2305         * linux-aarch64-low.c: Remove comment about endianness.
2306         (aarch64_breakpoint): Change type to gdb_byte[].  Set to "brk #0".
2307         (aarch64_breakpoint_at): Change type of insn to gdb_byte[].  Use
2308         memcmp.
2309
2310 2015-06-24  Gary Benson  <gbenson@redhat.com>
2311
2312         * linux-i386-ipa.c (stdint.h): Do not include.
2313         * lynx-i386-low.c (stdint.h): Likewise.
2314         * lynx-ppc-low.c (stdint.h): Likewise.
2315         * mem-break.c (stdint.h): Likewise.
2316         * thread-db.c (stdint.h): Likewise.
2317         * tracepoint.c (stdint.h): Likewise.
2318         * win32-low.c (stdint.h): Likewise.
2319
2320 2015-06-18  Simon Marchi  <simon.marchi@ericsson.com>
2321
2322         * server.c (write_qxfer_response): Update call to
2323         remote_escape_output.
2324
2325 2015-06-15  Aleksandar Ristovski  <aristovski@qnx.com
2326             Jan Kratochvil  <jan.kratochvil@redhat.com>
2327
2328         Merge multiple hex conversions.
2329         * gdbreplay.c (tohex): Rename to 'fromhex'.
2330         (logchar): Use fromhex.
2331
2332 2015-06-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
2333
2334         * server.c (handle_qxfer_libraries): Set `version' attribute for
2335         <library-list>.
2336
2337 2015-06-10  Gary Benson  <gbenson@redhat.com>
2338
2339         * target.h (struct target_ops) <multifs_open>: New field.
2340         <multifs_unlink>: Likewise.
2341         <multifs_readlink>: Likewise.
2342         * linux-low.c (nat/linux-namespaces.h): New include.
2343         (linux_target_ops): Initialize the_target->multifs_open,
2344         the_target->multifs_unlink and the_target->multifs_readlink.
2345         * hostio.h (hostio_handle_new_gdb_connection): New declaration.
2346         * hostio.c (hostio_fs_pid): New static variable.
2347         (hostio_handle_new_gdb_connection): New function.
2348         (handle_setfs): Likewise.
2349         (handle_open): Use the_target->multifs_open as appropriate.
2350         (handle_unlink): Use the_target->multifs_unlink as appropriate.
2351         (handle_readlink): Use the_target->multifs_readlink as
2352         appropriate.
2353         (handle_vFile): Handle vFile:setfs packets.
2354         * server.c (handle_query): Call hostio_handle_new_gdb_connection
2355         after target_handle_new_gdb_connection.
2356
2357 2015-06-10  Gary Benson  <gbenson@redhat.com>
2358
2359         * configure.ac (AC_CHECK_FUNCS): Add setns.
2360         * config.in: Regenerate.
2361         * configure: Likewise.
2362         * Makefile.in (SFILES): Add nat/linux-namespaces.c.
2363         (linux-namespaces.o): New rule.
2364         * configure.srv (srv_linux_obj): Add linux-namespaces.o.
2365
2366 2015-06-09  Gary Benson <gbenson@redhat.com>
2367
2368         * hostio.c (handle_open): Process mode argument with
2369         fileio_to_host_mode.
2370
2371 2015-06-01  Yao Qi  <yao.qi@linaro.org>
2372
2373         * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
2374         * linux-x86-low.c: Likewise.
2375
2376 2015-05-28  Don Breazeal  <donb@codesourcery.com>
2377
2378         * linux-low.c (handle_extended_wait): Initialize
2379         thread_info.last_resume_kind for new fork children.
2380
2381 2015-05-15  Pedro Alves  <palves@redhat.com>
2382
2383         * target.h (target_handle_new_gdb_connection): Rewrite using if
2384         wrapped in do/while.
2385
2386 2015-05-14  Joel Brobecker  <brobecker@adacore.com>
2387
2388         * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
2389         * configure, config.in: Regenerate.
2390         * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
2391         Declare typedef.
2392
2393 2015-05-12  Don Breazeal  <donb@codesourcery.com>
2394
2395         * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
2396         PTRACE_EVENT_VFORK_DONE.
2397         (linux_low_ptrace_options, extended_event_reported): Add vfork
2398         events.
2399         * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
2400         and "vforkdone" for RSP 'T' Stop Reply Packet.
2401         * server.h (report_vfork_events): Declare
2402         global variable.
2403
2404 2015-05-12  Don Breazeal  <donb@codesourcery.com>
2405
2406         * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
2407         (the_low_target) <new_fork>: Initialize new member.
2408         * linux-arm-low.c (arm_new_fork): New function.
2409         (the_low_target) <new_fork>: Initialize new member.
2410         * linux-low.c (handle_extended_wait): Call new target function
2411         new_fork.
2412         * linux-low.h (struct linux_target_ops) <new_fork>: New member.
2413         * linux-mips-low.c (mips_add_watchpoint): New function
2414         extracted from mips_insert_point.
2415         (the_low_target) <new_fork>: Initialize new member.
2416         (mips_linux_new_fork): New function.
2417         (mips_insert_point): Call mips_add_watchpoint.
2418         * linux-x86-low.c (x86_linux_new_fork): New function.
2419         (the_low_target) <new_fork>: Initialize new member.
2420
2421 2015-05-12  Don Breazeal  <donb@codesourcery.com>
2422
2423         * linux-low.c (handle_extended_wait): Implement return value,
2424         rename argument 'event_child' to 'event_lwp', handle
2425         PTRACE_EVENT_FORK, call internal_error for unrecognized event.
2426         (linux_low_ptrace_options): New function.
2427         (linux_low_filter_event): Call linux_low_ptrace_options,
2428         use different argument fo linux_enable_event_reporting,
2429         use return value from handle_extended_wait.
2430         (extended_event_reported): New function.
2431         (linux_wait_1): Call extended_event_reported and set
2432         status to report fork events.
2433         (linux_write_memory): Add pid to debug message.
2434         (reset_lwp_ptrace_options_callback): New function.
2435         (linux_handle_new_gdb_connection): New function.
2436         (linux_target_ops): Initialize new structure member.
2437         * linux-low.h (struct lwp_info) <waitstatus>: New member.
2438         * lynx-low.c: Initialize new structure member.
2439         * remote-utils.c (prepare_resume_reply): Implement stop reason
2440         "fork" for "T" stop message.
2441         * server.c (handle_query): Call handle_new_gdb_connection.
2442         * server.h (report_fork_events): Declare global flag.
2443         * target.h (struct target_ops) <handle_new_gdb_connection>:
2444         New member.
2445         (target_handle_new_gdb_connection): New macro.
2446         * win32-low.c: Initialize new structure member.
2447
2448 2015-05-12  Don Breazeal  <donb@codesourcery.com>
2449
2450         * mem-break.c (APPEND_TO_LIST): Define macro.
2451         (clone_agent_expr): New function.
2452         (clone_one_breakpoint): New function.
2453         (clone_all_breakpoints): New function.
2454         * mem-break.h: Declare new functions.
2455
2456 2015-05-12  Don Breazeal  <donb@codesourcery.com>
2457
2458         * linux-low.c (linux_supports_fork_events): New function.
2459         (linux_supports_vfork_events): New function.
2460         (linux_target_ops): Initialize new structure members.
2461         (initialize_low): Call linux_check_ptrace_features.
2462         * lynx-low.c (lynx_target_ops): Initialize new structure
2463         members.
2464         * server.c (report_fork_events, report_vfork_events):
2465         New global flags.
2466         (handle_query): Add new features to qSupported packet and
2467         response.
2468         (captured_main): Initialize new global variables.
2469         * target.h (struct target_ops) <supports_fork_events>:
2470         New member.
2471         <supports_vfork_events>: New member.
2472         (target_supports_fork_events): New macro.
2473         (target_supports_vfork_events): New macro.
2474         * win32-low.c (win32_target_ops): Initialize new structure
2475         members.
2476
2477 2015-05-12  Gary Benson <gbenson@redhat.com>
2478
2479         * server.c (handle_qxfer_exec_file): Use current process
2480         if annex is empty.
2481
2482 2015-05-08  Sandra Loosemore  <sandra@codesourcery.com>
2483
2484         * linux-nios2-low.c: Include elf/common.h.  Adjust comments.
2485         Remove HAVE_PTRACE_GETREGS conditionals.
2486         (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
2487         instead of PTRACE_GETREGS and PTRACE_SETREGS.
2488
2489 2015-05-08  Yao Qi  <yao.qi@linaro.org>
2490
2491         * linux-low.c (linux_supports_conditional_breakpoints): New
2492         function.
2493         (linux_target_ops): Install new target method.
2494         * lynx-low.c (lynx_target_ops): Install NULL hook for
2495         supports_conditional_breakpoints.
2496         * nto-low.c (nto_target_ops): Likewise.
2497         * spu-low.c (spu_target_ops): Likewise.
2498         * win32-low.c (win32_target_ops): Likewise.
2499         * server.c (handle_query): Check
2500         target_supports_conditional_breakpoints.
2501         * target.h (struct target_ops) <supports_conditional_breakpoints>:
2502         New field.
2503         (target_supports_conditional_breakpoints): New macro.
2504
2505 2015-05-06  Pedro Alves  <palves@redhat.com>
2506
2507         PR server/18081
2508         * server.c (start_inferior): If the process exits, mourn it.
2509
2510 2015-04-21  Gary Benson <gbenson@redhat.com>
2511
2512         * hostio.c (fileio_open_flags_to_host): Factored out to
2513         fileio_to_host_openflags in common/fileio.c.  Single use
2514         updated.
2515
2516 2015-04-17  Max Filippov  <jcmvbkbc@gmail.com>
2517
2518         * linux-xtensa-low.c (xtensa_fill_gregset)
2519         (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
2520         XCHAL_HAVE_LOOP.
2521
2522 2015-04-17  Max Filippov  <jcmvbkbc@gmail.com>
2523
2524         * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
2525         (regs_info): Replace usrregs pointer with NULL.
2526
2527 2015-04-17  Gary Benson  <gbenson@redhat.com>
2528
2529         * target.h (struct target_ops) <pid_to_exec_file>: New field.
2530         * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
2531         * server.c (handle_qxfer_exec_file): New function.
2532         (qxfer_packets): Add exec-file entry.
2533         (handle_query): Report qXfer:exec-file:read as supported packet.
2534
2535 2015-04-14  Romain Naour <romain.naour@openwide.fr>  (tiny change)
2536
2537         * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
2538
2539 2015-04-09  Gary Benson <gbenson@redhat.com>
2540
2541         * hostio-errno.c (errno_to_fileio_error): Remove function.
2542         Update caller to use remote_fileio_to_fio_error.
2543
2544 2015-04-09  Yao Qi  <yao.qi@linaro.org>
2545
2546         * linux-low.c (linux_insert_point): Call
2547         insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
2548         (linux_remove_point): Call remove_memory_breakpoint if type is
2549         raw_bkpt_type_sw.
2550         * linux-x86-low.c (x86_insert_point): Don't call
2551         insert_memory_breakpoint.
2552         (x86_remove_point): Don't call remove_memory_breakpoint.
2553
2554 2015-04-01  Pedro Alves  <palves@redhat.com>
2555             Cleber Rosa  <crosa@redhat.com>
2556
2557         * server.c (gdbserver_usage): Reorganize and extend the usage
2558         message.
2559
2560 2015-03-24  Pedro Alves  <palves@redhat.com>
2561
2562         * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
2563         output.  Also dump TRAP_TRACE.
2564         (linux_low_filter_event): In debug output, distinguish a
2565         resume_stop SIGSTOP from a delayed SIGSTOP.
2566
2567 2015-03-24  Gary Benson  <gbenson@redhat.com>
2568
2569         * linux-x86-low.c (x86_linux_new_thread): Moved to
2570         nat/x86-linux.c.
2571         (x86_linux_prepare_to_resume): Likewise.
2572
2573 2015-03-24  Gary Benson  <gbenson@redhat.com>
2574
2575         * Makefile.in (x86-linux-dregs.o): New rule.
2576         * configure.srv: Add x86-linux-dregs.o to relevant targets.
2577         * linux-x86-low.c: Include nat/x86-linux-dregs.h.
2578         (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
2579         (x86_linux_dr_get): Likewise.
2580         (x86_linux_dr_set): Likewise.
2581         (update_debug_registers_callback): Likewise.
2582         (x86_linux_dr_set_addr): Likewise.
2583         (x86_linux_dr_get_addr): Likewise.
2584         (x86_linux_dr_set_control): Likewise.
2585         (x86_linux_dr_get_control): Likewise.
2586         (x86_linux_dr_get_status): Likewise.
2587         (x86_linux_update_debug_registers): Likewise.
2588
2589 2015-03-24  Gary Benson  <gbenson@redhat.com>
2590
2591         * linux-x86-low.c (x86_linux_update_debug_registers):
2592         New function, factored out from...
2593         (x86_linux_prepare_to_resume): ...this.
2594
2595 2015-03-24  Gary Benson  <gbenson@redhat.com>
2596
2597         * linux-x86-low.c (x86_linux_dr_get): Update comments.
2598         (x86_linux_dr_set): Likewise.
2599         (update_debug_registers_callback): Likewise.
2600         (x86_linux_dr_set_addr): Likewise.
2601         (x86_linux_dr_get_addr): Likewise.
2602         (x86_linux_dr_set_control): Likewise.
2603         (x86_linux_dr_get_control): Likewise.
2604         (x86_linux_dr_get_status): Likewise.
2605         (x86_linux_prepare_to_resume): Likewise.
2606
2607 2015-03-24  Gary Benson  <gbenson@redhat.com>
2608
2609         * linux-x86-low.c (x86_linux_dr_get): Add assertion.
2610         Use perror_with_name.  Pass string through gettext.
2611         (x86_linux_dr_set): Likewise.
2612
2613 2015-03-24  Gary Benson  <gbenson@redhat.com>
2614
2615         * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
2616         (x86_linux_dr_set_addr): ...this.
2617         (x86_dr_low_get_addr): Rename to...
2618         (x86_linux_dr_get_addr): ...this.
2619         (x86_dr_low_set_control): Rename to...
2620         (x86_linux_dr_set_control): ...this.
2621         (x86_dr_low_get_control): Rename to...
2622         (x86_linux_dr_get_control): ...this.
2623         (x86_dr_low_get_status): Rename to...
2624         (x86_linux_dr_get_status): ...this.
2625         (x86_dr_low): Update with new function names.
2626
2627 2015-03-24  Gary Benson  <gbenson@redhat.com>
2628
2629         * Makefile.in (x86-linux.o): New rule.
2630         * configure.srv: Add x86-linux.o to relevant targets.
2631         * linux-low.c (lwp_set_arch_private_info): New function.
2632         (lwp_arch_private_info): Likewise.
2633         * linux-x86-low.c: Include nat/x86-linux.h.
2634         (arch_lwp_info): Removed structure.
2635         (update_debug_registers_callback):
2636         Use lwp_set_debug_registers_changed.
2637         (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
2638         and lwp_set_debug_registers_changed.
2639         (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
2640
2641 2015-03-24  Gary Benson  <gbenson@redhat.com>
2642
2643         * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
2644         * linux-arm-low.c (arm_new_thread): Likewise.
2645         * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
2646         * linux-mips-low.c (mips_linux_new_thread): Likewise.
2647         * linux-x86-low.c (x86_linux_new_thread): Likewise.
2648         * linux-low.c (add_lwp): Update the_low_target.new_thread call.
2649
2650 2015-03-24  Gary Benson  <gbenson@redhat.com>
2651
2652         * linux-low.c (ptid_of_lwp): New function.
2653         (lwp_is_stopped): Likewise.
2654         (lwp_stop_reason): Likewise.
2655         * linux-x86-low.c (update_debug_registers_callback):
2656         Use lwp_is_stopped.
2657         (x86_linux_prepare_to_resume): Use ptid_of_lwp and
2658         lwp_stop_reason.
2659
2660 2015-03-24  Gary Benson  <gbenson@redhat.com>
2661
2662         * linux-low.h (linux_stop_lwp): Remove declaration.
2663
2664 2015-03-24  Gary Benson  <gbenson@redhat.com>
2665
2666         * linux-low.h: Include nat/linux-nat.h.
2667         * linux-low.c (iterate_over_lwps_args): New structure.
2668         (iterate_over_lwps_filter): New function.
2669         (iterate_over_lwps): Likewise.
2670         * linux-x86-low.c (update_debug_registers_callback):
2671         Update signature to what iterate_over_lwps expects.
2672         Remove PID check that iterate_over_lwps now performs.
2673         (x86_dr_low_set_addr): Use iterate_over_lwps.
2674         (x86_dr_low_set_control): Likewise.
2675
2676 2015-03-24  Gary Benson  <gbenson@redhat.com>
2677
2678         * linux-x86-low.c (x86_debug_reg_state): New function.
2679         (x86_linux_prepare_to_resume): Use the above.
2680
2681 2015-03-24  Gary Benson  <gbenson@redhat.com>
2682
2683         * linux-low.c (current_lwp_ptid): New function.
2684         * linux-x86-low.c: Include nat/linux-nat.h.
2685         (x86_dr_low_get_addr): Use current_lwp_ptid.
2686         (x86_dr_low_get_control): Likewise.
2687         (x86_dr_low_get_status): Likewise.
2688
2689 2015-03-20  Pedro Alves  <palves@redhat.com>
2690
2691         * tracepoint.c (cmd_qtstatus): Make "str" const.
2692
2693 2015-03-20  Pedro Alves  <palves@redhat.com>
2694
2695         * server.c (handle_general_set): Make "req_str" const.
2696
2697 2015-03-19  Pedro Alves  <palves@redhat.com>
2698
2699         * linux-low.c (linux_resume_one_lwp): Rename to ...
2700         (linux_resume_one_lwp_throw): ... this.  Don't handle ESRCH here,
2701         instead call perror_with_name.
2702         (check_ptrace_stopped_lwp_gone): New function.
2703         (linux_resume_one_lwp): Reimplement as wrapper around
2704         linux_resume_one_lwp_throw that swallows errors if the LWP is
2705         gone.
2706
2707 2015-03-19  Pedro Alves  <palves@redhat.com>
2708
2709         * linux-low.c (count_events_callback, select_event_lwp_callback):
2710         No longer check whether the thread has resume_stop as last resume
2711         kind.
2712
2713 2015-03-19 Pedro Alves  <palves@redhat.com>
2714
2715         * linux-low.c (count_events_callback, select_event_lwp_callback):
2716         Use the lwp's status_pending_p field, not the thread's.
2717
2718 2015-03-19  Pedro Alves  <palves@redhat.com>
2719
2720         * linux-low.c (select_event_lwp_callback): Update comments to
2721         no longer mention SIGTRAP.
2722
2723 2015-03-18  Gary Benson  <gbenson@redhat.com>
2724
2725         * server.c (handle_query): Do not report vFile:fstat as supported.
2726
2727 2015-03-11  Gary Benson  <gbenson@redhat.com>
2728
2729         * hostio.c (sys/types.h): New include.
2730         (sys/stat.h): Likewise.
2731         (common-remote-fileio.h): Likewise.
2732         (handle_fstat): New function.
2733         (handle_vFile): Handle vFile:fstat packets.
2734
2735 2015-03-11  Gary Benson  <gbenson@redhat.com>
2736
2737         * configure.ac (AC_CHECK_MEMBERS): Add checks for
2738         struct stat.st_blocks and struct stat.st_blksize.
2739         * configure: Regenerate.
2740         * config.in: Likewise.
2741         * Makefile.in (SFILES): Add common/common-remote-fileio.c.
2742         (OBS): Add common-remote-fileio.o.
2743         (common-remote-fileio.o): New rule.
2744
2745 2015-03-09  Pedro Alves  <palves@redhat.com>
2746
2747         * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
2748         'struct sockaddr' pointer in 'accept' call.
2749
2750 2015-03-09  Pedro Alves  <palves@redhat.com>
2751
2752         Revert:
2753         2015-03-07  Pedro Alves  <palves@redhat.com>
2754         * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2755         or <winsock2.h> here.  Instead include "gdb_socket.h".
2756         (remote_open): Use union gdb_sockaddr_u.
2757         * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2758         or <winsock2.h> here.  Instead include "gdb_socket.h".
2759         (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2760         * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2761         or <sys/un.h>.
2762         (init_named_socket, gdb_agent_helper_thread): Use union
2763         gdb_sockaddr_u.
2764
2765 2015-03-07  Pedro Alves  <palves@redhat.com>
2766
2767         * configure.ac (build_warnings): Move
2768         -Wdeclaration-after-statement to the C-specific set.
2769         * configure: Regenerate.
2770
2771 2015-03-07  Pedro Alves  <palves@redhat.com>
2772
2773         * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2774         or <winsock2.h> here.  Instead include "gdb_socket.h".
2775         (remote_open): Use union gdb_sockaddr_u.
2776         * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2777         or <winsock2.h> here.  Instead include "gdb_socket.h".
2778         (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2779         * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2780         or <sys/un.h>.
2781         (init_named_socket, gdb_agent_helper_thread): Use union
2782         gdb_sockaddr_u.
2783
2784 2015-03-07  Pedro Alves  <palves@redhat.com>
2785
2786         Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
2787         instead.
2788
2789 2015-03-06  Yao Qi  <yao.qi@linaro.org>
2790
2791         * linux-aarch64-low.c (aarch64_insert_point): Use
2792         show_debug_regs as a boolean.
2793         (aarch64_remove_point): Likewise.
2794
2795 2015-03-05  Pedro Alves  <palves@redhat.com>
2796
2797         * lynx-low.c (lynx_target_ops): Install NULL hooks for
2798         stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2799         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
2800         * nto-low.c (nto_target_ops): Likewise.
2801         * spu-low.c (spu_target_ops): Likewise.
2802         * win32-low.c (win32_target_ops): Likewise.
2803
2804 2015-03-04  Pedro Alves  <palves@redhat.com>
2805
2806         * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
2807         Decide whether a breakpoint triggered based on the SIGTRAP's
2808         siginfo.si_code.
2809         (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
2810         breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
2811         (linux_low_filter_event): Check for breakpoints before checking
2812         watchpoints.
2813         (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
2814         siginfo.si_code.
2815         (linux_stopped_by_sw_breakpoint)
2816         (linux_supports_stopped_by_sw_breakpoint)
2817         (linux_stopped_by_hw_breakpoint)
2818         (linux_supports_stopped_by_hw_breakpoint): New functions.
2819         (linux_target_ops): Install new target methods.
2820
2821 2015-03-04  Pedro Alves  <palves@redhat.com>
2822
2823         * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
2824         * server.c (swbreak_feature, hwbreak_feature): New globals.
2825         (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
2826         (captured_main): Clear swbreak_feature and hwbreak_feature.
2827         * server.h (swbreak_feature, hwbreak_feature): Declare.
2828         * target.h (struct target_ops) <stopped_by_sw_breakpoint,
2829         supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
2830         supports_stopped_by_hw_breakpoint>: New fields.
2831         (target_supports_stopped_by_sw_breakpoint)
2832         (target_stopped_by_sw_breakpoint)
2833         (target_supports_stopped_by_hw_breakpoint)
2834         (target_stopped_by_hw_breakpoint): Declare.
2835
2836 2015-03-04  Pedro Alves  <palves@redhat.com>
2837
2838         enum lwp_stop_reason -> enum target_stop_reason
2839         * linux-low.c (check_stopped_by_breakpoint): Adjust.
2840         (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
2841         (linux_wait_1, stuck_in_jump_pad_callback)
2842         (move_out_of_jump_pad_callback, linux_resume_one_lwp)
2843         (linux_stopped_by_watchpoint):
2844         * linux-low.h (enum lwp_stop_reason): Delete.
2845         (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
2846         * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2847
2848 2015-03-04  Yao Qi  <yao.qi@linaro.org>
2849
2850         * Makefile.in (SFILES): Add linux-aarch64-low.c.
2851
2852 2015-03-03  Gary Benson  <gbenson@redhat.com>
2853
2854         * hostio.c (handle_vFile): Fix prefix lengths.
2855
2856 2015-03-03  Markus Metzger  <markus.t.metzger@intel.com>
2857
2858         * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
2859         ptr_bits.
2860
2861 2015-03-02  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2862
2863         * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
2864         (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
2865         (clean): Add "rm -f" for above C files.
2866         * configure.srv (srv_regobj): Add s390-vx-linux64.o,
2867         s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
2868         (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
2869         s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
2870         * linux-s390-low.c (HWCAP_S390_VX): New macro.
2871         (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
2872         (init_registers_s390x_vx_linux64)
2873         (init_registers_s390x_tevx_linux64)
2874         (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
2875         (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
2876         declarations.
2877         (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
2878         (s390_store_vxrs_high): New functions.
2879         (s390_regsets): Add entries for NT_S390_VXRS_LOW and
2880         NT_S390_VXRS_HIGH.
2881         (s390_arch_setup): Add logic for selecting one of the new target
2882         descriptions.  Activate the new vector regsets if applicable.
2883         (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
2884         init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
2885         and init_registers_s390x_tevx_linux64.
2886
2887 2015-03-01  Pedro Alves  <palves@redhat.com>
2888
2889         * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
2890         parameter.
2891
2892 2015-02-27  Pedro Alves  <palves@redhat.com>
2893
2894         * linux-x86-low.c (u_debugreg_offset): New function.
2895         (x86_linux_dr_get, x86_linux_dr_set): Use it.
2896
2897 2015-02-27  Pedro Alves  <palves@redhat.com>
2898
2899         * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
2900         [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
2901         [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
2902         ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2903         (ps_lsetfpregs, ps_getpid)
2904         (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
2905         (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
2906         (ps_lsetxregs, ps_plog): Declare.
2907
2908 2015-02-27  Pedro Alves  <palves@redhat.com>
2909
2910         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
2911         IP_AGENT_EXPORT_FUNC.
2912         * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
2913         IP_AGENT_EXPORT_FUNC.
2914         * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
2915         (IP_AGENT_EXPORT): Delete.
2916         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2917         (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2918         (gdb_trampoline_buffer_error, collecting, gdb_collect)
2919         (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
2920         (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
2921         (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
2922         (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
2923         (traceframe_read_count, traceframe_write_count)
2924         (traceframes_created, trace_state_variables, get_raw_reg)
2925         (get_trace_state_variable_value, set_trace_state_variable_value)
2926         (ust_loaded, helper_thread_id, cmd_buf): Use
2927         IPA_SYM_EXPORTED_NAME.
2928         (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
2929         (tracepoints) Use IP_AGENT_EXPORT_VAR.
2930         (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
2931         IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2932         (last_tracepoint): Move into !IN_PROCESS_AGENT block.
2933         (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
2934         EXTERN_C_PUSH/EXTERN_C_POP.
2935         (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
2936         (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
2937         wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2938         (trace_buffer_ctrl, trace_buffer_ctrl_curr)
2939         (traceframe_write_count, traceframe_read_count)
2940         (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
2941         (about_to_request_buffer_space, get_trace_state_variable_value)
2942         (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
2943         (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
2944         EXTERN_C_PUSH/EXTERN_C_POP.
2945         (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2946         (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2947         (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2948         and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2949         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2950         (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2951         (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2952         * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2953         Define.
2954         (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2955         (IP_AGENT_EXPORT_VAR_DECL): Define.
2956         (tracing): Declare.
2957         (gdb_agent_get_raw_reg): Declare.
2958
2959 2015-02-27  Tom Tromey  <tromey@redhat.com>
2960             Pedro Alves  <palves@redhat.com>
2961
2962         Rename symbols whose names are reserved C++ keywords throughout.
2963
2964 2015-02-27  Pedro Alves  <palves@redhat.com>
2965
2966         * Makefile.in (COMPILER): New, get it from autoconf.
2967         (CXX): Get from autoconf instead.
2968         (COMPILE.pre): Use COMPILER.
2969         (CC-LD): Rename to ...
2970         (CC_LD): ... this.  Use COMPILER.
2971         (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2972         (CXX_FOR_TARGET): Default to g++ instead of gcc.
2973         * acinclude.m4: Include build-with-cxx.m4.
2974         * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2975         Disable -Werror by default if building in C++ mode.
2976         (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2977         -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2978         the C++ compiler.  Save/restore CXXFLAGS too.
2979         * configure: Regenerate.
2980
2981 2015-02-27  Pedro Alves  <palves@redhat.com>
2982
2983         * acinclude.m4: Include libiberty.m4.
2984         * configure.ac: Call libiberty_INIT.
2985         * config.in, configure: Regenerate.
2986
2987 2015-02-26  Pedro Alves  <palves@redhat.com>
2988
2989         * linux-low.c (linux_wait_1): When incrementing the PC past a
2990         program breakpoint always use the_low_target.breakpoint_len as
2991         increment, rather than the maximum between that and
2992         the_low_target.decr_pc_after_break.
2993
2994 2015-02-23  Pedro Alves  <palves@redhat.com>
2995
2996         * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2997         thread was doing a step-over; always adjust the PC if
2998         we stepped over a permanent breakpoint.
2999         (linux_wait_1): If we stepped over breakpoint that was on top of a
3000         permanent breakpoint, manually advance the PC past it.
3001
3002 2015-02-23  Pedro Alves  <palves@redhat.com>
3003
3004         * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
3005         modes.
3006         (x86_fill_gregset, x86_store_gregset): Use it when handling
3007         $orig_eax.
3008
3009 2015-02-20  Pedro Alves  <palves@redhat.com>
3010
3011         * thread-db.c: Include "nat/linux-procfs.h".
3012         (thread_db_init): Skip listing new threads if the kernel supports
3013         PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
3014
3015 2015-02-20  Pedro Alves  <palves@redhat.com>
3016
3017         * linux-low.c (status_pending_p_callback): Use ptid_match.
3018
3019 2015-02-19  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3020
3021         PR breakpoints/16812
3022         * linux-low.c (wstatus_maybe_breakpoint): Remove.
3023         (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
3024         (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
3025
3026 2015-02-10  Antoine Tremblay <antoine.tremblay@ericsson.com>
3027
3028         PR breakpoints/15956
3029         * tracepoint.c (cmd_qtinit): Add check for current_thread.
3030
3031 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
3032
3033         * linux-low.c (linux_low_btrace_conf): Print size.
3034         * server.c (handle_btrace_conf_general_set): New.
3035         (hanle_general_set): Call handle_btrace_conf_general_set.
3036         (handle_query): Report Qbtrace-conf:bts:size as supported.
3037
3038 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
3039
3040         * linux-low.c (linux_low_enable_btrace): Update parameters.
3041         (linux_low_btrace_conf): New.
3042         (linux_target_ops)<to_btrace_conf>: Initialize.
3043         * server.c (current_btrace_conf): New.
3044         (handle_btrace_enable): Rename to ...
3045         (handle_btrace_enable_bts): ... this.  Pass &current_btrace_conf
3046         to target_enable_btrace.  Update comment.  Update users.
3047         (handle_qxfer_btrace_conf): New.
3048         (qxfer_packets): Add btrace-conf entry.
3049         (handle_query): Report qXfer:btrace-conf:read as supported packet.
3050         * target.h (target_ops)<enable_btrace>: Update parameters and comment.
3051         (target_ops)<read_btrace_conf>: New.
3052         (target_enable_btrace): Update parameters.
3053         (target_read_btrace_conf): New.
3054
3055 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
3056
3057         * server.c (handle_btrace_general_set): Remove call to
3058         target_supports_btrace.
3059         (supported_btrace_packets): New.
3060         (handle_query): Call supported_btrace_packets.
3061         * target.h: include btrace-common.h.
3062         (btrace_target_info): Removed.
3063         (supports_btrace, target_supports_btrace): Update parameters.
3064
3065 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
3066
3067         * Makefile.in (SFILES): Add common/btrace-common.c.
3068         (OBS): Add common/btrace-common.o.
3069         (btrace-common.o): Add build rules.
3070         * linux-low: Include btrace-common.h.
3071         (linux_low_read_btrace): Use struct btrace_data.  Call
3072         btrace_data_init and btrace_data_fini.
3073
3074 2015-02-06  Pedro Alves  <palves@redhat.com>
3075
3076         * thread-db.c (find_new_threads_callback): Add debug output.
3077
3078 2015-02-04  Pedro Alves  <palves@redhat.com>
3079
3080         * linux-low.c (handle_extended_wait): Don't resume LWPs here.
3081         (resume_stopped_resumed_lwps): New function.
3082         (linux_wait_for_event_filtered): Use it.
3083
3084 2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
3085
3086         * Makefile.in (SFILES): Add linux-personality.c.
3087         (linux-personality.o): New rule.
3088         * configure.srv (srv_linux_obj): Add linux-personality.o to the
3089         list of objects to be built.
3090         * linux-low.c: Include nat/linux-personality.h.
3091         (linux_create_inferior): Remove code to disable address space
3092         randomization (moved to ../nat/linux-personality.c).  Create
3093         cleanup to disable address space randomization.
3094
3095 2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
3096
3097         * Makefile.in (posix-strerror.o): New rule.
3098         (mingw-strerror.o): Likewise.
3099         * configure: Regenerated.
3100         * configure.ac: Source file ../common/common.host.  Initialize new
3101         variable srv_host_obs.  Add srv_host_obs to GDBSERVER_DEPFILES.
3102
3103 2015-01-14  Yao Qi  <yao@codesourcery.com>
3104
3105         * Makefile.in (SFILES): Add nat/ppc-linux.c.
3106         (ppc-linux.o): New rule.
3107         * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
3108         * configure.ac: AC_CHECK_FUNCS(getauxval).
3109         * config.in: Re-generated.
3110         * configure: Re-generated.
3111         * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
3112         ppc64_64bit_inferior_p
3113
3114 2015-01-14  Yao Qi  <yao@codesourcery.com>
3115
3116         * linux-ppc-low.c: Include "nat/ppc-linux.h".
3117          (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
3118         (PPC_FEATURE_HAS_ALTIVEC,  PPC_FEATURE_HAS_SPE): Likewise.
3119         (PT_ORIG_R3, PT_TRAP): Likewise.
3120         (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
3121         (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
3122         (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
3123
3124 2015-01-10  Joel Brobecker  <brobecker@adacore.com>
3125
3126         * i387-fp.c (i387_cache_to_xsave): In look over
3127         num_avx512_zmmh_high_registers, replace use of struct i387_xsave
3128         zmmh_low_space field by use of zmmh_high_space.
3129
3130 2015-01-09  Pedro Alves  <palves@redhat.com>
3131
3132         * linux-low.c (step_over_bkpt): Move higher up in the file.
3133         (handle_extended_wait): Don't store the stop_pc here.
3134         (get_stop_pc): Adjust comments and rename to ...
3135         (check_stopped_by_breakpoint): ... this.  Record whether the LWP
3136         stopped for a software breakpoint or hardware breakpoint.
3137         (thread_still_has_status_pending_p): New function.
3138         (status_pending_p_callback): Use
3139         thread_still_has_status_pending_p.  If the event is no longer
3140         interesting, resume the LWP.
3141         (handle_tracepoints): Add assert.
3142         (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
3143         (wstatus_maybe_breakpoint): New function.
3144         (cancel_breakpoint): Delete function.
3145         (check_stopped_by_watchpoint): New function, factored out from
3146         linux_low_filter_event.
3147         (lp_status_maybe_breakpoint): Delete function.
3148         (linux_low_filter_event): Remove filter_ptid argument.
3149         Leave thread group exits pending here.  Store the LWP's stop PC.
3150         Always leave events pending.
3151         (linux_wait_for_event_filtered): Pull all events out of the
3152         kernel, and leave them all pending.
3153         (count_events_callback, select_event_lwp_callback): Consider all
3154         events.
3155         (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
3156         (select_event_lwp): Only give preference to the stepping LWP in
3157         all-stop mode.  Adjust comments.
3158         (ignore_event): New function.
3159         (linux_wait_1): Delete 'retry' label.  Use ignore_event.  Remove
3160         references to cancel_breakpoints.  Adjust to renames.  Also give
3161         equal priority to all LWPs that have had events in non-stop mode.
3162         If reporting a software breakpoint event, unadjust the LWP's PC.
3163         (linux_wait): If linux_wait_1 returned an ignored event, retry.
3164         (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
3165         Adjust.
3166         (linux_resume_one_lwp): Store the LWP's PC.  Adjust.
3167         (resume_status_pending_p): Use thread_still_has_status_pending_p.
3168         (linux_stopped_by_watchpoint): Adjust.
3169         (linux_target_ops): Remove reference to linux_cancel_breakpoints.
3170         * linux-low.h (enum lwp_stop_reason): New.
3171         (struct lwp_info) <stop_pc>: Adjust comment.
3172         <stopped_by_watchpoint>: Delete field.
3173         <stop_reason>: New field.
3174         * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3175         * mem-break.c (software_breakpoint_inserted_here)
3176         (hardware_breakpoint_inserted_here): New function.
3177         * mem-break.h (software_breakpoint_inserted_here)
3178         (hardware_breakpoint_inserted_here): Declare.
3179         * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
3180         (cancel_breakpoints): Delete.
3181         * tracepoint.c (clear_installed_tracepoints, stop_tracing)
3182         (upload_fast_traceframes): Remove references to
3183         cancel_breakpoints.
3184
3185 2015-01-09  Pedro Alves  <palves@redhat.com>
3186
3187         * thread-db.c (find_new_threads_callback): Ignore thread if the
3188         kernel thread ID is -1.
3189
3190 2015-01-09  Pedro Alves  <palves@redhat.com>
3191
3192         * linux-low.c (linux_attach_fail_reason_string): Move to
3193         nat/linux-ptrace.c, and rename.
3194         (linux_attach_lwp): Update comment.
3195         (attach_proc_task_lwp_callback): New function.
3196         (linux_attach): Adjust to rename and use
3197         linux_proc_attach_tgid_threads.
3198         (linux_attach_fail_reason_string): Delete declaration.
3199
3200 2015-01-01  Joel Brobecker  <brobecker@adacore.com>
3201
3202         * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
3203         * server.c (gdbserver_version): Likewise.
3204
3205 2014-12-29  Sergio Durigan Junior  <sergiodj@redhat.com>
3206
3207         * remote-utils.c: Include ctype.h.
3208         (input_interrupt): Explicitly handle the case when the char
3209         received is the NUL byte.  Improve the printing of non-ASCII
3210         characters.
3211
3212 2014-12-16  Joel Brobecker  <brobecker@adacore.com>
3213
3214         * linux-low.c (linux_low_filter_event): Update call to
3215         linux_enable_event_reporting following the addition of
3216         a new parameter to that function.
3217
3218 2014-12-16  Catalin Udma  <catalin.udma@freescale.com>
3219
3220         PR server/17457
3221         * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
3222         (AARCH64_FPCR_REGNO): Likewise.
3223         (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
3224         (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
3225         (aarch64_store_fpregset): Likewise.
3226
3227 2014-12-15  Joel Brobecker  <brobecker@adacore.com>
3228
3229         * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
3230         Remove FIXME comment about assumption about N.
3231
3232 2014-12-13  Joel Brobecker  <brobecker@adacore.com>
3233
3234         * configure.ac: If large-file support is disabled in GDBserver,
3235         pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
3236         * configure: Regenerate.
3237
3238 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3239
3240         * linux-low.c (regsets_fetch_inferior_registers): Suppress the
3241         warning upon ENODATA from ptrace.
3242         * linux-s390-low.c (s390_store_tdb): New.
3243         (s390_regsets): Add regset for NT_S390_TDB.
3244
3245 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3246
3247         * linux-low.c (regsets_store_inferior_registers): Skip regsets
3248         without a fill_function.
3249         * linux-s390-low.c (s390_fill_last_break): Remove.
3250         (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
3251         (s390_arch_setup): Use regset's size instead of fill_function for
3252         loop end condition.
3253
3254 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3255
3256         * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
3257         the regset's store function when ptrace returned an error.
3258         * regcache.c (get_thread_regcache): Invalidate register cache
3259         before fetching inferior's registers.
3260
3261 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3262
3263         * linux-low.c (regsets_fetch_inferior_registers): Rephrase
3264         while-loop as for-loop.
3265         (regsets_store_inferior_registers): Likewise.
3266
3267 2014-11-28  Yao Qi  <yao@codesourcery.com>
3268
3269         * configure.ac(AC_CHECK_FUNCS): Remove readlink.
3270         * config.in, configure: Re-generate.
3271         * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
3272         is defined.
3273
3274 2014-11-21  Yao Qi  <yao@codesourcery.com>
3275
3276         * configure.ac: Don't invoke AC_FUNC_ALLOCA.
3277         (AC_CHECK_HEADERS): Remove malloc.h.
3278         * configure: Re-generated.
3279         * config.in: Re-generated.
3280         * server.h: Don't include alloca.h and malloc.h.
3281         * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
3282         Don't include malloc.h.
3283
3284 2014-11-17  Joel Brobecker  <brobecker@adacore.com>
3285
3286         * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
3287         corresponding ERRNO check in same block.
3288
3289 2014-11-12  Pedro Alves  <palves@redhat.com>
3290
3291         * server.c (cont_thread): Update comment.
3292         (start_inferior, attach_inferior): No longer clear cont_thread.
3293         (handle_v_cont): No longer set cont_thread.
3294         (captured_main): Clear cont_thread each time a GDB connects.
3295
3296 2014-11-12  Pedro Alves  <palves@redhat.com>
3297
3298         * linux-low.c (linux_wait_1): Don't force a wait for the Hc
3299         thread, and don't resume all threads if the Hc thread has exited.
3300
3301 2014-11-12  Pedro Alves  <palves@redhat.com>
3302
3303         * linux-low.c (linux_request_interrupt): Always send a SIGINT to
3304         the process group instead of to a specific LWP.
3305
3306 2014-10-15  Pedro Alves  <palves@redhat.com>
3307
3308         PR server/17487
3309         * win32-arm-low.c (arm_set_thread_context): Remove current_event
3310         parameter.
3311         (arm_set_thread_context): Delete.
3312         (the_low_target): Adjust.
3313         * win32-i386-low.c (debug_registers_changed)
3314         (debug_registers_used): Delete.
3315         (update_debug_registers_callback): New function.
3316         (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
3317         needing to update their debug registers.
3318         (win32_get_current_dr): New function.
3319         (x86_dr_low_get_addr, x86_dr_low_get_control)
3320         (x86_dr_low_get_status): Fetch the debug register from the thread
3321         record's context.
3322         (i386_initial_stuff): Adjust.
3323         (i386_get_thread_context): Remove current_event parameter.  Don't
3324         clear debug_registers_changed nor copy DR values to
3325         debug_reg_state.
3326         (i386_set_thread_context): Delete.
3327         (i386_prepare_to_resume): New function.
3328         (i386_thread_added): Mark the thread as needing to update irs
3329         debug registers.
3330         (the_low_target): Remove i386_set_thread_context and install
3331         i386_prepare_to_resume.
3332         * win32-low.c (win32_get_thread_context): Adjust.
3333         (win32_set_thread_context): Use SetThreadContext
3334         directly.
3335         (win32_prepare_to_resume): New function.
3336         (win32_require_context): New function, factored out from ...
3337         (thread_rec): ... this.
3338         (continue_one_thread): Call win32_prepare_to_resume on each thread
3339         we're about to continue.
3340         (win32_resume): Call win32_prepare_to_resume on the event thread.
3341         * win32-low.h (struct win32_thread_info)
3342         <debug_registers_changed>: New field.
3343         (struct win32_target_ops): Change prototype of set_thread_context,
3344         delete set_thread_context and add prepare_to_resume.
3345         (win32_require_context): New declaration.
3346
3347 2014-10-08  Gary Benson  <gbenson@redhat.com>
3348
3349         * server.h: Do not include common-exceptions.h.
3350
3351 2014-10-08  Gary Benson  <gbenson@redhat.com>
3352
3353         * server.h: Do not include cleanups.h.
3354
3355 2014-09-30  James Hogan  <james.hogan@imgtec.com>
3356
3357         * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
3358         mips64-dsp-linux.c.
3359
3360 2014-09-23  Yao Qi  <yao@codesourcery.com>
3361
3362         * linux-low.c (lp_status_maybe_breakpoint): New function.
3363         (linux_low_filter_event): Call lp_status_maybe_breakpoint.
3364         (count_events_callback): Likewise.
3365         (select_event_lwp_callback): Likewise.
3366         (cancel_breakpoints_callback): Likewise.
3367
3368 2014-09-19  Don Breazeal  <donb@codesourcery.com>
3369
3370         * linux-low.c (handle_extended_wait): Call
3371         linux_ptrace_get_extended_event.
3372         (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
3373         linux_is_extended_waitstatus.
3374
3375 2014-09-16  Joel Brobecker  <brobecker@adacore.com>
3376
3377         * Makefile.in (CPPFLAGS): Define.
3378         (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
3379         (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
3380
3381 2014-09-16  Gary Benson  <gbenson@redhat.com>
3382
3383         * inferiors.h (current_inferior): Renamed as...
3384         (current_thread): New variable.  All uses updated.
3385         * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
3386         (maybe_move_out_of_jump_pad): Likewise.
3387         (cancel_breakpoint): Likewise.
3388         (linux_low_filter_event): Likewise.
3389         (wait_for_sigstop): Likewise.
3390         (linux_resume_one_lwp): Likewise.
3391         (need_step_over_p): Likewise.
3392         (start_step_over): Likewise.
3393         (linux_stabilize_threads): Renamed save_inferior as saved_thread.
3394         * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
3395         * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
3396         and save_inferior as saved_thread.
3397         * regcache.c (get_thread_regcache): Renamed saved_inferior as
3398         saved_thread.
3399         (regcache_invalidate_thread): Likewise.
3400         * remote-utils.c (prepare_resume_reply): Likewise.
3401         * thread-db.c (thread_db_get_tls_address): Likewise.
3402         (disable_thread_event_reporting): Likewise.
3403         (remove_thread_event_breakpoints): Likewise.
3404         * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
3405         as saved_thread.
3406         * target.h (set_desired_inferior): Renamed as...
3407         (set_desired_thread): New declaration.  All uses updated.
3408         * server.c (myresume): Updated comment to reference thread instead
3409         of inferior.
3410         (handle_serial_event): Likewise.
3411         (handle_target_event): Likewise.
3412
3413 2014-09-12  Tom Tromey  <tromey@redhat.com>
3414             Gary Benson  <gbenson@redhat.com>
3415
3416         * regcache.h: Include common-regcache.h.
3417         (regcache_read_pc): Don't declare.
3418         * regcache.c (get_thread_regcache_for_ptid): New function.
3419
3420 2014-09-11  Tom Tromey  <tromey@redhat.com>
3421             Gary Benson  <gbenson@redhat.com>
3422
3423         * symbol.c: New file.
3424         * Makefile.in (SFILES): Add symbol.c.
3425         (OBS): Add symbol.o.
3426
3427 2014-09-11  Gary Benson  <gbenson@redhat.com>
3428
3429         * target.c (target_stop_ptid, target_continue_ptid): New
3430         functions.
3431
3432 2014-09-11  Tom Tromey  <tromey@redhat.com>
3433             Gary Benson  <gbenson@redhat.com>
3434
3435         * target.h: Include target/target.h.
3436         * target.c (target_read_memory, target_read_uint32)
3437         (target_write_memory): New functions.
3438
3439 2014-09-11  Gary Benson  <gbenson@redhat.com>
3440
3441         * server.h (debug_hw_points): Don't declare.
3442         * server.c (debug_hw_points): Don't define.  Replace all uses
3443         with show_debug_regs.
3444         * linux-aarch64-low.c (debug_hw_points): Don't define.  Replace
3445         all uses with show_debug_regs.
3446
3447 2014-09-08  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
3448
3449         * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
3450         endianness into account.
3451         (ppc_supply_ptrace_register): Likewise.
3452
3453 2014-09-03  James Hogan  <james.hogan@imgtec.com>
3454
3455         * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
3456         to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
3457
3458 2014-09-03  Gary Benson  <gbenson@redhat.com>
3459
3460         * linux-x86-low.c (x86_linux_prepare_to_resume): Use
3461         ALL_DEBUG_ADDRESS_REGISTERS.
3462
3463 2014-09-02  Gary Benson  <gbenson@redhat.com>
3464
3465         * i386-low.h: Renamed as...
3466         * x86-low.h: New file.  All type, function and variable name
3467         prefixes changed from "i386_" to "x86_".  All references updated.
3468         * i386-low.c: Renamed as...
3469         * x86-low.c: New file.  All type, function and variable name
3470         prefixes changed from "i386_" to "x86_".  All references updated.
3471
3472 2014-09-02  Gary Benson  <gbenson@redhat.com>
3473
3474         * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
3475         (x86_linux_new_thread): Likewise.
3476
3477 2014-08-29  Gary Benson  <gbenson@redhat.com>
3478
3479         * server.h (setjmp.h): Do not include.
3480         (toplevel): Do not declare.
3481         (common-exceptions.h): Include.
3482         (cleanups.h): Likewise.
3483         * server.c (toplevel): Do not define.
3484         (exit_code): New static global.
3485         (detach_or_kill_for_exit_cleanup): New function.
3486         (main): New function.  Original main renamed to...
3487         (captured_main): New function.
3488         * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
3489
3490 2014-08-29  Gary Benson  <gbenson@redhat.com>
3491
3492         * Makefile.in (SFILES): Add common/common-exceptions.c.
3493         (OBS): Add common-exceptions.o.
3494         (common-exceptions.o): New rule.
3495         * utils.c (prepare_to_throw_exception): New function.
3496
3497 2014-08-29  Gary Benson  <gbenson@redhat.com>
3498
3499         * config.in: Regenerate.
3500         * configure: Likewise.
3501
3502 2014-08-29  Gary Benson  <gbenson@redhat.com>
3503
3504         * Makefile.in (SFILES): Add common/cleanups.c.
3505         (OBS): cleanups.o.
3506         (cleanups.o): New rule.
3507
3508 2014-08-29  Gary Benson  <gbenson@redhat.com>
3509
3510         * utils.c (internal_vwarning): New function.
3511
3512 2014-08-28  Gary Benson  <gbenson@redhat.com>
3513
3514         * utils.h (fatal): Remove declaration.
3515         * utils.c (fatal): Remove function.
3516
3517 2014-08-28  Gary Benson  <gbenson@redhat.com>
3518
3519         * tracepoint.c (gdb_agent_init): Replace fatal with
3520         perror_with_name.
3521         (initialize_tracepoint): Likewise.
3522
3523 2014-08-28  Gary Benson  <gbenson@redhat.com>
3524
3525         * remote-utils.c (remote_prepare): Replace fatal with error.
3526
3527 2014-08-28  Gary Benson  <gbenson@redhat.com>
3528
3529         * linux-low.c (linux_async): Replace fatal with warning.
3530         Tidy up and return.
3531         (linux_start_non_stop): Return -1 if linux_async failed.
3532
3533 2014-08-28  Gary Benson  <gbenson@redhat.com>
3534
3535         * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
3536         gdb_assert.
3537         (i386_dr_low_get_addr): Remove vague comment.
3538         * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
3539         gdb_assert.
3540
3541 2014-08-28  Gary Benson  <gbenson@redhat.com>
3542
3543         * inferiors.c (get_thread_process): Replace check with gdb_assert.
3544         * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
3545         internal_error.
3546         (linux_resume_one_lwp): Likewise.
3547         * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
3548         gdb_assert.
3549         * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
3550         with internal_error.
3551         * regcache.c (get_thread_regcache): Replace check with gdb_assert.
3552         (init_register_cache): Replace fatal with gdb_assert_not_reached.
3553         (find_register_by_name): Replace fatal with internal_error.
3554         (find_regno): Likewise.
3555         * tdesc.c (init_target_desc): Replace check with gdb_assert.
3556         * thread-db.c (thread_db_create_event): Likewise.
3557         (thread_db_load_search): Likewise.
3558         (try_thread_db_load_1): Likewise.
3559         * tracepoint.c (get_jump_space_head): Replace fatal with
3560         internal_error.
3561         (claim_trampoline_space): Likewise.
3562         (have_fast_tracepoint_trampoline_buffer): Likewise.
3563         (cmd_qtstart): Likewise.
3564         (stop_tracing): Likewise.
3565         (fast_tracepoint_collecting): Likewise.
3566         (target_malloc): Likewise.
3567         (download_tracepoint): Likewise.
3568         (download_trace_state_variables): Replace check with gdb_assert.
3569         (upload_fast_traceframes): Replace fatal with internal_error.
3570
3571 2014-08-19  Tom Tromey  <tromey@redhat.com>
3572             Gary Benson  <gbenson@redhat.com>
3573
3574         * Makefile.in (SFILES): Add common/common-debug.c.
3575         (OBS): Add common-debug.o.
3576         (common-debug.o): New rule.
3577         * debug.h (debug_printf): Don't declare.
3578         * debug.c (debug_printf): Renamed and rewritten as...
3579         (debug_vprintf): New function.
3580
3581 2014-08-19  Gary Benson  <gbenson@redhat.com>
3582
3583         * utils.h: Do not include print-utils.h.
3584
3585 2014-08-19  Tom Tromey  <tromey@redhat.com>
3586             Gary Benson  <gbenson@redhat.com>
3587
3588         * server.h: Add static assertion.
3589         (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
3590
3591 2014-08-19  Tom Tromey  <tromey@redhat.com>
3592             Gary Benson  <gbenson@redhat.com>
3593
3594         * Makefile.in (SFILES): Add common/errors.c.
3595         (OBS): Add errors.o.
3596         (IPA_OBS): Add errors-ipa.o.
3597         (errors.o): New rule.
3598         (errors-ipa.o): Likewise.
3599         * utils.h (perror_with_name, error, warning): Don't declare.
3600         * utils.c (warning): Renamed and rewritten as...
3601         (vwarning): New function.
3602         (error): Renamed and rewritten as...
3603         (verror): New function.
3604         (internal_error): Renamed and rewritten as...
3605         (internal_verror): New function.
3606
3607 2014-08-07  Gary Benson  <gbenson@redhat.com>
3608
3609         * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
3610         * configure: Regenerate.
3611         * config.in: Likewise.
3612         * server.h: Do not include errno.h.
3613         * event-loop.c: Likewise.
3614         * hostio-errno.c: Likewise.
3615         * linux-low.c: Likewise.
3616         * remote-utils.c: Likewise.
3617         * spu-low.c: Likewise.
3618         * utils.c: Likewise.
3619         * gdbreplay.c: Unconditionally include errno.h.
3620
3621 2014-08-07  Gary Benson  <gbenson@redhat.com>
3622
3623         * server.h: Do not include string.h.
3624         * event-loop.c: Likewise.
3625         * linux-low.c: Likewise.
3626         * regcache.c: Likewise.
3627         * remote-utils.c: Likewise.
3628         * spu-low.c: Likewise.
3629         * utils.c: Likewise.
3630
3631 2014-08-07  Gary Benson  <gbenson@redhat.com>
3632
3633         * server.h: Do not include gdb_assert.h.
3634
3635 2014-08-07  Gary Benson  <gbenson@redhat.com>
3636
3637         * server.h: Do not include common-utils.h.
3638
3639 2014-08-07  Gary Benson  <gbenson@redhat.com>
3640
3641         * server.h: Do not include ptid.h.
3642         * notif.h: Likewise.
3643
3644 2014-08-07  Gary Benson  <gbenson@redhat.com>
3645
3646         * server.h: Do not include gdb_locale.h.
3647
3648 2014-08-07  Gary Benson  <gbenson@redhat.com>
3649
3650         * server.h: Do not include gdb/signals.h.
3651         * win32-low.c: Likewise.
3652
3653 2014-08-07  Gary Benson  <gbenson@redhat.com>
3654
3655         * server.h: Do not include pathmax.h.
3656
3657 2014-08-07  Gary Benson  <gbenson@redhat.com>
3658
3659         * server.h: Do not include libiberty.h.
3660         * linux-bfin-low.c: Likewise.
3661
3662 2014-08-07  Gary Benson  <gbenson@redhat.com>
3663
3664         * server.h: Do not include ansidecl.h.
3665
3666 2014-08-07  Gary Benson  <gbenson@redhat.com>
3667
3668         * linux-x86-low.c: Do not include stddef.h.
3669         * lynx-ppc-low.c: Likewise.
3670         * tracepoint.c: Likewise.
3671
3672 2014-08-07  Gary Benson  <gbenson@redhat.com>
3673
3674         * server.h: Do not include stdarg.h.
3675         * nto-low.c: Likewise.
3676
3677 2014-08-07  Gary Benson  <gbenson@redhat.com>
3678
3679         * server.h: Do not include stdlib.h.
3680         * inferiors.c: Likewise.
3681         * linux-low.c: Likewise.
3682         * regcache.c: Likewise.
3683         * spu-low.c: Likewise.
3684         * tracepoint.c: Likewise.
3685         * utils.c: Likewise.
3686
3687 2014-08-07  Gary Benson  <gbenson@redhat.com>
3688
3689         * server.h: Do not include stdio.h.
3690         * linux-low.c: Likewise.
3691         * remote-utils.c: Likewise.
3692         * spu-low.c: Likewise.
3693         * utils.c: Likewise.
3694         * wincecompat.c: Likewise.
3695
3696 2014-08-06  Gary Benson  <gbenson@redhat.com>
3697
3698         * regcache.c (init_register_cache): Move conditionals inside if.
3699
3700 2014-08-06  Gary Benson  <gbenson@redhat.com>
3701
3702         * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
3703
3704 2014-07-31  Gary Benson  <gbenson@redhat.com>
3705
3706         * ax.h: Do not include server.h.
3707         * gdbthread.h: Likewise.
3708         * lynx-low.h: Likewise.
3709         * notif.h: Likewise.
3710
3711 2014-07-30  Gary Benson  <gbenson@redhat.com>
3712
3713         * server.h: Include common-defs.h.
3714         Do not include config.h or build-gnulib-gdbserver/config.h.
3715
3716 2014-07-30  Gary Benson  <gbenson@redhat.com>
3717
3718         * hostio-errno.c: Move server.h to top of includes list.
3719         * inferiors.c: Likewise.
3720         * linux-x86-low.c: Likewise.
3721         * notif.c: Include server.h.
3722
3723 2014-07-24  Tom Tromey  <tromey@redhat.com>
3724             Gary Benson  <gbenson@redhat.com>
3725
3726         * server.h (CORE_ADDR): Now unsigned.
3727
3728 2014-07-16  Pedro Alves  <palves@redhat.com>
3729
3730         * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
3731
3732 2014-07-15  Pedro Alves  <palves@redhat.com>
3733
3734         * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
3735         copy.
3736
3737 2014-07-11  Pedro Alves  <palves@redhat.com>
3738
3739         * linux-low.c (kill_wait_lwp): New function, based on
3740         kill_one_lwp_callback, but use my_waitpid directly.
3741         (kill_one_lwp_callback, linux_kill): Use it.
3742
3743 2014-06-23  Pedro Alves  <palves@redhat.com>
3744
3745         * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
3746         before setting DR0..DR3.
3747
3748 2014-06-20  Gary Benson  <gbenson@redhat.com>
3749
3750         * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
3751         * configure: Regenerated.
3752         * config.in: Likewise.
3753
3754 2014-06-20  Gary Benson  <gbenson@redhat.com>
3755
3756         * Makefile.in (SFILES): Update locations for files moved
3757         from common to nat.
3758         (object file files): Reordered.
3759
3760 2014-06-20  Gary Benson  <gbenson@redhat.com>
3761
3762         * i386-low.h (i386_dr_low_can_set_addr): Removed.
3763         (i386_dr_low_set_addr): Likewise.
3764         (i386_dr_low_get_addr): Likewise.
3765         (i386_dr_low_can_set_control): Likewise.
3766         (i386_dr_low_set_control): Likewise.
3767         (i386_dr_low_get_control): Likewise.
3768         (i386_dr_low_get_status): Likewise.
3769         (i386_get_debug_register_length): Likewise.
3770         * linux-x86-low.c (i386_dr_low_set_addr):
3771         Changed signature.  Made static.
3772         (i386_dr_low_get_addr): Likewise.
3773         (i386_dr_low_set_control): Likewise.
3774         (i386_dr_low_get_control): Likewise.
3775         (i386_dr_low_get_status): Likewise.
3776         (i386_dr_low): New global variable.
3777         * win32-i386-low.c (i386_dr_low_set_addr):
3778         Changed signature.  Made static.
3779         (i386_dr_low_get_addr): Likewise.
3780         (i386_dr_low_set_control): Likewise.
3781         (i386_dr_low_get_control): Likewise.
3782         (i386_dr_low_get_status): Likewise.
3783         (i386_dr_low): New global variable.
3784
3785 2014-06-20  Marcus Shawcroft  <marcus.shawcroft@arm.com>
3786
3787         * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
3788         * Makefile.in (AR, AR_FLAGS): Define.
3789         * configure: Regenerate.
3790
3791 2014-06-19  Gary Benson  <gbenson@redhat.com>
3792
3793         * Makefile.in (i386-dregs.o): New rule.
3794         * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
3795         * i386-low.c (target.h): Remove include.
3796         (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
3797         (DR_CONTROL_SHIFT): Likewise.
3798         (DR_CONTROL_SIZE): Likewise.
3799         (DR_RW_EXECUTE): Likewise.
3800         (DR_RW_WRITE): Likewise.
3801         (DR_RW_READ): Likewise.
3802         (DR_RW_IORW): Likewise.
3803         (DR_LEN_1): Likewise.
3804         (DR_LEN_2): Likewise.
3805         (DR_LEN_4): Likewise.
3806         (DR_LEN_8): Likewise.
3807         (DR_LOCAL_ENABLE_SHIFT): Likewise.
3808         (DR_GLOBAL_ENABLE_SHIFT): Likewise.
3809         (DR_ENABLE_SIZE): Likewise.
3810         (DR_LOCAL_SLOWDOWN): Likewise.
3811         (DR_GLOBAL_SLOWDOWN): Likewise.
3812         (DR_CONTROL_RESERVED): Likewise.
3813         (I386_DR_CONTROL_MASK): Likewise.
3814         (I386_DR_VACANT): Likewise.
3815         (I386_DR_LOCAL_ENABLE): Likewise.
3816         (I386_DR_GLOBAL_ENABLE): Likewise.
3817         (I386_DR_DISABLE): Likewise.
3818         (I386_DR_SET_RW_LEN): Likewise.
3819         (I386_DR_GET_RW_LEN): Likewise.
3820         (I386_DR_WATCH_HIT): Likewise.
3821         (i386_wp_op_t): Likewise.
3822         (i386_show_dr): Likewise.
3823         (i386_length_and_rw_bits): Likewise.
3824         (i386_insert_aligned_watchpoint): Likewise.
3825         (i386_remove_aligned_watchpoint): Likewise.
3826         (i386_handle_nonaligned_watchpoint): Likewise.
3827         i386_update_inferior_debug_regs(): Likewise.
3828         (i386_dr_insert_watchpoint): Likewise.
3829         (i386_dr_remove_watchpoint): Likewise.
3830         (i386_dr_region_ok_for_watchpoint): Likewise.
3831         (i386_dr_stopped_data_address): Likewise.
3832         (i386_dr_stopped_by_watchpoint): Likewise.
3833
3834 2014-06-19  Gary Benson  <gbenson@redhat.com>
3835
3836         * i386-low.c (i386_dr_show): Renamed to
3837         i386_show_dr and made static.  All uses updated.
3838         (i386_dr_length_and_rw_bits): Renamed to
3839         i386_length_and_rw_bits and made static.
3840         All uses updated.
3841         (i386_dr_insert_aligned_watchpoint): Renamed to
3842         i386_insert_aligned_watchpoint and made static.
3843         All uses updated.
3844         (i386_dr_remove_aligned_watchpoint): Renamed to
3845         i386_remove_aligned_watchpoint and made static.
3846         All uses updated.
3847         (i386_dr_update_inferior_debug_regs): Renamed to
3848         i386_update_inferior_debug_regs and made static.
3849         All uses updated.
3850
3851 2014-06-18  Gary Benson  <gbenson@redhat.com>
3852
3853         * i386-low.h (i386_dr_low_can_set_addr): New macro.
3854         (i386_dr_low_can_set_control): Likewise.
3855         (i386_get_debug_register_length): Likewise.
3856         * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
3857         (i386_dr_low_can_set_control): Likewise.
3858         (i386_get_debug_register_length): Likewise.
3859
3860 2014-06-17  Gary Benson  <gbenson@redhat.com>
3861
3862         * i386-low.h (i386-dregs.h): New include.
3863         (DR_FIRSTADDR): Now in i386-dregs.h.
3864         (DR_LASTADDR): Likewise.
3865         (DR_NADDR): Likewise.
3866         (DR_STATUS): Likewise.
3867         (DR_CONTROL): Likewise.
3868         (i386_debug_reg_state): Likewise.
3869         (i386_dr_insert_watchpoint): Likewise.
3870         (i386_dr_remove_watchpoint): Likewise.
3871         (i386_dr_region_ok_for_watchpoint): Likewise.
3872         (i386_dr_stopped_data_address): Likewise.
3873         (i386_dr_stopped_by_watchpoint): Likewise.
3874         * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
3875
3876 2014-06-18  Gary Benson  <gbenson@redhat.com>
3877
3878         * i386-low.h (i386_low_insert_watchpoint): Renamed to
3879         i386_dr_insert_watchpoint.
3880         (i386_low_remove_watchpoint): Renamed to
3881         i386_dr_remove_watchpoint.
3882         (i386_low_region_ok_for_watchpoint): Renamed to
3883         i386_dr_region_ok_for_watchpoint.
3884         (i386_low_stopped_data_address): Renamed to
3885         i386_dr_stopped_data_address.
3886         (i386_low_stopped_by_watchpoint): Renamed to
3887         i386_dr_stopped_by_watchpoint.
3888         * i386-low.c (i386_show_dr): Renamed to
3889         i386_dr_show and made nonstatic.  All uses updated.
3890         (i386_length_and_rw_bits): Renamed to
3891         i386_dr_length_and_rw_bits and made nonstatic.
3892         All uses updated.
3893         (i386_insert_aligned_watchpoint): Renamed to
3894         i386_dr_insert_aligned_watchpoint and made nonstatic.
3895         All uses updated.
3896         (i386_remove_aligned_watchpoint): Renamed to
3897         i386_dr_remove_aligned_watchpoint and made nonstatic.
3898         All uses updated.
3899         (i386_update_inferior_debug_regs): Renamed to
3900         i386_dr_update_inferior_debug_regs and made nonstatic.
3901         All uses updated.
3902         (i386_low_insert_watchpoint): Renamed to
3903         i386_dr_insert_watchpoint.  All uses updated.
3904         (i386_low_remove_watchpoint): Renamed to
3905         i386_dr_remove_watchpoint.  All uses updated.
3906         (i386_low_region_ok_for_watchpoint): Renamed to
3907         i386_dr_region_ok_for_watchpoint.  All uses updated.
3908         (i386_low_stopped_data_address): Renamed to
3909         i386_dr_stopped_data_address.  All uses updated.
3910         (i386_low_stopped_by_watchpoint): Renamed to
3911         i386_dr_stopped_by_watchpoint.  All uses updated.
3912
3913 2014-06-18  Gary Benson  <gbenson@redhat.com>
3914
3915         * i386-low.c (i386_dr_low_can_set_addr): New macro.
3916         (i386_dr_low_can_set_control): Likewise.
3917         (i386_insert_aligned_watchpoint): New check.
3918
3919 2014-06-18  Gary Benson  <gbenson@redhat.com>
3920
3921         * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
3922         Renamed to state.
3923
3924 2014-06-18  Gary Benson  <gbenson@redhat.com>
3925
3926         * i386-low.c (i386_length_and_rw_bits): Use internal_error
3927         instead of fatal and error.
3928         (i386_handle_nonaligned_watchpoint): Likewise.
3929
3930 2014-06-18  Gary Benson  <gbenson@redhat.com>
3931
3932         * i386-low.c (i386_get_debug_register_length): New macro.
3933         (TARGET_HAS_DR_LEN_8): Remove conditional.  Use above macro.
3934         (i386_show_dr): Use debug_printf instead of fprintf.  Use
3935         phex to format values.
3936
3937 2014-06-18  Gary Benson  <gbenson@redhat.com>
3938
3939         * i386-low.h: Comment changes.
3940         * i386-low.c: Likewise.
3941
3942 2014-06-18  Gary Benson  <gbenson@redhat.com>
3943
3944         * i386-low.c: Whitespace changes.
3945
3946 2014-06-12  Tom Tromey  <tromey@redhat.com>
3947
3948         * utils.c (freeargv): Remove.
3949
3950 2014-06-12  Tom Tromey  <tromey@redhat.com>
3951
3952         * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3953         * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3954         (parse_debug_format_options): Likewise.
3955         (gdbserver_usage): Likewise.
3956         * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3957         (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3958         (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3959         against libiberty.
3960         ($(LIBGNU)): Depend on libiberty.
3961         (all-lib): Recurse into all subdirs.
3962         (install-only): Invoke "install" target in subdirs.
3963         (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3964         targets.
3965         * configure: Rebuild.
3966         * configure.ac: Add ACX_CONFIGURE_DIR for libiberty.  Don't check
3967         for vasprintf, vsnprintf, or gettimeofday.
3968         * configure.srv: Don't add safe-ctype.o or lbasename.o to
3969         srv_tgtobj.
3970
3971 2014-06-05  Joel Brobecker  <brobecker@adacore.com>
3972
3973         * development.sh: Delete.
3974         * Makefile.in (config.status): Adjust dependency on development.sh.
3975         * configure.ac: Adjust development.sh source call.
3976         * configure: Regenerate.
3977
3978 2014-06-02  Pedro Alves  <palves@redhat.com>
3979
3980         * ax.c (gdb_free_agent_expr): New function.
3981         * ax.h (gdb_free_agent_expr): New declaration.
3982         * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3983         list.
3984         (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3985         static.
3986         (clear_breakpoint_conditions_and_commands): New function.
3987         * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3988         (clear_breakpoint_conditions_and_commands): New declaration.
3989
3990 2014-05-23  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
3991
3992         * linux-aarch64-low.c (asm/ptrace.h): Include.
3993
3994 2014-05-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
3995
3996         Fix TLS access for -static -pthread.
3997         * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3998         (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3999         (thread_db_load_search, try_thread_db_load_1): Initialize it.
4000
4001 2014-05-20  Pedro Alves  <palves@redhat.com>
4002
4003         * linux-aarch64-low.c (aarch64_insert_point)
4004         (aarch64_remove_point): No longer check whether the type is
4005         supported here.  Adjust to new interface.
4006         (the_low_target): Install aarch64_supports_z_point_type as
4007         supports_z_point_type method.
4008         * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
4009         (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
4010         instead of a Z packet char.  Adjust.
4011         (arm_supports_z_point_type): New function.
4012         (arm_insert_point, arm_remove_point): Adjust to new interface.
4013         (the_low_target): Install arm_supports_z_point_type.
4014         * linux-crisv32-low.c (cris_supports_z_point_type): New function.
4015         (cris_insert_point, cris_remove_point): Adjust to new interface.
4016         Don't check whether the type is supported here.
4017         (the_low_target): Install cris_supports_z_point_type.
4018         * linux-low.c (linux_supports_z_point_type): New function.
4019         (linux_insert_point, linux_remove_point): Adjust to new interface.
4020         * linux-low.h (struct linux_target_ops) <insert_point,
4021         remove_point>: Take an enum raw_bkpt_type instead of a char.  Add
4022         raw_breakpoint pointer parameter.
4023         <supports_z_point_type>: New method.
4024         * linux-mips-low.c (mips_supports_z_point_type): New function.
4025         (mips_insert_point, mips_remove_point): Adjust to new interface.
4026         Use mips_supports_z_point_type.
4027         (the_low_target): Install mips_supports_z_point_type.
4028         * linux-ppc-low.c (the_low_target): Install NULL as
4029         supports_z_point_type method.
4030         * linux-s390-low.c (the_low_target): Install NULL as
4031         supports_z_point_type method.
4032         * linux-sparc-low.c (the_low_target): Install NULL as
4033         supports_z_point_type method.
4034         * linux-x86-low.c (x86_supports_z_point_type): New function.
4035         (x86_insert_point): Adjust to new insert_point interface.  Use
4036         insert_memory_breakpoint.  Adjust to new
4037         i386_low_insert_watchpoint interface.
4038         (x86_remove_point): Adjust to remove_point interface.  Use
4039         remove_memory_breakpoint.  Adjust to new
4040         i386_low_remove_watchpoint interface.
4041         (the_low_target): Install x86_supports_z_point_type.
4042         * lynx-low.c (lynx_target_ops): Install NULL as
4043         supports_z_point_type callback.
4044         * nto-low.c (nto_supports_z_point_type): New.
4045         (nto_insert_point, nto_remove_point): Adjust to new interface.
4046         (nto_target_ops): Install nto_supports_z_point_type.
4047         * mem-break.c: Adjust intro comment.
4048         (struct raw_breakpoint) <raw_type, size>: New fields.
4049         <inserted>: Update comment.
4050         <shlib_disabled>: Delete field.
4051         (enum bkpt_type) <gdb_breakpoint>: Delete value.
4052         <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
4053         gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
4054         (raw_bkpt_type_to_target_hw_bp_type): New function.
4055         (find_enabled_raw_code_breakpoint_at): New function.
4056         (find_raw_breakpoint_at): New type and size parameters.  Use them.
4057         (insert_memory_breakpoint): New function, based off
4058         set_raw_breakpoint_at.
4059         (remove_memory_breakpoint): New function.
4060         (set_raw_breakpoint_at): Reimplement.
4061         (set_breakpoint): New, based on set_breakpoint_at.
4062         (set_breakpoint_at): Reimplement.
4063         (delete_raw_breakpoint): Go through the_target->remove_point
4064         instead of assuming memory breakpoints.
4065         (find_gdb_breakpoint_at): Delete.
4066         (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
4067         (find_gdb_breakpoint): New function.
4068         (set_gdb_breakpoint_at): Delete.
4069         (z_type_supported): New function.
4070         (set_gdb_breakpoint_1): New function, loosely based off
4071         set_gdb_breakpoint_at.
4072         (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
4073         (delete_gdb_breakpoint_at): Delete.
4074         (delete_gdb_breakpoint_1): New function, loosely based off
4075         delete_gdb_breakpoint_at.
4076         (delete_gdb_breakpoint): New function.
4077         (clear_gdb_breakpoint_conditions): Rename to ...
4078         (clear_breakpoint_conditions): ... this.  Don't handle a NULL
4079         breakpoint.
4080         (add_condition_to_breakpoint): Make static.
4081         (add_breakpoint_condition): Take a struct breakpoint pointer
4082         instead of an address.  Adjust.
4083         (gdb_condition_true_at_breakpoint): Rename to ...
4084         (gdb_condition_true_at_breakpoint_z_type): ... this, and add
4085         z_type parameter.
4086         (gdb_condition_true_at_breakpoint): Reimplement.
4087         (add_breakpoint_commands): Take a struct breakpoint pointer
4088         instead of an address.  Adjust.
4089         (gdb_no_commands_at_breakpoint): Rename to ...
4090         (gdb_no_commands_at_breakpoint_z_type): ... this.  Add z_type
4091         parameter.  Return true if no breakpoint was found.  Change debug
4092         output.
4093         (gdb_no_commands_at_breakpoint): Reimplement.
4094         (run_breakpoint_commands): Rename to ...
4095         (run_breakpoint_commands_z_type): ... this.  Add z_type parameter,
4096         and change return type to boolean.
4097         (run_breakpoint_commands): New function.
4098         (gdb_breakpoint_here): Also check for Z1 breakpoints.
4099         (uninsert_raw_breakpoint): Don't try to reinsert a disabled
4100         breakpoint.  Go through the_target->remove_point instead of
4101         assuming memory breakpoint.
4102         (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
4103         software and hardware breakpoints.
4104         (reinsert_raw_breakpoint): Go through the_target->insert_point
4105         instead of assuming memory breakpoint.
4106         (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
4107         software and hardware breakpoints.
4108         (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
4109         Check both software and hardware breakpoints.
4110         (validate_inserted_breakpoint): Assert the breakpoint is a
4111         software breakpoint.  Set the inserted flag to -1 instead of
4112         setting shlib_disabled.
4113         (delete_disabled_breakpoints): Adjust.
4114         (validate_breakpoints): Only validate software breakpoints.
4115         Adjust to inserted flag change.
4116         (check_mem_read, check_mem_write): Skip breakpoint types other
4117         than software breakpoints.  Adjust to inserted flag change.
4118         * mem-break.h (enum raw_bkpt_type): New enum.
4119         (raw_breakpoint, struct process_info): Forward declare.
4120         (Z_packet_to_target_hw_bp_type): Delete declaration.
4121         (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
4122         (set_gdb_breakpoint, delete_gdb_breakpoint)
4123         (clear_breakpoint_conditions): New declarations.
4124         (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
4125         (breakpoint_inserted_here): Update comment.
4126         (add_breakpoint_condition, add_breakpoint_commands): Replace
4127         address parameter with a breakpoint pointer parameter.
4128         (gdb_breakpoint_here): Update comment.
4129         (delete_gdb_breakpoint_at): Delete.
4130         (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
4131         * server.c (process_point_options): Take a struct breakpoint
4132         pointer instead of an address.  Adjust.
4133         (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
4134         delete_gdb_breakpoint.
4135         * spu-low.c (spu_target_ops): Install NULL as
4136         supports_z_point_type method.
4137         * target.h: Include mem-break.h.
4138         (struct target_ops) <prepare_to_access_memory>: Update comment.
4139         <supports_z_point_type>: New field.
4140         <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4141         instead of a char.  Also take a raw breakpoint pointer.
4142         * win32-arm-low.c (the_low_target): Install NULL as
4143         supports_z_point_type.
4144         * win32-i386-low.c (i386_supports_z_point_type): New function.
4145         (i386_insert_point, i386_remove_point): Adjust to new interface.
4146         (the_low_target): Install i386_supports_z_point_type.
4147         * win32-low.c (win32_supports_z_point_type): New function.
4148         (win32_insert_point, win32_remove_point): Adjust to new interface.
4149         (win32_target_ops): Install win32_supports_z_point_type.
4150         * win32-low.h (struct win32_target_ops):
4151         <supports_z_point_type>: New method.
4152         <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4153         instead of a char.  Also take a raw breakpoint pointer.
4154
4155 2014-05-20  Pedro Alves  <palves@redhat.com>
4156
4157         * mem-break.h: Include break-common.h.
4158         (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4159         (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
4160         (Z_packet_to_target_hw_bp_type): New declaration.
4161         * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
4162         * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
4163         (Z_PACKET_ACCESS_WP): Delete macros.
4164         (Z_packet_to_hw_type): Delete function.
4165         * i386-low.h: Don't include break-common.h here.
4166         (Z_packet_to_hw_type): Delete declaration.
4167         * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
4168         Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4169         * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
4170         Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4171         * linux-aarch64-low.c: Don't include break-common.h here.
4172         (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4173         (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
4174         (Z_packet_to_target_hw_bp_type): Delete function.
4175         * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
4176         function.
4177         (mips_insert_point, mips_remove_point): Use
4178         Z_packet_to_target_hw_bp_type.
4179
4180 2014-05-20  Pedro Alves  <palves@redhat.com>
4181
4182         * linux-aarch64-low.c: Include break-common.h.
4183         (enum target_point_type): Delete.
4184         (Z_packet_to_point_type): Rename to ...
4185         (Z_packet_to_target_hw_bp_type): ... this, and return a
4186         target_hw_bp_type instead.
4187         (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
4188         instead of an enum target_point_type.
4189         (aarch64_point_encode_ctrl_reg): Likewise.  Compute type mask from
4190         breakpoint type.
4191         (aarch64_dr_state_insert_one_point)
4192         (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
4193         (aarch64_handle_aligned_watchpoint)
4194         (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
4195         Take an enum target_hw_bp_type instead of an enum
4196         target_point_type.
4197         (aarch64_supports_z_point_type): New function.
4198         (aarch64_insert_point, aarch64_remove_point): Use it.  Adjust to
4199         use Z_packet_to_target_hw_bp_type.
4200
4201 2014-05-20  Joel Brobecker  <brobecker@adacore.com>
4202
4203         * configure.ac: Only use -Werror by default when DEVELOPMENT
4204         is true.
4205         * configure: Regenerate.
4206
4207 2014-05-19  Jan Kratochvil  <jan.kratochvil@redhat.com>
4208
4209         Fix gdbserver qGetTLSAddr for x86_64 -m32.
4210         * linux-x86-low.c (X86_64_USER_REGS): New.
4211         (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
4212
4213 2014-04-28  Yao Qi  <yao@codesourcery.com>
4214
4215         * Makefile.in (i386-avx512.c): Fix the typo of generated file
4216         name.
4217
4218 2014-04-25  Pedro Alves  <palves@redhat.com>
4219
4220         PR server/16255
4221         * linux-low.c (linux_attach_fail_reason_string): New function.
4222         (linux_attach_lwp): Delete.
4223         (linux_attach_lwp_1): Rename to ...
4224         (linux_attach_lwp): ... this.  Take a ptid instead of a pid as
4225         argument.  Remove "initial" parameter.  Return int instead of
4226         void.  Don't error or warn here.
4227         (linux_attach): Adjust to call linux_attach_lwp.  Call error on
4228         failure to attach to the tgid.  Call warning when failing to
4229         attach to an lwp.
4230         * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
4231         argument.  Remove "initial" parameter.  Return int instead of
4232         void.  Don't error or warn here.
4233         (linux_attach_fail_reason_string): New declaration.
4234         * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
4235         interface change.  Use linux_attach_fail_reason_string.
4236
4237 2014-04-24  Michael Sturm  <michael.sturm@mintel.com>
4238             Walfred Tedeschi  <walfred.tedeschi@intel.com>
4239
4240         * Makefile.in: Added rules to handle new files
4241         i386-avx512.c i386-avx512-linux.c amd64-avx512.c
4242         amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
4243         * configure.srv (srv_i386_regobj): Add i386-avx512.o.
4244         (srv_i386_linux_regobj): Add i386-avx512-linux.o.
4245         (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
4246         (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
4247         x32-avx512-linux.o.
4248         (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
4249         (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
4250         (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
4251         i386/x32-avx512.xml.
4252         (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
4253         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
4254         i386/x32-avx512-linux.xml.
4255         * i387-fp.c (num_avx512_k_registers): New constant for number
4256         of K registers.
4257         (num_avx512_zmmh_low_registers): New constant for number of
4258         lower ZMM registers (0-15).
4259         (num_avx512_zmmh_high_registers): New constant for number of
4260         higher ZMM registers (16-31).
4261         (num_avx512_ymmh_registers): New contant for number of higher
4262         YMM registers (ymm16-31 added by avx521 on x86_64).
4263         (num_avx512_xmm_registers): New constant for number of higher
4264         XMM registers (xmm16-31 added by AVX512 on x86_64).
4265         (struct i387_xsave): Add space for AVX512 registers.
4266         (i387_cache_to_xsave): Change raw buffer size to 64 characters.
4267         Add code to handle AVX512 registers.
4268         (i387_xsave_to_cache): Add code to handle AVX512 registers.
4269         * linux-x86-low.c (init_registers_amd64_avx512_linux): New
4270         prototypei from generated file.
4271         (tdesc_amd64_avx512_linux): Likewise.
4272         (init_registers_x32_avx512_linux): Likewise.
4273         (tdesc_x32_avx512_linux): Likewise.
4274         (init_registers_i386_avx512_linux): Likewise.
4275         (tdesc_i386_avx512_linux): Likewise.
4276         (x86_64_regmap): Add AVX512 registers.
4277         (x86_linux_read_description): Add code to handle AVX512 XSTATE
4278         mask.
4279         (initialize_low_arch): Add code to initialize AVX512 registers.
4280
4281 2014-04-23  Pedro Alves  <palves@redhat.com>
4282
4283         * mem-break.c (find_gdb_breakpoint_at): Make static.
4284         * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
4285
4286 2014-04-23  Pedro Alves  <palves@redhat.com>
4287
4288         * i386-low.c: Don't include break-common.h here.
4289         (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4290         prototype to take target_hw_bp_type as argument instead of a Z
4291         packet char.
4292         * i386-low.h: Include break-common.h here.
4293         (Z_packet_to_hw_type): Declare.
4294         (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4295         prototypes.
4296         * linux-x86-low.c (x86_insert_point): Convert the packet number to
4297         a target_hw_bp_type before calling i386_low_insert_watchpoint.
4298         (x86_remove_point): Convert the packet number to a
4299         target_hw_bp_type before calling i386_low_remove_watchpoint.
4300         * win32-i386-low.c (i386_insert_point): Convert the packet number
4301         to a target_hw_bp_type before calling i386_low_insert_watchpoint.
4302         (i386_remove_point): Convert the packet number to a
4303         target_hw_bp_type before calling i386_low_remove_watchpoint.
4304
4305 2014-04-23  Pedro Alves  <palves@redhat.com>
4306
4307         * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
4308
4309 2014-04-10  Pedro Alves  <palves@redhat.com>
4310
4311         * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4312         Check if the condition or command is NULL before checking if the
4313         breakpoint is known.  On success, return true.
4314         * mem-break.h (add_breakpoint_condition): Document return.
4315         (add_breakpoint_commands): Add describing comment.
4316         * server.c (skip_to_semicolon): New function.
4317         (process_point_options): Use it.
4318
4319 2014-04-09  Pedro Alves  <palves@redhat.com>
4320
4321         * linux-low.c (linux_read_loadmap): Pass current_inferior directly
4322         to lwpid_of.
4323
4324 2014-02-27  Pedro Alves  <palves@redhat.com>
4325
4326         PR 12702
4327         * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
4328         macros.
4329         * linux-low.c (delete_lwp, handle_extended_wait): Add debug
4330         output.
4331         (last_thread_of_process_p): Take a PID argument instead of a
4332         thread pointer.
4333         (linux_wait_for_lwp): Delete.
4334         (num_lwps, check_zombie_leaders, not_stopped_callback): New
4335         functions.
4336         (linux_low_filter_event): New function, party factored out from
4337         linux_wait_for_event.
4338         (linux_wait_for_event): Rename to ...
4339         (linux_wait_for_event_filtered): ... this.  Add new filter ptid
4340         argument.  Partly rewrite.  Always use waitpid(-1, WNOHANG) and
4341         sigsuspend.  Check for zombie leaders.
4342         (linux_wait_for_event): Reimplement as wrapper around
4343         linux_wait_for_event_filtered.
4344         (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED.  Assume that if
4345         a normal or signal exit is seen, it's the whole process exiting.
4346         (wait_for_sigstop): No longer a for_each_inferior callback.
4347         Rewrite on top of linux_wait_for_event_filtered.
4348         (stop_all_lwps): Call wait_for_sigstop directly.
4349         * server.c (resume, handle_target_event): Handle
4350         TARGET_WAITKIND_NO_RESUMED.
4351
4352 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
4353
4354         * win32-low.c (psapi_get_dll_name,
4355         * win32_CreateToolhelp32Snapshot): Delete.
4356         (win32_CreateToolhelp32Snapshot, win32_Module32First)
4357         (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
4358         Delete.
4359         (handle_load_dll): Add function description.
4360         Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
4361
4362 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
4363
4364         * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
4365         Add comment.
4366         (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
4367         base address when calling win32_add_one_solib.
4368         (handle_load_dll): Delete local variable load_addr.
4369         Remove 0x1000 offset applied to DLL base address when calling
4370         win32_add_one_solib.
4371         (handle_unload_dll): Add comment.
4372
4373 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
4374
4375         * win32-low.c (win32_add_all_dlls): Renames
4376         win32_ensure_ntdll_loaded.  Rewrite function documentation.
4377         Adjust implementation to always load all DLLs.
4378         Add 0x1000 offset to DLL base address when calling
4379         win32_add_one_solib.
4380         (child_initialization_done): New static global.
4381         (do_initial_child_stuff): Set child_initialization_done to
4382         zero during child initialization, and 1 after.  Replace call
4383         to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
4384         Add comment.
4385         (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
4386         (handle_unload_dll): Add function documentation.
4387         (get_child_debug_event): Ignore load and unload DLL events
4388         during child initialization.
4389
4390 2014-02-20  Doug Evans  <dje@google.com>
4391
4392         Remove global all_lwps.
4393         * inferiors.h (ptid_of): Move here from linux-low.h.
4394         (pid_of, lwpid_of): Ditto.
4395         * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
4396         parameter is a struct thread_info * now.
4397         (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
4398         directly.  Pass &all_threads to find_inferior instead of &all_lwps.
4399         (aarch64_stopped_data_address): Fetch lwpid from current_inferior
4400         directly.
4401         (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
4402         (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
4403         * linux-arm-low.c (update_registers_callback): Update, "entry"
4404         parameter is a struct thread_info * now.
4405         Fetch lwpid from current_inferior directly.
4406         (arm_insert_point): Pass &all_threads to find_inferior instead of
4407         &all_lwps.
4408         (arm_remove_point): Ditto.
4409         (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
4410         (arm_prepare_to_resume): Fetch pid from thread.
4411         (arm_read_description): Fetch lwpid from current_inferior directly.
4412         * linux-low.c (all_lwps): Delete.
4413         (delete_lwp): Delete call to remove_inferior.
4414         (handle_extended_wait): Fetch lwpid from thread.
4415         (add_lwp): Don't set lwp->entry.id.  Remove call to
4416         add_inferior_to_list.
4417         (linux_attach_lwp_1): Fetch pid from current_inferior directly.
4418         (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
4419         (kill_one_lwp_callback): Ditto.
4420         (linux_kill): Don't dereference NULL pointer.
4421         Fetch ptid,lwpid from thread.
4422         (get_detach_signal): Fetch ptid from thread.
4423         (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
4424         Simplify call to regcache_invalidate_thread.
4425         (delete_lwp_callback): Update, "entry" parameter is a
4426         struct thread_info * now.  Fetch pid from thread.
4427         (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
4428         (status_pending_p_callback): Update, "entry" parameter is a
4429         struct thread_info * now.  Fetch ptid from thread.
4430         (find_lwp_pid): Update, "entry" parameter is a
4431         struct thread_info * now.
4432         (linux_wait_for_lwp): Fetch pid from thread.
4433         (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
4434         (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
4435         (enqueue_one_deferred_signal): Fetch lwpid from thread.
4436         (dequeue_one_deferred_signal): Ditto.
4437         (cancel_breakpoint): Fetch ptid from current_inferior.
4438         (linux_wait_for_event): Pass &all_threads to find_inferior,
4439         not &all_lwps.  Fetch ptid, lwpid from thread.
4440         (count_events_callback): Update, "entry" parameter is a
4441         struct thread_info * now.
4442         (select_singlestep_lwp_callback): Ditto.
4443         (select_event_lwp_callback): Ditto.
4444         (cancel_breakpoints_callback): Ditto.
4445         (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
4446         not &all_lwps.
4447         (select_event_lwp): Ditto.  Fetch ptid from event_thread.
4448         (unsuspend_one_lwp): Update, "entry" parameter is a
4449         struct thread_info * now.
4450         (unsuspend_all_lwps): Pass &all_threads to find_inferior,
4451         not &all_lwps.
4452         (linux_stabilize_threads): Ditto.  And for for_each_inferior.
4453         Fetch lwpid from thread, not lwp.
4454         (linux_wait_1): Fetch ptid, lwpid from current_inferior.
4455         Pass &all_threads to find_inferior, not &all_lwps.
4456         (send_sigstop): Fetch lwpid from thread, not lwp.
4457         (send_sigstop_callback): Update, "entry" parameter is a
4458         struct thread_info * now.
4459         (suspend_and_send_sigstop_callback): Ditto.
4460         (wait_for_sigstop): Ditto.  Fetch ptid, lwpid from thread, lwp.
4461         (stuck_in_jump_pad_callback): Update, "entry" parameter is a
4462         struct thread_info * now.
4463         (move_out_of_jump_pad_callback): Ditto.  Fetch ptid, lwpid
4464         from thread, lwp.
4465         (lwp_running): Update, "entry" parameter is a
4466         struct thread_info * now.
4467         (stop_all_lwps): Fetch ptid from thread.
4468         Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
4469         (linux_resume_one_lwp): Fetch lwpid from thread.
4470         (linux_set_resume_request): Update, "entry" parameter is a
4471         struct thread_info * now.  Fetch pid, lwpid from thread.
4472         (resume_status_pending_p): Update, "entry" parameter is a
4473         struct thread_info * now.
4474         (need_step_over_p): Ditto.  Fetch lwpid from thread.
4475         (start_step_over): Fetch lwpid from thread.
4476         (linux_resume_one_thread): Update, "entry" parameter is a
4477         struct thread_info * now.  Fetch lwpid from thread.
4478         (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
4479         (proceed_one_lwp): Update, "entry" parameter is a
4480         struct thread_info * now.  Fetch lwpid from thread.
4481         (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
4482         struct thread_info * now.
4483         (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
4484         (unstop_all_lwps): Ditto.  Fetch lwpid from thread.
4485         (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
4486         directly.
4487         (regsets_store_inferior_registers): Ditto.
4488         (fetch_register, store_register): Ditto.
4489         (linux_read_memory, linux_write_memory): Ditto.
4490         (linux_request_interrupt): Ditto.
4491         (linux_read_auxv): Ditto.
4492         (linux_xfer_siginfo): Ditto.
4493         (linux_qxfer_spu): Ditto.
4494         (linux_qxfer_libraries_svr4): Ditto.
4495         * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
4496         moved to inferiors.h.
4497         (get_lwp): Delete.
4498         (get_thread_lwp): Update.
4499         (struct lwp_info): Delete member "entry".  Simplify comment for
4500         member "thread".
4501         (all_lwps): Delete.
4502         * linux-mips-low.c (mips_read_description): Fetch lwpid from
4503         current_inferior directly.
4504         (update_watch_registers_callback): Update, "entry" parameter is a
4505         struct thread_info * now.  Fetch pid from thread.
4506         (mips_linux_prepare_to_resume): Fetch ptid from thread.
4507         (mips_insert_point): Fetch lwpid from current_inferior.
4508         Pass &all_threads to find_inferior, not &all_lwps.
4509         (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
4510         (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
4511         directly.
4512         (mips_stopped_data_address): Ditto.
4513         * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
4514         directly.
4515         * linux-tile-low.c (tile_arch_setup): Ditto.
4516         * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
4517         (update_debug_registers_callback): Update, "entry" parameter is a
4518         struct thread_info * now.  Fetch pid from thread.
4519         (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
4520         Pass &all_threads to find_inferior, not &all_lwps.
4521         (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
4522         (i386_dr_low_set_control): Fetch pid from current_inferior directly.
4523         Pass &all_threads to find_inferior, not &all_lwps.
4524         (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
4525         (i386_dr_low_get_status): Ditto.
4526         (x86_linux_prepare_to_resume): Fetch ptid from thread.
4527         (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
4528         (x86_linux_read_description): Ditto.
4529         * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
4530
4531 2014-02-20  Doug Evans  <dje@google.com>
4532
4533         * inferiors.c (get_first_inferior): Fix buglet.
4534
4535 2014-02-19  Doug Evans  <dje@google.com>
4536
4537         * gdbthread.h (add_thread): Change result type to struct thread_info *.
4538         * inferiors.c (add_thread): Change result type to struct thread_info *.
4539         All callers updated.
4540         (add_lwp): Call add_thread here instead of in callers.
4541         All callers updated.
4542         * linux-low.h (get_lwp_thread): Rewrite.
4543         (struct lwp_info): New member "thread".
4544
4545 2014-02-19  Doug Evans  <dje@google.com>
4546
4547         * linux-low.c (add_lwp): Change result to struct lwp_info *.
4548         All callers updated.
4549
4550 2014-02-19  Doug Evans  <dje@google.com>
4551
4552         * inferiors.c (add_thread): Fix whitespace.
4553
4554 2014-02-19  Doug Evans  <dje@google.com>
4555
4556         * dll.c (clear_dlls): Replace accessing list implemention details
4557         with API function.
4558         * gdbthread.h (get_first_thread): Declare.
4559         * inferiors.c (for_each_inferior_with_data): New function.
4560         (get_first_thread): New function.
4561         (find_thread_ptid): Simplify.
4562         (get_first_inferior): New function.
4563         (clear_list): Delete.
4564         (one_inferior_p): New function.
4565         (clear_inferior_list): New function.
4566         (clear_inferiors): Update.
4567         * inferiors.h (for_each_inferior_with_data): Declare.
4568         (clear_inferior_list): Declare.
4569         (one_inferior_p): Declare.
4570         (get_first_inferior): Declare.
4571         * linux-low.c (linux_wait_for_event): Replace accessing list
4572         implemention details with API function.
4573         * server.c (target_running): Ditto.
4574         (accumulate_file_name_length): New function.
4575         (emit_dll_description): New function.
4576         (handle_qxfer_libraries): Replace accessing list implemention
4577         details with API function.
4578         (handle_qxfer_threads_worker): New function.
4579         (handle_qxfer_threads_proper): Replace accessing list implemention
4580         details with API function.
4581         (handle_query): Ditto.
4582         (visit_actioned_threads_callback_ftype): New typedef.
4583         (visit_actioned_threads_data): New struct.
4584         (visit_actioned_threads): Rewrite to be find_inferior callback.
4585         (resume): Call find_inferior.
4586         (handle_status): Replace accessing list implemention
4587         details with API function.
4588         (process_serial_event): Replace accessing list implemention details
4589         with API function.
4590         * target.c (set_desired_inferior): Replace accessing list implemention
4591         details with API function.
4592         * tracepoint.c (same_process_p): New function.
4593         (gdb_agent_about_to_close): Replace accessing list implemention
4594         details with API function.
4595         * win32-low.c (child_delete_thread): Replace accessing list
4596         implemention details with API function.
4597         (match_dll_by_basename): New function.
4598         (dll_is_loaded_by_basename): New function.
4599         (win32_ensure_ntdll_loaded): Replace accessing list implemention
4600         details call to dll_is_loaded_by_basename.
4601
4602 2014-02-19  Doug Evans  <dje@google.com>
4603
4604         * dll.h (struct dll_info): Add comment.
4605         * gdbthread.h (struct thread_info): Add comment.
4606         (current_ptid): Simplify.
4607         * inferiors.c (add_process): Update.
4608         (remove_process): Update.
4609         * inferiors.h (struct process_info): Rename member "head" to "entry".
4610         * linux-low.c (delete_lwp): Update.
4611         (add_lwp): Update.
4612         (last_thread_of_process_p): Update.
4613         (kill_one_lwp_callback, linux_kill): Update.
4614         (status_pending_p_callback): Update.
4615         (wait_for_sigstop): Update.  Simplify read of ptid.
4616         (start_step_over): Update.
4617         * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
4618         (get_lwp_thread): Update.
4619         (struct lwp_info): Rename member "head" to "entry".
4620         * regcache.h (inferior_list_entry): Delete.
4621         * server.c (kill_inferior_callback): Update.
4622         (detach_or_kill_inferior_callback): Update.
4623         (print_started_pid): Update.
4624         (print_attached_pid): Update.
4625         (process_serial_event): Simplify read of ptid.
4626         * thread-db.c (thread_db_create_event): Update.
4627         (thread_db_get_tls_address): Update.
4628         * win32-low.c (current_inferior_ptid): Simplify.
4629
4630 2014-02-19  Tom Tromey  <tromey@redhat.com>
4631
4632         * target.h (struct target_ops) <supports_btrace>: Add target_ops
4633         argument.
4634         (target_supports_btrace): Update.
4635
4636 2014-02-14  Yao Qi  <yao@codesourcery.com>
4637
4638         * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
4639         (rsp-low-ipa.o): New target.
4640
4641 2014-02-12  Tom Tromey  <tromey@redhat.com>
4642
4643         * ax.c (gdb_parse_agent_expr): Use hex2bin, not
4644         convert_ascii_to_int.
4645         * regcache.c (registers_to_string): Likewise.
4646         * remote-utils.c (decode_M_packet): Likewise.
4647         * server.c (process_serial_event): Likewise.
4648
4649 2014-02-12  Tom Tromey  <tromey@redhat.com>
4650
4651         * server.c (handle_query, handle_v_run): Use hex2bin, not
4652         unhexify.
4653         * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
4654
4655 2014-02-12  Tom Tromey  <tromey@redhat.com>
4656
4657         * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
4658         convert_int_to_ascii.
4659         * regcache.c (registers_to_string, collect_register_as_string):
4660         Likewise.
4661         * remote-utils.c (look_up_one_symbol, relocate_instruction):
4662         Likewise.
4663         * server.c (process_serial_event): Likewise.
4664         * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
4665         (cmd_qtbuffer, cstr_to_hexstr): Likewise.
4666
4667 2014-02-12  Tom Tromey  <tromey@redhat.com>
4668
4669         * remote-utils.c (look_up_one_symbol, monitor_output): Use
4670         bin2hex, not hexify.
4671         * tracepoint.c (cmd_qtstatus): Likewise.
4672
4673 2014-02-12  Tom Tromey  <tromey@redhat.com>
4674
4675         * remote-utils.c (monitor_output): Pass explicit length to
4676         hexify.
4677
4678 2014-02-12  Tom Tromey  <tromey@redhat.com>
4679
4680         * tracepoint.c: Include rsp-low.h.
4681         * server.c: Include rsp-low.h.
4682         * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
4683         (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
4684         declare.
4685         * remote-utils.c: Include rsp-low.h.
4686         (fromhex, hexchars, ishex, unhexify, tohex, hexify)
4687         (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
4688         (convert_int_to_ascii, convert_ascii_to_int): Move to
4689         common/rsp-low.c.
4690         * regcache.c: Include rsp-low.h.
4691         * ax.c: Include rsp-low.h.
4692         * Makefile.in (SFILES): Add common/rsp-low.c.
4693         (OBS): Add rsp-low.o.
4694         (rsp-low.o): New target.
4695
4696 2014-02-12  Tom Tromey  <tromey@redhat.com>
4697
4698         * utils.h (pulongest, plongest, phex_nz): Don't declare.
4699         Include print-utils.h.
4700         * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
4701         (plongest, thirty_two, phex_nz): Remove.
4702         * Makefile.in (SFILES): Add common/print-utils.c.
4703         (OBS): Add print-utils.o.
4704         (print-utils-ipa.o): New target.
4705         (print-utils.o): New target.
4706         (IPA_OBJS): Add print-utils-ipa.o.
4707
4708 2014-02-06  Tom Tromey  <tromey@redhat.com>
4709
4710         * Makefile.in (SFILES): Fix indentation.
4711
4712 2014-02-05  Doug Evans  <dje@google.com>
4713
4714         * linux-low.c (linux_wait_for_event): Improve comment.
4715         (linux_wait_1): Keep current_inferior in sync with event_child.
4716
4717 2014-01-22  Doug Evans  <dje@google.com>
4718
4719         * gdbthread.h (gdb_id_to_thread): Delete, unused.
4720
4721 2014-01-22  Doug Evans  <dje@google.com>
4722
4723         * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
4724         * configure: Regenerate.
4725         * config.in: Regenerate.
4726         * Makefile.in (SFILES): Add debug.c.
4727         (OBS): Add debug.o.
4728         * debug.c: New file.
4729         * debug.h: New file.
4730         * linux-aarch64-low.c (*): Update all debugging printfs to use
4731         debug_printf instead of fprintf.
4732         * linux-arm-low.c (*): Ditto.
4733         * linux-cris-low.c (*): Ditto.
4734         * linux-crisv32-low.c (*): Ditto.
4735         * linux-m32r-low.c (*): Ditto.
4736         * linux-sparc-low.c (*): Ditto.
4737         * linux-x86.c (*): Ditto.
4738         * linux-low.c (*): Ditto.
4739         (linux_wait_1): Add calls to debug_enter, debug_exit.
4740         (linux_wait): Remove redundant debugging printf.
4741         (stop_all_lwps): Add calls to debug_enter, debug_exit.
4742         (linux_resume, unstop_all_lwps): Ditto.
4743         * mem-break.c (*): Update all debugging printfs to use
4744         debug_printf instead of fprintf.
4745         * remote-utils.c (*): Ditto.
4746         * thread-db.c (*): Ditto.
4747         * server.c #include <ctype.h>, "gdb_vecs.h".
4748         (debug_threads): Moved to debug.c.
4749         (*): Update all debugging printfs to use debug_printf instead of
4750         fprintf.
4751         (start_inferior): Replace call to fflush with call to debug_flush.
4752         (monitor_show_help): Mention set debug-format.
4753         (parse_debug_format_options): New function.
4754         (handle_monitor_command): Handle "monitor set debug-format".
4755         (gdbserver_usage): Mention --debug-format.
4756         (main): Parse --debug-format.
4757         * server.h (debug_threads): Declaration moved to debug.h.
4758         #include "debug.h".
4759         * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
4760         trace_debug_1 that uses debug_printf.
4761         (tracepoint_look_up_symbols): Update all debugging printfs to use
4762         debug_printf instead of fprintf.
4763
4764 2014-01-20  Baruch Siach  <baruch@tkos.co.il>
4765
4766         * linux-xtensa-low.c: Include asm/ptrace.h instead of
4767         sys/ptrace.h.
4768
4769 2014-01-17  Pedro Alves  <palves@redhat.com>
4770
4771         PR build/16445
4772         * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
4773         defined after including gdb_proc_service.h.
4774
4775 2014-01-16  Doug Evans  <dje@google.com>
4776
4777         * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
4778         (match_dll): Use it.
4779
4780 2014-01-16  Markus Metzger  <markus.t.metzger@intel.com>
4781
4782         * target.h (target_ops) <read_btrace>: Change parameters and
4783         return type to allow error reporting.
4784         * server.c (handle_qxfer_btrace): Support delta reads.  Pass
4785         trace reading errors on.
4786         * linux-low.c (linux_low_read_btrace): Pass trace reading
4787         errors on.
4788         (linux_low_disable_btrace): New.
4789
4790 2014-01-15  Doug Evans  <dje@google.com>
4791
4792         * inferiors.c (thread_id_to_gdb_id): Delete.
4793         * inferiors.h (thread_id_to_gdb_id): Delete.
4794
4795 2014-01-13  Eli Zaretskii  <eliz@gnu.org>
4796
4797         * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
4798         "-I$(srcdir)/../".  Fixes MinGW compilation errors with old GCC
4799         versions.
4800
4801 2014-01-08  Pedro Alves  <palves@redhat.com>
4802
4803         * server.c (handle_status): Don't discard previous queued stop
4804         replies or thread's pending status here.
4805         (main) <disconnection>: Do it here instead.
4806
4807 2014-01-08  Pedro Alves  <palves@redhat.com>
4808
4809         * gdbthread.h (struct thread_info) <status_pending_p>: New field.
4810         * server.c (visit_actioned_threads, handle_pending_status): New
4811         function.
4812         (handle_v_cont): Factor out parts to ...
4813         (resume): ... this new function.  If in all-stop, and a thread
4814         being resumed has a pending status, report it without actually
4815         resuming.
4816         (myresume): Adjust to use the new 'resume' function.
4817         (clear_pending_status_callback, set_pending_status_callback)
4818         (find_status_pending_thread_callback): New functions.
4819         (handle_status): Handle the case of multiple threads having
4820         interesting statuses to report.  Report threads' real last signal
4821         instead of always reporting GDB_SIGNAL_TRAP.  Look for a thread
4822         with an interesting thread to report the status for, instead of
4823         always reporting the status of the first thread.
4824
4825 2014-01-01  Joel Brobecker  <brobecker@adacore.com>
4826
4827         * gdbserver.c (gdbserver_version): Set copyright year to 2014.
4828         * gdbreplay.c (gdbreplay_version): Likewise.
4829
4830 2013-12-18  Yufeng Zhang  <yufeng.zhang@arm.com>
4831
4832         * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
4833         iov.iov_len with the real length in use.
4834
4835 2013-12-13  Joel Brobecker  <brobecker@adacore.com>
4836
4837         * Makefile.in (safe-ctype.o, lbasename.o): New rules.
4838         * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
4839         for all targets that use win32-low.c.
4840         * win32-low.c (win32_ensure_ntdll_loaded): New function.
4841         (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
4842
4843 2013-12-13  Pedro Alves  <palves@redhat.com>
4844
4845         * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
4846         if equal to TARGET_WAITKIND_LOADED.
4847         * win32-low.c (cached_status): New static global.
4848         (win32_wait): Add declaration.
4849         (do_initial_child_stuff): Flush all initial pending debug events
4850         up to the initial breakpoint.
4851         (win32_wait): If CACHED_STATUS was set, return that instead
4852         of doing a real wait.  Remove the code resuming the execution
4853         of the inferior after receiving a TARGET_WAITKIND_LOADED event
4854         during the initial phase.  Also remove the code changing
4855         OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
4856         TARGET_WAITKIND_STOPPED.
4857
4858 2013-12-11  Yao Qi  <yao@codesourcery.com>
4859
4860         * notif.c (handle_notif_ack): Return 0 if no notification
4861         matches.
4862
4863 2013-11-20  Doug Evans  <dje@google.com>
4864
4865         * linux-low.c (linux_set_resume_request): Fix comment.
4866
4867 2013-11-20  Doug Evans  <dje@google.com>
4868
4869         * linux-low.c (resume_status_pending_p): Tweak comment.
4870
4871 2013-11-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4872
4873         * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
4874         amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
4875         * configure.srv (srv_i386_regobj): Add i386-mpx.o.
4876         (srv_i386_linux_regobj): Add i386-mpx-linux.o.
4877         (srv_amd64_regobj): Add amd64-mpx.o.
4878         (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
4879         (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
4880         (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
4881         * i387-fp.c (num_pl_bnd_register) Added constant.
4882         (num_pl_bnd_cfg_registers) Added constant.
4883         (struct i387_xsave) Added reserved area and MPX fields.
4884         (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
4885         * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
4886         function.
4887         (tdesc_i386_mpx_linux): Add MPX amd64 target.
4888         (init_registers_amd64_mpx_linux): Declare new function.
4889         (tdesc_amd64_mpx_linux): Add MPX amd64 target.
4890         (x86_64_regmap): Add MPX registers.
4891         (x86_linux_read_description): Add MPX case.
4892         (initialize_low_arch): Initialize MPX targets.
4893
4894 2013-11-18  Tom Tromey  <tromey@redhat.com>
4895
4896         * configure: Rebuild.
4897         * configure.ac: Don't check for stdlib.h.
4898         * gdbreplay.c: Unconditionally include stdlib.h.
4899
4900 2013-11-18  Tom Tromey  <tromey@redhat.com>
4901
4902         * config.in: Rebuild.
4903         * configure: Rebuild.
4904         * configure.ac: Don't use AC_HEADER_DIRENT.
4905
4906 2013-11-18  Tom Tromey  <tromey@redhat.com>
4907
4908         * server.h: Don't check HAVE_STRING_H.
4909         * gdbreplay.c: Don't check HAVE_STRING_H.
4910         * configure: Rebuild.
4911
4912 2013-11-18  Tom Tromey  <tromey@redhat.com>
4913
4914         * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
4915         LIBGNU.
4916
4917 2013-11-08  Tom Tromey  <tromey@redhat.com>
4918
4919         * configure, config.in: Rebuild.
4920         * configure.ac: Remove unused configury.
4921
4922 2013-11-08  Tom Tromey  <tromey@redhat.com>
4923
4924         * acinclude.m4: Include common.m4, codeset.m4.
4925         * configure, config.in: Rebuild.
4926         * configure.ac: Use GDB_AC_COMMON.
4927
4928 2013-11-06  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4929
4930         * linux-s390-low.c (HWCAP_S390_TE): New define.
4931         (s390_arch_setup): Consider the TE field in the HWCAP for
4932         determining 'have_regset_tdb'.
4933
4934 2013-10-16  Sergio Durigan Junior  <sergiodj@redhat.com>
4935
4936         PR gdb/16014
4937         * tracepoint.c (download_tracepoint_1): Remove unnecessary double
4938         call to sizeof.
4939
4940 2013-10-02  Pedro Alves  <palves@redhat.com>
4941
4942         * server.c (process_serial_event): Don't output "GDBserver
4943         exiting" if GDB is connected through stdio.
4944         * target.c (mywait): Likewise, be silent if GDB is connected
4945         through stdio.
4946
4947 2013-10-01  Joel Brobecker  <brobecker@adacore.com>
4948
4949         * lynx-low.c (lynx_add_threads_after_attach): New function.
4950         (lynx_attach): Remove call to add_thread.  Add call to
4951         lynx_add_threads_after_attach instead.
4952
4953 2013-09-28  Mike Frysinger  <vapier@gentoo.org>
4954
4955         * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4956         * config.in, configure: Regenerated.
4957
4958 2013-09-18  Yao Qi  <yao@codesourcery.com>
4959
4960         PR server/15959
4961         * server.c (start_inferior): Clear 'resume_info'.
4962
4963 2013-09-16  Jiong Wang  <jiwang@tilera.com>
4964
4965         * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4966         for each register.
4967
4968 2013-09-16  Jiong Wang  <jiwang@tilera.com>
4969
4970         * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4971         linux-tile-low.o to srv_tgtobj.
4972
4973 2013-09-16  Will Newton  <will.newton@linaro.org>
4974
4975         * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4976         out regs.
4977
4978 2013-09-06  Pedro Alves  <palves@redhat.com>
4979
4980         * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4981         (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4982         (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4983         (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4984         (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4985         (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4986
4987 2013-09-06  Pedro Alves  <palves@redhat.com>
4988
4989         * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4990         explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4991
4992 2013-09-06  Pedro Alves  <palves@redhat.com>
4993
4994         * linux-amd64-ipa.c: Include tracepoint.h.
4995         * linux-i386-ipa.c: Include tracepoint.h.
4996
4997 2013-09-06  Ricard Wanderlof  <ricardw@axis.com>
4998
4999         * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
5000         (ps_get_thread_area): New function.
5001
5002 2013-09-06  Ricard Wanderlof  <ricardw@axis.com>
5003
5004         * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
5005         (initialize_low_arch): Call init_registers_crisv32 rather than
5006         init_register_crisv32.
5007
5008 2013-09-05  Pedro Alves  <palves@redhat.com>
5009
5010         * server.h (handle_vFile, hostio_last_error_from_errno): Move
5011         to ...
5012         * hostio.h: ... this new file.
5013         * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
5014         win32-low.c: Include hostio.h.
5015
5016 2013-09-05  Pedro Alves  <palves@redhat.com>
5017
5018         * server.h (gdb_client_data, handler_func, callback_handler_func)
5019         (delete_file_handler, add_file_handler, append_callback_event)
5020         (delete_callback_event, start_event_loop, initialize_event_loop):
5021         Move to event-loop.h and include it.
5022         * event-loop.h: New file.
5023
5024 2013-09-05  Pedro Alves  <palves@redhat.com>
5025
5026         * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
5027         * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
5028         (loaded_dll, unloaded_dll): Move to ...
5029         * dll.h: ... this new file.
5030         * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
5031
5032 2013-09-05  Pedro Alves  <palves@redhat.com>
5033
5034         * server.h (current_process, get_thread_process, all_processes)
5035         (add_inferior_to_list, for_each_inferior, current_inferior)
5036         (remove_inferior, add_process, remove_process, find_process_pid)
5037         (have_started_inferiors_p, have_attached_inferiors_p)
5038         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
5039         (clear_inferiors, find_inferior, find_inferior_id)
5040         (inferior_target_data, set_inferior_target_data)
5041         (inferior_regcache_data, set_inferior_regcache_data): Move to
5042         inferiors.h, and include it.
5043         * inferiors.h: New file.
5044
5045 2013-09-05  Pedro Alves  <palves@redhat.com>
5046
5047         * server.h (struct emit_ops, current_insn_ptr, emit_error):
5048         Move ...
5049         * ax.h: ... here.
5050
5051 2013-09-05  Pedro Alves  <palves@redhat.com>
5052
5053         * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
5054         tracepoint.h.
5055         * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
5056         (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
5057         (handle_tracepoint_general_set, handle_tracepoint_query)
5058         (tracepoint_finished_step, tracepoint_was_hit)
5059         (release_while_stepping_state_list, current_traceframe)
5060         (in_readonly_region, traceframe_read_mem)
5061         (fetch_traceframe_registers, traceframe_read_sdata)
5062         (traceframe_read_info, struct fast_tpoint_collect_status)
5063         (fast_tracepoint_collecting, force_unlock_trace_buffer)
5064         (handle_tracepoit_bkpts, initialize_low_tracepoint)
5065         (supply_fast_tracepoint_registers)
5066         (supply_static_tracepoint_registers, set_trampoline_buffer_space)
5067         (ipa_tdesc, claim_trampoline_space)
5068         (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
5069         (agent_mem_read, agent_get_trace_state_variable_value)
5070         (agent_set_trace_state_variable_value, agent_tsv_read)
5071         (agent_mem_read_string, get_raw_reg_func_addr)
5072         (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
5073         * tracepoint.h: ... this new file.
5074
5075 2013-09-05  Pedro Alves  <palves@redhat.com>
5076
5077         * server.h (perror_with_name, error, fatal, warning, paddress)
5078         (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
5079         include it.
5080         * utils.h: New file.
5081
5082 2013-09-05  Pedro Alves  <palves@redhat.com>
5083
5084         * server.h (remote_debug, noack_mode, transport_is_reliable)
5085         (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
5086         (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
5087         (getpkt, remote_prepare, remote_open, remote_close, write_ok)
5088         (write_enn, initialize_async_io, enable_async_io)
5089         (disable_async_io, check_remote_input_interrupt_request)
5090         (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
5091         (dead_thread_notify, prepare_resume_reply)
5092         (decode_address_to_semicolon, decode_address, decode_m_packet)
5093         (decode_M_packet, decode_X_packet, decode_xfer_write)
5094         (decode_search_memory_packet, unhexify, hexify)
5095         (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
5096         (look_up_one_symbol, relocate_instruction)
5097         (monitor_output): Move to remote-utils.h, and include it.
5098         * remote-utils.h: New file.
5099
5100 2013-09-05  Pedro Alves  <palves@redhat.com>
5101
5102         * server.h (_): Delete.
5103
5104 2013-09-02  Pedro Alves  <palves@redhat.com>
5105
5106         * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
5107         (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
5108         allocated.
5109         (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
5110
5111 2013-09-02  Pierre Muller  <muller@sourceware.org>
5112
5113         * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
5114         or WriteProcessMemory complete successfully and handle
5115         ERROR_PARTIAL_COPY error.
5116
5117 2013-09-02  Pedro Alves  <palves@redhat.com>
5118
5119         * server.c (gdb_read_memory): Return -1 on traceframe memory read
5120         error instead of EIO.
5121
5122 2013-08-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
5123
5124         PR server/15604
5125         * linux-low.c: Include filestuff.h.
5126         (linux_create_inferior) <pid == 0>: Call close_most_fds.
5127         * lynx-low.c: Include filestuff.h.
5128         (lynx_create_inferior) <pid == 0>: Call close_most_fds.
5129         * server.c: Include filestuff.h.
5130         (main): Call notice_open_fds.
5131         * spu-low.c: Include filestuff.h.
5132         (spu_create_inferior) <pid == 0>: Call close_most_fds.
5133
5134 2013-08-22  Luis Machado  <lgustavo@codesourcery.com>
5135
5136         * Makefile.in: Explain why ../target and ../nat are not
5137         listed as include file search paths.
5138         (linux-waitpid.o): New object file rule.
5139         * configure.srv (srv_native_linux_obj): New variable.
5140         Replace all occurrences of linux native object files with
5141         $srv_native_linux_obj.
5142         * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
5143         (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
5144         (linux_enable_event_reporting): Remove declaration.
5145         (my_waitpid): Moved to common/linux-waitpid.c.
5146         (linux_wait_for_event): Pass ptid when calling
5147         linux_enable_event_reporting.
5148         (linux_supports_tracefork_flag): Remove.
5149         (linux_enable_event_reporting): Likewise.
5150         (linux_tracefork_grandchild): Remove.
5151         (STACK_SIZE): Moved to common/linux-ptrace.c.
5152         (linux_tracefork_child): Remove.
5153         (linux_test_for_tracefork): Remove.
5154         (linux_look_up_symbols): Call linux_supports_traceclone.
5155         (initialize_low): Remove call to linux_test_for_tracefork.
5156         * linux-low.h (PTRACE_TYPE_ARG3): Move to
5157         common/linux-ptrace.h.
5158         (PTRACE_TYPE_ARG4): Likewise.
5159         Include linux-ptrace.h.
5160
5161 2013-08-21  Pedro Alves  <palves@redhat.com>
5162
5163         * config.in: Renegerate.
5164
5165 2013-08-19  Luis Machado  <lgustavo@codesourcery.com>
5166
5167         * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
5168         (SFILES): Remove $(srcdir)/common/target-common.c and
5169         add $(srcdir)/target/waitstatus.c.
5170         (OBS): Remove target-common.o and add waitstatus.o.
5171         (server_h): Remove $(srcdir)/../common/target-common.h and
5172         add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
5173         and $(srcdir)/../target/waitstatus.h.
5174         (target-common.o): Remove.
5175         (waitstatus.o): New target object file.
5176         * target.h: Do not include target-common.h and
5177         include target/resume.h, target/wait.h and
5178         target/waitstatus.h.
5179
5180 2013-08-13  Luis Machado  <lgustavo@codesourcery.com>
5181
5182         * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5183         to PTRACE_TYPE_ARG3.
5184         * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5185         to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
5186         PTRACE_TYPE_ARG4.
5187         * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
5188         (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
5189
5190 2013-07-27  Jie Zhang  <jie@codesourcery.com>
5191             Daniel Jacobowitz  <dan@codesourcery.com>
5192             Yao Qi  <yao@codesourcery.com>
5193
5194         * Makefile.in (SFILES): Add common/mips-linux-watch.c.
5195         (mips-linux-watch.o): New rule.
5196         (mips_linux_watch_h): New variable.
5197         * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
5198         srv_tgtobj.
5199         * linux-mips-low.c: Include mips-linux-watch.h.
5200         (struct arch_process_info, struct arch_lwp_info): New.
5201         (update_watch_registers_callback): New function.
5202         (mips_linux_new_process, mips_linux_new_thread) New functions.
5203         (mips_linux_prepare_to_resume, mips_insert_point): New
5204         functions.
5205         (mips_remove_point, mips_stopped_by_watchpoint): New
5206         functions.
5207         (rsp_bp_type_to_target_hw_bp_type): New function.
5208         (mips_stopped_data_address): New function.
5209         (the_low_target): Add watchpoint support functions.
5210
5211 2013-07-27  Yao Qi  <yao@codesourcery.com>
5212
5213         * i386-low.c: Include break-common.h.
5214         (enum target_hw_bp_type): Remove.
5215
5216 2013-07-24  Luis Machado  <lgustavo@codesourcery.com>
5217
5218         * Makefile.in (SFILES): /common/target-common.c.
5219         (OBS): Add target-common.o.
5220         (server_h): Add $(srcdir)/../common/target-common.h.
5221         (target-common.o): New target.
5222         * server.c (queue_stop_reply_callback): Free
5223         status string after use.
5224         * target.c (target_waitstatus_to_string): Remove.
5225         * target.h: Include target-common.h.
5226         (resume_kind): Likewise.
5227         (target_waitkind): Likewise.
5228         (target_waitstatus): Likewise.
5229         (TARGET_WNOHANG): Likewise.
5230
5231 2013-07-04  Yao Qi  <yao@codesourcery.com>
5232
5233         * Makefile.in (host_alias): Use @host_noncanonical@.
5234         (target_alias): Use @target_noncanonical@.
5235         * configure.ac: Use ACX_NONCANONICAL_TARGET and
5236         ACX_NONCANONICAL_HOST.
5237         * configure: Regenerated.
5238
5239         Revert:
5240         2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>
5241
5242         * configure.ac (version_host, version_target): Set and AC_SUBST them.
5243         * configure: Rebuild.
5244         * Makefile.in (version_host, version_target): Get from configure.
5245         (version.c): Use $(version_host) and $(version_target).
5246
5247 2013-07-03  Pedro Alves  <palves@redhat.com>
5248
5249         * Makefile.in (config.status): Depend on development.sh.
5250         * acinclude.m4: Include libmcheck.m4.
5251         * configure: Regenerate.
5252
5253 2013-07-02  Mircea Gherzan  <mircea.gherzan@intel.com>
5254
5255         * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
5256         attribute inside the parentheses.
5257         (winapi_DebugSetProcessKillOnExit): Ditto.
5258         (winapi_DebugBreakProcess): Ditto.
5259         (winapi_GenerateConsoleCtrlEvent): Ditto.
5260
5261 2013-07-02  Mircea Gherzan  <mircea.gherzan@intel.com>
5262
5263         * notif.h (notif_event): Add a dummy member to avoid compiler
5264         errors.
5265
5266 2013-07-01  Pedro Alves  <palves@redhat.com>
5267
5268         * hostio.c (HOSTIO_PATH_MAX): Define.
5269         (require_filename, handle_open, handle_unlink, handle_readlink):
5270         Use it.
5271
5272 2013-07-01  Pedro Alves  <palves@redhat.com>
5273
5274         * server.h: Include "pathmax.h".
5275         * linux-low.c: Don't include sys/param.h.
5276         (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
5277         MAXPATHLEN.
5278         * win32-low.c: Don't include sys/param.h.
5279         (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
5280
5281 2013-07-01  Pedro Alves  <palves@redhat.com>
5282
5283         * event-loop.c: Don't check HAVE_UNISTD_H before including
5284         <unistd.h>.
5285         * gdbreplay.c: Likewise.
5286         * remote-utils.c: Likewise.
5287         * server.c: Likewise.
5288         * configure.ac: Don't check for unistd.h.
5289         * configure: Regenerate.
5290
5291 2013-06-28  Tom Tromey  <tromey@redhat.com>
5292
5293         * Makefile.in (version.c): Use version.in, not
5294         common/version.in.
5295
5296 2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>
5297
5298         * configure.ac (version_host, version_target): Set and AC_SUBST them.
5299         * configure: Rebuild.
5300         * Makefile.in (version_host, version_target): Get from configure.
5301         (version.c): Use $(version_host) and $(version_target).
5302
5303 2013-06-10  Dmitry Kozlov <ddk@codesourcery.com>
5304
5305         Fix trace-status to output user name without trailing colon.
5306         * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
5307
5308 2013-06-10  Dmitry Kozlov <ddk@codesourcery.com>
5309
5310         Fix trace-status to output proper start-time and stop-time.
5311         * tracepoint.c (cmd_qtstatus): Modify trace-status output to
5312         output start time and stop time in hex as gdb expects.
5313
5314 2013-06-26  Pedro Alves  <pedro@codesourcery.com>
5315
5316         * tracepoint.c (build_traceframe_info_xml): Output trace state
5317         variables present in the trace buffer.
5318
5319 2013-06-24  Tom Tromey  <tromey@redhat.com>
5320
5321         * Makefile.in (version.c): Use bfd/version.h, common/version.in,
5322         create-version.sh.
5323         (version.o): Remove.
5324         * gdbreplay.c: Include version.h.
5325         (version, host_name): Don't declare.
5326         * server.h: Include version.h.
5327         (version, host_name): Don't declare.
5328
5329 2013-06-12  Pedro Alves  <palves@redhat.com>
5330
5331         * linux-x86-low.c (linux_is_elf64): Delete global.
5332         (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
5333         with local linux_pid_exe_is_elf_64_file use.
5334
5335 2013-06-11  Pedro Alves  <palves@redhat.com>
5336
5337         * linux-low.c (regset_disabled, disable_regset): New functions.
5338         (regsets_fetch_inferior_registers)
5339         (regsets_store_inferior_registers): Use them.
5340         (initialize_regsets_info); Don't allocate the disabled_regsets
5341         array here.
5342         * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
5343         comment.
5344
5345 2013-06-11  Pedro Alves  <palves@redhat.com>
5346
5347         * linux-low.c (initialize_regsets_info): Use xcalloc instead of
5348         xmalloc.
5349
5350 2013-06-11  Pedro Alves  <palves@redhat.com>
5351
5352         * linux-x86-low.c (initialize_low_arch): Call
5353         init_registers_x32_avx_linux.
5354
5355 2013-06-09  Jan Kratochvil  <jan.kratochvil@redhat.com>
5356
5357         Fix compatibility with Android Bionic.
5358         * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
5359         it is not empty.
5360
5361 2013-06-07  Pedro Alves  <palves@redhat.com>
5362
5363         PR server/14823
5364         * Makefile.in (OBS): Add tdesc.o.
5365         (IPA_OBJS): Add tdesc-ipa.o.
5366         (tdesc-ipa.o): New rule.
5367         * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
5368         interface.
5369         * linux-low.c (new_inferior): Delete.
5370         (disabled_regsets, num_regsets): Delete.
5371         (linux_add_process): Adjust to set the new per-process
5372         new_inferior flag.
5373         (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
5374         (linux_wait_for_lwp): Adjust.  Only call arch_setup if the event
5375         was a stop.  When calling arch_setup, switch the current inferior
5376         to the thread that got an event.
5377         (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
5378         (regsets_fetch_inferior_registers)
5379         (regsets_store_inferior_registers): New regsets_info parameter.
5380         Adjust to use it.
5381         (linux_register_in_regsets): New regs_info parameter.  Adjust to
5382         use it.
5383         (register_addr, fetch_register, store_register): New usrregs_info
5384         parameter.  Adjust to use it.
5385         (usr_fetch_inferior_registers, usr_store_inferior_registers): New
5386         parameter regs_info.  Adjust to use it.
5387         (linux_fetch_registers): Get the current inferior's regs_info, and
5388         adjust to use it.
5389         (linux_store_registers): Ditto.
5390         [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
5391         (initialize_low): Don't initialize the target_regsets here.  Call
5392         initialize_low_arch.
5393         * linux-low.h (target_regsets): Delete declaration.
5394         (struct regsets_info): New.
5395         (struct usrregs_info): New.
5396         (struct regs_info): New.
5397         (struct process_info_private) <new_inferior>: New field.
5398         (struct linux_target_ops): Delete the num_regs, regmap, and
5399         regset_bitmap fields.  New field regs_info.
5400         [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
5401         * i387-fp.c (num_xmm_registers): Delete.
5402         (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
5403         calls to new interface.
5404         (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
5405         (i387_xsave_to_cache): Adjust find_regno calls to new interface.
5406         Infer the number of xmm registers from the regcache's target
5407         description.
5408         * i387-fp.h (num_xmm_registers): Delete.
5409         * inferiors.c (add_thread): Don't install the thread's regcache
5410         here.
5411         * proc-service.c (gregset_info): Fetch the current inferior's
5412         regs_info.  Adjust to use it.
5413         * regcache.c: Include tdesc.h.
5414         (register_bytes, reg_defs, num_registers)
5415         (gdbserver_expedite_regs): Delete.
5416         (get_thread_regcache): If the thread doesn't have a regcache yet,
5417         create one, instead of aborting gdbserver.
5418         (regcache_invalidate_one): Rename to ...
5419         (regcache_invalidate_thread): ... this.
5420         (regcache_invalidate_one): New.
5421         (regcache_invalidate): Only invalidate registers of the current
5422         process.
5423         (init_register_cache): Add target_desc parameter, and use it.
5424         (new_register_cache): Ditto.  Assert the target description has a
5425         non zero registers_size.
5426         (regcache_cpy): Add assertions.  Adjust.
5427         (realloc_register_cache, set_register_cache): Delete.
5428         (registers_to_string, registers_from_string): Adjust.
5429         (find_register_by_name, find_regno, find_register_by_number)
5430         (register_cache_size): Add target_desc parameter, and use it.
5431         (free_register_cache_thread, free_register_cache_thread_one)
5432         (regcache_release, register_cache_size): New.
5433         (register_size): Add target_desc parameter, and use it.
5434         (register_data, supply_register, supply_register_zeroed)
5435         (supply_regblock, supply_register_by_name, collect_register)
5436         (collect_register_as_string, collect_register_by_name): Adjust.
5437         * regcache.h (struct target_desc): Forward declare.
5438         (struct regcache) <tdesc>: New field.
5439         (init_register_cache, new_register_cache): Add target_desc
5440         parameter.
5441         (regcache_invalidate_thread): Declare.
5442         (regcache_invalidate_one): Delete declaration.
5443         (regcache_release): Declare.
5444         (find_register_by_number, register_cache_size, register_size)
5445         (find_regno): Add target_desc parameter.
5446         (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
5447         declarations.
5448         * remote-utils.c: Include tdesc.h.
5449         (outreg, prepare_resume_reply): Adjust.
5450         * server.c: Include tdesc.h.
5451         (gdbserver_xmltarget): Delete declaration.
5452         (get_features_xml, process_serial_event): Adjust.
5453         * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
5454         declare.
5455         (struct process_info) <tdesc>: New field.
5456         (ipa_tdesc): Declare.
5457         * tdesc.c: New file.
5458         * tdesc.h: New file.
5459         * tracepoint.c: Include tdesc.h.
5460         [IN_PROCESS_AGENT] (ipa_tdesc): Define.
5461         (get_context_regcache): Adjust to pass ipa_tdesc down.
5462         (do_action_at_tracepoint): Adjust to get the register cache size
5463         from the context regcache's description.
5464         (traceframe_walk_blocks): Adjust to get the register cache size
5465         from the current trace frame's description.
5466         (traceframe_get_pc): Adjust to get current trace frame's
5467         description and pass it down.
5468         (gdb_collect): Adjust to get the register cache size from the
5469         IPA's description.
5470         * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
5471         (gdbserver_xmltarget): Delete.
5472         (initialize_low_tracepoint): Set the ipa's target description.
5473         * linux-i386-ipa.c (tdesc_i386_linux): Declare.
5474         (initialize_low_tracepoint): Set the ipa's target description.
5475         * linux-x86-low.c: Include tdesc.h.
5476         [__x86_64__] (is_64bit_tdesc): New.
5477         (ps_get_thread_area, x86_get_thread_area): Use it.
5478         (i386_cannot_store_register): Rename to ...
5479         (x86_cannot_store_register): ... this.  Use is_64bit_tdesc.
5480         (i386_cannot_fetch_register): Rename to ...
5481         (x86_cannot_fetch_register): ... this.  Use is_64bit_tdesc.
5482         (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
5483         to new interface.
5484         (target_regsets): Rename to ...
5485         (x86_regsets): ... this.
5486         (x86_get_pc, x86_set_pc): Adjust register_size calls to new
5487         interface.
5488         (x86_siginfo_fixup): Use is_64bit_tdesc.
5489         [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
5490         (tdesc_x32_avx_linux, tdesc_x32_linux)
5491         (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
5492         Declare.
5493         (x86_linux_update_xmltarget): Delete.
5494         (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
5495         (have_ptrace_getfpxregs, have_ptrace_getregset): New.
5496         (AMD64_LINUX_USER64_CS): New.
5497         (x86_linux_read_description): New, based on
5498         x86_linux_update_xmltarget.
5499         (same_process_callback): New.
5500         (x86_arch_setup_process_callback): New.
5501         (x86_linux_update_xmltarget): New.
5502         (x86_regsets_info): New.
5503         (amd64_linux_regs_info): New.
5504         (i386_linux_usrregs_info): New.
5505         (i386_linux_regs_info): New.
5506         (x86_linux_regs_info): New.
5507         (x86_arch_setup): Reimplement.
5508         (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
5509         (x86_emit_ops): Ditto.
5510         (the_low_target): Adjust.  Install x86_linux_regs_info,
5511         x86_cannot_fetch_register, and x86_cannot_store_register.
5512         (initialize_low_arch): New.
5513         * linux-ia64-low.c (tdesc_ia64): Declare.
5514         (ia64_fetch_register): Adjust.
5515         (ia64_usrregs_info, regs_info): New globals.
5516         (ia64_regs_info): New function.
5517         (the_low_target): Adjust.
5518         (initialize_low_arch): New function.
5519         * linux-sparc-low.c (tdesc_sparc64): Declare.
5520         (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
5521         Adjust.
5522         (sparc_arch_setup): New function.
5523         (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
5524         (the_low_target): Adjust.
5525         (initialize_low_arch): New function.
5526         * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
5527         (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
5528         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
5529         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
5530         (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
5531         (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
5532         (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
5533         (tdesc_powerpc_isa205_vsx64l): Declare.
5534         (ppc_cannot_store_register, ppc_collect_ptrace_register)
5535         (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
5536         (ppc_set_pc, ppc_get_hwcap): Adjust.
5537         (ppc_usrregs_info): Forward declare.
5538         (!__powerpc64__) ppc_regmap_adjusted: New global.
5539         (ppc_arch_setup): Adjust to the current process'es target
5540         description.
5541         (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
5542         (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
5543         (ppc_store_evrregset): Adjust.
5544         (target_regsets): Rename to ...
5545         (ppc_regsets): ... this, and make static.
5546         (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
5547         (ppc_regs_info): New function.
5548         (the_low_target): Adjust.
5549         (initialize_low_arch): New function.
5550         * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
5551         (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
5552         (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
5553         (tdesc_s390x_linux64v2): Declare.
5554         (s390_collect_ptrace_register, s390_supply_ptrace_register)
5555         (s390_fill_gregset, s390_store_last_break): Adjust.
5556         (target_regsets): Rename to ...
5557         (s390_regsets): ... this, and make static.
5558         (s390_get_pc, s390_set_pc): Adjust.
5559         (s390_get_hwcap): New target_desc parameter, and use it.
5560         [__s390x__] (have_hwcap_s390_high_gprs): New global.
5561         (s390_arch_setup): Adjust to set the current process'es target
5562         description.  Don't adjust the regmap.
5563         (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
5564         [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
5565         (regs_info_3264): New globals.
5566         (s390_regs_info): New function.
5567         (the_low_target): Adjust.
5568         (initialize_low_arch): New function.
5569         * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
5570         (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
5571         [__mips64] (init_registers_mips_linux)
5572         (init_registers_mips_dsp_linux): Delete defines.
5573         [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
5574         (have_dsp): New global.
5575         (mips_read_description): New, based on mips_arch_setup.
5576         (mips_arch_setup): Reimplement.
5577         (get_usrregs_info): New function.
5578         (mips_cannot_fetch_register, mips_cannot_store_register)
5579         (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
5580         (mips_fill_fpregset, mips_store_fpregset): Adjust.
5581         (target_regsets): Rename to ...
5582         (mips_regsets): ... this, and make static.
5583         (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
5584         (dsp_regs_info, regs_info): New globals.
5585         (mips_regs_info): New function.
5586         (the_low_target): Adjust.
5587         (initialize_low_arch): New function.
5588         * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
5589         (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
5590         Declare.
5591         (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
5592         (arm_read_description): New, with bits factored from
5593         arm_arch_setup.
5594         (arm_arch_setup): Reimplement.
5595         (target_regsets): Rename to ...
5596         (arm_regsets): ... this, and make static.
5597         (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
5598         (arm_regs_info): New function.
5599         (the_low_target): Adjust.
5600         (initialize_low_arch): New function.
5601         * linux-m68k-low.c (tdesc_m68k): Declare.
5602         (target_regsets): Rename to ...
5603         (m68k_regsets): ... this, and make static.
5604         (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
5605         (m68k_regs_info): New function.
5606         (m68k_arch_setup): New function.
5607         (the_low_target): Adjust.
5608         (initialize_low_arch): New function.
5609         * linux-sh-low.c (tdesc_sharch): Declare.
5610         (target_regsets): Rename to ...
5611         (sh_regsets): ... this, and make static.
5612         (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
5613         (sh_regs_info, sh_arch_setup): New functions.
5614         (the_low_target): Adjust.
5615         (initialize_low_arch): New function.
5616         * linux-bfin-low.c (tdesc_bfin): Declare.
5617         (bfin_arch_setup): New function.
5618         (bfin_usrregs_info, regs_info): New globals.
5619         (bfin_regs_info): New function.
5620         (the_low_target): Adjust.
5621         (initialize_low_arch): New function.
5622         * linux-cris-low.c (tdesc_cris): Declare.
5623         (cris_arch_setup): New function.
5624         (cris_usrregs_info, regs_info): New globals.
5625         (cris_regs_info): New function.
5626         (the_low_target): Adjust.
5627         (initialize_low_arch): New function.
5628         * linux-cris-low.c (tdesc_crisv32): Declare.
5629         (cris_arch_setup): New function.
5630         (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
5631         (cris_regs_info): New function.
5632         (the_low_target): Adjust.
5633         (initialize_low_arch): New function.
5634         * linux-m32r-low.c (tdesc_m32r): Declare.
5635         (m32r_arch_setup): New function.
5636         (m32r_usrregs_info, regs_info): New globals.
5637         (m32r_regs_info): Adjust.
5638         (initialize_low_arch): New function.
5639         * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
5640         (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
5641         (tic6x_usrregs_info): Forward declare.
5642         (tic6x_read_description): New function, based on ...
5643         (tic6x_arch_setup): ... this.  Reimplement.
5644         (target_regsets): Rename to ...
5645         (tic6x_regsets): ... this, and make static.
5646         (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
5647         (tic6x_regs_info): New function.
5648         (the_low_target): Adjust.
5649         (initialize_low_arch): New function.
5650         * linux-xtensa-low.c (tdesc_xtensa): Declare.
5651         (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
5652         (target_regsets): Rename to ...
5653         (xtensa_regsets): ... this, and make static.
5654         (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
5655         globals.
5656         (xtensa_arch_setup, xtensa_regs_info): New functions.
5657         (the_low_target): Adjust.
5658         (initialize_low_arch): New function.
5659         * linux-nios2-low.c (tdesc_nios2_linux): Declare.
5660         (nios2_arch_setup): Set the current process'es tdesc.
5661         (target_regsets): Rename to ...
5662         (nios2_regsets): ... this.
5663         (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
5664         (nios2_regs_info): New function.
5665         (the_low_target): Adjust.
5666         (initialize_low_arch): New function.
5667         * linux-aarch64-low.c (tdesc_aarch64): Declare.
5668         (aarch64_arch_setup): Set the current process'es tdesc.
5669         (target_regsets): Rename to ...
5670         (aarch64_regsets): ... this.
5671         (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
5672         (aarch64_regs_info): New function.
5673         (the_low_target): Adjust.
5674         (initialize_low_arch): New function.
5675         * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
5676         globals.
5677         (target_regsets): Rename to ...
5678         (tile_regsets): ... this.
5679         (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
5680         (tile_regs_info): New function.
5681         (tile_arch_setup): Set the current process'es tdesc.
5682         (the_low_target): Adjust.
5683         (initialize_low_arch): New function.
5684         * spu-low.c (tdesc_spu): Declare.
5685         (spu_create_inferior, spu_attach): Set the new process'es tdesc.
5686         * win32-arm-low.c (tdesc_arm): Declare.
5687         (arm_arch_setup): New function.
5688         (the_low_target): Install arm_arch_setup instead of
5689         init_registers_arm.
5690         * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
5691         (init_windows_x86): Rename to ...
5692         (i386_arch_setup): ... this.  Set `win32_tdesc'.
5693         (the_low_target): Adjust.
5694         * win32-low.c (win32_tdesc): New global.
5695         (child_add_thread): Don't create the thread cache here.
5696         (do_initial_child_stuff): Set the new process'es tdesc.
5697         * win32-low.h (struct target_desc): Forward declare.
5698         (win32_tdesc): Declare.
5699         * lynx-i386-low.c (tdesc_i386): Declare global.
5700         (lynx_i386_arch_setup): Set `lynx_tdesc'.
5701         * lynx-low.c (lynx_tdesc): New global.
5702         (lynx_add_process): Set the new process'es tdesc.
5703         * lynx-low.h (struct target_desc): Forward declare.
5704         (lynx_tdesc): Declare global.
5705         * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
5706         (lynx_ppc_arch_setup): Set `lynx_tdesc'.
5707         * nto-low.c (nto_tdesc): New global.
5708         (do_attach): Set the new process'es tdesc.
5709         * nto-low.h (struct target_desc): Forward declare.
5710         (nto_tdesc): Declare.
5711         * nto-x86-low.c (tdesc_i386): Declare.
5712         (nto_x86_arch_setup): Set `nto_tdesc'.
5713
5714 2013-06-04  Gary Benson  <gbenson@redhat.com>
5715
5716         * server.c (handle_query): Add "augmented-libraries-svr4-read+"
5717         to qSupported response when appropriate.
5718         (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
5719         with nonzero-length annex.
5720         * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
5721         arguments supplied in annex.
5722
5723 2013-05-31  Doug Evans  <dje@google.com>
5724
5725         PR server/15594
5726         * linux-x86-low.c (ps_get_thread_area): Properly extend address to
5727         64 bits in 64-cross-32 environment.
5728
5729 2013-05-28  Pedro Alves  <palves@redhat.com>
5730
5731         * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
5732         (aarch64-without-fpu.c): Delete rule.
5733         * configure.srv (aarch64*-*-linux*): Remove references to
5734         aarch64-without-fpu.o and aarch64-without-fpu.xml.
5735         * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
5736         declaration.
5737
5738 2013-05-24  Pedro Alves  <palves@redhat.com>
5739
5740         * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
5741         instead of strchr/decode_address.  Error if the range isn't split
5742         with a ','.  Don't assume there's be a ':' in the action.
5743
5744 2013-05-23  Yao Qi  <yao@codesourcery.com>
5745             Pedro Alves  <palves@redhat.com>
5746
5747         * linux-low.c (lwp_in_step_range): New function.
5748         (linux_wait_1): If the thread was range stepping and stopped
5749         outside the stepping range, report the stop to GDB.  Otherwise,
5750         continue stepping.  Add range stepping debug output.
5751         (linux_set_resume_request): Copy the step range from the resume
5752         request to the lwp.
5753         (linux_supports_range_stepping): New.
5754         (linux_target_ops) <supports_range_stepping>: Set to
5755         linux_supports_range_stepping.
5756         * linux-low.h (struct linux_target_ops)
5757         <supports_range_stepping>: New field.
5758         (struct lwp_info) <step_range_start, step_range_end>: New fields.
5759         * linux-x86-low.c (x86_supports_range_stepping): New.
5760         (the_low_target) <supports_range_stepping>: Set to
5761         x86_supports_range_stepping.
5762         * server.c (handle_v_cont): Handle 'r' action.
5763         (handle_v_requests): Append ";r" if the target supports range
5764         stepping.
5765         * target.h (struct thread_resume) <step_range_start,
5766         step_range_end>: New fields.
5767         (struct target_ops) <supports_range_stepping>:
5768         New field.
5769         (target_supports_range_stepping): New macro.
5770
5771 2013-05-17  Joel Brobecker  <brobecker@adacore.com>
5772
5773         * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
5774         confusion in comment.
5775
5776 2013-05-17  Joel Brobecker  <brobecker@adacore.com>
5777
5778         * lynx-low.c (struct process_info_private): New type.
5779         (lynx_add_process): New function.
5780         (lynx_create_inferior, lynx_attach): Replace calls to
5781         add_process by calls to lynx_add_process.
5782         (lynx_resume): If PTID is null, then try using
5783         current_process()->private->last_wait_event_ptid.
5784         Add comments.
5785         (lynx_clear_inferiors): Delete.  The contents of that function
5786         has been inlined in lynx_mourn;
5787         (lynx_wait_1): Save the ptid in the process's private data.
5788         (lynx_mourn): Free the process' private data.  Replace call
5789         to lynx_clear_inferiors by call to clear_inferiors.
5790
5791 2013-05-17  Yao Qi  <yao@codesourcery.com>
5792
5793         * i386-low.c (i386_length_and_rw_bits): Move the comment to
5794         the right place.
5795
5796 2013-05-16  Luis Machado  <lgustavo@codesourcery.com>
5797
5798         * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
5799         PT_DATA_ADDR and PT_TEXT_END_ADDR.  Update comments.
5800         (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
5801         PT_TEXT_END_ADDR guards.  Update comments.
5802         (linux_target_op) <read_offsets>: Conditionally define to
5803         linux_read_offsets if the target is UCLIBC and if it defines
5804         PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
5805
5806 2013-05-06  Sandra Loosemore  <sandra@codesourcery.com>
5807             Andrew Jenner  <andrew@codesourcery.com>
5808
5809         * Makefile.in (SFILES): Add linux-nios2-low.c.
5810         (clean): Add action to delete nios2-linux.c.
5811         (nios2-linux.c): New rule.
5812         * configure.srv: Add nios2*-*-linux*.
5813         * linux-nios2-low.c: New.
5814
5815 2013-05-03  Hafiz Abid Qadeer  <abidh@codesourcery.com>
5816
5817         * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
5818
5819 2013-04-25  Hui Zhu  <hui@codesourcery.com>
5820
5821         PR gdb/15186
5822         * ax.c (ax_printf): Add fflush.
5823
5824 2013-04-22  Tom Tromey  <tromey@redhat.com>
5825
5826         * Makefile.in (SFILES): Add filestuff.c.
5827         (OBS): Add filestuff.o.
5828         (filestuff.o): New target.
5829         * config.in, configure: Rebuild.
5830         * configure.ac: Check for fdwalk, pipe2.
5831
5832 2013-04-17  Pedro Alves  <palves@redhat.com>
5833
5834         * configure.ac (USE_THREAD_DB): Delete variable.
5835         (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
5836         Don't AC_SUBST USE_THREAD_DB.
5837         * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
5838         * config.in, configure: Regenerate.
5839
5840 2013-04-16  Pedro Alves  <palves@redhat.com>
5841
5842         * linux-low.h (struct lwp_info) <thread_known>: Move under
5843         the USE_THREAD_DB #ifdef.
5844
5845 2013-04-16  Pedro Alves  <palves@redhat.com>
5846
5847         * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
5848         (linux-low.o): Delete rule.
5849         * linux-low.h: Always include "gdb_thread_db.h" instead of
5850         conditionally including thread_db.h.
5851         (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
5852         HAVE_THREAD_DB_H.
5853
5854 2013-04-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
5855
5856         * Makefile.in (install-only): Fix make install regression.
5857
5858 2013-04-05  Jan Kratochvil  <jan.kratochvil@redhat.com>
5859
5860         Convert man pages to texinfo, new gdbinit.5 texinfo page.
5861         * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
5862         installation.
5863         * gdbserver.1: Remove.
5864
5865 2013-03-22  Pedro Alves  <palves@redhat.com>
5866
5867         * linux-low.c (handle_extended_wait): Don't call
5868         linux_enable_event_reporting.
5869
5870 2013-03-15  Tony Theodore  <tonyt@logyst.com>
5871
5872         PR build/9098:
5873         * Makefile.in (SHELL): Use @SHELL@.
5874
5875 2013-03-14  Sergio Durigan Junior  <sergiodj@redhat.com>
5876
5877         * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
5878         compiler warning.
5879
5880 2013-03-13  Joel Brobecker  <brobecker@adacore.com>
5881
5882         * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
5883         Remove extraneous NULL element.
5884
5885 2013-03-13  Yao Qi  <yao@codesourcery.com>
5886
5887         * tracepoint.c (traceframe_read_tsv): Look for the last matched
5888         'V' block in trace frame.
5889
5890 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
5891
5892         * target.h (struct target_ops): Add btrace ops.
5893         (target_supports_btrace): New macro.
5894         (target_enable_btrace): New macro.
5895         (target_disable_btrace): New macro.
5896         (target_read_btrace): New macro.
5897         * gdbthread.h (struct thread_info): Add btrace field.
5898         * server.c: Include btrace-common.h.
5899         (handle_btrace_general_set): New function.
5900         (handle_btrace_enable): New function.
5901         (handle_btrace_disable): New function.
5902         (handle_general_set): Call handle_btrace_general_set.
5903         (handle_qxfer_btrace): New function.
5904         (struct qxfer qxfer_packets[]): Add btrace entry.
5905         * inferiors.c (remove_thread): Disable btrace.
5906         * linux-low: Include linux-btrace.h.
5907         (linux_low_enable_btrace): New function.
5908         (linux_low_read_btrace): New function.
5909         (linux_target_ops): Add btrace ops.
5910         * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
5911         Add srv_linux_btrace=yes.
5912         (x86_64-*-linux*): Add linux-btrace.o.
5913         Add srv_linux_btrace=yes.
5914         * configure.ac: Define HAVE_LINUX_BTRACE.
5915         * config.in: Regenerated.
5916         * configure: Regenerated.
5917
5918 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
5919
5920         * server.c (handle_qxfer): Preserve error message if -3 is
5921         returned.
5922         (qxfer): Document the -3 return value.
5923
5924 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
5925
5926         * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
5927         (linux_btrace_h): New variable.
5928         (linux-btrace.o): New rule.
5929
5930 2013-03-08  Stan Shebs  <stan@codesourcery.com>
5931             Hafiz Abid Qadeer  <abidh@codesourcery.com>
5932
5933         * tracepoint.c (trace_buffer_size): New global.
5934         (DEFAULT_TRACE_BUFFER_SIZE): New define.
5935         (init_trace_buffer): Change to one-argument function. Allocate
5936         trace buffer memory.
5937         (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
5938         handle QTBuffer:size packet.
5939         (cmd_bigqtbuffer_size): New function.
5940         (initialize_tracepoint): Call init_trace_buffer with
5941         DEFAULT_TRACE_BUFFER_SIZE.
5942         * server.c (handle_query): Add QTBuffer:size in the
5943         supported packets.
5944
5945 2013-03-07  Yao Qi  <yao@codesourcery.com>
5946
5947         * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5948         (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5949         of -1.
5950         (cmd_qtsp): Adjust condition.  Do post increment.
5951         Set cur_action and cur_step_action back to 0.
5952
5953 2013-03-07  Jeremy Bennett  <jeremy.bennett@embecosm.com>
5954
5955         PR server/15236
5956         * linux-low.c (linux_write_memory): Return early success if LEN is
5957         zero.
5958
5959 2013-03-05  Corinna Vinschen  <vinschen@redhat.de>
5960
5961         * configure.srv: Add x86_64-*-cygwin* as target.
5962
5963 2013-02-28  Tom Tromey  <tromey@redhat.com>
5964
5965         * configure.ac: Invoke AC_SYS_LARGEFILE.
5966         * configure, config.in: Rebuild.
5967
5968 2013-02-28  Corinna Vinschen  <vinschen@redhat.com>
5969
5970         * win32-low.c: Throughout, fix format strings and casts of
5971         printf-like functions to avoid type related warnings on all
5972         platforms.
5973         (get_child_debug_event): Print dwDebugEventCode as hex since
5974         that's how it's usually documented.
5975
5976 2013-02-28  Yao Qi  <yao@codesourcery.com>
5977
5978         * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5979         pulongest.
5980
5981 2013-02-27  Jiong Wang  <jiwang@tilera.com>
5982
5983         * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5984         (reg-tilegx32.c): New rule.
5985         * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5986         * linux-tile-low.c (tile_arch_setup): New function.  Invoke
5987         different register info initializer according to elf class.
5988         (init_registers_tilgx32): New function.  The tilegx32 register info
5989         initializer.
5990         (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5991         (tile_store_gregset): Likewise.
5992
5993 2013-02-27  Yao Qi  <yao@codesourcery.com>
5994
5995         * server.c (process_point_options): Print debug message when
5996         debug_threads is true.
5997
5998 2013-02-26  Yao Qi  <yao@codesourcery.com>
5999
6000         * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
6001
6002 2013-02-19  Pedro Alves  <palves@redhat.com>
6003             Kai Tietz <ktietz@redhat.com>
6004
6005         PR gdb/15161
6006
6007         * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
6008         instead of strtoul to extract address from packet.
6009         (process_serial_event) <'z'>: Likewise.
6010
6011 2013-02-18  Yao Qi  <yao@codesourcery.com>
6012
6013         * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
6014
6015 2013-02-14  Pedro Alves  <palves@redhat.com>
6016
6017         Plug memory leak.
6018
6019         * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
6020         TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
6021
6022 2013-02-14  Pedro Alves  <palves@redhat.com>
6023
6024         * tracepoint.c (cmd_qtdpsrc): Use savestring.
6025
6026 2013-02-14  Pedro Alves  <palves@redhat.com>
6027
6028         * tracepoint.c (save_string): Delete.
6029         (add_tracepoint_action): Use savestring instead of save_string.
6030
6031 2013-02-12  Pedro Alves  <palves@redhat.com>
6032
6033         * linux-xtensa-low.c: Ditto.
6034         * xtensa-xtregs.c: Ditto.
6035
6036 2013-02-12  Sanimir Agovic  <sanimir.agovic@intel.com>
6037
6038         * thread-db.c (thread_db_get_tls_address): NULL pointer check
6039         thread_db.
6040
6041 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
6042
6043         * linux-aarch64-low.c (aarch64_arch_setup): Clamp
6044         aarch64_num_wp_regs and aarch64_num_bp_regs to
6045         AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
6046
6047 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
6048
6049         * linux-aarch64-low.c (ps_get_thread_area): Replace
6050         PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
6051
6052 2013-02-04  Jim MacArthur  <jim.macarthur@arm.com>
6053             Marcus Shawcroft  <marcus.shawcroft@arm.com>
6054             Nigel Stephens  <nigel.stephens@arm.com>
6055             Yufeng Zhang  <yufeng.zhang@arm.com>
6056
6057         * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
6058         (aarch64.c, aarch64-without-fpu.c): New targets.
6059         * configure.srv (aarch64*-*-linux*): New.
6060         * linux-aarch64-low.c: New file.
6061
6062 2013-02-04  Marcus Shawcroft  <marcus.shawcroft@arm.com>
6063
6064         * linux-low.c (handle_extended_wait, linux_create_inferior)
6065         (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
6066         (dequeue_one_deferred_signal, linux_resume_one_thread)
6067         (fetch_register, linux_write_memory, linux_enable_event_reporting)
6068         (linux_tracefork_grandchild, linux_test_for_tracefork)
6069         (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
6070         PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
6071         where the argument is 0.
6072
6073 2013-01-25  Yao Qi  <yao@codesourcery.com>
6074
6075         * event-loop.c: Include "queue.h".
6076         (gdb_event_p): New typedef.
6077         (struct gdb_event) <next_event>: Remove.
6078         (event_queue): Change to QUEUE(gdb_event_p).
6079         (async_queue_event): Remove.
6080         (gdb_event_xfree): New.
6081         (initialize_event_loop): New.
6082         (process_event): Use API from QUEUE.
6083         (wait_for_event): Likewise.
6084         * server.c (main): Call initialize_event_loop.
6085         * server.h (initialize_event_loop): Declare.
6086
6087 2013-01-18  Yao Qi  <yao@codesourcery.com>
6088
6089         * ax.h (struct eval_agent_expr_context): New.
6090         (gdb_eval_agent_expr): Update declaration.
6091         * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
6092         TFRAME.  Add new argument CTX.
6093         * server.h (struct eval_agent_expr_context): Declare.
6094         (agent_mem_read, agent_tsv_read): Update declaration.
6095         (agent_mem_read_string): Likewise.
6096         * tracepoint.c (eval_tracepoint_agent_expr): Remove.
6097         (add_traceframe_block): Add new argument TPOINT.
6098         Increase TPOINT->traceframe_usage.
6099         (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
6100         eval_tracepoint_agent_expr.
6101         (condition_true_at_tracepoint): Likewise.
6102         (agent_mem_read): Remove argument TFRAME.  Add argument CTX.
6103         (agent_mem_read_string, agent_tsv_read): Likewise.
6104
6105 2013-01-16  Yao Qi  <yao@codesourcery.com>
6106
6107         * linux-low.c (linux_resume_one_lwp): Don't check
6108         'lwp->bp_reinsert != 0'.
6109
6110 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
6111             Pedro Alves  <palves@redhat.com>
6112
6113         * lynx-low.c (ptrace_request_to_str): Define a temporary
6114         macro and use it to simplify this function's implementation.
6115
6116 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
6117
6118         * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
6119         sets errno.
6120
6121 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
6122
6123         * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
6124
6125 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
6126
6127         * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
6128
6129 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
6130
6131         * lynx-low.c (lynx_resume): Use the resume_info parameter
6132         to determine the ptid for the lynx_ptrace call, unless
6133         it is equal to minus_one_ptid, in which case we use the
6134         ptid of the current_inferior.
6135         (lynx_wait_1): After having received a thread create/exit
6136         event, resume the inferior's execution using the signaling
6137         thread's ptid, rather than the old ptid.
6138
6139 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
6140
6141         * lynx-low.c (lynx_resume): Delete variable ret.
6142
6143 2013-01-01  Joel Brobecker  <brobecker@adacore.com>
6144
6145         * gdbreplay.c (gdbreplay_version): Update copyright year.
6146         * server.c (gdbserver_version): Likewise.
6147
6148 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
6149
6150         * lynx-low.c (lynx_wait_1): Add debug trace before adding
6151         new thread.
6152
6153 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
6154
6155         * lynx-low.c (ptrace_request_to_str): Add handling for
6156         PTRACE_GETTRACESIG.
6157
6158 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
6159
6160         * lynx-low.c (lynx_attach): Delete variable new_process.
6161
6162 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
6163
6164         * lynx-low.c (lynx_create_inferior): Delete variable
6165         new_process.
6166
6167 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
6168
6169         * lynx-low.c (ptrace_request_to_str): Do not handle
6170         PTRACE_GETTHREADLIST if this macro does not exist.
6171
6172 2012-12-15  Yao Qi  <yao@codesourcery.com>
6173
6174         * Makefile.in (OBS): Add notif.o.
6175         * notif.c, notif.h: New.
6176         * server.c: Include "notif.h".
6177         (struct vstop_notif) <next>: Remove.
6178         <base>: New field.
6179         (queue_stop_reply): Update.
6180         (push_event, send_next_stop_reply): Remove.
6181         (discard_queued_stop_replies): Update.
6182         (notif_stop): New variable.
6183         (handle_v_stopped): Remove.
6184         (handle_v_requests): Don't call handle_v_stopped.  Call
6185         handle_ack_notif instead.
6186         (queue_stop_reply_callback): Call notif_event_enque instead
6187         of queue_stop_reply.
6188         (handle_status): Don't call send_next_stop_reply, call
6189         notif_write_event instead.
6190         (kill_inferior_callback): Likewise.
6191         (detach_or_kill_inferior_callback): Likewise.
6192         (main): Call initialize_notif.
6193         (process_serial_event): Call QUEUE_is_empty.
6194         (handle_target_event): Call notif_push instead of push event.
6195         * server.h (push_event): Remove declaration.
6196
6197 2012-12-10  Tom Tromey  <tromey@redhat.com>
6198
6199         * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
6200         (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
6201         macros.
6202         (.c.o): Rewrite.
6203         (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
6204         (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
6205         (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
6206         (amd64-linux-ipa.o, ax.o): Rewrite.
6207         (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
6208         (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
6209         (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
6210         (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
6211         (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
6212         (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
6213         (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
6214         (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
6215         (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
6216         (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
6217         (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
6218         (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
6219         (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
6220         (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
6221         (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
6222         (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
6223         (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
6224         (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
6225         (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
6226         (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
6227         (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
6228         (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
6229         (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
6230         (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
6231         (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
6232         (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
6233         (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
6234         (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
6235         (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
6236         (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
6237         (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
6238         (reg-tilegx.o): Remove.
6239         (all_object_files): New macro.
6240         Include .deps files.
6241         * aclocal.m4, configure: Rebuild.
6242         * acinclude.m4: Include depstand.m4, lead-dot.m4.
6243         * configure.ac: Invoke ZW_CREATE_DEPDIR,
6244         ZW_PROG_COMPILER_DEPENDENCIES.  Compute GMAKE condition.
6245
6246 2012-12-05  Tom Tromey  <tromey@redhat.com>
6247
6248         PR gdb/14917:
6249         * server.h (current_insn_ptr, emit_error): Declare 'extern'.
6250
6251 2012-11-28  Markus Metzger  <markus.t.metzger@intel.com>
6252
6253         * configure.ac: Check for linux/perf_event.h.
6254         * config.in: Regenerated.
6255         * configure: Regenerated.
6256
6257 2012-11-26  Maxime Villard  <rustyBSD@gmx.fr>
6258
6259         * hostio.c (handle_readlink): Decrease buffer size
6260         parameter passed to readlink by one byte.
6261
6262 2012-11-26  Yao Qi  <yao@codesourcery.com>
6263
6264         * configure.ac (build_warnings): Append '-Wempty-body'.
6265         * configure: Regenerated.
6266         * linux-low.c (linux_create_inferior): Use braces for empty 'if'
6267         body.
6268
6269 2012-11-15  Pierre Muller  <muller@sourceware.org>
6270
6271         * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
6272         * config.in: Regenerate.
6273         * configure: Regenerate.
6274         * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
6275         Use "gdb_wait.h" header instead of <sys/wait.h> header.
6276         * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6277         * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
6278         header.
6279         * server.c: Remove HAVE_WAIT_H conditional.  Use "gdb_wait.h" header
6280         instead of <sys/wait.h> header.
6281         * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6282
6283 2012-11-13 Markus Metzger  <markus.t.metzger@intel.com>
6284
6285         * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
6286         (various make rules): Remove -DGDBSERVER
6287
6288 2012-11-09  Yao Qi  <yao@codesourcery.com>
6289
6290         * spu-low.c (current_ptid): Move it to ..
6291         * gdbthread.h: ... here.  New.
6292         * remote-utils.c (read_ptid): Use macro 'current_ptid'.
6293         * server.c (myresume, process_serial_event): Likewise.
6294         * thread-db.c (thread_db_find_new_threads): Likewise.
6295         * tracepoint.c (run_inferior_command): Likewise.
6296
6297 2012-10-01  Andrew Burgess  <aburgess@broadcom.com>
6298
6299         * server.c (handle_search_memory_1): Include access length in
6300         warning message.
6301
6302 2012-09-05  Michael Brandt  <michael.brandt@axis.com>
6303
6304         * linux-crisv32-low.c: Fix compile errors.
6305
6306 2012-09-04  Yao Qi  <yao@codesourcery.com>
6307
6308         * tracepoint.c (cmd_qtsv): Adjust debug message.
6309         Don't check CUR_TPOINT.
6310
6311 2012-08-28  Yao Qi  <yao@codesourcery.com>
6312
6313         * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
6314         * server.h: Include 'libiberty.h' and 'ansidecl.h'.
6315         (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
6316         Remove declarations of xmalloc, xreallloc, xstrdup and
6317         freeargv.
6318         * Makefile.in (libiberty_h): New.
6319         (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
6320         (linux-bfin-low.o): Append dependency 'libiberty.h'.
6321
6322 2012-08-23  Yao Qi  <yao@codesourcery.com>
6323
6324         * server.h: Remove declaration of 'xsnprintf'.
6325
6326 2012-08-22  Keith Seitz  <keiths@redhat.com>
6327
6328         * server.h: Include build-gnulib-gbserver/config.h.
6329         * gdbreplay.c: Likewise.
6330
6331 2012-08-08  Doug Evans  <dje@google.com>
6332
6333         * Makefile.in (SFILES): Add gdb_vecs.c.
6334         (OBS): Add gdb_vecs.o.
6335         (gdb_vecs_h, host_defs_h): New variables.
6336         (thread-db.o): Add $(gdb_vecs_h) dependency.
6337         (gdb_vecs.o): New rule.
6338         * thread-db.c: #include "gdb_vecs.h".
6339         (thread_db_load_search): Use a vector to iterate over path elements.
6340         Handle text appearing after "$pdir".
6341
6342         * configure.ac: Add check for strstr.
6343         * config.in: Regenerate.
6344         * configure: Regenerate.
6345
6346 2012-08-02  Ulrich Weigand  <ulrich.weigand@linaro.org>
6347
6348         * hostio.c (handle_pread): If pread fails, fall back to attempting
6349         lseek/read.
6350         (handle_pwrite): Likewise for pwrite.
6351
6352 2012-08-01  Ulrich Weigand  <ulrich.weigand@linaro.org>
6353
6354         * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
6355         between unsupported TYPE and unimplementable ADDR/LEN combination.
6356         (arm_insert_point): Act on new return value.
6357
6358 2012-07-31  Pedro Alves  <palves@redhat.com>
6359
6360         * server.c (process_point_options): Only skip tokens if we find
6361         one that is unrecognized.  Don't treat 'X' specially while
6362         skipping unrecognized tokens.
6363
6364 2012-07-30  Ulrich Weigand  <ulrich.weigand@linaro.org>
6365
6366         * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
6367         to 4-byte-align HW breakpoint addresses for Thumb.
6368
6369 2012-07-27  Yao Qi  <yao@codesourcery.com>
6370
6371         PR remote/14161.
6372
6373         * server.h: Declare gdb_agent_about_to_close.
6374         * target.c (kill_inferior): Include "agent.h".
6375         New.  Send command 'kill'.
6376         * target.h (kill_inferior): Removed macro.
6377         * tracepoint.c (gdb_agent_about_to_close): New.
6378         (gdb_agent_helper_thread): Handle command 'close'.
6379         Wait endlessly until the inferior stops.
6380         Install gdb_agent_remove_socket to atexit hook.
6381         (agent_socket_name): New static variable.
6382         (gdb_agent_socket_init): Replace local variable 'name' with
6383         'agent_socket_name'.
6384         (gdb_agent_remove_socket): New.
6385
6386 2012-07-27  Yao Qi  <yao@codesourcery.com>
6387
6388         * server.c (process_point_options): Stop at 'X' when parsing.
6389
6390 2012-07-19  Michael Eager  <eager@eagercon.com>
6391
6392         * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
6393         to hw_execute.
6394         * linux-x86-low.c (x86_insert_point, x86_remove_point):
6395         Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
6396         hardware breakpoint.
6397
6398 2012-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
6399
6400         * gdbserver/linux-low.c (initialize_low): Call
6401         linux_ptrace_init_warnings.
6402
6403 2012-07-02  Doug Evans  <dje@google.com>
6404
6405         * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
6406         pointer to int.
6407
6408 2012-07-02  Stan Shebs  <stan@codesourcery.com>
6409
6410         * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
6411         (ax.o): Add it to build rule.
6412         (ax-ipa.o): Ditto.
6413         (OBS): Add format.o.
6414         (IPA_OBS): Add format.o.
6415         * server.c (handle_query): Claim support for breakpoint commands.
6416         (process_point_options): Add command case.
6417         (process_serial_event): Leave running if there are printfs in
6418         effect.
6419         * mem-break.h (any_persistent_commands): Declare.
6420         (add_breakpoint_commands): Declare.
6421         (gdb_no_commands_at_breakpoint): Declare.
6422         (run_breakpoint_commands): Declare.
6423         * mem-break.c (struct point_command_list): New struct.
6424         (struct breakpoint): New field command_list.
6425         (any_persistent_commands): New function.
6426         (add_commands_to_breakpoint): New function.
6427         (add_breakpoint_commands): New function.
6428         (gdb_no_commands_at_breakpoint): New function.
6429         (run_breakpoint_commands): New function.
6430         * linux-low.c (linux_wait_1): Test for and run breakpoint commands
6431         locally.
6432         * ax.c: Include format.h.
6433         (ax_printf): New function.
6434         (gdb_eval_agent_expr): Add printf opcode.
6435
6436 2012-06-13  Yao Qi  <yao@codesourcery.com>
6437
6438         * server.c (start_inferior): Remove duplicated writes to fields
6439         'last_resume_kind' and 'last_status' of 'current_inferior'.
6440
6441 2012-06-12  Yao Qi  <yao@codesourcery.com>
6442             Pedro Alves  <palves@redhat.com>
6443
6444         * linux-low.c (linux_set_resume_request): Simplify predicate.  Add
6445         comment.
6446         * server.c (handle_v_cont): Extend comment.
6447
6448 2012-06-11  Yao Qi  <yao@codesourcery.com>
6449
6450         * linux-low.c (linux_attach): Add 'static'.
6451
6452 2012-06-06  Yao Qi  <yao@codesourcery.com>
6453
6454         * ax.c (gdb_eval_agent_expr): Print `top' in hex.
6455
6456 2012-06-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
6457
6458         Fix gcc -flto compilation warning.
6459         * server.c (main): Make variable multi_mode and attach volatile.
6460
6461 2012-05-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
6462
6463         * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
6464         if the platform doesn't know about it.
6465
6466 2012-05-30  Jeff Kenton  <jkenton@tilera.com>
6467
6468         * Makefile.in (SFILES): Add linux-tile-low.c.
6469         (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
6470         * configure.srv: Handle tilegx-*-linux*.
6471         * linux-tile-low.c: New file.
6472
6473 2012-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
6474
6475         * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
6476
6477 2012-05-24  Pedro Alves  <palves@redhat.com>
6478
6479         PR gdb/7205
6480
6481         Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
6482
6483 2012-05-24  Pedro Alves  <palves@redhat.com>
6484
6485         PR gdb/7205
6486
6487         Replace target_signal with gdb_signal throughout.
6488
6489 2012-05-22  Maciej W. Rozycki  <macro@codesourcery.com>
6490
6491         * linux-low.c (linux_store_registers): Avoid the copying sequence
6492         when no data has been retrieved by ptrace.
6493
6494 2012-05-22  Will Deacon  <will.deacon@arm.com>
6495
6496         * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
6497         Include asm/ptrace.h.
6498         (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
6499         already defined.
6500
6501 2012-05-21  Maciej W. Rozycki  <macro@codesourcery.com>
6502
6503         * linux-low.c (linux_store_registers): Don't re-retrieve data
6504         with ptrace that has already been obtained from /proc.  Always
6505         copy any data retrieved with ptrace to the buffer supplied.
6506
6507 2012-05-11  Yao Qi  <yao@codesourcery.com>
6508             Pedro Alves  <palves@redhat.com>
6509
6510         * linux-low.c (enum stopping_threads_kind): New.
6511         (stopping_threads): Change type to `enum stopping_threads_kind'.
6512         (handle_extended_wait): If stopping and suspending threads, leave
6513         the new_lwp suspended too.
6514         (linux_wait_for_event): Adjust.
6515         (stop_all_lwps): Set `stopping_threads' to
6516         STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
6517         whether we're suspending threads or just stopping them.  Assert no
6518         recursion happens.
6519
6520 2012-04-29  Yao Qi  <yao@codesourcery.com>
6521
6522         * server.h: Move some code to ...
6523         * gdbthread.h: ... here.  New.
6524         * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
6525         (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
6526         (nto-low.o, win32-low.o): Likewise.
6527         * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
6528         * regcache.c, remote-utils.c, server.c: Likewise.
6529         * target.c, tracepoint.c, win32-low.c: Likewise.
6530
6531 2012-04-24  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
6532
6533         * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
6534         (PTRACE_ARG4_TYPE): Likewise.
6535         (PTRACE_XFER_TYPE): Likewise.
6536         * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
6537         ptrace to PTRACE_ARG3_TYPE.
6538         * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
6539         (PTRACE_ARG4_TYPE): Likewise.
6540         (PTRACE_XFER_TYPE): Likewise.
6541         (linux_detach_one_lwp): Cast fourth argument of
6542         ptrace to long then PTRACE_ARG4_TYPE.
6543         (regsets_fetch_inferior_registers): Cast third argument of
6544         ptrace to long then PTRACE_ARG3_TYPE.
6545         (regsets_store_inferior_registers): Likewise.
6546
6547 2012-04-20  Pedro Alves  <palves@redhat.com>
6548
6549         * configure: Regenerate.
6550
6551 2012-04-19  Pedro Alves  <palves@redhat.com>
6552
6553         * Makefile.in (GNULIB_BUILDDIR): New.
6554         (LIBGNU, INCGNU, GNULIB_H): Adjust.
6555         (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
6556         (all, install-only, uninstall, clean-info, all-lib, clean): No
6557         longer pass GNULIB_FLAGS_TO_PASS.  Use subdir_do.
6558         (maintainer-clean realclean distclean): Use subdir_do.
6559         (subdir_do): New.
6560         (gnulib/import/Makefile): Adjust.  Replace gnulib/import with
6561         $(GNULIB_BUILDDIR).  Don't pass argument to config.status.
6562         * acinclude.m4: Include acx_configure_dir.m4.
6563         * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
6564         calls.  Call AC_PROG_RANLIB.  Configure gnulib using
6565         ACX_CONFIGURE_DIR.
6566         (GNULIB): New.
6567         (GNULIB_STDINT_H): Adjust.
6568         (AC_OUTPUT): Don't output gnulib/Makefile anymore.
6569         * gdbreplay.c: Include build-gnulib/config.h.
6570         * server.h: Likewise.
6571         * aclocal.m4: Regenerate.
6572         * config.in: Regenerate.
6573         * configure: Regenerate.
6574
6575 2012-04-19  Pedro Alves  <palves@redhat.com>
6576
6577         * Makefile.in (LIBGNU, INCGNU): Adjust.
6578         (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
6579         (all, install-only, uninstall, clean-info, all-lib, clean)
6580         (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
6581         * configure.ac: Adjust AC_OUTPUT output.
6582         * aclocal.m4: Regenerate.
6583         * configure: Regenerate.
6584
6585 2012-04-19  Pedro Alves  <palves@redhat.com>
6586
6587         * Makefile.in (generated_files): New.
6588         (server_h): Remove the explicit dependency on config.h, and depend
6589         on $generated_files.
6590
6591 2012-04-19  Pedro Alves  <palves@redhat.com>
6592
6593         * Makefile.in (INCGNU): Add -Ignulib.
6594
6595 2012-04-19  Pedro Alves  <palves@redhat.com>
6596
6597         * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
6598         (INCGNU): ... this, and spell out -I here.
6599         (GNULIB_LIB): Rename to ...
6600         (LIBGNU): ... this.
6601         (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
6602
6603 2012-04-19  Pedro Alves  <palves@redhat.com>
6604
6605         * config.in: Regenerate.
6606
6607 2012-04-19  Pedro Alves  <palves@redhat.com>
6608
6609         * configure.ac: Remove AC_CHECK_DECLS check for memmem.
6610         * server.h (memmem): Remove declaration.
6611         * config.in: Regenerate.
6612         * configure: Regenerate.
6613
6614 2012-04-19  Yao Qi  <yao@codesourcery.com>
6615
6616         * Makefile.in (SFILES): Add common/vec.c.
6617         (OBS): Add vec.o.
6618         (vec.o): New rule.
6619
6620 2012-04-19  Yao Qi  <yao@codesourcery.com>
6621
6622         * remote-utils.c (prepare_resume_reply): Replace with macro
6623         target_core_of_thread.
6624         * server.c (handle_qxfer_threads_proper): Likewise.
6625         * target.h (traget_core_of_thread): New macro.
6626
6627 2012-04-18  Pedro Alves  <palves@redhat.com>
6628
6629         * aclocal.m4: Regenerate.
6630         * configure: Regenerate.
6631
6632 2012-04-16  Yao Qi  <yao@codesourcery.com>
6633
6634         * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
6635         duplicated on address.
6636
6637 2012-04-16  Yao Qi  <yao@codesourcery.com>
6638
6639         * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
6640         (struct tracepoint_action_ops) <send>: New field.
6641         (m_tracepoint_action_send, r_tracepoint_action_send): New.
6642         (agent_expr_send, x_tracepoint_action_send): New.
6643         (l_tracepoint_action_send): New.
6644         (cmd_qtdp): Download and install tracepoint
6645         according to `use_agent'.
6646         (run_inferior_command): Add one more parameter `len'.
6647         Update callers.
6648         (tracepoint_send_agent): New.
6649         (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
6650
6651 2012-04-16  Yao Qi  <yao@codesourcery.com>
6652
6653         * tracepoint.c (download_tracepoints): Moved to ...
6654         (cmd_qtstart): ... here.
6655
6656 2012-04-14  Yao Qi  <yao@codesourcery.com>
6657
6658         * tracepoint.c: Include inttypes.h.
6659         (struct collect_memory_action): Use sized types.
6660         (struct tracepoint): Likewise.
6661         (cmd_qtdp, stop_tracing): Update print specifiers.
6662         (cmd_qtp, response_tracepoint): Likewise.
6663         (collect_data_at_tracepoint): Likewise.
6664         (collect_data_at_step): Likewise.
6665
6666 2012-04-14  Yao Qi  <yao@codesourcery.com>
6667
6668         Import gnulib module inttypes.
6669         * aclocal.m4, config.in, configure: Regenerated.
6670
6671 2012-04-14  Yao Qi  <yao@codesourcery.com>
6672
6673         * Makefile.in (maintainer-clean, realclean, distclean): Remove
6674         Makefile and config.status at last.
6675
6676 2012-04-13  Yao Qi  <yao@codesourcery.com>
6677
6678         * tracepoint.c: Include stdint.h unconditionally.
6679
6680 2012-04-13  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
6681
6682         * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
6683         on BFD_HAVE_SYS_PROCFS_TYPE.
6684         * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
6685         * configure: Regenerate.
6686         * config.in: Likewise.
6687
6688 2012-04-13  H.J. Lu  <hongjiu.lu@intel.com>
6689
6690         * Makefile.in (clean): Also remove x32.c x32-linux.c
6691         x32-avx.c x32-avx-linux.c.
6692         (x32.o): New target.
6693         (x32.c): Likewise.
6694         (x32-linux.o): Likewise.
6695         (x32-linux.c): Likewise.
6696         (x32-avx.o): Likewise.
6697         (x32-avx.c): Likewise.
6698         (x32-avx-linux.o): Likewise.
6699         (x32-avx-linux.c): Likewise.
6700
6701         * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
6702         (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
6703         (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
6704         (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
6705         (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
6706         i386/x32-avx-linux.xml.
6707
6708         * linux-x86-low.c (init_registers_x32_linux): New prototype.
6709         (init_registers_x32_avx_linux): Likwise.
6710         (x86_linux_update_xmltarget): Call init_registers_x32_linux
6711         or init_registers_x32_avx_linux if linux_is_elf64 is false.
6712
6713 2012-04-13  Pedro Alves  <palves@redhat.com>
6714
6715         * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
6716         (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
6717         (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
6718         (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
6719         the sub-make.
6720
6721 2012-04-12  H.J. Lu  <hongjiu.lu@intel.com>
6722
6723         * linux-x86-low.c (compat_x32_clock_t): New.
6724         (compat_x32_siginfo_t): Likewise.
6725         (compat_x32_siginfo_from_siginfo): Likewise.
6726         (siginfo_from_compat_x32_siginfo): Likewise.
6727         (linux_is_elf64): Likewise.
6728         (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
6729         and siginfo_from_compat_x32_siginfo for x32.
6730         (x86_arch_setup): Set linux_is_elf64.
6731
6732 2012-04-12  H.J. Lu  <hongjiu.lu@intel.com>
6733
6734         PR gdb/13969
6735         * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
6736         e_machine field.
6737         (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
6738         * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
6739         * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
6740         compatible with process.
6741
6742 2012-04-12  Yao Qi  <yao@codesourcery.com>
6743
6744         * Makefile.in: Define abs_top_srcdir and abs_srcdir.
6745         (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
6746         (install-only, install-info, clean): Handle sub dir gnulib.
6747         (all-lib, am--refresh): New targets.
6748         (memmem.o): Remove target.
6749         * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
6750         Invoke gl_EARLY.  Invoke AC_CHECK_PROGS for make.
6751         (AC_REPLACE_FUNCS): Remove memmem.
6752         Invoke gl_INIT and AM_INIT_AUTOMAKE.
6753         (AC_OUTPUT): Generate Makefile in gnulib/.
6754         * aclocal.m4, config.in, configure: Regenerated.
6755
6756 2012-04-10  Maciej W. Rozycki  <macro@codesourcery.com>
6757
6758         * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
6759
6760 2012-04-05  Pedro Alves  <palves@redhat.com>
6761
6762         -Werror=strict-aliasing
6763
6764         * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
6765         pointer.
6766
6767 2012-04-04  Pedro Alves  <palves@redhat.com>
6768
6769         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6770         (sparc_store_gregset_from_stack, sparc_store_gregset)
6771         (sparc_breakpoint_at): Fix formatting.
6772
6773 2012-03-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
6774
6775         * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
6776         are available.
6777         * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
6778         [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
6779         * config.in: Regenerate.
6780         * configure: Likewise.
6781
6782 2012-03-29  Pedro Alves  <palves@redhat.com>
6783
6784         * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
6785         Correct ptrace arguments.
6786
6787 2012-03-28  Pedro Alves  <palves@redhat.com>
6788
6789         * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
6790         (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
6791         (IA64_FR1_REGNUM): New defines.
6792         (ia64_fetch_register): New.
6793         (the_low_target): Install it.
6794         * linux-low.h (struct linux_target_ops) <fetch_register>: New
6795         field.
6796         * linux-low.c (linux_fetch_registers): Try the
6797         the_low_target.fetch_register hook first.
6798
6799         * linux-arm-low.c (the_low_target): Adjust.
6800         * linux-bfin-low.c (the_low_target): Adjust.
6801         * linux-cris-low.c (the_low_target): Adjust.
6802         * linux-crisv32-low.c (the_low_target): Adjust.
6803         * linux-m32r-low.c (the_low_target): Adjust.
6804         * linux-m68k-low.c (the_low_target): Adjust.
6805         * linux-mips-low.c (the_low_target): Adjust.
6806         * linux-ppc-low.c (the_low_target): Adjust.
6807         * linux-s390-low.c (the_low_target): Adjust.
6808         * linux-sh-low.c (the_low_target): Adjust.
6809         * linux-sparc-low.c (the_low_target): Adjust.
6810         * linux-tic6x-low.c (the_low_target): Adjust.
6811         * linux-x86-low.c (the_low_target): Adjust.
6812         * linux-xtensa-low.c (the_low_target): Adjust.
6813
6814 2012-03-26  Pedro Alves  <palves@redhat.com>
6815
6816         * server.c (handle_qxfer_libraries): Don't bail early if
6817         the_target->qxfer_libraries_svr4 is not NULL.
6818
6819 2012-03-26  Pedro Alves  <palves@redhat.com>
6820
6821         * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
6822
6823 2012-03-23  Pedro Alves  <palves@redhat.com>
6824
6825         * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
6826         "library-list-svr4" element's start tag when the the DSO list is
6827         empty.
6828
6829 2012-03-23  Pedro Alves  <palves@redhat.com>
6830
6831         * linux-low.c (read_one_ptr): Read the inferior's pointer through
6832         a variable whose type size is the same as the inferior's pointer
6833         size.
6834
6835 2012-03-21  Thomas Schwinge  <thomas@codesourcery.com>
6836
6837         * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
6838         struct siginfo.
6839         * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
6840         * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6841         * linux-low.h: Include <signal.h>.
6842         (struct siginfo): Remove forward declaration.
6843         (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
6844         struct siginfo.
6845
6846 2012-03-21  Mike Frysinger  <vapier@gentoo.org>
6847
6848         * .gitignore: Ignore more files.
6849
6850 2012-03-19  Pedro Alves  <palves@redhat.com>
6851             Jan Kratochvil  <jan.kratochvil@redhat.com>
6852
6853         * server.c (cont_thread, general_thread): Add describing comments.
6854         (start_inferior): Clear `cont_thread'.
6855         (handle_v_cont): Don't set `cont_thread' if resuming all threads
6856         of a process.
6857
6858 2012-03-15  Yao Qi  <yao@codesourcery.com>
6859
6860         * tracepoint.c (install_tracepoint): Move duplicated tracepoint
6861         handling to ...
6862         (cmd_qtdp): ... here.
6863
6864 2012-03-15  Yao Qi  <yao@codesourcery.com>
6865
6866         * tracepoint.c (struct tracepoint_action_ops): New.
6867         (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
6868         (m_tracepoint_action_download): New.
6869         (r_tracepoint_action_download): New.
6870         (x_tracepoint_action_download): New.
6871         (l_tracepoint_action_download): New.
6872         (add_tracepoint_action): Install `action->ops' according type.
6873         (download_tracepoint_1): Move code `download' function pointer
6874         of various tracepoint_action_ops.
6875
6876 2012-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
6877
6878         * linux-low.c (linux_attach_lwp_1): New variable buffer.  Call
6879         linux_ptrace_attach_warnings.
6880
6881 2012-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
6882
6883         * Makefile.in (linux-ptrace.o): New.
6884         * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
6885         (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
6886         (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
6887         (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
6888         (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
6889         of these targets.
6890         * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
6891
6892 2012-03-08  Yao Qi  <yao@codesourcery.com>
6893             Pedro Alves  <palves@redhat.com>
6894
6895         Fix PR server/13392.
6896         * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
6897         offset of JMP insn.
6898         * tracepoint.c (remove_tracepoint): New.
6899         (cmd_qtdp): Call remove_tracepoint when failed to install.
6900
6901 2012-03-07  Pedro Alves  <palves@redhat.com>
6902
6903         * linux-low.c (get_detach_signal): New.
6904         (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
6905         Pass on pending signals to PTRACE_DETACH.  Check the result of the
6906         ptrace call.
6907         * server.c (program_signals, program_signals_p): New.
6908         (handle_general_set): Handle QProgramSignals.
6909         * server.h (program_signals, program_signals_p): Declare.
6910
6911 2012-03-05  Pedro Alves  <palves@redhat.com>
6912             Jan Kratochvil  <jan.kratochvil@redhat.com>
6913
6914         * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
6915         New comment why.
6916
6917 2012-03-03  Yao Qi  <yao@codesourcery.com>
6918
6919         * tracepoint.c (tracepoint_look_up_symbols): Update call to
6920         agent_look_up_symbols.
6921
6922 2012-03-03  Yao Qi  <yao@codesourcery.com>
6923
6924         * Makefile.in (linux-low.o): Keep dependence on agent.h.
6925         (linux-x86-low.o): Likewise.
6926         * server.h: Remove in_process_agent_loaded.
6927         * tracepoint.c (in_process_agent_loaded): Removed.  Moved it
6928         common/agent.c.
6929         Update callers.
6930
6931 2012-03-03  Yao Qi  <yao@codesourcery.com>
6932
6933         * tracepoint.c (gdb_agent_capability): New global.
6934         (in_process_agent_loaded_ust): Renamed to
6935         `in_process_agent_supports_ust'.
6936         Update callers.
6937         (in_process_agent_supports_ust): Call agent_capability_check.
6938         (clear_installed_tracepoints): Assert that agent supports
6939         agent.
6940
6941 2012-03-03  Yao Qi  <yao@codesourcery.com>
6942
6943         * linux-low.c (linux_supports_agent): New.
6944         (linux_target_ops): Initialize field `supports_agent' with
6945         linux_supports_agent.
6946         * target.h (struct target_ops) <supports_agent>: New.
6947         (target_supports_agent): New macro.
6948         * server.c (handle_general_set): Handle packet 'QAgent'.
6949         (handle_query): Send `QAgent+'.
6950         * Makefile.in (server.o): Depends on agent.h.
6951
6952 2012-03-03  Yao Qi  <yao@codesourcery.com>
6953
6954         * Makefile.in (OBS): Add agent.o.
6955         Add new rule for agent.o.
6956         Track dependence of tracepoint.c on agent.h.
6957         * tracepoint.c (run_inferior_command_1):
6958         (run_inferior_command): Call agent_run_command.
6959         (gdb_ust_connect_sync_socket): Deleted.  Move it to
6960         common/agent.c.
6961         (resume_thread, stop_thread): Likewise.
6962         (gdb_ust_socket_init): Renamed to ...
6963         (gdb_agent_socket_init): ... New.
6964         (gdb_ust_thread): Renamed to ...
6965         (gdb_agent_helper_thread): ... New.
6966         (gdb_ust_init): Move some code to ...
6967         (gdb_agent_init): ... here.  New.
6968         [HAVE_UST]: Call gdb_ust_init.
6969         (initialize_tracepoint_ftlib):  Call gdb_agent_init.
6970         * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6971         * config.in, configure: Regenerated.
6972
6973 2012-03-02  Pedro Alves  <palves@redhat.com>
6974
6975         * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6976         * linux-low.c (struct simple_pid_list): New.
6977         (stopped_pids): New a struct simple_pid_list pointer.
6978         (add_to_pid_list, pull_pid_from_list): New.
6979         (handle_extended_wait): Don't assume the first signal new children
6980         report is SIGSTOP.  Adjust call to pull_pid_from_list.
6981         (linux_wait_for_lwp): Adjust.
6982
6983 2012-03-02  Yao Qi  <yao@codesourcery.com>
6984
6985         * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6986         debug log.
6987
6988 2012-03-02  Yao Qi  <yao@codesourcery.com>
6989
6990         * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6991         `stop_pc' and `tpoint'.  Update caller.
6992
6993 2012-03-01  Maciej W. Rozycki  <macro@codesourcery.com>
6994
6995         * linux-low.h (linux_target_ops): Add regset_bitmap member.
6996         * linux-low.c (use_linux_regsets): New macro.
6997         [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6998         [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6999         (linux_register_in_regsets): New function.
7000         (usr_fetch_inferior_registers): Skip registers covered by
7001         regsets.
7002         (usr_store_inferior_registers): Likewise.
7003         (usr_fetch_inferior_registers): New macro.
7004         (usr_store_inferior_registers): Likewise.
7005         (linux_fetch_registers): Handle mixed regset/non-regset targets.
7006         (linux_store_registers): Likewise.
7007         * linux-mips-low.c (init_registers_mips_dsp_linux): New
7008         prototype.
7009         (init_registers_mips64_dsp_linux): Likewise.
7010         (init_registers_mips_linux): New macro.
7011         (init_registers_mips_dsp_linux): Likewise.
7012         (mips_dsp_num_regs): Likewise.
7013         (DSP_BASE, DSP_CONTROL): New fallback macros.
7014         (mips_base_regs): New macro.
7015         (mips_regmap): Use it.  Fix the size.
7016         (mips_dsp_regmap): New variable.
7017         (mips_dsp_regset_bitmap): Likewise.
7018         (mips_arch_setup): New function.
7019         (mips_cannot_fetch_register): Use the_low_target.regmap rather
7020         than mips_regmap.
7021         (mips_cannot_store_register): Likewise.
7022         (the_low_target): Update .arch_setup, .num_regs and .regmap
7023         initializers.  Add .regset_bitmap initializer.
7024         * linux-arm-low.c (the_low_target): Add .regset_bitmap
7025         initializer.
7026         * linux-bfin-low.c (the_low_target): Likewise.
7027         * linux-cris-low.c (the_low_target): Likewise.
7028         * linux-crisv32-low.c (the_low_target): Likewise.
7029         * linux-ia64-low.c (the_low_target): Likewise.
7030         * linux-m32r-low.c (the_low_target): Likewise.
7031         * linux-m68k-low.c (the_low_target): Likewise.
7032         * linux-ppc-low.c (the_low_target): Likewise.
7033         * linux-s390-low.c (the_low_target): Likewise.
7034         * linux-sh-low.c (the_low_target): Likewise.
7035         * linux-sparc-low.c (the_low_target): Likewise.
7036         * linux-tic6x-low.c (the_low_target): Likewise.
7037         * linux-x86-low.c (the_low_target): Likewise.
7038         * linux-xtensa-low.c (the_low_target): Likewise.
7039         * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
7040         mips64-dsp-linux.o to srv_regobj.  Add mips-dsp-linux.xml,
7041         mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
7042         srv_xmlfiles.
7043         * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
7044         (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
7045
7046 2012-02-29  Yao Qi  <yao@codesourcery.com>
7047             Pedro Alves  <palves@redhat.com>
7048
7049         * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
7050         `step_over_finished' is true.
7051
7052 2012-02-27  Pedro Alves  <palves@redhat.com>
7053
7054         * linux-low.c (pid_is_stopped): Delete, moved to common/.
7055         (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
7056
7057 2012-02-27  Pedro Alves  <palves@redhat.com>
7058
7059         PR server/9684
7060         * linux-low.c (pid_is_stopped): New.
7061         (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
7062
7063 2012-02-25  Luis Machado  <lgustavo@codesourcery.com>
7064
7065         * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
7066         of conditions.
7067
7068 2012-02-24  Maciej W. Rozycki  <macro@codesourcery.com>
7069
7070         * linux-mips-low.c (mips_regmap): Correct the index of $f9.
7071
7072 2012-02-24  Luis Machado  <lgustavo@codesourcery>
7073
7074         * server.c (handle_query): Advertise support for target-side
7075         breakpoint condition evaluation.
7076         (process_point_options): New function.
7077         (process_serial_event): When inserting a breakpoint, check for
7078         a target-side condition that should be evaluated.
7079
7080         * mem-break.c: Include regcache.h and ax.h.
7081         (point_cond_list_t): New data structure.
7082         (breakpoint) <cond_list>: New field.
7083         (find_gdb_breakpoint_at): Make non-static.
7084         (delete_gdb_breakpoint_at): Clear any target-side
7085         conditions.
7086         (clear_gdb_breakpoint_conditions): New function.
7087         (add_condition_to_breakpoint): Likewise.
7088         (add_breakpoint_condition): Likewise.
7089         (gdb_condition_true_at_breakpoint): Likewise.
7090         (gdb_breakpoint_here): Return result directly instead
7091         of going through a local variable.
7092
7093         * mem-break.h (find_gdb_breakpoint_at): New prototype.
7094         (clear_gdb_breakpoint_conditions): Likewise.
7095         (add_breakpoint_condition): Likewise.
7096         (gdb_condition_true_at_breakpoint): Likewise.
7097
7098         * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
7099         (need_step_over_p): Take target-side breakpoint condition into
7100         consideration.
7101
7102 2012-02-24  Luis Machado  <lgustavo@codesourcery>
7103
7104         * server.h: Include tracepoint.h.
7105         (agent_mem_read, agent_get_trace_state_variable_value,
7106         agent_set_trace_state_variable_value,
7107         agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
7108         get_set_tsv_func_addr): New prototypes.
7109
7110         * ax.h: New include file.
7111         * ax.c: New source file.
7112
7113         * tracepoint.c: Include ax.h.
7114         (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
7115         agent_expr, eval_result_type): Move to ax.h.
7116         (parse_agent_expr): Rename to ...
7117         (gdb_parse_agent_expr): ... this, make it non-static and move
7118         to ax.h.
7119         (unparse_agent_expr) Rename to ...
7120         (gdb_unparse_agent_expr): ... this, make it non-static and move
7121         to ax.h.
7122         (eval_agent_expr): Rename to ...
7123         (eval_tracepoint_agent_expr): ... this.
7124         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
7125         forward declarations.
7126         (add_tracepoint_action): Call gdb_parse_agent_expr (...).
7127         (agent_get_trace_state_variable_value): New function.
7128         (agent_set_trace_state_variable_value): New function.
7129         (cmd_qtdp): Call gdb_parse_agent_expr (...).
7130         (response_tracepoint): Call gdb_unparse_agent_expr (...).
7131         (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
7132         (condition_true_at_tracepoint): Likewise.
7133         (parse_agent_expr): Rename to ...
7134         (gdb_parse_agent_expr): ... this and move to ax.c.
7135         (unparse_agent_expr): Rename to ...
7136         (gdb_unparse_agent_expr): ... this and move to ax.c.
7137         (gdb_agent_op_name): Move to ax.c.
7138         (eval_agent_expr): Rename to ...
7139         (gdb_eval_agent_expr): ... this, use regcache passed as parameter
7140         and move to ax.c.
7141         (eval_tracepoint_agent_expr): New function.
7142         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
7143         non-static.
7144         (current_insn_ptr, emit_error, struct bytecode_address): Move to
7145         ax.c.
7146         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
7147         emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
7148         emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
7149         emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
7150         emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
7151         emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
7152         emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
7153         emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
7154         (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
7155         (compile_bytecodes): Remove forward declaration.
7156         (is_goto_target): Move to ax.c.
7157         (compile_bytecodes): Move to ax.c and call
7158         agent_get_trace_state_variable_value (...) and
7159         agent_set_trace_state_variable_value (...).
7160
7161         * Makefile.in: Update ax.c and IPA dependencies.
7162
7163 2012-02-24  Pedro Alves  <palves@redhat.com>
7164
7165         * tracepoint.c (cmd_bigqtbuffer): Rename as ...
7166         (cmd_bigqtbuffer_circular): ... this.  Only handle
7167         'QTBuffer:circular:'.
7168         (handle_tracepoint_general_set): Adjust.
7169
7170 2012-02-16  Yao Qi  <yao@codesourcery.com>
7171
7172         * inferiors.c: Move code to ...
7173         * dll.c: .... here.  New.
7174         * server.h: Declare clear_dlls.
7175         * Makefile.in (SFILES): Add dll.c.
7176         (OBS): Add dll.o
7177         (dll.o): New rule.
7178
7179 2012-02-11  Yao Qi  <yao@codesourcery.com>
7180
7181         * server.c: (handle_monitor_command): Add a new parameter
7182         `own_buf'.
7183         (handle_query): Update caller.
7184
7185 2012-02-09  Joel Brobecker  <brobecker@adacore.com>
7186
7187         * configure.ac: Add readlink to AC_CHECK_FUNCS list.
7188         * configure, config.in: Regenerate.
7189         * hostio.c: Provide an alternate implementation if HAVE_READLINK
7190         is not defined.
7191
7192 2012-02-02  Pedro Alves  <palves@redhat.com>
7193
7194         Try SIGKILL first, then PTRACE_KILL.
7195         * linux-low.c (linux_kill_one_lwp): New.
7196         (linux_kill_one_lwp): Rename to ...
7197         (kill_one_lwp_callback): ... this.  Use the new
7198         linux_kill_one_lwp.
7199
7200 2012-02-02  Pedro Alves  <palves@redhat.com>
7201
7202         * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
7203         inferior.
7204
7205 2012-01-27  Pedro Alves  <palves@redhat.com>
7206
7207         * linux-low.c (linux_child_pid_to_exec_file): Delete.
7208         (elf_64_file_p): Make static.
7209         (linux_pid_exe_is_elf_64_file): New.
7210         * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
7211         Delete declarations.
7212         (linux_pid_exe_is_elf_64_file): Declare.
7213         * linux-x86-low.c (x86_arch_setup): Use
7214         linux_pid_exe_is_elf_64_file.
7215
7216 2012-01-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
7217
7218         * linux-low.c (linux_wait_for_event_1): Rename to ...
7219         (linux_wait_for_event): ... here and merge it with former
7220         linux_wait_for_event - new variable wait_ptid, use it.
7221         (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
7222
7223 2012-01-23  Pedro Alves  <palves@redhat.com>
7224
7225         * server.c (main): Avoid yet another case of infinite loop while
7226         detaching/killing after a longjmp.
7227
7228 2012-01-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
7229
7230         Code cleanup.
7231         * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
7232
7233 2012-01-20  Ulrich Weigand  <ulrich.weigand@linaro.org>
7234
7235         * hostio.c (handle_readlink): New function.
7236         (handle_vFile): Call it to handle "vFile:readlink" packets.
7237
7238 2012-01-20  Pedro Alves  <palves@redhat.com>
7239             Ulrich Weigand  <ulrich.weigand@linaro.org>
7240
7241         * server.c (handle_v_requests): Only support vAttach and vRun to
7242         start multiple processes when in extended protocol mode.
7243
7244 2012-01-17  Pedro Alves  <palves@redhat.com>
7245
7246         * tracepoint.c (initialize_tracepoint): Use mmap instead of
7247         memalign plus mprotect to allocate the scratch buffer.
7248
7249 2012-01-13  Pedro Alves  <palves@redhat.com>
7250
7251         * server.c (attach_inferior): Clear `cont_thread'.
7252
7253 2012-01-13  Pedro Alves  <palves@redhat.com>
7254
7255         * server.c (main): Avoid infinite loop while detaching/killing
7256         after a longjmp.
7257
7258 2012-01-09  Doug Evans  <dje@google.com>
7259
7260         * server.c (start_inferior): Set last_ptid in --wrapper case.
7261
7262 2012-01-06  Yao Qi  <yao@codesourcery.com>
7263
7264         * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
7265         defined.
7266         [IN_PROCESS_AGENT] (debug_agent): New global variable.
7267
7268 2012-01-04  Yao Qi  <yao@codesourcery.com>
7269
7270         * tracepoint.c (cmd_qtdp): Print debug message
7271         for static tracepoint.
7272
7273 2012-01-04  Yao Qi  <yao@codesourcery.com>
7274
7275         * tracepoint.c (trace_vdebug): Differentiate debug message
7276         between gdbserver and IPA.
7277
7278 2012-01-03  Yao Qi  <yao@codesourcery.com>
7279
7280         * tracepoint.c (tracepoint_was_hit): Don't collect for
7281         static tracepoint.
7282
7283 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
7284
7285         * terminal.h: Reformat copyright header.
7286
7287 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
7288
7289         * server.c (gdbserver_version): Update copyright year.
7290         * gdbreplay.c (gdbreplay_version): Likewise.
7291
7292 2011-12-18  Jan Kratochvil  <jan.kratochvil@redhat.com>
7293
7294         * linux-low.c (linux_create_inferior): Put empty if clause for write.
7295
7296         Revert:
7297         2011-12-18  Hui Zhu  <teawater@gmail.com>
7298         * linux-low.c (linux_create_inferior): Save return value to ret.
7299
7300 2011-12-18  Hui Zhu  <teawater@gmail.com>
7301
7302         * linux-low.c (linux_create_inferior): Save return value to ret.
7303
7304 2011-12-16  Doug Evans  <dje@google.com>
7305
7306         * linux-low.c (linux_create_inferior): If stdio connection,
7307         redirect stdin from /dev/null, stdout to stderr.
7308         * remote-utils.c (remote_is_stdio): New static global.
7309         (remote_connection_is_stdio): New function.
7310         (remote_prepare): Handle stdio connection.
7311         (remote_open): Ditto.
7312         (remote_close): Don't close stdin for stdio connections.
7313         (read_prim,write_prim): New functions.  Replace all calls to
7314         read/write to these.
7315         * server.c (main): Watch for "-" argument.  Move call to
7316         remote_prepare before start_inferior.
7317         * server.h (STDIO_CONNECTION_NAME): New macro.
7318         (remote_connection_is_stdio): Declare.
7319
7320         * remote-utils.c (prepare_resume_reply): Remove extraneous \n
7321         in debugging output.
7322
7323 2011-12-15  Yao Qi  <yao@codesourcery.com>
7324
7325         * tracepoint.c: Include sys/syscall.h.
7326         (gdb_ust_thread): Remove preprocessor conditional.
7327
7328 2011-12-14  Pedro Alves  <pedro@codesourcery.com>
7329
7330         * linux-low.c (linux_detach_one_lwp): Call
7331         the_low_target.prepare_to_resume before detaching.
7332
7333 2011-12-14  Yao Qi  <yao@codesourcery.com>
7334
7335         * tracepoint.c (gdb_ust_thread): Don't ignore return value
7336         of write.
7337
7338 2011-12-14  Yao Qi  <yao@codesourcery.com>
7339
7340         * i386-low.c (i386_low_stopped_data_address): Initialize local
7341         variable `control'.
7342
7343 2011-12-13  Pedro Alves  <pedro@codesourcery.com>
7344
7345         PR remote/13492
7346
7347         * i386-low.c (i386_low_stopped_data_address): Avoid fetching
7348         DR_CONTROL unless necessary.  Extend comments.
7349         * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
7350         DR0-3 if not used.  If any watchpoint was set, clear DR_STATUS.
7351
7352 2011-12-13  Yao Qi  <yao@codesourcery.com>
7353
7354         * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
7355         macros.
7356         (upload_fast_traceframes, upload_fast_traceframes): Likewise.
7357
7358 2011-12-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
7359
7360         * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
7361         Print new debug message for such case.
7362
7363 2011-12-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
7364
7365         Fix overlapping memcpy.
7366         * mem-break.c (set_raw_breakpoint_at): New variable buf.  Use it for
7367         the read_inferior_memory transfer.
7368         (delete_fast_tracepoint_jump): New variable buf.  Use it for the
7369         write_inferior_memory transfer.
7370         (set_fast_tracepoint_jump): New variable buf.  Use it for the
7371         read_inferior_memory and write_inferior_memory transfers.
7372         (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
7373         (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
7374         Use it for the write_inferior_memory transfer.
7375         (check_mem_read, check_mem_write): New gdb_asserts for overlapping
7376         buffers.
7377
7378 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
7379
7380         * linux-low.c (fetch_register, store_register): Make code
7381         consistent, fix formatting.
7382
7383 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
7384
7385         * linux-low.c (usr_store_inferior_registers): Factor out code
7386         to handle individual registers into...
7387         (store_register): ... this new function.
7388
7389 2011-12-06  Ulrich Weigand  <uweigand@de.ibm.com>
7390
7391         * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
7392         (s390-linux32v2.o, s390-linux32v2.c): Likewise.
7393         (s390-linux64v1.o, s390-linux64v1.c): Likewise.
7394         (s390-linux64v2.o, s390-linux64v2.c): Likewise.
7395         (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
7396         (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
7397         * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
7398         (srv_xmlfiles): Add new XML files.
7399
7400         * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
7401         and <sys/uio.h>.
7402         (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
7403         (init_registers_s390_linux32v1): Add prototype.
7404         (init_registers_s390_linux32v2): Likewise.
7405         (init_registers_s390_linux64v1): Likewise.
7406         (init_registers_s390_linux64v2): Likewise.
7407         (init_registers_s390x_linux64v1): Likewise.
7408         (init_registers_s390x_linux64v2): Likewise.
7409         (s390_num_regs): Increment to 52.
7410         (s390_regmap): Add orig_r2 register.
7411         (s390_num_regs_3264): Increment to 68.
7412         (s390_regmap_3264): Add orig_r2 register.
7413         (s390_collect_ptrace_register): Handle orig_r2 register.
7414         (s390_supply_ptrace_register): Likewise.
7415         (s390_fill_last_break): New function.
7416         (s390_store_last_break): Likewise.
7417         (s390_fill_system_call): New function.
7418         (s390_store_system_call): Likewise.
7419         (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
7420         register sets.
7421         (s390_check_regset): New function.
7422         (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
7423         NT_S390_SYSTEM_CALL regsets and use appropriate description.
7424         Update target_regsets for available register sets.
7425
7426 2011-12-02  Paul Pluzhnikov  <ppluzhnikov@google.com>
7427             Jan Kratochvil  <jan.kratochvil@redhat.com>
7428
7429         * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
7430         (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
7431         New.
7432         (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
7433         * linux-low.h (struct process_info_private): New member r_debug.
7434         * server.c (handle_qxfer_libraries): Call
7435         the_target->qxfer_libraries_svr4.
7436         (handle_qxfer_libraries_svr4): New function.
7437         (qxfer_packets): New entry "libraries-svr4".
7438         (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
7439         * target.h (struct target_ops): New member qxfer_libraries_svr4.
7440         * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
7441         PACKET_qXfer_libraries_svr4.
7442
7443 2011-11-30  Ulrich Weigand  <uweigand@de.ibm.com>
7444
7445         * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
7446         PSW address/mask between 8-byte and 16-byte formats.
7447         (s390_supply_ptrace_register): Likewise.
7448         (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
7449         basic addressing mode bit.
7450
7451 2011-11-24  Stan Shebs  <stan@codesourcery.com>
7452
7453         * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
7454
7455 2011-11-17  Stan Shebs  <stan@codesourcery.com>
7456
7457         * tracepoint.c (struct tracepoint): New field traceframe_usage.
7458         (tracing_start_time): New global.
7459         (tracing_stop_time): New global.
7460         (tracing_user_name): New global.
7461         (tracing_notes): New global.
7462         (tracing_stop_note): New global.
7463         (cmd_qtstart): Set traceframe_usage, start_time.
7464         (stop_tracing): Set stop_time.
7465         (cmd_qtstatus): Report additional status.
7466         (cmd_qtp): New function.
7467         (handle_tracepoint_query): Call it.
7468         (cmd_qtnotes): New function.
7469         (handle_tracepoint_general_set): Call it.
7470         (get_timestamp): Rename from tsv_get_timestamp.
7471
7472 2011-11-14  Stan Shebs  <stan@codesourcery.com>
7473             Kwok Cheung Yeung  <kcy@codesourcery.com>
7474
7475         * linux-x86-low.c (small_jump_insn): New.
7476         (i386_install_fast_tracepoint_jump_pad): Add arguments for
7477         trampoline and error message, build a trampoline and issue a small
7478         jump instruction to it.
7479         (x86_install_fast_tracepoint_jump_pad): Add arguments for
7480         trampoline and error message.
7481         (x86_get_min_fast_tracepoint_insn_len): New.
7482         (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
7483         * linux-low.h (struct linux_target_ops): Add arguments to
7484         install_fast_tracepoint_jump_pad operation, add new operation.
7485         * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
7486         arguments.
7487         (linux_get_min_fast_tracepoint_insn_len): New function.
7488         (linux_target_op): Add new operation.
7489         * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
7490         (gdb_trampoline_buffer_end): Ditto.
7491         (gdb_trampoline_buffer_error): Ditto.
7492         (struct ipa_sym_addresses): Add fields for new IPA variables.
7493         (symbol_list): Add entries for new IPA variables.
7494         (struct tracepoint): Add fields to hold the address range of the
7495         trampoline used by the tracepoint.
7496         (trampoline_buffer_head): New static variable.
7497         (trampoline_buffer_tail): Ditto.
7498         (claim_trampoline_space): New function.
7499         (have_fast_tracepoint_trampoline_buffer): New function.
7500         (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
7501         structure.
7502         (install_fast_tracepoint): Ditto, also add error buffer argument.
7503         (cmd_qtminftpilen): New function.
7504         (handle_tracepoint_query): Add response to qTMinFTPILen packet.
7505         (fast_tracepoint_from_trampoline_address): New function.
7506         (fast_tracepoint_collecting): Handle trampoline as part of jump
7507         pad space.
7508         (set_trampoline_buffer_space): New function.
7509         (initialize_tracepoint): Initialize new IPA variables.
7510         * target.h (struct target_ops): Add arguments to
7511         install_fast_tracepoint_jump_pad operation, add new
7512         get_min_fast_tracepoint_insn_len operation.
7513         (target_get_min_fast_tracepoint_insn_len): New.
7514         (install_fast_tracepoint_jump_pad): Add arguments.
7515         * server.h (IPA_BUFSIZ): Define.
7516         * linux-i386-ipa.c: Include extra header files.
7517         (initialize_fast_tracepoint_trampoline_buffer): New function.
7518         (initialize_low_tracepoint): Call it.
7519         * server.h (set_trampoline_buffer_space): Declare.
7520         (claim_trampoline_space): Ditto.
7521         (have_fast_tracepoint_trampoline_buffer): Ditto.
7522
7523 2011-11-14  Yao Qi  <yao@codesourcery.com>
7524
7525         * server.c (handle_query): Handle InstallInTrace for qSupported.
7526         * tracepoint.c (add_tracepoint): Sort list.
7527         (install_tracepoint, download_tracepoint): New.
7528         (cmd_qtdp): Call them to install and download tracepoints.
7529         (sort_tracepoints): Removed.
7530         (cmd_qtstart): Update.
7531
7532 2011-11-14  Yao Qi  <yao@codesourcery.com>
7533
7534         * mem-break.c (inc_ref_fast_tracepoint_jump): New.
7535         * mem-break.h: Declare.
7536         * tracepoint.c (cmd_qtstart): Move some code to ...
7537         (clone_fast_tracepoint, install_fast_tracepoint): ... here.
7538         New.
7539         (download_tracepoints): Move some code to ...
7540         (download_tracepoint_1): ... here.  New.
7541
7542 2011-11-08  Yao Qi  <yao@codesourcery.com>
7543
7544         * remote-utils.c (relocate_instruction): A comment fix.
7545
7546 2011-11-07  Joel Brobecker  <brobecker@adacore.com>
7547
7548         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
7549         (i386_dr_low_get_control, i386_dr_low_get_status): Use
7550         dr_status_mirror and dr_control_mirror from debug_reg_state.
7551         (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
7552         (i386_initial_stuff): Remove use of deleted globals.
7553         (i386_get_thread_context, i386_set_thread_context,
7554         i386_thread_added): Use dr_status_mirror and dr_control_mirror
7555         from debug_reg_state.
7556
7557 2011-11-05  Yao Qi  <yao@codesourcery.com>
7558
7559         * tracepoint.c (gdb_collect): Loop over tracepoints of same
7560         address as TPOINT's.
7561
7562 2011-11-02  Stan Shebs  <stan@codesourcery.com>
7563
7564         * tracepoint.c (agent_mem_read_string): New function.
7565         (eval_agent_expr): Call it for tracenz.
7566         * server.c (handle_query): Report support for tracenz.
7567
7568 2011-11-02  Yao Qi  <yao@codesourcery.com>
7569
7570         * tracepoint.c (cmd_qtstart): Remove unused local variables.
7571
7572 2011-11-02  Yao Qi  <yao@codesourcery.com>
7573
7574         * target.h: Fix a typo in comment.
7575
7576 2011-10-31  Pedro Alves  <pedro@codesourcery.com>
7577
7578         * mem-break.c (check_mem_write): Add `myaddr' parameter.  Don't
7579         clobber the breakpoints' shadows with fast tracepoint jumps.
7580         * mem-break.h (check_mem_write): Add `myaddr' parameter.
7581         * target.c (write_inferior_memory): Also pass MYADDR down to
7582         check_mem_write.
7583
7584 2011-10-07  Ulrich Weigand  <ulrich.weigand@linaro.org>
7585
7586         * configure.ac: Check support for personality routine.
7587         * configure: Regenerate.
7588         * config.in: Likewise.
7589         * linux-low.c: Include <sys/personality.h>.
7590         Define ADDR_NO_RANDOMIZE if necessary.
7591         (linux_create_inferior): Disable address space randomization when
7592         forking inferior, if requested.
7593         (linux_supports_disable_randomization): New function.
7594         (linux_target_ops): Install it.
7595         * server.h (disable_randomization): Declare.
7596         * server.c (disable_randomization): New global variable.
7597         (handle_general_set): Handle QDisableRandomization.
7598         (handle_query): Likewise for qSupported.
7599         (main): Support --disable-randomization and --no-disable-randomization
7600         command line arguments.
7601         * target.h (struct target_ops): Add supports_disable_randomization.
7602         (target_supports_disable_randomization): New macro.
7603
7604 2011-09-29  Mike Frysinger  <vapier@gentoo.org>
7605
7606         * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
7607         ifdef check.
7608         [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
7609         [!PT_GETDSBT] (target_loadmap): New definition.
7610         (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
7611         (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
7612         LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
7613         and PT_GETDSBT to LINUX_LOADMAP.
7614         [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
7615         (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
7616
7617 2011-09-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
7618
7619         * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
7620         (arm_linux_hwbp_cap): New static variable.
7621         (arm_linux_get_hwbp_cap): Replace by ...
7622         (arm_linux_init_hwbp_cap): ... this new function.
7623         (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
7624         (arm_linux_get_hw_watchpoint_count): Likewise.
7625         (arm_linux_get_hw_watchpoint_max_length): Likewise.
7626         (arm_arch_setup): Call arm_linux_init_hwbp_cap.
7627         (arm_prepare_to_resume): Use perror_with_name instead of error.
7628
7629 2011-09-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
7630
7631         * linux-arm-low.c: Include <signal.h>.
7632         (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
7633         (struct arm_linux_hwbp_cap): New data type.
7634         (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
7635         (struct arm_linux_hw_breakpoint): New data type.
7636         (MAX_BPTS, MAX_WPTS): Define.
7637         (struct arch_process_info, struct arch_lwp_info): New data types.
7638         (arm_linux_get_hwbp_cap): New function.
7639         (arm_linux_get_hw_breakpoint_count): Likewise.
7640         (arm_linux_get_hw_watchpoint_count): Likewise.
7641         (arm_linux_get_hw_watchpoint_max_length): Likewise.
7642         (arm_hwbp_control_initialize): Likewise.
7643         (arm_hwbp_control_is_enabled): Likewise.
7644         (arm_hwbp_control_is_initialized): Likewise.
7645         (arm_hwbp_control_disable): Likewise.
7646         (arm_linux_hw_breakpoint_equal): Likewise.
7647         (arm_linux_hw_point_initialize): Likewise.
7648         (struct update_registers_data): New data structure.
7649         (update_registers_callback: New function.
7650         (arm_insert_point): Likewise.
7651         (arm_remove_point): Likewise.
7652         (arm_stopped_by_watchpoint): Likewise.
7653         (arm_stopped_data_address): Likewise.
7654         (arm_new_process): Likewise.
7655         (arm_new_thread): Likewise.
7656         (arm_prepare_to_resume): Likewise.
7657         (the_low_target): Register arm_insert_point, arm_remove_point,
7658         arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
7659         arm_new_thread, and arm_prepare_to_resume.
7660
7661 2011-09-15  Stan Shebs  <stan@codesourcery.com>
7662
7663         * server.h (struct emit_ops): Add compare-goto fields.
7664         * tracepoint.c (gdb_agent_op_sizes): New table.
7665         (emit_eq_goto): New function.
7666         (emit_ne_goto): New function.
7667         (emit_lt_goto): New function.
7668         (emit_le_goto): New function.
7669         (emit_gt_goto): New function.
7670         (emit_ge_goto): New function.
7671         (is_goto_target): New function.
7672         (compile_bytecodes): Recognize special cases of compare-goto
7673         combinations and call specialized emitters for them.
7674         * linux-x86-low.c (amd64_emit_eq_goto): New function.
7675         (amd64_emit_ne_goto): New function.
7676         (amd64_emit_lt_goto): New function.
7677         (amd64_emit_le_goto): New function.
7678         (amd64_emit_gt_goto): New function.
7679         (amd64_emit_ge_goto): New function.
7680         (amd64_emit_ops): Add the new functions.
7681         (i386_emit_eq_goto): New function.
7682         (i386_emit_ne_goto): New function.
7683         (i386_emit_lt_goto): New function.
7684         (i386_emit_le_goto): New function.
7685         (i386_emit_gt_goto): New function.
7686         (i386_emit_ge_goto): New function.
7687         (i386_emit_ops): Add the new functions.
7688
7689 2011-09-08  Stan Shebs  <stan@codesourcery.com>
7690
7691         * linux-x86-low.c (i386_emit_prologue): Save %ebx.
7692         (i386_emit_epilogue): Restore %ebx.
7693
7694 2011-08-31  Jie Zhang  <jzhang918@gmail.com>
7695
7696         * server.c (step_thread): Remove definition.
7697         (process_serial_event): Don't handle Hs.
7698         * server.h (step_thread): Remove declaration.
7699         * target.c (set_desired_inferior): Remove use of step_thread.
7700
7701 2011-08-24  Luis Machado  <lgustavo@codesourcery.com>
7702
7703         * linux-low.c: Include linux-procfs.h.
7704         (linux_attach_lwp_1): Update comments.
7705         (linux_attach): Scan for existing threads when attaching to a
7706         process that is the tgid.
7707         * Makefile.in: Update dependencies.
7708
7709 2011-08-24  Luis Machado  <lgustavo@codesourcery.com>
7710
7711         * configure.srv: Add linux-procfs.o dependencies.
7712
7713 2011-08-14  Yao Qi  <yao@codesourcery.com>
7714
7715         * target.h (struct target_ops): Fix indent.
7716         * win32-low.c (win32_target_ops): Fix comment.
7717
7718 2011-08-14  Andrew Jenner  <andrew@codesourcery.com>
7719             Yao Qi  <yao@codesourcery.com>
7720
7721         * Makefile.in (clean): Remove tic6x-*.c files.
7722         (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
7723         (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
7724         (tic6x-c64xp-linux.c): Likewise.
7725         * configure.srv: Add support for tic6x-*-uclinux.
7726         * linux-tic6x-low.c: New.
7727         * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
7728
7729 2011-08-14  Andrew Stubbs <ams@codesourcery.com>
7730             Yao Qi  <yao@codesourcery.com>
7731
7732         * target.h (struct target_ops): Add read_loadmap.
7733         * linux-low.c (struct target_loadseg): New type.
7734         (struct target_loadmap): New type.
7735         (linux_read_loadmap): New function.
7736         (linux_target_ops): Add linux_read_loadmap.
7737         * server.c (handle_query): Support qXfer:fdpic:read packet.
7738         * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
7739         to NULL.
7740
7741 2011-08-05  Eli Zaretskii  <eliz@gnu.org>
7742
7743         * win32-low.c: Include <stdint.h>.
7744
7745 2011-07-22  Pedro Alves  <pedro@codesourcery.com>
7746
7747         * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
7748         to the inferior here.
7749         (i386_remove_aligned_watchpoint): Ditto.
7750         (i386_handle_nonaligned_watchpoint): Return immediate on fail to
7751         fit part of the watchpoint in the debug registers.
7752         (i386_update_inferior_debug_regs): New.
7753         (i386_low_insert_watchpoint): Work on a local mirror of the debug
7754         registers, and only update the inferior on success.
7755         (i386_low_remove_watchpoint): Ditto.
7756
7757 2011-07-22  Kwok Cheung Yeung  <kcy@codesourcery.com>
7758
7759         * linux-low.c (compare_ints, unique, list_threads, show_process,
7760         linux_core_of_thread): Delete.
7761         (linux_target_ops): Change linux_core_of_thread to
7762         linux_common_core_of_thread.
7763         (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
7764         * utils.c (malloc_failure): Change type of argument.
7765         (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
7766         * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
7767         common/linux-osdata.c, common/ptid.c and common/buffer.c.
7768         (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
7769         (IPA_OBJS): Add common-utils-ipa.o.
7770         (ptid_h, linux_osdata_h): New macros.
7771         (server_h): Add common/common-utils.h, common/xml-utils.h,
7772         common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
7773         common/ptid.h.
7774         (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
7775         ptid.o, buffer.o): New rules.
7776         (linux-low.o): Add common/linux-osdata.h as a dependency.
7777         * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
7778         * configure.ac: Add AC_HEADER_DIRENT check.
7779         * config.in: Regenerate.
7780         * configure: Regenerate.
7781         * remote-utils.c (xml_escape_text): Delete.
7782         (buffer_grow, buffer_free, buffer_init, buffer_finish,
7783         buffer_xml_printf): Move to common/buffer.c.
7784         * server.c (main): Remove call to initialize_inferiors.
7785         * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
7786         ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
7787         ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
7788         internal_error, gdb_assert, gdb_assert_fail): Delete.
7789         (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
7790         buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
7791         common/buffer.h.
7792         * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
7793         ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
7794         initialize_inferiors): Delete.
7795
7796 2011-07-20  Pedro Alves  <pedro@codesourcery.com>
7797
7798         * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
7799         symbol error.
7800
7801 2011-05-31  Pedro Alves  <pedro@codesourcery.com>
7802
7803         * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
7804         assertion.
7805         * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
7806
7807 2011-05-26  Yao Qi  <yao@codesourcery.com>
7808
7809         * Makefile.in (thread-db.o): Track dependence to
7810         common/gdb_thread_db.h.
7811         * thread-db.c: include gdb_thread_db.h from right place.
7812
7813 2011-05-16  Adrian Cornish  <gnu@bluedreamer.com>
7814
7815         * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
7816         __FILE__ and __LINE__ to internal_error.
7817
7818 2011-05-13  Doug Evans  <dje@google.com>
7819
7820         * thread-db.c (try_thread_db_load_from_sdir): New function.
7821         (try_thread_db_load_from_dir): New function.
7822         (thread_db_load_search): Handle $sdir, ignore $pdir.
7823         Remove trying of system directories if search of
7824         libthread-db-search-path fails, that is now done via $sdir.
7825
7826 2011-05-12  Kwok Cheung Yeung  <kcy@codesourcery.com>
7827
7828         * server.c (handle_query): Add EnableDisableTracepoints to the list
7829         of supported features.
7830         * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
7831         tracepoints.
7832         (cmd_qtenable_disable): New.
7833         (cmd_qtstart): Install tracepoints even if disabled.
7834         (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
7835         receiving a QTEnable or QTDisable packet.
7836         (gdb_collect): Skip data collection if fast tracepoint is disabled.
7837         (ust_marker_to_static_tracepoint): Do not ignore disabled static
7838         tracepoints.
7839         (gdb_probe): Skip data collection if static tracepoint is disabled.
7840
7841 2011-05-10  Doug Evans  <dje@google.com>
7842
7843         * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
7844
7845 2011-05-04  Doug Evans  <dje@google.com>
7846
7847         * linux-low.c (linux_join): Skip process lookup.
7848         * spu-low.c (spu_join): Ditto.
7849         * server.c (join_inferiors_callback): Delete.
7850         (process_serial_event): For 'D' packet (detach) call join_inferior
7851         directly.
7852
7853 2011-05-04  Joseph Myers  <joseph@codesourcery.com>
7854
7855         * README: Don't mention xscale*-*-linux*.
7856         * configure.srv (xscale*-*-linux*): Don't handle target.
7857
7858 2011-04-27  Nathan Froyd  <froydnj@codesourcery.com>
7859
7860         * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
7861         casting pointers.
7862         (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
7863         (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
7864         (i386_emit_void_call_2): Likewise.
7865
7866 2011-04-26  Yao Qi  <yao@codesourcery.com>
7867
7868         * linux-low.c: Move common macros to linux-ptrace.h.
7869         Include linux-ptrace.h.
7870         * Makefile.in (linux_ptrace_h): New.
7871         (linux-low.o): Depends on linux-ptrace.h.
7872
7873 2011-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
7874
7875         * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
7876         RUN_ONCE.  Comment for the LISTEN_DESC delete_file_handler call.
7877         (remote_prepare): New function with most of the TCP code from ...
7878         (remote_open): ... here.  Detect PORT here unconditionally.  Move also
7879         setting transport_is_reliable.
7880         * server.c (run_once): New variable.
7881         (gdbserver_usage): Document it.
7882         (main): Set run_once for `--once'.  Call remote_prepare.  Exit after
7883         the first run if RUN_ONCE.
7884         * server.h (run_once, remote_prepare): New declarations.
7885
7886 2011-04-19  Tom Tromey  <tromey@redhat.com>
7887
7888         * win32-low.c (handle_load_dll): Remove duplicate "the".
7889
7890 2011-04-07  Pierre Muller  <muller@ics.u-strasbg.fr>
7891
7892         Remove support for old Cygwin 1.5 versions.
7893         * win32-low.c (win32_create_inferior): Use new cygwin_path_list
7894         function to avoid warning.
7895         (win32_add_one_solib): Use cygwin_conv_path function to avoid
7896         warning.
7897
7898 2011-03-18  Pierre Muller  <muller@ics.u-strasbg.fr>
7899
7900         * gdbserver/server.h (Macro _): Define it if not available.
7901
7902 2011-03-14  Michael Snyder  <msnyder@vmware.com>
7903
7904         * hostio.c (handle_close): Remove unnecessary null test.
7905
7906 2011-03-10  Joel Brobecker  <brobecker@adacore.com>
7907
7908         * Makefile.in (maintainer-clean realclean distclean): Remove
7909         "make ...  subdir_do" command.
7910
7911 2011-03-10  Michael Snyder  <msnyder@vmware.com>
7912
7913         * tracepoint.c (tracepoint_finish_step): Fix loop variable.
7914
7915         * server.c (handle_v_run): Free alloced buffer on early return.
7916
7917 2011-03-09  Yao Qi  <yao@codesourcery.com>
7918
7919         Revert:
7920         2011-03-04  Yao Qi  <yao@codesourcery.com>
7921
7922         * Makefile.in: Remove GNU make feature --directory.
7923
7924         2011-03-05  Yao Qi  <yao@codesourcery.com>
7925
7926         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7927         (subdir_do): New make target.  Copied from gdb/Makefile.
7928         (maintainer-clean, realclean, distclean, clean): Call corresponding
7929         make targets in common/Makefile.
7930
7931         2011-02-11  Yao Qi  <yao@codesourcery.com>
7932
7933         * configure.ac: Call AC_PROG_RANLIB.
7934         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
7935         * configure: Regenerate.
7936
7937 2011-03-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
7938
7939         * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
7940
7941 2011-03-06  Yao Qi  <yao@codesourcery.com>
7942
7943         * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
7944
7945 2011-03-05  Yao Qi  <yao@codesourcery.com>
7946
7947         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7948         (subdir_do): New make target.  Copied from gdb/Makefile.
7949         (maintainer-clean, realclean, distclean, clean): Call corresponding
7950         make targets in common/Makefile.
7951
7952 2011-03-04  Yao Qi  <yao@codesourcery.com>
7953
7954         * Makefile.in: Remove GNU make feature --directory.
7955
7956 2011-03-04  Michael Snyder  <msnyder@vmware.com>
7957
7958         * server.c (queue_stop_reply): Call xmalloc not malloc.
7959
7960 2011-03-02  Michael Snyder  <msnyder@vmware.com>
7961
7962         * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7963
7964 2011-02-28  Michael Snyder  <msnyder@vmware.com>
7965
7966         * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7967         (cmd_qtframe): Ditto.
7968         (cmd_qtbuffer): Ditto.
7969         (cmd_bigqtbuffer): Ditto.
7970
7971         * utils.c (decimal2str): Initialize 'width' to nine, then
7972         don't mess with it.
7973
7974 2011-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
7975
7976         * hostio.c (require_data): Free *data, not data.
7977
7978 2011-02-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
7979
7980         * hostio.c (require_data): Use free, not xfree.
7981
7982 2011-02-27  Michael Snyder  <msnyder@vmware.com>
7983
7984         * server.c (handle_query): Discard unused value.
7985
7986         * hostio.c (require_data): Free malloc memory before returning
7987         error.
7988
7989 2011-02-26  Michael Snyder  <msnyder@vmware.com>
7990
7991         * linux-low.c (list_threads): Call closedir for dirent.
7992
7993 2011-02-27  Michael Snyder  <msnyder@vmware.com>
7994
7995         * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7996         a case statement falls through.
7997
7998         * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7999
8000         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
8001         in comparison.
8002
8003 2011-02-26  Michael Snyder  <msnyder@vmware.com>
8004
8005         * utils.c (decimal2str): Eliminate dead code and dead param.
8006         (pulongest): Drop dead param from call to decimal2str.
8007         (plongest): Ditto.
8008
8009 2011-02-24  Joel Brobecker  <brobecker@adacore.com>
8010
8011         Revert the following patch (not approved yet):
8012         2011-02-21  Hui Zhu  <teawater@gmail.com>
8013         * tracepoint.c (tp_printf): New function.
8014         (eval_agent_expr): Handle gdb_agent_op_printf.
8015
8016 2011-02-21  Hui Zhu  <teawater@gmail.com>
8017
8018         * tracepoint.c (tp_printf): New function.
8019         (eval_agent_expr): Handle gdb_agent_op_printf.
8020
8021 2011-02-18  Tom Tromey  <tromey@redhat.com>
8022
8023         * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
8024         (tracepoint.o): Likewise.
8025         * tracepoint.c (enum gdb_agent_op): Use ax.def.
8026         (gdb_agent_op_names): Likewise.
8027
8028 2011-02-18  Tom Tromey  <tromey@redhat.com>
8029
8030         * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
8031         gdb_agent_op_rot>: New constants.
8032         (gdb_agent_op_names): Add pick and roll.
8033         (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
8034         cases.
8035
8036 2011-02-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
8037
8038         * aclocal.m4: Regenerated with aclocal-1.11.1.
8039
8040 2011-02-14  Pedro Alves  <pedro@codesourcery.com>
8041
8042         * server.c (handle_qxfer_traceframe_info): New.
8043         (qxfer_packets): Register "traceframe-info".
8044         (handle_query): Report support for qXfer:traceframe-info:read+.
8045         * tracepoint.c (match_blocktype): New.
8046         (traceframe_find_block_type): Rename to ...
8047         (traceframe_walk_blocks): ... this.  Add callback filter argument,
8048         and use it.
8049         (traceframe_find_block_type): New, reimplemented on top of
8050         traceframe_walk_blocks.
8051         (build_traceframe_info_xml): New.
8052         (traceframe_read_info): New.
8053         * server.h (traceframe_read_info): Declare.
8054
8055 2011-02-11  Yao Qi  <yao@codesourcery.com>
8056
8057         * configure.ac: Call AC_PROG_RANLIB.
8058         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
8059         * configure: Regenerate.
8060
8061 2011-02-07  Pedro Alves  <pedro@codesourcery.com>
8062
8063         * server.c (gdb_read_memory): Change return semantics to allow
8064         partial transfers.
8065         (handle_search_memory_1): Adjust.
8066         (process_serial_event) <'m' packet>: Handle partial transfers.
8067         * tracepoint.c (traceframe_read_mem): Handle partial transfers.
8068
8069 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
8070
8071         * regcache.c (init_register_cache): Initialize
8072         regcache->register_status.
8073         (free_register_cache): Release regcache->register_status.
8074         (regcache_cpy): Copy register_status.
8075         (registers_to_string): Print 'x's for unavailable registers.
8076         (supply_register): Mark the register's status valid or
8077         unavailable, depending on whether a buffer was passed in or not.
8078         (supply_register_zeroed): New.
8079         (supply_regblock): Mark the registers' status valid or
8080         unavailable, depending on whether a buffer was passed in or not.
8081         * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
8082         (struct regcache): New `register_status' field.
8083         (supply_register_zeroed): Declare.
8084         * i387-fp.c (i387_xsave_to_cache): Zero out registers using
8085         supply_register_zeroed, rather than passing a NULL buffer to
8086         supply_register.
8087         * tracepoint.c (fetch_traceframe_registers): Update comment.
8088
8089 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
8090
8091         * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
8092         buffer explicit.
8093
8094 2011-01-25  Pedro Alves  <pedro@codesourcery.com>
8095
8096         * server.h (decode_xfer_write): Change prototype.
8097         * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
8098         and don't extract the annex here.
8099         * server.c (decode_xfer_read): Remove `annex' parameter,
8100         and don't extract the annex here.
8101         (decode_xfer): New.
8102         (struct qxfer): New.
8103         (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
8104         (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
8105         (handle_qxfer_statictrace): New functions, abstracted out from
8106         handle_query, and made to use the struct qxfer interface.
8107         (handle_threads_qxfer_proper): Rename to ...
8108         (handle_qxfer_threads_proper): ... this.
8109         (handle_threads_qxfer): Rename to ...
8110         (handle_qxfer_threads): ... this.  Adjust.
8111         (qxfer_packets): New array.
8112         (handle_qxfer): New function.
8113         (handle_query): Use handle_qxfer.
8114
8115 2011-01-05  Michael Snyder  <msnyder@msnyder-server.eng.vmware.com>
8116
8117         * gdbreplay.c: Shorten lines of >= 80 columns.
8118         * linux-low.c: Ditto.
8119         * linux-ppc-low.c: Ditto.
8120         * linux-s390-low.c: Ditto.
8121         * linux-sparc-low.c: Ditto.
8122         * linux-x86-low.c: Ditto.
8123         * linux-xtensa-low.c: Ditto.
8124         * mem-break.c: Ditto.
8125         * nto-low.c: Ditto.
8126         * regcache.h: Ditto.
8127         * remote-utils.c: Ditto.
8128         * server.c: Ditto.
8129         * server.h: Ditto.
8130         * thread-db.c: Ditto.
8131         * tracepoint.c: Ditto.
8132         * utils.c: Ditto.
8133         * win32-low.h: Ditto.
8134
8135 2011-01-05  Joel Brobecker  <brobecker@adacore.com>
8136
8137         * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
8138         update.
8139
8140 2011-01-01  Joel Brobecker  <brobecker@adacore.com>
8141
8142         * server.c (gdbserver_version): Update copyright year in version
8143         output.
8144         * gdbreplay.c (gdbreplay_version): Ditto.
8145
8146 2010-12-29  Jie Zhang  <jie.zhang@analog.com>
8147
8148         * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
8149         * linux-bfin-low.c: New file.
8150         * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
8151         PT_DATA_ADDR for BFIN targets.
8152         * Makefile.in (SFILES): Add linux-bfin-low.c.
8153         (clean): Remove reg-bfin.c.
8154         (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
8155         * README: Mention supported Blackfin targets.
8156
8157 2010-12-23  Mike Frysinger  <vapier@gentoo.org>
8158
8159         * .gitignore: New file.
8160
8161 2010-11-16  Mike Frysinger  <vapier@gentoo.org>
8162
8163         * linux-low.c (linux_tracefork_child): Add char* cast to arg.
8164
8165 2010-10-22  Jie Zhang  <jie@codesourcery.com>
8166
8167         * Makefile.in: Add FLAGS_TO_PASS variable.
8168         (install): Remove dependency of install-only and recursively
8169         invoke make for install-only.
8170
8171 2010-10-04  Doug Evans  <dje@google.com>
8172
8173         * Makefile.in (uninstall): Use $(DESTDIR).
8174
8175 2010-09-24  Pedro Alves  <pedro@codesourcery.com>
8176
8177         PR gdb/11842
8178
8179         * linux-x86-low.c (compat_siginfo_from_siginfo)
8180         (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
8181         si_code is < 0.  Check for si_code == SI_TIMER before checking for
8182         si_code < 0.
8183
8184 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
8185
8186         * lynx-i386-low.c: New file.
8187         * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
8188
8189 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
8190
8191         * lynx-low.c (ptrace_request_to_str): Remove handling for
8192         request values that have been removed in LynxOS 5.x.
8193
8194 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
8195
8196         * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
8197         <ptrace.h>
8198
8199 2010-09-09  Nathan Sidwell  <nathan@codesourcery.com>
8200
8201         * configure.ac: Add --enable-inprocess-agent option.
8202         * configure: Rebuilt.
8203
8204 2010-09-06  Yao Qi  <yao@codesourcery.com>
8205
8206         * linux-low.c (linux_kill): Remove unused variable.
8207         (linux_stabilize_threads): Likewise.
8208         * server.c (start_inferior): Likewise.
8209         (queue_stop_reply_callback): Likewise.
8210         * tracepoint.c (do_action_at_tracepoint): Likewise.
8211
8212 2010-09-06  Yao Qi  <yao@codesourcery.com>
8213
8214         * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
8215         on return.
8216
8217 2010-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
8218
8219         * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
8220
8221 2010-09-06  Pedro Alves  <pedro@codesourcery.com>
8222
8223         * Makefile.in (install-only): Replace $IPA_DEPFILES with
8224         "$(IPA_DEPFILES)".
8225
8226 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
8227
8228         * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
8229         gdbserver/lynx-ppc-low.c: New files.
8230         * Makefile.in (lynx_low_h): New variable.
8231         (lynx-low.o, lynx-ppc-low.o): New rules.
8232         * configure.ac: On LynxOS, link with -lnetinet.
8233         * configure.srv: Add handling of powerpc-*-lynxos* targets.
8234         * configure: regenerate.
8235
8236 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
8237
8238         * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
8239         * configure.ac: Add check for vasprintf and vsnprintf.
8240         * configure, config.in: Regenerate.
8241         * server.h (vasprintf, vsnprintf): Add conditional declarations.
8242
8243 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
8244
8245         * gdbreplay.c: Move include of alloca.h up, next to include of
8246         malloc.h.
8247         * server.h: Add include of malloc.h.
8248         * mem-break.c: Remove include of malloc.h.
8249         * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
8250
8251 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
8252
8253         * Makefile.in (memmem.o): Build with -Wno-error.
8254
8255 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
8256
8257         * utils.c (xsnprintf): Make non-static.
8258         * server.h: Add xsnprintf declaration.
8259         * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
8260         replace calls to snprintf by calls to xsnprintf throughout.
8261
8262 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
8263
8264         * configure.ac: Add configure check for alloca.
8265         * configure, config.in: Regenerate.
8266         * server.h: Include alloca.h if it exists.
8267         * gdbreplay.c: Include alloca.h if it exists.
8268
8269 2010-08-28  Pedro Alves  <pedro@codesourcery.com>
8270
8271         * linux-low.c (__SIGRTMIN): Define if not already defined.
8272         (linux_create_inferior): Check for __ANDROID__ rather than
8273         __SIGRTMIN.
8274         (enqueue_one_deferred_signal): Don't requeue non-RT signals that
8275         are already deferred.
8276         (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
8277         (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
8278         stopped and already has a pending signal to report.
8279         (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
8280         a pending signal to report or is moving out of a jump pad.
8281         (linux_init_signals): Check for __ANDROID__ rather than
8282         __SIGRTMIN.
8283
8284 2010-08-28  Pedro Alves  <pedro@codesourcery.com>
8285
8286         * linux-low.c (linux_stabilize_threads): Wrap debug output in a
8287         debug_threads check.  Avoid a linear search when not doing debug
8288         output.
8289
8290 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
8291
8292         * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
8293         (struct gdb_event) <fd>: Change type to gdb_fildes_t.
8294         (struct file_handler) <fd>: Change type to gdb_fildes_t.
8295         (process_event): Change local fd's type to gdb_fildes_t.
8296         (create_file_handler): Adjust prototype.
8297         (delete_file_handler): Adjust prototype.
8298         (handle_file_event): Adjust prototype.  Use pfildes.
8299         (create_file_event): Adjsut prototype.
8300         * remote-utils.c (remote_desc, listen_desc): Change type to
8301         gdb_fildes_t.
8302         * server.h: New gdb_fildes_t typedef.
8303         [USE_WIN32API]: Include winsock2.h.
8304         (delete_file_handler, add_file_handler): Adjust prototypes.
8305         (pfildes): Declare.
8306         * utils.c (pfildes): New.
8307
8308 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
8309
8310         * configure.ac (build_warnings): Add -Wno-char-subscripts.
8311         * configure: Regenerate.
8312
8313 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
8314
8315         * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
8316         (linux_done_accessing_memory): ... this.
8317         (linux_target_ops): Adjust.
8318         * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
8319         * nto-low.c (nto_target_ops): Adjust comment.
8320         * server.c (gdb_read_memory, gdb_write_memory): Adjust.
8321         * spu-low.c (spu_target_ops): Adjust comment.
8322         * target.h (target_ops): Rename unprepare_to_access_memory field
8323         to done_accessing_memory.
8324         (unprepare_to_access_memory): Rename to ...
8325         (done_accessing_memory): ... this.
8326
8327 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
8328
8329         * linux-low.c (linux_prepare_to_access_memory): New.
8330         (linux_unprepare_to_access_memory): New.
8331         (linux_target_ops): Install them.
8332         * server.c (read_memory): Rename to ...
8333         (gdb_read_memory): ... this.  Use
8334         prepare_to_access_memory/prepare_to_access_memory.
8335         (write_memory): Rename to ...
8336         (gdb_write_memory): ... this.  Use
8337         prepare_to_access_memory/prepare_to_access_memory.
8338         (handle_search_memory_1): Adjust.
8339         (process_serial_event): Adjust.
8340         * target.h (struct target_ops): New fields
8341         prepare_to_access_memory and unprepare_to_access_memory.
8342         (prepare_to_access_memory, unprepare_to_access_memory): New.
8343         * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
8344         prepare_to_access_memory/prepare_to_access_memory.
8345         * nto-low.c (nto_target_ops): Adjust.
8346         * spu-low.c (spu_target_ops): Adjust.
8347         * win32-low.c (win32_target_ops): Adjust.
8348
8349 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
8350
8351         * Makefile.in (WARN_CFLAGS): Get it from configure.
8352         (WERROR_CFLAGS): New.
8353         (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
8354         * configure.ac: Introduce --enable-werror, which adds -Werror to
8355         the compiler command line.  Enabled by default.  Disable with
8356         --disable-werror.  Add -Wdeclaration-after-statement
8357         Wpointer-arith and -Wformat-nonliteral to warning flags.
8358         * configure: Regenerate.
8359
8360 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
8361
8362         * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
8363
8364 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
8365
8366         * gdbreplay.c (remote_error): New.
8367         (gdbchar): New.
8368         (expect): Use gdbchar.  Check for error reading from GDB.
8369         Clarify sync error output.
8370         (play): Check for errors writing to GDB.
8371         * linux-low.c (sigchld_handler): Really ignore `write' errors.
8372         * remote-utils.c (getpkt): Check for errors writing to the remote
8373         descriptor.
8374
8375 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
8376
8377         * linux-low.c (linux_wait_1): Move non-debugging code out of
8378         `debug_threads' control.
8379
8380 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
8381
8382         * linux-low.c (linux_wait_1): Don't set last_status here.
8383         * server.c (push_event, queue_stop_reply_callback): Assert we're
8384         not pushing a TARGET_WAITKIND_IGNORE event.
8385         (start_inferior, start_inferior, attach_inferior, handle_v_cont)
8386         (myresume, handle_target_event): Set the thread's last_resume_kind
8387         and last_status from the target returned status.
8388
8389 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
8390
8391         PR threads/10729
8392
8393         * linux-x86-low.c (update_debug_registers_callback): New.
8394         (i386_dr_low_set_addr): Use it.
8395         (i386_dr_low_get_addr): New.
8396         (i386_dr_low_set_control): Use update_debug_registers_callback.
8397         (i386_dr_low_get_control): New.
8398         (i386_dr_low_get_status): Adjust.
8399         * linux-low.c (linux_stop_lwp): New.
8400         * linux-low.h (linux_stop_lwp): Declare.
8401
8402         * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
8403         argument instead of a i386_debug_reg_state.
8404         (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
8405         a i386_debug_reg_state.
8406         (i386_insert_aligned_watchpoint): Adjust.
8407         (i386_remove_aligned_watchpoint): Adjust.
8408         (i386_low_stopped_data_address): Read the debug registers from the
8409         inferior instead of from the mirrors.
8410         * i386-low.h (struct i386_debug_reg_state): Extend comment.
8411         (i386_dr_low_get_addr): Declare.
8412         (i386_dr_low_get_control): Declare.
8413         (i386_dr_low_get_status): Change prototype.
8414
8415         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
8416         (i386_dr_low_get_addr): New.
8417         (i386_dr_low_get_control): New.
8418         (i386_dr_low_get_status): Adjust prototype.  Return
8419         dr_status_mirror.
8420         (i386_initial_stuff): Clear dr_status_mirror and
8421         dr_control_mirror.
8422         (i386_get_thread_context): Adjust.
8423         (i386_set_thread_context): Adjust.
8424         (i386_thread_added): Adjust.
8425
8426 2010-08-24  Pedro Alves  <pedro@codesourcery.com>
8427
8428         * linux-low.h (linux_thread_area): Delete declaration.
8429
8430 2010-08-11  Thomas Schwinge  <thomas@codesourcery.com>
8431
8432         * linux-low.c (linux_wait_1): Correctly return the ptid of the child
8433         after its termination.
8434
8435 2010-08-09  Pedro Alves  <pedro@codesourcery.com>
8436
8437         * linux-low.c (gdb_wants_lwp_stopped): Delete.
8438         (gdb_wants_all_stopped): Delete.
8439         (linux_wait_1): Don't call them.
8440         * server.c (handle_v_cont): Tag all threads as want-stopped.
8441         (gdb_wants_thread_stopped): Fix comments.  Tag the thread that
8442         stopped as "client-wants-stopped".
8443
8444 2010-07-31  Pedro Alves  <pedro@codesourcery.com>
8445
8446         * Makefile.in (signals_h): New.
8447         (server_h): Depend on it.
8448         (server.o): Don't depend on $(signals_def).
8449         (signals.o): Depend on $(signals_def).
8450
8451 2010-07-31  Jan Kratochvil  <jan.kratochvil@redhat.com>
8452
8453         * Makefile.in (signals_def): New.
8454         (server_h): Append include/gdb/signals.h and signals_def.
8455         (server.o): Append signals_def.
8456
8457 2010-07-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
8458
8459         * server.c (handle_target_event): Use target_signal_to_host for
8460         resume_info.sig initialization.
8461         * target.h (struct thread_resume) <sig>: New comment.
8462
8463 2010-07-20  Ozkan Sezer  <sezeroz@gmail.com>
8464
8465         * server.c (handle_query): strcpy() the returned string from paddress()
8466         instead of sprintf().
8467         * utils.c (paddress): Return phex_nz().
8468
8469 2010-07-07  Joel Brobecker  <brobecker@adacore.com>
8470
8471         * server.c (handle_v_cont): Call mourn_inferior if process
8472         just exited.
8473         (myresume): Likewise.
8474
8475 2010-07-01  Pedro Alves  <pedro@codesourcery.com>
8476
8477         Static tracepoints, and integration with UST.
8478
8479         * configure.ac: Handle --with-ust.  substitute ustlibs and ustinc.
8480         * mem-break.c (uninsert_all_breakpoints)
8481         (reinsert_all_breakpoints): New.
8482         * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
8483         * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
8484         (gdb_agent_ust_loaded, helper_thread_id)
8485         (gdb_agent_helper_thread_id): New macros.
8486         (struct ipa_sym_addresses): Add addr_ust_loaded,
8487         addr_helper_thread_id, addr_cmd_buf.
8488         (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
8489         (in_process_agent_loaded_ust): New.
8490         (write_e_ust_not_loaded): New.
8491         (maybe_write_ipa_ust_not_loaded): New.
8492         (struct collect_static_trace_data_action): New.
8493         (enum tracepoint_type) <static_tracepoint>: New.
8494         (struct tracepoint) <handle>: Mention static tracepoints.
8495         (struct static_tracepoint_ctx): New.
8496         (CMD_BUF_SIZE): New.
8497         (add_tracepoint_action): Handle static tracepoint actions.
8498         (unprobe_marker_at): New.
8499         (clear_installed_tracepoints): Handle static tracepoints.
8500         (cmd_qtdp): Handle static tracepoints.
8501         (probe_marker_at): New.
8502         (cmd_qtstart): Handle static tracepoints.
8503         (response_tracepoint): Handle static tracepoints.
8504         (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
8505         (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
8506         (get_context_regcache): Handle static tracepoints.
8507         (do_action_at_tracepoint): Handle static tracepoint actions.
8508         (traceframe_find_block_type): Handle static trace data blocks.
8509         (traceframe_read_sdata): New.
8510         (download_tracepoints): Download static tracepoint actions.
8511         [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
8512         (GDB_PROBE_NAME): New.
8513         (ust_ops): New.
8514         (GET_UST_SYM): New.
8515         (USTF): New.
8516         (dlsym_ust): New.
8517         (ust_marker_to_static_tracepoint): New.
8518         (gdb_probe): New.
8519         (collect_ust_data_at_tracepoint): New.
8520         (gdb_ust_probe): New.
8521         (UNIX_PATH_MAX, SOCK_DIR): New.
8522         (gdb_ust_connect_sync_socket): New.
8523         (resume_thread, stop_thread): New.
8524         (run_inferior_command): New.
8525         (init_named_socket): New.
8526         (gdb_ust_socket_init): New.
8527         (cstr_to_hexstr): New.
8528         (next_st): New.
8529         (first_marker, next_marker): New.
8530         (response_ust_marker): New.
8531         (cmd_qtfstm, cmd_qtsstm): New.
8532         (unprobe_marker_at, probe_marker_at): New.
8533         (cmd_qtstmat, gdb_ust_thread): New.
8534         (gdb_ust_init): New.
8535         (initialize_tracepoint_ftlib): Call gdb_ust_init.
8536         * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
8537         (ST_REGENTRY): New.
8538         (x86_64_st_collect_regmap): New.
8539         (X86_64_NUM_ST_COLLECT_GREGS): New.
8540         (AMD64_RIP_REGNUM): New.
8541         (supply_static_tracepoint_registers): New.
8542         * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
8543         (ST_REGENTRY): New.
8544         (i386_st_collect_regmap): New.
8545         (i386_NUM_ST_COLLECT_GREGS): New.
8546         (supply_static_tracepoint_registers): New.
8547         * server.c (handle_query): Handle qXfer:statictrace:read.
8548         <qSupported>: Report support for StaticTracepoints, and
8549         qXfer:statictrace:read features.
8550         * server.h (traceframe_read_sdata)
8551         (supply_static_tracepoint_registers): Declare.
8552         * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
8553         (unpack_varlen_hex): Include in IPA build.
8554         * Makefile.in (ustlibs, ustinc): New.
8555         (IPA_OBJS): Add remote-utils-ipa.o.
8556         ($(IPA_LIB)): Link -ldl and -lpthread.
8557         (UST_CFLAGS): New.
8558         (IPAGENT_CFLAGS): Add UST_CFLAGS.
8559         * config.in, configure: Regenerate.
8560
8561 2010-06-20  Ian Lance Taylor  <iant@google.com>
8562             Pedro Alves  <pedro@codesourcery.com>
8563
8564         * linux-x86-low.c (always_true): Delete.
8565         (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
8566         trying to fool the compiler with always_true.
8567
8568 2010-06-20  Pedro Alves  <pedro@codesourcery.com>
8569
8570         * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
8571         conditions in gdbserver.
8572
8573 2010-06-19  Ulrich Weigand  <uweigand@de.ibm.com>
8574
8575         * spu-low.c (spu_read_memory): Wrap around local store limit.
8576         (spu_write_memory): Likewise.
8577
8578 2010-06-15  Pedro Alves  <pedro@codesourcery.com>
8579
8580         * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
8581         (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
8582         LONGEST uses.
8583         * server.h (struct emit_ops): Replace int64_t uses with LONGEST
8584         uses.
8585         * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
8586         uses with LONGEST uses.
8587
8588 2010-06-14  Stan Shebs  <stan@codesourcery.com>
8589             Pedro Alves  <pedro@codesourcery.com>
8590
8591         Bytecode compiler.
8592
8593         * linux-x86-low.c: Include limits.h.
8594         (add_insns): New.
8595         (always_true): New.
8596         (EMIT_ASM): New.
8597         (EMIT_ASM32): New.
8598         (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
8599         (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
8600         (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
8601         (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
8602         (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
8603         (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
8604         (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
8605         (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
8606         (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
8607         (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
8608         (amd64_emit_void_call_2): New.
8609         (amd64_emit_ops): New.
8610         (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
8611         (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
8612         (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
8613         (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
8614         (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
8615         (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
8616         (i386_emit_goto, i386_write_goto_address, i386_emit_const)
8617         (i386_emit_call, i386_emit_reg, i386_emit_pop)
8618         (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
8619         (i386_emit_stack_adjust, i386_emit_int_call_1)
8620         (i386_emit_void_call_2): New.
8621         (i386_emit_ops): New.
8622         (x86_emit_ops): New.
8623         (the_low_target): Install x86_emit_ops.
8624         * server.h (struct emit_ops): New.
8625         (get_raw_reg_func_addr): Declare.
8626         (current_insn_ptr, emit_error): Declare.
8627         * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
8628         (set_trace_state_variable_value): New defines.
8629         (struct ipa_sym_addresses): New fields addr_get_raw_reg,
8630         addr_get_trace_state_variable_value and
8631         addr_set_trace_state_variable_value.
8632         (symbol_list): New fields for get_raw_reg,
8633         get_trace_state_variable_value and set_trace_state_variable_value.
8634         (condfn): New typedef.
8635         (struct tracepoint): New field `compiled_cond'.
8636         (do_action_at_tracepoint): Clear compiled_cond.
8637         (get_trace_state_variable_value, set_trace_state_variable_value):
8638         Export in the IPA.
8639         (condition_true_at_tracepoint): If there's a compiled condition,
8640         run that.
8641         (current_insn_ptr, emit_error): New globals.
8642         (struct bytecode_address): New.
8643         (get_raw_reg_func_addr): New.
8644         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
8645         (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
8646         (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
8647         (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
8648         (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
8649         (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
8650         (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
8651         (compile_tracepoint_condition, compile_bytecodes): New.
8652         * target.h (emit_ops): Forward declare.
8653         (struct target_ops): New field emit_ops.
8654         (target_emit_ops): New.
8655         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
8656         * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
8657         * linux-low.c (linux_emit_ops): New.
8658         (linux_target_ops): Install it.
8659         * linux-low.h (struct linux_target_ops): New field emit_ops.
8660
8661 2010-06-14  Ulrich Weigand  <uweigand@de.ibm.com>
8662
8663         * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
8664         * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
8665
8666 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
8667             Stan Shebs  <stan@codesourcery.com>
8668
8669         * Makefile.in (IPA_DEPFILES, extra_libraries): New.
8670         (all): Depend on $(extra_libraries).
8671         (install-only): Install the IPA.
8672         (IPA_OBJS, IPA_LIB): New.
8673         (clean): Remove the IPA lib.
8674         (IPAGENT_CFLAGS): New.
8675         (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
8676         (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
8677         (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
8678         * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
8679         * configure.ac: Check for atomic builtins support in the compiler.
8680         (IPA_DEPFILES, extra_libraries): Define.
8681         * configure.srv (ipa_obj): Add description.
8682         (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
8683         (i[34567]86-*-linux*): Set ipa_obj.
8684         (x86_64-*-linux*): Set ipa_obj.
8685         * linux-low.c (stabilizing_threads): New.
8686         (supports_fast_tracepoints): New.
8687         (linux_detach): Stabilize threads before detaching.
8688         (handle_tracepoints): Handle internal tracing breakpoints.  Assert
8689         the lwp is either not stabilizing, or is moving out of a jump pad.
8690         (linux_fast_tracepoint_collecting): New.
8691         (maybe_move_out_of_jump_pad): New.
8692         (enqueue_one_deferred_signal): New.
8693         (dequeue_one_deferred_signal): New.
8694         (linux_wait_for_event_1): If moving out of a jump pad, defer
8695         pending signals to later.
8696         (linux_stabilize_threads): New.
8697         (linux_wait_1): Check if threads need moving out of jump pads, and
8698         do it if so.
8699         (stuck_in_jump_pad_callback): New.
8700         (move_out_of_jump_pad_callback): New.
8701         (lwp_running): New.
8702         (linux_resume_one_lwp): Handle moving out of jump pads.
8703         (linux_set_resume_request): Dequeue deferred signals.
8704         (need_step_over_p): Also step over fast tracepoint jumps.
8705         (start_step_over): Also uninsert fast tracepoint jumps.
8706         (finish_step_over): Also reinsert fast tracepoint jumps.
8707         (linux_install_fast_tracepoint_jump): New.
8708         (linux_target_ops): Install linux_stabilize_threads and
8709         linux_install_fast_tracepoint_jump_pad.
8710         * linux-low.h (linux_target_ops) <get_thread_area,
8711         install_fast_tracepoint_jump_pad>: New fields.
8712         (struct lwp_info) <collecting_fast_tracepoint,
8713         pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
8714         (linux_get_thread_area): Declare.
8715         * linux-x86-low.c (jump_insn): New.
8716         (x86_get_thread_area): New.
8717         (append_insns): New.
8718         (push_opcode): New.
8719         (amd64_install_fast_tracepoint_jump_pad): New.
8720         (i386_install_fast_tracepoint_jump_pad): New.
8721         (x86_install_fast_tracepoint_jump_pad): New.
8722         (the_low_target): Install x86_get_thread_area and
8723         x86_install_fast_tracepoint_jump_pad.
8724         * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
8725         (struct fast_tracepoint_jump): New.
8726         (fast_tracepoint_jump_insn): New.
8727         (fast_tracepoint_jump_shadow): New.
8728         (find_fast_tracepoint_jump_at): New.
8729         (fast_tracepoint_jump_here): New.
8730         (delete_fast_tracepoint_jump): New.
8731         (set_fast_tracepoint_jump): New.
8732         (uninsert_fast_tracepoint_jumps_at): New.
8733         (reinsert_fast_tracepoint_jumps_at): New.
8734         (set_breakpoint_at): Use write_inferior_memory.
8735         (uninsert_raw_breakpoint): Use write_inferior_memory.
8736         (check_mem_read): Mask out fast tracepoint jumps.
8737         (check_mem_write): Mask out fast tracepoint jumps.
8738         * mem-break.h (struct fast_tracepoint_jump): Forward declare.
8739         (set_fast_tracepoint_jump): Declare.
8740         (delete_fast_tracepoint_jump)
8741         (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
8742         (reinsert_fast_tracepoint_jumps_at): Declare.
8743         * regcache.c: Don't compile many functions when building the
8744         in-process agent library.
8745         (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
8746         the register buffer in the heap.
8747         (free_register_cache): If the register buffer isn't owned by the
8748         regcache, don't free it.
8749         (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
8750         pre-existing register caches.
8751         * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
8752         type.
8753         (convert_ascii_to_int): : Constify `from' parameter type.
8754         (decode_M_packet, decode_X_packet): Replace the `to' parameter by
8755         a `to_p' pointer to pointer parameter.  If TO_P is NULL, malloc
8756         the needed buffer in-place.
8757         (relocate_instruction): New.
8758         * server.c (handle_query) <qSymbols>: If the target supports
8759         tracepoints, give it a chance of looking up symbols.  Report
8760         support for fast tracepoints.
8761         (handle_status): Stabilize threads.
8762         (process_serial_event): Adjust.
8763         * server.h (struct fast_tracepoint_jump): Forward declare.
8764         (struct process_info) <fast_tracepoint_jumps>: New field.
8765         (convert_ascii_to_int, convert_int_to_ascii): Adjust.
8766         (decode_X_packet, decode_M_packet): Adjust.
8767         (relocate_instruction): Declare.
8768         (in_process_agent_loaded): Declare.
8769         (tracepoint_look_up_symbols): Declare.
8770         (struct fast_tpoint_collect_status): Declare.
8771         (fast_tracepoint_collecting): Declare.
8772         (force_unlock_trace_buffer): Declare.
8773         (handle_tracepoint_bkpts): Declare.
8774         (initialize_low_tracepoint)
8775         (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
8776         * target.h (struct target_ops) <stabilize_threads,
8777         install_fast_tracepoint_jump_pad>: New fields.
8778         (stabilize_threads, install_fast_tracepoint_jump_pad): New.
8779         * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
8780         [HAVE_STDINT_H]: Include stdint.h.
8781         (trace_debug_1): Rename to ...
8782         (trace_vdebug): ... this.
8783         (trace_debug): Rename to ...
8784         (trace_debug_1): ... this.  Add `level' parameter.
8785         (trace_debug): New.
8786         (ATTR_USED, ATTR_NOINLINE): New.
8787         (IP_AGENT_EXPORT): New.
8788         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8789         (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
8790         (about_to_request_buffer_space, trace_buffer_is_full)
8791         (stopping_tracepoint, expr_eval_result, error_tracepoint)
8792         (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
8793         (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
8794         (traceframe_write_count, traceframes_created)
8795         (trace_state_variables)
8796         New renaming defines.
8797         (struct ipa_sym_addresses): New.
8798         (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
8799         (symbol_list): New.
8800         (ipa_sym_addrs): New.
8801         (all_tracepoint_symbols_looked_up): New.
8802         (in_process_agent_loaded): New.
8803         (write_e_ipa_not_loaded): New.
8804         (maybe_write_ipa_not_loaded): New.
8805         (tracepoint_look_up_symbols): New.
8806         (debug_threads) [IN_PROCESS_AGENT]: New.
8807         (read_inferior_memory) [IN_PROCESS_AGENT]: New.
8808         (UNKNOWN_SIDE_EFFECTS): New.
8809         (stop_tracing): New.
8810         (flush_trace_buffer): New.
8811         (stop_tracing_bkpt): New.
8812         (flush_trace_buffer_bkpt): New.
8813         (read_inferior_integer): New.
8814         (read_inferior_uinteger): New.
8815         (read_inferior_data_pointer): New.
8816         (write_inferior_data_pointer): New.
8817         (write_inferior_integer): New.
8818         (write_inferior_uinteger): New.
8819         (struct collect_static_trace_data_action): Delete.
8820         (enum tracepoint_type): New.
8821         (struct tracepoint) <type>: New field `type'.
8822         <actions_str, step_actions, step_actions_str>: Only include in
8823         GDBserver.
8824         <orig_size, obj_addr_on_target, adjusted_insn_addr>
8825         <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
8826         (tracepoints): Use IP_AGENT_EXPORT.
8827         (last_tracepoint): Don't include in the IPA.
8828         (stopping_tracepoint): Use IP_AGENT_EXPORT.
8829         (trace_buffer_is_full): Use IP_AGENT_EXPORT.
8830         (alloced_trace_state_variables): New.
8831         (trace_state_variables): Use IP_AGENT_EXPORT.
8832         (traceframe_t): Delete unused variable.
8833         (circular_trace_buffer): Don't include in the IPA.
8834         (trace_buffer_start): Delete.
8835         (struct trace_buffer_control): New.
8836         (trace_buffer_free): Delete.
8837         (struct ipa_trace_buffer_control): New.
8838         (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
8839         (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
8840         New.
8841         (trace_buffer_ctrl): New.
8842         (TRACE_BUFFER_CTRL_CURR): New.
8843         (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
8844         Reimplement as macros.
8845         (trace_buffer_wrap): Delete.
8846         (traceframe_write_count, traceframe_read_count)
8847         (traceframes_created, tracing): Use IP_AGENT_EXPORT.
8848         (struct tracepoint_hit_ctx) <type>: New field.
8849         (struct fast_tracepoint_ctx): New.
8850         (memory_barrier): New.
8851         (cmpxchg): New.
8852         (record_tracepoint_error): Update atomically in the IPA.
8853         (clear_inferior_trace_buffer): New.
8854         (about_to_request_buffer_space): New.
8855         (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
8856         updating the same buffer.
8857         (add_tracepoint): Default the tracepoint's type to trap
8858         tracepoint, and orig_size to -1.
8859         (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
8860         internal variables.
8861         (create_trace_state_variable): New parameter `gdb'.  Handle it.
8862         (clear_installed_tracepoints): Clear fast tracepoint jumps.
8863         (cmd_qtdp): Handle fast tracepoints.
8864         (cmd_qtdv): Adjust.
8865         (max_jump_pad_size): New.
8866         (gdb_jump_pad_head): New.
8867         (get_jump_space_head): New.
8868         (claim_jump_space): New.
8869         (sort_tracepoints): New.
8870         (MAX_JUMP_SIZE): New.
8871         (cmd_qtstart): Handle fast tracepoints.  Sync tracepoints with the
8872         IPA.
8873         (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
8874         support.  Upload fast traceframes, and delete internal IPA
8875         breakpoints.
8876         (stop_tracing_handler): New.
8877         (flush_trace_buffer_handler): New.
8878         (cmd_qtstop): Upload fast tracepoints.
8879         (response_tracepoint): Handle fast tracepoints.
8880         (tracepoint_finished_step): Upload fast traceframes.  Set the
8881         tracepoint hit context's tracepoint type.
8882         (handle_tracepoint_bkpts): New.
8883         (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
8884         type.  Add comment about fast tracepoints.
8885         (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
8886         non-existing action_str field.
8887         (get_context_regcache): Handle fast tracepoints.
8888         (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
8889         to the regcache.
8890         (fast_tracepoint_from_jump_pad_address): New.
8891         (fast_tracepoint_from_ipa_tpoint_address): New.
8892         (collecting_t): New.
8893         (force_unlock_trace_buffer): New.
8894         (fast_tracepoint_collecting): New.
8895         (collecting): New.
8896         (gdb_collect): New.
8897         (write_inferior_data_ptr): New.
8898         (target_tp_heap): New.
8899         (target_malloc): New.
8900         (download_agent_expr): New.
8901         (UALIGN): New.
8902         (download_tracepoints): New.
8903         (download_trace_state_variables): New.
8904         (upload_fast_traceframes): New.
8905         (IPA_FIRST_TRACEFRAME): New.
8906         (IPA_NEXT_TRACEFRAME_1): New.
8907         (IPA_NEXT_TRACEFRAME): New.
8908         [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
8909         [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
8910         (gdb_jump_pad_buffer_end): New.
8911         [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
8912         (initialize_tracepoint): Adjust.
8913         [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
8914         buffer.  Initialize the low module.
8915         * utils.c (PREFIX, TOOLNAME): New.
8916         (malloc_failure): Use PREFIX.
8917         (error): In the IPA, an error causes an exit.
8918         (fatal, warning): Use PREFIX.
8919         (internal_error): Use TOOLNAME.
8920         (NUMCELLS): Increase to 10.
8921         * configure, config.in: Regenerate.
8922
8923 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
8924
8925         * server.c (handle_query) <qSupported>: Do two passes over the
8926         qSupported string to avoid nesting strtok.
8927
8928 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
8929
8930         * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
8931         (CDEPS): New.
8932         * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping.  Test also
8933         -Wl,--dynamic-list.
8934         * configure: Regenerate.
8935         * proc-service.list: New.
8936
8937 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
8938
8939         * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
8940         New comment.
8941
8942 2010-05-26  Ozkan Sezer  <sezeroz@gmail.com>
8943
8944         * gdbreplay.c (remote_open): Check error return from socket() call by
8945         its equality to -1 not by it being negative.
8946         * remote-utils.c (remote_open): Likewise.
8947
8948 2010-05-23  Pedro Alves  <pedro@codesourcery.com>
8949
8950         * config.h: Regenerate.
8951
8952 2010-05-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
8953
8954         * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8955         doesn't provide PTRACE_GET_THREAD_AREA.
8956
8957 2010-05-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
8958
8959         * linux-m68k-low.c: Include <asm/ptrace.h>
8960         (ps_get_thread_area): Implement.
8961
8962 2010-05-03  Doug Evans  <dje@google.com>
8963
8964         * event-loop.c (struct callback_event): New struct.
8965         (callback_list): New global.
8966         (append_callback_event, delete_callback_event): New functions.
8967         (process_callback): New function.
8968         (start_event_loop): Call it.
8969         * remote-utils.c (NOT_SCHEDULED): Define.
8970         (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8971         moved out of readchar.
8972         (readchar): Rewrite.  Call reschedule before returning.
8973         (reset_readchar): New function.
8974         (remote_close): Call it.
8975         (process_remaining, reschedule): New functions.
8976         * server.h (callback_handler_func): New typedef.
8977         (append_callback_event, delete_callback_event): Declare.
8978
8979 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
8980
8981         * proc-service.c (ps_pglobal_lookup): Use
8982         thread_db_look_up_one_symbol.
8983         * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8984         parameter.  Use it instead of all_symbols_looked_up.
8985         * server.h (struct process_info) <all_symbols_looked_up>: Delete
8986         field.
8987         (all_symbols_looked_up): Don't declare.
8988         (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8989         * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8990         field.
8991         (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8992         Set all_symbols_looked_up here.
8993         (thread_db_look_up_one_symbol): New.
8994         (thread_db_get_tls_address): Adjust.
8995         (thread_db_load_search, try_thread_db_load_1): Always allocate the
8996         thread_db object on the heap, and tentatively set it in the
8997         process structure.
8998         (thread_db_init): Don't set all_symbols_looked_up here.
8999         * linux-low.h (thread_db_look_up_one_symbol): Declare.
9000
9001 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
9002
9003         * linux-low.c (linux_kill, linux_detach): Adjust.
9004         (status_pending_p_callback): Remove redundant statement.  Check
9005         for !TARGET_WAITIKIND_IGNORE, instead of
9006         TARGET_WAITKIND_STOPPED.
9007         (handle_tracepoints): Make sure LWP is locked.  Adjust.
9008         (linux_wait_for_event_1): Adjust.
9009         (linux_cancel_breakpoints): New.
9010         (unsuspend_one_lwp): New.
9011         (unsuspend_all_lwps): New.
9012         (linux_wait_1): If finishing a step-over, unsuspend all lwps.
9013         (send_sigstop_callback): Change return type to int, add new
9014         `except' parameter and handle it.
9015         (suspend_and_send_sigstop_callback): New.
9016         (stop_all_lwps): Add new `suspend' and `expect' parameters, and
9017         pass them down.  If SUSPEND, also increment the lwp's suspend
9018         count.
9019         (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
9020         (need_step_over_p): Don't consider suspended LWPs.
9021         (start_step_over): Adjust.
9022         (proceed_one_lwp): Change return type to int, add new `except'
9023         parameter and handle it.
9024         (unsuspend_and_proceed_one_lwp): New.
9025         (proceed_all_lwps): Use find_inferior instead of
9026         for_each_inferior.
9027         (unstop_all_lwps): Add `unsuspend' parameter.  If UNSUSPEND, them
9028         also decrement the suspend count of LWPs.  Pass `except' down,
9029         instead of hacking its suspend count.
9030         (linux_pause_all): Add `freeze' parameter.  Adjust.
9031         (linux_unpause_all): New.
9032         (linux_target_ops): Install linux_unpause_all.
9033         * server.c (handle_status): Adjust.
9034         * target.h (struct target_ops): New fields `unpause_all' and
9035         `cancel_breakpoints'.  Add new parameter to `pause_all'.
9036         (pause_all): Add new `freeze' parameter.
9037         (unpause_all): New.
9038         (cancel_breakpoints): New.
9039         * tracepoint.c (clear_installed_tracepoints): Pause threads, and
9040         cancel breakpoints.
9041         (cmd_qtstart): Pause threads.
9042         (stop_tracing): Pause threads, and cancel breakpoints.
9043         * win32-low.c (win32_target_ops): Adjust.
9044
9045 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
9046
9047         * linux-low.c (linux_wait_for_event_1): Move passing the signal to
9048         the inferior right away from here...
9049         (linux_wait_1): ... to here, and adjust to check the thread's
9050         last_resume_kind instead of the lwp's step or stop_expected flags.
9051
9052 2010-05-02  Pedro Alves  <pedro@codesourcery.com>
9053
9054         * README: Use consistent `GDB' and `GDBserver' spellings.
9055
9056 2010-05-02  Pedro Alves  <pedro@codesourcery.com>
9057
9058         * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
9059         (linux_kill): Stop all lwps here.  Don't delete the main lwp here.
9060         (linux_detach_one_lwp): Assume the lwp is stopped.
9061         (any_thread_of): Delete.
9062         (linux_detach): Stop all lwps here.  Don't blindly delete all
9063         breakpoints.
9064         (delete_lwp_callback): New.
9065         (linux_mourn): Delete all lwps of the process that is gone.
9066         (linux_wait_1): Don't delete the last lwp of the process here.
9067         * mem-break.h (mark_breakpoints_out): Declare.
9068         * mem-break.c (mark_breakpoints_out): New.
9069         (free_all_breakpoints): Use it.
9070         * server.c (handle_target_event): If the process is gone, mark
9071         breakpoints out.
9072         * thread-db.c (struct thread_db) <create_bp>: New field.
9073         (thread_db_enable_reporting): Fix prototype.  Store a thread event
9074         breakpoint reference in the thread_db struct.
9075         (thread_db_load_search): Clear the thread_db object.
9076         (try_thread_db_load_1): Ditto.
9077         (switch_to_process): New.
9078         (disable_thread_event_reporting): Use it.
9079         (remove_thread_event_breakpoints): New.
9080         (thread_db_detach, thread_db_mourn): Use it.
9081
9082 2010-05-01  Pedro Alves  <pedro@codesourcery.com>
9083
9084         * linux-low.c (linux_enable_event_reporting): New.
9085         (linux_wait_for_event_1, handle_extended_wait): Use it.
9086
9087 2010-04-30  Pedro Alves  <pedro@codesourcery.com>
9088
9089         * linux-low.c (linux_kill_one_lwp, linux_kill)
9090         (linux_detach_one_lwp): Adjust to send_sigstop interface change.
9091         (send_sigstop): Take an lwp_info as parameter instead.  Queue a
9092         SIGSTOP even if the LWP is stopped.
9093         (send_sigstop_callback): New.
9094         (stop_all_lwps): Use send_sigstop_callback instead.
9095         (linux_resume_one_thread): Adjust.
9096         (proceed_one_lwp): Still proceed an LWP that the client has
9097         requested to stop, if we haven't reported it as stopped yet.  Make
9098         sure that LWPs the client want stopped, have a pending SIGSTOP.
9099
9100 2010-04-26  Doug Evans  <dje@google.com>
9101
9102         * server.c (handle_general_set): Make static.
9103
9104         * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
9105         Print received char after testing for error/eof instead of before.
9106         (input_interrupt): Tweak comment.
9107
9108 2010-04-23  Doug Evans  <dje@google.com>
9109
9110         * server.c (start_inferior): Print inferior argv if --debug.
9111
9112 2010-04-21  Aleksandar Ristovski  <aristovski@qnx.com>
9113
9114         * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
9115         * nto-x86-low.c: Include server.h
9116
9117 2010-04-20  Pierre Muller  <muller@ics.u-strasbg.fr>
9118
9119         * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
9120         be consistent with other sources of this directory.
9121         (init_registers_amd64): Correct name of source file of this function
9122         in the comment.
9123
9124 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
9125
9126         * configure.srv (x86_64-*-mingw*): New configuration for Windows
9127         64-bit executables.
9128
9129 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
9130
9131         * win32-i386-low.c: Add 64-bit support.
9132         (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
9133         (init_registers_amd64): Declare.
9134         (mappings): Add 64-bit version of array.
9135         (init_windows_x86): New function.
9136         (the_low_target): Change init_arch field to init_windows_x86.
9137
9138 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
9139
9140         * win32-low.c: Adapt to support also 64-bit architecture.
9141         (child_xfer_memory): Use uintptr_t type for local variable `addr'.
9142         (get_image_name): Use SIZE_T type for local variable `done'.
9143         (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
9144         (toolhelp_get_dll_name): Idem.
9145         (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
9146         Use uintptr_t typecast to avoid warning.
9147         (handle_unload_dll): Use uintptr_t typecast to avoid warning.
9148         (handle_exception): Use phex_nz to avoid warning.
9149         (win32_wait): Remove unused local variable `process'.
9150
9151 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
9152
9153         * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
9154         `amd64-avx.o'.
9155
9156 2010-04-17  Pierre Muller  <muller@ics.u-strasbg.fr>
9157
9158         * configure.ac: Use `ws2_32' library for srv_mingw.
9159         * configure: Regenerate.
9160         * gdbreplay.c: Include winsock2.h instead of winsock.h.
9161         * remote-utils.c: Likewise.
9162
9163 2010-04-17  H.J. Lu  <hongjiu.lu@intel.com>
9164
9165         * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
9166         if __x86_64__ is defined.
9167
9168 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
9169
9170         * configure: Regenerate.
9171
9172 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
9173
9174         * server.c (handle_query): Handle 'qGetTIBAddr' query.
9175         * target.h (target_ops): New get_tib_address field.
9176         * win32-low.h (win32_thread_info): Add thread_local_base field.
9177         * win32-low.c (child_add_thread): Add tlb argument.
9178         Set thread_local_base field to TLB.
9179         (get_child_debug_event): Adapt to child_add_thread change.
9180         (win32_get_tib_address): New function.
9181         (win32_target_ops): Set get_tib_address field to
9182         win32_get_tib_address.
9183         * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
9184
9185 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
9186
9187         * linux-low.c (linux_mourn): Also remove the process.
9188         * server.c (handle_target_event): Don't remove the process here.
9189         * nto-low.c (nto_mourn): New.
9190         (nto_target_ops): Install it.
9191         * spu-low.c (spu_mourn): New.
9192         (spu_target_ops): Install it.
9193         * win32-low.c (win32_mourn): New.
9194         (win32_target_ops): Install it.
9195
9196 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
9197
9198         * server.h (buffer_xml_printf): Remove redundant `;'.
9199
9200 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
9201
9202         * regcache.c (set_register_cache): Invalidate regcaches before
9203         changing the register cache layout.
9204         (regcache_invalidate_one): Allow a NULL regcache.
9205         * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
9206         regcaches before changing the register cache layout or the target
9207         regsets.
9208
9209 2010-04-12  H.J. Lu  <hongjiu.lu@intel.com>
9210
9211         * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
9212         variable warning on Linux/x86-64.
9213
9214 2010-04-11  Pedro Alves  <pedro@codesourcery.com>
9215
9216         GDBserver disconnected tracing support.
9217
9218         * linux-low.c (linux_remove_process): Delete.
9219         (add_lwp): Don't set last_resume_kind here.
9220         (linux_kill): Use `mourn'.
9221         (linux_detach): Use `thread_db_detach', and `mourn'.
9222         (linux_mourn): New.
9223         (linux_attach_lwp_1): Adjust comment.
9224         (linux_attach): last_resume_kind moved the thread_info; adjust.
9225         (status_pending_p_callback): Adjust.
9226         (linux_wait_for_event_1): Adjust.
9227         (count_events_callback, select_singlestep_lwp_callback)
9228         (select_event_lwp_callback, cancel_breakpoints_callback)
9229         (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
9230         (proceed_one_lwp): Adjust.
9231         (linux_async): Add debug output.
9232         (linux_thread_stopped): New.
9233         (linux_pause_all): New.
9234         (linux_target_ops): Install linux_mourn, linux_thread_stopped and
9235         linux_pause_all.
9236         * linux-low.h (struct lwp_info): Delete last_resume_kind field.
9237         (thread_db_free): Delete declaration.
9238         (thread_db_detach, thread_db_mourn): Declare.
9239         * thread-db.c (thread_db_init): Use thread_db_mourn.
9240         (thread_db_free): Delete, split in two.
9241         (disable_thread_event_reporting): New.
9242         (thread_db_detach): New.
9243         (thread_db_mourn): New.
9244
9245         * server.h (struct thread_info) <last_resume_kind>: New field.
9246         <attached>: Add comment.
9247         <gdb_detached>: New field.
9248         (handler_func): Change return type to int.
9249         (handle_serial_event, handle_target_event): Ditto.
9250         (gdb_connected): Declare.
9251         (tracing): Delete.
9252         (disconnected_tracing): Declare.
9253         (stop_tracing): Declare.
9254
9255         * server.c (handle_query) <qSupported>: Report support for
9256         disconnected tracing.
9257         (queue_stop_reply_callback): Account for running threads.
9258         (gdb_wants_thread_stopped): New.
9259         (gdb_wants_all_threads_stopped): New.
9260         (gdb_reattached_process): New.
9261         (handle_status): Clear the `gdb_detached' flag of all processes.
9262         In all-stop, stop all threads.
9263         (main): Be sure to leave tfind mode.  Handle disconnected tracing.
9264         (process_serial_event): If the remote connection breaks, or if an
9265         exit was forced with "monitor exit", force an event loop exit.
9266         Handle disconnected tracing on detach.
9267         (handle_serial_event): Adjust.
9268         (handle_target_event): If GDB isn't connected, forward events back
9269         to the inferior, unless the last process exited, in which case,
9270         exit gdbserver.  Adjust interface.
9271
9272         * remote-utils.c (remote_open): Don't block in accept.  Instead
9273         register an event loop source on the listen socket file
9274         descriptor.  Refactor bits into ...
9275         (listen_desc): ... this new global.
9276         (gdb_connected): ... this new function.
9277         (enable_async_notification): ... this new function.
9278         (handle_accept_event): ... this new function.
9279         (remote_close): Clear remote_desc.
9280
9281         * inferiors.c (add_thread): Set the new thread's last_resume_kind.
9282
9283         * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
9284         New fields.
9285         (mourn_inferior): Define.
9286         (target_process_qsupported): Avoid the dangling else problem.
9287         (thread_stopped): Define.
9288         (pause_all): Define.
9289         (target_waitstatus_to_string): Declare.
9290         * target.c (target_waitstatus_to_string): New.
9291
9292         * tracepoint.c (tracing): Make extern.
9293         (disconnected_tracing): New.
9294         (stop_tracing): Make extern.  Handle tracing stops due to GDB
9295         disconnecting.
9296         (cmd_qtdisconnected): New.
9297         (cmd_qtstatus): Report disconnected tracing status in trace reply.
9298         (handle_tracepoint_general_set): Handle QTDisconnected.
9299
9300         * event-loop.c (event_handler_func): Change return type to int.
9301         (process_event): Bail out if the event handler wants the event
9302         loop to stop.
9303         (handle_file_event): Ditto.
9304         (start_event_loop): Bail out if the event handler wants the event
9305         loop to stop.
9306
9307         * nto-low.c (nto_target_ops): Adjust.
9308         * spu-low.c (spu_wait): Don't remove the process here.
9309         (spu_target_ops): Adjust.
9310         * win32-low.c (win32_wait): Don't remove the process here.
9311         (win32_target_ops): Adjust.
9312
9313 2010-04-11  Pedro Alves  <pedro@codesourcery.com>
9314
9315         * regcache.c (realloc_register_cache): Invalidate inferior's
9316         regcache before recreating it.
9317
9318 2010-04-09  Pedro Alves  <pedro@codesourcery.com>
9319
9320         * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
9321
9322 2010-04-09  Stan Shebs  <stan@codesourcery.com>
9323             Pedro Alves  <pedro@codesourcery.com>
9324
9325         * server.h (LONGEST): New.
9326         (struct thread_info) <while_stepping>: New field.
9327         (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
9328         Declare.
9329         (initialize_tracepoint, handle_tracepoint_general_set)
9330         (handle_tracepoint_query, tracepoint_finished_step)
9331         (tracepoint_was_hit, release_while_stepping_state_list):
9332         (current_traceframe): Declare.
9333         * server.c (handle_general_set): Handle tracepoint packets.
9334         (read_memory): New.
9335         (write_memory): New.
9336         (handle_search_memory_1): Use read_memory.
9337         (handle_query): Report support for conditional tracepoints, trace
9338         state variables, and tracepoint sources.  Handle tracepoint
9339         queries.
9340         (main): Initialize the tracepoints module.
9341         (process_serial_event): Handle traceframe reads/writes.
9342
9343         * linux-low.c (handle_tracepoints): New.
9344         (linux_wait_1): Call it.
9345         (linux_resume_one_lwp): Handle while-stepping.
9346         (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
9347         (linux_target_ops): Install them.
9348         * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
9349         New field.
9350         * linux-x86-low.c (x86_supports_tracepoints): New.
9351         (the_low_target). Install it.
9352
9353         * mem-break.h (delete_breakpoint): Declare.
9354         * mem-break.c (delete_breakpoint): Make external.
9355
9356         * target.h (struct target_ops): Add `supports_tracepoints',
9357         `read_pc', and `write_pc' fields.
9358         (target_supports_tracepoints): Define.
9359         * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
9360         (phex_nz): New.
9361
9362         * regcache.h (struct regcache) <registers_owned>: New field.
9363         (init_register_cache, regcache_cpy): Declare.
9364         (regcache_read_pc, regcache_write_pc): Declare.
9365         (register_cache_size): Declare.
9366         (supply_regblock): Declare.
9367         * regcache.c (init_register_cache): New.
9368         (new_register_cache): Use it.
9369         (regcache_cpy): New.
9370         (register_cache_size): New.
9371         (supply_regblock): New.
9372         (regcache_read_pc, regcache_write_pc): New.
9373
9374         * tracepoint.c: New.
9375
9376         * Makefile.in (OBS): Add tracepoint.o.
9377         (tracepoint.o): New rule.
9378
9379 2010-04-08  H.J. Lu  <hongjiu.lu@intel.com>
9380
9381         * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
9382         (i386-mmx.o): New.
9383         (i386-mmx.c): Likewise.
9384         (i386-mmx-linux.o): Likewise.
9385         (i386-mmx-linux.c): Likewise.
9386
9387         * configure.srv (srv_i386_regobj): Add i386-mmx.o.
9388         (srv_i386_linux_regobj): Add i386-mmx-linux.o.
9389         (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
9390         (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
9391
9392         * linux-x86-low.c (init_registers_i386_mmx_linux): New.
9393         (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
9394         and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
9395
9396 2010-04-07  H.J. Lu  <hongjiu.lu@intel.com>
9397
9398         * Makefile.in (clean): Updated.
9399         (i386-avx.o): New.
9400         (i386-avx.c): Likewise.
9401         (i386-avx-linux.o): Likewise.
9402         (i386-avx-linux.c): Likewise.
9403         (amd64-avx.o): Likewise.
9404         (amd64-avx.c): Likewise.
9405         (amd64-avx-linux.o): Likewise.
9406         (amd64-avx-linux.c): Likewise.
9407
9408         * configure.srv (srv_i386_regobj): Add i386-avx.o.
9409         (srv_i386_linux_regobj): Add i386-avx-linux.o.
9410         (srv_amd64_regobj): Add amd64-avx.o.
9411         (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
9412         (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
9413         (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
9414         (srv_i386_xmlfiles): Add i386/i386-avx.xml.
9415         (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
9416         (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
9417         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
9418
9419         * i387-fp.c: Include "i386-xstate.h".
9420         (i387_xsave): New.
9421         (i387_cache_to_xsave): Likewise.
9422         (i387_xsave_to_cache): Likewise.
9423         (x86_xcr0): Likewise.
9424
9425         * i387-fp.h (i387_cache_to_xsave): Likewise.
9426         (i387_xsave_to_cache): Likewise.
9427         (x86_xcr0): Likewise.
9428
9429         * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
9430         * linux-crisv32-low.c (target_regsets): Likewise.
9431         * linux-m68k-low.c (target_regsets): Likewise.
9432         * linux-mips-low.c (target_regsets): Likewise.
9433         * linux-ppc-low.c (target_regsets): Likewise.
9434         * linux-s390-low.c (target_regsets): Likewise.
9435         * linux-sh-low.c (target_regsets): Likewise.
9436         * linux-sparc-low.c (target_regsets): Likewise.
9437         * linux-xtensa-low.c (target_regsets): Likewise.
9438
9439         * linux-low.c: Include <sys/uio.h>.
9440         (regsets_fetch_inferior_registers): Support nt_type.
9441         (regsets_store_inferior_registers): Likewise.
9442         (linux_process_qsupported): New.
9443         (linux_target_ops): Add linux_process_qsupported.
9444
9445         * linux-low.h (regset_info): Add nt_type.
9446         (linux_target_ops): Add process_qsupported.
9447
9448         * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
9449         and <sys/uio.h>.
9450         (init_registers_i386_avx_linux): New.
9451         (init_registers_amd64_avx_linux): Likewise.
9452         (xmltarget_i386_linux_no_xml): Likewise.
9453         (xmltarget_amd64_linux_no_xml): Likewise.
9454         (PTRACE_GETREGSET): Likewise.
9455         (PTRACE_SETREGSET): Likewise.
9456         (x86_fill_xstateregset): Likewise.
9457         (x86_store_xstateregset): Likewise.
9458         (use_xml): Likewise.
9459         (x86_linux_update_xmltarget): Likewise.
9460         (x86_linux_process_qsupported): Likewise.
9461         (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
9462         (x86_arch_setup): Don't call init_registers_amd64_linux nor
9463         init_registers_i386_linux here.  Call
9464         x86_linux_update_xmltarget.
9465         (the_low_target): Add x86_linux_process_qsupported.
9466
9467         * server.c (handle_query): Call target_process_qsupported.
9468
9469         * target.h (target_ops): Add process_qsupported.
9470         (target_process_qsupported): New.
9471
9472 2010-04-03  Pedro Alves  <pedro@codesourcery.com>
9473
9474         * inferiors.c (add_thread): Set last_status kind to
9475         TARGET_WAITKIND_IGNORE.
9476         * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
9477         fetch.  Use ptid_of.  Avoid unnecessary get_lwp_thread calls.
9478         (linux_wait_1): Move `thread' local definition to block that uses
9479         it.  Don't NULL initialize `event_child'.
9480         (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
9481         Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
9482         * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
9483
9484 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
9485
9486         * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
9487         an extended waitstatus, or by a watchpoint.
9488         (cancel_breakpoints_callback): Don't cancel a breakpoint if the
9489         thread was stepping or has been stopped by a watchpoint.
9490
9491 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
9492
9493         * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
9494         (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
9495         of another, then delete the previous, and validate all
9496         breakpoints.
9497         (validate_inserted_breakpoint): New.
9498         (delete_disabled_breakpoints): New.
9499         (validate_breakpoints): New.
9500         (check_mem_read): Validate breakpoints before trusting their
9501         shadow.  Delete disabled breakpoints.
9502         (check_mem_write): Validate breakpoints before trusting they
9503         should be inserted.  Delete disabled breakpoints.
9504         * mem-break.h (validate_breakpoints):
9505         * server.c (handle_query): Validate breakpoints when we see a
9506         qSymbol query.
9507
9508 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
9509
9510         * linux-low.c (linux_wait_1): Avoid setting need_step_over is
9511         there's a GDB breakpoint at stop_pc.  Always report a trap to GDB
9512         if we could tell there's a GDB breakpoint at stop_pc.
9513         (need_step_over_p): Don't do a step over if we find a GDB
9514         breakpoint at the resume PC.
9515
9516         * mem-break.c (struct raw_breakpoint): New.
9517         (enum bkpt_type): New type `gdb_breakpoint'.
9518         (struct breakpoint): Delete the `PC', `old_data' and `inserted'
9519         fields.  New field `raw'.
9520         (find_raw_breakpoint_at): New.
9521         (set_raw_breakpoint_at): Handle refcounting.  Create a raw
9522         breakpoint instead.
9523         (set_breakpoint_at): Adjust.
9524         (delete_raw_breakpoint): New.
9525         (release_breakpoint): New.
9526         (delete_breakpoint): Rename to...
9527         (delete_breakpoint_1): ... this.  Add proc parameter.  Use
9528         release_breakpoint.  Return ENOENT.
9529         (delete_breakpoint): Reimplement.
9530         (find_breakpoint_at): Delete.
9531         (find_gdb_breakpoint_at): New.
9532         (delete_breakpoint_at): Delete.
9533         (set_gdb_breakpoint_at): New.
9534         (delete_gdb_breakpoint_at): New.
9535         (gdb_breakpoint_here): New.
9536         (set_reinsert_breakpoint): Use release_breakpoint.
9537         (uninsert_breakpoint): Rename to ...
9538         (uninsert_raw_breakpoint): ... this.
9539         (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
9540         (reinsert_raw_breakpoint): Change parameter type to
9541         raw_breakpoint.
9542         (reinsert_breakpoints_at): Adjust to handle raw breakpoints
9543         instead.
9544         (check_breakpoints): Adjust.  Use release_breakpoint.
9545         (breakpoint_here): Rewrite using find_raw_breakpoint_at.
9546         (breakpoint_inserted_here): Ditto.
9547         (check_mem_read): Adjust to iterate over raw breakpoints instead.
9548         Don't trust the breakpoint's shadow if it is not inserted.
9549         (check_mem_write): Adjust to iterate over raw breakpoints instead.
9550         (delete_all_breakpoints): Adjust.
9551         (free_all_breakpoints): Mark all breakpoints as uninserted, and
9552         use delete_breakpoint_1.
9553
9554         * mem-break.h (breakpoints_supported): Delete declaration.
9555         (set_gdb_breakpoint_at): Declare.
9556         (gdb_breakpoint_here): Declare.
9557         (delete_breakpoint_at): Delete.
9558         (delete_gdb_breakpoint_at): Declare.
9559
9560         * server.h (struct raw_breakpoint): Forward declare.
9561         (struct process_info): New field `raw_breakpoints'.
9562
9563         * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
9564         breakpoints.
9565
9566 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
9567
9568         * linux-low.c (status_pending_p_callback): Fix comment.
9569         (linux_wait_for_event_1): Move most of the internal breakpoint
9570         handling from here...
9571         (linux_wait_1): ... to here.
9572         (count_events_callback): New.
9573         (select_singlestep_lwp_callback): New.
9574         (select_event_lwp_callback): New.
9575         (cancel_breakpoints_callback): New.
9576         (select_event_lwp): New.
9577         (linux_wait_1): Simplify internal breakpoint handling.  Give equal
9578         priority to all LWPs that have had events that should be reported
9579         to the client.  Cancel breakpoints when about to reporting the
9580         event to the client, not while stopping lwps.  No longer cancel
9581         finished single-steps here.
9582         (cancel_finished_single_step): Delete.
9583         (cancel_finished_single_steps): Delete.
9584
9585 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
9586
9587         * mem-break.c (enum bkpt_type): New.
9588         (struct breakpoint): New field `type'.
9589         (set_breakpoint_at): Change return type to struct breakpoint
9590         pointer.  Set type to `other_breakpoint' by default.
9591         (delete_breakpoint): Rewrite, supporting more than one breakpoint
9592         in the breakpoint list.
9593         (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
9594         (reinsert_breakpoint): Rename to ...
9595         (reinsert_raw_breakpoint): ... this.
9596         (reinsert_breakpoints_at): Adjust.
9597         * mem-break.h (struct breakpoint): Declare.
9598         (set_breakpoint_at): Change return type to struct breakpoint
9599         pointer.
9600
9601 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
9602
9603         * server.c (handle_query): Assign, not compare.
9604
9605 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
9606
9607         Teach linux gdbserver to step-over-breakpoints.
9608
9609         * linux-low.c (can_hardware_single_step): New.
9610         (supports_breakpoints): New.
9611         (handle_extended_wait): If stopping threads, read the stop pc of
9612         the new cloned LWP.
9613         (get_pc): New.
9614         (get_stop_pc): Add `lwp' parameter.  Handle it.  Bail out if the
9615         low target doesn't support retrieving the PC.
9616         (add_lwp): Set last_resume_kind to resume_continue.
9617         (linux_attach_lwp_1): Adjust comments.  Always set stop_expected.
9618         (linux_attach): Don't clear stop_expected.  Set the lwp's
9619         last_resume_kind to resume_stop.
9620         (linux_detach_one_lwp): Don't check for removed breakpoints.
9621         (check_removed_breakpoint): Delete.
9622         (status_pending_p): Rename to ...
9623         (status_pending_p_callback): ... this.  Don't check for removed
9624         breakpoints.  Don't consider threads that are stopped from GDB's
9625         perspective.
9626         (linux_wait_for_lwp): Always read the stop_pc here.
9627         (cancel_breakpoint): New.
9628         (step_over_bkpt): New global.
9629         (linux_wait_for_event_1): Implement stepping over breakpoints.
9630         (gdb_wants_lwp_stopped): New.
9631         (gdb_wants_all_stopped): New.
9632         (linux_wait_1): Tag threads as gdb-wants-stopped.  Cancel finished
9633         single-step traps here.  Store the thread's last reported target
9634         wait status.
9635         (send_sigstop): Don't clear stop_expected.  Always set it,
9636         instead.
9637         (mark_lwp_dead): Remove reference to pending_is_breakpoint.
9638         (cancel_finished_single_step): New.
9639         (cancel_finished_single_steps): New.
9640         (wait_for_sigstop): Don't cancel finished single-step traps here.
9641         (linux_resume_one_lwp): Don't check for removed breakpoints.
9642         Don't set `step' on non-hardware step archs.
9643         (linux_set_resume_request): Ignore resume_stop requests if already
9644         stopping or stopped.  Set the lwp's last_resume_kind.
9645         (resume_status_pending_p): Don't check for removed breakpoints.
9646         (need_step_over_p): New.
9647         (start_step_over): New.
9648         (finish_step_over): New.
9649         (linux_resume_one_thread): Always queue a sigstop for resume_stop
9650         requests.  Clear the thread's last reported target waitstatus.
9651         Don't use the `suspended' flag.  Don't consider pending breakpoints.
9652         (linux_resume): Start a step-over if necessary.
9653         (proceed_one_lwp): New.
9654         (proceed_all_lwps): New.
9655         (unstop_all_lwps): New.
9656         * linux-low.h (struct lwp_info): Rewrite comment for the
9657         `suspended' flag.  Add the `stop_pc' field.  Delete the
9658         `pending_stop_pc' field.  Tweak the `stepping' flag's comment.
9659         Add `'last_resume_kind' and `need_step_over' fields.
9660         * inferiors.c (struct thread_info): Delete, moved elsewhere.
9661         * mem-break.c (struct breakpoint): Delete `reinserting' flag.
9662         Delete `breakpoint_to_reinsert' field.  New flag `inserted'.
9663         (set_raw_breakpoint_at): New.
9664         (set_breakpoint_at): Rewrite to use it.
9665         (reinsert_breakpoint_handler): Delete.
9666         (set_reinsert_breakpoint): New.
9667         (reinsert_breakpoint_by_bp): Delete.
9668         (delete_reinsert_breakpoints): New.
9669         (uninsert_breakpoint): Rewrite.
9670         (uninsert_breakpoints_at): New.
9671         (reinsert_breakpoint): Rewrite.
9672         (reinsert_breakpoints_at): New.
9673         (check_breakpoints): Rewrite.
9674         (breakpoint_here): New.
9675         (breakpoint_inserted_here): New.
9676         (check_mem_read): Adjust.
9677         * mem-break.h (breakpoints_supported, breakpoint_here)
9678         (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
9679         (reinsert_breakpoint_by_bp): Delete declaration.
9680         (delete_reinsert_breakpoints): Declare.
9681         (reinsert_breakpoint): Delete declaration.
9682         (reinsert_breakpoints_at): Declare.
9683         (uninsert_breakpoint): Delete declaration.
9684         (uninsert_breakpoints_at): Declare.
9685         (check_breakpoints): Adjust prototype.
9686         * server.h: Adjust include order.
9687         (struct thread_info): Declare here.  Add a `last_status' field.
9688
9689 2010-03-23  Michael Snyder  <msnyder@vmware.com>
9690
9691         * server.c (crc32): New function.
9692         (handle_query): Add handling for 'qCRC:' request.
9693
9694 2010-03-23  Pedro Alves  <pedro@codesourcery.com>
9695
9696         * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
9697         lwp had been stopped by a watchpoint.
9698
9699 2010-03-16  Pedro Alves  <pedro@codesourcery.com>
9700
9701         * server.h (internal_error): Declare.
9702         (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
9703         * utils.c (internal_error): New function.
9704
9705 2010-03-15  Andreas Schwab  <schwab@redhat.com>
9706
9707         * configure.srv: Fix typo setting srv_regobj.
9708
9709 2010-03-15  Pedro Alves  <pedro@codesourcery.com>
9710
9711         * linux-low.c (fetch_register): Avoid passing a non string literal
9712         format to `error'.
9713         (usr_store_inferior_registers): Ditto.
9714
9715 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
9716
9717         * linux-low.c (linux_write_memory): Bail out early if peeking
9718         memory failed.
9719
9720 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
9721
9722         * linux-low.h (struct lwp_info): New fields
9723         `stopped_by_watchpoint' and `stopped_data_address'.
9724         * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
9725         here, and cache them in the lwp object.
9726         (wait_for_sigstop): Check stopped_by_watchpoint lwp field
9727         directly.
9728         (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
9729         field.
9730         (linux_stopped_by_watchpoint): Rewrite.
9731         (linux_stopped_data_address): Rewrite.
9732
9733 2010-03-06  Simo Melenius  <simo.melenius@iki.fi>
9734
9735         * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
9736         switching the current inferior, not before.
9737
9738 2010-03-01  H.J. Lu  <hongjiu.lu@intel.com>
9739
9740         * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
9741         reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
9742         i386-linux.c and amd64-linux.c.
9743         (reg-i386.o): Removed.
9744         (reg-i386.c): Likewise.
9745         (reg-i386-linux.o): Likewise.
9746         (reg-i386-linux.c): Likewise.
9747         (reg-x86-64.o): Likewise.
9748         (reg-x86-64.c): Likewise.
9749         (reg-x86-64-linux.o): Likewise.
9750         (reg-x86-64-linux.c): Likewise.
9751         (i386.o): New.
9752         (i386.c): Likewise.
9753         (i386-linux.o): Likewise.
9754         (i386-linux.c): Likewise.
9755         (amd64.o): Likewise.
9756         (amd64.c): Likewise.
9757         (amd64-linux.o): Likewise.
9758         (amd64-linux.c): Likewise.
9759
9760         * configure.srv (srv_i386_regobj): New.
9761         (srv_i386_linux_regobj): Likewise.
9762         (srv_amd64_regobj): Likewise.
9763         (srv_amd64_linux_regobj): Likewise.
9764         (srv_i386_32bit_xmlfiles): Likewise.
9765         (srv_i386_64bit_xmlfiles): Likewise.
9766         (srv_i386_xmlfiles): Likewise.
9767         (srv_amd64_xmlfiles): Likewise.
9768         (srv_i386_linux_xmlfiles): Likewise.
9769         (srv_amd64_linux_xmlfiles): Likewise.
9770         (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj.  Set
9771         srv_xmlfiles to $srv_i386_xmlfiles.
9772         (i[34567]86-*-mingw32ce*): Likewise.
9773         (i[34567]86-*-mingw*): Likewise.
9774         (i[34567]86-*-nto*): Likewise.
9775         (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
9776         and $srv_amd64_linux_regobj.  Set srv_xmlfiles to
9777         $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
9778         (x86_64-*-linux*): Likewise.
9779
9780         * linux-x86-low.c (init_registers_x86_64_linux): Removed.
9781         (init_registers_amd64_linux): New.
9782         (x86_arch_setup): Replace init_registers_x86_64_linux with
9783         init_registers_amd64_linux.
9784
9785 2010-02-23  Maxim Kuvyrkov  <maxim@codesourcery.com>
9786
9787         * configure.ac: Check for libdl.  If it is not available link against
9788         static libthread_db.
9789         * configure: Regenerate.
9790
9791 2010-02-22  Pedro Alves  <pedro@codesourcery.com>
9792
9793         PR9605
9794
9795         * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
9796         handing a read watchpoint.
9797         (i386_low_insert_watchpoint): Read watchpoints aren't supported.
9798
9799 2010-02-12  Doug Evans  <dje@google.com>
9800
9801         * linux-low.c (linux_supports_tracefork_flag): Document.
9802         (linux_look_up_symbols): Add comment.
9803
9804 2010-02-03  H.J. Lu  <hongjiu.lu@intel.com>
9805
9806         * regcache.c (supply_register): Clear regcache if buf is NULL.
9807
9808 2010-02-02  Nicolas Roche  <roche@sourceware.org>
9809             Joel Brobecker  <brobecker@adacore.com>
9810
9811         * inferiors.c (find_inferior): Add function documentation.
9812         (unloaded_dll): Handle the case where the unloaded dll has not
9813         been previously registered in the dll list.
9814
9815 2010-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
9816
9817         * linux-arm-low.c (thumb_breakpoint_len): Delete.
9818         (thumb2_breakpoint): New.
9819         (arm_breakpoint_at): Check for Thumb-2 breakpoints.
9820
9821 2010-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
9822
9823         * linux-low.c (get_stop_pc): Check for SIGTRAP.
9824         (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
9825         breakpoints.
9826
9827 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
9828
9829         * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
9830
9831 2010-01-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
9832
9833         * linux-s390-low.c (s390_collect_ptrace_register)
9834         (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
9835
9836 2010-01-21  Doug Evans  <dje@google.com>
9837
9838         * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
9839         (PTRACE_ARG4_TYPE): New macro.
9840         (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
9841         (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
9842         (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
9843         (usr_store_inferior_registers): Ditto.
9844         (linux_read_memory, linux_write_memory): Ditto.
9845         (linux_test_for_tracefork): Ditto.
9846
9847         * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
9848         Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
9849
9850 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
9851
9852         * proc-service.c (ps_lgetregs): Don't refetch registers from the
9853         target.
9854
9855 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
9856
9857         * spu-low.c (spu_fetch_registers, spu_store_registers): Change
9858         prototype to take a regcache.  Adjust.
9859
9860 2010-01-20  Pedro Alves  <pedro@codesourcery.com>
9861
9862         * regcache.h (struct thread_info): Forward declare.
9863         (struct regcache): New.
9864         (new_register_cache): Adjust prototype.
9865         (get_thread_regcache): Declare.
9866         (free_register_cache): Adjust prototype.
9867         (registers_to_string, registers_from_string): Ditto.
9868         (supply_register, supply_register_by_name, collect_register)
9869         (collect_register_as_string, collect_register_by_name): Ditto.
9870         * regcache.c (struct inferior_regcache_data): Delete.
9871         (get_regcache): Rename to ...
9872         (get_thread_regcache): ... this.  Adjust.  Switch inferior before
9873         fetching registers.
9874         (regcache_invalidate_one): Adjust.
9875         (regcache_invalidate): Fix prototype.
9876         (new_register_cache): Return the new register cache.
9877         (free_register_cache): Change prototype.
9878         (realloc_register_cache): Adjust.
9879         (registers_to_string): Change prototype to take a regcache.  Adjust.
9880         (registers_from_string): Ditto.
9881         (register_data): Ditto.
9882         (supply_register): Ditto.
9883         (supply_register_by_name): Ditto.
9884         (collect_register): Ditto.
9885         (collect_register_as_string): Ditto.
9886         (collect_register_by_name): Ditto.
9887         * server.c (process_serial_event): Adjust.
9888         * linux-low.h (regset_fill_func, regset_store_func): Change
9889         prototype.
9890         (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
9891         Change prototype.
9892         * linux-low.c (get_stop_pc): Adjust.
9893         (check_removed_breakpoint): Adjust.
9894         (linux_wait_for_event): Adjust.
9895         (linux_resume_one_lwp): Adjust.
9896         (fetch_register): Add regcache parameter.  Adjust.
9897         (usr_store_inferior_registers): Ditto.
9898         (regsets_fetch_inferior_registers): Ditto.
9899         (regsets_store_inferior_registers): Ditto.
9900         (linux_fetch_registers, linux_store_registers): Ditto.
9901         * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
9902         regcache.  Adjust.
9903         (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
9904         Ditto.
9905         * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
9906         prototype to take a regcache.
9907         (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
9908         * remote-utils.c (convert_ascii_to_int, outreg)
9909         (prepare_resume_reply): Change prototype to take a regcache.
9910         Adjust.
9911         * target.h (struct target_ops) <fetch_registers, store_registers>:
9912         Change prototype to take a regcache.
9913         (fetch_inferior_registers, store_inferior_registers): Change
9914         prototype to take a regcache.  Adjust.
9915         * proc-service.c (ps_lgetregs): Adjust.
9916         * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
9917         (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
9918         (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
9919         take a regcache.  Adjust.
9920         * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
9921         (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
9922         (arm_store_vfpregset, arm_get_pc, arm_set_pc):
9923         (arm_breakpoint_at): Change prototype to take a regcache.  Adjust.
9924         * linux-cris-low.c (cris_get_pc, cris_set_pc)
9925         (cris_cannot_fetch_register):
9926         (cris_breakpoint_at): Change prototype to take a regcache.
9927         Adjust.
9928         * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
9929         cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
9930         to take a regcache.  Adjust.
9931         (cris_breakpoint_at, cris_insert_point, cris_remove_point):
9932         Adjust.
9933         * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
9934         take a regcache.  Adjust.
9935         * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
9936         (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
9937         (m68k_set_pc): Change prototype to take a regcache.  Adjust.
9938         * linux-mips-low.c (mips_get_pc):
9939         (mips_set_pc): Change prototype to take a regcache.  Adjust.
9940         (mips_reinsert_addr): Adjust.
9941         (mips_collect_register): Change prototype to take a regcache.
9942         Adjust.
9943         (mips_supply_register):
9944         (mips_collect_register_32bit, mips_supply_register_32bit)
9945         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9946         (mips_store_fpregset): Ditto.
9947         * linux-ppc-low.c (ppc_supply_ptrace_register)
9948         (ppc_supply_ptrace_register): Ditto.
9949         (parse_spufs_run): Adjust.
9950         (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9951         (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9952         (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9953         take a regcache.  Adjust.
9954         * linux-s390-low.c (s390_collect_ptrace_register)
9955         (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9956         (s390_set_pc): Change prototype to take a regcache.  Adjust.
9957         (s390_arch_setup): Adjust.
9958         * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9959         (sh_fill_gregset): Change prototype to take a regcache.  Adjust.
9960         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9961         (sparc_fill_gregset, sparc_store_gregset_from_stack)
9962         (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9963         regcache.  Adjust.
9964         (sparc_breakpoint_at): Adjust.
9965         * linux-xtensa-low.c (xtensa_fill_gregset):
9966         (xtensa_store_gregset):
9967         (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9968         (xtensa_set_pc): Change prototype to take a regcache.  Adjust.
9969         * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9970         prototype to take a regcache.  Adjust.
9971         * win32-arm-low.c (arm_fetch_inferior_register)
9972         (arm_store_inferior_register): Change prototype to take a
9973         regcache.  Adjust.
9974         * win32-i386-low.c (i386_fetch_inferior_register)
9975         (i386_store_inferior_register): Change prototype to take a
9976         regcache.  Adjust.
9977         * win32-low.c (child_fetch_inferior_registers)
9978         (child_store_inferior_registers): Change prototype to take a
9979         regcache.  Adjust.
9980         (win32_wait): Adjust.
9981         (win32_fetch_inferior_registers): Change prototype to take a
9982         regcache.  Adjust.
9983         (win32_store_inferior_registers): Adjust.
9984         * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9985         store_inferior_register>: Change prototype to take a regcache.
9986
9987 2010-01-20  Doug Evans  <dje@google.com>
9988
9989         * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9990         #ifdef.
9991         (linux_wait_for_event1, linux_init_signals): Ditto.
9992         (W_STOPCODE): Provide definition if missing.
9993
9994 2010-01-13  Vladimir Prus  <vladimir@codesourcery.com>
9995
9996         * linux-low.c (linux_core_of_thread): New.
9997         (compare_ints, show_process, list_threads): New.
9998         (linux_qxfer_osdata): Report threads and cores.
9999         (linux_target_op): Register linux_core_of_thread.
10000         * remote-utils.c (prepare_resume_reply): Report the core.
10001         (buffer_xml_printf): Support %d specifier.
10002         * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
10003         New.
10004         (handle_query): Handle qXfer:threads.  Announce availability
10005         thereof.
10006         * target.h (struct target_ops): New field core_of_thread.
10007
10008 2010-01-04  Ulrich Weigand  <uweigand@de.ibm.com>
10009
10010         * Makefile.in (clean): Remove new generated files.
10011         (reg-s390.o, reg-s390.c): Remove rules.
10012         (reg-s390x.o, reg-s390x.c): Likewise.
10013         (s390-linux32.o, s390-linux32.c): Add rules.
10014         (s390-linux64.o, s390-linux64.c): Likewise.
10015         (s390x-linux64.o, s390x-linux64.c): Likewise.
10016         * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
10017         * linux-s390-low.c: Include <elf.h>.
10018         (HWCAP_S390_HIGH_GPRS): Define if undefined.
10019         (init_registers_s390): Remove prototype.
10020         (init_registers_s390x): Likewise.
10021         (init_registers_s390_linux32): Add prototype.
10022         (init_registers_s390_linux64): Likewise.
10023         (init_registers_s390x_linux64): Likewise.
10024         (s390_num_regs_3264): New define.
10025         (s390_regmap_3264): New global variable.
10026         (s390_cannot_fetch_register): Remove obsolete check.
10027         (s390_cannot_store_register): Likewise.
10028         (s390_collect_ptrace_register): Handle upper/lower register halves.
10029         (s390_supply_ptrace_register): Likewise.
10030         (s390_fill_gregset): Update to register number changes.
10031         (s390_get_hwcap): New routine.
10032         (s390_arch_setup): Detect 32-bit process running on 64-bit system.
10033         Install appropriate regmap and register set.
10034
10035 2010-01-01  Joel Brobecker  <brobecker@adacore.com>
10036
10037         * server.c (gdbserver_version): Update copyright year to 2010.
10038         * gdbreplay.c (gdbreplay_version): Likewise.
10039
10040 2009-12-28  Doug Evans  <dje@google.com>
10041
10042         * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
10043         elf/external.h.  Include <elf.h> instead but only if necessary.
10044
10045 2009-12-28  Pedro Alves  <pedro@codesourcery.com>
10046
10047         * linux-low.c (linux_remove_process): Remove `detaching'
10048         parameter.  Don't release/detach from thread_db here.
10049         (linux_kill): Release/detach from thread_db here, ...
10050         (linux_detach): ... and here, before actually detaching.
10051         (linux_wait_1): ... and here, when a process exits.
10052         * thread-db.c (any_thread_of): New.
10053         (thread_db_free): Switch the current inferior to a thread of the
10054         passed in process.
10055
10056 2009-12-21  Doug Evans  <dje@google.com>
10057
10058         * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
10059
10060         * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
10061         Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
10062         warning ifndef __NR_tkill.  Move setting of errno there too.
10063         Delete unnecessary resetting of errno after syscall.
10064         Minor comment changes to match gdb/linux-nat.c:kill_lwp.
10065
10066         * configure.ac: Check for dladdr.
10067         * config.in: Regenerate.
10068         * configure: Regenerate.
10069         * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
10070         (try_thread_db_load): Update.
10071
10072         * linux-low.c (my_waitpid): Delete unnecessary prototype.
10073
10074 2009-12-18  Doug Evans  <dje@google.com>
10075
10076         * event-loop.c: Include unistd.h if it exists.
10077
10078         * linux-low.c (my_waitpid): Move definition away from being in
10079         between linux_tracefork_child/linux_test_for_tracefork.
10080
10081         * gdb_proc_service.h (psaddr_t): Fix type.
10082         * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
10083         signature to match glibc.
10084
10085 2009-12-16  Doug Evans  <dje@google.com>
10086
10087         * linux-low.c (linux_read_memory): Fix argument to read.
10088
10089 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
10090
10091         * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
10092         events, don't leave current_inferior pointing at null.
10093
10094 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
10095
10096         * win32-low.c (LOG): Delete.
10097         (OUTMSG): Output to stderr.
10098         (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
10099         on compile time LOG macro.
10100         (win32_wait): Fix debug output.
10101
10102 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
10103
10104         * win32-low.c (win32_add_one_solib): If the dll name is
10105         "ntdll.dll", prepend the system directory to the dll path.
10106
10107 2009-11-17  Daniel Jacobowitz  <dan@codesourcery.com>
10108
10109         * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
10110
10111 2009-11-17  Nathan Sidwell  <nathan@codesourcery.com>
10112             Vladimir Prus  <vladimir@codesourcery.com>
10113
10114         * Makefile.in (reg-cf.o, reg-cf.c): New targets.
10115         * configure.ac: Check for __mcoldfire__ and set
10116         gdb_cv_m68k_is_coldfire.
10117         * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
10118         reg-cf.o and reg-m68k.o.
10119         * configure: Regenerated.
10120
10121 2009-11-16  Pedro Alves  <pedro@codesourcery.com>
10122
10123         * linux-low.c (linux_remove_process): Add `detaching' parameter.
10124         Pass it to thread_db_free.
10125         (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
10126         proper `detaching' argument to linux_remove_process.
10127         * linux-low.h (thread_db_free): Add `detaching' parameter.
10128         * thread-db.c (thread_db_init): Pass false as `detaching' argument
10129         to thread_db_free.
10130         (thread_db_free): Add `detaching' parameter.  Only
10131         call td_ta_clear_event if detaching from process.
10132
10133 2009-11-12  Maxim Kuvyrkov  <maxim@codesourcery.com>
10134
10135         * thread-db.c (thread_db_free): Fix typo.
10136
10137 2009-11-11  Paul Pluzhnikov  <ppluzhnikov@google.com>
10138
10139         PR gdb/10838
10140         * thread-db.c (thread_db_free): Call td_ta_clear_event.
10141
10142 2009-11-03  Nathan Sidwell  <nathan@codesourcery.com>
10143
10144         * configure.ac (i[34567]86-*): Check if we're targetting x86-64
10145         with an i686 compiler.
10146         * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
10147         needed.
10148         * configure: Rebuilt.
10149
10150 2009-10-29  Sandra Loosemore  <sandra@codesourcery.com>
10151
10152         PR gdb/10783
10153
10154         * server.c (handle_search_memory_1): Correct read_addr initialization
10155         in loop for searching subsequent chunks.
10156
10157 2009-10-29  Paul Pluzhnikov  <ppluzhnikov@google.com>
10158
10159         * configure.ac: New --with-libthread-db option.
10160         * thread-db.c: Allow direct dependence on libthread_db.
10161         (thread_db_free): Adjust.
10162         * config.in: Regenerate.
10163         * configure: Likewise.
10164
10165 2009-10-28  Paul Pluzhnikov  <ppluzhnikov@google.com>
10166
10167         PR gdb/10757
10168         * thread-db.c (attach_thread): New function.
10169         (maybe_attach_thread): Return success/failure.
10170         (find_new_threads_callback): Adjust.
10171         (thread_db_find_new_threads): Loop until no new threads.
10172
10173 2009-10-13  Pedro Alves  <pedro@codesourcery.com>
10174
10175         * proc-service.c (ps_lgetregs): Formatting.
10176
10177 2009-10-08  Paul Pluzhnikov  <ppluzhnikov@google.com>
10178
10179         * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
10180         * configure.ac: Adjust.
10181         * linux-low.h (struct process_info_private): Move members to struct
10182         thread_db.
10183         (thread_db_free, thread_db_handle_monitor_command): New prototype.
10184         * linux-low.c (linux_remove_process): Adjust.
10185         (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
10186         * server.c (handle_query): Move code ...
10187         (handle_monitor_command): ... here. New function.
10188         * target.h (struct target_ops): New member.
10189         * thread-db.c (struct thread_db): New.
10190         (libthread_db_search_path): New variable.
10191         (thread_db_create_event, thread_db_enable_reporting)
10192         (find_one_thread, maybe_attach_thread, find_new_threads_callback)
10193         (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
10194         (try_thread_db_load_1, dladdr_to_soname): New functions.
10195         (try_thread_db_load, thread_db_load_search): New functions.
10196         (thread_db_init): Search for libthread_db.
10197         (thread_db_free): New function.
10198         (thread_db_handle_monitor_command): Likewise.
10199         * config.in: Regenerate.
10200         * configure: Regenerate.
10201
10202 2009-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
10203
10204         * spu-low.c (spu_kill): Wait for inferior to terminate.
10205         Call clear_inferiors.
10206         (spu_detach): Call clear_inferiors.
10207
10208 2009-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10209
10210         * aclocal.m4: Regenerate.
10211         * config.in: Likewise.
10212         * configure: Likewise.
10213
10214 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
10215
10216         * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
10217         (parse_spufs_run): New function.
10218         (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
10219         (ppc_breakpoint_at): Handle SPU breakpoints.
10220
10221 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
10222
10223         * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
10224         (SPUFS_MAGIC): Define.
10225         (spu_enumerate_spu_ids): New function.
10226         (linux_qxfer_spu): New function.
10227         (linux_target_ops): Install linux_qxfer_spu.
10228
10229 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
10230
10231         * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
10232         and powerpc-cell64l.o to srv_regobj.  Add rs6000/powerpc-cell32l.xml
10233         and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
10234         * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
10235         (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
10236         (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
10237         * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
10238         (init_registers_powerpc_cell32l): Add prototype.
10239         (init_registers_powerpc_cell64l): Likewise.
10240         (ppc_arch_setup): Detect Cell/B.E. architecture.
10241
10242 2009-07-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10243
10244         * Makefile.in (datarootdir): New variable.
10245
10246 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
10247
10248         * linux-low.c (linux_write_memory): Update debugging output.
10249         * Makefile.in (clean): Add new descriptions.
10250         (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
10251         (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
10252         * configure.srv: Add new files for arm*-*-linux*.
10253         * linux-arm-low.c: Add new declarations.
10254         (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
10255         (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
10256         (HWCAP_VFPv3D16): New.
10257         (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
10258         instead of __IWMMXT__.
10259         (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
10260         (arm_arch_setup): New.
10261         (target_regsets): Remove #ifdef.  Add VFP regset.
10262         (the_low_target): Use arm_arch_setup.
10263
10264 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
10265
10266         * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
10267         the main thread again.
10268
10269 2009-07-06  Aleksandar Ristovski  <aristovski@qnx.com>
10270
10271         Adding Neutrino gdbserver.
10272         * configure: Regenerated.
10273         * configure.ac: Add case for srv_qnx and set LIBS accordingly.
10274         * configure.srv (i[34567]86-*-nto*): New target.
10275         * nto-low.c, nto-low.h, nto-x86-low.c: New files.
10276         * remote-utils.c [__QNX__]: Include sys/iomgr.h
10277         (nto_comctrl) [__QNX__]: New function.
10278         (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
10279
10280 2009-07-05  Danny Backx  <dannybackx@users.sourceforge.net>
10281
10282         * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
10283         srv_tgtobj.
10284
10285 2009-07-04  Danny Backx  <dannybackx@users.sourceforge.net>
10286             Pedro Alves  <pedro@codesourcery.com>
10287
10288         * win32-i386-low.c (i386_get_thread_context): Handle systems that
10289         don't support CONTEXT_EXTENDED_REGISTERS.
10290         (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
10291         (the_low_target): Install them.
10292         * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
10293         failing with ERROR_PIPE_NOT_CONNECTED.
10294
10295 2009-06-30  Doug Evans  <dje@google.com>
10296             Pierre Muller  <muller@ics.u-strasbg.fr>
10297
10298         Add h/w watchpoint support to x86-linux, win32-i386.
10299         * Makefile.in (SFILES): Add i386-low.c
10300         (i386_low_h): Define.
10301         (i386-low.o): Add dependencies.
10302         (linux-x86-low.o): Add i386-low.h dependency.
10303         (win32-i386-low.o): Ditto.
10304         * i386-low.c: New file.
10305         * i386-low.h: New file.
10306         * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
10307         (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
10308         * linux-low.c (linux_add_process): Initialize arch_private.
10309         (linux_remove_process): Free arch_private.
10310         (add_lwp): Initialize arch_private.
10311         (delete_lwp): Free arch_private.
10312         (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
10313         provided.
10314         * linux-low.h (process_info_private): New member arch_private.
10315         (lwp_info): New member arch_private.
10316         (linux_target_ops): New members new_process, new_thread,
10317         prepare_to_resume.
10318         (ptid_of): New macro.
10319         * linux-x86-low.c: Include stddef.h, i386-low.h.
10320         (arch_process_info): New struct.
10321         (arch_lwp_info): New struct.
10322         (x86_linux_dr_get, x86_linux_dr_set): New functions.
10323         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10324         (i386_dr_low_get_status): New function.
10325         (x86_insert_point, x86_remove_point): New functions.
10326         (x86_stopped_by_watchpoint): New function.
10327         (x86_stopped_data_address): New function.
10328         (x86_linux_new_process, x86_linux_new_thread): New functions.
10329         (x86_linux_prepare_to_resume): New function.
10330         (the_low_target): Add entries for insert_point, remove_point,
10331         stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
10332         prepare_to_resume.
10333         * server.c (debug_hw_points): New global.
10334         (monitor_show_help): Document set debug-hw-points.
10335         (handle_query): Process "set debug-hw-points".
10336         * server.h (debug_hw_points): Declare.
10337         (paddress): Declare.
10338         * utils.c (NUMCELLS, CELLSIZE): New macros.
10339         (get_sell, xsnprintf, paddress): New functions.
10340         * win32-arm-low.c (the_low_target): Add entries for insert_point,
10341         remove_point, stopped_by_watchpoint, stopped_data_address.
10342         * win32-i386-low.c: Include i386-low.h.
10343         (debug_reg_state): Replaces dr.
10344         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10345         (i386_dr_low_get_status): New function.
10346         (i386_insert_point, i386_remove_point): New functions.
10347         (i386_stopped_by_watchpoint): New function.
10348         (i386_stopped_data_address): New function.
10349         (i386_initial_stuff): Update.
10350         (get_thread_context,set_thread_context,i386_thread_added): Update.
10351         (the_low_target): Add entries for insert_point,
10352         remove_point, stopped_by_watchpoint, stopped_data_address.
10353         * win32-low.c (win32_insert_watchpoint): New function.
10354         (win32_remove_watchpoint): New function.
10355         (win32_stopped_by_watchpoint): New function.
10356         (win32_stopped_data_address): New function.
10357         (win32_target_ops): Add entries for insert_watchpoint,
10358         remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
10359         * win32-low.h (win32_target_ops): New members insert_point,
10360         remove_point, stopped_by_watchpoint, stopped_data_address.
10361
10362 2009-06-25  Pedro Alves  <pedro@codesourcery.com>
10363
10364         * server.c (process_serial_event): Re-return unsupported, not
10365         error, if the type isn't recognized.  Re-allow supporting only
10366         insert or remove packets.  Also call require_running for
10367         breakpoints.  Add missing break statement to default case.  Tidy.
10368         * target.h (struct target_ops): Rename insert_watchpoint to
10369         insert_point, and remove_watchpoint to remove_point.
10370
10371         * linux-low.h (struct linux_target_ops): Likewise.
10372         * linux-low.c (linux_insert_watchpoint): Rename to ...
10373         (linux_insert_point): ... this.  Adjust.
10374         (linux_remove_watchpoint): Rename to ...
10375         (linux_remove_point): ... this.  Adjust.
10376         (linux_target_ops): Adjust.
10377         * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
10378         (cris_insert_point): ... this.
10379         (cris_remove_watchpoint): Rename to ...
10380         (cris_remove_point): ... this.
10381         (the_low_target): Adjust.
10382
10383 2009-06-24  Pierre Muller  <muller@ics.u-strasbg.fr>
10384
10385         * server.c (handle_v_kill): Pass signal_pid to
10386         kill_inferior if multi_process is zero.
10387
10388 2009-06-23  Aleksandar Ristovski  <aristovski@qnx.com>
10389
10390         * server.c (process_serial_event): Add support for Z0 and Z1 packet.
10391         * target.h (target_ops): Comment for *_watchpoint to make it clear
10392         the functions can get types '0' and '1'.
10393
10394 2009-06-22  Aleksandar Ristovski  <aristovski@qnx.com>
10395
10396         * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
10397         * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
10398         * regcache.c (get_regcache): Likewise.
10399         * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
10400         * win32-low.c (child_fetch_inferior_registers): Remove check for
10401         regno 0.
10402
10403 2009-06-19  Aleksandar Ristovski  <aristovski@qnx.com>
10404             Pedro Alves <pedro@codesourcery.com>
10405
10406         * target.h (struct target_ops) <supports_multi_process>: New
10407         callback.
10408         (target_supports_multi_process): New.
10409         * server.c (handle_query): Even if GDB reports support, only
10410         enable multi-process if the target also supports it.  Report
10411         multi-process support only if the target backend supports it.
10412         * linux-low.c (linux_supports_multi_process): New function.
10413         (linux_target_ops): Install it as target_supports_multi_process
10414         callback.
10415
10416 2009-05-24  Doug Evans  <dje@google.com>
10417
10418         Global renaming of find_thread_pid to find_thread_ptid.
10419         * server.h (find_thread_ptid): Renamed from find_thread_pid.
10420         * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
10421         All callers updated.
10422
10423         * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
10424         to resume the newly created thread, don't call ptrace (PTRACE_CONT)
10425         directly.
10426
10427         * linux-low.c (get_stop_pc): Print pc if debug_threads.
10428         (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
10429         (linux_resume_one_lwp): Ditto.
10430
10431 2009-05-23  Doug Evans  <dje@google.com>
10432
10433         * linux-low.c (linux_resume_one_lwp): Change type of first arg
10434         from struct inferior_list_entry * to struct lwp_info *.
10435         All callers updated.
10436
10437 2009-05-13  Doug Evans  <dje@google.com>
10438
10439         * linux-x86-low.c: Don't include assert.h.
10440         (x86_siginfo_fixup): Use fatal, not assert.
10441         (x86_arch_setup): Fix comment.
10442
10443 2009-05-12  Doug Evans  <dje@google.com>
10444
10445         Biarch support for i386/amd64 gdbserver.
10446         * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
10447         Add linux-x86-low.c.
10448         (linux-i386-low.o, linux-x86-64-low.o): Delete.
10449         (linux-x86-low.o): Add.
10450         * linux-x86-64-low.c: Delete.
10451         * linux-i386-low.c: Delete.
10452         * linux-x86-low.c: New file.
10453         * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
10454         linux-x86-low.o.
10455         (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
10456         linux-x86-low.o.
10457         (x86_64-linux srv_regobj): Add reg-i386-linux.o.
10458         * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
10459         (linux_child_pid_to_exec_file): New function.
10460         (elf_64_header_p, elf_64_file_p): New functions.
10461         (siginfo_fixup): New function.
10462         (linux_xfer_siginfo): New local inf_siginfo.  Call siginfo_fixup to
10463         give target a chance to convert layout.
10464         * linux-low.h (linux_target_ops): New member siginfo_fixup.
10465         (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
10466
10467 2009-05-07  Doug Evans  <dje@google.com>
10468
10469         * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
10470         (regsets_store_inferior_registers): Ditto.
10471
10472 2009-05-06  Pedro Alves  <pedro@codesourcery.com>
10473
10474         PR server/10048
10475
10476         * linux-low.c (must_set_ptrace_flags): Delete.
10477         (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
10478         of the global.
10479         (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here.  Set
10480         `lwp->must_set_ptrace_flags' instead.
10481         (linux_wait_for_event_1): Set ptrace options here.
10482         (linux_wait_1): ... not here.
10483
10484 2009-04-30  Doug Evans  <dje@google.com>
10485
10486         * inferiors.c (started_inferior_callback): New function.
10487         (attached_inferior_callback): New function.
10488         (have_started_inferiors_p, have_attached_inferiors_p): New functions.
10489         * server.c (print_started_pid, print_attached_pid): New functions.
10490         (detach_or_kill_for_exit): New function.
10491         (main): Call it instead of for_each_inferior (kill_inferior_callback).
10492         * server.h (have_started_inferiors_p): Declare.
10493         (have_attached_inferiors_p): Declare.
10494
10495         * inferiors.c (remove_process): Fix memory leak, free process.
10496         * linux-low.c (linux_remove_process): New function.
10497         (linux_kill): Call it instead of remove_process.
10498         (linux_detach, linux_wait_1): Ditto.
10499
10500 2009-04-19  Danny Backx  <dannybackx@users.sourceforge.net>
10501
10502         * configure.srv: Add x86 Windows CE target.
10503
10504 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
10505
10506         * inferiors.c (get_thread_process): Make global.
10507         * server.h (get_thread_process): Add prototype.
10508         * thread-db.c (find_one_thread): Use get_thread_process
10509         instead of current_process.
10510         (thread_db_get_tls_address): Do not crash if called when
10511         thread layer is not yet initialized.
10512
10513 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
10514
10515         * remote-utils.c (prepare_resume_reply): Null-terminate packet.
10516         * spu-low.c (current_tid): Rename to ...
10517         (current_ptid): ... this.
10518         (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
10519         spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
10520         ptid_get_lwp (current_ptid) instead of current_tid.
10521         (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
10522         instead of current_tid.  Use find_process_pid to verify pid
10523         argument is valid.  Pass proper argument to remove_process.
10524         (spu_thread_alive): Compare current_ptid instead of current_tid.
10525         (spu_resume): Likewise.
10526
10527 2009-04-02  Pedro Alves  <pedro@codesourcery.com>
10528
10529         * linux-low.c (usr_store_inferior_registers): Declare local `pid'
10530         variable.
10531
10532 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
10533
10534         Implement the multiprocess extensions, and add linux multiprocess
10535         support.
10536
10537         * server.h (ULONGEST): Declare.
10538         (struct ptid, ptid_t): New.
10539         (minus_one_ptid, null_ptid): Declare.
10540         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10541         (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
10542         (struct inferior_list_entry): Change `id' type from unsigned from
10543         to ptid_t.
10544         (struct sym_cache, struct breakpoint, struct
10545         process_info_private): Forward declare.
10546         (struct process_info): Declare.
10547         (current_process): Declare.
10548         (all_processes): Declare.
10549         (initialize_inferiors): Declare.
10550         (add_thread): Adjust to use ptid_t.
10551         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
10552         (add_process, remove_process, find_thread_pid): Declare.
10553         (find_inferior_id): Adjust to use ptid_t.
10554         (cont_thread, general_thread, step_thread): Change type to ptid_t.
10555         (multi_process): Declare.
10556         (push_event): Adjust to use ptid_t.
10557         (read_ptid, write_ptid): Declare.
10558         (prepare_resume_reply): Adjust to use ptid_t.
10559         (clear_symbol_cache): Declare.
10560         * inferiors.c (all_processes): New.
10561         (null_ptid, minus_one_ptid): New.
10562         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10563         (ptid_get_tid, ptid_equal, ptid_is_pid): New.
10564         (add_thread): Change unsigned long to ptid.  Remove gdb_id
10565         parameter.  Adjust.
10566         (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
10567         (gdb_id_to_thread): Rename to ...
10568         (find_thread_pid): ... this.  Change unsigned long to ptid.
10569         (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
10570         (loaded_dll, pull_pid_from_list): Adjust.
10571         (add_process, remove_process, find_process_pid)
10572         (get_thread_process, current_process, initialize_inferiors): New.
10573         * target.h (struct thread_resume) <thread>: Change type to ptid_t.
10574         (struct target_waitstatus) <related_pid>: Ditto.
10575         (struct target_ops) <kill, detach>: Add `pid' argument.  Change
10576         return type to int.
10577         (struct target_ops) <join>: Add `pid' argument.
10578         (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
10579         (struct target_ops) <wait>: Add `ptid' field.  Change return type
10580         to ptid.
10581         (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
10582         (mywait): Add `ptid' argument.  Change return type to ptid_t.
10583         (target_pid_to_str): Declare.
10584         * target.c (set_desired_inferior): Adjust to use ptids.
10585         (mywait): Add new `ptid' argument.  Adjust.
10586         (target_pid_to_str): New.
10587         * mem-break.h (free_all_breakpoints): Declare.
10588         * mem-break.c (breakpoints): Delelete.
10589         (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
10590         (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
10591         to use per-process breakpoint list.
10592         (free_all_breakpoints): New.
10593         * remote-utils.c (struct sym_cache) <name>: Drop `const'.
10594         (symbol_cache, all_symbols_looked_up): Delete.
10595         (hexchars): New.
10596         (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
10597         read_ptid): New.
10598         (prepare_resume_reply): Change ptid argument's type from unsigned
10599         long to ptid_t.  Adjust.  Implement W;process and X;process.
10600         (free_sym_cache, clear_symbol_cache): New.
10601         (look_up_one_symbol): Adjust to per-process symbol cache.  *
10602         * server.c (cont_thread, general_thread, step_thread): Change type
10603         to ptid_t.
10604         (attached): Delete.
10605         (multi_process): New.
10606         (last_ptid): Change type to ptid_t.
10607         (struct vstop_notif) <ptid>: Change type to ptid_t.
10608         (queue_stop_reply, push_event): Change `ptid' argument's type to
10609         ptid_t.
10610         (discard_queued_stop_replies): Add `pid' argument.
10611         (start_inferior): Adjust to use ptids.  Adjust to mywait interface
10612         changes.  Don't reference the `attached' global.
10613         (attach_inferior): Adjust to mywait interface changes.
10614         (handle_query): Adjust to use ptids.  Parse GDB's qSupported
10615         features.  Handle and report "multiprocess+".  Handle
10616         "qAttached:PID".
10617         (handle_v_cont): Adjust to use ptids.  Adjust to mywait interface
10618         changes.
10619         (handle_v_kill): New.
10620         (handle_v_stopped): Adjust to use target_pid_to_str.
10621         (handle_v_requests): Allow multiple attaches and runs when
10622         multiprocess extensions are in effect.  Handle "vKill".
10623         (myresume): Adjust to use ptids.
10624         (queue_stop_reply_callback): Add `arg' parameter.  Handle it.
10625         (handle_status): Adjust to discard_queued_stop_replies interface
10626         change.
10627         (first_thread_of, kill_inferior_callback)
10628         (detach_or_kill_inferior_callback, join_inferiors_callback): New.
10629         (main): Call initialize_inferiors.  Adjust to use ptids, killing
10630         and detaching from all inferiors.  Handle multiprocess packet
10631         variants.
10632         * linux-low.h: Include gdb_proc_service.h.
10633         (struct process_info_private): New.
10634         (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
10635         <lwpid_of>: Use ptid_get_lwp.
10636         (get_lwp_thread): Adjust.
10637         (struct lwp_info): Add `dead' member.
10638         (find_lwp_pid): Declare.
10639         * linux-low.c (thread_db_active): Delete.
10640         (new_inferior): Adjust comment.
10641         (inferior_pid): Delete.
10642         (linux_add_process): New.
10643         (handle_extended_wait): Adjust.
10644         (add_lwp): Change unsigned long to ptid.
10645         (linux_create_inferior): Add process to processes table.  Adjust
10646         to use ptids.  Don't set new_inferior here.
10647         (linux_attach_lwp): Rename to ...
10648         (linux_attach_lwp_1): ... this.  Add `initial' argument.  Handle
10649         it.  Adjust to use ptids.
10650         (linux_attach_lwp): New.
10651         (linux_attach): Add process to processes table.  Don't set
10652         new_inferior here.
10653         (struct counter): New.
10654         (second_thread_of_pid_p, last_thread_of_process_p): New.
10655         (linux_kill_one_lwp): Add `args' parameter.  Handle it.  Adjust to
10656         multiple processes.
10657         (linux_kill): Add `pid' argument.  Handle it.  Adjust to multiple
10658         processes.  Remove process from process table.
10659         (linux_detach_one_lwp): Add `args' parameter.  Handle it.  Adjust
10660         to multiple processes.
10661         (any_thread_of): New.
10662         (linux_detach): Add `pid' argument, and handle it.  Remove process
10663         from processes table.
10664         (linux_join): Add `pid' argument.  Handle it.
10665         (linux_thread_alive): Change unsighed long argument to ptid_t.
10666         Consider dead lwps as not being alive.
10667         (status_pending_p): Rename `dummy' argument to `arg'.  Filter out
10668         threads we're not interested in.
10669         (same_lwp, find_lwp_pid): New.
10670         (linux_wait_for_lwp): Change `pid' argument's type from int to
10671         ptid_t.  Adjust.
10672         (linux_wait_for_event): Rename to ...
10673         (linux_wait_for_event_1): ... this.  Change `pid' argument's type
10674         from int to ptid_t.  Adjust.
10675         (linux_wait_for_event): New.
10676         (linux_wait_1): Add `ptid' argument.  Change return type to
10677         ptid_t.  Adjust.  Use last_thread_of_process_p.  Remove processes
10678         that exit from the process table.
10679         (linux_wait): Add `ptid' argument.  Change return type to ptid_t.
10680         Adjust.
10681         (mark_lwp_dead): New.
10682         (wait_for_sigstop): Adjust to use ptids.  If a process exits while
10683         stopping all threads, mark its main lwp as dead.
10684         (linux_set_resume_request, linux_resume_one_thread): Adjust to use
10685         ptids.
10686         (fetch_register, usr_store_inferior_registers)
10687         (regsets_fetch_inferior_registers)
10688         (regsets_store_inferior_registers, linux_read_memory)
10689         (linux_write_memory): Inline `inferior_pid'.
10690         (linux_look_up_symbols): Adjust to use per-process
10691         `thread_db_active'.
10692         (linux_request_interrupt): Adjust to use ptids.
10693         (linux_read_auxv): Inline `inferior_pid'.
10694         (initialize_low): Don't reference thread_db_active.
10695         * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
10696         * proc-service.c (ps_lgetregs): Use find_lwp_pid.
10697         (ps_getpid): Return the pid of the current inferior.
10698         * thread-db.c (proc_handle, thread_agent): Delete.
10699         (thread_db_create_event, thread_db_enable_reporting): Adjust to
10700         per-process data.
10701         (find_one_thread): Change argument type to ptid_t.  Adjust to
10702         per-process data.
10703         (maybe_attach_thread): Adjust to per-process data and ptids.
10704         (thread_db_find_new_threads): Ditto.
10705         (thread_db_init): Ditto.
10706         * spu-low.c (spu_create_inferior, spu_attach): Add process to
10707         processes table.  Adjust to use ptids.
10708         (spu_kill, spu_detach): Adjust interface.  Remove process from
10709         processes table.
10710         (spu_join, spu_thread_alive): Adjust interface.
10711         (spu_wait): Adjust interface.  Remove process from processes
10712         table.  Adjust to use ptids.
10713         * win32-low.c (current_inferior_tid): Delete.
10714         (current_inferior_ptid): New.
10715         (debug_event_ptid): New.
10716         (thread_rec): Take a ptid.  Adjust.
10717         (child_add_thread): Add `pid' argument.  Adjust to use ptids.
10718         (child_delete_thread): Ditto.
10719         (do_initial_child_stuff): Add `attached' argument.  Add process to
10720         processes table.
10721         (child_fetch_inferior_registers, child_store_inferior_registers):
10722         Adjust.
10723         (win32_create_inferior): Pass 0 to do_initial_child_stuff.
10724         (win32_attach): Pass 1 to do_initial_child_stuff.
10725         (win32_kill): Adjust interface.  Remove process from processes
10726         table.
10727         (win32_detach): Ditto.
10728         (win32_join): Adjust interface.
10729         (win32_thread_alive): Take a ptid.
10730         (win32_resume): Adjust to use ptids.
10731         (get_child_debug_event): Ditto.
10732         (win32_wait): Adjust interface.  Remove exiting process from
10733         processes table.
10734
10735 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
10736
10737         Non-stop mode support.
10738
10739         * server.h (non_stop): Declare.
10740         (gdb_client_data, handler_func): Declare.
10741         (delete_file_handler, add_file_handler, start_event_loop):
10742         Declare.
10743         (handle_serial_event, handle_target_event, push_event)
10744         (putpkt_notif): Declare.
10745         * target.h (enum resume_kind): New.
10746         (struct thread_resume): Replace `step' field by `kind' field.
10747         (TARGET_WNOHANG): Define.
10748         (struct target_ops) <wait>: Add `options' argument.
10749         <supports_non_stop, async, start_non_stop>: New fields.
10750         (target_supports_non_stop, target_async): New.
10751         (start_non_stop): Declare.
10752         (mywait): Add `options' argument.
10753         * target.c (mywait): Add `options' argument.  Print child exit
10754         notifications here.
10755         (start_non_stop): New.
10756         * server.c (non_stop, own_buf, mem_buf): New globals.
10757         (struct vstop_notif): New.
10758         (notif_queue): New global.
10759         (queue_stop_reply, push_event, discard_queued_stop_replies)
10760         (send_next_stop_reply): New.
10761         (start_inferior): Adjust to use resume_kind.  Adjust to mywait
10762         interface changes.
10763         (attach_inferior): In non-stop mode, don't wait for the target
10764         here.
10765         (handle_general_set): Handle QNonStop.
10766         (handle_query): When handling qC, return the current general
10767         thread, instead of the first thread of the list.
10768         (handle_query): If the backend supports non-stop mode, include
10769         QNonStop+ in the qSupported query response.
10770         (handle_v_cont): Adjust to use resume_kind.  Handle resume_stop
10771         and non-stop mode.
10772         (handle_v_attach, handle_v_run): Handle non-stop mode.
10773         (handle_v_stopped): New.
10774         (handle_v_requests): Report support for vCont;t.  Handle vStopped.
10775         (myresume): Adjust to use resume_kind.  Handle non-stop.
10776         (queue_stop_reply_callback): New.
10777         (handle_status): Handle non-stop mode.
10778         (main): Clear non_stop flag on reconnection.  Use the event-loop.
10779         Refactor serial protocol handling from here ...
10780         (process_serial_event): ... to this new function.  When GDB
10781         selects any thread, select one here.  In non-stop mode, wait until
10782         GDB acks all pending events before exiting.
10783         (handle_serial_event, handle_target_event): New.
10784         * remote-utils.c (remote_open): Install remote_desc in the event
10785         loop.
10786         (remote_close): Remove remote_desc from the event loop.
10787         (putpkt_binary): Rename to...
10788         (putpkt_binary_1): ... this.  Add `is_notic' argument.  Handle it.
10789         (putpkt_binary): New as wrapper around putpkt_binary_1.
10790         (putpkt_notif): New.
10791         (prepare_resume_reply): In non-stop mode, don't change the
10792         general_thread.
10793         * event-loop.c: New.
10794         * Makefile.in (OBJ): Add event-loop.o.
10795         (event-loop.o): New rule.
10796
10797         * linux-low.h (pid_of): Moved here.
10798         (lwpid_of): New.
10799         (get_lwp_thread): Use lwpid_of.
10800         (struct lwp_info): Delete `lwpid' field.  Add `suspended' field.
10801         * linux-low.c (pid_of): Delete.
10802         (inferior_pid): Use lwpid_of.
10803         (linux_event_pipe): New.
10804         (target_is_async_p): New.
10805         (delete_lwp): New.
10806         (handle_extended_wait): Use lwpid_of.
10807         (add_lwp): Don't set lwpid field.
10808         (linux_attach_lwp): Adjust debug output.  Use lwpid_of.
10809         (linux_kill_one_lwp): If killing a running lwp, stop it first.
10810         Use lwpid_of.  Adjust to linux_wait_for_event interface changes.
10811         (linux_detach_one_lwp): If detaching from a running lwp, stop it
10812         first.  Adjust to linux_wait_for_event interface changes.  Use
10813         lwpid_of.
10814         (linux_detach): Don't delete the main lwp here.
10815         (linux_join): Use my_waitpid.  Avoid signal_pid.  Use lwpid_of.
10816         (status_pending_p): Don't consider explicitly suspended lwps.
10817         (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
10818         pointer.  Add OPTIONS argument.  Change return type to int.  Use
10819         my_waitpid instead of sleeping.  Handle WNOHANG.  Use lwpid_of.
10820         (linux_wait_for_event): Take an integer pid instead of a lwp_info
10821         pointer.  Add status pointer argument.  Return a pid instead of a
10822         status.  Use lwpid_of.  Adjust to linux_wait_for_lwp interface
10823         changes.  In non-stop mode, don't switch to a random thread.
10824         (linux_wait): Rename to...
10825         (linux_wait_1): ... this.  Add target_options argument, and handle
10826         it.  Adjust to use resume_kind.  Use lwpid_of.  In non-stop mode,
10827         don't handle the continue thread.  Handle TARGET_WNOHANG.  Merge
10828         clean exit and signal exit code.  Don't stop all threads in
10829         non-stop mode.  In all-stop mode, only stop all threads when
10830         reporting a stop to GDB.  Handle explicit thread stop requests.
10831         (async_file_flush, async_file_mark): New.
10832         (linux_wait): New.
10833         (send_sigstop): Use lwpid_of.
10834         (wait_for_sigstop): Use lwpid_of.  Adjust to linux_wait_for_event
10835         interface changes.  In non-stop mode, don't switch to a random
10836         thread.
10837         (linux_resume_one_lwp): Use lwpid_of.
10838         (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
10839         (linux_resume_one_thread): ... this.  Handle resume_stop.  In
10840         non-stop mode, don't look for pending flag in all threads.
10841         (resume_status_pending_p): Don't consider explicitly suspended
10842         threads.
10843         (my_waitpid): Reimplement.  Emulate __WALL.
10844         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10845         Use lwpid_of.
10846         (sigchld_handler, linux_supports_non_stop, linux_async)
10847         (linux_start_non_stop): New.
10848         (linux_target_ops): Register linux_supports_non_stop, linux_async
10849         and linux_start_non_stop.
10850         (initialize_low): Install SIGCHLD handler.
10851         * thread-db.c (thread_db_create_event, find_one_thread)
10852         (thread_db_get_tls_address): Use lwpid_of.
10853         * win32-low.c (win32_detach): Adjust to use resume_kind.
10854         (win32_wait): Add `options' argument.
10855         * spu-low.c (spu_resume): Adjust to use resume_kind.
10856         (spu_wait): Add `options' argument.
10857
10858 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
10859
10860         Decouple target code from remote protocol.
10861
10862         * target.h (enum target_waitkind): New.
10863         (struct target_waitstatus): New.
10864         (struct target_ops) <wait>: Return an unsigned long.  Take a
10865         target_waitstatus pointer instead of a char pointer.
10866         (mywait): Likewise.
10867         * target.c (mywait): Change prototype to return an unsigned long.
10868         Take a target_waitstatus pointer instead of a char pointer.  Adjust.
10869         * server.h (thread_from_wait, old_thread_from_wait): Delete
10870         declarations.
10871         (prepare_resume_reply): Change prototype to take a
10872         target_waitstatus.
10873         * server.c (thread_from_wait, old_thread_from_wait): Delete.
10874         (last_status, last_ptid): New.
10875         (start_inferior): Remove "statusptr" argument.  Adjust.  Return a
10876         pid instead of a signal.
10877         (attach_inferior): Remove "status" and "signal" parameters.
10878         Adjust.
10879         (handle_query): For qGetTLSAddr, parse the thread id with strtol,
10880         not as an address.
10881         (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
10882         (handle_v_requests, myresume): Remove "status" and "signal"
10883         parameters.  Adjust.
10884         (handle_status): New.
10885         (main): Delete local `status'.  Adjust.
10886         * remote-utils.c: Include target.h.
10887         (prepare_resume_reply): Change prototype to take a
10888         target_waitstatus.  Adjust.
10889
10890         * linux-low.c (linux_wait): Adjust to new target_ops->wait
10891         interface.
10892         * spu-low.c (spu_wait): Adjust.
10893         * win32-low.c (enum target_waitkind, struct target_waitstatus):
10894         Delete.
10895         (win32_wait): Adjust.
10896
10897 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
10898
10899         * target.h (struct thread_resume): Delete leave_stopped member.
10900         (struct target_ops): Add a `n' argument to the `resume' callback.
10901         * server.c (start_inferior): Adjust.
10902         (handle_v_cont, myresume): Adjust.
10903         * linux-low.c (check_removed_breakpoint): Adjust to resume
10904         interface change, and to removed leave_stopped field.
10905         (resume_ptr): Delete.
10906         (struct thread_resume_array): New.
10907         (linux_set_resume_request): Add new `arg' parameter.  Adjust to
10908         resume interface change.
10909         (linux_continue_one_thread, linux_queue_one_thread)
10910         (resume_status_pending_p): Check if the resume field is NULL
10911         instead of checking the leave_stopped member.
10912         (linux_resume): Adjust to the target resume interface change.
10913         * spu-low.c (spu_resume): Adjust to the target resume interface
10914         change.
10915         * win32-low.c (win32_detach, win32_resume): Ditto.
10916
10917 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
10918
10919         * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
10920         flag.
10921         (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
10922         pending.
10923         (linux_continue_one_thread): Only preserve the stepping flag if
10924         there's a pending breakpoint.
10925
10926 2009-03-31  Pedro Alves  <pedro@codesourcery.com>
10927
10928         * server.c (main): After the inferior having exited, call
10929         remote_close before exiting gdbserver.
10930
10931 2009-03-25  Thiago Jung Bauermann  <bauerman@br.ibm.com>
10932
10933         Fix size of FPSCR in Power 7 processors.
10934         * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
10935         (PPC_FEATURE_HAS_DFP): New #define.
10936         (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
10937         size of the FPSCR.
10938
10939 2009-03-23  Pedro Alves  <pedro@codesourcery.com>
10940
10941         * server.c (handle_query) Whitespace and formatting.
10942
10943 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
10944
10945         * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10946         linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10947         linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10948         linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10949         regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10950         thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10951         Makefile.in, configure.ac: Fix whitespace throughout.
10952         * configure: Regenerate.
10953
10954 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
10955
10956         * inferiors.c (find_inferior): Make it safe for the callback
10957         function to delete the currently iterated inferior.
10958
10959 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
10960
10961         * Makefile.in (linuw_low_h): Move higher.
10962         (thread-db.o): Depend on $(linux_low_h).
10963
10964 2009-03-17  Pedro Alves  <pedro@codesourcery.com>
10965
10966         Rename "process" to "lwp" throughout.
10967
10968         * linux-low.c (all_processes): Rename to...
10969         (all_lwps): ... this.
10970         (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10971         (add_process): Rename to ...
10972         (add_lwp): ... this.  Adjust.
10973         (linux_create_inferior): Adjust.
10974         (linux_attach_lwp): Adjust.
10975         (linux_attach): Adjust.
10976         (linux_kill_one_process): Rename to ...
10977         (linux_kill_one_lwp): ... this.  Adjust.
10978         (linux_kill): Adjust.
10979         (linux_detach_one_process): Rename to ...
10980         (linux_detach_one_lwp): ... this.  Adjust.
10981         (linux_detach): Adjust.
10982         (check_removed_breakpoint): Adjust.
10983         (status_pending_p): Adjust.
10984         (linux_wait_for_process): Rename to ...
10985         (linux_wait_for_lwp): ... this.  Adjust.
10986         (linux_wait_for_event): Adjust.
10987         (send_sigstop): Adjust.
10988         (wait_for_sigstop): Adjust.
10989         (stop_all_processes): Rename to ...
10990         (stop_all_lwps): ... this.
10991         (linux_resume_one_process): Rename to ...
10992         (linux_resume_one_lwp): ... this.  Adjust.
10993         (linux_set_resume_request, linux_continue_one_thread)
10994         (linux_queue_one_thread, resume_status_pending_p)
10995         (usr_store_inferior_registers, regsets_store_inferior_registers)
10996         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10997         Adjust.
10998         * linux-low.h (get_process): Rename to ...
10999         (get_lwp): ... this.  Adjust.
11000         (get_thread_process): Rename to ...
11001         (get_thread_lwp): ... this.  Adjust.
11002         (get_process_thread): Rename to ...
11003         (get_lwp_thread): ... this.  Adjust.
11004         (struct process_info): Rename to ...
11005         (struct lwp_info): ... this.
11006         (all_processes): Rename to ...
11007         (all_lwps): ... this.
11008         * proc-service.c (ps_lgetregs): Adjust.
11009         * thread-db.c (thread_db_create_event, find_one_thread)
11010         (maybe_attach_thread, thread_db_get_tls_address): Adjust.
11011
11012 2009-03-14  Pedro Alves  <pedro@codesourcery.com>
11013
11014         * server.c (handle_query): Handle "qAttached".
11015
11016 2009-03-13  Nathan Sidwell  <nathan@codesourcery.com>
11017
11018         * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
11019         GPLv3, update license URL.
11020
11021 2009-03-01  Doug Evans  <dje@google.com>
11022
11023         * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
11024         (server_h): Add gdb_signals.h.
11025         (signals.o): Update.
11026         * server.h (target_signal_from_host,target_signal_to_host_p)
11027         (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
11028
11029 2009-02-14  Pierre Muller  <muller@ics.u-strasbg.fr>
11030
11031         * remote-utils.c (getpkt): Also generate remote-debug
11032         information if noack_mode is set.
11033
11034 2009-02-06  Pedro Alves  <pedro@codesourcery.com>
11035
11036         * server.c (handle_query): Report qXfer:siginfo:read and
11037         qXfer:siginfo:write as supported and handle them.
11038         * target.h (struct target_ops) <qxfer_siginfo>: New field.
11039         * linux-low.c (linux_xfer_siginfo): New.
11040         (linux_target_ops): Set it.
11041
11042 2009-01-26  Pedro Alves  <pedro@codesourcery.com>
11043
11044         * server.c (gdbserver_usage): Mention --remote-debug.
11045         (main): Accept '--remote-debug' switch.
11046
11047 2009-01-18  Doug Evans  <dje@google.com>
11048
11049         * regcache.c (new_register_cache): No need to check result of xcalloc.
11050         * server.c (handle_search_memory): Back out calls to xmalloc,
11051         result is checked and error is returned to user upon failure.
11052         (handle_query): Ditto.  Add more checks for result of malloc.
11053         (handle_v_cont): Check result of malloc, report error back to
11054         user upon failure.
11055         (handle_v_run): Ditto.  Call freeargv.
11056         * server.h (freeargv): Declare.
11057         * utils.c (freeargv): New fn.
11058
11059 2009-01-15  Doug Evans  <dje@google.com>
11060
11061         * gdbreplay.c (perror_with_name): Make arg const char *.
11062         * server.h (target_signal_to_name): Make return type const char *.
11063         * thread-db.c (thread_db_err_str): Make return type const char *.
11064         * utils.c (perror_with_name): Make arg const char *.
11065
11066 2009-01-14  Pedro Alves  <pedro@codesourcery.com>
11067
11068         * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
11069         when handling a EXIT_PROCESS_DEBUG_EVENT.
11070
11071 2009-01-06  Joel Brobecker  <brobecker@adacore.com>
11072
11073         * gdbreplay.c (gdbreplay_version): Update copyright year.
11074         * server.c (gdbserver_version): Likewise.
11075
11076 2009-01-05  Doug Evans  <dje@google.com>
11077
11078         * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
11079         (handle_extended_wait): Improve comment.
11080
11081 2008-12-13  Doug Evans  <dje@google.com>
11082
11083         * utils.c (xmalloc,xcalloc,xstrdup): New fns.
11084         * server.h (ATTR_MALLOC): New macro.
11085         (xmalloc,xcalloc,xstrdup): Declare.
11086         * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
11087         * inferiors.c: Ditto.
11088         * linux-low.c: Ditto.
11089         * mem-break.c: Ditto.
11090         * regcache.c: Ditto.
11091         * remote-utils.c: Ditto.
11092         * server.c: Ditto.
11093         * target.c: Ditto.
11094         * win32-low.c: Ditto.
11095
11096 2008-12-12  Doug Evans  <dje@google.com>
11097
11098         * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
11099         in debugging printf.
11100
11101         * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
11102
11103 2008-12-09  Doug Evans  <dje@google.com>
11104
11105         * linux-low.h (struct process_info): Delete member tid, unused.
11106         * thread-db.c (find_one_thread): Update.
11107         (maybe_attach_thread): Update.
11108
11109 2008-12-02  Pedro Alves  <pedro@codesourcery.com>
11110
11111         * target.h (struct target_ops): Add qxfer_osdata member.
11112         * linux-low.c: Include ctype.h and pwd.h and sys/types.h
11113         and dirent.h.
11114         (linux_qxfer_osdata): New functions.
11115         (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
11116         callback.
11117         * server.c (handle_query): Handle "qXfer:osdata:read:".
11118         * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
11119         (buffer_xml_printf): New functions.
11120         * server.h (struct buffer): New.
11121         (buffer_grow_str, buffer_grow_str0): New macros.
11122         (buffer_grow, buffer_free, buffer_init, buffer_finish)
11123         (buffer_xml_printf): Declare.
11124
11125 2008-11-24  Doug Evans  <dje@google.com>
11126
11127         * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
11128
11129 2008-11-24  Daniel Jacobowitz  <dan@codesourcery.com>
11130
11131         * server.c (handle_v_run): Always use the supplied argument list.
11132
11133 2008-11-19  Bob Wilson  <bob.wilson@acm.org>
11134
11135         * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
11136         (xtensa_regmap_table): Add entry for scompare1.
11137
11138 2008-11-18  Thiago Jung Bauermann  <bauerman@br.ibm.com>
11139
11140         * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
11141         powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
11142         powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
11143         powerpc-isa205-64l.o, powerpc-isa205-64l.c,
11144         powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
11145         powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
11146         * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
11147         XML target descriptions.
11148         * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
11149         when inferior is running on an ISA 2.05 or later processor.  Add
11150         special case to return offset for full 64-bit slot of FPSCR when
11151         in 32-bits.
11152
11153 2008-11-14  Daniel Gutson  <dgutson@codesourcery.com>
11154
11155         * Makefile.in (SFILES, clean): Added sparc64 files.
11156         (reg-sparc64.o, reg-sparc64.c): New.
11157         * configure.srv (sparc*-*-linux*): New configuration.
11158         * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
11159         syscall arguments for SPARC.
11160         (regsets_store_inferior_registers): Likewise.
11161         * linux-sparc-low.c: New file.
11162
11163 2008-10-21  Doug Evans  <dje@google.com>
11164
11165         * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
11166         (READLINE_DIR,READLINE_DEP): Delete.
11167         (INTERNAL_CFLAGS): Update.
11168         (LINTFLAGS): Update.
11169
11170 2008-10-10  Pedro Alves  <pedro@codesourcery.com>
11171
11172         * server.c (handle_v_run): If GDB didn't specify an argv, use the
11173         whole argv from the last run, not just argv[0].
11174
11175 2008-09-08  Pedro Alves  <pedro@codesourcery.com>
11176
11177         * regcache.c (new_register_cache): Return NULL if the register
11178         cache size isn't known yet.
11179         (free_register_cache): Avoid dereferencing a NULL regcache.
11180
11181 2008-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
11182
11183         * configure.srv: Merge MIPS and MIPS64.
11184
11185 2008-08-24  Maciej W. Rozycki  <macro@linux-mips.org>
11186
11187         * Makefile.in (uninstall): Apply $(EXEEXT) too.
11188
11189 2008-08-18  Luis Machado  <luisgpm@br.ibm.com>
11190
11191         * Makefile.in: Add required vsx dependencies.
11192
11193         * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
11194         Declare init_registers_powerpc_vsx32l.
11195         Declare init_registers_powerpc_vsx64l.
11196         Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
11197         (ppc_arch_setup): Check for VSX in hwcap.
11198         (ppc_fill_vsxregset): New function.
11199         (ppc_store_vsxregset): New function.
11200         Add new VSX entry in regset_info target_regsets.
11201
11202         * configure.srv: Add new VSX dependencies.
11203
11204 2008-08-12  Pedro Alves  <pedro@codesourcery.com>
11205
11206         * remote-utils.c (noack_mode, transport_is_reliable): New globals.
11207         (remote_open): Set or clear transport_is_reliable.
11208         (putpkt_binary): Don't expect acks in noack mode.
11209         (getpkt): Don't send ack/nac in noack mode.
11210         * server.c (handle_general_set): Handle QStartNoAckMode.
11211         (handle_query): If connected by tcp pass QStartNoAckMode+ in
11212         qSupported.
11213         (main): Reset noack_mode on every connection.
11214         * server.h (noack_mode): Declare.
11215
11216 2008-08-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11217
11218         * Makefile.in (GDBREPLAY_OBS): New variable.
11219         (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
11220
11221 2008-08-05  Ulrich Weigand  <uweigand@de.ibm.com>
11222             Daniel Jacobowitz  <dan@codesourcery.com>
11223
11224         * linux-low.c (linux_resume_one_process): Ignore ESRCH.
11225         (usr_store_inferior_registers): Likewise.
11226         (regsets_store_inferior_registers): Likewise.
11227
11228 2008-07-31  Rolf Jansen  <rj@surtec.com>
11229             Pedro Alves  <pedro@codesourcery.com>
11230
11231         * configure.ac: Check for memmem declaration.
11232         * server.c [HAVE_MALLOC_H]: Include malloc.h.
11233         (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
11234         (disable_packet_qfThreadInfo): Unconditionally compile.
11235         * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
11236         * configure, config.in: Regenerate.
11237
11238 2008-07-28  Doug Kwan  <dougkwan@google.com>
11239
11240         * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
11241         (linux_write_memory): Remove declaration of errno.
11242
11243 2008-07-12  Ulrich Weigand  <uweigand@de.ibm.com>
11244
11245         * linux-low.c (handle_extended_wait): Do not use "status"
11246         variable uninitialized.
11247
11248 2008-07-07  Pedro Alves  <pedro@codesourcery.com>
11249
11250         * server.c (handle_v_attach): Inhibit reporting dll changes.
11251
11252 2008-06-27  Pedro Alves  <pedro@codesourcery.com>
11253
11254         * remote-utils.c (prepare_resume_reply): If requested, don't
11255         output "thread:TID" in the T stop reply.
11256
11257         * server.c (disable_packet_vCont, disable_packet_Tthread)
11258         (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
11259         (handle_query): If requested, disable support for qC, qfThreadInfo
11260         and qsThreadInfo.
11261         (handle_v_requests): If requested, disable support for vCont.
11262         (gdbserver_show_disableable): New.
11263         (main): Handle --disable-packet and --disable-packet=LIST.
11264
11265         * server.h (disable_packet_vCont, disable_packet_Tthread)
11266         (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
11267
11268 2008-06-20  Carlos O'Donell  <carlos@codesourcery.com>
11269
11270         * server.c (gdbserver_usage): Mention --version.
11271
11272 2008-06-06  Daniel Jacobowitz  <dan@codesourcery.com>
11273
11274         * Makefile.in (gdbreplay.o): New rule.
11275
11276 2008-06-06  Joseph Myers  <joseph@codesourcery.com>
11277
11278         * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
11279         message, not gdbserver.
11280
11281 2008-06-05  Vladimir Prus  <vladimir@codesourcery.com>
11282             Nathan Sidwell  <nathan@codesourcery.com>
11283             Joseph Myers  <joseph@codesourcery.com>
11284
11285         * acinclude.m4: Include ../../config/acx.m4.
11286         * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
11287         * configure, config.in: Regenerate.
11288         * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
11289         * server.c (gdbserver_version): Print PKGVERSION.
11290         (gdbsrever_usage): Add stream parameter.  Print REPORT_BUGS_TO.
11291         (main): Adjust gdbserver_usage calls.
11292         * gdbreplay.c (version, host_name): Add declarations.
11293         (gdbreplay_version, gdbreplay_usage): New.
11294         (main): Accept --version and --help options.
11295
11296 2008-06-04  Daniel Jacobowitz  <dan@codesourcery.com>
11297
11298         * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
11299         (arm_breakpoint_at): Handle Thumb.
11300         (the_low_target): Add comment.
11301
11302 2008-05-29  Ulrich Weigand  <uweigand@de.ibm.com>
11303
11304         * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
11305
11306 2008-05-09  Doug Evans  <dje@google.com>
11307
11308         * server.h (decode_search_memory_packet): Declare.
11309         * remote-utils.c (decode_search_memory_packet): New fn.
11310         * server.c (handle_search_memory_1): New fn.
11311         (handle_search_memory): New fn.
11312         (handle_query): Process qSearch:memory packets.
11313
11314 2008-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
11315
11316         * regcache.c (registers_length): Remove.
11317         (set_register_cache): Verify that PBUFSIZ is large enough to hold a
11318         full register packet.
11319         * regcache.h (registers_length): Remove prototype.
11320         * server.h (PBUFSIZ): Define to 16384.
11321
11322 2008-05-03  Ulrich Weigand  <uweigand@de.ibm.com>
11323
11324         * configure.srv (powerpc*-*-linux*): Set srv_regobj to
11325         powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
11326         powerpc-64l.o, and powerpc-altivec64l.o.
11327         Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
11328         rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
11329         rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
11330         rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
11331         rs6000/power-linux.xml, and rs6000/power64-linux.xml
11332         to srv_xmlfiles.
11333
11334         * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
11335         (powerpc-32l.o, powerpc-32l.c): ... these new rules.
11336         (powerpc-32.o, powerpc-32.c): Remove, replace by ...
11337         (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
11338         (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
11339         (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
11340         (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
11341         (powerpc-64l.o, powerpc-64l.c): ... these new rules.
11342         (powerpc-64.o, powerpc-64.c): Remove, replace by ...
11343         (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
11344         (clean): Update.
11345
11346         * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
11347         (init_registers_powerpc_32l): ... this new prototype.
11348         (init_registers_powerpc_32): Remove, replace by ...
11349         (init_registers_powerpc_altivec32l): ... this new prototype.
11350         (init_registers_powerpc_e500): Remove, replace by ...
11351         (init_registers_powerpc_e500l): ... this new prototype.
11352         (init_registers_ppc64): Remove, replace by ...
11353         (init_registers_powerpc_64l): ... this new prototype.
11354         (init_registers_powerpc_64): Remove, replace by ...
11355         (init_registers_powerpc_altivec64l): ... this new prototype.
11356         (ppc_num_regs): Set to 73.
11357         (PT_ORIG_R3, PT_TRAP): Define if necessary.
11358         (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
11359         (ppc_cannot_store_register): Handle orig_r3 and trap.
11360         (ppc_arch_setup): Update init_registers_... calls.
11361         (ppc_fill_gregset): Handle orig_r3 and trap.
11362
11363         * inferiors.c (clear_inferiors): Reset current_inferior.
11364
11365 2008-04-23  Paolo Bonzini  <bonzini@gnu.org>
11366
11367         * acinclude.m4: Add override.m4.
11368         * configure: Regenerate.
11369
11370 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
11371
11372         * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
11373         initial call to init_register_ppc64.
11374
11375 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
11376
11377         * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
11378         single powerpc*-*-linux* case.
11379         (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
11380
11381 2008-04-17  Ulrich Weigand  <uweigand@de.ibm.com>
11382
11383         * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
11384         srv_regobj.  Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
11385         from reg_xmlfiles.
11386         * linux-ppc-low.c: Include <elf.h>.
11387         (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
11388         (ppc_hwcap): New global variable.
11389         (ppc_regmap): Remove __SPE__ #ifdef sections.
11390         (ppc_regmap_e500): New global variable.
11391         (ppc_cannot_store_register): Update __SPE__ special case.
11392         (ppc_get_hwcap): New function.
11393         (ppc_arch_setup): Use it to determine whether inferior supports
11394         AltiVec or SPE registers.  Set the_low_target.regmap if appropriate.
11395         (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
11396         Do not access registers if target does not support AltiVec.
11397         (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
11398         Do not access registers if target does not support SPE.
11399         (target_regsets): Unconditionally include AltiVec and SPE regsets.
11400
11401 2008-04-17  Daniel Jacobowitz  <dan@codesourcery.com>
11402
11403         * linux-low.c (disabled_regsets, num_regsets): New.
11404         (use_regsets_p): Delete.
11405         (linux_wait_for_process): Clear disabled_regsets.
11406         (regsets_fetch_inferior_registers): Check and set it.
11407         (regsets_store_inferior_registers): Likewise.
11408         (linux_fetch_registers, linux_store_registers): Do not use
11409         use_regsets_p.
11410         (initialize_low): Allocate disabled_regsets.
11411
11412 2008-04-14  Daniel Jacobowitz  <dan@codesourcery.com>
11413
11414         * Makefile.in (LIBOBJS): New.
11415         (OBS): Use LIBOBJS.
11416         (memmem.o): New rule.
11417         * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
11418         * configure: Regenerated.
11419
11420 2008-04-04  Ulrich Weigand  <uweigand@de.ibm.com>
11421
11422         * server.c (handle_query): Never return "unsupported" for
11423         qXfer:features:read queries.
11424
11425 2008-03-27  Ulrich Weigand  <uweigand@de.ibm.com>
11426
11427         * server.c (get_features_xml): Fix inverted condition.
11428         (handle_query): Always support qXfer:feature:read.
11429
11430 2008-03-10  Daniel Jacobowitz  <dan@codesourcery.com>
11431
11432         * server.c (wrapper_argv): New.
11433         (start_inferior): Handle wrapper_argv.  If set, expect an extra
11434         trap.
11435         (gdbserver_usage): Document --wrapper.
11436         (main): Parse --wrapper.
11437
11438 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
11439
11440         * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
11441         powerpc-*-linux* to srv_regobj and reg_xmlfiles.
11442         * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
11443         (ppc_set_pc): Likewise.
11444         (ppc_arch_setup): New function.
11445         (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
11446         of collect_register.
11447         (the_low_target): Use ppc_arch_setup as arch_setup initializer.
11448
11449 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
11450
11451         * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
11452         instead of linux-ppc64-low.o.
11453         * linux-ppc64-low.c: Remove file.
11454         * Makefile.in (SFILES): Remove linux-ppc64-low.c.
11455         (linux-ppc64-low.o): Remove rule.
11456
11457         * linux-ppc-low.c (init_registers_ppc64): Add prototype.
11458         (init_registers_powerpc_64): Likewise.
11459         (ppc_regmap): Conditionally define depending on __powerpc64__.
11460         (ppc_cannot_store_register): Do not special-case "fpscr" when
11461         compiled on __powerpc64__.
11462         (ppc_collect_ptrace_register): New function.
11463         (ppc_supply_ptrace_register): New function.
11464         (ppc_breakpoint): Change type to "unsigned int".
11465         (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
11466         (the_low_target): Conditionally provide initializers for the
11467         arch_setup member depending on __powerpc64__.  Install
11468         collect_ptrace_register and supply_ptrace_register members.
11469
11470 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
11471
11472         * regcache.h (gdbserver_xmltarget): Add extern declaration.
11473         * server.c (gdbserver_xmltarget): Define.
11474         (get_features_xml): Use it to replace "target.xml" and arch_string.
11475
11476         * configure.srv: Remove srv_xmltarget.  Add XML files that were
11477         mentioned there to srv_xmlfiles instead.  Remove conditional tests
11478         on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
11479         srv_xmlfiles and srv_regobj to include all possible choices.
11480         * configure.ac (srv_xmltarget): Remove.
11481         (srv_xmlfiles): Do not add "target.xml".
11482         (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
11483         checks for supplementary target information.
11484         * configure: Regenerate.
11485         * Makefile.in (XML_TARGET): Remove.
11486         (target.xml): Remove rule.
11487         (clean): Do not clean up target.xml.
11488         (.PRECIOUS): Do not mention target.xml.
11489
11490         * target.h (struct target_ops): Remove arch_string member.
11491         * linux-low.c (linux_arch_string): Remove.
11492         (linux_target_ops): Remove arch_string initializer.
11493         * linux-low.h (struct linux_target_ops): Remove arch_string member.
11494         * linux-i386-low.c (the_low_target): Remove arch_string initializer.
11495         * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
11496         * spu-low.c (spu_arch_string): Remove.
11497         (spu_target_ops): Remove arch_string initializer.
11498         * win32-low.c (win32_arch_string): Remove.
11499         (win32_target_ops): Remove arch_string initializer.
11500         * win32-low.h (struct win32_target_ops): Remove arch_string member.
11501         * win32-arm-low.c (the_low_target): Remove arch_string initializer.
11502         * win32-i368-low.c (the_low_target): Remove arch_string initializer.
11503
11504 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
11505
11506         * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
11507         by collect_ptrace_register and supply_ptrace_register hooks.
11508         * linux-low.c (fetch_register): Use supply_ptrace_register callback
11509         instead of checking for the_low_target.left_pad_xfer.
11510         (usr_store_inferior_registers): Use collect_ptrace_register callback
11511         instead of checking for the_low_target.left_pad_xfer.
11512
11513         * linux-s390-low.c (s390_collect_ptrace_register): New function.
11514         (s390_supply_ptrace_register): Likewise.
11515         (s390_fill_gregset): Call s390_collect_ptrace_register.
11516         (the_low_target): Update.
11517
11518         * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
11519         (ppc_supply_ptrace_register): Likewise.
11520         (the_low_target): Update.
11521
11522         * linux-i386-low.c (the_low_target): Update.
11523         * linux-x86-64-low.c (the_low_target): Update.
11524
11525 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
11526
11527         * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
11528         reg-s390.o and reg-s390x.o.
11529
11530         * linux-low.c (new_inferior): New global variable.
11531         (linux_create_inferior, linux_attach): Set it.
11532         (linux_wait_for_process): Call the_low_target.arch_setup after the
11533         target has stopped for the first time.
11534         (initialize_low): Do not call the_low_target.arch_setup.
11535
11536         * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
11537         (s390_set_pc): Likewise.
11538         (s390_arch_setup): New function.
11539         (the_low_target): Use s390_arch_setup as arch_setup routine.
11540
11541         * regcache.c (realloc_register_cache): New function.
11542         (set_register_cache): Call it for each existing regcache.
11543
11544 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
11545
11546         * server.h (init_registers): Remove prototype.
11547
11548         * linux-low.h (struct linux_target_ops): Add arch_setup field.
11549         * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
11550         instead of init_registers ().
11551         * linux-arm-low.c (init_registers_arm): Add prototype.
11552         (init_registers_arm_with_iwmmxt): Likewise.
11553         (the_low_target): Add initializer for arch_setup field.
11554         * linux-cris-low.c (init_registers_cris): Add prototype.
11555         (the_low_target): Add initializer for arch_setup field.
11556         * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
11557         (the_low_target): Add initializer for arch_setup field.
11558         * linux-i386-low.c (init_registers_i386_linux): Add prototype.
11559         (the_low_target): Add initializer for arch_setup field.
11560         * linux-ia64-low.c (init_registers_ia64): Add prototype.
11561         (the_low_target): Add initializer for arch_setup field.
11562         * linux-m32r-low.c (init_registers_m32r): Add prototype.
11563         (the_low_target): Add initializer for arch_setup field.
11564         * linux-m68k-low.c (init_registers_m68k): Add prototype.
11565         (the_low_target): Add initializer for arch_setup field.
11566         * linux-mips-low.c (init_registers_mips_linux): Add prototype.
11567         (init_registers_mips64_linux): Likewise.
11568         (the_low_target): Add initializer for arch_setup field.
11569         * linux-ppc-low.c (init_registers_ppc): Add prototype.
11570         (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
11571         (the_low_target): Add initializer for arch_setup field.
11572         * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
11573         (init_registers_powerpc_64): Likewise.
11574         (the_low_target): Add initializer for arch_setup field.
11575         * linux-s390-low.c (init_registers_s390): Add prototype.
11576         (init_registers_s390x): Likewise.
11577         (the_low_target): Add initializer for arch_setup field.
11578         * linux-sh-low.c (init_registers_sh): Add prototype.
11579         (the_low_target): Add initializer for arch_setup field.
11580         * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
11581         (the_low_target): Add initializer for arch_setup field.
11582         * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
11583         (the_low_target): Add initializer for arch_setup field.
11584
11585         * win32-low.h (struct win32_target_ops): Add arch_setup field.
11586         * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
11587         instead of init_registers ().
11588         * win32-arm-low.c (init_registers_arm): Add prototype.
11589         (the_low_target): Add initializer for arch_setup field.
11590         * win32-i386-low.c (init_registers_i386): Add prototype.
11591         (the_low_target): Add initializer for arch_setup field.
11592
11593         * spu-low.c (init_registers_spu): Add prototype.
11594         (initialize_low): Call initialie_registers_spu () instead of
11595         initialize_registers ().
11596
11597 2008-02-19  Pedro Alves  <pedro@codesourcery.com>
11598
11599         * server.c (handle_v_requests): When handling the vRun and vAttach
11600         packets, if already debugging a process, don't kill it.  Return an
11601         error instead.
11602
11603 2008-02-17  Daniel Jacobowitz  <dan@codesourcery.com>
11604
11605         * server.c (handle_query): Correct length check.
11606
11607 2008-02-14  Pedro Alves  <pedro_alves@portugalmail.pt>
11608
11609         * win32-low.c (do_initial_child_stuff): Add process handle
11610         parameter.  Set current_process_handle and current_process_id from the
11611         parameters. Clear globals.
11612         (win32_create_inferior): Don't set current_process_handle and
11613         current_process_id here.  Instead pass them on the call to
11614         do_initial_child_stuff.
11615         (win32_attach): Likewise.
11616         (win32_clear_inferiors): New.
11617         (win32_kill): Don't close the current process handle or the
11618         current thread handle here.  Instead call win32_clear_inferiors.
11619         (win32_detach): Don't open a new handle to the process.  Call
11620         win32_clear_inferiors.
11621         (win32_join): Don't rely on current_process_handle; open a new
11622         handle using the process id.
11623         (win32_wait): Call win32_clear_inferiors when the inferior process
11624         has exited.
11625
11626 2008-02-14  Daniel Jacobowitz  <dan@codesourcery.com>
11627
11628         * server.c (monitor_show_help): Add "exit".
11629
11630 2008-02-11  Maxim Grigoriev  <maxim2405@gmail.com>
11631
11632         * Makefile.in (SFILES): Add linux-xtensa-low.c.
11633         (clean): Add reg-xtensa.c.
11634         (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
11635         * configure.srv (xtensa*-*-linux*) New target.
11636         * linux-xtensa-low.c: New.
11637         * xtensa-xtregs.c: New.
11638
11639 2008-02-01  Pedro Alves  <pedro_alves@portugalmail.pt>
11640
11641         * hostio.c: Don't include errno.h.
11642         (errno_to_fileio_errno): Move to hostio-errno.
11643         * hostio.c: (hostio_error): Remove the error parameter.  Defer the
11644         error number outputting to the target->hostio_last_error callback.
11645         (hostio_packet_error): Use FILEIO_EINVAL directly.
11646         (handle_open, handle_pread, hostio_error, handle_unlink): Update
11647         calls to hostio_error.
11648         * hostio-errno.c: New.
11649         * server.h (hostio_last_error_from_errno): Declare.
11650         * target.h (target_ops): Add hostio_last_error member.
11651         * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
11652         as hostio_last_error handler.
11653         * spu-low.c (spu_target_ops): Likewise.
11654         * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
11655         (wince_hostio_last_error): New functions.
11656         (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
11657         as hostio_last_error handler.
11658         (win32_target_ops) [!_WIN32_WCE]: Register
11659         hostio_last_error_from_errno as hostio_last_error handler.
11660         * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
11661         (hostio-errno.o): New rule.
11662         * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
11663         * configure.srv (srv_hostio_err_objs): New variable.  Default to
11664         hostio-errno.o.
11665         (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
11666         * configure: Regenerate.
11667
11668 2008-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
11669
11670         * linux-low.c (linux_attach_lwp): Do not _exit after errors.
11671         (linux_kill, linux_detach): Clean up the process list.
11672         * remote-utils.c (remote_open): Improve port number parsing.
11673         (putpkt_binary, input_interrupt): Only send interrupts if the target
11674         is running.
11675         * server.c (extended_protocol): Make static.
11676         (attached): Define earlier.
11677         (exit_requested, response_needed, program_argv): New variables.
11678         (target_running): New.
11679         (start_inferior): Clear attached here.
11680         (attach_inferior): Set attached here.
11681         (require_running): Define.
11682         (handle_query): Use require_running and target_running.  Implement
11683         "monitor exit".
11684         (handle_v_attach, handle_v_run): New.
11685         (handle_v_requests): Use require_running.  Handle vAttach and vRun.
11686         (gdbserver_usage): Update.
11687         (main): Redo argument parsing.  Handle --debug and --multi.  Handle
11688         --attach along with other options or after the port.  Save
11689         program_argv.  Support no initial program.  Resynchronize
11690         communication with GDB after an error.  Handle "monitor exit".
11691         Use require_running and target_running.  Always allow the extended
11692         protocol.  Do not error out for Hc0 or Hc-1.  Do not automatically
11693         restart in extended mode.
11694         * README: Refer to the GDB manual.  Update --attach usage.
11695
11696 2007-12-20  Andreas Schwab  <schwab@suse.de>
11697
11698         * linux-low.c (STACK_SIZE): Define.
11699         (linux_tracefork_child): Use it.  Use __clone2 on ia64.
11700         (linux_test_for_tracefork): Likewise.
11701
11702 2007-12-18  Daniel Jacobowitz  <dan@codesourcery.com>
11703
11704         * linux-low.c (linux_wait_for_event): Update messages.  Do not
11705         reinsert auto-delete breakpoints.
11706         * mem-break.c (struct breakpoint): Change return type of handler to
11707         int.
11708         (set_breakpoint_at): Update handler type.
11709         (reinsert_breakpoint_handler): Return 1 instead of calling
11710         delete_breakpoint.
11711         (reinsert_breakpoint_by_bp): Check for the original breakpoint before
11712         setting a new one.
11713         (check_breakpoints): Delete auto-delete breakpoints and return 2.
11714         * mem-break.h (set_breakpoint_at): Update handler type.
11715         * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
11716         * win32-low.c (auto_delete_breakpoint): New.
11717         (get_child_debug_event): Use it.
11718
11719 2007-12-16  Daniel Jacobowitz  <dan@codesourcery.com>
11720
11721         * configure.ac: Check for pread and pwrite.
11722         * hostio.c (handle_pread): Fall back to lseek and read.
11723         (handle_pwrite): Fall back to lseek and write.
11724         * config.in, configure: Regenerated.
11725
11726 2007-12-07  Daniel Jacobowitz  <dan@codesourcery.com>
11727
11728         * server.c (myresume): Add own_buf argument.
11729         (main): Update calls.
11730
11731 2007-12-06  Daniel Jacobowitz  <dan@codesourcery.com>
11732
11733         * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
11734         * remote-utils.c (remote_open): Do not call disable_async_io.
11735         (block_async_io): Delete.
11736         (unblock_async_io): Make static.
11737         (initialize_async_io): New.
11738         * server.c (handle_v_cont): Handle async I/O here.
11739         (myresume): Likewise.  Move other common resume tasks here...
11740         (main): ... from here.  Call initialize_async_io.  Disable async
11741         I/O before the main loop.
11742         * server.h (initialize_async_io): Declare.
11743         (block_async_io, unblock_async_io): Delete prototypes.
11744         * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
11745
11746 2007-12-06  Mick Davis  <mickd@goanna.iinet.net.au>
11747
11748         * remote-utils.c (readchar): Allow binary data in received messages.
11749
11750 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11751
11752         * win32-low.c (attaching): New global.
11753         (win32_create_inferior): Clear the `attaching' global.
11754         (win32_attach): Set the `attaching' global.
11755         (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
11756         attaching.  Only set a breakpoint at the entry point if not
11757         attaching.
11758
11759 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11760
11761         * server.c (main): Don't report dll events on the initial
11762         connection on attaches.
11763
11764 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11765
11766         * server.c (main): Relax numerical bases supported for the pid of
11767         the --attach command line argument.
11768
11769 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11770
11771         * win32-low.c (win32_attach): Call OpenProcess before
11772         DebugActiveProcess, not after.  Add last error output to error
11773         call.
11774
11775 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11776
11777         * win32-low.c (win32_get_thread_context)
11778         (win32_set_thread_context): New functions.
11779         (thread_rec): Use win32_get_thread_context.
11780         (continue_one_thread, win32_resume): Use win32_set_thread_context.
11781         * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
11782         field.
11783
11784 2007-12-03  Leo Zayas
11785             Pedro Alves  <pedro_alves@portugalmail.pt>
11786
11787         * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
11788         global variables.
11789         (child_add_thread): Minor cleanup.
11790         (child_continue): Resume artificially suspended threads before
11791         calling ContinueDebugEvent.
11792         (suspend_one_thread): New.
11793         (fake_breakpoint_event): New.
11794         (get_child_debug_event): Change return type to int.  Check here if
11795         gdb sent an interrupt request.  If a soft interrupt was requested,
11796         fake a breakpoint event.  Return 0 if there is no event to handle,
11797         and 1 otherwise.
11798         (win32_wait): Don't check here if gdb sent an interrupt request.
11799         Ensure there is a valid event to handle.
11800         (win32_request_interrupt): Add soft interruption method as last
11801         resort.
11802
11803 2007-12-03  Leo Zayas
11804             Pedro Alves  <pedro_alves@portugalmail.pt>
11805
11806         * win32-low.h (win32_thread_info): Add descriptions to the
11807         structure members.  Replace `suspend_count' counter by a
11808         `suspended' flag.
11809         * win32-low.c (thread_rec): Update condition of when to get the
11810         context from the inferior.  Rely on ContextFlags being set if it
11811         has already been retrieved.  Only suspend the inferior thread if
11812         we haven't already.  Warn if that fails.
11813         (continue_one_thread): s/suspend_count/suspended/.  Only call
11814         ResumeThread once.  Warn if that fails.
11815
11816 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
11817
11818         * win32-low.c (win32_wait): Don't read from the inferior when it
11819         has already exited.
11820
11821 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
11822
11823         * Makefile.in (win32_low_h): New variable.
11824         (win32-low.o): Add dependency on $(win32_low_h).
11825         (win32-arm-low.o, win32-i386-low.o): New rules.
11826
11827 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
11828
11829         * hostio.c: Correct copyright year.
11830
11831 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
11832
11833         * Makefile.in (OBS): Add hostio.o.
11834         (hostio.o): New rule.
11835         * server.h (handle_vFile): Declare.
11836         * hostio.c: New file.
11837         * server.c (handle_v_requests): Take packet_len and new_packet_len
11838         for binary packets.  Call handle_vFile.
11839         (main): Update call to handle_v_requests.
11840
11841 2007-11-05  Daniel Jacobowitz  <dan@codesourcery.com>
11842
11843         * linux-low.c: Include <sched.h>.
11844
11845 2007-11-01  Daniel Jacobowitz  <dan@codesourcery.com>
11846
11847         * linux-low.c (linux_tracefork_grandchild): New.
11848         (linux_tracefork_child): Use clone.
11849         (linux_test_for_tracefork): Use clone; allocate and free a stack.
11850
11851 2007-10-31  Joel Brobecker  <brobecker@adacore.com>
11852
11853         * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
11854
11855 2007-10-24  Daniel Jacobowitz  <dan@codesourcery.com>
11856
11857         * linux-low.c (handle_extended_wait): Handle unexpected signals.
11858
11859 2007-10-23  Daniel Jacobowitz  <dan@codesourcery.com>
11860
11861         * inferiors.c (change_inferior_id): Delete.
11862         (add_pid_to_list, pull_pid_from_list): New.
11863         * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
11864         (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
11865         (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
11866         (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
11867         (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
11868         (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
11869         (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
11870         (using_threads): Always set to 1.
11871         (handle_extended_wait): New.
11872         (add_process): Do not set TID.
11873         (linux_create_inferior): Set must_set_ptrace_flags.
11874         (linux_attach_lwp): Remove TID argument.  Do not check using_threads.
11875         Use PTRACE_SETOPTIONS.  Call new_thread_notify.  Update all callers.
11876         (linux_thread_alive): Rename TID argument to LWPID.
11877         (linux_wait_for_process): Handle unknown processes.  Do not use TID.
11878         (linux_wait_for_event): Do not use TID or check using_threads.  Update
11879         call to dead_thread_notify.  Call handle_extended_wait.
11880         (linux_create_inferior): Use PTRACE_SETOPTIONS.
11881         (send_sigstop): Delete sigstop_sent.
11882         (wait_for_sigstop): Avoid TID.
11883         (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
11884         (linux_test_for_tracefork): New.
11885         (linux_lookup_signals): Use thread_db_active and
11886         linux_supports_tracefork_flag.
11887         (initialize_low): Use thread_db_active and linux_test_for_tracefork.
11888         * linux-low.h (get_process_thread): Avoid TID.
11889         (struct process_ifo): Move thread_known and tid to the end.  Remove
11890         sigstop_sent.
11891         (linux_attach_lwp, thread_db_init): Update prototypes.
11892         * server.h (change_inferior_id): Delete prototype.
11893         (add_pid_to_list, pull_pid_from_list): New prototypes.
11894         * thread-db.c (thread_db_use_events): New.
11895         (find_first_thread): Rename to...
11896         (find_one_thread): ...this.  Update callers and messages.  Do not
11897         call fatal.  Check thread_db_use_events.  Do not call
11898         change_inferior_id or new_thread_notify.
11899         (maybe_attach_thread): Update.  Do not call new_thread_notify.
11900         (thread_db_init): Set thread_db_use_events.  Check use_events.
11901         * utils.c (fatal, warning): Correct message prefix.
11902
11903 2007-10-15  Daniel Jacobowitz  <dan@codesourcery.com>
11904
11905         * Makefile.in (clean): Remove new files.
11906         (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
11907         (powerpc-64.o, powerpc-64.c): New rules.
11908         * configure.srv: Use alternate register sets for powerpc64-*-linux*
11909         with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
11910         with SPE.
11911         * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
11912         SPE targets.
11913         (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
11914         (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
11915         (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
11916         (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
11917         (target_regsets): Add AltiVec and SPE register sets.
11918         * configure.ac: Check for AltiVec and SPE.
11919         * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
11920         (ppc_fill_vrregset, ppc_store_vrregset): New.
11921         (target_regsets): Add AltiVec register set.
11922         * configure: Regenerated.
11923
11924 2007-09-19  Daniel Jacobowitz  <dan@codesourcery.com>
11925
11926         * linux-low.c (O_LARGEFILE): Define.
11927         (linux_read_memory): Use /proc/PID/mem.
11928         * configure.ac: Use AC_GNU_SOURCE.  Check for pread64.
11929         * configure, config.in: Regenerated.
11930
11931 2007-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
11932
11933         * linux-low.c (linux_wait_for_event): Do not pass signals while
11934         single-stepping.
11935
11936 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11937
11938         * win32-low.c (create_process): New.
11939         (win32_create_inferior): Use create_process instead of
11940         CreateProcess.  If create_process failed retry appending an ".exe"
11941         suffix.  Store the GetLastError result immediatelly after
11942         create_process calls and use it on the call to error.
11943
11944 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11945
11946         * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11947
11948 2007-08-23  Joel Brobecker  <brobecker@adacore.com>
11949
11950         * configure.ac: Switch license to GPLv3.
11951
11952 2007-08-01  Michael Snyder  <msnyder@access-company.com>
11953
11954         * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11955
11956 2007-07-31  Pedro Alves  <pedro_alves@portugalmail.pt>
11957
11958         * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11959         typedef.
11960         (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11961         (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL.  Get
11962         CloseToolhelp32Snapshot.
11963         (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11964         CloseToolhelp32Snapshot.
11965
11966 2007-07-27  Michael Snyder  <michael.snyder@access-company.com>
11967
11968         * server.c (main): Check for inferior exit before main loop.
11969
11970 2007-07-18  Pedro Alves  <pedro_alves@portugalmail.pt>
11971
11972         * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11973         instead of on tmp_desc.
11974
11975 2007-07-17  Pedro Alves  <pedro_alves@portugalmail.pt>
11976             Daniel Jacobowitz  <dan@codesourcery.com>
11977
11978         * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11979         (add_thread): Minor cleanups.
11980         (clear_inferiors): Move lower in the file.  Clear the DLL
11981         list.
11982         (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11983         * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11984         (xml_escape_text): New.
11985         * server.c (handle_query): Handle qXfer:libraries:read.  Report it
11986         for qSupported.
11987         (handle_v_cont): Report errors.
11988         (gdbserver_version): Update.
11989         (main): Correct size of own_buf.  Do not report initial DLL events.
11990         * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11991         (unloaded_dll, xml_escape_text): New.
11992         * win32-low.c (enum target_waitkind): Update comments.
11993         (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11994         (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11995         (win32_EnumProcessModules, win32_GetModuleInformation)
11996         (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11997         (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11998         (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11999         (win32_Module32First, win32_Module32Next, load_toolhelp)
12000         (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
12001         (get_child_debug_event): Handle DLL events.
12002         (win32_wait): Likewise.
12003
12004 2007-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
12005
12006         * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
12007         * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
12008
12009 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
12010
12011         * win32-low.c (handle_output_debug_string): Ignore event if not
12012         waiting.
12013
12014 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
12015
12016         * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
12017
12018 2007-07-03  Daniel Jacobowitz  <dan@codesourcery.com>
12019
12020         * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
12021
12022 2007-07-02  Daniel Jacobowitz  <dan@codesourcery.com>
12023
12024         * inferiors.c (change_inferior_id): Add comment.
12025         * linux-low.c (check_removed_breakpoint): Add an early
12026         prototype.  Improve debug output.
12027         (linux_attach): Doc update.
12028         (linux_detach_one_process, linux_detach): Clean up before releasing
12029         each process.
12030         (send_sigstop, wait_for_sigstop): Improve comments and debug output.
12031         * linux-low.h (struct process_info): Doc improvement.
12032         * mem-break.c (delete_all_breakpoints): New.
12033         * mem-break.h (delete_all_breakpoints): New prototype.
12034         * thread-db.c (find_first_thread): New.
12035         (thread_db_create_event): Call it instead of
12036         thread_db_find_new_threads.  Clean up unused variables.
12037         (maybe_attach_thread): Remove first thread handling.
12038         (thread_db_find_new_threads): Use find_first_thread.
12039         (thread_db_get_tls_address): Likewise.
12040
12041 2007-06-27  Daniel Jacobowitz  <dan@codesourcery.com>
12042
12043         * thread-db.c (thread_db_find_new_threads): Add prototype.
12044         (thread_db_create_event): Check for the main thread before adding
12045         a new thread.
12046         (maybe_attach_thread): Only enable event reporting if TID == 0.
12047         (thread_db_get_tls_address): Check for new threads.
12048
12049 2007-06-20  Daniel Jacobowitz  <dan@codesourcery.com>
12050
12051         * linux-low.c (linux_create_inferior): Try execv before execvp.
12052         * spu-low.c (spu_create_inferior): Likewise.
12053
12054 2007-06-13  Mike Frysinger  <vapier@gentoo.org>
12055
12056         * linux-low.c (linux_create_inferior): Change execv to execvp.
12057         * spu-low.c (spu_create_inferior): Likewies.
12058
12059 2007-06-13  Daniel Jacobowitz  <dan@codesourcery.com>
12060
12061         * Makefile.in (clean): Clean new files instead of deleted ones.
12062         (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
12063         (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
12064         rules.
12065         * configure.srv: Specify XML files and new regformats for MIPS and
12066         MIPS64 GNU/Linux.
12067         * linux-mips-low.c (mips_num_regs): Set to only used registers.
12068         (mips_regmap): Do not fetch $0.  Remove unused registers.  Add
12069         an entry for the restart register.
12070         (mips_cannot_fetch_register, mips_cannot_store_register)
12071         (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
12072         register names to match the XML descriptions.
12073         (mips_fill_gregset, mips_store_gregset): Likewise.  Handle the
12074         restart register instead of $0.
12075
12076 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
12077             Markus Deuling  <deuling@de.ibm.com>
12078
12079         * remote-utils.c (decode_xfer_write): New function.
12080         * server.h (decode_xfer_write): Add prototype.
12081         * server.c (handle_query): Add PACKET_LEN argument.  Support
12082         qXfer:spu:read and qXfer:spu:write packets.
12083         (main): Pass packet_len to handle_query.
12084         * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
12085         * target.h (target_ops): Add qxfer_spu.
12086
12087 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
12088
12089         * spu-low.c (spu_proc_xfer_spu): Do not return failure when
12090         accessing non-seekable spufs files.
12091
12092 2007-05-16  Markus Deuling  <deuling@de.ibm.com>
12093
12094         * server.c (handle_query): Add reply for qC packet.
12095
12096 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
12097             Leo Zayas  <lerele@champenstudios@com>
12098
12099         * server.h (check_remote_input_interrupt_request): New function.
12100         * remote_utils.c (INVALID_DESCRIPTOR): New define.
12101         (remote_desc): Initialize with INVALID_DESCRIPTOR.
12102         (input_interrupt): Expose on USE_WIN32API too.  Fix whitespace.
12103         (check_remote_input_interrupt_request): New function.
12104         * server.h (check_remote_input_interrupt_request): Declare.
12105         * win32-low.c (winapi_DebugBreakProcess,
12106         winapi_GenerateConsoleCtrlEvent): New typedefs.
12107         (get_child_debug_event): Lower Win32 debug event polling from 1 sec
12108         to 250 ms.
12109         (win32_wait): Check for remote interrupt request
12110         with check_remote_input_interrupt_request.
12111         (win32_request_interrupt): New function.
12112         (win32_target_op): Set request_interrupt to win32_request_interrupt.
12113
12114 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
12115
12116         * win32-low.c (debug_registers_changed,
12117         debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
12118         CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
12119         CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
12120         (thread_rec): Get context using the low target.
12121         (child_add_thread): Call thread_added on the low target,
12122         which does the same thing.
12123         (regptr): Delete.
12124         (do_initial_child_stuff): Remove debug registers references.
12125         Set context using the low target.  Resume threads after
12126         setting the contexts.
12127         (child_continue): Remove dead variable.  Remove debug
12128         registers references.
12129         (child_fetch_inferior_registers): Go through the low target.
12130         (do_child_store_inferior_registers): Remove.
12131         (child_store_inferior_registers): Go through the low target.
12132         (win32_resume): Remove debug registers references.
12133         Set context using the low target.
12134         (handle_exception): Change return type to void.  Don't record
12135         context here.  Set status to TARGET_WAITKIND_SPURIOUS on a
12136         first chance exception.
12137         (get_child_debug_event): Change return type to void.  Remove
12138         goto loop.  Always return after waiting for debug event.
12139         (win32_wait): Convert to switch statement.  Handle spurious
12140         events.
12141
12142         * win32-i386-low.c (debug_registers_changed,
12143         debug_registers_used): New.
12144         (initial_stuff): Rename to ...
12145         (i386_initial_stuff): ... this.  Clear debug registers
12146         state variables.
12147         (store_debug_registers): Delete.
12148         (i386_get_thread_context): New.
12149         (load_debug_registers): Delete.
12150         (i386_set_thread_context): New.
12151         (i386_thread_added): New.
12152         (single_step): Rename to ...
12153         (i386_single_step): ... this.
12154         (do_fetch_inferior_registers): Rename to ...
12155         (i386_fetch_inferior_register): ... this.
12156         (i386_store_inferior_register): New.
12157         (the_low_target): Adapt to new interface.
12158
12159         * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
12160         (arm_get_thread_context): New.
12161         (arm_set_thread_context): New.
12162         (regptr): New.
12163         (do_fetch_inferior_registers): Rename to ...
12164         (arm_fetch_inferior_register): ... this.
12165         (arm_store_inferior_register): New.
12166         (arm_wince_breakpoint): Reimplement as unsigned long.
12167         (arm_wince_breakpoint_len): Define.
12168         (the_low_target): Adapt to new interface.
12169
12170         * win32-low.h (target_ops): Remove regmap, store_debug_registers and
12171         load_debug_registers.  Add get_thread_context, set_thread_context,
12172         thread_added and store_inferior_register.  Rename
12173         fetch_inferior_registers to fetch_inferior_register.
12174         (regptr): Remove declaration.
12175
12176 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
12177
12178         * linux-low.c (linux_detach): Change return type to int.  Return 0.
12179         * spu-low.c (spu_detach): Likewise.
12180
12181 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
12182
12183         * target.h (target_ops): Change return type of detach to int.
12184         Add join.
12185         (join_inferior): New.
12186         * server.c (main): Don't skip detach support on mingw32.
12187         If the inferior doesn't support detaching return error.
12188         Call join_inferior instead of using waitpid.
12189         * linux-low.c (linux_join): New.
12190         (linux_target_op): Add linux_join.
12191         * spu-low.c (spu_join): New.
12192         (spu_target_ops): Add spu_join.
12193         * win32-low.c (win32_detach): Adapt to new interface.
12194         Reopen current_process_handle before detaching.  Issue a child
12195         resume before detaching.
12196         (win32_join): New.
12197         (win32_target_op): Add win32_join.
12198
12199 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
12200
12201         * win32-low.c (win32-attach): Fix return value.
12202         * target.h (target_ops): Describe ATTACH return values.
12203
12204 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
12205
12206         * win32-low.c (GETPROCADDRESS): Define.
12207         (winapi_DebugActiveProcessStop): Add WINAPI.  typedef as pointer.
12208         (winapi_DebugSetProcessKillOnExit): Likewise.
12209         (win32_create_inferior): Force usage of ansi CreateProcessA.
12210         (win32_attach): Use GETPROCADDRESS.
12211         (win32_detach): Likewise.
12212
12213 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
12214
12215         * win32-low.c (win32_wait): Don't use WSTOPSIG.
12216
12217 2007-03-30  Pedro Alves  <pedro_alves@portugalmail.pt>
12218
12219         * win32-low.c: Commit leftover changes from 2007-03-29.
12220
12221 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
12222
12223         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
12224         fields short instead of int.  Add explicit padding.
12225         (i387_cache_to_fsave): Remove unnecessary casts.
12226         (i387_fsave_to_cache): Doc fix.
12227         (i387_cache_to_fxsave): Remove unnecessary casts and masking.
12228
12229 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
12230
12231         * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
12232         (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
12233
12234 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
12235
12236         * configure.srv (arm*-*-mingw32ce*): Move near the other
12237         arm targets.
12238
12239 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
12240
12241         * configure.ac: Add errno checking.
12242         (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
12243         sys/file.h and malloc.h.
12244         (AC_CHECK_DECLS): Add perror.
12245         (srv_mingwce): Handle.
12246         * configure.srv (i[34567]86-*-cygwin*): Add
12247         win32-i386-low.o to srv_tgtobj.
12248         (i[34567]86-*-mingw*): Likewise.
12249         (arm*-*-mingw32ce*): Add case.
12250         * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12251         HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
12252         [__MINGW32CE__] (strerror): New function.
12253         [__MINGW32CE__] (errno): Define to GetLastError.
12254         [__MINGW32CE__] (COUNTOF): New macro.
12255         (remote_open): Remove extra close call.
12256         * mem-break.c (delete_breakpoint_at): New function.
12257         * mem-break.h (delete_breakpoint_at): Declare.
12258         * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12259         HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
12260         [USE_WIN32API] (read, write): Add char* casts.
12261         * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
12262         * server.h: Include wincecompat.h on Windows CE.
12263         [HAVE_ERRNO_H]: Check.
12264         (perror): Declare if not declared.
12265         * utils.c: Add stdlib.h, errno.h and malloc.h includes.
12266         (perror_with_name): Remove errno declaration.
12267         * wincecompat.h: New.
12268         * wincecompat.c: New.
12269         * win32-low.h: New.
12270         * win32-arm-low.c: New.
12271         * win32-i386-low.c: New.
12272         (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
12273         (OUTMSG2): Make it safe.
12274         (_T): New macro.
12275         (COUNTOF): New macro.
12276         (NUM_REGS): Get it from the low target.
12277         (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
12278         CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
12279         (thread_rec): Let low target handle debug registers.
12280         (child_add_thread): Likewise.
12281         (child_init_thread_list): Likewise.
12282         (continue_one_thread): Likewise.
12283         (regptr): New.
12284         (do_child_fetch_inferior_registers): Move to ...
12285         * win32-i386-low.c: ... here, and rename to ...
12286         (do_fetch_inferior_registers): ... this.
12287         * win32-low.c (child_fetch_inferior_registers):
12288         Go through the low target.
12289         (do_child_store_inferior_registers): Use regptr.
12290         (strwinerror): New function.
12291         (win32_create_inferior): Handle Windows CE.
12292         Use strwinerror instead of strerror on Windows error
12293         codes.  Add program to the error output.
12294         Don't close the main thread handle on Windows CE.
12295         (win32_attach): Use coredll.dll on Windows CE.
12296         (win32_kill): Close current process and current
12297         thread handles.
12298         (win32_detach): Use coredll.dll on Windows CE.
12299         (win32_resume): Let low target handle debug registers, and
12300         step request.
12301         (handle_exception): Add/Remove initial breakpoint.  Avoid
12302         non-existant WSTOPSIG on Windows CE.
12303         (win32_read_inferior_memory): Cast to remove warning.
12304         (win32_arch_string): Go through the low target.
12305         (initialize_low): Call set_breakpoint_data with the low
12306         target's breakpoint.
12307         * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
12308         FOP_REGNUM, mappings): Move to ...
12309         * win32-i386-low.c: ... here.
12310         * win32-low.c (win32_thread_info): Move to ...
12311         * win32-low.h: ... here.
12312         * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
12313         win32-arm-low.c and wincecompat.c.
12314         (all:): Add $EXEEXT.
12315         (install-only:): Likewise.
12316         (gdbserver:): Likewise.
12317         (gdbreplay:): Likewise.
12318         * config.in: Regenerate.
12319         * configure: Regenerate.
12320
12321 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
12322
12323         * win32-low.c: Rename typedef thread_info to
12324         win32_thread_info throughout.
12325
12326 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
12327
12328         * win32-i386-low.c: Rename to ...
12329         * win32-low.c: ... this.
12330         * configure.srv: Replace win32-i386-low.o with win32-low.o.
12331         * Makefile.in: Likewise.
12332
12333 2007-03-27  Pedro Alves  <pedro_alves@portugalmail.pt>
12334
12335         * remote-utils.c (monitor_output): Constify msg parameter.
12336         * server.h (monitor_output): Likewise.
12337         * win32-i386-low.c (handle_output_debug_string): New.
12338         (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
12339         handle_output_debug_string.
12340         (get_child_debug_event): Likewise.
12341
12342 2007-03-27  Mat Hostetter  <mat@lcs.mit.edu>
12343
12344         * server.c (main): Correct strtoul check.
12345
12346 2007-03-27  Jon Ringle  <jon@ringle.org>
12347
12348         * linux-low.c: Check __ARCH_HAS_MMU__ also.
12349
12350 2007-03-27  Brooks Moses  <brooks.moses@codesourcery.com>
12351
12352         * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
12353
12354 2007-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
12355
12356         * terminal.h: Check HAVE_SGTTY_H.
12357
12358 2007-02-27  Mat Hostetter  <mat@lcs.mit.edu>
12359
12360         * remote-utils.c (remote_open): Print out the assigned port number.
12361
12362 2007-02-26  Daniel Jacobowitz  <dan@codesourcery.com>
12363
12364         * remote-utils.c (monitor_output): New function.
12365         * server.c (debug_threads): Define here.
12366         (monitor_show_help): New function.
12367         (handle_query): Handle qRcmd.
12368         (main): Do not handle 'd' packet.
12369         * server.h (debug_threads, remote_debug, monitor_output): Declare.
12370         * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
12371         of debug_threads.
12372
12373 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
12374
12375         * Makefile.in (EXEEXT): New.
12376         (clean): Use $(EXEEXT).
12377
12378 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
12379
12380         * target.h (target_ops): Rename send_signal to request_interrupt,
12381         and remove enum target_signal parameter.
12382         * linux-low.c (linux_request_interrupt): Rename from
12383         linux_send_signal, and always send SIGINT.
12384         * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
12385         and always send SIGINT.
12386         * remote-utils.c (putpkt_binary): Call request_interrupt, instead
12387         of send_signal.
12388         (input_interrupt): Likewise.
12389
12390 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
12391
12392         * server.c (get_features_xml): Check if target implemented
12393         arch_string.
12394         * win32-i386-low.c (win32_arch_string): New.
12395         (win32_target_ops): Add win32_arch_string as arch_string member.
12396
12397 2007-02-22  Markus Deuling  <deuling@de.ibm.com>
12398
12399         * spu-low.c (spu_arch_string): New.
12400         (spu_target_ops): Add spu_arch_string.
12401
12402 2007-02-16  Daniel Jacobowitz  <dan@codesourcery.com>
12403
12404         * remote-utils.c: Remove HAVE_TERMINAL_H check.
12405         * configure.ac: Do not check for terminal.h.
12406         * configure, config.in: Regenerated.
12407
12408 2007-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
12409
12410         * Makefile.in (OBS): Add $(XML_BUILTIN).
12411         (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
12412         (clean): Update.
12413         (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
12414         (arm-with-iwmmxt.c): New.
12415         * config.in, configure: Regenerate.
12416         * configure.ac: Check for iWMMXt.  Handle srv_xmltarget,
12417         srv_xmlbuiltin, and srv_xmlfiles.  Define USE_XML.
12418         * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
12419         (arm*-*-linux*): Add iWMMXt and regset support.
12420         * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
12421         (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
12422         (arm_store_wmmxregset, target_regsets): New.
12423         * server.c (get_features_xml): Take annex argument.  Check builtin
12424         XML documents.
12425         (handle_query): Handle multiple annexes.
12426
12427 2007-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
12428
12429         * remote-utils.c [USE_WIN32API] (read, write): Define.
12430         (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
12431         write.
12432
12433 2007-01-09  Daniel Jacobowitz  <dan@codesourcery.com>
12434
12435         * linux-i386-low.c (the_low_target): Set arch_string.
12436         * linux-x86-64-low.c (the_low_target): Likewise.
12437         * linux-low.c (linux_arch_string): New.
12438         (linux_target_ops): Add it.
12439         * linux-low.h (struct linux_target_ops): Add arch_string.
12440         * server.c (write_qxfer_response): Use const void * for DATA.
12441         (get_features_xml): New.
12442         (handle_query): Handle qXfer:features:read.  Report it for qSupported.
12443         * target.h (struct target_ops): Add arch_string method.
12444
12445 2007-01-03  Denis Pilat  <denis.pilat@st.com>
12446             Daniel Jacobowitz  <dan@codesourcery.com>
12447
12448         * linux-low.c (linux_kill): Handle being called with no threads.
12449         * win32-i386-low.c (win32_kill): Likewise.
12450         (get_child_debug_event): Clear current_process_handle.
12451
12452 2006-12-30  Denis PILAT  <denis.pilat@st.com>
12453             Daniel Jacobowitz  <dan@codesourcery.com>
12454
12455         * remote-utils.c (remote_open): Check the type of specified
12456         serial port devices before opening them.
12457         * server.c (main): Kill the inferior if an error occurs during
12458         the first remote_open.
12459
12460 2006-12-05  Markus Deuling  <deuling@de.ibm.com>
12461
12462         * README: Update supported targets.
12463
12464 2006-11-28  Daniel Jacobowitz  <dan@codesourcery.com>
12465
12466         * Makefile.in (clean): Remove reg-mips64.c.
12467         (reg-mips64.c, reg-mips64.o): New rules.
12468         * configure.srv: Handle mips64.  Include regset support for mips.
12469         * linux-mips-low.c (union mips_register): New.
12470         (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
12471         (mips_breakpoint, mips_breakpoint_at): Use int.
12472         (mips_collect_register, mips_supply_register)
12473         (mips_collect_register_32bit, mips_supply_register_32bit)
12474         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12475         (mips_store_fpregset, target_regsets): New.
12476         * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
12477
12478 2006-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
12479
12480         * configure.srv: Add target "spu*-*-*".
12481         * Makefile.in (clean): Remove reg-spu.c.
12482         (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
12483         * spu-low.c: New file.
12484
12485 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
12486
12487         * configure.ac: Correct td_thr_tls_get_addr test.
12488         * configure: Regenerated.
12489
12490 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
12491
12492         * linux-low.c (linux_wait_for_event): Reformat.  Use the
12493         pass_signals array.
12494         * remote-utils.c (decode_address_to_semicolon): New.
12495         * server.c (pass_signals, handle_general_set): New.
12496         (handle_query): Mention QPassSignals for qSupported.
12497         (main): Call handle_general_set.
12498         * server.h (pass_signals, decode_address_to_semicolon): New.
12499
12500 2006-11-06  Daniel Jacobowitz  <dan@codesourcery.com>
12501
12502         * server.c (handle_query): Correct error handling for read_auxv.
12503
12504 2005-10-19  Ulrich Weigand  <uweigand@de.ibm.com>
12505
12506         * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
12507         and srv_linux_thread_db to yes.
12508         * linux-s390-low.c (s390_fill_gregset): New function.
12509         (target_regsets): Define data structure.
12510
12511 2006-10-17  Daniel Jacobowitz  <dan@codesourcery.com>
12512
12513         * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
12514         * configure.ac: Use it.  Define HAVE_TD_THR_TLS_GET_ADDR.
12515         * config.in, configure: Regenerated.
12516         * inferiors.c (gdb_id_to_thread): New function.
12517         (gdb_id_to_thread_id): Use it.
12518         * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
12519         * linux-low.h (struct process_info): Add th member.
12520         (thread_db_get_tls_address): New prototype.
12521         * remote-utils.c (decode_address): Make non-static.
12522         * server.c (handle_query): Handle qGetTLSAddr.
12523         * server.h (gdb_id_to_thread, decode_address): New prototypes.
12524         * target.h (struct target_ops): Add get_tls_address.
12525         * thread-db.c (maybe_attach_thread): Save the thread handle.
12526         (thread_db_get_tls_address): New.
12527
12528 2006-09-28  Daniel Jacobowitz  <dan@codesourcery.com>
12529
12530         * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
12531         (linux_resume_one_process): Take a siginfo_t *.  Update all
12532         callers.  Queue it if necessary.  Use PTRACE_SETSIGINFO.
12533         (struct pending_signals): Add a siginfo_t.
12534         (linux_wait_for_process): Always set last_status.
12535         (linux_wait_for_event): Use PTRACE_GETSIGINFO.
12536         (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
12537         * linux-low.h (struct process_info): Add last_status.
12538
12539 2006-09-21  Daniel Jacobowitz  <dan@codesourcery.com>
12540
12541         * remote-utils.c (try_rle): New function.
12542         (putpkt_binary): Use it.
12543
12544 2006-08-19  Daniel Jacobowitz  <dan@codesourcery.com>
12545
12546         * Makefile.in (clean): Clean reg-x86-64-linux.c.
12547         (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
12548         * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
12549         * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
12550         (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
12551         point registers.
12552
12553 2006-08-08  Richard Sandiford  <richard@codesourcery.com>
12554
12555         * server.c (terminal_fd): New variable.
12556         (old_foreground_pgrp): Likewise.
12557         (restore_old_foreground_pgrp): New function.
12558         (start_inferior): Record the terminal file descriptor in terminal_fd
12559         and its original foreground group in old_foreground_pgrp.  Register
12560         restore_old_foreground_pgrp with atexit().
12561
12562 2006-07-26  Daniel Jacobowitz  <dan@codesourcery.com>
12563
12564         * server.c (handle_query): Correct qPart to qXfer.
12565
12566 2006-07-22  Daniel Jacobowitz  <dan@codesourcery.com>
12567
12568         * configure.ac: Check for more headers which are missing on
12569         Windows.  Automatically supply -lwsock32 and USE_WIN32API.
12570         * configure.srv: Add Cygwin and mingw32.
12571         * remote-utils.c: Don't include headers unconditionally which
12572         are missing on mingw32.  Include <winsock.h> for mingw32.
12573         (remote_open): Adjust for mingw32 support.  Flush
12574         standard error after writing to it.
12575         (remote_close, putpkt_binary, input_interrupt, block_async_io)
12576         (unblock_async_io, enable_async_io, disable_async_io)
12577         (readchar, getpkt): Update for Winsock support.
12578         (prepare_resume_reply): Expect a protocol signal number.
12579         * server.c: Disable <sys/wait.h> on mingw32.
12580         (start_inferior): Adjust for mingw32 support.  Flush
12581         standard error after writing to it.
12582         (attach_inferior): Likewise.  Use protocol signal
12583         numbers.
12584         (main): Skip 'D' packet on mingw32.  Use protocol signal numbers
12585         and names.
12586         * win32-i386-low.c: New file.
12587         * Makefile.in (XM_CLIBS): Set.
12588         (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
12589         (win32-i386-low.o): New dependency rule.
12590         * linux-low.c (linux_wait): Use target signal numbers.
12591         * target.h (struct target_ops): Doc fix.
12592         * server.h (target_signal_to_name): New prototype.
12593         * gdbreplay.c: Don't include headers unconditionally which
12594         are missing on mingw32.  Include <winsock.h> for mingw32.
12595         (remote_close, remote_open): Adjust for Winsock support.
12596         * configure, config.in: Regenerated.
12597
12598 2006-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
12599
12600         * server.c (decode_xfer_read, write_qxfer_response): New.
12601         (handle_query): Take a packet length argument.  Handle
12602         qXfer:auxv:read instead of qPart:auxv:read.  Mention it in
12603         the qSupported response.
12604         (main): Update call to handle_query.
12605
12606 2006-06-22  Daniel Jacobowitz  <dan@codesourcery.com>
12607
12608         * remote-utils.c (remote_escape_output, remote_unescape_input): New.
12609         (putpkt_binary): Renamed from putpkt and adjusted for binary
12610         data.
12611         (putpkt): New wrapper for putpkt_binary.
12612         (readchar): Don't mask off the high bit.
12613         (decode_X_packet): New function.
12614         * server.c (main): Call putpkt_binary if a handler sets the packet
12615         length.  Save the length of the incoming packet.  Handle 'X'.
12616         * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
12617
12618 2006-06-21  Daniel Jacobowitz  <dan@codesourcery.com>
12619
12620         * server.c (handle_query): Handle qSupported.
12621
12622 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
12623
12624         * remote-utils.c (all_symbols_looked_up): New variable.
12625         (look_up_one_symbol): Check it.
12626         * server.h (look_up_one_symbol): New declaration.
12627         * thread-db.c (thread_db_init): Set all_symbols_looked_up.
12628
12629 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
12630
12631         * Makefile.in (linux-arm-low.o): Update dependencies.
12632         * linux-arm-low.c: Include "gdb_proc_service.h".
12633         (PTRACE_GET_THREAD_AREA): Define.
12634         (ps_get_thread_area): New function.
12635
12636 2006-05-09  Nathan Sidwell  <nathan@codesourcery.com>
12637
12638         * configure.srv (m68k*-*-uclinux*): New target.
12639         * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
12640         (linux_resume_one_process): Remove extraneous cast.
12641         (linux_read_offsets): New.
12642         (linux_target_op): Add linux_read_offsets on mmuless systems.
12643         * server.c (handle_query): Add qOffsets logic.
12644         * target.h (struct target_ops): Add read_offsets.
12645
12646 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
12647
12648         * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
12649         (PTRACE_GET_THREAD_AREA): Define.
12650         (ps_get_thread_area): New function.
12651         * Makefile.in (linux-i386-low.o, linux-mips-low.o)
12652         (linux-x86-64-low.o): Update.
12653
12654 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
12655
12656         * configure.ac: Remove checks for prfpregset_t.
12657         * gdb_proc_service.h: New file.
12658         * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
12659         new "gdb_proc_service.h".
12660         * proc-service.c: Likewise.
12661         (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
12662         (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
12663         * Makefile.in (gdb_proc_service_h): Updated.
12664         * configure, config.in: Regenerated.
12665
12666 2006-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
12667
12668         * remote-utils.c (prepare_resume_reply): Move declaration
12669         of gdb_id_from_wait to the top of the block.
12670
12671 2006-02-15  Daniel Jacobowitz  <dan@codesourcery.com>
12672
12673         * linux-low.c (regsets_store_inferior_registers): Read the regset
12674         from the target before filling it.
12675
12676 2006-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
12677
12678         * server.c (attach_inferior): Return SIGTRAP for a successful
12679         attach.
12680
12681 2006-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
12682
12683         * Makefile.in (OBS): Add version.o.
12684         (STAGESTUFF): Delete.
12685         (version.o): Add dependencies.
12686         (version.c): Replace rule.
12687         (clean): Remove version.c.
12688         * server.c (gdbserver_version): New.
12689         (gdbserver_usage): Use printf.
12690         (main): Handle --version and --help.
12691         * server.h (version, host_name): Add declarations.
12692
12693 2005-12-23  Eli Zaretskii  <eliz@gnu.org>
12694
12695         * linux-arm-low.c:
12696         * linux-arm-low.c:
12697         * inferiors.c:
12698         * i387-fp.h:
12699         * i387-fp.c:
12700         * gdbreplay.c:
12701         * regcache.c:
12702         * proc-service.c:
12703         * mem-break.h:
12704         * mem-break.c:
12705         * linux-x86-64-low.c:
12706         * linux-sh-low.c:
12707         * linux-s390-low.c:
12708         * linux-ppc64-low.c:
12709         * linux-ppc-low.c:
12710         * linux-mips-low.c:
12711         * linux-m68k-low.c:
12712         * linux-m32r-low.c:
12713         * linux-low.h:
12714         * linux-low.c:
12715         * linux-ia64-low.c:
12716         * linux-i386-low.c:
12717         * linux-crisv32-low.c:
12718         * thread-db.c:
12719         * terminal.h:
12720         * target.h:
12721         * target.c:
12722         * server.h:
12723         * server.c:
12724         * remote-utils.c:
12725         * regcache.h:
12726         * utils.c:
12727         * Makefile.in:
12728         * configure.ac:
12729         * gdbserver.1: Add (C) after Copyright.  Update the FSF
12730         address.
12731
12732 2005-11-13  Daniel Jacobowitz  <dan@codesourcery.com>
12733
12734         * linux-arm-low.c (arm_eabi_breakpoint): New variable.
12735         (arm_breakpoint_at): Recognize both breakpoints.
12736         (the_low_target): Use the correct breakpoint instruction.
12737
12738 2005-11-02  Daniel Jacobowitz  <dan@codesourcery.com>
12739
12740         * configure.srv (x86_64-*-linux*): Turn on thread_db support.
12741         * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
12742         (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
12743         (the_low_target): Update.
12744
12745 2005-10-25  Andreas Schwab  <schwab@suse.de>
12746
12747         * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
12748
12749         * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
12750         (ia64_num_regs): Reduce to 462.
12751
12752 2005-09-17  Daniel Jacobowitz  <dan@codesourcery.com>
12753
12754         * acinclude.m4: Correct quoting.
12755         * aclocal.m4: Regenerated.
12756
12757         Suggested by SZOKOVACS Robert <szo@ies.hu>:
12758         * thread-db.c (thread_db_err_str): Handle TD_VERSION.
12759         (thread_db_init): Call thread_db_err_str.
12760         * configure.ac: Check for TD_VERSION.
12761         * config.in, configure: Regenerated.
12762
12763 2005-07-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12764
12765         * server.h (error, fatal, warning): Add ATTR_FORMAT.
12766
12767 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
12768
12769         * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
12770         is not available.  Define HAVE_PTRACE_GETREGS if it is.
12771         * config.in, configure: Regenerated.
12772         * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
12773         * linux-i386-low.c, linux-m68k-low.c: Update to use
12774         HAVE_PTRACE_GETREGS.
12775         * linux-low.c (regsets_fetch_inferior_registers)
12776         (regsets_store_inferior_registers): Only return 0 if we processed
12777         GENERAL_REGS.
12778         * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
12779         * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
12780
12781 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
12782
12783         * inferiors.c (struct thread_info): Add gdb_id.
12784         (add_thread): Add gdb_id argument.
12785         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
12786         * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
12787         calls to add_thread.
12788         * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
12789         * server.c (handle_query): Use thread_to_gdb_id.
12790         (handle_v_cont, main): Use gdb_id_to_thread_id.
12791         * server.h (add_thread): Update prototype.
12792         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
12793         prototypes.
12794
12795 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
12796
12797         * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
12798         left-padded registers.
12799         * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
12800         * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
12801
12802 2005-07-01  Steve Ellcey  <sje@cup.hp.com>
12803
12804         * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
12805         * configure: Regenerate.
12806         * config.in: Regenerate.
12807         * server.h (NEED_DECLARATION_STRERROR):
12808         Replace with !HAVE_DECL_STRERROR.
12809
12810 2005-06-16  Daniel Jacobowitz  <dan@codesourcery.com>
12811
12812         * linux-low.c (linux_wait, linux_send_signal): Don't test
12813         an unsigned long variable for > 0 if it could be MAX_ULONG.
12814         * server.c (myresume): Likewise.
12815         * target.c (set_desired_inferior): Likewise.
12816
12817 2005-06-13  Mark Kettenis  <kettenis@gnu.org>
12818
12819         * configure.ac: Simplify and improve check for socklen_t.
12820         * configure, config.in: Regenerate.
12821
12822 2005-06-12  Daniel Jacobowitz  <dan@codesourcery.com>
12823
12824         * acconfig.h: Remove.
12825         * configure.ac: Add a test for socklen_t.  Use three-argument
12826         AC_DEFINE throughout.
12827         * config.in: Regenerated using autoheader 2.59.
12828         * configure: Regenerated.
12829
12830         * gdbreplay.c (socklen_t): Provide a default.
12831         (remote_open): Use socklen_t.
12832         * remote-utils.c (socklen_t): Provide a default.
12833         (remote_open): Use socklen_t.
12834         (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
12835         unsigned char.
12836
12837         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
12838         char for buffers.
12839         * linux-low.c (linux_read_memory, linux_write_memory)
12840         (linux_read_auxv): Likewise.
12841         * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
12842         (check_mem_write): Likewise.
12843         * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
12844         Likewise.
12845         * regcache.c (struct inferior_rgcache_data, registers_to_string)
12846         (registers_from_string, register_data): Likewise.
12847         * server.c (handle_query, main): Likewise.
12848         * server.h (convert_ascii_to_int, convert_int_to_ascii)
12849         (decode_M_packet): Likewise.
12850         * target.c (read_inferior_memory, write_inferior_memory): Likewise.
12851         * target.h (struct target_ops): Update read_memory, write_memory,
12852         and read_auxv.
12853         (read_inferior_memory, write_inferior_memory): Update.
12854         * linux-low.h (struct linux_target_ops): Change type of breakpoint
12855         to unsigned char *.
12856         * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
12857         linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
12858         linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
12859         linux-s390-low.c, linux-sh-low.c: Update for changes in
12860         read_inferior_memory and the_low_target->breakpoint.
12861
12862 2005-05-28  Daniel Jacobowitz  <dan@codesourcery.com>
12863
12864         * Makefile.in (SFILES): Add linux-ppc64-low.c.
12865         (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
12866         * configure.srv: Add powerpc64-*-linux*.
12867         * linux-ppc64-low.c: New file.
12868
12869 2005-05-23  Orjan Friberg  <orjanf@axis.com>
12870
12871         * linux-cris-low.c: New file with support for CRIS.
12872         * linux-crisv32-low.c: Ditto for CRISv32.
12873         * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
12874         (clean): Add reg-cris.c and reg-crisv32.c.
12875         Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
12876         reg-crisv32.o, and reg-crisv32.c to make rules.
12877         * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
12878         recognized targets.
12879
12880 2005-05-16  Ulrich Weigand  <uweigand@de.ibm.com>
12881
12882         * linux-low.c (fetch_register): Ensure buffer size is a multiple
12883         of sizeof (PTRACE_XFER_TYPE).
12884         (usr_store_inferior_registers): Likewise.  Zero out excess bytes.
12885
12886 2005-05-12  Orjan Friberg  <orjanf@axis.com>
12887
12888         * target.h (struct target_ops): Add insert_watchpoint,
12889         remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
12890         pointers for hardware watchpoint support.
12891         * linux-low.h (struct linux_target_ops): Ditto.
12892         * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
12893         (linux_stopped_by_watchpoint, linux_stopped_data_address): New.  Add
12894         to linux_target_ops.
12895         * remote-utils.c (prepare_resume_reply): Add watchpoint information to
12896         reply packet.
12897         * server.c (main): Recognize 'Z' and 'z' packets.
12898
12899 2005-05-10  Ulrich Weigand  <uweigand@de.ibm.com>
12900
12901         * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
12902         (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
12903         (the_low_target): Add new members.
12904
12905 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
12906
12907         * proc-service.c (ps_lgetregs): Search all_processes instead of
12908         all_threads.
12909
12910 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
12911
12912         * server.c (start_inferior): Change return type to int.
12913         (attach_inferior): Change sigptr to int *.
12914         (handle_v_cont, handle_v_requests): Change signal to int *.
12915         (main): Change signal to int.
12916
12917 2005-04-15  Kei Sakamoto  <sakamoto.kei@renesas.com>
12918
12919         * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
12920         * configure.srv: Add m32r*-*-linux*.
12921         * linux-m32r-low.c: New file.
12922
12923 2005-03-04  Daniel Jacobowitz  <dan@codesourcery.com>
12924
12925         * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
12926
12927 2005-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
12928
12929         * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
12930         Take unsigned long arguments for PIDs.
12931         * linux-low.c (add_process, linux_attach_lwp, linux_attach)
12932         (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
12933         (wait_for_sigstop, linux_resume_one_process)
12934         (regsets_fetch_inferior_registers, linux_send_signal)
12935         (linux_read_auxv): Likewise.  Update the types of variables holding
12936         PIDs.  Update format string specifiers.
12937         * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
12938         * remote-utils.c (prepare_resume_reply): Likewise.
12939         * server.c (cont_thread, general_thread, step_thread)
12940         (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
12941         unsigned long.
12942         (handle_query): Update format specifiers.
12943         (handle_v_cont, main): Use strtoul for thread IDs.
12944         * server.h (struct inferior_list_entry): Use unsigned long for ID.
12945         (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12946         (general_thread, step_thread, thread_from_wait)
12947         (old_thread_from_wait): Update.
12948         * target.h (struct thread_resume): Use unsigned long for THREAD.
12949         (struct target_ops): Use unsigned long for arguments to attach and
12950         thread_alive.
12951
12952 2005-02-24  Daniel Jacobowitz  <dan@codesourcery.com>
12953
12954         * acinclude.m4: Include bfd/bfd.m4 directly.
12955         * configure.ac: Use AC_ARG_PROGRAM.  Suggested by Aron Griffis
12956         <agriffis@toolchain.org>.
12957         * aclocal.m4, configure: Regenerated.
12958
12959 2005-01-07  Andrew Cagney  <cagney@gnu.org>
12960
12961         * configure.ac: Rename configure.in, require autoconf 2.59.
12962         * configure: Re-generate.
12963
12964 2004-12-08  Daniel Jacobowitz  <dan@debian.org>
12965
12966         * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area.  Reset
12967         LIBS when finished.
12968         * aclocal.m4: Regenerated.
12969         * configure: Regenerated.
12970
12971 2004-11-21  Andreas Schwab  <schwab@suse.de>
12972
12973         * linux-m68k-low.c (m68k_num_gregs): Define.
12974         (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12975         (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12976         (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12977         (m68k_breakpoint_at): New.  Add to the_low_target.
12978
12979         * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12980         srv_linux_thread_db to yes.
12981
12982 2004-10-20  Joel Brobecker  <brobecker@gnat.com>
12983
12984         * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12985         (ARCH_SET_FS): Likewise.
12986         (ARCH_GET_FS): Likewise.
12987         (ARCH_GET_GS): Likewise.
12988
12989 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
12990
12991         * linux-i386-low.c (ps_get_thread_area): New.
12992         * linux-x86-64-low.c (ps_get_thread_area): New.
12993         * linux-low.c: Include <sys/syscall.h>.
12994         (linux_kill_one_process): Don't kill the first thread here.
12995         (linux_kill): Kill the first thread here.
12996         (kill_lwp): New function.
12997         (send_sigstop, linux_send_signal): Use it.
12998         * proc-service.c: Clean up #ifdefs.
12999         (fpregset_info): Delete.
13000         (ps_lgetregs): Update and enable implementation.
13001         (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
13002         implementations.
13003         * remote-utils.c (struct sym_cache, symbol_cache): New.
13004         (input_interrupt): Print a clearer message.
13005         (async_io_enabled): New variable.
13006         (enable_async_io, disable_async_io): Use it.  Update comments.
13007         (look_up_one_symbol): Use the symbol cache.
13008         * thread-db.c (thread_db_look_up_symbols): New function.
13009         (thread_db_init): Update comments.  Call thread_db_look_up_symbols.
13010
13011 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
13012
13013         * configure.in: Test for -rdynamic.
13014         * configure: Regenerated.
13015         * Makefile (INTERNAL_LDFLAGS): New.
13016         (gdbserver, gdbreplay): Use it.
13017
13018 2004-09-02  Andrew Cagney  <cagney@gnu.org>
13019
13020         * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
13021
13022 2004-03-23  Daniel Jacobowitz  <drow@mvista.com>
13023
13024         * linux-low.c (linux_wait): Clear all_processes list also.
13025
13026 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
13027
13028         * linux-low.c: Include <errno.h>.  Remove extern declaration of
13029         errno.
13030
13031 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
13032
13033         * gdbreplay.c, server.h, utils.c: Update copyright years.
13034
13035 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
13036
13037         * server.c (main): Print child status or termination signal from
13038         variable 'signal', not 'sig'.
13039
13040 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
13041
13042         * linux-low.c (linux_read_memory): Change return type to
13043         int.  Check for and return error from ptrace().
13044         * target.c (read_inferior_memory): Change return type to int.  Pass
13045         back return status from the_target->read_memory().
13046         * target.h (struct target_ops): Adapt *read_memory() prototype.
13047         Update comment.
13048         (read_inferior_memory): Adapt prototype.
13049         * server.c (main): Return an error packet if
13050         read_inferior_memory() returns an error.
13051
13052 2004-03-04  Daniel Jacobowitz  <drow@mvista.com>
13053
13054         * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
13055         Unify with other clean targets.
13056
13057 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
13058
13059         * server.c (handle_v_cont): Call set_desired_inferior.
13060
13061 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
13062
13063         * remote-utils.c (prepare_resume_reply): Always supply "thread:".
13064
13065 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
13066
13067         * linux-low.c (linux_wait): Unblock async I/O.
13068         (linux_resume): Block and enable async I/O.
13069         * remote-utils.c (block_async_io, unblock_async_io): New functions.
13070         * server.h (block_async_io, unblock_async_io): Add prototypes.
13071
13072 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
13073
13074         * remote-utils.c (remote_open): Print a status notice after
13075         opening a TCP port.
13076         * server.c (attach_inferior): Print a status notice after
13077         attaching.
13078
13079 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
13080
13081         * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
13082
13083 2004-02-26  Daniel Jacobowitz  <drow@mvista.com>
13084
13085         * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
13086         error packet.
13087         * server.c, target.h: Update copyright years.
13088
13089 2004-02-25  Roland McGrath  <roland@redhat.com>
13090
13091         * target.h (struct target_ops): New member `read_auxv'.
13092         * server.c (handle_query): Handle qPart:auxv:read: query using that.
13093         * linux-low.c (linux_read_auxv): New function.
13094         (linux_target_ops): Initialize `read_auxv' member to that.
13095
13096 2004-02-17  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
13097
13098         Committed by Jim Blandy  <jimb@redhat.com>.
13099
13100         * linux-s390-low.c (s390_num_regs): Update.
13101         (s390_regmap): Remove control registers.  Use __s390x__ predefine
13102         instead of GPR_SIZE to distiguish s390 and s390x targets.
13103
13104 2004-01-31  Daniel Jacobowitz  <drow@mvista.com>
13105
13106         * linux-low.c: Update copyright year.
13107         (check_removed_breakpoint): Clear pending_is_breakpoint.
13108         (linux_set_resume_request, linux_queue_one_thread)
13109         (resume_status_pending_p): New functions.
13110         (linux_continue_one_thread): Use process->resume.
13111         (linux_resume): Only resume threads if there are no pending events.
13112         * linux-low.h (struct process_info): Add resume request
13113         pointer.
13114
13115 2004-01-30  Daniel Jacobowitz  <drow@mvista.com>
13116
13117         * regcache.c (new_register_cache): Clear the allocated register
13118         buffer.  Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
13119
13120 2003-10-13  Daniel Jacobowitz  <drow@mvista.com>
13121
13122         * linux-low.c (linux_resume): Take a struct thread_resume *
13123         argument.
13124         (linux_wait): Update call.
13125         (resume_ptr): New static variable.
13126         (linux_continue_one_thread): Renamed from
13127         linux_continue_one_process.  Use resume_ptr.
13128         (linux_resume): Use linux_continue_one_thread.
13129         * server.c (handle_v_cont, handle_v_requests): New functions.
13130         (myresume): New function.
13131         (main): Handle 'v' case.
13132         * target.h (struct thread_resume): New type.
13133         (struct target_ops): Change argument of "resume" to struct
13134         thread_resume *.
13135         (myresume): Delete macro.
13136
13137 2003-08-08  H.J. Lu  <hongjiu.lu@intel.com>
13138
13139         * Makefile.in (install-only): Create dest dir. Support DESTDIR.
13140         (uninstall): Support DESTDIR.
13141
13142 Mon Jul 21 20:09:34 UTC 2003  Brendan Conoboy  <blc@redhat.com>
13143
13144         * configure.srv: Add xscale*linux copy of arm*linux entry.
13145
13146 2003-07-24  Daniel Jacobowitz  <drow@mvista.com>
13147
13148         * linux-arm-low.c (arm_reinsert_addr): New function.
13149         (the_low_target): Add arm_reinsert_addr.
13150
13151 2003-07-08  Mark Kettenis  <kettenis@gnu.org>
13152
13153         * mem-break.c: Remove whitespace at end of file.
13154
13155 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
13156
13157         * configure.in: Check whether we need to prototype strerror.
13158         * server.h: Optionally prototype strerror.
13159         * gdbreplay.c (perror_with_name): Use strerror.
13160         * linux-low.c (linux_attach_lwp): Use strerror.
13161         * utils.c (perror_with_name): Use strerror.
13162         * config.in, configure: Regenerated.
13163
13164 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
13165
13166         * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
13167         SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
13168
13169 2003-06-20  Daniel Jacobowitz  <drow@mvista.com>
13170
13171         * Makefile.in (SFILES): Update.
13172         * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
13173         low-sun3.c: Remove files.
13174
13175 2003-06-17  Daniel Jacobowitz  <drow@mvista.com>
13176
13177         * linux-low.c: Move comment to linux_thread_alive where it belonged.
13178         (linux_detach_one_process, linux_detach): New functions.
13179         (linux_target_ops): Add linux_detach.
13180         * server.c (main): Handle 'D' packet.
13181         * target.h (struct target_ops): Add "detach" member.
13182         (detach_inferior): Define.
13183
13184 2003-06-13  Mark Kettenis  <kettenis@gnu.org>
13185
13186         From Kelley Cook  <kelleycook@wideopenwest.com>:
13187         * configure.srv: Accept i[34567]86 variants.
13188
13189 2003-06-05  Daniel Jacobowitz  <drow@mvista.com>
13190
13191         * linux-low.c (linux_wait_for_event): Correct comment typos.
13192         (linux_resume_one_process): Call check_removed_breakpoint.
13193         (linux_send_signal): New function.
13194         (linux_target_ops): Add linux_send_signal.
13195         * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
13196         of kill.
13197         * target.h (struct target_ops): Add send_signal.
13198
13199 2003-05-29  Jim Blandy  <jimb@redhat.com>
13200
13201         * linux-low.c (usr_store_inferior_registers): Transfer buf in
13202         PTRACE_XFER_TYPE-sized chunks, not int-sized chunks.  Otherwise,
13203         if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
13204         away part of the register's value.
13205
13206 2003-03-26  Daniel Jacobowitz  <drow@mvista.com>
13207
13208         * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
13209         (linux_wait_for_event, linux_init_signals): Likewise.
13210
13211 2003-03-17  Daniel Jacobowitz  <drow@mvista.com>
13212
13213         * configure.in: Check for stdlib.h.
13214         * configure: Regenerated.
13215         * config.in: Regenerated.
13216
13217 2003-01-04  Andreas Schwab  <schwab@suse.de>
13218
13219         * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
13220
13221 2003-01-02  Andrew Cagney  <ac131313@redhat.com>
13222
13223         * Makefile.in: Remove obsolete code.
13224
13225 2002-11-20  Daniel Jacobowitz  <drow@mvista.com>
13226
13227         * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
13228         defined(PT_FPR0_HI).
13229
13230 2002-11-17  Stuart Hughes  <seh@zee2.com>
13231
13232         * linux-arm-low.c (arm_num_regs): Increase.
13233         (arm_regmap): Include status register.
13234
13235 2002-11-17  Daniel Jacobowitz  <drow@mvista.com>
13236
13237         * linux-low.c (register_addr): Remove incorrect -1 check.
13238
13239 2002-08-29  Daniel Jacobowitz  <drow@mvista.com>
13240
13241         * linux-low.c (linux_create_inferior): Call setpgid.  Return
13242         the new PID.
13243         (unstopped_p, linux_signal_pid): Remove.
13244         (linux_target_ops): Remove linux_signal_pid.
13245         * remote-utils.c (putpkt, input_interrupt): Use signal_pid
13246         global instead of target method.
13247         * target.h (struct target_ops): Remove signal_pid.  Update comment
13248         for create_inferior.
13249         * server.c (signal_pid): New variable.
13250         (create_inferior): Set signal_pid.  Block SIGTTOU and SIGTTIN in
13251         gdbserver.  Set the child to be the foreground process group.
13252         (attach_inferior): Set signal_pid.
13253
13254 2002-08-23  Daniel Jacobowitz  <drow@mvista.com>
13255
13256         * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
13257
13258 2002-08-20  Jim Blandy  <jimb@redhat.com>
13259
13260         * Makefile.in (LDFLAGS): Allow the configure script to establish a
13261         default for this.
13262
13263 2002-08-01  Andrew Cagney  <cagney@redhat.com>
13264
13265         * Makefile.in: Make chill references obsolete.
13266
13267 2002-07-24  Kevin Buettner  <kevinb@redhat.com>
13268
13269         * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
13270         * configure: Regenerate.
13271         * config.in: Regenerate.
13272
13273 2002-07-09  David O'Brien  <obrien@FreeBSD.org>
13274
13275         * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
13276         (perror_with_name, remote_close, remote_open, expect, play): Static.
13277
13278 2002-07-04  Michal Ludvig  <mludvig@suse.cz>
13279
13280         * linux-x86-64-low.c (x86_64_regmap): Make it an array of
13281         byte offsets instead of an array of indexes.
13282         (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
13283
13284 2002-06-13  Daniel Jacobowitz  <drow@mvista.com>
13285
13286         * regcache.c: Add comment.
13287
13288 2002-06-11  Daniel Jacobowitz  <drow@mvista.com>
13289
13290         * thread-db.c: New file.
13291         * proc-service.c: New file.
13292         * acinclude.m4: New file.
13293         * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
13294         proc-service.o, and thread-db.o.
13295         (linux-low.o): Add USE_THREAD_DB.
13296         * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
13297         HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
13298         * aclocal.m4: Regenerated.
13299         * config.in: Regenerated.
13300         * configure: Regenerated.
13301         * configure.in: Check for proc_service.h, sys/procfs.h,
13302         thread_db.h, and linux/elf.h headrs.
13303         Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
13304         PRFPREGSET_T_BROKEN.  Introduce srv_thread_depfiles and USE_THREAD_DB.
13305         Check for -lthread_db and thread support.
13306         * configure.srv: Enable thread_db support for ARM, i386, MIPS,
13307         PowerPC, and SuperH.
13308         * i387-fp.c: Constify arguments.
13309         * i387-fp.h: Likewise.
13310         * inferiors.c: (struct thread_info): Renamed from
13311         `struct inferior_info'.  Remove PID member.  Use generic inferior
13312         list header.  All uses updated.
13313         (inferiors, signal_pid): Removed.
13314         (all_threads): New variable.
13315         (get_thread): Define.
13316         (add_inferior_to_list): New function.
13317         (for_each_inferior): New function.
13318         (change_inferior_id): New function.
13319         (add_inferior): Removed.
13320         (remove_inferior): New function.
13321         (add_thread): New function.
13322         (free_one_thread): New function.
13323         (remove_thread): New function.
13324         (clear_inferiors): Use for_each_inferior and free_one_thread.
13325         (find_inferior): New function.
13326         (find_inferior_id): New function.
13327         (inferior_target_data): Update argument type.
13328         (set_inferior_target_data): Likewise.
13329         (inferior_regcache_data): Likewise.
13330         (set_inferior_regcache_data): Likewise.
13331         * linux-low.c (linux_bp_reinsert): Remove.
13332         (all_processes, stopping_threads, using_thrads)
13333         (struct pending_signals, debug_threads, pid_of): New.
13334         (inferior_pid): Replace with macro.
13335         (struct inferior_linux_data): Remove.
13336         (get_stop_pc, add_process): New functions.
13337         (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
13338         Use add_process and add_thread.
13339         (linux_attach_lwp): New function, based on old linux_attach.  Use
13340         add_process and add_thread.  Set stop_expected for new threads.
13341         (linux_attach): New function.
13342         (linux_kill_one_process): New function.
13343         (linux_kill): Kill all LWPs.
13344         (linux_thread_alive): Use find_inferior_id.
13345         (check_removed_breakpoints, status_pending_p): New functions.
13346         (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
13347         Update.  Use WNOHANG.  Wait for cloned processes also.  Update process
13348         struct for the found process.
13349         (linux_wait_for_event): New function.
13350         (linux_wait): Use it.  Support LWPs.
13351         (send_sigstop, wait_for_sigstop, stop_all_processes)
13352         (linux_resume_one_process, linux_continue_one_process): New functions.
13353         (linux_resume): Support LWPs.
13354         (REGISTER_RAW_SIZE): Remove.
13355         (fetch_register): Use register_size instead.  Call supply_register.
13356         (usr_store_inferior_registers): Likewise.  Call collect_register.
13357         Fix recursive case.
13358         (regsets_fetch_inferior_registers): Improve error message.
13359         (regsets_store_inferior_registers): Add debugging.
13360         (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
13361         (unstopped_p, linux_signal_pid): New functions.
13362         (linux_target_ops): Add linux_signal_pid.
13363         (linux_init_signals): New function.
13364         (initialize_low): Call it.  Initialize using_threads.
13365         * regcache.c (inferior_regcache_data): Add valid
13366         flag.
13367         (get_regcache): Fetch registers lazily.  Add fetch argument
13368         and update all callers.
13369         (regcache_invalidate_one, regcache_invalidate): New
13370         functions.
13371         (new_register_cache): Renamed from create_register_cache.
13372         Return the new regcache.
13373         (free_register_cache): Change argument to a void *.
13374         (registers_to_string, registers_from_string): Call get_regcache
13375         with fetch flag set.
13376         (register_data): Make static.  Pass fetch flag to get_regcache.
13377         (supply_register): Call get_regcache with fetch flag clear.
13378         (collect_register): Call get_regcache with fetch flag set.
13379         (collect_register_as_string): New function.
13380         * regcache.h: Update.
13381         * remote-utils.c (putpkt): Flush after debug output and use
13382         stderr.
13383         Handle input interrupts while waiting for an ACK.
13384         (input_interrupt): Use signal_pid method.
13385         (getpkt): Flush after debug output and use stderr.
13386         (outreg): Use collect_register_as_string.
13387         (new_thread_notify, dead_thread_notify): New functions.
13388         (prepare_resume_reply): Check using_threads.  Set thread_from_wait
13389         and general_thread.
13390         (look_up_one_symbol): Flush after debug output.
13391         * server.c (step_thread, server_waiting): New variables.
13392         (start_inferior): Don't use signal_pid.  Update call to mywait.
13393         (attach_inferior): Update call to mywait.
13394         (handle_query): Handle qfThreadInfo and qsThreadInfo.
13395         (main): Don't fetch/store registers explicitly.  Use
13396         set_desired_inferior.  Support proposed ``Hs'' packet.  Update
13397         calls to mywait.
13398         * server.h: Update.
13399         (struct inferior_list, struct_inferior_list_entry): New.
13400         * target.c (set_desired_inferior): New.
13401         (write_inferior_memory): Constify.
13402         (mywait): New function.
13403         * target.h: Update.
13404         (struct target_ops): New signal_pid method.
13405         (mywait): Removed macro, added prototype.
13406
13407         * linux-low.h (regset_func): Removed.
13408         (regset_fill_func, regset_store_func): New.
13409         (enum regset_type): New.
13410         (struct regset_info): Add type field.  Use new operation types.
13411         (struct linux_target_ops): stop_pc renamed to get_pc.
13412         Add decr_pc_after_break and breakpoint_at.
13413         (get_process, get_thread_proess, get_process_thread)
13414         (strut process_info, all_processes, linux_attach_lwp)
13415         (thread_db_init): New.
13416
13417         * linux-arm-low.c (arm_get_pc, arm_set_pc,
13418         arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
13419         (the_low_target): Add new members.
13420         * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
13421         (i386_store_fpxregset): Constify.
13422         (target_regsets): Add new kind identifier.
13423         (i386_get_pc): Renamed from i386_stop_pc.  Simplify.
13424         (i386_set_pc): Add debugging.
13425         (i386_breakpoint_at): New function.
13426         (the_low_target): Add new members.
13427         * linux-mips-low.c (mips_get_pc, mips_set_pc)
13428         (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
13429         (mips_breakpoint_at): New.
13430         (the_low_target): Add new members.
13431         * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
13432         (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
13433         (the_low_target): Add new members.
13434         * linux-sh-low.c (sh_get_pc, sh_set_pc)
13435         (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
13436         (the_low_target): Add new members.
13437         * linux-x86-64-low.c (target_regsets): Add new kind
13438         identifier.
13439
13440 2002-05-15  Daniel Jacobowitz  <drow@mvista.com>
13441
13442         From Martin Pool <mbp@samba.org>:
13443         * server.c (gdbserver_usage): New function.
13444         (main): Call it.
13445
13446 2002-05-14  Daniel Jacobowitz  <drow@mvista.com>
13447
13448         * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
13449         stop_at -> stop_pc.
13450
13451 2002-05-04  Andrew Cagney  <ac131313@redhat.com>
13452
13453         * Makefile.in: Remove obsolete code.
13454
13455 2002-04-24  Michal Ludvig  <mludvig@suse.cz>
13456
13457         * linux-low.c (regsets_fetch_inferior_registers),
13458         (regsets_store_inferior_registers): Removed cast to int from
13459         ptrace() calls.
13460         * regcache.h: Added declaration of struct inferior_info.
13461
13462 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
13463
13464         * inferiors.c (struct inferior_info): Add regcache_data.
13465         (add_inferior): Call create_register_cache.
13466         (clear_inferiors): Call free_register_cache.
13467         (inferior_regcache_data, set_inferior_regcache_data): New functions.
13468         * regcache.c (struct inferior_regcache_data): New.
13469         (registers): Remove.
13470         (get_regcache): New function.
13471         (create_register_cache, free_register_cache): New functions.
13472         (set_register_cache): Don't initialize the register cache here.
13473         (registers_to_string, registers_from_string, register_data): Call
13474         get_regcache.
13475         * regcache.h: Add prototypes.
13476         * server.h: Likewise.
13477
13478 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
13479
13480         * mem-break.c: New file.
13481         * mem-break.h: New file.
13482         * Makefile.in: Add mem-break.o rule; update server.h
13483         dependencies.
13484         * inferiors.c (struct inferior_info): Add target_data
13485         member.
13486         (clear_inferiors): Free target_data member if set.
13487         (inferior_target_data, set_inferior_target_data): New functions.
13488         * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
13489         (i386_stop_pc, i386_set_pc): New.  Add to the_low_target.
13490         * linux-low.c (linux_bp_reinsert): New variable.
13491         (struct inferior_linux_data): New.
13492         (linux_create_inferior): Use set_inferior_target_data.
13493         (linux_attach): Likewise.  Call add_inferior.
13494         (linux_wait_for_one_inferior): New function.
13495         (linux_wait): Call it.
13496         (linux_write_memory): Add const.
13497         (initialize_low): Call set_breakpoint_data.
13498         * linux-low.h (struct linux_target_ops): Add breakpoint
13499         handling members.
13500         * server.c (attach_inferior): Remove extra add_inferior
13501         call.
13502         * server.h: Include mem-break.h.  Update inferior.c
13503         prototypes.
13504         * target.c (read_inferior_memory)
13505         (write_inferior_memory): New functions.
13506         * target.h (read_inferior_memory)
13507         (write_inferior_memory): Change macros to prototypes.
13508         (struct target_ops): Update comments.  Add const to write_memory
13509         definition.
13510
13511 2002-04-11  Daniel Jacobowitz  <drow@mvista.com>
13512
13513         * linux-low.c (usr_store_inferior_registers): Support
13514         registers which are allowed to fail to store.
13515         * linux-low.h (linux_target_ops): Likewise.
13516         * linux-ppc-low.c (ppc_regmap): Support FPSCR.
13517         (ppc_cannot_store_register): FPSCR may not be storable.
13518
13519 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13520
13521         * server.h: Include <string.h> if HAVE_STRING_H.
13522         * ChangeLog: Correct paths in last ChangeLog entry.
13523
13524 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13525
13526         * linux-low.h: Remove obsolete prototypes.
13527         (struct linux_target_ops): New.
13528         (extern the_low_target): New.
13529         * linux-low.c (num_regs, regmap): Remove declarations.
13530         (register_addr): Use the_low_target explicitly.
13531         (fetch_register): Likewise.
13532         (usr_fetch_inferior_registers): Likewise.
13533         (usr_store_inferior_registers): Likewise.
13534         * linux-arm-low.c (num_regs): Remove.
13535         (arm_num_regs): Define.
13536         (arm_regmap): Renamed from regmap, made static.
13537         (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
13538         made static.
13539         (arm_cannot_store_register): Renamed from cannot_store_register,
13540         made static.
13541         (the_low_target): New.
13542         * linux-i386-low.c (num_regs): Remove.
13543         (i386_num_regs): Define.
13544         (i386_regmap): Renamed from regmap, made static.
13545         (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
13546         made static.
13547         (i386_cannot_store_register): Renamed from cannot_store_register,
13548         made static.
13549         (the_low_target): New.
13550         * linux-ia64-low.c (num_regs): Remove.
13551         (ia64_num_regs): Define.
13552         (ia64_regmap): Renamed from regmap, made static.
13553         (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
13554         made static.
13555         (ia64_cannot_store_register): Renamed from cannot_store_register,
13556         made static.
13557         (the_low_target): New.
13558         * linux-m68k-low.c (num_regs): Remove.
13559         (m68k_num_regs): Define.
13560         (m68k_regmap): Renamed from regmap, made static.
13561         (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
13562         made static.
13563         (m68k_cannot_store_register): Renamed from cannot_store_register,
13564         made static.
13565         (the_low_target): New.
13566         * linux-mips-low.c (num_regs): Remove.
13567         (mips_num_regs): Define.
13568         (mips_regmap): Renamed from regmap, made static.
13569         (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
13570         made static.
13571         (mips_cannot_store_register): Renamed from cannot_store_register,
13572         made static.
13573         (the_low_target): New.
13574         * linux-ppc-low.c (num_regs): Remove.
13575         (ppc_num_regs): Define.
13576         (ppc_regmap): Renamed from regmap, made static.
13577         (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
13578         made static.
13579         (ppc_cannot_store_register): Renamed from cannot_store_register,
13580         made static.
13581         (the_low_target): New.
13582         * linux-s390-low.c (num_regs): Remove.
13583         (s390_num_regs): Define.
13584         (s390_regmap): Renamed from regmap, made static.
13585         (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
13586         made static.
13587         (s390_cannot_store_register): Renamed from cannot_store_register,
13588         made static.
13589         (the_low_target): New.
13590         * linux-sh-low.c (num_regs): Remove.
13591         (sh_num_regs): Define.
13592         (sh_regmap): Renamed from regmap, made static.
13593         (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
13594         made static.
13595         (sh_cannot_store_register): Renamed from cannot_store_register,
13596         made static.
13597         (the_low_target): New.
13598         * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
13599         (the_low_target): New.
13600
13601 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13602
13603         * Makefile.in: Add stamp-h target.
13604         * configure.in: Create stamp-h.
13605         * configure: Regenerated.
13606
13607 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13608
13609         * inferiors.c: New file.
13610         * target.c: New file.
13611         * target.h: New file.
13612         * Makefile.in:  Add target.o and inferiors.o.  Update
13613         dependencies.
13614         * linux-low.c (inferior_pid): New static variable,
13615         moved from server.c.
13616         (linux_create_inferior): Renamed from create_inferior.
13617         Call add_inferior.  Return 0 on success instead of a PID.
13618         (linux_attach): Renamed from myattach.
13619         (linux_kill): Renamed from kill_inferior.  Call clear_inferiors ().
13620         (linux_thread_alive): Renamed from mythread_alive.
13621         (linux_wait): Renamed from mywait.  Call clear_inferiors () if the
13622         child dies.
13623         (linux_resume): Renamed from myresume.  Add missing ``return 0''.
13624         (regsets_store_inferior_registers): Correct error message.
13625         Add missing ``return 0''.
13626         (linux_fetch_registers): Renamed from fetch_inferior_registers.
13627         (linux_store_registers): Renamed from store_inferior_registers.
13628         (linux_read_memory): Renamed from read_inferior_memory.
13629         (linux_write_memory): Renamed from write_inferior_memory.
13630         (linux_target_ops): New structure.
13631         (initialize_low): Call set_target_ops ().
13632         * remote-utils.c (unhexify): New function.
13633         (hexify): New function.
13634         (input_interrupt): Send signals to ``signal_pid''.
13635         * server.c (inferior_pid): Remove.
13636         (start_inferior): Update create_inferior call.
13637         (attach_inferior): Call add_inferior.
13638         (handle_query): New function.
13639         (main): Call handle_query for `q' packets.
13640         * server.h: Include "target.h".  Remove obsolete prototypes.
13641         Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
13642
13643 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13644
13645         * Makefile.in: Add WARN_CFLAGS.  Update configury
13646         dependencies.
13647         * configure.in: Check for <string.h>
13648         * configure: Regenerate.
13649         * config.in: Regenerate.
13650         * gdbreplay.c: Include needed system headers.
13651         (remote_open): Remove strchr prototype.
13652         * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
13653         * regcache.c (supply_register): Change buf argument to const void *.
13654         (supply_register_by_name): Likewise.
13655         (collect_register): Change buf argument to void *.
13656         (collect_register_by_name): Likewise.
13657         * regcache.h: Add missing prototypes.
13658         * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
13659         * server.c (handle_query): New function.
13660         (attached): New static variable, moved out of main.
13661         (main): Quiet longjmp clobber warnings.
13662         * server.h: Add ATTR_NORETURN and ATTR_FORMAT.  Update prototypes.
13663         * utils.c (error): Remove NORETURN.
13664         (fatal): Likewise.