Check lwp_signal_can_be_delivered for enqueue/dequeue pending signals
[external/binutils.git] / gdb / gdbserver / ChangeLog
1 2016-03-18  Yao Qi  <yao.qi@linaro.org>
2
3         * linux-low.c (lwp_signal_can_be_delivered): New function.
4         (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
5
6 2016-03-18  Yao Qi  <yao.qi@linaro.org>
7
8         * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
9         0 if signal is enqueued.  Remove 'signal' from one debugging
10         message.  Move one debugging message to some lines below.
11         Remove code setting 'signal' to 0.
12
13 2016-03-18  Yao Qi  <yao.qi@linaro.org>
14
15         * linux-low.c (linux_low_filter_event): Remove redundant
16         WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
17
18 2016-03-09  Marcin Kościelnicki  <koriakin@0x04.net>
19
20         * linux-ppc-low.c (ppc_supports_tracepoints): New function.
21         (struct linux_target_ops): Wire in the above.
22
23 2016-03-03  Yao Qi  <yao.qi@linaro.org>
24
25         * linux-low.c: Update comments to start_step_over.
26
27 2016-03-03  Yao Qi  <yao.qi@linaro.org>
28
29         PR server/19736
30         * linux-low.c (handle_extended_wait): Set child suspended
31         if event_lwp->bp_reinsert isn't zero.
32
33 2016-03-02  Yao Qi  <yao.qi@linaro.org>
34
35         * linux-low.c (linux_resume_one_lwp_throw): Replace code with
36         enqueue_pending_signal.
37
38 2016-03-02  Marcin Kościelnicki  <koriakin@0x04.net>
39
40         * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
41         is actually loaded.
42
43 2016-02-25  Marcin Kościelnicki  <koriakin@0x04.net>
44
45         * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
46         (s390_regmap_3264) [!__s390x__]: New global.
47         (s390_collect_ptrace_register): Skip map entries containing -1.
48         (s390_supply_ptrace_register): Ditto.
49         (s390_fill_gprs_high): New function.
50         (s390_store_gprs_high): New function.
51         (s390_regsets): Add NT_S390_HIGH_GPRS.
52         (s390_get_hwcap): Enable on 31-bit.
53         (have_hwcap_s390_high_gprs): Enable on 31-bit.
54         (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
55         Detect NT_S390_HIGH_GPRS.
56         (s390_usrregs_info_3264): Enable on 31-bit.
57         (s390_regs_info): Enable regs_info_3264 on 31-bit.
58         (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
59
60 2016-02-25  Marcin Kościelnicki  <koriakin@0x04.net>
61
62         PR gdb/13808
63         * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
64         * configure.srv: Ditto.
65         * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
66         (initialize_low_tracepoint): Remove ipa_tdesc assignment.
67         * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
68         (init_registers_amd64_linux): Remove prototype.
69         (tdesc_amd64_linux): Remove declaration.
70         (get_ipa_tdesc): New function.
71         (initialize_low_tracepoint): Remove ipa_tdesc assignment,
72         initialize remaining tdescs.
73         * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
74         (init_registers_i386_linux): Remove prototype.
75         (tdesc_i386_linux): Remove declaration.
76         (get_ipa_tdesc): New function.
77         (initialize_low_tracepoint): Remove ipa_tdesc assignment,
78         initialize remaining tdescs.
79         * linux-low.c (linux_get_ipa_tdesc_idx): New function.
80         (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
81         * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
82         * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
83         (x86_get_ipa_tdesc_idx): New function.
84         (the_low_target): Wire in x86_get_ipa_tdesc_idx.
85         * linux-x86-tdesc.h: New file.
86         * target.h (struct target_ops): Add get_ipa_tdesc_idx.
87         (target_get_ipa_tdesc_idx): New macro.
88         * tracepoint.c (ipa_tdesc_idx): New macro.
89         (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
90         (symbol_list): Add ipa_tdesc_idx.
91         (cmd_qtstart): Write ipa_tdesc_idx in the target.
92         (ipa_tdesc): Remove.
93         (ipa_tdesc_idx): New variable.
94         (get_context_regcache): Use get_ipa_tdesc.
95         (gdb_collect): Ditto.
96         (gdb_probe): Ditto.
97         * tracepoint.h (get_ipa_tdesc): New prototype.
98         (ipa_tdesc): Remove.
99
100 2016-02-24  Pedro Alves  <palves@redhat.com>
101
102         * linux-low.c (check_stopped_by_breakpoint): Rename to ...
103         (save_stop_reason): ... this.  Use GDB_ARCH_IS_TRAP_HWBKPT and
104         handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
105         Factor out common code between the USE_SIGTRAP_SIGINFO and
106         !USE_SIGTRAP_SIGINFO blocks.
107         (linux_low_filter_event): Call save_stop_reason instead of
108         check_stopped_by_breakpoint and check_stopped_by_watchpoint.
109         Update comments.
110         (linux_wait_1): Update comments.
111
112 2016-02-24  Wei-cheng Wang  <cole945@gmail.com>
113
114         * linux-ppc-low.c (ppc_supports_z_point_type): New function:
115         (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
116         (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
117         ppc_insert_point, ppc_remove_point.
118
119 2016-02-17  Marcin Kościelnicki  <koriakin@0x04.net>
120
121         * linux-s390-low.c (s390_supports_z_point_type): New function.
122         (struct linux_target_ops): Wire s390_supports_z_point_type in.
123
124 2016-02-16  Yao Qi  <yao.qi@linaro.org>
125
126         * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
127         PC.  Get pc from regcache_read_pc.
128
129 2016-02-12  Yao Qi  <yao.qi@linaro.org>
130
131         * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
132         or linux_get_pc_32bit.
133         (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
134
135 2016-02-12  Yao Qi  <yao.qi@linaro.org>
136
137         * linux-arm-low.c (get_next_pcs_ops): Initialize it with
138         arm_linux_get_next_pcs_fixup.
139
140 2016-02-12  Marcin Kościelnicki  <koriakin@0x04.net>
141
142         * tracepoint.c (x_tracepoint_action_download): Change
143         write_inferior_data_ptr to write_inferior_data_pointer.
144         (cmd_qtstart): Likewise.
145         (write_inferior_data_ptr): Remove.
146         (download_agent_expr): Change write_inferior_data_ptr to
147         write_inferior_data_pointer.
148         (download_tracepoint_1): Likewise.
149         (download_tracepoint): Likewise.
150         (download_trace_state_variables): Likewise.
151
152 2016-02-11  Wei-cheng Wang  <cole945@gmail.com>
153             Marcin Kościelnicki  <koriakin@0x04.net>
154
155         * tracepoint.c (struct tracepoint_action_ops): Remove.
156         (struct tracepoint_action): Remove ops.
157         (m_tracepoint_action_download, r_tracepoint_action_download)
158         (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
159         size and offset accordingly.
160         (m_tracepoint_action_ops, r_tracepoint_action_ops)
161         (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
162         (tracepoint_action_send, tracepoint_action_download): New functions.
163         Helpers for trace action handlers.
164         (add_tracepoint_action): Remove setup actions ops.
165         (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
166
167 2016-02-10  Yao Qi  <yao.qi@linaro.org>
168
169         * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
170
171 2016-02-09  Simon Marchi  <simon.marchi@ericsson.com>
172
173         * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
174         to AC_OUTPUT.
175         * configure: Regenerate.
176
177 2016-02-09  Simon Marchi  <simon.marchi@ericsson.com>
178
179         * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
180         void * to gdb_byte *.
181         * linux-low.c (siginfo_fixup): Likewise.
182         (linux_xfer_siginfo): Likewise.
183         * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
184         Likewise.
185         * linux-x86-low.c (x86_siginfo_fixup): Likewise.
186
187 2016-02-02  Walfred Tedeschi  <walfred.tedeschi@intel.com>
188
189         * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
190         to srv_tgtobj.
191         (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
192         to srv_tgtobj.
193         * linux-x86-low.c [__x86_64__]: Include
194         "nat/amd64-linux-siginfo.h".
195         (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
196         (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
197         (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
198         (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
199         (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
200         (cpt_si_fd, si_timerid, si_overrun): Move from
201         nat/amd64-linux-siginfo.c.
202         * Makefile.in (amd64-linux-siginfo.o:): New rule.
203
204 2016-01-28  Simon Marchi  <simon.marchi@ericsson.com>
205
206         * server.c (skip_to_semicolon):  Remove.
207         (process_point_options): Use strchrnul instead of
208         skip_to_semicolon.
209
210 2016-01-26  Yao Qi  <yao.qi@linaro.org>
211
212         * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
213         * linux-low.c (install_software_single_step_breakpoints): Don't
214         call regcache_read_pc.
215         * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
216         argument pc.
217
218 2016-01-26  Yao Qi  <yao.qi@linaro.org>
219
220         * linux-low.c (install_software_single_step_breakpoints): Call
221         regcache_read_pc instead of get_pc.
222
223 2016-01-26  Yao Qi  <yao.qi@linaro.org>
224
225         * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
226         (unblock_async_io): Rename to ...
227         (block_unblock_async_io): ... it.  New function.
228         (enable_async_io): Don't install SIGIO handler.  Unblock it
229         instead.
230         (disable_async_io): Don't ignore SIGIO.  Block it instead.
231         (initialize_async_io): Install SIGIO handler.  Don't call
232         unblock_async_io.
233
234 2016-01-26  Yao Qi  <yao.qi@linaro.org>
235
236         * remote-utils.c (getpkt): If the buffer isn't empty, and the
237         first character is '\003', call *the_target->request_interrupt.
238
239 2016-01-25  Yao Qi  <yao.qi@linaro.org>
240
241         * remote-utils.c (new_thread_notify): Remove.
242         (dead_thread_notify): Likewise.
243         * remote-utils.h (new_thread_notify): Remove declaration.
244         (dead_thread_notify): Likewise.
245
246 2016-01-23  Marcin Kościelnicki  <koriakin@0x04.net>
247
248         * gdb.trace/pending.exp: Fix expected message on continue.
249
250 2016-01-22  Marcin Kościelnicki  <koriakin@0x04.net>
251
252         * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
253         it works properly on big-endian machines where sizeof (CORE_ADDR)
254         != sizeof (void *).
255
256 2016-01-21  Pedro Alves  <palves@redhat.com>
257
258         * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
259         (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
260         * configure: Regenerate.
261
262 2016-01-21  Yao Qi  <yao.qi@linaro.org>
263
264         * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
265         is_thumb and set it according to CPSR saved on the stack.
266         (get_next_pcs_syscall_next_pc): Pass is_thumb to
267         arm_sigreturn_next_pc.
268
269 2016-01-18  Yao Qi  <yao.qi@linaro.org>
270
271         * linux-low.c (linux_set_pc_64bit): New function.
272         (linux_get_pc_64bit): New function.
273         * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
274         Declare.
275         * linux-sparc-low.c (debug_threads): Remove declaration.
276         (sparc_get_pc): Remove.
277         (the_low_target): Use linux_get_pc_64bit instead of
278         sparc_get_pc.
279         * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
280         (the_low_target): Use linux_get_pc_64bit and
281         linux_set_pc_64bit.
282
283 2016-01-18  Yao Qi  <yao.qi@linaro.org>
284
285         * linux-arm-low.c (debug_threads): Remove declaration.
286         (arm_get_pc, arm_set_pc): Remove.
287         (the_low_target): Use linux_get_pc_32bit and
288         linux_set_pc_32bit.
289         * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
290         (the_low_target): Use linux_get_pc_32bit and
291         linux_set_pc_32bit.
292         * linux-cris-low.c (debug_threads): Remove declaration.
293         (cris_get_pc, cris_set_pc,): Remove.
294         (the_low_target): Use linux_get_pc_32bit and
295         linux_set_pc_32bit.
296         * linux-crisv32-low.c (debug_threads): Remove declaration.
297         (cris_get_pc, cris_set_pc): Remove.
298         (the_low_target): Use linux_get_pc_32bit and
299         linux_set_pc_32bit.
300         * linux-low.c: Include inttypes.h.
301         (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
302         * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
303         * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
304         (the_low_target): Use linux_get_pc_32bit and
305         linux_set_pc_32bit.
306         * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
307         (the_low_target): Use linux_get_pc_32bit and
308         linux_set_pc_32bit.
309         * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
310         (the_low_target): Use linux_get_pc_32bit and
311         linux_set_pc_32bit.
312         * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
313         (the_low_target): Use linux_get_pc_32bit and
314         linux_set_pc_32bit.
315         * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
316         (the_low_target): Use linux_get_pc_32bit and
317         linux_set_pc_32bit.
318
319 2016-01-18  Gary Benson  <gbenson@redhat.com>
320
321         * configure.ac (AC_FUNC_FORK): New check.
322         * config.in: Regenerate.
323         * configure: Likewise.
324
325 2016-01-14  Yao Qi  <yao.qi@linaro.org>
326
327         * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
328         * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
329         * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
330         arm_get_next_pcs_ctor.
331
332 2016-01-12  Josh Stone  <jistone@redhat.com>
333             Philippe Waroquiers  <philippe.waroquiers@skynet.be>
334
335         * inferiors.h: Include "gdb_vecs.h".
336         (struct process_info): Add syscalls_to_catch.
337         * inferiors.c (remove_process): Free syscalls_to_catch.
338         * remote-utils.c (prepare_resume_reply): Report syscall_entry and
339         syscall_return stops.
340         * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
341         * server.c (handle_general_set): Handle QCatchSyscalls.
342         (handle_query): Report support for QCatchSyscalls.
343         * target.h (struct target_ops): Add supports_catch_syscall.
344         (target_supports_catch_syscall): New macro.
345         * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
346         (struct lwp_info): Add syscall_state.
347         * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
348         Maintain syscall_state and syscalls_to_catch across exec.
349         (get_syscall_trapinfo): New function, proxy to the_low_target.
350         (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
351         (linux_low_filter_event): Toggle syscall_state entry/return for
352         syscall traps, and set it ignored for all others.
353         (gdb_catching_syscalls_p): New function.
354         (gdb_catch_this_syscall_p): New function.
355         (linux_wait_1): Handle SYSCALL_SIGTRAP.
356         (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
357         (linux_supports_catch_syscall): New function.
358         (linux_target_ops): Install it.
359         * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
360         (the_low_target): Install it.
361
362 2016-01-12  Mike Frysinger  <vapier@gentoo.org>
363
364         * acinclude.m4: Include new ../warning.m4 file.
365         * configure: Regenerated.
366         * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
367
368 2016-01-12  Mike Frysinger  <vapier@gentoo.org>
369
370         * ax.c (is_goto_target): Mark static.
371         * linux-low.c (register_addr): Likewise.
372         (linux_fetch_registers, linux_store_registers): Likewise.
373         * mem-break.c (any_persistent_commands): Fix old prototype.
374         (add_commands_to_breakpoint): Mark static.
375         * regcache.c (find_register_by_name): Delete unused func.
376         * remote-utils.c (hex_or_minus_one): Mark static.
377         * server.c (monitor_show_help): Mark static.
378         (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
379         handle_v_requests): Likewise.
380
381 2016-01-12  Pedro Alves  <palves@redhat.com>
382
383         Remove use of the registered trademark symbol throughout.
384
385 2016-01-08  Yao Qi  <yao.qi@linaro.org>
386
387         * remote-utils.c (getpkt): If c is '\003', call target hook
388         request_interrupt.
389
390 2016-01-06  Yao Qi  <yao.qi@linaro.org>
391
392         * linux-aarch32-low.h (arm_abi_breakpoint): Move to
393         linux-aarch32-low.c.
394         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
395         (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
396         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
397         (thumb2_breakpoint): Declare.
398         * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
399         linux-aarch32-low.h.
400         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
401         (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
402         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
403
404 2016-01-01  Joel Brobecker  <brobecker@adacore.com>
405
406         * gdbreplay.c (gdbreplay_version): Change copyright year in
407         version message.
408         * server.c (gdbserver_version): Likewise.
409
410 2015-12-28  Patrick Palka  <patrick@parcs.ath.cx>
411
412         * server.c (crc32_table): Delete.
413         (crc32): Use libiberty's xcrc32 function.
414
415 2015-12-22  Joel Brobecker  <brobecker@adacore.com>
416
417         * lynx-low.c (lynx_delete_thread_callback): New function.
418         (lynx_mourn): Properly delete our process and all of its
419         threads.  Remove call to clear_inferiors.
420
421 2015-12-22  Joel Brobecker  <brobecker@adacore.com>
422
423         * target.c (thread_search_callback): Add check that
424         the thread_stopped target callback is not NULL before
425         calling it.
426
427 2015-12-21  Yao Qi  <yao.qi@linaro.org>
428
429         * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
430         arm breakpoint.
431
432 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
433
434         * server.c (handle_query): Call target_supports_software_single_step.
435
436 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
437
438         * linux-low.c (single_step): New function.
439         (linux_resume_one_lwp_throw): Call single_step.
440         (start_step_over): Likewise.
441
442 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
443
444         * Makefile.in (SFILES): Append arch/arm-linux.c,
445         arch/arm-get-next-pcs.c.
446         (arm-linux.o): New rule.
447         (arm-get-next-pcs.o): New rule.
448         * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
449         arm-linux.o.
450         * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro.  Moved
451         to linux-aarch32-low.c.
452         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
453         (arm_breakpoint_len, thumb_breakpoint): Likewise.
454         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
455         (thumb2_breakpoint_len): Likewise.
456         (arm_is_thumb_mode): Make non-static.
457         * linux-aarch32-low.h (arm_abi_breakpoint): New macro.  Moved
458         from linux-aarch32-low.c.
459         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
460         (arm_breakpoint_len, thumb_breakpoint): Likewise.
461         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
462         (thumb2_breakpoint_len): Likewise.
463         (arm_is_thumb_mode): New declaration.
464         * linux-arm-low.c: Include arch/arm-linux.h
465         aarch/arm-get-next-pcs.h, sys/syscall.h.
466         (get_next_pcs_ops): New struct.
467         (get_next_pcs_addr_bits_remove): New function.
468         (get_next_pcs_is_thumb): New function.
469         (get_next_pcs_read_memory_unsigned_integer): Likewise.
470         (arm_sigreturn_next_pc): Likewise.
471         (get_next_pcs_syscall_next_pc): Likewise.
472         (arm_gdbserver_get_next_pcs): Likewise.
473         (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
474         Initialize.
475         * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
476         * server.h: Include gdb_vecs.h.
477
478 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
479
480         * Makefile.in (SFILES): Append common/common-regcache.c.
481         (OBS): Append common-regcache.o.
482         (common-regcache.o): New rule.
483         * regcache.c (init_register_cache): Initialize cache to
484         REG_UNAVAILABLE.
485         (regcache_raw_read_unsigned): New function.
486         * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
487         register_status enum.
488
489 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
490
491         * linux-aarch64-low.c (the_low_targets): Rename
492         breakpoint_reinsert_addr to get_next_pcs.
493         * linux-arm-low.c (the_low_targets): Likewise.
494         * linux-bfin-low.c (the_low_targets): Likewise.
495         * linux-cris-low.c (the_low_targets): Likewise.
496         * linux-crisv32-low.c (the_low_targets): Likewise.
497         * linux-low.c (can_software_single_step): Likewise.
498         (install_software_single_step_breakpoints): New function.
499         (start_step_over): Use install_software_single_step_breakpoints.
500         * linux-low.h: New CORE_ADDR vector.
501         (struct linux_target_ops) Rename breakpoint_reinsert_addr to
502         get_next_pcs.
503         * linux-mips-low.c (the_low_targets): Likewise.
504         * linux-nios2-low.c (the_low_targets): Likewise.
505         * linux-sparc-low.c (the_low_targets): Likewise.
506
507 2015-12-17  Pedro Alves  <palves@redhat.com>
508
509         * linux-low.c (linux_kill_one_lwp): Remove references to
510         LinuxThreads.
511         (kill_lwp): Remove HAVE_TKILL_SYSCALL check.  No longer fall back
512         to 'kill'.
513         (linux_init_signals): Delete.
514         (initialize_low): Adjust.
515         * thread-db.c (thread_db_init): Remove LinuxThreads reference.
516
517 2015-12-16  Pedro Alves  <palves@redhat.com>
518
519         * configure.ac (compiler warning flags): When testing a
520         -Wno-foo option, check whether -Wfoo works instead.
521         * configure: Regenerate.
522
523 2015-12-11  Don Breazeal  <donb@codesourcery.com>
524
525         * server.c (process_serial_event): Don't exit from gdbserver
526         in remote mode if there are still active inferiors.
527
528 2015-12-11  Yao Qi  <yao.qi@linaro.org>
529
530         * linux-aarch64-low.c (aarch64_breakpoint_at): Call
531         arm_breakpoint_at if the process is 32-bit.
532
533 2015-12-11  Yao Qi  <yao.qi@linaro.org>
534
535         * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
536         arm breakpoint.
537
538 2015-12-07  Yao Qi  <yao.qi@linaro.org>
539
540         * configure.srv: Append arm.o to srv_tgtobj for
541         aarch64*-*-linux* target.
542         * linux-aarch32-low.c (arm_abi_breakpoint): New macro.  Moved
543         from linux-arm-low.c.
544         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
545         (arm_breakpoint_len, thumb_breakpoint): Likewise.
546         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
547         (thumb2_breakpoint_len): Likewise.
548         (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
549         (arm_breakpoint_kinds): Likewise.
550         (arm_breakpoint_kind_from_pc): Likewise.
551         (arm_sw_breakpoint_from_kind): Likewise.
552         (arm_breakpoint_kind_from_current_state): Likewise.
553         * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
554         (arm_sw_breakpoint_from_kind): Declare.
555         (arm_breakpoint_kind_from_current_state): Declare.
556         (arm_breakpoint_at): Declare.
557         * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
558         arm_sw_breakpoint_from_kind if process is 32-bit.
559         (aarch64_breakpoint_kind_from_pc): New function.
560         (aarch64_breakpoint_kind_from_current_state): New function.
561         (the_low_target): Initialize fields breakpoint_kind_from_pc
562         and breakpoint_kind_from_current_state.
563         * linux-arm-low.c (arm_breakpoint_kinds): Move to
564         linux-aarch32-low.c.
565         (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
566         (arm_breakpoint, arm_breakpoint_len): Likewise.
567         (thumb_breakpoint, thumb_breakpoint_len): Likewise.
568         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
569         (arm_is_thumb_mode): Likewise.
570         (arm_breakpoint_at): Likewise.
571         (arm_breakpoint_kind_from_pc): Likewise.
572         (arm_sw_breakpoint_from_kind): Likewise.
573         (arm_breakpoint_kind_from_current_state): Likewise.
574
575         Revert:
576         2015-08-04  Yao Qi  <yao.qi@linaro.org>
577
578         * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
579         0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
580         * server.c (extended_protocol): Remove "static".
581         * server.h (extended_protocol): Declare it.
582
583 2015-12-04  Josh Stone  <jistone@redhat.com>
584
585         * target.h (struct target_ops) <arch_setup>: Rename to ...
586         (struct target_ops) <post_create_inferior>: ... this.
587         (target_arch_setup): Rename to ...
588         (target_post_create_inferior): ... this, calling post_create_inferior.
589         * server.c (start_inferior): Update target_arch_setup calls to
590         target_post_create_inferior.
591         * linux-low.c (linux_low_ptrace_options): Forward declare.
592         (linux_arch_setup): Update its comment for general use.
593         (linux_post_create_inferior): New, run arch_setup and setup ptrace.
594         (struct linux_target_ops): Use linux_post_create_inferior.
595         * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
596         to post_create_inferior.
597         * nto-low.c (struct nto_target_ops): Likewise.
598         * spu-low.c (struct spu_target_ops): Likewise.
599         * win32-low.c (struct win32_target_ops): Likewise.
600
601 2015-12-03  Antoine Tremblay  <antoine.tremblay@ericsson.com>
602
603         * linux-arm-low.c: Remove duplicate arch/arm.h include.
604
605 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
606
607         * linux-arm-low.c (arm_reinsert_addr): Remove function.
608         (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
609         * linux-cris-low.c (cris_reinsert_addr> Remove function.
610         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
611         * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
612         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
613         * linux-mips-low.c (mips_reinsert_addr): Remove function.
614         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
615         * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
616         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
617         * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
618         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
619
620 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
621
622         * linux-low.c (linux_look_up_symbols): Don't call
623         linux_supports_traceclone.
624         * linux-low.h (thread_db_init): Remove use_events argument.
625         * thread-db.c (thread_db_use_event): Remove global variable.
626         (struct thread_db) <td_thr_event_enable_p>: Remove field.
627         (struct thread_db) <td_create_bp>: Remove field.
628         (thread_db_create_event): Remove function.
629         (thread_db_enable_reporting): Likewise.
630         (find_one_thread): Don't check for thread_db_use_events.
631         (attach_thread): Likewise.
632         (thread_db_load_search): Remove td_thr_event_enable_p initialization.
633         (try_thread_db_load_1): Don't check for thread_db_use_events.
634         (thread_db_init): Remove use_events argument and thread events
635         handling.
636         (remove_thread_event_breakpoints): Remove function.
637         (thread_db_detach): Remove call to remove_thred_event_breakpoints.
638
639 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
640
641         * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
642         New function.
643         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
644         * linux-arm-low.c (arm_supports_hardware_single_step): New function.
645         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
646         * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
647         (struct linux_target_ops) <bfin_supports_hardware_single_step>:
648         Initialize.
649         * linux-crisv32-low.c (cris_supports_hardware_single_step):
650         New function.
651         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
652         * linux-low.c (can_hardware_single_step): Use
653         supports_hardware_single_step.
654         (can_software_single_step): New function.
655         (start_step_over): Call can_software_single_step.
656         (linux_supports_hardware_single_step): New function.
657         (struct target_ops) <supports_software_single_step>: Initialize.
658         * linux-low.h (struct linux_target_ops)
659         <supports_hardware_single_step>: Initialize.
660         * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
661         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
662         * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
663         (struct linux_target_ops) <supports_hardware_single_step> Initialize.
664         * linux-s390-low.c (s390_supports_hardware_single_step): New function.
665         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
666         * linux-sh-low.c (sh_supports_hardware_single_step): New function.
667         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
668         * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
669         (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
670         Initialize.
671         * linux-tile-low.c (tile_supports_hardware_single_step): New function.
672         (struct linux_target_ops) <tile_supports_hardware_single_step>:
673         Initialize.
674         * linux-x86-low.c (x86_supports_hardware_single_step) New function.
675         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
676         * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
677         New function.
678         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
679         * target.h (struct target_ops): <supports_software_single_step>:
680         New field.
681         (target_supports_software_single_step): New macro.
682
683 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
684
685         * linux-low.c (linux_wait_1): Fix pc advance condition.
686         * mem-break.c (reinsert_breakpoint_inserted_here): New function.
687         * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
688
689 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
690
691         * linux-arm-low.c (arm_is_thumb_mode): New function.
692         (arm_breakpoint_at): Use arm_is_thumb_mode.
693         (arm_breakpoint_kind_from_current_state): New function.
694         (struct linux_target_ops) <breakpoint_kind_from_current_state>:
695         Initialize.
696         * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
697         (linux_breakpoint_kind_from_current_state): New function.
698         (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
699         * linux-low.h (struct linux_target_ops)
700         <breakpoint_kind_from_current_state>: New field.
701         * target.h (struct target_ops): Likewise.
702         (target_breakpoint_kind_from_current_state): New macro.
703
704 2015-11-30  Pedro Alves  <palves@redhat.com>
705
706         * linux-low.c (linux_resume): Wake up the event loop before
707         returning.
708
709 2015-11-30  Pedro Alves  <palves@redhat.com>
710
711         * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
712         check.
713         (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
714         to -1.
715         * target.c (struct thread_search): New structure.
716         (thread_search_callback): New function.
717         (prev_general_thread): New global.
718         (prepare_to_access_memory, done_accessing_memory): New functions.
719         * target.h (prepare_to_access_memory, done_accessing_memory):
720         Replace macros with function declarations.
721
722 2015-11-30  Pedro Alves  <palves@redhat.com>
723
724         PR 14618
725         * linux-low.c (linux_wait_1): If the last resumed thread is gone,
726         report TARGET_WAITKIND_NO_RESUMED.
727         * remote-utils.c (prepare_resume_reply): Handle
728         TARGET_WAITKIND_NO_RESUMED.
729         * server.c (report_no_resumed): New global.
730         (handle_query) <qSupported>: Handle "no-resumed+".  Report
731         "no-resumed+" support.
732         (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
733         return error if the client doesn't support no-resumed events.
734         (push_stop_notification): New function.
735         (handle_target_event): Use it.  Report TARGET_WAITKIND_NO_RESUMED
736         events if the client supports them.
737
738 2015-11-30  Pedro Alves  <palves@redhat.com>
739
740         * linux-low.c (thread_still_has_status_pending_p): Don't check
741         vCont;t here.
742         (lwp_resumed): New function.
743         (status_pending_p_callback): Return early if the LWP is not
744         supposed to be resumed.
745
746 2015-11-30  Pedro Alves  <palves@redhat.com>
747
748         * linux-low.c (handle_extended_wait): Assert that the LWP's
749         waitstatus is TARGET_WAITKIND_IGNORE.  If GDB wants to hear about
750         thread create events, leave the new child's status pending.
751         (linux_low_filter_event): If GDB wants to hear about thread exit
752         events, leave the LWP marked dead and don't delete it.
753         (linux_wait_for_event_filtered): Don't check for thread exit.
754         (filter_exit_event): New function.
755         (linux_wait_1): Use it, when returning an exit event.
756         (linux_resume_one_lwp_throw): Assert that the LWP's
757         waitstatus is TARGET_WAITKIND_IGNORE.
758         * remote-utils.c (prepare_resume_reply): Handle
759         TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
760         * server.c (report_thread_events): New global.
761         (handle_general_set): Handle QThreadEvents.
762         (handle_query) <qSupported>: Handle and report QThreadEvents+;
763         (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
764         TARGET_WAITKIND_THREAD_EXITED.
765         * server.h (report_thread_events): Declare.
766
767 2015-11-30  Pedro Alves  <palves@redhat.com>
768
769         * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
770         the thread's last_resume_kind was resume_stop.
771
772 2015-11-30  Pedro Alves  <palves@redhat.com>
773
774         * linux-low.c (linux_attach): In non-stop mode, wait for one stop
775         before returning.
776
777 2015-11-30  Pedro Alves  <palves@redhat.com>
778
779         * server.c (handle_v_requests): Handle vCtrlC.
780
781 2015-11-30  Pedro Alves  <palves@redhat.com>
782
783         * gdbthread.h (find_any_thread_of_pid): Declare.
784         * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
785         functions.
786         * server.c (handle_query): If current_thread is NULL, look for
787         another thread of the selected process.
788
789 2015-11-26  Daniel Colascione  <dancol@dancol.org>
790             Simon Marchi  <simon.marchi@ericsson.com>
791
792         * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
793         * server.c (handle_qxfer_threads_worker): Refactor to include thread
794         name in reply.
795         * target.h (struct target_ops) <thread_name>: New field.
796         (target_thread_name): New macro.
797
798 2015-11-23  Joel Brobecker  <brobecker@adacore.com>
799
800         * regcache.h (regcache_invalidate_pid): Add declaration.
801         * regcache.c (regcache_invalidate_pid): New function, extracted
802         from regcache_invalidate.
803         (regcache_invalidate): Reimplement using regcache_invalidate_pid.
804         Add trivial documentation comment.
805         * lynx-low.c: Use regcache_invalidate_pid instead of
806         regcache_invalidate.
807
808 2015-11-23  Joel Brobecker  <brobecker@adacore.com>
809
810         * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
811         and Elf64_auxv_t if the target is Android.
812
813 2015-11-22  Doug Evans  <xdje42@gmail.com>
814
815         * target.h: #include <sys/types.h>.
816
817 2015-11-19  Pedro Alves  <palves@redhat.com>
818
819         * linux-low.c (linux_process_qsupported): Change prototype.
820         Adjust.
821         * linux-low.h (struct linux_target_ops) <process_qsupported>:
822         Change prototype.
823         * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
824         and adjust to loop over all features.
825         * server.c (handle_query) <qSupported>: Adjust to call
826         target_process_qsupported once, passing it a vector of unprocessed
827         features.
828         * target.h (struct target_ops) <process_qsupported>: Change
829         prototype.
830         (target_process_qsupported): Adjust.
831
832 2015-11-19  Pedro Alves  <palves@redhat.com>
833
834         * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
835         mode.
836         * configure: Regenerate.
837
838 2015-11-19  Pedro Alves  <palves@redhat.com>
839
840         * configure: Regenerate.
841
842 2015-11-19  Yao Qi  <yao.qi@linaro.org>
843
844         * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
845         type to uint32_t.
846
847 2015-11-19  Yao Qi  <yao.qi@linaro.org>
848
849         * linux-aarch64-low.c (enum aarch64_operand_type): New.
850         (struct aarch64_operand): Move enum out.
851
852 2015-11-19  Yao Qi  <yao.qi@linaro.org>
853
854         * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
855         struct user_fpsimd_state *.
856         (aarch64_store_fpregset): Likewise.
857
858 2015-11-19  Yao Qi  <yao.qi@linaro.org>
859
860         * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
861         struct user_pt_regs *.
862         (aarch64_store_gregset): Likewise.
863
864 2015-11-18  Pedro Alves  <palves@redhat.com>
865
866         * Makefile.in (all_object_files): Add $IPA_OBJS.
867
868 2015-11-17  Pedro Alves  <palves@redhat.com>
869
870         * win32-low.c (win32_resume): Use gdb_signal_from_host,
871         GDB_SIGNAL_0 and gdb_signal_to_string.
872
873 2015-11-17  Pedro Alves  <palves@redhat.com>
874
875         * win32-low.c (handle_output_debug_string): Remove parameter.
876         (win32_kill): Remove our_status local and adjust call to
877         handle_output_debug_string.
878         (get_child_debug_event): Adjust call to
879         handle_output_debug_string.
880
881 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
882
883         * linux-mips-low.c (mips_fill_gregset): Add cast.
884         (mips_store_gregset): Likewise.
885         (mips_fill_fpregset): Likewise.
886         (mips_store_fpregset): Likewise.
887
888 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
889
890         * linux-mips-low.c (mips_add_watchpoint): Rename private to
891         priv.
892
893 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
894
895         * linux-mips-low.c (mips_linux_new_thread): Change type of
896         watch_type to enum target_hw_bp_type.
897
898 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
899
900                 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
901                 Change return type to arm_hwbp_type.
902
903 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
904
905         * linux-aarch32-low.c (arm_fill_gregset): Add cast.
906         (arm_store_gregset): Likewise.
907         * linux-arm-low.c (arm_get_hwcap): Likewise.
908         (arm_read_description): Likewise.
909
910 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
911
912         * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
913
914 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
915
916         * linux-ppc-low.c (ppc_get_hwcap): Add cast.
917         (ppc_fill_vsxregset): Likewise.
918         (ppc_store_vsxregset): Likewise.
919         (ppc_fill_vrregset): Likewise.
920         (ppc_store_vrregset): Likewise.
921         (ppc_fill_evrregset): Likewise.
922         (ppc_store_evrregset): Likewise.
923
924 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
925
926         * linux-ppc-low.c (ppc_usrregs_info): Remove
927         forward-declaration.
928         (ppc_arch_setup): Move lower in file.
929
930 2015-10-30  Simon Marchi  <simon.marchi@ericsson.com>
931
932         * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
933         (ps_pdwrite): Likewise.
934
935 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
936
937         * linux-arm-low.c (arm_new_thread): Move pointer dereference
938         to after assert checks.
939
940 2015-10-29  Simon Marchi  <simon.marchi@ericsson.com>
941
942         * proc-service.c (ps_pdread): Add/adjust casts.
943         (ps_pdwrite): Add/adjust casts.
944
945 2015-10-29  Simon Marchi  <simon.marchi@polymtl.ca>
946
947         * server.c (handle_search_memory_1): Cast return value of
948         memmem.
949
950 2015-10-29  Simon Marchi  <simon.marchi@polymtl.ca>
951
952         * server.c (write_qxfer_response): Change type of data to
953         gdb_byte *.
954
955 2015-10-29  Pedro Alves  <palves@redhat.com>
956
957         * mem-break.c (Z_packet_to_bkpt_type): Add cast.
958
959 2015-10-29  Pedro Alves  <palves@redhat.com>
960
961         * tracepoint.c (clear_installed_tracepoints): Add casts.
962
963 2015-10-29  Pedro Alves  <palves@redhat.com>
964
965         * server.c (handle_v_cont, process_serial_event): Add enum
966         gdb_signal casts to signal parsing code.
967
968 2015-10-29  Pedro Alves  <palves@redhat.com>
969
970         * linux-low.h (NULL_REGSET): Define.
971         * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
972         * linux-arm-low.c (arm_regsets): Likewise.
973         * linux-crisv32-low.c (cris_regsets): Likewise.
974         * linux-m68k-low.c (m68k_regsets): Likewise.
975         * linux-mips-low.c (mips_regsets): Likewise.
976         * linux-nios2-low.c (nios2_regsets): Likewise.
977         * linux-ppc-low.c (ppc_regsets): Likewise.
978         * linux-s390-low.c (s390_regsets): Likewise.
979         * linux-sh-low.c (sh_regsets): Likewise.
980         * linux-sparc-low.c (sparc_regsets): Likewise.
981         * linux-tic6x-low.c (tic6x_regsets): Likewise.
982         * linux-tile-low.c (tile_regsets): Likewise.
983         * linux-x86-low.c (x86_regsets): Likewise.
984         * linux-xtensa-low.c (xtensa_regsets): Likewise.
985
986 2015-10-29  Pedro Alves  <palves@redhat.com>
987
988         * linux-low.h (NULL_REGSET): Define.
989         * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
990         * linux-arm-low.c (arm_regsets): Likewise.
991         * linux-crisv32-low.c (cris_regsets): Likewise.
992         * linux-m68k-low.c (m68k_regsets): Likewise.
993         * linux-mips-low.c (mips_regsets): Likewise.
994         * linux-nios2-low.c (nios2_regsets): Likewise.
995         * linux-ppc-low.c (ppc_regsets): Likewise.
996         * linux-s390-low.c (s390_regsets): Likewise.
997         * linux-sh-low.c (sh_regsets): Likewise.
998         * linux-sparc-low.c (sparc_regsets): Likewise.
999         * linux-tic6x-low.c (tic6x_regsets): Likewise.
1000         * linux-tile-low.c (tile_regsets): Likewise.
1001         * linux-x86-low.c (x86_regsets): Likewise.
1002         * linux-xtensa-low.c (xtensa_regsets): Likewise.
1003
1004 2015-10-26  Doug Evans  <dje@google.com>
1005
1006         * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
1007
1008 2015-10-26  Doug Evans  <dje@google.com>
1009
1010         * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
1011
1012 2015-10-26  Doug Evans  <dje@google.com>
1013
1014         * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
1015         for debug_printf.
1016         (attach_thread, find_new_threads_callback): Ditto.
1017
1018 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1019
1020         * mem-break.h (set_breakpoint_data): Remove.
1021
1022 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1023
1024         * nto-low.c (nto_sw_breakpoint_from_kind): New function.
1025         (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1026         (initialize_low): Remove set_breakpoint_data call.
1027         * spu-low.c (spu_sw_breakpoint_from_kind): New function.
1028         (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
1029         (initialize_low): Remove set_breakpoint_data call.
1030         * win32-low.c (win32_sw_breakpoint_from_kind): New function.
1031         (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1032         (initialize_low): Remove set_breakpoint_data call.
1033
1034 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1035
1036         * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
1037         * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
1038         * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
1039         * target.h (target_breakpoint_kind_from_pc): New macro.
1040
1041 2015-10-22  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1042
1043         * linux-low.c (default_breakpoint_kind_from_pc): New function.
1044         (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
1045         the default breakpoint kind.
1046
1047 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1048
1049         * linux-arm-low.c (arm_supports_z_point_type): Add software
1050         breakpoint support.
1051
1052 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1053
1054         * linux-arm-low.c: Refactor breakpoint definitions.
1055         (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
1056         (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
1057
1058 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1059
1060         * Makefile.in: Add arm.c/o.
1061         * configure.srv: Likewise.
1062         * linux-arm-low.c (arm_breakpoint_kinds): New enum.
1063         (arm_breakpoint_kind_from_pc): New function.
1064         (arm_sw_breakpoint_from_kind): Return proper kind.
1065         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
1066
1067 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1068
1069         * linux-low.c (initialize_low): Ajdust for breakpoint global variables
1070         removal.
1071         * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
1072         (struct raw_breakpoint) <size>: Remove.
1073         (struct raw_breakpoint) <kind>: Add.
1074         (bp_size): New function.
1075         (bp_opcode): Likewise.
1076         (find_raw_breakpoint_at): Adjust for kind.
1077         (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
1078         (remove_memory_breakpoint): Adjust for kind call bp_size.
1079         (set_raw_breakpoint_at): Adjust for kind.
1080         (set_breakpoint): Likewise.
1081         (set_breakpoint_at): Call breakpoint_kind_from_pc.
1082         (delete_raw_breakpoint): Adjust for kind.
1083         (delete_breakpoint): Likewise.
1084         (find_gdb_breakpoint): Likewise.
1085         (set_gdb_breakpoint_1): Likewise.
1086         (set_gdb_breakpoint): Likewise.
1087         (delete_gdb_breakpoint_1): Likewise.
1088         (delete_gdb_breakpoint): Likewise.
1089         (uninsert_raw_breakpoint): Likewise.
1090         (reinsert_raw_breakpoint): Likewise.
1091         (set_breakpoint_data): Remove.
1092         (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
1093         (check_mem_read): Adjust for kind call bp_size.
1094         (check_mem_write): Adjust for kind call bp_size,bp_opcode.
1095         (clone_one_breakpoint): Adjust for kind.
1096         * mem-break.h (set_gdb_breakpoint): Likewise.
1097         (delete_gdb_breakpoint): Likewise.
1098         * server.c (process_serial_event): Likewise.
1099
1100 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1101
1102         * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
1103         (struct linux_target_ops) <breakpoint>: Remove.
1104         (struct linux_target_ops) <breakpoint_len>: Remove.
1105         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1106         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1107         * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
1108         (arm_sw_breakpoint_from_kind): New function.
1109         * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
1110         (struct linux_target_ops) <breakpoint>: Remove.
1111         (struct linux_target_ops) <breakpoint_len>: Remove.
1112         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1113         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1114         * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
1115         (struct linux_target_ops) <breakpoint>: Remove.
1116         (struct linux_target_ops) <breakpoint_len>: Remove.
1117         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1118         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1119         * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
1120         (struct linux_target_ops) <breakpoint>: Remove.
1121         (struct linux_target_ops) <breakpoint_len>: Remove.
1122         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1123         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1124         * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
1125         and sw_breakpoint_from_kind to increment the pc.
1126         (linux_breakpoint_kind_from_pc): New function.
1127         (linux_sw_breakpoint_from_kind): New function.
1128         (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
1129         (initialize_low): Call breakpoint_kind_from_pc and
1130         sw_breakpoint_from_kind to replace breakpoint_data/len.
1131         * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
1132         New field.
1133         (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
1134         * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
1135         (struct linux_target_ops) <breakpoint>: Remove.
1136         (struct linux_target_ops) <breakpoint_len>: Remove.
1137         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1138         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1139         * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
1140         (struct linux_target_ops) <breakpoint>: Remove.
1141         (struct linux_target_ops) <breakpoint_len>: Remove.
1142         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1143         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1144         * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
1145         (struct linux_target_ops) <breakpoint>: Remove.
1146         (struct linux_target_ops) <breakpoint_len>: Remove.
1147         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1148         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1149         * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
1150         (struct linux_target_ops) <breakpoint>: Remove.
1151         (struct linux_target_ops) <breakpoint_len>: Remove.
1152         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1153         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1154         * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
1155         (struct linux_target_ops) <breakpoint>: Remove.
1156         (struct linux_target_ops) <breakpoint_len>: Remove.
1157         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1158         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1159         * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
1160         (struct linux_target_ops) <breakpoint>: Remove.
1161         (struct linux_target_ops) <breakpoint_len>: Remove.
1162         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1163         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1164         * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
1165         (struct linux_target_ops) <breakpoint>: Remove.
1166         (struct linux_target_ops) <breakpoint_len>: Remove.
1167         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1168         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1169         * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
1170         (struct linux_target_ops) <breakpoint>: Remove.
1171         (struct linux_target_ops) <breakpoint_len>: Remove.
1172         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1173         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1174         * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
1175         (struct linux_target_ops) <breakpoint>: Remove.
1176         (struct linux_target_ops) <breakpoint_len>: Remove.
1177         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1178         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1179         * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
1180         * linux-x86-low.c (x86_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-xtensa-low.c (xtensa_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
1191 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1192
1193         * linux-cris-low.c (cris_get_pc): Remove void arg.
1194
1195 2015-10-16  Aleksandar Ristovski  <aristovski@qnx.com>
1196
1197         * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
1198         variable name.
1199
1200 2015-10-16  Aleksandar Ristovski  <aristovski@qnx.com>
1201
1202         * inferiors.c (thread_pid_matches_callback): New function.
1203         (find_thread_process): New function.
1204         (remove_thread): Reset current_thread.
1205         (remove_process): Assert threads have been removed first.
1206
1207 2015-10-15  Yao Qi  <yao.qi@linaro.org>
1208
1209         * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
1210         if it is 3.
1211         (aarch64_remove_point): Likewise.
1212         * regcache.c (regcache_register_size): New function.
1213
1214 2015-10-12  Yao Qi  <yao.qi@linaro.org>
1215
1216         * linux-aarch64-low.c: Update all callers as emit_load_store
1217         is renamed to aarch64_emit_load_store.
1218
1219 2015-10-12  Yao Qi  <yao.qi@linaro.org>
1220
1221         * linux-aarch64-low.c: Update all callers of function renaming
1222         from emit_insn to aarch64_emit_insn.
1223
1224 2015-10-12  Yao Qi  <yao.qi@linaro.org>
1225
1226         * linux-aarch64-low.c (enum aarch64_opcodes): Move to
1227         arch/aarch64-insn.h.
1228         (struct aarch64_memory_operand): Likewise.
1229         (ENCODE): Likewise.
1230         (emit_insn): Move to arch/aarch64-insn.c.
1231         (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
1232         (emit_load_store): Move to arch/aarch64-insn.c.
1233         (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
1234         (can_encode_int32): Remove.
1235
1236 2015-10-12  Yao Qi  <yao.qi@linaro.org>
1237
1238         * linux-aarch64-low.c (extract_signed_bitfield): Remove.
1239         (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
1240         (aarch64_relocate_instruction): Likewise.
1241         (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
1242         (struct aarch64_insn_visitor): Likewise.
1243
1244 2015-10-12  Yao Qi  <yao.qi@linaro.org>
1245
1246         * linux-aarch64-low.c (struct aarch64_insn_data): New.
1247         (struct aarch64_insn_visitor): New.
1248         (struct aarch64_insn_relocation_data): New.
1249         (aarch64_ftrace_insn_reloc_b): New function.
1250         (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1251         (aarch64_ftrace_insn_reloc_cb): Likewise.
1252         (aarch64_ftrace_insn_reloc_tb): Likewise.
1253         (aarch64_ftrace_insn_reloc_adr): Likewise.
1254         (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
1255         (aarch64_ftrace_insn_reloc_others): Likewise.
1256         (visitor): New.
1257         (aarch64_relocate_instruction): Use visitor.
1258
1259 2015-10-12  Yao Qi  <yao.qi@linaro.org>
1260
1261         * linux-aarch64-low.c (aarch64_relocate_instruction): Return
1262         int.  Add argument buf.
1263         (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
1264         aarch64_relocate_instruction.
1265
1266 2015-10-12  Yao Qi  <yao.qi@linaro.org>
1267
1268         * linux-aarch64-low.c (aarch64_relocate_instruction): Add
1269         argument insn.  Remove local variable insn.  Don't call
1270         target_read_uint32.
1271         (aarch64_install_fast_tracepoint_jump_pad): Call
1272         target_read_uint32.
1273
1274 2015-09-30  Yao Qi  <yao.qi@linaro.org>
1275
1276         * linux-aarch64-low.c (emit_movk): Shorten a long line.
1277         (emit_load_store_pair): Likewise.
1278
1279 2015-09-25  Simon Marchi  <simon.marchi@ericsson.com>
1280
1281         * dll.c (match_dll): Add cast(s).
1282         (unloaded_dll): Likewise.
1283         * linux-low.c (second_thread_of_pid_p): Likewise.
1284         (delete_lwp_callback): Likewise.
1285         (count_events_callback): Likewise.
1286         (select_event_lwp_callback): Likewise.
1287         (linux_set_resume_request): Likewise.
1288         * server.c (accumulate_file_name_length): Likewise.
1289         (emit_dll_description): Likewise.
1290         (handle_qxfer_threads_worker): Likewise.
1291         (visit_actioned_threads): Likewise.
1292         * thread-db.c (any_thread_of): Likewise.
1293         * tracepoint.c (same_process_p): Likewise.
1294         (match_blocktype): Likewise.
1295         (build_traceframe_info_xml): Likewise.
1296
1297 2015-09-25  Simon Marchi  <simon.marchi@ericsson.com>
1298
1299         * ax.c (gdb_parse_agent_expr): Add cast to allocation result
1300         assignment.
1301         (gdb_unparse_agent_expr): Likewise.
1302         * hostio.c (require_data): Likewise.
1303         (handle_pread): Likewise.
1304         * linux-low.c (disable_regset): Likewise.
1305         (fetch_register): Likewise.
1306         (store_register): Likewise.
1307         (get_dynamic): Likewise.
1308         (linux_qxfer_libraries_svr4): Likewise.
1309         * mem-break.c (delete_fast_tracepoint_jump): Likewise.
1310         (set_fast_tracepoint_jump): Likewise.
1311         (uninsert_fast_tracepoint_jumps_at): Likewise.
1312         (reinsert_fast_tracepoint_jumps_at): Likewise.
1313         (validate_inserted_breakpoint): Likewise.
1314         (clone_agent_expr): Likewise.
1315         * regcache.c (init_register_cache): Likewise.
1316         * remote-utils.c (putpkt_binary_1): Likewise.
1317         (decode_M_packet): Likewise.
1318         (decode_X_packet): Likewise.
1319         (look_up_one_symbol): Likewise.
1320         (relocate_instruction): Likewise.
1321         (monitor_output): Likewise.
1322         * server.c (handle_search_memory): Likewise.
1323         (handle_qxfer_exec_file): Likewise.
1324         (handle_qxfer_libraries): Likewise.
1325         (handle_qxfer): Likewise.
1326         (handle_query): Likewise.
1327         (handle_v_cont): Likewise.
1328         (handle_v_run): Likewise.
1329         (captured_main): Likewise.
1330         * target.c (write_inferior_memory): Likewise.
1331         * thread-db.c (try_thread_db_load_from_dir): Likewise.
1332         * tracepoint.c (init_trace_buffer): Likewise.
1333         (add_tracepoint_action): Likewise.
1334         (add_traceframe): Likewise.
1335         (add_traceframe_block): Likewise.
1336         (cmd_qtdpsrc): Likewise.
1337         (cmd_qtdv): Likewise.
1338         (cmd_qtstatus): Likewise.
1339         (response_source): Likewise.
1340         (response_tsv): Likewise.
1341         (cmd_qtnotes): Likewise.
1342         (gdb_collect): Likewise.
1343         (initialize_tracepoint): Likewise.
1344
1345 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
1346
1347         * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
1348         (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
1349         <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
1350         <NOP>: New.
1351         (enum aarch64_condition_codes): New enum.
1352         (w0): New static global.
1353         (fp): Likewise.
1354         (lr): Likewise.
1355         (struct aarch64_memory_operand) <type>: New
1356         MEMORY_OPERAND_POSTINDEX type.
1357         (postindex_memory_operand): New helper function.
1358         (emit_ret): New function.
1359         (emit_load_store_pair): New function, factored out of emit_stp
1360         with support for MEMORY_OPERAND_POSTINDEX.
1361         (emit_stp): Rewrite using emit_load_store_pair.
1362         (emit_ldp): New function.
1363         (emit_load_store): Likewise.
1364         (emit_ldr): Mention post-index instruction in comment.
1365         (emit_ldrh): New function.
1366         (emit_ldrb): New function.
1367         (emit_ldrsw): Mention post-index instruction in comment.
1368         (emit_str): Likewise.
1369         (emit_subs): New function.
1370         (emit_cmp): Likewise.
1371         (emit_and): Likewise.
1372         (emit_orr): Likewise.
1373         (emit_orn): Likewise.
1374         (emit_eor): Likewise.
1375         (emit_mvn): Likewise.
1376         (emit_lslv): Likewise.
1377         (emit_lsrv): Likewise.
1378         (emit_asrv): Likewise.
1379         (emit_mul): Likewise.
1380         (emit_sbfm): Likewise.
1381         (emit_sbfx): Likewise.
1382         (emit_ubfm): Likewise.
1383         (emit_ubfx): Likewise.
1384         (emit_csinc): Likewise.
1385         (emit_cset): Likewise.
1386         (emit_nop): Likewise.
1387         (emit_ops_insns): New helper function.
1388         (emit_pop): Likewise.
1389         (emit_push): Likewise.
1390         (aarch64_emit_prologue): New function.
1391         (aarch64_emit_epilogue): Likewise.
1392         (aarch64_emit_add): Likewise.
1393         (aarch64_emit_sub): Likewise.
1394         (aarch64_emit_mul): Likewise.
1395         (aarch64_emit_lsh): Likewise.
1396         (aarch64_emit_rsh_signed): Likewise.
1397         (aarch64_emit_rsh_unsigned): Likewise.
1398         (aarch64_emit_ext): Likewise.
1399         (aarch64_emit_log_not): Likewise.
1400         (aarch64_emit_bit_and): Likewise.
1401         (aarch64_emit_bit_or): Likewise.
1402         (aarch64_emit_bit_xor): Likewise.
1403         (aarch64_emit_bit_not): Likewise.
1404         (aarch64_emit_equal): Likewise.
1405         (aarch64_emit_less_signed): Likewise.
1406         (aarch64_emit_less_unsigned): Likewise.
1407         (aarch64_emit_ref): Likewise.
1408         (aarch64_emit_if_goto): Likewise.
1409         (aarch64_emit_goto): Likewise.
1410         (aarch64_write_goto_address): Likewise.
1411         (aarch64_emit_const): Likewise.
1412         (aarch64_emit_call): Likewise.
1413         (aarch64_emit_reg): Likewise.
1414         (aarch64_emit_pop): Likewise.
1415         (aarch64_emit_stack_flush): Likewise.
1416         (aarch64_emit_zero_ext): Likewise.
1417         (aarch64_emit_swap): Likewise.
1418         (aarch64_emit_stack_adjust): Likewise.
1419         (aarch64_emit_int_call_1): Likewise.
1420         (aarch64_emit_void_call_2): Likewise.
1421         (aarch64_emit_eq_goto): Likewise.
1422         (aarch64_emit_ne_goto): Likewise.
1423         (aarch64_emit_lt_goto): Likewise.
1424         (aarch64_emit_le_goto): Likewise.
1425         (aarch64_emit_gt_goto): Likewise.
1426         (aarch64_emit_ge_got): Likewise.
1427         (aarch64_emit_ops_impl): New static global variable.
1428         (aarch64_emit_ops): New target function, return
1429         &aarch64_emit_ops_impl.
1430         (struct linux_target_ops): Install it.
1431
1432 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
1433
1434         * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
1435         * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
1436         aarch64-ipa.o.
1437         * linux-aarch64-ipa.c: New file.
1438         * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
1439         and endian.h.
1440         (aarch64_get_thread_area): New target method.
1441         (extract_signed_bitfield): New helper function.
1442         (aarch64_decode_ldr_literal): New function.
1443         (enum aarch64_opcodes): New enum.
1444         (struct aarch64_register): New struct.
1445         (struct aarch64_operand): New struct.
1446         (x0): New static global.
1447         (x1): Likewise.
1448         (x2): Likewise.
1449         (x3): Likewise.
1450         (x4): Likewise.
1451         (w2): Likewise.
1452         (ip0): Likewise.
1453         (sp): Likewise.
1454         (xzr): Likewise.
1455         (aarch64_register): New helper function.
1456         (register_operand): Likewise.
1457         (immediate_operand): Likewise.
1458         (struct aarch64_memory_operand): New struct.
1459         (offset_memory_operand): New helper function.
1460         (preindex_memory_operand): Likewise.
1461         (enum aarch64_system_control_registers): New enum.
1462         (ENCODE): New macro.
1463         (emit_insn): New helper function.
1464         (emit_b): New function.
1465         (emit_bcond): Likewise.
1466         (emit_cb): Likewise.
1467         (emit_tb): Likewise.
1468         (emit_blr): Likewise.
1469         (emit_stp): Likewise.
1470         (emit_ldp_q_offset): Likewise.
1471         (emit_stp_q_offset): Likewise.
1472         (emit_load_store): Likewise.
1473         (emit_ldr): Likewise.
1474         (emit_ldrsw): Likewise.
1475         (emit_str): Likewise.
1476         (emit_ldaxr): Likewise.
1477         (emit_stxr): Likewise.
1478         (emit_stlr): Likewise.
1479         (emit_data_processing_reg): Likewise.
1480         (emit_data_processing): Likewise.
1481         (emit_add): Likewise.
1482         (emit_sub): Likewise.
1483         (emit_mov): Likewise.
1484         (emit_movk): Likewise.
1485         (emit_mov_addr): Likewise.
1486         (emit_mrs): Likewise.
1487         (emit_msr): Likewise.
1488         (emit_sevl): Likewise.
1489         (emit_wfe): Likewise.
1490         (append_insns): Likewise.
1491         (can_encode_int32_in): New helper function.
1492         (aarch64_relocate_instruction): New function.
1493         (aarch64_install_fast_tracepoint_jump_pad): Likewise.
1494         (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
1495         (struct linux_target_ops): Install aarch64_get_thread_area,
1496         aarch64_install_fast_tracepoint_jump_pad and
1497         aarch64_get_min_fast_tracepoint_insn_len.
1498
1499 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
1500
1501         * Makefile.in (aarch64-insn.o): New rule.
1502         * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
1503
1504 2015-09-21  Yao Qi  <yao.qi@linaro.org>
1505
1506         * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
1507
1508 2015-09-21  Yao Qi  <yao.qi@linaro.org>
1509
1510         * tracepoint.c (max_jump_pad_size): Remove.
1511
1512 2015-09-18  Yao Qi  <yao.qi@linaro.org>
1513
1514         * linux-aarch64-low.c: Don't include sys/uio.h.
1515         (ps_get_thread_area): Call aarch64_ps_get_thread_area.
1516
1517 2015-09-16  Wei-cheng Wang  <cole945@gmail.com>
1518
1519         * tracepoint.c (eval_result_type): Change prototype.
1520         (condition_true_at_tracepoint): Fix argument to compiled_cond.
1521
1522 2015-09-15  Pedro Alves  <palves@redhat.com>
1523
1524         * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
1525         Check whether to report exec events instead of checking whether
1526         multiprocess is enabled.
1527
1528 2015-09-15  Pedro Alves  <palves@redhat.com>
1529
1530         PR remote/18965
1531         * remote-utils.c (prepare_resume_reply): Merge
1532         TARGET_WAITKIND_VFORK_DONE switch case with the
1533         TARGET_WAITKIND_FORKED case.
1534
1535 2015-09-15  Yao Qi  <yao.qi@linaro.org>
1536
1537         * server.c (handle_query): Check string comparison using
1538         "else if" instead of "if".
1539
1540 2015-09-15  Yao Qi  <yao.qi@linaro.org>
1541
1542         * server.c (vCont_supported): New global variable.
1543         (handle_query): Set vCont_supported to 1 if "vContSupported+"
1544         matches.  Append ";vContSupported+" to own_buf.
1545         (handle_v_requests): Append ";s;S" to own_buf if target supports
1546         hardware single step or vCont_supported is false.
1547         (capture_main): Set vCont_supported to zero.
1548
1549 2015-09-15  Yao Qi  <yao.qi@linaro.org>
1550
1551         * linux-low.c (linux_supports_conditional_breakpoints): Rename
1552         it to ...
1553         (linux_supports_hardware_single_step): ... New function.
1554         (linux_target_ops): Update.
1555         * lynx-low.c (lynx_target_ops): Set field
1556         supports_hardware_single_step to target_can_do_hardware_single_step.
1557         * nto-low.c (nto_target_ops): Likewise.
1558         * spu-low.c (spu_target_ops): Likewise.
1559         * win32-low.c (win32_target_ops): Likewise.
1560         * target.c (target_can_do_hardware_single_step): New function.
1561         * target.h (struct target_ops) <supports_conditional_breakpoints>:
1562         Remove.  <supports_hardware_single_step>: New field.
1563         (target_supports_conditional_breakpoints): Remove.
1564         (target_supports_hardware_single_step): New macro.
1565         (target_can_do_hardware_single_step): Declare.
1566         * server.c (handle_query): Use target_supports_hardware_single_step
1567         instead of target_supports_conditional_breakpoints.
1568
1569 2015-09-15  Yao Qi  <yao.qi@linaro.org>
1570
1571         * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
1572         function.
1573         (struct linux_target_ops the_low_target): Install
1574         aarch64_linux_siginfo_fixup.
1575
1576 2015-09-11  Don Breazeal  <donb@codesourcery.com>
1577             Luis Machado  <lgustavo@codesourcery.com>
1578
1579         * linux-low.c (linux_mourn): Static declaration.
1580         (linux_arch_setup): Move in front of
1581         handle_extended_wait.
1582         (linux_arch_setup_thread): New function.
1583         (handle_extended_wait): Handle exec events.  Call
1584         linux_arch_setup_thread.  Make event_lwp argument a
1585         pointer-to-a-pointer.
1586         (check_zombie_leaders): Do not check stopped threads.
1587         (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
1588         (linux_low_filter_event): Add lwp and thread for exec'ing
1589         non-leader thread if leader thread has been deleted.
1590         Refactor code into linux_arch_setup_thread and call it.
1591         Pass child lwp pointer by reference to handle_extended_wait.
1592         (linux_wait_for_event_filtered): Update comment.
1593         (linux_wait_1): Prevent clobbering exec event status.
1594         (linux_supports_exec_events): New function.
1595         (linux_target_ops) <supports_exec_events>: Initialize new member.
1596         * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
1597         new member.
1598         * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
1599         * server.c (report_exec_events): New global variable.
1600         (handle_query): Handle qSupported query for exec-events feature.
1601         (captured_main): Initialize report_exec_events.
1602         * server.h (report_exec_events): Declare new global variable.
1603         * target.h (struct target_ops) <supports_exec_events>: New
1604         member.
1605         (target_supports_exec_events): New macro.
1606         * win32-low.c (win32_target_ops) <supports_exec_events>:
1607         Initialize new member.
1608
1609 2015-09-09  Markus Metzger  <markus.t.metzger@intel.com>
1610
1611         * linux-low.c (linux_low_enable_btrace): Remove.
1612         (linux_target_ops): Replace linux_low_enable_btrace with
1613         linux_enable_btrace.
1614
1615 2015-09-03  Yao Qi  <yao.qi@linaro.org>
1616
1617         * linux-aarch64-low.c (aarch64_insert_point): Call
1618         aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
1619         returns true.
1620
1621 2015-08-27  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1622
1623         * linux-low.c (check_stopped_by_breakpoint): Use
1624         GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
1625
1626 2015-08-27  Pedro Alves  <palves@redhat.com>
1627
1628         * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
1629
1630 2015-08-26  Simon Marchi  <simon.marchi@ericsson.com>
1631
1632         * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
1633         the XNEW-family equivalent.
1634         (compile_bytecodes): Likewise.
1635         * dll.c (loaded_dll): Likewise.
1636         * event-loop.c (append_callback_event): Likewise.
1637         (create_file_handler): Likewise.
1638         (create_file_event): Likewise.
1639         * hostio.c (handle_open): Likewise.
1640         * inferiors.c (add_thread): Likewise.
1641         (add_process): Likewise.
1642         * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
1643         * linux-arm-low.c (arm_new_process): Likewise.
1644         (arm_new_thread): Likewise.
1645         * linux-low.c (add_to_pid_list): Likewise.
1646         (linux_add_process): Likewise.
1647         (handle_extended_wait): Likewise.
1648         (add_lwp): Likewise.
1649         (enqueue_one_deferred_signal): Likewise.
1650         (enqueue_pending_signal): Likewise.
1651         (linux_resume_one_lwp_throw): Likewise.
1652         (linux_resume_one_thread): Likewise.
1653         (linux_read_memory): Likewise.
1654         (linux_write_memory): Likewise.
1655         * linux-mips-low.c (mips_linux_new_process): Likewise.
1656         (mips_linux_new_thread): Likewise.
1657         (mips_add_watchpoint): Likewise.
1658         * linux-x86-low.c (initialize_low_arch): Likewise.
1659         * lynx-low.c (lynx_add_process): Likewise.
1660         * mem-break.c (set_raw_breakpoint_at): Likewise.
1661         (set_breakpoint): Likewise.
1662         (add_condition_to_breakpoint): Likewise.
1663         (add_commands_to_breakpoint): Likewise.
1664         (clone_agent_expr): Likewise.
1665         (clone_one_breakpoint): Likewise.
1666         * regcache.c (new_register_cache): Likewise.
1667         * remote-utils.c (look_up_one_symbol): Likewise.
1668         * server.c (queue_stop_reply): Likewise.
1669         (start_inferior): Likewise.
1670         (queue_stop_reply_callback): Likewise.
1671         (handle_target_event): Likewise.
1672         * spu-low.c (fetch_ppc_memory): Likewise.
1673         (store_ppc_memory): Likewise.
1674         * target.c (set_target_ops): Likewise.
1675         * thread-db.c (thread_db_load_search): Likewise.
1676         (try_thread_db_load_1): Likewise.
1677         * tracepoint.c (add_tracepoint): Likewise.
1678         (add_tracepoint_action): Likewise.
1679         (create_trace_state_variable): Likewise.
1680         (cmd_qtdpsrc): Likewise.
1681         (cmd_qtro): Likewise.
1682         (add_while_stepping_state): Likewise.
1683         * win32-low.c (child_add_thread): Likewise.
1684         (get_image_name): Likewise.
1685
1686 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1687
1688         * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
1689
1690 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1691
1692         * Makefile.in (aarch64-linux.o): New rule.
1693         * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
1694         srv_tgtobj.
1695         * linux-aarch64-low.c: Include nat/aarch64-linux.h.
1696         (aarch64_init_debug_reg_state): Make it extern.
1697         (aarch64_linux_prepare_to_resume): Remove.
1698
1699 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1700
1701         * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
1702         lwp_arch_private_info and ptid_of_lwp.
1703
1704 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1705
1706         * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
1707         Find proc_info by find_process_pid.  All callers updated.
1708
1709 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1710
1711         * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
1712         Remove.
1713         (debug_reg_change_callback): Remove.
1714         (aarch64_notify_debug_reg_change): Remove.
1715
1716 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1717
1718         * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
1719         Call current_lwp_ptid.
1720
1721 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1722
1723         * linux-aarch64-low.c (debug_reg_change_callback): Use
1724         debug_printf.
1725
1726 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1727
1728         * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
1729
1730 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1731
1732         * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
1733
1734 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1735
1736         * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
1737         the code.
1738
1739 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1740
1741         * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
1742         Remove.
1743         (debug_reg_change_callback): Remove argument entry and add argument
1744         lwp.  Remove local variable thread.  Don't print thread id in the
1745         debugging output.  Don't check whether pid of thread equals to pid.
1746         (aarch64_notify_debug_reg_change): Don't set param.pid.  Call
1747         iterate_over_lwps instead find_inferior.
1748
1749 2015-08-24  Pedro Alves  <palves@redhat.com>
1750
1751         * inferiors.c (get_first_process): New function.
1752         * inferiors.h (get_first_process): New declaration.
1753         * remote-utils.c (read_ptid): Default to the first process in the
1754         list, instead of to the current thread's process.
1755
1756 2015-08-24  Pedro Alves  <palves@redhat.com>
1757
1758         * debug.c: Include gdb_sys_time.h instead of sys/time.h.
1759         * event-loop.c: Likewise.
1760         * remote-utils.c: Likewise.
1761         * tracepoint.c: Likewise.
1762
1763 2015-08-24  Pedro Alves  <palves@redhat.com>
1764
1765         * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
1766         ptid_get_lwp.
1767
1768 2015-08-21  Pedro Alves  <palves@redhat.com>
1769
1770         * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
1771         instead of literal 1.
1772
1773 2015-08-21  Pedro Alves  <palves@redhat.com>
1774
1775         * tdesc.c (default_description): Explicitly zero-initialize.
1776
1777 2015-08-21  Pedro Alves  <palves@redhat.com>
1778
1779         PR gdb/18749
1780         * inferiors.c (remove_thread): Discard any pending stop reply for
1781         this thread.
1782         * server.c (remove_all_on_match_pid): Rename to ...
1783         (remove_all_on_match_ptid): ... this.  Work with a filter ptid
1784         instead of a pid.
1785         (discard_queued_stop_replies): Change parameter to a ptid.  Now
1786         extern.
1787         (handle_v_kill, kill_inferior_callback, captured_main)
1788         (process_serial_event): Adjust.
1789         * server.h (discard_queued_stop_replies): Declare.
1790
1791 2015-08-21  Pedro Alves  <palves@redhat.com>
1792
1793         * linux-low.c (wait_for_sigstop): Always switch to no thread
1794         selected if the previously current thread dies.
1795         * lynx-low.c (lynx_request_interrupt): Use the first thread's
1796         process instead of the current thread's.
1797         * remote-utils.c (input_interrupt): Don't check if there's no
1798         current thread.
1799         * server.c (gdb_read_memory, gdb_write_memory): If setting the
1800         current thread to the general thread fails, error out.
1801         (handle_qxfer_auxv, handle_qxfer_libraries)
1802         (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
1803         (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
1804         (handle_query): Check if there's a thread selected instead of
1805         checking whether there's any thread in the thread list.
1806         (handle_qxfer_threads, handle_qxfer_btrace)
1807         (handle_qxfer_btrace_conf): Don't error out early if there's no
1808         thread in the thread list.
1809         (handle_v_cont, myresume): Don't set the current thread to the
1810         continue thread.
1811         (process_serial_event) <Hg handling>: Also set thread_id if the
1812         previous general thread is still alive.
1813         (process_serial_event) <g/G handling>: If setting the current
1814         thread to the general thread fails, error out.
1815         * spu-low.c (spu_resume, spu_request_interrupt): Use the first
1816         thread's lwp instead of the current thread's.
1817         * target.c (set_desired_thread): If the desired thread was not
1818         found, leave the current thread pointing to NULL.  Return an int
1819         (boolean) indicating success.
1820         * target.h (set_desired_thread): Change return type to int.
1821
1822 2015-08-20  Max Filippov  <jcmvbkbc@gmail.com>
1823
1824         * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
1825         * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
1826         #includes.
1827         (ps_get_thread_area): New function.
1828
1829 2015-08-19  Gary Benson  <gbenson@redhat.com>
1830
1831         * hostio.c (handle_pread): Do not attempt to read more data
1832         than hostio_reply_with_data can fit in a packet.
1833
1834 2015-08-18  Joel Brobecker  <brobecker@adacore.com>
1835
1836         * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
1837
1838 2015-08-14  Matthew Fortune  <matthew.fortune@imgtec.com>
1839
1840         * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
1841
1842 2015-08-06  Pedro Alves  <palves@redhat.com>
1843
1844         * tracepoint.c (expr_eval_result): Now an int.
1845
1846 2015-08-06  Pedro Alves  <palves@redhat.com>
1847
1848         * gdbthread.h (struct regcache): Forward declare.
1849         (struct thread_info) <regcache_data>: Now a struct regcache
1850         pointer.
1851         * inferiors.c (inferior_regcache_data)
1852         (set_inferior_regcache_data): Now work with struct regcache
1853         pointers.
1854         * inferiors.h (struct regcache): Forward declare.
1855         (inferior_regcache_data, set_inferior_regcache_data): Now work
1856         with struct regcache pointers.
1857         * regcache.c (get_thread_regcache, regcache_invalidate_thread)
1858         (free_register_cache_thread): Remove struct regcache pointer
1859         casts.
1860
1861 2015-08-06  Pedro Alves  <palves@redhat.com>
1862
1863         * server.c (captured_main): On error, print the exception message
1864         to stderr, and if run_once is set, throw a quit.
1865
1866 2015-08-06  Pedro Alves  <palves@redhat.com>
1867
1868         * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
1869         the current thread.
1870
1871 2015-08-06  Pedro Alves  <palves@redhat.com>
1872
1873         * linux-low.c (linux_write_memory): Rewrite debug output to avoid
1874         reading beyond the passed in buffer length.
1875
1876 2015-08-06  Pierre Langlois  <pierre.langlois@arm.com>
1877
1878         * tracepoint.c (symbol_list) <required>: Remove.
1879
1880 2015-08-06  Pedro Alves  <palves@redhat.com>
1881
1882         * linux-low.c (handle_extended_wait): Set the fork child's suspend
1883         count if stopping and suspending threads.
1884         (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1885         stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1886         (linux_detach): Complete an ongoing step-over.
1887         (lwp_suspended_inc, lwp_suspended_decr): New functions.  Use
1888         throughout.
1889         (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1890         (linux_wait_1): If passing a signal to the inferior after
1891         finishing a step-over, unsuspend and re-resume all lwps.  If we
1892         see a single-step event but the thread should be continuing, don't
1893         pass the trap to gdb.
1894         (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1895         internal_error instead of gdb_assert.
1896         (enqueue_pending_signal): New function.
1897         (check_ptrace_stopped_lwp_gone): Add debug output.
1898         (start_step_over): Use internal_error instead of gdb_assert.
1899         (complete_ongoing_step_over): New function.
1900         (linux_resume_one_thread): Don't resume a suspended thread.
1901         (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1902         it stepping.
1903
1904 2015-08-06  Pedro Alves  <palves@redhat.com>
1905
1906         * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1907         (linux_thread_alive): Use lwp_is_marked_dead.
1908         (extended_event_reported): Delete.
1909         (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1910         instead of extended_event_reported.
1911         (mark_lwp_dead): Don't set the 'dead' flag.  Store the waitstatus
1912         as well.
1913         (lwp_is_marked_dead): New function.
1914         (lwp_running): Use lwp_is_marked_dead.
1915         * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1916         comment.
1917
1918 2015-08-06  Pedro Alves  <palves@redhat.com>
1919
1920         * linux-low.c (linux_wait_1): Move fork event output out of the
1921         !report_to_gdb check.  Pass event_child->waitstatus to
1922         target_waitstatus_to_string instead of ourstatus.
1923
1924 2015-08-04  Yao Qi  <yao.qi@linaro.org>
1925
1926         * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1927         if current_thread is 32 bit.
1928
1929 2015-08-04  Yao Qi  <yao.qi@linaro.org>
1930
1931         * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1932         0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1933         * server.c (extended_protocol): Remove "static".
1934         * server.h (extended_protocol): Declare it.
1935
1936 2015-08-04  Yao Qi  <yao.qi@linaro.org>
1937
1938         * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1939         both aarch64 and aarch32.
1940         (aarch64_set_pc): Likewise.
1941
1942 2015-08-04  Yao Qi  <yao.qi@linaro.org>
1943
1944         * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1945         to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1946         arm-with-neon.xml to srv_xmlfiles.
1947         * linux-aarch64-low.c: Include linux-aarch32-low.h.
1948         (is_64bit_tdesc): New function.
1949         (aarch64_linux_read_description): New function.
1950         (aarch64_arch_setup): Call aarch64_linux_read_description.
1951         (regs_info): Rename to regs_info_aarch64.
1952         (aarch64_regs_info): Return right regs_info.
1953         (initialize_low_arch): Call initialize_low_arch_aarch32.
1954
1955 2015-08-04  Yao Qi  <yao.qi@linaro.org>
1956
1957         * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1958         * linux-aarch32-low.c: New file.
1959         * linux-aarch32-low.h: New file.
1960         * linux-arm-low.c (arm_fill_gregset): Move it to
1961         linux-aarch32-low.c.
1962         (arm_store_gregset): Likewise.
1963         (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1964         (arm_store_vfpregset): Call arm_store_vfpregset_num.
1965         (arm_arch_setup): Check if PTRACE_GETREGSET works.
1966         (regs_info): Rename to regs_info_arm.
1967         (arm_regs_info): Return regs_info_aarch32 if
1968         have_ptrace_getregset is 1 and target description is
1969         arm_with_neon or arm_with_vfpv3.
1970         (initialize_low_arch): Don't call init_registers_arm_with_neon.
1971         Call initialize_low_arch_aarch32 instead.
1972
1973 2015-08-04  Yao Qi  <yao.qi@linaro.org>
1974
1975         * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1976         * linux-low.c: ... here.
1977         * linux-low.h (have_ptrace_getregset): Declare it.
1978
1979 2015-08-04  Pedro Alves  <palves@redhat.com>
1980
1981         * thread-db.c (struct thread_db): Use new typedefs.
1982         (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1983         CHK calls.
1984         (disable_thread_event_reporting): Cast result of dlsym to
1985         destination function pointer type.
1986         (thread_db_mourn): Use td_ta_delete_ftype.
1987
1988 2015-08-03  Sandra Loosemore  <sandra@codesourcery.com>
1989
1990         * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1991         arch variant.
1992         (CDX_BREAKPOINT): Define for R2.
1993         (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1994         (the_low_target): Add comments.
1995
1996 2015-07-30  Yao Qi  <yao.qi@linaro.org>
1997
1998         * linux-arm-low.c (arm_hwcap): Remove it.
1999         (arm_read_description): New local variable arm_hwcap.  Don't
2000         set arm_hwcap to zero.
2001
2002 2015-07-30  Yao Qi  <yao.qi@linaro.org>
2003
2004         * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
2005         Use regcache->tdesc instead.
2006         (arm_store_wmmxregset): Likewise.
2007         (arm_fill_vfpregset): Likewise.
2008         (arm_store_vfpregset): Likewise.
2009
2010 2015-07-30  Yao Qi  <yao.qi@linaro.org>
2011
2012         * linux-arm-low.c: Include arch/arm.h.
2013         (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
2014         (arm_store_gregset): Likewise.
2015
2016 2015-07-29  Simon Marchi  <simon.marchi@ericsson.com>
2017
2018         * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
2019         ptrace's 4th parameter.
2020
2021 2015-07-27  Yao Qi  <yao.qi@linaro.org>
2022
2023         * configure.srv (case aarch64*-*-linux*): Don't set
2024         srv_linux_usrregs.
2025
2026 2015-07-24  Pedro Alves  <palves@redhat.c: Likewise.om>
2027
2028         * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
2029         sys/ptrace.h.
2030         * linux-arm-low.c: Likewise.
2031         * linux-cris-low.c: Likewise.
2032         * linux-crisv32-low.c: Likewise.
2033         * linux-low.c: Likewise.
2034         * linux-m68k-low.c: Likewise.
2035         * linux-mips-low.c: Likewise.
2036         * linux-nios2-low.c: Likewise.
2037         * linux-s390-low.c: Likewise.
2038         * linux-sparc-low.c: Likewise.
2039         * linux-tic6x-low.c: Likewise.
2040         * linux-tile-low.c: Likewise.
2041         * linux-x86-low.c: Likewise.
2042
2043 2015-07-24  Pedro Alves  <palves@redhat.com>
2044
2045         * config.in: Regenerate.
2046         * configure: Regenerate.
2047
2048 2015-07-24  Pedro Alves  <palves@redhat.com>
2049
2050         * acinclude.m4: Include ../ptrace.m4.
2051         * configure.ac: Call GDB_AC_PTRACE.
2052         * config.in, configure: Regenerate.
2053
2054 2015-07-24  Yao Qi  <yao.qi@linaro.org>
2055
2056         * linux-low.c (linux_create_inferior): Remove setting to
2057         proc->priv->new_inferior.
2058         (linux_attach): Likewise.
2059         (linux_low_filter_event): Likewise.
2060         * linux-low.h (struct process_info_private) <new_inferior>: Remove.
2061
2062 2015-07-24  Yao Qi  <yao.qi@linaro.org>
2063
2064         * linux-low.c (linux_arch_setup): New function.
2065         (linux_low_filter_event): If proc->tdesc is NULL and
2066         proc->attached is true, call the_low_target.arch_setup.
2067         Otherwise, keep status pending, and return.
2068         (linux_resume_one_lwp_throw): Don't call get_pc if
2069         thread->while_stepping isn't NULL.  Don't call
2070         get_thread_regcache if proc->tdesc is NULL.
2071         (need_step_over_p): Return 0 if proc->tdesc is NULL.
2072         (linux_target_ops): Install arch_setup.
2073         * server.c (start_inferior): Call the_target->arch_setup.
2074         * target.h (struct target_ops) <arch_setup>: New field.
2075         (target_arch_setup): New marco.
2076         * lynx-low.c (lynx_target_ops): Update.
2077         * nto-low.c (nto_target_ops): Update.
2078         * spu-low.c (spu_target_ops): Update.
2079         * win32-low.c (win32_target_ops): Update.
2080
2081 2015-07-24  Yao Qi  <yao.qi@linaro.org>
2082
2083         * linux-low.c (linux_add_process): Don't set
2084         proc->priv->new_inferior.
2085         (linux_create_inferior): Set proc->priv->new_inferior to 1.
2086         (linux_attach): Likewise.
2087
2088 2015-07-24  Yao Qi  <yao.qi@linaro.org>
2089
2090         * server.c (start_inferior): Code refactor.
2091
2092 2015-07-24  Yao Qi  <yao.qi@linaro.org>
2093
2094         * server.c (process_serial_event): Set general_thread.
2095
2096 2015-07-21  Yao Qi  <yao.qi@linaro.org>
2097
2098         * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
2099         aarch64_linux_get_debug_reg_capacity.
2100
2101 2015-07-17  Yao Qi  <yao.qi@linaro.org>
2102
2103         * Makefile.in (aarch64-linux-hw-point.o): New rule.
2104         * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
2105         * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
2106         (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
2107         (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
2108         (AARCH64_HWP_ALIGNMENT): Likewise.
2109         (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
2110         (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
2111         (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
2112         (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
2113         (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
2114         (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
2115         (struct aarch64_debug_reg_state): Likewise.
2116         (struct arch_lwp_info): Likewise.
2117         (aarch64_align_watchpoint): Likewise.
2118         (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
2119         (aarch64_watchpoint_length): Likewise.
2120         (aarch64_point_encode_ctrl_reg): Likewise
2121         (aarch64_point_is_aligned): Likewise.
2122         (aarch64_align_watchpoint): Likewise.
2123         (aarch64_linux_set_debug_regs):
2124         (aarch64_dr_state_insert_one_point): Likewise.
2125         (aarch64_dr_state_remove_one_point): Likewise.
2126         (aarch64_handle_breakpoint): Likewise.
2127         (aarch64_handle_aligned_watchpoint): Likewise.
2128         (aarch64_handle_unaligned_watchpoint): Likewise.
2129         (aarch64_handle_watchpoint): Likewise.
2130
2131 2015-07-17  Yao Qi  <yao.qi@linaro.org>
2132
2133         * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
2134         and don't aarch64_get_debug_reg_state.  All callers update.
2135         (aarch64_handle_aligned_watchpoint): Likewise.
2136         (aarch64_handle_unaligned_watchpoint): Likewise.
2137         (aarch64_handle_watchpoint): Likewise.
2138         (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
2139         (aarch64_remove_point): Likewise.
2140
2141 2015-07-17  Yao Qi  <yao.qi@linaro.org>
2142
2143         * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
2144         debug_printf.
2145         (aarch64_handle_unaligned_watchpoint): Likewise.
2146
2147 2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
2148
2149         Revert the previous 3 commits:
2150         Move gdb_regex* to common/
2151         Move linux_find_memory_regions_full & co.
2152         gdbserver build-id attribute generator
2153
2154 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
2155             Jan Kratochvil  <jan.kratochvil@redhat.com>
2156
2157         gdbserver build-id attribute generator.
2158         * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
2159         (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
2160         (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
2161         (find_phdr): New.
2162         (get_dynamic): Use find_pdhr to traverse program headers.
2163         (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
2164         (compare_mapping_entry_range, struct find_memory_region_callback_data)
2165         (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
2166         (get_hex_build_id): New.
2167         (linux_qxfer_libraries_svr4): Add optional build-id attribute
2168         to reply XML document.
2169
2170 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
2171             Jan Kratochvil  <jan.kratochvil@redhat.com>
2172
2173         * target.c: Include target/target-utils.h and fcntl.h.
2174         (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
2175         (target_fileio_read_stralloc): New functions.
2176
2177 2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
2178
2179         * Makefile.in (OBS): Add gdb_regex.o.
2180         (gdb_regex.o): New.
2181         * config.in: Rebuilt.
2182         * configure: Rebuilt.
2183
2184 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
2185             Jan Kratochvil  <jan.kratochvil@redhat.com>
2186
2187         Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
2188         * Makefile.in (OBS): Add target-utils.o.
2189         (linux-maps.o, target-utils.o): New.
2190         * configure.srv (srv_linux_obj): Add linux-maps.o.
2191
2192 2015-07-15  Pierre Langlois  <pierre.langlois@arm.com>
2193
2194         * linux-aarch64-low.c (aarch64_supports_range_stepping): New
2195         function, return 1.
2196         (the_low_target): Install it.
2197
2198 2015-07-14  Pedro Alves  <palves@redhat.com>
2199
2200         * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
2201         Instead, ignore ECHILD, and throw an error for other errnos.
2202
2203 2015-07-10  Pedro Alves  <palves@redhat.com>
2204
2205         * event-loop.c (struct callback_event) <data>: Change type to
2206         gdb_client_data instance instead of gdb_client_data pointer.
2207         (append_callback_event): Adjust.
2208
2209 2015-07-10  Pierre Langlois  <pierre.langlois@arm.com>
2210
2211         * linux-aarch64-low.c: Add comments for each linux_target_ops
2212         method.  Remove comments already covered in target_ops and
2213         linux_target_ops definitions.
2214         (the_low_target): Add comments for each unimplemented method.
2215
2216 2015-07-09  Yao Qi  <yao.qi@linaro.org>
2217
2218         * linux-aarch64-low.c (aarch64_regmap): Remove.
2219         (aarch64_usrregs_info): Remove.
2220         (regs_info): Set field usrregs to NULL.
2221
2222 2015-07-02  Markus Metzger  <markus.t.metzger@intel.com>
2223
2224         * linux-low.c: Include "rsp-low.h"
2225         (linux_low_encode_pt_config, linux_low_encode_raw): New.
2226         (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
2227         (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
2228         (handle_btrace_enable_pt): New.
2229         (handle_btrace_general_set): Support "pt".
2230         (handle_btrace_conf_general_set): Support "pt:size".
2231
2232 2015-06-29  Pierre Langlois  <pierre.langlois@arm.com>
2233
2234         * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
2235         Z_PACKET_SW_BP.
2236
2237 2015-06-29  Pierre Langlois  <pierre.langlois@arm.com>
2238
2239         * linux-aarch64-low.c: Remove comment about endianness.
2240         (aarch64_breakpoint): Change type to gdb_byte[].  Set to "brk #0".
2241         (aarch64_breakpoint_at): Change type of insn to gdb_byte[].  Use
2242         memcmp.
2243
2244 2015-06-24  Gary Benson  <gbenson@redhat.com>
2245
2246         * linux-i386-ipa.c (stdint.h): Do not include.
2247         * lynx-i386-low.c (stdint.h): Likewise.
2248         * lynx-ppc-low.c (stdint.h): Likewise.
2249         * mem-break.c (stdint.h): Likewise.
2250         * thread-db.c (stdint.h): Likewise.
2251         * tracepoint.c (stdint.h): Likewise.
2252         * win32-low.c (stdint.h): Likewise.
2253
2254 2015-06-18  Simon Marchi  <simon.marchi@ericsson.com>
2255
2256         * server.c (write_qxfer_response): Update call to
2257         remote_escape_output.
2258
2259 2015-06-15  Aleksandar Ristovski  <aristovski@qnx.com
2260             Jan Kratochvil  <jan.kratochvil@redhat.com>
2261
2262         Merge multiple hex conversions.
2263         * gdbreplay.c (tohex): Rename to 'fromhex'.
2264         (logchar): Use fromhex.
2265
2266 2015-06-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
2267
2268         * server.c (handle_qxfer_libraries): Set `version' attribute for
2269         <library-list>.
2270
2271 2015-06-10  Gary Benson  <gbenson@redhat.com>
2272
2273         * target.h (struct target_ops) <multifs_open>: New field.
2274         <multifs_unlink>: Likewise.
2275         <multifs_readlink>: Likewise.
2276         * linux-low.c (nat/linux-namespaces.h): New include.
2277         (linux_target_ops): Initialize the_target->multifs_open,
2278         the_target->multifs_unlink and the_target->multifs_readlink.
2279         * hostio.h (hostio_handle_new_gdb_connection): New declaration.
2280         * hostio.c (hostio_fs_pid): New static variable.
2281         (hostio_handle_new_gdb_connection): New function.
2282         (handle_setfs): Likewise.
2283         (handle_open): Use the_target->multifs_open as appropriate.
2284         (handle_unlink): Use the_target->multifs_unlink as appropriate.
2285         (handle_readlink): Use the_target->multifs_readlink as
2286         appropriate.
2287         (handle_vFile): Handle vFile:setfs packets.
2288         * server.c (handle_query): Call hostio_handle_new_gdb_connection
2289         after target_handle_new_gdb_connection.
2290
2291 2015-06-10  Gary Benson  <gbenson@redhat.com>
2292
2293         * configure.ac (AC_CHECK_FUNCS): Add setns.
2294         * config.in: Regenerate.
2295         * configure: Likewise.
2296         * Makefile.in (SFILES): Add nat/linux-namespaces.c.
2297         (linux-namespaces.o): New rule.
2298         * configure.srv (srv_linux_obj): Add linux-namespaces.o.
2299
2300 2015-06-09  Gary Benson <gbenson@redhat.com>
2301
2302         * hostio.c (handle_open): Process mode argument with
2303         fileio_to_host_mode.
2304
2305 2015-06-01  Yao Qi  <yao.qi@linaro.org>
2306
2307         * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
2308         * linux-x86-low.c: Likewise.
2309
2310 2015-05-28  Don Breazeal  <donb@codesourcery.com>
2311
2312         * linux-low.c (handle_extended_wait): Initialize
2313         thread_info.last_resume_kind for new fork children.
2314
2315 2015-05-15  Pedro Alves  <palves@redhat.com>
2316
2317         * target.h (target_handle_new_gdb_connection): Rewrite using if
2318         wrapped in do/while.
2319
2320 2015-05-14  Joel Brobecker  <brobecker@adacore.com>
2321
2322         * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
2323         * configure, config.in: Regenerate.
2324         * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
2325         Declare typedef.
2326
2327 2015-05-12  Don Breazeal  <donb@codesourcery.com>
2328
2329         * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
2330         PTRACE_EVENT_VFORK_DONE.
2331         (linux_low_ptrace_options, extended_event_reported): Add vfork
2332         events.
2333         * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
2334         and "vforkdone" for RSP 'T' Stop Reply Packet.
2335         * server.h (report_vfork_events): Declare
2336         global variable.
2337
2338 2015-05-12  Don Breazeal  <donb@codesourcery.com>
2339
2340         * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
2341         (the_low_target) <new_fork>: Initialize new member.
2342         * linux-arm-low.c (arm_new_fork): New function.
2343         (the_low_target) <new_fork>: Initialize new member.
2344         * linux-low.c (handle_extended_wait): Call new target function
2345         new_fork.
2346         * linux-low.h (struct linux_target_ops) <new_fork>: New member.
2347         * linux-mips-low.c (mips_add_watchpoint): New function
2348         extracted from mips_insert_point.
2349         (the_low_target) <new_fork>: Initialize new member.
2350         (mips_linux_new_fork): New function.
2351         (mips_insert_point): Call mips_add_watchpoint.
2352         * linux-x86-low.c (x86_linux_new_fork): New function.
2353         (the_low_target) <new_fork>: Initialize new member.
2354
2355 2015-05-12  Don Breazeal  <donb@codesourcery.com>
2356
2357         * linux-low.c (handle_extended_wait): Implement return value,
2358         rename argument 'event_child' to 'event_lwp', handle
2359         PTRACE_EVENT_FORK, call internal_error for unrecognized event.
2360         (linux_low_ptrace_options): New function.
2361         (linux_low_filter_event): Call linux_low_ptrace_options,
2362         use different argument fo linux_enable_event_reporting,
2363         use return value from handle_extended_wait.
2364         (extended_event_reported): New function.
2365         (linux_wait_1): Call extended_event_reported and set
2366         status to report fork events.
2367         (linux_write_memory): Add pid to debug message.
2368         (reset_lwp_ptrace_options_callback): New function.
2369         (linux_handle_new_gdb_connection): New function.
2370         (linux_target_ops): Initialize new structure member.
2371         * linux-low.h (struct lwp_info) <waitstatus>: New member.
2372         * lynx-low.c: Initialize new structure member.
2373         * remote-utils.c (prepare_resume_reply): Implement stop reason
2374         "fork" for "T" stop message.
2375         * server.c (handle_query): Call handle_new_gdb_connection.
2376         * server.h (report_fork_events): Declare global flag.
2377         * target.h (struct target_ops) <handle_new_gdb_connection>:
2378         New member.
2379         (target_handle_new_gdb_connection): New macro.
2380         * win32-low.c: Initialize new structure member.
2381
2382 2015-05-12  Don Breazeal  <donb@codesourcery.com>
2383
2384         * mem-break.c (APPEND_TO_LIST): Define macro.
2385         (clone_agent_expr): New function.
2386         (clone_one_breakpoint): New function.
2387         (clone_all_breakpoints): New function.
2388         * mem-break.h: Declare new functions.
2389
2390 2015-05-12  Don Breazeal  <donb@codesourcery.com>
2391
2392         * linux-low.c (linux_supports_fork_events): New function.
2393         (linux_supports_vfork_events): New function.
2394         (linux_target_ops): Initialize new structure members.
2395         (initialize_low): Call linux_check_ptrace_features.
2396         * lynx-low.c (lynx_target_ops): Initialize new structure
2397         members.
2398         * server.c (report_fork_events, report_vfork_events):
2399         New global flags.
2400         (handle_query): Add new features to qSupported packet and
2401         response.
2402         (captured_main): Initialize new global variables.
2403         * target.h (struct target_ops) <supports_fork_events>:
2404         New member.
2405         <supports_vfork_events>: New member.
2406         (target_supports_fork_events): New macro.
2407         (target_supports_vfork_events): New macro.
2408         * win32-low.c (win32_target_ops): Initialize new structure
2409         members.
2410
2411 2015-05-12  Gary Benson <gbenson@redhat.com>
2412
2413         * server.c (handle_qxfer_exec_file): Use current process
2414         if annex is empty.
2415
2416 2015-05-08  Sandra Loosemore  <sandra@codesourcery.com>
2417
2418         * linux-nios2-low.c: Include elf/common.h.  Adjust comments.
2419         Remove HAVE_PTRACE_GETREGS conditionals.
2420         (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
2421         instead of PTRACE_GETREGS and PTRACE_SETREGS.
2422
2423 2015-05-08  Yao Qi  <yao.qi@linaro.org>
2424
2425         * linux-low.c (linux_supports_conditional_breakpoints): New
2426         function.
2427         (linux_target_ops): Install new target method.
2428         * lynx-low.c (lynx_target_ops): Install NULL hook for
2429         supports_conditional_breakpoints.
2430         * nto-low.c (nto_target_ops): Likewise.
2431         * spu-low.c (spu_target_ops): Likewise.
2432         * win32-low.c (win32_target_ops): Likewise.
2433         * server.c (handle_query): Check
2434         target_supports_conditional_breakpoints.
2435         * target.h (struct target_ops) <supports_conditional_breakpoints>:
2436         New field.
2437         (target_supports_conditional_breakpoints): New macro.
2438
2439 2015-05-06  Pedro Alves  <palves@redhat.com>
2440
2441         PR server/18081
2442         * server.c (start_inferior): If the process exits, mourn it.
2443
2444 2015-04-21  Gary Benson <gbenson@redhat.com>
2445
2446         * hostio.c (fileio_open_flags_to_host): Factored out to
2447         fileio_to_host_openflags in common/fileio.c.  Single use
2448         updated.
2449
2450 2015-04-17  Max Filippov  <jcmvbkbc@gmail.com>
2451
2452         * linux-xtensa-low.c (xtensa_fill_gregset)
2453         (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
2454         XCHAL_HAVE_LOOP.
2455
2456 2015-04-17  Max Filippov  <jcmvbkbc@gmail.com>
2457
2458         * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
2459         (regs_info): Replace usrregs pointer with NULL.
2460
2461 2015-04-17  Gary Benson  <gbenson@redhat.com>
2462
2463         * target.h (struct target_ops) <pid_to_exec_file>: New field.
2464         * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
2465         * server.c (handle_qxfer_exec_file): New function.
2466         (qxfer_packets): Add exec-file entry.
2467         (handle_query): Report qXfer:exec-file:read as supported packet.
2468
2469 2015-04-14  Romain Naour <romain.naour@openwide.fr>  (tiny change)
2470
2471         * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
2472
2473 2015-04-09  Gary Benson <gbenson@redhat.com>
2474
2475         * hostio-errno.c (errno_to_fileio_error): Remove function.
2476         Update caller to use remote_fileio_to_fio_error.
2477
2478 2015-04-09  Yao Qi  <yao.qi@linaro.org>
2479
2480         * linux-low.c (linux_insert_point): Call
2481         insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
2482         (linux_remove_point): Call remove_memory_breakpoint if type is
2483         raw_bkpt_type_sw.
2484         * linux-x86-low.c (x86_insert_point): Don't call
2485         insert_memory_breakpoint.
2486         (x86_remove_point): Don't call remove_memory_breakpoint.
2487
2488 2015-04-01  Pedro Alves  <palves@redhat.com>
2489             Cleber Rosa  <crosa@redhat.com>
2490
2491         * server.c (gdbserver_usage): Reorganize and extend the usage
2492         message.
2493
2494 2015-03-24  Pedro Alves  <palves@redhat.com>
2495
2496         * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
2497         output.  Also dump TRAP_TRACE.
2498         (linux_low_filter_event): In debug output, distinguish a
2499         resume_stop SIGSTOP from a delayed SIGSTOP.
2500
2501 2015-03-24  Gary Benson  <gbenson@redhat.com>
2502
2503         * linux-x86-low.c (x86_linux_new_thread): Moved to
2504         nat/x86-linux.c.
2505         (x86_linux_prepare_to_resume): Likewise.
2506
2507 2015-03-24  Gary Benson  <gbenson@redhat.com>
2508
2509         * Makefile.in (x86-linux-dregs.o): New rule.
2510         * configure.srv: Add x86-linux-dregs.o to relevant targets.
2511         * linux-x86-low.c: Include nat/x86-linux-dregs.h.
2512         (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
2513         (x86_linux_dr_get): Likewise.
2514         (x86_linux_dr_set): Likewise.
2515         (update_debug_registers_callback): Likewise.
2516         (x86_linux_dr_set_addr): Likewise.
2517         (x86_linux_dr_get_addr): Likewise.
2518         (x86_linux_dr_set_control): Likewise.
2519         (x86_linux_dr_get_control): Likewise.
2520         (x86_linux_dr_get_status): Likewise.
2521         (x86_linux_update_debug_registers): Likewise.
2522
2523 2015-03-24  Gary Benson  <gbenson@redhat.com>
2524
2525         * linux-x86-low.c (x86_linux_update_debug_registers):
2526         New function, factored out from...
2527         (x86_linux_prepare_to_resume): ...this.
2528
2529 2015-03-24  Gary Benson  <gbenson@redhat.com>
2530
2531         * linux-x86-low.c (x86_linux_dr_get): Update comments.
2532         (x86_linux_dr_set): Likewise.
2533         (update_debug_registers_callback): Likewise.
2534         (x86_linux_dr_set_addr): Likewise.
2535         (x86_linux_dr_get_addr): Likewise.
2536         (x86_linux_dr_set_control): Likewise.
2537         (x86_linux_dr_get_control): Likewise.
2538         (x86_linux_dr_get_status): Likewise.
2539         (x86_linux_prepare_to_resume): Likewise.
2540
2541 2015-03-24  Gary Benson  <gbenson@redhat.com>
2542
2543         * linux-x86-low.c (x86_linux_dr_get): Add assertion.
2544         Use perror_with_name.  Pass string through gettext.
2545         (x86_linux_dr_set): Likewise.
2546
2547 2015-03-24  Gary Benson  <gbenson@redhat.com>
2548
2549         * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
2550         (x86_linux_dr_set_addr): ...this.
2551         (x86_dr_low_get_addr): Rename to...
2552         (x86_linux_dr_get_addr): ...this.
2553         (x86_dr_low_set_control): Rename to...
2554         (x86_linux_dr_set_control): ...this.
2555         (x86_dr_low_get_control): Rename to...
2556         (x86_linux_dr_get_control): ...this.
2557         (x86_dr_low_get_status): Rename to...
2558         (x86_linux_dr_get_status): ...this.
2559         (x86_dr_low): Update with new function names.
2560
2561 2015-03-24  Gary Benson  <gbenson@redhat.com>
2562
2563         * Makefile.in (x86-linux.o): New rule.
2564         * configure.srv: Add x86-linux.o to relevant targets.
2565         * linux-low.c (lwp_set_arch_private_info): New function.
2566         (lwp_arch_private_info): Likewise.
2567         * linux-x86-low.c: Include nat/x86-linux.h.
2568         (arch_lwp_info): Removed structure.
2569         (update_debug_registers_callback):
2570         Use lwp_set_debug_registers_changed.
2571         (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
2572         and lwp_set_debug_registers_changed.
2573         (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
2574
2575 2015-03-24  Gary Benson  <gbenson@redhat.com>
2576
2577         * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
2578         * linux-arm-low.c (arm_new_thread): Likewise.
2579         * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
2580         * linux-mips-low.c (mips_linux_new_thread): Likewise.
2581         * linux-x86-low.c (x86_linux_new_thread): Likewise.
2582         * linux-low.c (add_lwp): Update the_low_target.new_thread call.
2583
2584 2015-03-24  Gary Benson  <gbenson@redhat.com>
2585
2586         * linux-low.c (ptid_of_lwp): New function.
2587         (lwp_is_stopped): Likewise.
2588         (lwp_stop_reason): Likewise.
2589         * linux-x86-low.c (update_debug_registers_callback):
2590         Use lwp_is_stopped.
2591         (x86_linux_prepare_to_resume): Use ptid_of_lwp and
2592         lwp_stop_reason.
2593
2594 2015-03-24  Gary Benson  <gbenson@redhat.com>
2595
2596         * linux-low.h (linux_stop_lwp): Remove declaration.
2597
2598 2015-03-24  Gary Benson  <gbenson@redhat.com>
2599
2600         * linux-low.h: Include nat/linux-nat.h.
2601         * linux-low.c (iterate_over_lwps_args): New structure.
2602         (iterate_over_lwps_filter): New function.
2603         (iterate_over_lwps): Likewise.
2604         * linux-x86-low.c (update_debug_registers_callback):
2605         Update signature to what iterate_over_lwps expects.
2606         Remove PID check that iterate_over_lwps now performs.
2607         (x86_dr_low_set_addr): Use iterate_over_lwps.
2608         (x86_dr_low_set_control): Likewise.
2609
2610 2015-03-24  Gary Benson  <gbenson@redhat.com>
2611
2612         * linux-x86-low.c (x86_debug_reg_state): New function.
2613         (x86_linux_prepare_to_resume): Use the above.
2614
2615 2015-03-24  Gary Benson  <gbenson@redhat.com>
2616
2617         * linux-low.c (current_lwp_ptid): New function.
2618         * linux-x86-low.c: Include nat/linux-nat.h.
2619         (x86_dr_low_get_addr): Use current_lwp_ptid.
2620         (x86_dr_low_get_control): Likewise.
2621         (x86_dr_low_get_status): Likewise.
2622
2623 2015-03-20  Pedro Alves  <palves@redhat.com>
2624
2625         * tracepoint.c (cmd_qtstatus): Make "str" const.
2626
2627 2015-03-20  Pedro Alves  <palves@redhat.com>
2628
2629         * server.c (handle_general_set): Make "req_str" const.
2630
2631 2015-03-19  Pedro Alves  <palves@redhat.com>
2632
2633         * linux-low.c (linux_resume_one_lwp): Rename to ...
2634         (linux_resume_one_lwp_throw): ... this.  Don't handle ESRCH here,
2635         instead call perror_with_name.
2636         (check_ptrace_stopped_lwp_gone): New function.
2637         (linux_resume_one_lwp): Reimplement as wrapper around
2638         linux_resume_one_lwp_throw that swallows errors if the LWP is
2639         gone.
2640
2641 2015-03-19  Pedro Alves  <palves@redhat.com>
2642
2643         * linux-low.c (count_events_callback, select_event_lwp_callback):
2644         No longer check whether the thread has resume_stop as last resume
2645         kind.
2646
2647 2015-03-19 Pedro Alves  <palves@redhat.com>
2648
2649         * linux-low.c (count_events_callback, select_event_lwp_callback):
2650         Use the lwp's status_pending_p field, not the thread's.
2651
2652 2015-03-19  Pedro Alves  <palves@redhat.com>
2653
2654         * linux-low.c (select_event_lwp_callback): Update comments to
2655         no longer mention SIGTRAP.
2656
2657 2015-03-18  Gary Benson  <gbenson@redhat.com>
2658
2659         * server.c (handle_query): Do not report vFile:fstat as supported.
2660
2661 2015-03-11  Gary Benson  <gbenson@redhat.com>
2662
2663         * hostio.c (sys/types.h): New include.
2664         (sys/stat.h): Likewise.
2665         (common-remote-fileio.h): Likewise.
2666         (handle_fstat): New function.
2667         (handle_vFile): Handle vFile:fstat packets.
2668
2669 2015-03-11  Gary Benson  <gbenson@redhat.com>
2670
2671         * configure.ac (AC_CHECK_MEMBERS): Add checks for
2672         struct stat.st_blocks and struct stat.st_blksize.
2673         * configure: Regenerate.
2674         * config.in: Likewise.
2675         * Makefile.in (SFILES): Add common/common-remote-fileio.c.
2676         (OBS): Add common-remote-fileio.o.
2677         (common-remote-fileio.o): New rule.
2678
2679 2015-03-09  Pedro Alves  <palves@redhat.com>
2680
2681         * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
2682         'struct sockaddr' pointer in 'accept' call.
2683
2684 2015-03-09  Pedro Alves  <palves@redhat.com>
2685
2686         Revert:
2687         2015-03-07  Pedro Alves  <palves@redhat.com>
2688         * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2689         or <winsock2.h> here.  Instead include "gdb_socket.h".
2690         (remote_open): Use union gdb_sockaddr_u.
2691         * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2692         or <winsock2.h> here.  Instead include "gdb_socket.h".
2693         (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2694         * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2695         or <sys/un.h>.
2696         (init_named_socket, gdb_agent_helper_thread): Use union
2697         gdb_sockaddr_u.
2698
2699 2015-03-07  Pedro Alves  <palves@redhat.com>
2700
2701         * configure.ac (build_warnings): Move
2702         -Wdeclaration-after-statement to the C-specific set.
2703         * configure: Regenerate.
2704
2705 2015-03-07  Pedro Alves  <palves@redhat.com>
2706
2707         * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2708         or <winsock2.h> here.  Instead include "gdb_socket.h".
2709         (remote_open): Use union gdb_sockaddr_u.
2710         * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2711         or <winsock2.h> here.  Instead include "gdb_socket.h".
2712         (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2713         * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2714         or <sys/un.h>.
2715         (init_named_socket, gdb_agent_helper_thread): Use union
2716         gdb_sockaddr_u.
2717
2718 2015-03-07  Pedro Alves  <palves@redhat.com>
2719
2720         Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
2721         instead.
2722
2723 2015-03-06  Yao Qi  <yao.qi@linaro.org>
2724
2725         * linux-aarch64-low.c (aarch64_insert_point): Use
2726         show_debug_regs as a boolean.
2727         (aarch64_remove_point): Likewise.
2728
2729 2015-03-05  Pedro Alves  <palves@redhat.com>
2730
2731         * lynx-low.c (lynx_target_ops): Install NULL hooks for
2732         stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2733         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
2734         * nto-low.c (nto_target_ops): Likewise.
2735         * spu-low.c (spu_target_ops): Likewise.
2736         * win32-low.c (win32_target_ops): Likewise.
2737
2738 2015-03-04  Pedro Alves  <palves@redhat.com>
2739
2740         * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
2741         Decide whether a breakpoint triggered based on the SIGTRAP's
2742         siginfo.si_code.
2743         (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
2744         breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
2745         (linux_low_filter_event): Check for breakpoints before checking
2746         watchpoints.
2747         (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
2748         siginfo.si_code.
2749         (linux_stopped_by_sw_breakpoint)
2750         (linux_supports_stopped_by_sw_breakpoint)
2751         (linux_stopped_by_hw_breakpoint)
2752         (linux_supports_stopped_by_hw_breakpoint): New functions.
2753         (linux_target_ops): Install new target methods.
2754
2755 2015-03-04  Pedro Alves  <palves@redhat.com>
2756
2757         * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
2758         * server.c (swbreak_feature, hwbreak_feature): New globals.
2759         (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
2760         (captured_main): Clear swbreak_feature and hwbreak_feature.
2761         * server.h (swbreak_feature, hwbreak_feature): Declare.
2762         * target.h (struct target_ops) <stopped_by_sw_breakpoint,
2763         supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
2764         supports_stopped_by_hw_breakpoint>: New fields.
2765         (target_supports_stopped_by_sw_breakpoint)
2766         (target_stopped_by_sw_breakpoint)
2767         (target_supports_stopped_by_hw_breakpoint)
2768         (target_stopped_by_hw_breakpoint): Declare.
2769
2770 2015-03-04  Pedro Alves  <palves@redhat.com>
2771
2772         enum lwp_stop_reason -> enum target_stop_reason
2773         * linux-low.c (check_stopped_by_breakpoint): Adjust.
2774         (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
2775         (linux_wait_1, stuck_in_jump_pad_callback)
2776         (move_out_of_jump_pad_callback, linux_resume_one_lwp)
2777         (linux_stopped_by_watchpoint):
2778         * linux-low.h (enum lwp_stop_reason): Delete.
2779         (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
2780         * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2781
2782 2015-03-04  Yao Qi  <yao.qi@linaro.org>
2783
2784         * Makefile.in (SFILES): Add linux-aarch64-low.c.
2785
2786 2015-03-03  Gary Benson  <gbenson@redhat.com>
2787
2788         * hostio.c (handle_vFile): Fix prefix lengths.
2789
2790 2015-03-03  Markus Metzger  <markus.t.metzger@intel.com>
2791
2792         * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
2793         ptr_bits.
2794
2795 2015-03-02  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2796
2797         * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
2798         (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
2799         (clean): Add "rm -f" for above C files.
2800         * configure.srv (srv_regobj): Add s390-vx-linux64.o,
2801         s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
2802         (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
2803         s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
2804         * linux-s390-low.c (HWCAP_S390_VX): New macro.
2805         (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
2806         (init_registers_s390x_vx_linux64)
2807         (init_registers_s390x_tevx_linux64)
2808         (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
2809         (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
2810         declarations.
2811         (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
2812         (s390_store_vxrs_high): New functions.
2813         (s390_regsets): Add entries for NT_S390_VXRS_LOW and
2814         NT_S390_VXRS_HIGH.
2815         (s390_arch_setup): Add logic for selecting one of the new target
2816         descriptions.  Activate the new vector regsets if applicable.
2817         (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
2818         init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
2819         and init_registers_s390x_tevx_linux64.
2820
2821 2015-03-01  Pedro Alves  <palves@redhat.com>
2822
2823         * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
2824         parameter.
2825
2826 2015-02-27  Pedro Alves  <palves@redhat.com>
2827
2828         * linux-x86-low.c (u_debugreg_offset): New function.
2829         (x86_linux_dr_get, x86_linux_dr_set): Use it.
2830
2831 2015-02-27  Pedro Alves  <palves@redhat.com>
2832
2833         * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
2834         [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
2835         [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
2836         ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2837         (ps_lsetfpregs, ps_getpid)
2838         (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
2839         (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
2840         (ps_lsetxregs, ps_plog): Declare.
2841
2842 2015-02-27  Pedro Alves  <palves@redhat.com>
2843
2844         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
2845         IP_AGENT_EXPORT_FUNC.
2846         * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
2847         IP_AGENT_EXPORT_FUNC.
2848         * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
2849         (IP_AGENT_EXPORT): Delete.
2850         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2851         (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2852         (gdb_trampoline_buffer_error, collecting, gdb_collect)
2853         (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
2854         (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
2855         (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
2856         (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
2857         (traceframe_read_count, traceframe_write_count)
2858         (traceframes_created, trace_state_variables, get_raw_reg)
2859         (get_trace_state_variable_value, set_trace_state_variable_value)
2860         (ust_loaded, helper_thread_id, cmd_buf): Use
2861         IPA_SYM_EXPORTED_NAME.
2862         (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
2863         (tracepoints) Use IP_AGENT_EXPORT_VAR.
2864         (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
2865         IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2866         (last_tracepoint): Move into !IN_PROCESS_AGENT block.
2867         (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
2868         EXTERN_C_PUSH/EXTERN_C_POP.
2869         (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
2870         (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
2871         wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2872         (trace_buffer_ctrl, trace_buffer_ctrl_curr)
2873         (traceframe_write_count, traceframe_read_count)
2874         (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
2875         (about_to_request_buffer_space, get_trace_state_variable_value)
2876         (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
2877         (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
2878         EXTERN_C_PUSH/EXTERN_C_POP.
2879         (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2880         (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2881         (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2882         and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2883         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2884         (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2885         (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2886         * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2887         Define.
2888         (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2889         (IP_AGENT_EXPORT_VAR_DECL): Define.
2890         (tracing): Declare.
2891         (gdb_agent_get_raw_reg): Declare.
2892
2893 2015-02-27  Tom Tromey  <tromey@redhat.com>
2894             Pedro Alves  <palves@redhat.com>
2895
2896         Rename symbols whose names are reserved C++ keywords throughout.
2897
2898 2015-02-27  Pedro Alves  <palves@redhat.com>
2899
2900         * Makefile.in (COMPILER): New, get it from autoconf.
2901         (CXX): Get from autoconf instead.
2902         (COMPILE.pre): Use COMPILER.
2903         (CC-LD): Rename to ...
2904         (CC_LD): ... this.  Use COMPILER.
2905         (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2906         (CXX_FOR_TARGET): Default to g++ instead of gcc.
2907         * acinclude.m4: Include build-with-cxx.m4.
2908         * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2909         Disable -Werror by default if building in C++ mode.
2910         (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2911         -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2912         the C++ compiler.  Save/restore CXXFLAGS too.
2913         * configure: Regenerate.
2914
2915 2015-02-27  Pedro Alves  <palves@redhat.com>
2916
2917         * acinclude.m4: Include libiberty.m4.
2918         * configure.ac: Call libiberty_INIT.
2919         * config.in, configure: Regenerate.
2920
2921 2015-02-26  Pedro Alves  <palves@redhat.com>
2922
2923         * linux-low.c (linux_wait_1): When incrementing the PC past a
2924         program breakpoint always use the_low_target.breakpoint_len as
2925         increment, rather than the maximum between that and
2926         the_low_target.decr_pc_after_break.
2927
2928 2015-02-23  Pedro Alves  <palves@redhat.com>
2929
2930         * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2931         thread was doing a step-over; always adjust the PC if
2932         we stepped over a permanent breakpoint.
2933         (linux_wait_1): If we stepped over breakpoint that was on top of a
2934         permanent breakpoint, manually advance the PC past it.
2935
2936 2015-02-23  Pedro Alves  <palves@redhat.com>
2937
2938         * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2939         modes.
2940         (x86_fill_gregset, x86_store_gregset): Use it when handling
2941         $orig_eax.
2942
2943 2015-02-20  Pedro Alves  <palves@redhat.com>
2944
2945         * thread-db.c: Include "nat/linux-procfs.h".
2946         (thread_db_init): Skip listing new threads if the kernel supports
2947         PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2948
2949 2015-02-20  Pedro Alves  <palves@redhat.com>
2950
2951         * linux-low.c (status_pending_p_callback): Use ptid_match.
2952
2953 2015-02-19  Antoine Tremblay  <antoine.tremblay@ericsson.com>
2954
2955         PR breakpoints/16812
2956         * linux-low.c (wstatus_maybe_breakpoint): Remove.
2957         (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2958         (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2959
2960 2015-02-10  Antoine Tremblay <antoine.tremblay@ericsson.com>
2961
2962         PR breakpoints/15956
2963         * tracepoint.c (cmd_qtinit): Add check for current_thread.
2964
2965 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
2966
2967         * linux-low.c (linux_low_btrace_conf): Print size.
2968         * server.c (handle_btrace_conf_general_set): New.
2969         (hanle_general_set): Call handle_btrace_conf_general_set.
2970         (handle_query): Report Qbtrace-conf:bts:size as supported.
2971
2972 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
2973
2974         * linux-low.c (linux_low_enable_btrace): Update parameters.
2975         (linux_low_btrace_conf): New.
2976         (linux_target_ops)<to_btrace_conf>: Initialize.
2977         * server.c (current_btrace_conf): New.
2978         (handle_btrace_enable): Rename to ...
2979         (handle_btrace_enable_bts): ... this.  Pass &current_btrace_conf
2980         to target_enable_btrace.  Update comment.  Update users.
2981         (handle_qxfer_btrace_conf): New.
2982         (qxfer_packets): Add btrace-conf entry.
2983         (handle_query): Report qXfer:btrace-conf:read as supported packet.
2984         * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2985         (target_ops)<read_btrace_conf>: New.
2986         (target_enable_btrace): Update parameters.
2987         (target_read_btrace_conf): New.
2988
2989 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
2990
2991         * server.c (handle_btrace_general_set): Remove call to
2992         target_supports_btrace.
2993         (supported_btrace_packets): New.
2994         (handle_query): Call supported_btrace_packets.
2995         * target.h: include btrace-common.h.
2996         (btrace_target_info): Removed.
2997         (supports_btrace, target_supports_btrace): Update parameters.
2998
2999 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
3000
3001         * Makefile.in (SFILES): Add common/btrace-common.c.
3002         (OBS): Add common/btrace-common.o.
3003         (btrace-common.o): Add build rules.
3004         * linux-low: Include btrace-common.h.
3005         (linux_low_read_btrace): Use struct btrace_data.  Call
3006         btrace_data_init and btrace_data_fini.
3007
3008 2015-02-06  Pedro Alves  <palves@redhat.com>
3009
3010         * thread-db.c (find_new_threads_callback): Add debug output.
3011
3012 2015-02-04  Pedro Alves  <palves@redhat.com>
3013
3014         * linux-low.c (handle_extended_wait): Don't resume LWPs here.
3015         (resume_stopped_resumed_lwps): New function.
3016         (linux_wait_for_event_filtered): Use it.
3017
3018 2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
3019
3020         * Makefile.in (SFILES): Add linux-personality.c.
3021         (linux-personality.o): New rule.
3022         * configure.srv (srv_linux_obj): Add linux-personality.o to the
3023         list of objects to be built.
3024         * linux-low.c: Include nat/linux-personality.h.
3025         (linux_create_inferior): Remove code to disable address space
3026         randomization (moved to ../nat/linux-personality.c).  Create
3027         cleanup to disable address space randomization.
3028
3029 2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
3030
3031         * Makefile.in (posix-strerror.o): New rule.
3032         (mingw-strerror.o): Likewise.
3033         * configure: Regenerated.
3034         * configure.ac: Source file ../common/common.host.  Initialize new
3035         variable srv_host_obs.  Add srv_host_obs to GDBSERVER_DEPFILES.
3036
3037 2015-01-14  Yao Qi  <yao@codesourcery.com>
3038
3039         * Makefile.in (SFILES): Add nat/ppc-linux.c.
3040         (ppc-linux.o): New rule.
3041         * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
3042         * configure.ac: AC_CHECK_FUNCS(getauxval).
3043         * config.in: Re-generated.
3044         * configure: Re-generated.
3045         * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
3046         ppc64_64bit_inferior_p
3047
3048 2015-01-14  Yao Qi  <yao@codesourcery.com>
3049
3050         * linux-ppc-low.c: Include "nat/ppc-linux.h".
3051          (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
3052         (PPC_FEATURE_HAS_ALTIVEC,  PPC_FEATURE_HAS_SPE): Likewise.
3053         (PT_ORIG_R3, PT_TRAP): Likewise.
3054         (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
3055         (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
3056         (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
3057
3058 2015-01-10  Joel Brobecker  <brobecker@adacore.com>
3059
3060         * i387-fp.c (i387_cache_to_xsave): In look over
3061         num_avx512_zmmh_high_registers, replace use of struct i387_xsave
3062         zmmh_low_space field by use of zmmh_high_space.
3063
3064 2015-01-09  Pedro Alves  <palves@redhat.com>
3065
3066         * linux-low.c (step_over_bkpt): Move higher up in the file.
3067         (handle_extended_wait): Don't store the stop_pc here.
3068         (get_stop_pc): Adjust comments and rename to ...
3069         (check_stopped_by_breakpoint): ... this.  Record whether the LWP
3070         stopped for a software breakpoint or hardware breakpoint.
3071         (thread_still_has_status_pending_p): New function.
3072         (status_pending_p_callback): Use
3073         thread_still_has_status_pending_p.  If the event is no longer
3074         interesting, resume the LWP.
3075         (handle_tracepoints): Add assert.
3076         (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
3077         (wstatus_maybe_breakpoint): New function.
3078         (cancel_breakpoint): Delete function.
3079         (check_stopped_by_watchpoint): New function, factored out from
3080         linux_low_filter_event.
3081         (lp_status_maybe_breakpoint): Delete function.
3082         (linux_low_filter_event): Remove filter_ptid argument.
3083         Leave thread group exits pending here.  Store the LWP's stop PC.
3084         Always leave events pending.
3085         (linux_wait_for_event_filtered): Pull all events out of the
3086         kernel, and leave them all pending.
3087         (count_events_callback, select_event_lwp_callback): Consider all
3088         events.
3089         (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
3090         (select_event_lwp): Only give preference to the stepping LWP in
3091         all-stop mode.  Adjust comments.
3092         (ignore_event): New function.
3093         (linux_wait_1): Delete 'retry' label.  Use ignore_event.  Remove
3094         references to cancel_breakpoints.  Adjust to renames.  Also give
3095         equal priority to all LWPs that have had events in non-stop mode.
3096         If reporting a software breakpoint event, unadjust the LWP's PC.
3097         (linux_wait): If linux_wait_1 returned an ignored event, retry.
3098         (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
3099         Adjust.
3100         (linux_resume_one_lwp): Store the LWP's PC.  Adjust.
3101         (resume_status_pending_p): Use thread_still_has_status_pending_p.
3102         (linux_stopped_by_watchpoint): Adjust.
3103         (linux_target_ops): Remove reference to linux_cancel_breakpoints.
3104         * linux-low.h (enum lwp_stop_reason): New.
3105         (struct lwp_info) <stop_pc>: Adjust comment.
3106         <stopped_by_watchpoint>: Delete field.
3107         <stop_reason>: New field.
3108         * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3109         * mem-break.c (software_breakpoint_inserted_here)
3110         (hardware_breakpoint_inserted_here): New function.
3111         * mem-break.h (software_breakpoint_inserted_here)
3112         (hardware_breakpoint_inserted_here): Declare.
3113         * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
3114         (cancel_breakpoints): Delete.
3115         * tracepoint.c (clear_installed_tracepoints, stop_tracing)
3116         (upload_fast_traceframes): Remove references to
3117         cancel_breakpoints.
3118
3119 2015-01-09  Pedro Alves  <palves@redhat.com>
3120
3121         * thread-db.c (find_new_threads_callback): Ignore thread if the
3122         kernel thread ID is -1.
3123
3124 2015-01-09  Pedro Alves  <palves@redhat.com>
3125
3126         * linux-low.c (linux_attach_fail_reason_string): Move to
3127         nat/linux-ptrace.c, and rename.
3128         (linux_attach_lwp): Update comment.
3129         (attach_proc_task_lwp_callback): New function.
3130         (linux_attach): Adjust to rename and use
3131         linux_proc_attach_tgid_threads.
3132         (linux_attach_fail_reason_string): Delete declaration.
3133
3134 2015-01-01  Joel Brobecker  <brobecker@adacore.com>
3135
3136         * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
3137         * server.c (gdbserver_version): Likewise.
3138
3139 2014-12-29  Sergio Durigan Junior  <sergiodj@redhat.com>
3140
3141         * remote-utils.c: Include ctype.h.
3142         (input_interrupt): Explicitly handle the case when the char
3143         received is the NUL byte.  Improve the printing of non-ASCII
3144         characters.
3145
3146 2014-12-16  Joel Brobecker  <brobecker@adacore.com>
3147
3148         * linux-low.c (linux_low_filter_event): Update call to
3149         linux_enable_event_reporting following the addition of
3150         a new parameter to that function.
3151
3152 2014-12-16  Catalin Udma  <catalin.udma@freescale.com>
3153
3154         PR server/17457
3155         * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
3156         (AARCH64_FPCR_REGNO): Likewise.
3157         (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
3158         (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
3159         (aarch64_store_fpregset): Likewise.
3160
3161 2014-12-15  Joel Brobecker  <brobecker@adacore.com>
3162
3163         * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
3164         Remove FIXME comment about assumption about N.
3165
3166 2014-12-13  Joel Brobecker  <brobecker@adacore.com>
3167
3168         * configure.ac: If large-file support is disabled in GDBserver,
3169         pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
3170         * configure: Regenerate.
3171
3172 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3173
3174         * linux-low.c (regsets_fetch_inferior_registers): Suppress the
3175         warning upon ENODATA from ptrace.
3176         * linux-s390-low.c (s390_store_tdb): New.
3177         (s390_regsets): Add regset for NT_S390_TDB.
3178
3179 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3180
3181         * linux-low.c (regsets_store_inferior_registers): Skip regsets
3182         without a fill_function.
3183         * linux-s390-low.c (s390_fill_last_break): Remove.
3184         (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
3185         (s390_arch_setup): Use regset's size instead of fill_function for
3186         loop end condition.
3187
3188 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3189
3190         * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
3191         the regset's store function when ptrace returned an error.
3192         * regcache.c (get_thread_regcache): Invalidate register cache
3193         before fetching inferior's registers.
3194
3195 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3196
3197         * linux-low.c (regsets_fetch_inferior_registers): Rephrase
3198         while-loop as for-loop.
3199         (regsets_store_inferior_registers): Likewise.
3200
3201 2014-11-28  Yao Qi  <yao@codesourcery.com>
3202
3203         * configure.ac(AC_CHECK_FUNCS): Remove readlink.
3204         * config.in, configure: Re-generate.
3205         * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
3206         is defined.
3207
3208 2014-11-21  Yao Qi  <yao@codesourcery.com>
3209
3210         * configure.ac: Don't invoke AC_FUNC_ALLOCA.
3211         (AC_CHECK_HEADERS): Remove malloc.h.
3212         * configure: Re-generated.
3213         * config.in: Re-generated.
3214         * server.h: Don't include alloca.h and malloc.h.
3215         * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
3216         Don't include malloc.h.
3217
3218 2014-11-17  Joel Brobecker  <brobecker@adacore.com>
3219
3220         * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
3221         corresponding ERRNO check in same block.
3222
3223 2014-11-12  Pedro Alves  <palves@redhat.com>
3224
3225         * server.c (cont_thread): Update comment.
3226         (start_inferior, attach_inferior): No longer clear cont_thread.
3227         (handle_v_cont): No longer set cont_thread.
3228         (captured_main): Clear cont_thread each time a GDB connects.
3229
3230 2014-11-12  Pedro Alves  <palves@redhat.com>
3231
3232         * linux-low.c (linux_wait_1): Don't force a wait for the Hc
3233         thread, and don't resume all threads if the Hc thread has exited.
3234
3235 2014-11-12  Pedro Alves  <palves@redhat.com>
3236
3237         * linux-low.c (linux_request_interrupt): Always send a SIGINT to
3238         the process group instead of to a specific LWP.
3239
3240 2014-10-15  Pedro Alves  <palves@redhat.com>
3241
3242         PR server/17487
3243         * win32-arm-low.c (arm_set_thread_context): Remove current_event
3244         parameter.
3245         (arm_set_thread_context): Delete.
3246         (the_low_target): Adjust.
3247         * win32-i386-low.c (debug_registers_changed)
3248         (debug_registers_used): Delete.
3249         (update_debug_registers_callback): New function.
3250         (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
3251         needing to update their debug registers.
3252         (win32_get_current_dr): New function.
3253         (x86_dr_low_get_addr, x86_dr_low_get_control)
3254         (x86_dr_low_get_status): Fetch the debug register from the thread
3255         record's context.
3256         (i386_initial_stuff): Adjust.
3257         (i386_get_thread_context): Remove current_event parameter.  Don't
3258         clear debug_registers_changed nor copy DR values to
3259         debug_reg_state.
3260         (i386_set_thread_context): Delete.
3261         (i386_prepare_to_resume): New function.
3262         (i386_thread_added): Mark the thread as needing to update irs
3263         debug registers.
3264         (the_low_target): Remove i386_set_thread_context and install
3265         i386_prepare_to_resume.
3266         * win32-low.c (win32_get_thread_context): Adjust.
3267         (win32_set_thread_context): Use SetThreadContext
3268         directly.
3269         (win32_prepare_to_resume): New function.
3270         (win32_require_context): New function, factored out from ...
3271         (thread_rec): ... this.
3272         (continue_one_thread): Call win32_prepare_to_resume on each thread
3273         we're about to continue.
3274         (win32_resume): Call win32_prepare_to_resume on the event thread.
3275         * win32-low.h (struct win32_thread_info)
3276         <debug_registers_changed>: New field.
3277         (struct win32_target_ops): Change prototype of set_thread_context,
3278         delete set_thread_context and add prepare_to_resume.
3279         (win32_require_context): New declaration.
3280
3281 2014-10-08  Gary Benson  <gbenson@redhat.com>
3282
3283         * server.h: Do not include common-exceptions.h.
3284
3285 2014-10-08  Gary Benson  <gbenson@redhat.com>
3286
3287         * server.h: Do not include cleanups.h.
3288
3289 2014-09-30  James Hogan  <james.hogan@imgtec.com>
3290
3291         * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
3292         mips64-dsp-linux.c.
3293
3294 2014-09-23  Yao Qi  <yao@codesourcery.com>
3295
3296         * linux-low.c (lp_status_maybe_breakpoint): New function.
3297         (linux_low_filter_event): Call lp_status_maybe_breakpoint.
3298         (count_events_callback): Likewise.
3299         (select_event_lwp_callback): Likewise.
3300         (cancel_breakpoints_callback): Likewise.
3301
3302 2014-09-19  Don Breazeal  <donb@codesourcery.com>
3303
3304         * linux-low.c (handle_extended_wait): Call
3305         linux_ptrace_get_extended_event.
3306         (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
3307         linux_is_extended_waitstatus.
3308
3309 2014-09-16  Joel Brobecker  <brobecker@adacore.com>
3310
3311         * Makefile.in (CPPFLAGS): Define.
3312         (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
3313         (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
3314
3315 2014-09-16  Gary Benson  <gbenson@redhat.com>
3316
3317         * inferiors.h (current_inferior): Renamed as...
3318         (current_thread): New variable.  All uses updated.
3319         * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
3320         (maybe_move_out_of_jump_pad): Likewise.
3321         (cancel_breakpoint): Likewise.
3322         (linux_low_filter_event): Likewise.
3323         (wait_for_sigstop): Likewise.
3324         (linux_resume_one_lwp): Likewise.
3325         (need_step_over_p): Likewise.
3326         (start_step_over): Likewise.
3327         (linux_stabilize_threads): Renamed save_inferior as saved_thread.
3328         * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
3329         * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
3330         and save_inferior as saved_thread.
3331         * regcache.c (get_thread_regcache): Renamed saved_inferior as
3332         saved_thread.
3333         (regcache_invalidate_thread): Likewise.
3334         * remote-utils.c (prepare_resume_reply): Likewise.
3335         * thread-db.c (thread_db_get_tls_address): Likewise.
3336         (disable_thread_event_reporting): Likewise.
3337         (remove_thread_event_breakpoints): Likewise.
3338         * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
3339         as saved_thread.
3340         * target.h (set_desired_inferior): Renamed as...
3341         (set_desired_thread): New declaration.  All uses updated.
3342         * server.c (myresume): Updated comment to reference thread instead
3343         of inferior.
3344         (handle_serial_event): Likewise.
3345         (handle_target_event): Likewise.
3346
3347 2014-09-12  Tom Tromey  <tromey@redhat.com>
3348             Gary Benson  <gbenson@redhat.com>
3349
3350         * regcache.h: Include common-regcache.h.
3351         (regcache_read_pc): Don't declare.
3352         * regcache.c (get_thread_regcache_for_ptid): New function.
3353
3354 2014-09-11  Tom Tromey  <tromey@redhat.com>
3355             Gary Benson  <gbenson@redhat.com>
3356
3357         * symbol.c: New file.
3358         * Makefile.in (SFILES): Add symbol.c.
3359         (OBS): Add symbol.o.
3360
3361 2014-09-11  Gary Benson  <gbenson@redhat.com>
3362
3363         * target.c (target_stop_ptid, target_continue_ptid): New
3364         functions.
3365
3366 2014-09-11  Tom Tromey  <tromey@redhat.com>
3367             Gary Benson  <gbenson@redhat.com>
3368
3369         * target.h: Include target/target.h.
3370         * target.c (target_read_memory, target_read_uint32)
3371         (target_write_memory): New functions.
3372
3373 2014-09-11  Gary Benson  <gbenson@redhat.com>
3374
3375         * server.h (debug_hw_points): Don't declare.
3376         * server.c (debug_hw_points): Don't define.  Replace all uses
3377         with show_debug_regs.
3378         * linux-aarch64-low.c (debug_hw_points): Don't define.  Replace
3379         all uses with show_debug_regs.
3380
3381 2014-09-08  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
3382
3383         * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
3384         endianness into account.
3385         (ppc_supply_ptrace_register): Likewise.
3386
3387 2014-09-03  James Hogan  <james.hogan@imgtec.com>
3388
3389         * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
3390         to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
3391
3392 2014-09-03  Gary Benson  <gbenson@redhat.com>
3393
3394         * linux-x86-low.c (x86_linux_prepare_to_resume): Use
3395         ALL_DEBUG_ADDRESS_REGISTERS.
3396
3397 2014-09-02  Gary Benson  <gbenson@redhat.com>
3398
3399         * i386-low.h: Renamed as...
3400         * x86-low.h: New file.  All type, function and variable name
3401         prefixes changed from "i386_" to "x86_".  All references updated.
3402         * i386-low.c: Renamed as...
3403         * x86-low.c: New file.  All type, function and variable name
3404         prefixes changed from "i386_" to "x86_".  All references updated.
3405
3406 2014-09-02  Gary Benson  <gbenson@redhat.com>
3407
3408         * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
3409         (x86_linux_new_thread): Likewise.
3410
3411 2014-08-29  Gary Benson  <gbenson@redhat.com>
3412
3413         * server.h (setjmp.h): Do not include.
3414         (toplevel): Do not declare.
3415         (common-exceptions.h): Include.
3416         (cleanups.h): Likewise.
3417         * server.c (toplevel): Do not define.
3418         (exit_code): New static global.
3419         (detach_or_kill_for_exit_cleanup): New function.
3420         (main): New function.  Original main renamed to...
3421         (captured_main): New function.
3422         * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
3423
3424 2014-08-29  Gary Benson  <gbenson@redhat.com>
3425
3426         * Makefile.in (SFILES): Add common/common-exceptions.c.
3427         (OBS): Add common-exceptions.o.
3428         (common-exceptions.o): New rule.
3429         * utils.c (prepare_to_throw_exception): New function.
3430
3431 2014-08-29  Gary Benson  <gbenson@redhat.com>
3432
3433         * config.in: Regenerate.
3434         * configure: Likewise.
3435
3436 2014-08-29  Gary Benson  <gbenson@redhat.com>
3437
3438         * Makefile.in (SFILES): Add common/cleanups.c.
3439         (OBS): cleanups.o.
3440         (cleanups.o): New rule.
3441
3442 2014-08-29  Gary Benson  <gbenson@redhat.com>
3443
3444         * utils.c (internal_vwarning): New function.
3445
3446 2014-08-28  Gary Benson  <gbenson@redhat.com>
3447
3448         * utils.h (fatal): Remove declaration.
3449         * utils.c (fatal): Remove function.
3450
3451 2014-08-28  Gary Benson  <gbenson@redhat.com>
3452
3453         * tracepoint.c (gdb_agent_init): Replace fatal with
3454         perror_with_name.
3455         (initialize_tracepoint): Likewise.
3456
3457 2014-08-28  Gary Benson  <gbenson@redhat.com>
3458
3459         * remote-utils.c (remote_prepare): Replace fatal with error.
3460
3461 2014-08-28  Gary Benson  <gbenson@redhat.com>
3462
3463         * linux-low.c (linux_async): Replace fatal with warning.
3464         Tidy up and return.
3465         (linux_start_non_stop): Return -1 if linux_async failed.
3466
3467 2014-08-28  Gary Benson  <gbenson@redhat.com>
3468
3469         * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
3470         gdb_assert.
3471         (i386_dr_low_get_addr): Remove vague comment.
3472         * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
3473         gdb_assert.
3474
3475 2014-08-28  Gary Benson  <gbenson@redhat.com>
3476
3477         * inferiors.c (get_thread_process): Replace check with gdb_assert.
3478         * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
3479         internal_error.
3480         (linux_resume_one_lwp): Likewise.
3481         * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
3482         gdb_assert.
3483         * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
3484         with internal_error.
3485         * regcache.c (get_thread_regcache): Replace check with gdb_assert.
3486         (init_register_cache): Replace fatal with gdb_assert_not_reached.
3487         (find_register_by_name): Replace fatal with internal_error.
3488         (find_regno): Likewise.
3489         * tdesc.c (init_target_desc): Replace check with gdb_assert.
3490         * thread-db.c (thread_db_create_event): Likewise.
3491         (thread_db_load_search): Likewise.
3492         (try_thread_db_load_1): Likewise.
3493         * tracepoint.c (get_jump_space_head): Replace fatal with
3494         internal_error.
3495         (claim_trampoline_space): Likewise.
3496         (have_fast_tracepoint_trampoline_buffer): Likewise.
3497         (cmd_qtstart): Likewise.
3498         (stop_tracing): Likewise.
3499         (fast_tracepoint_collecting): Likewise.
3500         (target_malloc): Likewise.
3501         (download_tracepoint): Likewise.
3502         (download_trace_state_variables): Replace check with gdb_assert.
3503         (upload_fast_traceframes): Replace fatal with internal_error.
3504
3505 2014-08-19  Tom Tromey  <tromey@redhat.com>
3506             Gary Benson  <gbenson@redhat.com>
3507
3508         * Makefile.in (SFILES): Add common/common-debug.c.
3509         (OBS): Add common-debug.o.
3510         (common-debug.o): New rule.
3511         * debug.h (debug_printf): Don't declare.
3512         * debug.c (debug_printf): Renamed and rewritten as...
3513         (debug_vprintf): New function.
3514
3515 2014-08-19  Gary Benson  <gbenson@redhat.com>
3516
3517         * utils.h: Do not include print-utils.h.
3518
3519 2014-08-19  Tom Tromey  <tromey@redhat.com>
3520             Gary Benson  <gbenson@redhat.com>
3521
3522         * server.h: Add static assertion.
3523         (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
3524
3525 2014-08-19  Tom Tromey  <tromey@redhat.com>
3526             Gary Benson  <gbenson@redhat.com>
3527
3528         * Makefile.in (SFILES): Add common/errors.c.
3529         (OBS): Add errors.o.
3530         (IPA_OBS): Add errors-ipa.o.
3531         (errors.o): New rule.
3532         (errors-ipa.o): Likewise.
3533         * utils.h (perror_with_name, error, warning): Don't declare.
3534         * utils.c (warning): Renamed and rewritten as...
3535         (vwarning): New function.
3536         (error): Renamed and rewritten as...
3537         (verror): New function.
3538         (internal_error): Renamed and rewritten as...
3539         (internal_verror): New function.
3540
3541 2014-08-07  Gary Benson  <gbenson@redhat.com>
3542
3543         * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
3544         * configure: Regenerate.
3545         * config.in: Likewise.
3546         * server.h: Do not include errno.h.
3547         * event-loop.c: Likewise.
3548         * hostio-errno.c: Likewise.
3549         * linux-low.c: Likewise.
3550         * remote-utils.c: Likewise.
3551         * spu-low.c: Likewise.
3552         * utils.c: Likewise.
3553         * gdbreplay.c: Unconditionally include errno.h.
3554
3555 2014-08-07  Gary Benson  <gbenson@redhat.com>
3556
3557         * server.h: Do not include string.h.
3558         * event-loop.c: Likewise.
3559         * linux-low.c: Likewise.
3560         * regcache.c: Likewise.
3561         * remote-utils.c: Likewise.
3562         * spu-low.c: Likewise.
3563         * utils.c: Likewise.
3564
3565 2014-08-07  Gary Benson  <gbenson@redhat.com>
3566
3567         * server.h: Do not include gdb_assert.h.
3568
3569 2014-08-07  Gary Benson  <gbenson@redhat.com>
3570
3571         * server.h: Do not include common-utils.h.
3572
3573 2014-08-07  Gary Benson  <gbenson@redhat.com>
3574
3575         * server.h: Do not include ptid.h.
3576         * notif.h: Likewise.
3577
3578 2014-08-07  Gary Benson  <gbenson@redhat.com>
3579
3580         * server.h: Do not include gdb_locale.h.
3581
3582 2014-08-07  Gary Benson  <gbenson@redhat.com>
3583
3584         * server.h: Do not include gdb/signals.h.
3585         * win32-low.c: Likewise.
3586
3587 2014-08-07  Gary Benson  <gbenson@redhat.com>
3588
3589         * server.h: Do not include pathmax.h.
3590
3591 2014-08-07  Gary Benson  <gbenson@redhat.com>
3592
3593         * server.h: Do not include libiberty.h.
3594         * linux-bfin-low.c: Likewise.
3595
3596 2014-08-07  Gary Benson  <gbenson@redhat.com>
3597
3598         * server.h: Do not include ansidecl.h.
3599
3600 2014-08-07  Gary Benson  <gbenson@redhat.com>
3601
3602         * linux-x86-low.c: Do not include stddef.h.
3603         * lynx-ppc-low.c: Likewise.
3604         * tracepoint.c: Likewise.
3605
3606 2014-08-07  Gary Benson  <gbenson@redhat.com>
3607
3608         * server.h: Do not include stdarg.h.
3609         * nto-low.c: Likewise.
3610
3611 2014-08-07  Gary Benson  <gbenson@redhat.com>
3612
3613         * server.h: Do not include stdlib.h.
3614         * inferiors.c: Likewise.
3615         * linux-low.c: Likewise.
3616         * regcache.c: Likewise.
3617         * spu-low.c: Likewise.
3618         * tracepoint.c: Likewise.
3619         * utils.c: Likewise.
3620
3621 2014-08-07  Gary Benson  <gbenson@redhat.com>
3622
3623         * server.h: Do not include stdio.h.
3624         * linux-low.c: Likewise.
3625         * remote-utils.c: Likewise.
3626         * spu-low.c: Likewise.
3627         * utils.c: Likewise.
3628         * wincecompat.c: Likewise.
3629
3630 2014-08-06  Gary Benson  <gbenson@redhat.com>
3631
3632         * regcache.c (init_register_cache): Move conditionals inside if.
3633
3634 2014-08-06  Gary Benson  <gbenson@redhat.com>
3635
3636         * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
3637
3638 2014-07-31  Gary Benson  <gbenson@redhat.com>
3639
3640         * ax.h: Do not include server.h.
3641         * gdbthread.h: Likewise.
3642         * lynx-low.h: Likewise.
3643         * notif.h: Likewise.
3644
3645 2014-07-30  Gary Benson  <gbenson@redhat.com>
3646
3647         * server.h: Include common-defs.h.
3648         Do not include config.h or build-gnulib-gdbserver/config.h.
3649
3650 2014-07-30  Gary Benson  <gbenson@redhat.com>
3651
3652         * hostio-errno.c: Move server.h to top of includes list.
3653         * inferiors.c: Likewise.
3654         * linux-x86-low.c: Likewise.
3655         * notif.c: Include server.h.
3656
3657 2014-07-24  Tom Tromey  <tromey@redhat.com>
3658             Gary Benson  <gbenson@redhat.com>
3659
3660         * server.h (CORE_ADDR): Now unsigned.
3661
3662 2014-07-16  Pedro Alves  <palves@redhat.com>
3663
3664         * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
3665
3666 2014-07-15  Pedro Alves  <palves@redhat.com>
3667
3668         * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
3669         copy.
3670
3671 2014-07-11  Pedro Alves  <palves@redhat.com>
3672
3673         * linux-low.c (kill_wait_lwp): New function, based on
3674         kill_one_lwp_callback, but use my_waitpid directly.
3675         (kill_one_lwp_callback, linux_kill): Use it.
3676
3677 2014-06-23  Pedro Alves  <palves@redhat.com>
3678
3679         * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
3680         before setting DR0..DR3.
3681
3682 2014-06-20  Gary Benson  <gbenson@redhat.com>
3683
3684         * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
3685         * configure: Regenerated.
3686         * config.in: Likewise.
3687
3688 2014-06-20  Gary Benson  <gbenson@redhat.com>
3689
3690         * Makefile.in (SFILES): Update locations for files moved
3691         from common to nat.
3692         (object file files): Reordered.
3693
3694 2014-06-20  Gary Benson  <gbenson@redhat.com>
3695
3696         * i386-low.h (i386_dr_low_can_set_addr): Removed.
3697         (i386_dr_low_set_addr): Likewise.
3698         (i386_dr_low_get_addr): Likewise.
3699         (i386_dr_low_can_set_control): Likewise.
3700         (i386_dr_low_set_control): Likewise.
3701         (i386_dr_low_get_control): Likewise.
3702         (i386_dr_low_get_status): Likewise.
3703         (i386_get_debug_register_length): Likewise.
3704         * linux-x86-low.c (i386_dr_low_set_addr):
3705         Changed signature.  Made static.
3706         (i386_dr_low_get_addr): Likewise.
3707         (i386_dr_low_set_control): Likewise.
3708         (i386_dr_low_get_control): Likewise.
3709         (i386_dr_low_get_status): Likewise.
3710         (i386_dr_low): New global variable.
3711         * win32-i386-low.c (i386_dr_low_set_addr):
3712         Changed signature.  Made static.
3713         (i386_dr_low_get_addr): Likewise.
3714         (i386_dr_low_set_control): Likewise.
3715         (i386_dr_low_get_control): Likewise.
3716         (i386_dr_low_get_status): Likewise.
3717         (i386_dr_low): New global variable.
3718
3719 2014-06-20  Marcus Shawcroft  <marcus.shawcroft@arm.com>
3720
3721         * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
3722         * Makefile.in (AR, AR_FLAGS): Define.
3723         * configure: Regenerate.
3724
3725 2014-06-19  Gary Benson  <gbenson@redhat.com>
3726
3727         * Makefile.in (i386-dregs.o): New rule.
3728         * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
3729         * i386-low.c (target.h): Remove include.
3730         (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
3731         (DR_CONTROL_SHIFT): Likewise.
3732         (DR_CONTROL_SIZE): Likewise.
3733         (DR_RW_EXECUTE): Likewise.
3734         (DR_RW_WRITE): Likewise.
3735         (DR_RW_READ): Likewise.
3736         (DR_RW_IORW): Likewise.
3737         (DR_LEN_1): Likewise.
3738         (DR_LEN_2): Likewise.
3739         (DR_LEN_4): Likewise.
3740         (DR_LEN_8): Likewise.
3741         (DR_LOCAL_ENABLE_SHIFT): Likewise.
3742         (DR_GLOBAL_ENABLE_SHIFT): Likewise.
3743         (DR_ENABLE_SIZE): Likewise.
3744         (DR_LOCAL_SLOWDOWN): Likewise.
3745         (DR_GLOBAL_SLOWDOWN): Likewise.
3746         (DR_CONTROL_RESERVED): Likewise.
3747         (I386_DR_CONTROL_MASK): Likewise.
3748         (I386_DR_VACANT): Likewise.
3749         (I386_DR_LOCAL_ENABLE): Likewise.
3750         (I386_DR_GLOBAL_ENABLE): Likewise.
3751         (I386_DR_DISABLE): Likewise.
3752         (I386_DR_SET_RW_LEN): Likewise.
3753         (I386_DR_GET_RW_LEN): Likewise.
3754         (I386_DR_WATCH_HIT): Likewise.
3755         (i386_wp_op_t): Likewise.
3756         (i386_show_dr): Likewise.
3757         (i386_length_and_rw_bits): Likewise.
3758         (i386_insert_aligned_watchpoint): Likewise.
3759         (i386_remove_aligned_watchpoint): Likewise.
3760         (i386_handle_nonaligned_watchpoint): Likewise.
3761         i386_update_inferior_debug_regs(): Likewise.
3762         (i386_dr_insert_watchpoint): Likewise.
3763         (i386_dr_remove_watchpoint): Likewise.
3764         (i386_dr_region_ok_for_watchpoint): Likewise.
3765         (i386_dr_stopped_data_address): Likewise.
3766         (i386_dr_stopped_by_watchpoint): Likewise.
3767
3768 2014-06-19  Gary Benson  <gbenson@redhat.com>
3769
3770         * i386-low.c (i386_dr_show): Renamed to
3771         i386_show_dr and made static.  All uses updated.
3772         (i386_dr_length_and_rw_bits): Renamed to
3773         i386_length_and_rw_bits and made static.
3774         All uses updated.
3775         (i386_dr_insert_aligned_watchpoint): Renamed to
3776         i386_insert_aligned_watchpoint and made static.
3777         All uses updated.
3778         (i386_dr_remove_aligned_watchpoint): Renamed to
3779         i386_remove_aligned_watchpoint and made static.
3780         All uses updated.
3781         (i386_dr_update_inferior_debug_regs): Renamed to
3782         i386_update_inferior_debug_regs and made static.
3783         All uses updated.
3784
3785 2014-06-18  Gary Benson  <gbenson@redhat.com>
3786
3787         * i386-low.h (i386_dr_low_can_set_addr): New macro.
3788         (i386_dr_low_can_set_control): Likewise.
3789         (i386_get_debug_register_length): Likewise.
3790         * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
3791         (i386_dr_low_can_set_control): Likewise.
3792         (i386_get_debug_register_length): Likewise.
3793
3794 2014-06-17  Gary Benson  <gbenson@redhat.com>
3795
3796         * i386-low.h (i386-dregs.h): New include.
3797         (DR_FIRSTADDR): Now in i386-dregs.h.
3798         (DR_LASTADDR): Likewise.
3799         (DR_NADDR): Likewise.
3800         (DR_STATUS): Likewise.
3801         (DR_CONTROL): Likewise.
3802         (i386_debug_reg_state): Likewise.
3803         (i386_dr_insert_watchpoint): Likewise.
3804         (i386_dr_remove_watchpoint): Likewise.
3805         (i386_dr_region_ok_for_watchpoint): Likewise.
3806         (i386_dr_stopped_data_address): Likewise.
3807         (i386_dr_stopped_by_watchpoint): Likewise.
3808         * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
3809
3810 2014-06-18  Gary Benson  <gbenson@redhat.com>
3811
3812         * i386-low.h (i386_low_insert_watchpoint): Renamed to
3813         i386_dr_insert_watchpoint.
3814         (i386_low_remove_watchpoint): Renamed to
3815         i386_dr_remove_watchpoint.
3816         (i386_low_region_ok_for_watchpoint): Renamed to
3817         i386_dr_region_ok_for_watchpoint.
3818         (i386_low_stopped_data_address): Renamed to
3819         i386_dr_stopped_data_address.
3820         (i386_low_stopped_by_watchpoint): Renamed to
3821         i386_dr_stopped_by_watchpoint.
3822         * i386-low.c (i386_show_dr): Renamed to
3823         i386_dr_show and made nonstatic.  All uses updated.
3824         (i386_length_and_rw_bits): Renamed to
3825         i386_dr_length_and_rw_bits and made nonstatic.
3826         All uses updated.
3827         (i386_insert_aligned_watchpoint): Renamed to
3828         i386_dr_insert_aligned_watchpoint and made nonstatic.
3829         All uses updated.
3830         (i386_remove_aligned_watchpoint): Renamed to
3831         i386_dr_remove_aligned_watchpoint and made nonstatic.
3832         All uses updated.
3833         (i386_update_inferior_debug_regs): Renamed to
3834         i386_dr_update_inferior_debug_regs and made nonstatic.
3835         All uses updated.
3836         (i386_low_insert_watchpoint): Renamed to
3837         i386_dr_insert_watchpoint.  All uses updated.
3838         (i386_low_remove_watchpoint): Renamed to
3839         i386_dr_remove_watchpoint.  All uses updated.
3840         (i386_low_region_ok_for_watchpoint): Renamed to
3841         i386_dr_region_ok_for_watchpoint.  All uses updated.
3842         (i386_low_stopped_data_address): Renamed to
3843         i386_dr_stopped_data_address.  All uses updated.
3844         (i386_low_stopped_by_watchpoint): Renamed to
3845         i386_dr_stopped_by_watchpoint.  All uses updated.
3846
3847 2014-06-18  Gary Benson  <gbenson@redhat.com>
3848
3849         * i386-low.c (i386_dr_low_can_set_addr): New macro.
3850         (i386_dr_low_can_set_control): Likewise.
3851         (i386_insert_aligned_watchpoint): New check.
3852
3853 2014-06-18  Gary Benson  <gbenson@redhat.com>
3854
3855         * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
3856         Renamed to state.
3857
3858 2014-06-18  Gary Benson  <gbenson@redhat.com>
3859
3860         * i386-low.c (i386_length_and_rw_bits): Use internal_error
3861         instead of fatal and error.
3862         (i386_handle_nonaligned_watchpoint): Likewise.
3863
3864 2014-06-18  Gary Benson  <gbenson@redhat.com>
3865
3866         * i386-low.c (i386_get_debug_register_length): New macro.
3867         (TARGET_HAS_DR_LEN_8): Remove conditional.  Use above macro.
3868         (i386_show_dr): Use debug_printf instead of fprintf.  Use
3869         phex to format values.
3870
3871 2014-06-18  Gary Benson  <gbenson@redhat.com>
3872
3873         * i386-low.h: Comment changes.
3874         * i386-low.c: Likewise.
3875
3876 2014-06-18  Gary Benson  <gbenson@redhat.com>
3877
3878         * i386-low.c: Whitespace changes.
3879
3880 2014-06-12  Tom Tromey  <tromey@redhat.com>
3881
3882         * utils.c (freeargv): Remove.
3883
3884 2014-06-12  Tom Tromey  <tromey@redhat.com>
3885
3886         * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3887         * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3888         (parse_debug_format_options): Likewise.
3889         (gdbserver_usage): Likewise.
3890         * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3891         (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3892         (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3893         against libiberty.
3894         ($(LIBGNU)): Depend on libiberty.
3895         (all-lib): Recurse into all subdirs.
3896         (install-only): Invoke "install" target in subdirs.
3897         (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3898         targets.
3899         * configure: Rebuild.
3900         * configure.ac: Add ACX_CONFIGURE_DIR for libiberty.  Don't check
3901         for vasprintf, vsnprintf, or gettimeofday.
3902         * configure.srv: Don't add safe-ctype.o or lbasename.o to
3903         srv_tgtobj.
3904
3905 2014-06-05  Joel Brobecker  <brobecker@adacore.com>
3906
3907         * development.sh: Delete.
3908         * Makefile.in (config.status): Adjust dependency on development.sh.
3909         * configure.ac: Adjust development.sh source call.
3910         * configure: Regenerate.
3911
3912 2014-06-02  Pedro Alves  <palves@redhat.com>
3913
3914         * ax.c (gdb_free_agent_expr): New function.
3915         * ax.h (gdb_free_agent_expr): New declaration.
3916         * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3917         list.
3918         (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3919         static.
3920         (clear_breakpoint_conditions_and_commands): New function.
3921         * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3922         (clear_breakpoint_conditions_and_commands): New declaration.
3923
3924 2014-05-23  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
3925
3926         * linux-aarch64-low.c (asm/ptrace.h): Include.
3927
3928 2014-05-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
3929
3930         Fix TLS access for -static -pthread.
3931         * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3932         (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3933         (thread_db_load_search, try_thread_db_load_1): Initialize it.
3934
3935 2014-05-20  Pedro Alves  <palves@redhat.com>
3936
3937         * linux-aarch64-low.c (aarch64_insert_point)
3938         (aarch64_remove_point): No longer check whether the type is
3939         supported here.  Adjust to new interface.
3940         (the_low_target): Install aarch64_supports_z_point_type as
3941         supports_z_point_type method.
3942         * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3943         (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3944         instead of a Z packet char.  Adjust.
3945         (arm_supports_z_point_type): New function.
3946         (arm_insert_point, arm_remove_point): Adjust to new interface.
3947         (the_low_target): Install arm_supports_z_point_type.
3948         * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3949         (cris_insert_point, cris_remove_point): Adjust to new interface.
3950         Don't check whether the type is supported here.
3951         (the_low_target): Install cris_supports_z_point_type.
3952         * linux-low.c (linux_supports_z_point_type): New function.
3953         (linux_insert_point, linux_remove_point): Adjust to new interface.
3954         * linux-low.h (struct linux_target_ops) <insert_point,
3955         remove_point>: Take an enum raw_bkpt_type instead of a char.  Add
3956         raw_breakpoint pointer parameter.
3957         <supports_z_point_type>: New method.
3958         * linux-mips-low.c (mips_supports_z_point_type): New function.
3959         (mips_insert_point, mips_remove_point): Adjust to new interface.
3960         Use mips_supports_z_point_type.
3961         (the_low_target): Install mips_supports_z_point_type.
3962         * linux-ppc-low.c (the_low_target): Install NULL as
3963         supports_z_point_type method.
3964         * linux-s390-low.c (the_low_target): Install NULL as
3965         supports_z_point_type method.
3966         * linux-sparc-low.c (the_low_target): Install NULL as
3967         supports_z_point_type method.
3968         * linux-x86-low.c (x86_supports_z_point_type): New function.
3969         (x86_insert_point): Adjust to new insert_point interface.  Use
3970         insert_memory_breakpoint.  Adjust to new
3971         i386_low_insert_watchpoint interface.
3972         (x86_remove_point): Adjust to remove_point interface.  Use
3973         remove_memory_breakpoint.  Adjust to new
3974         i386_low_remove_watchpoint interface.
3975         (the_low_target): Install x86_supports_z_point_type.
3976         * lynx-low.c (lynx_target_ops): Install NULL as
3977         supports_z_point_type callback.
3978         * nto-low.c (nto_supports_z_point_type): New.
3979         (nto_insert_point, nto_remove_point): Adjust to new interface.
3980         (nto_target_ops): Install nto_supports_z_point_type.
3981         * mem-break.c: Adjust intro comment.
3982         (struct raw_breakpoint) <raw_type, size>: New fields.
3983         <inserted>: Update comment.
3984         <shlib_disabled>: Delete field.
3985         (enum bkpt_type) <gdb_breakpoint>: Delete value.
3986         <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3987         gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3988         (raw_bkpt_type_to_target_hw_bp_type): New function.
3989         (find_enabled_raw_code_breakpoint_at): New function.
3990         (find_raw_breakpoint_at): New type and size parameters.  Use them.
3991         (insert_memory_breakpoint): New function, based off
3992         set_raw_breakpoint_at.
3993         (remove_memory_breakpoint): New function.
3994         (set_raw_breakpoint_at): Reimplement.
3995         (set_breakpoint): New, based on set_breakpoint_at.
3996         (set_breakpoint_at): Reimplement.
3997         (delete_raw_breakpoint): Go through the_target->remove_point
3998         instead of assuming memory breakpoints.
3999         (find_gdb_breakpoint_at): Delete.
4000         (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
4001         (find_gdb_breakpoint): New function.
4002         (set_gdb_breakpoint_at): Delete.
4003         (z_type_supported): New function.
4004         (set_gdb_breakpoint_1): New function, loosely based off
4005         set_gdb_breakpoint_at.
4006         (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
4007         (delete_gdb_breakpoint_at): Delete.
4008         (delete_gdb_breakpoint_1): New function, loosely based off
4009         delete_gdb_breakpoint_at.
4010         (delete_gdb_breakpoint): New function.
4011         (clear_gdb_breakpoint_conditions): Rename to ...
4012         (clear_breakpoint_conditions): ... this.  Don't handle a NULL
4013         breakpoint.
4014         (add_condition_to_breakpoint): Make static.
4015         (add_breakpoint_condition): Take a struct breakpoint pointer
4016         instead of an address.  Adjust.
4017         (gdb_condition_true_at_breakpoint): Rename to ...
4018         (gdb_condition_true_at_breakpoint_z_type): ... this, and add
4019         z_type parameter.
4020         (gdb_condition_true_at_breakpoint): Reimplement.
4021         (add_breakpoint_commands): Take a struct breakpoint pointer
4022         instead of an address.  Adjust.
4023         (gdb_no_commands_at_breakpoint): Rename to ...
4024         (gdb_no_commands_at_breakpoint_z_type): ... this.  Add z_type
4025         parameter.  Return true if no breakpoint was found.  Change debug
4026         output.
4027         (gdb_no_commands_at_breakpoint): Reimplement.
4028         (run_breakpoint_commands): Rename to ...
4029         (run_breakpoint_commands_z_type): ... this.  Add z_type parameter,
4030         and change return type to boolean.
4031         (run_breakpoint_commands): New function.
4032         (gdb_breakpoint_here): Also check for Z1 breakpoints.
4033         (uninsert_raw_breakpoint): Don't try to reinsert a disabled
4034         breakpoint.  Go through the_target->remove_point instead of
4035         assuming memory breakpoint.
4036         (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
4037         software and hardware breakpoints.
4038         (reinsert_raw_breakpoint): Go through the_target->insert_point
4039         instead of assuming memory breakpoint.
4040         (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
4041         software and hardware breakpoints.
4042         (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
4043         Check both software and hardware breakpoints.
4044         (validate_inserted_breakpoint): Assert the breakpoint is a
4045         software breakpoint.  Set the inserted flag to -1 instead of
4046         setting shlib_disabled.
4047         (delete_disabled_breakpoints): Adjust.
4048         (validate_breakpoints): Only validate software breakpoints.
4049         Adjust to inserted flag change.
4050         (check_mem_read, check_mem_write): Skip breakpoint types other
4051         than software breakpoints.  Adjust to inserted flag change.
4052         * mem-break.h (enum raw_bkpt_type): New enum.
4053         (raw_breakpoint, struct process_info): Forward declare.
4054         (Z_packet_to_target_hw_bp_type): Delete declaration.
4055         (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
4056         (set_gdb_breakpoint, delete_gdb_breakpoint)
4057         (clear_breakpoint_conditions): New declarations.
4058         (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
4059         (breakpoint_inserted_here): Update comment.
4060         (add_breakpoint_condition, add_breakpoint_commands): Replace
4061         address parameter with a breakpoint pointer parameter.
4062         (gdb_breakpoint_here): Update comment.
4063         (delete_gdb_breakpoint_at): Delete.
4064         (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
4065         * server.c (process_point_options): Take a struct breakpoint
4066         pointer instead of an address.  Adjust.
4067         (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
4068         delete_gdb_breakpoint.
4069         * spu-low.c (spu_target_ops): Install NULL as
4070         supports_z_point_type method.
4071         * target.h: Include mem-break.h.
4072         (struct target_ops) <prepare_to_access_memory>: Update comment.
4073         <supports_z_point_type>: New field.
4074         <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4075         instead of a char.  Also take a raw breakpoint pointer.
4076         * win32-arm-low.c (the_low_target): Install NULL as
4077         supports_z_point_type.
4078         * win32-i386-low.c (i386_supports_z_point_type): New function.
4079         (i386_insert_point, i386_remove_point): Adjust to new interface.
4080         (the_low_target): Install i386_supports_z_point_type.
4081         * win32-low.c (win32_supports_z_point_type): New function.
4082         (win32_insert_point, win32_remove_point): Adjust to new interface.
4083         (win32_target_ops): Install win32_supports_z_point_type.
4084         * win32-low.h (struct win32_target_ops):
4085         <supports_z_point_type>: New method.
4086         <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4087         instead of a char.  Also take a raw breakpoint pointer.
4088
4089 2014-05-20  Pedro Alves  <palves@redhat.com>
4090
4091         * mem-break.h: Include break-common.h.
4092         (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4093         (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
4094         (Z_packet_to_target_hw_bp_type): New declaration.
4095         * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
4096         * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
4097         (Z_PACKET_ACCESS_WP): Delete macros.
4098         (Z_packet_to_hw_type): Delete function.
4099         * i386-low.h: Don't include break-common.h here.
4100         (Z_packet_to_hw_type): Delete declaration.
4101         * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
4102         Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4103         * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
4104         Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4105         * linux-aarch64-low.c: Don't include break-common.h here.
4106         (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4107         (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
4108         (Z_packet_to_target_hw_bp_type): Delete function.
4109         * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
4110         function.
4111         (mips_insert_point, mips_remove_point): Use
4112         Z_packet_to_target_hw_bp_type.
4113
4114 2014-05-20  Pedro Alves  <palves@redhat.com>
4115
4116         * linux-aarch64-low.c: Include break-common.h.
4117         (enum target_point_type): Delete.
4118         (Z_packet_to_point_type): Rename to ...
4119         (Z_packet_to_target_hw_bp_type): ... this, and return a
4120         target_hw_bp_type instead.
4121         (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
4122         instead of an enum target_point_type.
4123         (aarch64_point_encode_ctrl_reg): Likewise.  Compute type mask from
4124         breakpoint type.
4125         (aarch64_dr_state_insert_one_point)
4126         (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
4127         (aarch64_handle_aligned_watchpoint)
4128         (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
4129         Take an enum target_hw_bp_type instead of an enum
4130         target_point_type.
4131         (aarch64_supports_z_point_type): New function.
4132         (aarch64_insert_point, aarch64_remove_point): Use it.  Adjust to
4133         use Z_packet_to_target_hw_bp_type.
4134
4135 2014-05-20  Joel Brobecker  <brobecker@adacore.com>
4136
4137         * configure.ac: Only use -Werror by default when DEVELOPMENT
4138         is true.
4139         * configure: Regenerate.
4140
4141 2014-05-19  Jan Kratochvil  <jan.kratochvil@redhat.com>
4142
4143         Fix gdbserver qGetTLSAddr for x86_64 -m32.
4144         * linux-x86-low.c (X86_64_USER_REGS): New.
4145         (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
4146
4147 2014-04-28  Yao Qi  <yao@codesourcery.com>
4148
4149         * Makefile.in (i386-avx512.c): Fix the typo of generated file
4150         name.
4151
4152 2014-04-25  Pedro Alves  <palves@redhat.com>
4153
4154         PR server/16255
4155         * linux-low.c (linux_attach_fail_reason_string): New function.
4156         (linux_attach_lwp): Delete.
4157         (linux_attach_lwp_1): Rename to ...
4158         (linux_attach_lwp): ... this.  Take a ptid instead of a pid as
4159         argument.  Remove "initial" parameter.  Return int instead of
4160         void.  Don't error or warn here.
4161         (linux_attach): Adjust to call linux_attach_lwp.  Call error on
4162         failure to attach to the tgid.  Call warning when failing to
4163         attach to an lwp.
4164         * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
4165         argument.  Remove "initial" parameter.  Return int instead of
4166         void.  Don't error or warn here.
4167         (linux_attach_fail_reason_string): New declaration.
4168         * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
4169         interface change.  Use linux_attach_fail_reason_string.
4170
4171 2014-04-24  Michael Sturm  <michael.sturm@mintel.com>
4172             Walfred Tedeschi  <walfred.tedeschi@intel.com>
4173
4174         * Makefile.in: Added rules to handle new files
4175         i386-avx512.c i386-avx512-linux.c amd64-avx512.c
4176         amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
4177         * configure.srv (srv_i386_regobj): Add i386-avx512.o.
4178         (srv_i386_linux_regobj): Add i386-avx512-linux.o.
4179         (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
4180         (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
4181         x32-avx512-linux.o.
4182         (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
4183         (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
4184         (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
4185         i386/x32-avx512.xml.
4186         (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
4187         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
4188         i386/x32-avx512-linux.xml.
4189         * i387-fp.c (num_avx512_k_registers): New constant for number
4190         of K registers.
4191         (num_avx512_zmmh_low_registers): New constant for number of
4192         lower ZMM registers (0-15).
4193         (num_avx512_zmmh_high_registers): New constant for number of
4194         higher ZMM registers (16-31).
4195         (num_avx512_ymmh_registers): New contant for number of higher
4196         YMM registers (ymm16-31 added by avx521 on x86_64).
4197         (num_avx512_xmm_registers): New constant for number of higher
4198         XMM registers (xmm16-31 added by AVX512 on x86_64).
4199         (struct i387_xsave): Add space for AVX512 registers.
4200         (i387_cache_to_xsave): Change raw buffer size to 64 characters.
4201         Add code to handle AVX512 registers.
4202         (i387_xsave_to_cache): Add code to handle AVX512 registers.
4203         * linux-x86-low.c (init_registers_amd64_avx512_linux): New
4204         prototypei from generated file.
4205         (tdesc_amd64_avx512_linux): Likewise.
4206         (init_registers_x32_avx512_linux): Likewise.
4207         (tdesc_x32_avx512_linux): Likewise.
4208         (init_registers_i386_avx512_linux): Likewise.
4209         (tdesc_i386_avx512_linux): Likewise.
4210         (x86_64_regmap): Add AVX512 registers.
4211         (x86_linux_read_description): Add code to handle AVX512 XSTATE
4212         mask.
4213         (initialize_low_arch): Add code to initialize AVX512 registers.
4214
4215 2014-04-23  Pedro Alves  <palves@redhat.com>
4216
4217         * mem-break.c (find_gdb_breakpoint_at): Make static.
4218         * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
4219
4220 2014-04-23  Pedro Alves  <palves@redhat.com>
4221
4222         * i386-low.c: Don't include break-common.h here.
4223         (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4224         prototype to take target_hw_bp_type as argument instead of a Z
4225         packet char.
4226         * i386-low.h: Include break-common.h here.
4227         (Z_packet_to_hw_type): Declare.
4228         (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4229         prototypes.
4230         * linux-x86-low.c (x86_insert_point): Convert the packet number to
4231         a target_hw_bp_type before calling i386_low_insert_watchpoint.
4232         (x86_remove_point): Convert the packet number to a
4233         target_hw_bp_type before calling i386_low_remove_watchpoint.
4234         * win32-i386-low.c (i386_insert_point): Convert the packet number
4235         to a target_hw_bp_type before calling i386_low_insert_watchpoint.
4236         (i386_remove_point): Convert the packet number to a
4237         target_hw_bp_type before calling i386_low_remove_watchpoint.
4238
4239 2014-04-23  Pedro Alves  <palves@redhat.com>
4240
4241         * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
4242
4243 2014-04-10  Pedro Alves  <palves@redhat.com>
4244
4245         * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4246         Check if the condition or command is NULL before checking if the
4247         breakpoint is known.  On success, return true.
4248         * mem-break.h (add_breakpoint_condition): Document return.
4249         (add_breakpoint_commands): Add describing comment.
4250         * server.c (skip_to_semicolon): New function.
4251         (process_point_options): Use it.
4252
4253 2014-04-09  Pedro Alves  <palves@redhat.com>
4254
4255         * linux-low.c (linux_read_loadmap): Pass current_inferior directly
4256         to lwpid_of.
4257
4258 2014-02-27  Pedro Alves  <palves@redhat.com>
4259
4260         PR 12702
4261         * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
4262         macros.
4263         * linux-low.c (delete_lwp, handle_extended_wait): Add debug
4264         output.
4265         (last_thread_of_process_p): Take a PID argument instead of a
4266         thread pointer.
4267         (linux_wait_for_lwp): Delete.
4268         (num_lwps, check_zombie_leaders, not_stopped_callback): New
4269         functions.
4270         (linux_low_filter_event): New function, party factored out from
4271         linux_wait_for_event.
4272         (linux_wait_for_event): Rename to ...
4273         (linux_wait_for_event_filtered): ... this.  Add new filter ptid
4274         argument.  Partly rewrite.  Always use waitpid(-1, WNOHANG) and
4275         sigsuspend.  Check for zombie leaders.
4276         (linux_wait_for_event): Reimplement as wrapper around
4277         linux_wait_for_event_filtered.
4278         (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED.  Assume that if
4279         a normal or signal exit is seen, it's the whole process exiting.
4280         (wait_for_sigstop): No longer a for_each_inferior callback.
4281         Rewrite on top of linux_wait_for_event_filtered.
4282         (stop_all_lwps): Call wait_for_sigstop directly.
4283         * server.c (resume, handle_target_event): Handle
4284         TARGET_WAITKIND_NO_RESUMED.
4285
4286 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
4287
4288         * win32-low.c (psapi_get_dll_name,
4289         * win32_CreateToolhelp32Snapshot): Delete.
4290         (win32_CreateToolhelp32Snapshot, win32_Module32First)
4291         (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
4292         Delete.
4293         (handle_load_dll): Add function description.
4294         Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
4295
4296 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
4297
4298         * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
4299         Add comment.
4300         (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
4301         base address when calling win32_add_one_solib.
4302         (handle_load_dll): Delete local variable load_addr.
4303         Remove 0x1000 offset applied to DLL base address when calling
4304         win32_add_one_solib.
4305         (handle_unload_dll): Add comment.
4306
4307 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
4308
4309         * win32-low.c (win32_add_all_dlls): Renames
4310         win32_ensure_ntdll_loaded.  Rewrite function documentation.
4311         Adjust implementation to always load all DLLs.
4312         Add 0x1000 offset to DLL base address when calling
4313         win32_add_one_solib.
4314         (child_initialization_done): New static global.
4315         (do_initial_child_stuff): Set child_initialization_done to
4316         zero during child initialization, and 1 after.  Replace call
4317         to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
4318         Add comment.
4319         (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
4320         (handle_unload_dll): Add function documentation.
4321         (get_child_debug_event): Ignore load and unload DLL events
4322         during child initialization.
4323
4324 2014-02-20  Doug Evans  <dje@google.com>
4325
4326         Remove global all_lwps.
4327         * inferiors.h (ptid_of): Move here from linux-low.h.
4328         (pid_of, lwpid_of): Ditto.
4329         * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
4330         parameter is a struct thread_info * now.
4331         (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
4332         directly.  Pass &all_threads to find_inferior instead of &all_lwps.
4333         (aarch64_stopped_data_address): Fetch lwpid from current_inferior
4334         directly.
4335         (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
4336         (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
4337         * linux-arm-low.c (update_registers_callback): Update, "entry"
4338         parameter is a struct thread_info * now.
4339         Fetch lwpid from current_inferior directly.
4340         (arm_insert_point): Pass &all_threads to find_inferior instead of
4341         &all_lwps.
4342         (arm_remove_point): Ditto.
4343         (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
4344         (arm_prepare_to_resume): Fetch pid from thread.
4345         (arm_read_description): Fetch lwpid from current_inferior directly.
4346         * linux-low.c (all_lwps): Delete.
4347         (delete_lwp): Delete call to remove_inferior.
4348         (handle_extended_wait): Fetch lwpid from thread.
4349         (add_lwp): Don't set lwp->entry.id.  Remove call to
4350         add_inferior_to_list.
4351         (linux_attach_lwp_1): Fetch pid from current_inferior directly.
4352         (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
4353         (kill_one_lwp_callback): Ditto.
4354         (linux_kill): Don't dereference NULL pointer.
4355         Fetch ptid,lwpid from thread.
4356         (get_detach_signal): Fetch ptid from thread.
4357         (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
4358         Simplify call to regcache_invalidate_thread.
4359         (delete_lwp_callback): Update, "entry" parameter is a
4360         struct thread_info * now.  Fetch pid from thread.
4361         (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
4362         (status_pending_p_callback): Update, "entry" parameter is a
4363         struct thread_info * now.  Fetch ptid from thread.
4364         (find_lwp_pid): Update, "entry" parameter is a
4365         struct thread_info * now.
4366         (linux_wait_for_lwp): Fetch pid from thread.
4367         (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
4368         (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
4369         (enqueue_one_deferred_signal): Fetch lwpid from thread.
4370         (dequeue_one_deferred_signal): Ditto.
4371         (cancel_breakpoint): Fetch ptid from current_inferior.
4372         (linux_wait_for_event): Pass &all_threads to find_inferior,
4373         not &all_lwps.  Fetch ptid, lwpid from thread.
4374         (count_events_callback): Update, "entry" parameter is a
4375         struct thread_info * now.
4376         (select_singlestep_lwp_callback): Ditto.
4377         (select_event_lwp_callback): Ditto.
4378         (cancel_breakpoints_callback): Ditto.
4379         (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
4380         not &all_lwps.
4381         (select_event_lwp): Ditto.  Fetch ptid from event_thread.
4382         (unsuspend_one_lwp): Update, "entry" parameter is a
4383         struct thread_info * now.
4384         (unsuspend_all_lwps): Pass &all_threads to find_inferior,
4385         not &all_lwps.
4386         (linux_stabilize_threads): Ditto.  And for for_each_inferior.
4387         Fetch lwpid from thread, not lwp.
4388         (linux_wait_1): Fetch ptid, lwpid from current_inferior.
4389         Pass &all_threads to find_inferior, not &all_lwps.
4390         (send_sigstop): Fetch lwpid from thread, not lwp.
4391         (send_sigstop_callback): Update, "entry" parameter is a
4392         struct thread_info * now.
4393         (suspend_and_send_sigstop_callback): Ditto.
4394         (wait_for_sigstop): Ditto.  Fetch ptid, lwpid from thread, lwp.
4395         (stuck_in_jump_pad_callback): Update, "entry" parameter is a
4396         struct thread_info * now.
4397         (move_out_of_jump_pad_callback): Ditto.  Fetch ptid, lwpid
4398         from thread, lwp.
4399         (lwp_running): Update, "entry" parameter is a
4400         struct thread_info * now.
4401         (stop_all_lwps): Fetch ptid from thread.
4402         Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
4403         (linux_resume_one_lwp): Fetch lwpid from thread.
4404         (linux_set_resume_request): Update, "entry" parameter is a
4405         struct thread_info * now.  Fetch pid, lwpid from thread.
4406         (resume_status_pending_p): Update, "entry" parameter is a
4407         struct thread_info * now.
4408         (need_step_over_p): Ditto.  Fetch lwpid from thread.
4409         (start_step_over): Fetch lwpid from thread.
4410         (linux_resume_one_thread): Update, "entry" parameter is a
4411         struct thread_info * now.  Fetch lwpid from thread.
4412         (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
4413         (proceed_one_lwp): Update, "entry" parameter is a
4414         struct thread_info * now.  Fetch lwpid from thread.
4415         (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
4416         struct thread_info * now.
4417         (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
4418         (unstop_all_lwps): Ditto.  Fetch lwpid from thread.
4419         (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
4420         directly.
4421         (regsets_store_inferior_registers): Ditto.
4422         (fetch_register, store_register): Ditto.
4423         (linux_read_memory, linux_write_memory): Ditto.
4424         (linux_request_interrupt): Ditto.
4425         (linux_read_auxv): Ditto.
4426         (linux_xfer_siginfo): Ditto.
4427         (linux_qxfer_spu): Ditto.
4428         (linux_qxfer_libraries_svr4): Ditto.
4429         * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
4430         moved to inferiors.h.
4431         (get_lwp): Delete.
4432         (get_thread_lwp): Update.
4433         (struct lwp_info): Delete member "entry".  Simplify comment for
4434         member "thread".
4435         (all_lwps): Delete.
4436         * linux-mips-low.c (mips_read_description): Fetch lwpid from
4437         current_inferior directly.
4438         (update_watch_registers_callback): Update, "entry" parameter is a
4439         struct thread_info * now.  Fetch pid from thread.
4440         (mips_linux_prepare_to_resume): Fetch ptid from thread.
4441         (mips_insert_point): Fetch lwpid from current_inferior.
4442         Pass &all_threads to find_inferior, not &all_lwps.
4443         (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
4444         (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
4445         directly.
4446         (mips_stopped_data_address): Ditto.
4447         * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
4448         directly.
4449         * linux-tile-low.c (tile_arch_setup): Ditto.
4450         * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
4451         (update_debug_registers_callback): Update, "entry" parameter is a
4452         struct thread_info * now.  Fetch pid from thread.
4453         (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
4454         Pass &all_threads to find_inferior, not &all_lwps.
4455         (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
4456         (i386_dr_low_set_control): Fetch pid from current_inferior directly.
4457         Pass &all_threads to find_inferior, not &all_lwps.
4458         (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
4459         (i386_dr_low_get_status): Ditto.
4460         (x86_linux_prepare_to_resume): Fetch ptid from thread.
4461         (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
4462         (x86_linux_read_description): Ditto.
4463         * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
4464
4465 2014-02-20  Doug Evans  <dje@google.com>
4466
4467         * inferiors.c (get_first_inferior): Fix buglet.
4468
4469 2014-02-19  Doug Evans  <dje@google.com>
4470
4471         * gdbthread.h (add_thread): Change result type to struct thread_info *.
4472         * inferiors.c (add_thread): Change result type to struct thread_info *.
4473         All callers updated.
4474         (add_lwp): Call add_thread here instead of in callers.
4475         All callers updated.
4476         * linux-low.h (get_lwp_thread): Rewrite.
4477         (struct lwp_info): New member "thread".
4478
4479 2014-02-19  Doug Evans  <dje@google.com>
4480
4481         * linux-low.c (add_lwp): Change result to struct lwp_info *.
4482         All callers updated.
4483
4484 2014-02-19  Doug Evans  <dje@google.com>
4485
4486         * inferiors.c (add_thread): Fix whitespace.
4487
4488 2014-02-19  Doug Evans  <dje@google.com>
4489
4490         * dll.c (clear_dlls): Replace accessing list implemention details
4491         with API function.
4492         * gdbthread.h (get_first_thread): Declare.
4493         * inferiors.c (for_each_inferior_with_data): New function.
4494         (get_first_thread): New function.
4495         (find_thread_ptid): Simplify.
4496         (get_first_inferior): New function.
4497         (clear_list): Delete.
4498         (one_inferior_p): New function.
4499         (clear_inferior_list): New function.
4500         (clear_inferiors): Update.
4501         * inferiors.h (for_each_inferior_with_data): Declare.
4502         (clear_inferior_list): Declare.
4503         (one_inferior_p): Declare.
4504         (get_first_inferior): Declare.
4505         * linux-low.c (linux_wait_for_event): Replace accessing list
4506         implemention details with API function.
4507         * server.c (target_running): Ditto.
4508         (accumulate_file_name_length): New function.
4509         (emit_dll_description): New function.
4510         (handle_qxfer_libraries): Replace accessing list implemention
4511         details with API function.
4512         (handle_qxfer_threads_worker): New function.
4513         (handle_qxfer_threads_proper): Replace accessing list implemention
4514         details with API function.
4515         (handle_query): Ditto.
4516         (visit_actioned_threads_callback_ftype): New typedef.
4517         (visit_actioned_threads_data): New struct.
4518         (visit_actioned_threads): Rewrite to be find_inferior callback.
4519         (resume): Call find_inferior.
4520         (handle_status): Replace accessing list implemention
4521         details with API function.
4522         (process_serial_event): Replace accessing list implemention details
4523         with API function.
4524         * target.c (set_desired_inferior): Replace accessing list implemention
4525         details with API function.
4526         * tracepoint.c (same_process_p): New function.
4527         (gdb_agent_about_to_close): Replace accessing list implemention
4528         details with API function.
4529         * win32-low.c (child_delete_thread): Replace accessing list
4530         implemention details with API function.
4531         (match_dll_by_basename): New function.
4532         (dll_is_loaded_by_basename): New function.
4533         (win32_ensure_ntdll_loaded): Replace accessing list implemention
4534         details call to dll_is_loaded_by_basename.
4535
4536 2014-02-19  Doug Evans  <dje@google.com>
4537
4538         * dll.h (struct dll_info): Add comment.
4539         * gdbthread.h (struct thread_info): Add comment.
4540         (current_ptid): Simplify.
4541         * inferiors.c (add_process): Update.
4542         (remove_process): Update.
4543         * inferiors.h (struct process_info): Rename member "head" to "entry".
4544         * linux-low.c (delete_lwp): Update.
4545         (add_lwp): Update.
4546         (last_thread_of_process_p): Update.
4547         (kill_one_lwp_callback, linux_kill): Update.
4548         (status_pending_p_callback): Update.
4549         (wait_for_sigstop): Update.  Simplify read of ptid.
4550         (start_step_over): Update.
4551         * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
4552         (get_lwp_thread): Update.
4553         (struct lwp_info): Rename member "head" to "entry".
4554         * regcache.h (inferior_list_entry): Delete.
4555         * server.c (kill_inferior_callback): Update.
4556         (detach_or_kill_inferior_callback): Update.
4557         (print_started_pid): Update.
4558         (print_attached_pid): Update.
4559         (process_serial_event): Simplify read of ptid.
4560         * thread-db.c (thread_db_create_event): Update.
4561         (thread_db_get_tls_address): Update.
4562         * win32-low.c (current_inferior_ptid): Simplify.
4563
4564 2014-02-19  Tom Tromey  <tromey@redhat.com>
4565
4566         * target.h (struct target_ops) <supports_btrace>: Add target_ops
4567         argument.
4568         (target_supports_btrace): Update.
4569
4570 2014-02-14  Yao Qi  <yao@codesourcery.com>
4571
4572         * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
4573         (rsp-low-ipa.o): New target.
4574
4575 2014-02-12  Tom Tromey  <tromey@redhat.com>
4576
4577         * ax.c (gdb_parse_agent_expr): Use hex2bin, not
4578         convert_ascii_to_int.
4579         * regcache.c (registers_to_string): Likewise.
4580         * remote-utils.c (decode_M_packet): Likewise.
4581         * server.c (process_serial_event): Likewise.
4582
4583 2014-02-12  Tom Tromey  <tromey@redhat.com>
4584
4585         * server.c (handle_query, handle_v_run): Use hex2bin, not
4586         unhexify.
4587         * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
4588
4589 2014-02-12  Tom Tromey  <tromey@redhat.com>
4590
4591         * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
4592         convert_int_to_ascii.
4593         * regcache.c (registers_to_string, collect_register_as_string):
4594         Likewise.
4595         * remote-utils.c (look_up_one_symbol, relocate_instruction):
4596         Likewise.
4597         * server.c (process_serial_event): Likewise.
4598         * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
4599         (cmd_qtbuffer, cstr_to_hexstr): Likewise.
4600
4601 2014-02-12  Tom Tromey  <tromey@redhat.com>
4602
4603         * remote-utils.c (look_up_one_symbol, monitor_output): Use
4604         bin2hex, not hexify.
4605         * tracepoint.c (cmd_qtstatus): Likewise.
4606
4607 2014-02-12  Tom Tromey  <tromey@redhat.com>
4608
4609         * remote-utils.c (monitor_output): Pass explicit length to
4610         hexify.
4611
4612 2014-02-12  Tom Tromey  <tromey@redhat.com>
4613
4614         * tracepoint.c: Include rsp-low.h.
4615         * server.c: Include rsp-low.h.
4616         * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
4617         (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
4618         declare.
4619         * remote-utils.c: Include rsp-low.h.
4620         (fromhex, hexchars, ishex, unhexify, tohex, hexify)
4621         (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
4622         (convert_int_to_ascii, convert_ascii_to_int): Move to
4623         common/rsp-low.c.
4624         * regcache.c: Include rsp-low.h.
4625         * ax.c: Include rsp-low.h.
4626         * Makefile.in (SFILES): Add common/rsp-low.c.
4627         (OBS): Add rsp-low.o.
4628         (rsp-low.o): New target.
4629
4630 2014-02-12  Tom Tromey  <tromey@redhat.com>
4631
4632         * utils.h (pulongest, plongest, phex_nz): Don't declare.
4633         Include print-utils.h.
4634         * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
4635         (plongest, thirty_two, phex_nz): Remove.
4636         * Makefile.in (SFILES): Add common/print-utils.c.
4637         (OBS): Add print-utils.o.
4638         (print-utils-ipa.o): New target.
4639         (print-utils.o): New target.
4640         (IPA_OBJS): Add print-utils-ipa.o.
4641
4642 2014-02-06  Tom Tromey  <tromey@redhat.com>
4643
4644         * Makefile.in (SFILES): Fix indentation.
4645
4646 2014-02-05  Doug Evans  <dje@google.com>
4647
4648         * linux-low.c (linux_wait_for_event): Improve comment.
4649         (linux_wait_1): Keep current_inferior in sync with event_child.
4650
4651 2014-01-22  Doug Evans  <dje@google.com>
4652
4653         * gdbthread.h (gdb_id_to_thread): Delete, unused.
4654
4655 2014-01-22  Doug Evans  <dje@google.com>
4656
4657         * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
4658         * configure: Regenerate.
4659         * config.in: Regenerate.
4660         * Makefile.in (SFILES): Add debug.c.
4661         (OBS): Add debug.o.
4662         * debug.c: New file.
4663         * debug.h: New file.
4664         * linux-aarch64-low.c (*): Update all debugging printfs to use
4665         debug_printf instead of fprintf.
4666         * linux-arm-low.c (*): Ditto.
4667         * linux-cris-low.c (*): Ditto.
4668         * linux-crisv32-low.c (*): Ditto.
4669         * linux-m32r-low.c (*): Ditto.
4670         * linux-sparc-low.c (*): Ditto.
4671         * linux-x86.c (*): Ditto.
4672         * linux-low.c (*): Ditto.
4673         (linux_wait_1): Add calls to debug_enter, debug_exit.
4674         (linux_wait): Remove redundant debugging printf.
4675         (stop_all_lwps): Add calls to debug_enter, debug_exit.
4676         (linux_resume, unstop_all_lwps): Ditto.
4677         * mem-break.c (*): Update all debugging printfs to use
4678         debug_printf instead of fprintf.
4679         * remote-utils.c (*): Ditto.
4680         * thread-db.c (*): Ditto.
4681         * server.c #include <ctype.h>, "gdb_vecs.h".
4682         (debug_threads): Moved to debug.c.
4683         (*): Update all debugging printfs to use debug_printf instead of
4684         fprintf.
4685         (start_inferior): Replace call to fflush with call to debug_flush.
4686         (monitor_show_help): Mention set debug-format.
4687         (parse_debug_format_options): New function.
4688         (handle_monitor_command): Handle "monitor set debug-format".
4689         (gdbserver_usage): Mention --debug-format.
4690         (main): Parse --debug-format.
4691         * server.h (debug_threads): Declaration moved to debug.h.
4692         #include "debug.h".
4693         * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
4694         trace_debug_1 that uses debug_printf.
4695         (tracepoint_look_up_symbols): Update all debugging printfs to use
4696         debug_printf instead of fprintf.
4697
4698 2014-01-20  Baruch Siach  <baruch@tkos.co.il>
4699
4700         * linux-xtensa-low.c: Include asm/ptrace.h instead of
4701         sys/ptrace.h.
4702
4703 2014-01-17  Pedro Alves  <palves@redhat.com>
4704
4705         PR build/16445
4706         * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
4707         defined after including gdb_proc_service.h.
4708
4709 2014-01-16  Doug Evans  <dje@google.com>
4710
4711         * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
4712         (match_dll): Use it.
4713
4714 2014-01-16  Markus Metzger  <markus.t.metzger@intel.com>
4715
4716         * target.h (target_ops) <read_btrace>: Change parameters and
4717         return type to allow error reporting.
4718         * server.c (handle_qxfer_btrace): Support delta reads.  Pass
4719         trace reading errors on.
4720         * linux-low.c (linux_low_read_btrace): Pass trace reading
4721         errors on.
4722         (linux_low_disable_btrace): New.
4723
4724 2014-01-15  Doug Evans  <dje@google.com>
4725
4726         * inferiors.c (thread_id_to_gdb_id): Delete.
4727         * inferiors.h (thread_id_to_gdb_id): Delete.
4728
4729 2014-01-13  Eli Zaretskii  <eliz@gnu.org>
4730
4731         * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
4732         "-I$(srcdir)/../".  Fixes MinGW compilation errors with old GCC
4733         versions.
4734
4735 2014-01-08  Pedro Alves  <palves@redhat.com>
4736
4737         * server.c (handle_status): Don't discard previous queued stop
4738         replies or thread's pending status here.
4739         (main) <disconnection>: Do it here instead.
4740
4741 2014-01-08  Pedro Alves  <palves@redhat.com>
4742
4743         * gdbthread.h (struct thread_info) <status_pending_p>: New field.
4744         * server.c (visit_actioned_threads, handle_pending_status): New
4745         function.
4746         (handle_v_cont): Factor out parts to ...
4747         (resume): ... this new function.  If in all-stop, and a thread
4748         being resumed has a pending status, report it without actually
4749         resuming.
4750         (myresume): Adjust to use the new 'resume' function.
4751         (clear_pending_status_callback, set_pending_status_callback)
4752         (find_status_pending_thread_callback): New functions.
4753         (handle_status): Handle the case of multiple threads having
4754         interesting statuses to report.  Report threads' real last signal
4755         instead of always reporting GDB_SIGNAL_TRAP.  Look for a thread
4756         with an interesting thread to report the status for, instead of
4757         always reporting the status of the first thread.
4758
4759 2014-01-01  Joel Brobecker  <brobecker@adacore.com>
4760
4761         * gdbserver.c (gdbserver_version): Set copyright year to 2014.
4762         * gdbreplay.c (gdbreplay_version): Likewise.
4763
4764 2013-12-18  Yufeng Zhang  <yufeng.zhang@arm.com>
4765
4766         * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
4767         iov.iov_len with the real length in use.
4768
4769 2013-12-13  Joel Brobecker  <brobecker@adacore.com>
4770
4771         * Makefile.in (safe-ctype.o, lbasename.o): New rules.
4772         * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
4773         for all targets that use win32-low.c.
4774         * win32-low.c (win32_ensure_ntdll_loaded): New function.
4775         (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
4776
4777 2013-12-13  Pedro Alves  <palves@redhat.com>
4778
4779         * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
4780         if equal to TARGET_WAITKIND_LOADED.
4781         * win32-low.c (cached_status): New static global.
4782         (win32_wait): Add declaration.
4783         (do_initial_child_stuff): Flush all initial pending debug events
4784         up to the initial breakpoint.
4785         (win32_wait): If CACHED_STATUS was set, return that instead
4786         of doing a real wait.  Remove the code resuming the execution
4787         of the inferior after receiving a TARGET_WAITKIND_LOADED event
4788         during the initial phase.  Also remove the code changing
4789         OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
4790         TARGET_WAITKIND_STOPPED.
4791
4792 2013-12-11  Yao Qi  <yao@codesourcery.com>
4793
4794         * notif.c (handle_notif_ack): Return 0 if no notification
4795         matches.
4796
4797 2013-11-20  Doug Evans  <dje@google.com>
4798
4799         * linux-low.c (linux_set_resume_request): Fix comment.
4800
4801 2013-11-20  Doug Evans  <dje@google.com>
4802
4803         * linux-low.c (resume_status_pending_p): Tweak comment.
4804
4805 2013-11-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4806
4807         * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
4808         amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
4809         * configure.srv (srv_i386_regobj): Add i386-mpx.o.
4810         (srv_i386_linux_regobj): Add i386-mpx-linux.o.
4811         (srv_amd64_regobj): Add amd64-mpx.o.
4812         (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
4813         (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
4814         (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
4815         * i387-fp.c (num_pl_bnd_register) Added constant.
4816         (num_pl_bnd_cfg_registers) Added constant.
4817         (struct i387_xsave) Added reserved area and MPX fields.
4818         (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
4819         * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
4820         function.
4821         (tdesc_i386_mpx_linux): Add MPX amd64 target.
4822         (init_registers_amd64_mpx_linux): Declare new function.
4823         (tdesc_amd64_mpx_linux): Add MPX amd64 target.
4824         (x86_64_regmap): Add MPX registers.
4825         (x86_linux_read_description): Add MPX case.
4826         (initialize_low_arch): Initialize MPX targets.
4827
4828 2013-11-18  Tom Tromey  <tromey@redhat.com>
4829
4830         * configure: Rebuild.
4831         * configure.ac: Don't check for stdlib.h.
4832         * gdbreplay.c: Unconditionally include stdlib.h.
4833
4834 2013-11-18  Tom Tromey  <tromey@redhat.com>
4835
4836         * config.in: Rebuild.
4837         * configure: Rebuild.
4838         * configure.ac: Don't use AC_HEADER_DIRENT.
4839
4840 2013-11-18  Tom Tromey  <tromey@redhat.com>
4841
4842         * server.h: Don't check HAVE_STRING_H.
4843         * gdbreplay.c: Don't check HAVE_STRING_H.
4844         * configure: Rebuild.
4845
4846 2013-11-18  Tom Tromey  <tromey@redhat.com>
4847
4848         * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
4849         LIBGNU.
4850
4851 2013-11-08  Tom Tromey  <tromey@redhat.com>
4852
4853         * configure, config.in: Rebuild.
4854         * configure.ac: Remove unused configury.
4855
4856 2013-11-08  Tom Tromey  <tromey@redhat.com>
4857
4858         * acinclude.m4: Include common.m4, codeset.m4.
4859         * configure, config.in: Rebuild.
4860         * configure.ac: Use GDB_AC_COMMON.
4861
4862 2013-11-06  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4863
4864         * linux-s390-low.c (HWCAP_S390_TE): New define.
4865         (s390_arch_setup): Consider the TE field in the HWCAP for
4866         determining 'have_regset_tdb'.
4867
4868 2013-10-16  Sergio Durigan Junior  <sergiodj@redhat.com>
4869
4870         PR gdb/16014
4871         * tracepoint.c (download_tracepoint_1): Remove unnecessary double
4872         call to sizeof.
4873
4874 2013-10-02  Pedro Alves  <palves@redhat.com>
4875
4876         * server.c (process_serial_event): Don't output "GDBserver
4877         exiting" if GDB is connected through stdio.
4878         * target.c (mywait): Likewise, be silent if GDB is connected
4879         through stdio.
4880
4881 2013-10-01  Joel Brobecker  <brobecker@adacore.com>
4882
4883         * lynx-low.c (lynx_add_threads_after_attach): New function.
4884         (lynx_attach): Remove call to add_thread.  Add call to
4885         lynx_add_threads_after_attach instead.
4886
4887 2013-09-28  Mike Frysinger  <vapier@gentoo.org>
4888
4889         * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4890         * config.in, configure: Regenerated.
4891
4892 2013-09-18  Yao Qi  <yao@codesourcery.com>
4893
4894         PR server/15959
4895         * server.c (start_inferior): Clear 'resume_info'.
4896
4897 2013-09-16  Jiong Wang  <jiwang@tilera.com>
4898
4899         * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4900         for each register.
4901
4902 2013-09-16  Jiong Wang  <jiwang@tilera.com>
4903
4904         * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4905         linux-tile-low.o to srv_tgtobj.
4906
4907 2013-09-16  Will Newton  <will.newton@linaro.org>
4908
4909         * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4910         out regs.
4911
4912 2013-09-06  Pedro Alves  <palves@redhat.com>
4913
4914         * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4915         (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4916         (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4917         (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4918         (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4919         (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4920
4921 2013-09-06  Pedro Alves  <palves@redhat.com>
4922
4923         * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4924         explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4925
4926 2013-09-06  Pedro Alves  <palves@redhat.com>
4927
4928         * linux-amd64-ipa.c: Include tracepoint.h.
4929         * linux-i386-ipa.c: Include tracepoint.h.
4930
4931 2013-09-06  Ricard Wanderlof  <ricardw@axis.com>
4932
4933         * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4934         (ps_get_thread_area): New function.
4935
4936 2013-09-06  Ricard Wanderlof  <ricardw@axis.com>
4937
4938         * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4939         (initialize_low_arch): Call init_registers_crisv32 rather than
4940         init_register_crisv32.
4941
4942 2013-09-05  Pedro Alves  <palves@redhat.com>
4943
4944         * server.h (handle_vFile, hostio_last_error_from_errno): Move
4945         to ...
4946         * hostio.h: ... this new file.
4947         * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4948         win32-low.c: Include hostio.h.
4949
4950 2013-09-05  Pedro Alves  <palves@redhat.com>
4951
4952         * server.h (gdb_client_data, handler_func, callback_handler_func)
4953         (delete_file_handler, add_file_handler, append_callback_event)
4954         (delete_callback_event, start_event_loop, initialize_event_loop):
4955         Move to event-loop.h and include it.
4956         * event-loop.h: New file.
4957
4958 2013-09-05  Pedro Alves  <palves@redhat.com>
4959
4960         * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4961         * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4962         (loaded_dll, unloaded_dll): Move to ...
4963         * dll.h: ... this new file.
4964         * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4965
4966 2013-09-05  Pedro Alves  <palves@redhat.com>
4967
4968         * server.h (current_process, get_thread_process, all_processes)
4969         (add_inferior_to_list, for_each_inferior, current_inferior)
4970         (remove_inferior, add_process, remove_process, find_process_pid)
4971         (have_started_inferiors_p, have_attached_inferiors_p)
4972         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4973         (clear_inferiors, find_inferior, find_inferior_id)
4974         (inferior_target_data, set_inferior_target_data)
4975         (inferior_regcache_data, set_inferior_regcache_data): Move to
4976         inferiors.h, and include it.
4977         * inferiors.h: New file.
4978
4979 2013-09-05  Pedro Alves  <palves@redhat.com>
4980
4981         * server.h (struct emit_ops, current_insn_ptr, emit_error):
4982         Move ...
4983         * ax.h: ... here.
4984
4985 2013-09-05  Pedro Alves  <palves@redhat.com>
4986
4987         * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4988         tracepoint.h.
4989         * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4990         (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4991         (handle_tracepoint_general_set, handle_tracepoint_query)
4992         (tracepoint_finished_step, tracepoint_was_hit)
4993         (release_while_stepping_state_list, current_traceframe)
4994         (in_readonly_region, traceframe_read_mem)
4995         (fetch_traceframe_registers, traceframe_read_sdata)
4996         (traceframe_read_info, struct fast_tpoint_collect_status)
4997         (fast_tracepoint_collecting, force_unlock_trace_buffer)
4998         (handle_tracepoit_bkpts, initialize_low_tracepoint)
4999         (supply_fast_tracepoint_registers)
5000         (supply_static_tracepoint_registers, set_trampoline_buffer_space)
5001         (ipa_tdesc, claim_trampoline_space)
5002         (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
5003         (agent_mem_read, agent_get_trace_state_variable_value)
5004         (agent_set_trace_state_variable_value, agent_tsv_read)
5005         (agent_mem_read_string, get_raw_reg_func_addr)
5006         (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
5007         * tracepoint.h: ... this new file.
5008
5009 2013-09-05  Pedro Alves  <palves@redhat.com>
5010
5011         * server.h (perror_with_name, error, fatal, warning, paddress)
5012         (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
5013         include it.
5014         * utils.h: New file.
5015
5016 2013-09-05  Pedro Alves  <palves@redhat.com>
5017
5018         * server.h (remote_debug, noack_mode, transport_is_reliable)
5019         (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
5020         (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
5021         (getpkt, remote_prepare, remote_open, remote_close, write_ok)
5022         (write_enn, initialize_async_io, enable_async_io)
5023         (disable_async_io, check_remote_input_interrupt_request)
5024         (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
5025         (dead_thread_notify, prepare_resume_reply)
5026         (decode_address_to_semicolon, decode_address, decode_m_packet)
5027         (decode_M_packet, decode_X_packet, decode_xfer_write)
5028         (decode_search_memory_packet, unhexify, hexify)
5029         (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
5030         (look_up_one_symbol, relocate_instruction)
5031         (monitor_output): Move to remote-utils.h, and include it.
5032         * remote-utils.h: New file.
5033
5034 2013-09-05  Pedro Alves  <palves@redhat.com>
5035
5036         * server.h (_): Delete.
5037
5038 2013-09-02  Pedro Alves  <palves@redhat.com>
5039
5040         * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
5041         (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
5042         allocated.
5043         (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
5044
5045 2013-09-02  Pierre Muller  <muller@sourceware.org>
5046
5047         * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
5048         or WriteProcessMemory complete successfully and handle
5049         ERROR_PARTIAL_COPY error.
5050
5051 2013-09-02  Pedro Alves  <palves@redhat.com>
5052
5053         * server.c (gdb_read_memory): Return -1 on traceframe memory read
5054         error instead of EIO.
5055
5056 2013-08-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
5057
5058         PR server/15604
5059         * linux-low.c: Include filestuff.h.
5060         (linux_create_inferior) <pid == 0>: Call close_most_fds.
5061         * lynx-low.c: Include filestuff.h.
5062         (lynx_create_inferior) <pid == 0>: Call close_most_fds.
5063         * server.c: Include filestuff.h.
5064         (main): Call notice_open_fds.
5065         * spu-low.c: Include filestuff.h.
5066         (spu_create_inferior) <pid == 0>: Call close_most_fds.
5067
5068 2013-08-22  Luis Machado  <lgustavo@codesourcery.com>
5069
5070         * Makefile.in: Explain why ../target and ../nat are not
5071         listed as include file search paths.
5072         (linux-waitpid.o): New object file rule.
5073         * configure.srv (srv_native_linux_obj): New variable.
5074         Replace all occurrences of linux native object files with
5075         $srv_native_linux_obj.
5076         * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
5077         (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
5078         (linux_enable_event_reporting): Remove declaration.
5079         (my_waitpid): Moved to common/linux-waitpid.c.
5080         (linux_wait_for_event): Pass ptid when calling
5081         linux_enable_event_reporting.
5082         (linux_supports_tracefork_flag): Remove.
5083         (linux_enable_event_reporting): Likewise.
5084         (linux_tracefork_grandchild): Remove.
5085         (STACK_SIZE): Moved to common/linux-ptrace.c.
5086         (linux_tracefork_child): Remove.
5087         (linux_test_for_tracefork): Remove.
5088         (linux_look_up_symbols): Call linux_supports_traceclone.
5089         (initialize_low): Remove call to linux_test_for_tracefork.
5090         * linux-low.h (PTRACE_TYPE_ARG3): Move to
5091         common/linux-ptrace.h.
5092         (PTRACE_TYPE_ARG4): Likewise.
5093         Include linux-ptrace.h.
5094
5095 2013-08-21  Pedro Alves  <palves@redhat.com>
5096
5097         * config.in: Renegerate.
5098
5099 2013-08-19  Luis Machado  <lgustavo@codesourcery.com>
5100
5101         * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
5102         (SFILES): Remove $(srcdir)/common/target-common.c and
5103         add $(srcdir)/target/waitstatus.c.
5104         (OBS): Remove target-common.o and add waitstatus.o.
5105         (server_h): Remove $(srcdir)/../common/target-common.h and
5106         add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
5107         and $(srcdir)/../target/waitstatus.h.
5108         (target-common.o): Remove.
5109         (waitstatus.o): New target object file.
5110         * target.h: Do not include target-common.h and
5111         include target/resume.h, target/wait.h and
5112         target/waitstatus.h.
5113
5114 2013-08-13  Luis Machado  <lgustavo@codesourcery.com>
5115
5116         * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5117         to PTRACE_TYPE_ARG3.
5118         * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5119         to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
5120         PTRACE_TYPE_ARG4.
5121         * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
5122         (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
5123
5124 2013-07-27  Jie Zhang  <jie@codesourcery.com>
5125             Daniel Jacobowitz  <dan@codesourcery.com>
5126             Yao Qi  <yao@codesourcery.com>
5127
5128         * Makefile.in (SFILES): Add common/mips-linux-watch.c.
5129         (mips-linux-watch.o): New rule.
5130         (mips_linux_watch_h): New variable.
5131         * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
5132         srv_tgtobj.
5133         * linux-mips-low.c: Include mips-linux-watch.h.
5134         (struct arch_process_info, struct arch_lwp_info): New.
5135         (update_watch_registers_callback): New function.
5136         (mips_linux_new_process, mips_linux_new_thread) New functions.
5137         (mips_linux_prepare_to_resume, mips_insert_point): New
5138         functions.
5139         (mips_remove_point, mips_stopped_by_watchpoint): New
5140         functions.
5141         (rsp_bp_type_to_target_hw_bp_type): New function.
5142         (mips_stopped_data_address): New function.
5143         (the_low_target): Add watchpoint support functions.
5144
5145 2013-07-27  Yao Qi  <yao@codesourcery.com>
5146
5147         * i386-low.c: Include break-common.h.
5148         (enum target_hw_bp_type): Remove.
5149
5150 2013-07-24  Luis Machado  <lgustavo@codesourcery.com>
5151
5152         * Makefile.in (SFILES): /common/target-common.c.
5153         (OBS): Add target-common.o.
5154         (server_h): Add $(srcdir)/../common/target-common.h.
5155         (target-common.o): New target.
5156         * server.c (queue_stop_reply_callback): Free
5157         status string after use.
5158         * target.c (target_waitstatus_to_string): Remove.
5159         * target.h: Include target-common.h.
5160         (resume_kind): Likewise.
5161         (target_waitkind): Likewise.
5162         (target_waitstatus): Likewise.
5163         (TARGET_WNOHANG): Likewise.
5164
5165 2013-07-04  Yao Qi  <yao@codesourcery.com>
5166
5167         * Makefile.in (host_alias): Use @host_noncanonical@.
5168         (target_alias): Use @target_noncanonical@.
5169         * configure.ac: Use ACX_NONCANONICAL_TARGET and
5170         ACX_NONCANONICAL_HOST.
5171         * configure: Regenerated.
5172
5173         Revert:
5174         2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>
5175
5176         * configure.ac (version_host, version_target): Set and AC_SUBST them.
5177         * configure: Rebuild.
5178         * Makefile.in (version_host, version_target): Get from configure.
5179         (version.c): Use $(version_host) and $(version_target).
5180
5181 2013-07-03  Pedro Alves  <palves@redhat.com>
5182
5183         * Makefile.in (config.status): Depend on development.sh.
5184         * acinclude.m4: Include libmcheck.m4.
5185         * configure: Regenerate.
5186
5187 2013-07-02  Mircea Gherzan  <mircea.gherzan@intel.com>
5188
5189         * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
5190         attribute inside the parentheses.
5191         (winapi_DebugSetProcessKillOnExit): Ditto.
5192         (winapi_DebugBreakProcess): Ditto.
5193         (winapi_GenerateConsoleCtrlEvent): Ditto.
5194
5195 2013-07-02  Mircea Gherzan  <mircea.gherzan@intel.com>
5196
5197         * notif.h (notif_event): Add a dummy member to avoid compiler
5198         errors.
5199
5200 2013-07-01  Pedro Alves  <palves@redhat.com>
5201
5202         * hostio.c (HOSTIO_PATH_MAX): Define.
5203         (require_filename, handle_open, handle_unlink, handle_readlink):
5204         Use it.
5205
5206 2013-07-01  Pedro Alves  <palves@redhat.com>
5207
5208         * server.h: Include "pathmax.h".
5209         * linux-low.c: Don't include sys/param.h.
5210         (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
5211         MAXPATHLEN.
5212         * win32-low.c: Don't include sys/param.h.
5213         (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
5214
5215 2013-07-01  Pedro Alves  <palves@redhat.com>
5216
5217         * event-loop.c: Don't check HAVE_UNISTD_H before including
5218         <unistd.h>.
5219         * gdbreplay.c: Likewise.
5220         * remote-utils.c: Likewise.
5221         * server.c: Likewise.
5222         * configure.ac: Don't check for unistd.h.
5223         * configure: Regenerate.
5224
5225 2013-06-28  Tom Tromey  <tromey@redhat.com>
5226
5227         * Makefile.in (version.c): Use version.in, not
5228         common/version.in.
5229
5230 2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>
5231
5232         * configure.ac (version_host, version_target): Set and AC_SUBST them.
5233         * configure: Rebuild.
5234         * Makefile.in (version_host, version_target): Get from configure.
5235         (version.c): Use $(version_host) and $(version_target).
5236
5237 2013-06-10  Dmitry Kozlov <ddk@codesourcery.com>
5238
5239         Fix trace-status to output user name without trailing colon.
5240         * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
5241
5242 2013-06-10  Dmitry Kozlov <ddk@codesourcery.com>
5243
5244         Fix trace-status to output proper start-time and stop-time.
5245         * tracepoint.c (cmd_qtstatus): Modify trace-status output to
5246         output start time and stop time in hex as gdb expects.
5247
5248 2013-06-26  Pedro Alves  <pedro@codesourcery.com>
5249
5250         * tracepoint.c (build_traceframe_info_xml): Output trace state
5251         variables present in the trace buffer.
5252
5253 2013-06-24  Tom Tromey  <tromey@redhat.com>
5254
5255         * Makefile.in (version.c): Use bfd/version.h, common/version.in,
5256         create-version.sh.
5257         (version.o): Remove.
5258         * gdbreplay.c: Include version.h.
5259         (version, host_name): Don't declare.
5260         * server.h: Include version.h.
5261         (version, host_name): Don't declare.
5262
5263 2013-06-12  Pedro Alves  <palves@redhat.com>
5264
5265         * linux-x86-low.c (linux_is_elf64): Delete global.
5266         (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
5267         with local linux_pid_exe_is_elf_64_file use.
5268
5269 2013-06-11  Pedro Alves  <palves@redhat.com>
5270
5271         * linux-low.c (regset_disabled, disable_regset): New functions.
5272         (regsets_fetch_inferior_registers)
5273         (regsets_store_inferior_registers): Use them.
5274         (initialize_regsets_info); Don't allocate the disabled_regsets
5275         array here.
5276         * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
5277         comment.
5278
5279 2013-06-11  Pedro Alves  <palves@redhat.com>
5280
5281         * linux-low.c (initialize_regsets_info): Use xcalloc instead of
5282         xmalloc.
5283
5284 2013-06-11  Pedro Alves  <palves@redhat.com>
5285
5286         * linux-x86-low.c (initialize_low_arch): Call
5287         init_registers_x32_avx_linux.
5288
5289 2013-06-09  Jan Kratochvil  <jan.kratochvil@redhat.com>
5290
5291         Fix compatibility with Android Bionic.
5292         * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
5293         it is not empty.
5294
5295 2013-06-07  Pedro Alves  <palves@redhat.com>
5296
5297         PR server/14823
5298         * Makefile.in (OBS): Add tdesc.o.
5299         (IPA_OBJS): Add tdesc-ipa.o.
5300         (tdesc-ipa.o): New rule.
5301         * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
5302         interface.
5303         * linux-low.c (new_inferior): Delete.
5304         (disabled_regsets, num_regsets): Delete.
5305         (linux_add_process): Adjust to set the new per-process
5306         new_inferior flag.
5307         (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
5308         (linux_wait_for_lwp): Adjust.  Only call arch_setup if the event
5309         was a stop.  When calling arch_setup, switch the current inferior
5310         to the thread that got an event.
5311         (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
5312         (regsets_fetch_inferior_registers)
5313         (regsets_store_inferior_registers): New regsets_info parameter.
5314         Adjust to use it.
5315         (linux_register_in_regsets): New regs_info parameter.  Adjust to
5316         use it.
5317         (register_addr, fetch_register, store_register): New usrregs_info
5318         parameter.  Adjust to use it.
5319         (usr_fetch_inferior_registers, usr_store_inferior_registers): New
5320         parameter regs_info.  Adjust to use it.
5321         (linux_fetch_registers): Get the current inferior's regs_info, and
5322         adjust to use it.
5323         (linux_store_registers): Ditto.
5324         [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
5325         (initialize_low): Don't initialize the target_regsets here.  Call
5326         initialize_low_arch.
5327         * linux-low.h (target_regsets): Delete declaration.
5328         (struct regsets_info): New.
5329         (struct usrregs_info): New.
5330         (struct regs_info): New.
5331         (struct process_info_private) <new_inferior>: New field.
5332         (struct linux_target_ops): Delete the num_regs, regmap, and
5333         regset_bitmap fields.  New field regs_info.
5334         [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
5335         * i387-fp.c (num_xmm_registers): Delete.
5336         (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
5337         calls to new interface.
5338         (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
5339         (i387_xsave_to_cache): Adjust find_regno calls to new interface.
5340         Infer the number of xmm registers from the regcache's target
5341         description.
5342         * i387-fp.h (num_xmm_registers): Delete.
5343         * inferiors.c (add_thread): Don't install the thread's regcache
5344         here.
5345         * proc-service.c (gregset_info): Fetch the current inferior's
5346         regs_info.  Adjust to use it.
5347         * regcache.c: Include tdesc.h.
5348         (register_bytes, reg_defs, num_registers)
5349         (gdbserver_expedite_regs): Delete.
5350         (get_thread_regcache): If the thread doesn't have a regcache yet,
5351         create one, instead of aborting gdbserver.
5352         (regcache_invalidate_one): Rename to ...
5353         (regcache_invalidate_thread): ... this.
5354         (regcache_invalidate_one): New.
5355         (regcache_invalidate): Only invalidate registers of the current
5356         process.
5357         (init_register_cache): Add target_desc parameter, and use it.
5358         (new_register_cache): Ditto.  Assert the target description has a
5359         non zero registers_size.
5360         (regcache_cpy): Add assertions.  Adjust.
5361         (realloc_register_cache, set_register_cache): Delete.
5362         (registers_to_string, registers_from_string): Adjust.
5363         (find_register_by_name, find_regno, find_register_by_number)
5364         (register_cache_size): Add target_desc parameter, and use it.
5365         (free_register_cache_thread, free_register_cache_thread_one)
5366         (regcache_release, register_cache_size): New.
5367         (register_size): Add target_desc parameter, and use it.
5368         (register_data, supply_register, supply_register_zeroed)
5369         (supply_regblock, supply_register_by_name, collect_register)
5370         (collect_register_as_string, collect_register_by_name): Adjust.
5371         * regcache.h (struct target_desc): Forward declare.
5372         (struct regcache) <tdesc>: New field.
5373         (init_register_cache, new_register_cache): Add target_desc
5374         parameter.
5375         (regcache_invalidate_thread): Declare.
5376         (regcache_invalidate_one): Delete declaration.
5377         (regcache_release): Declare.
5378         (find_register_by_number, register_cache_size, register_size)
5379         (find_regno): Add target_desc parameter.
5380         (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
5381         declarations.
5382         * remote-utils.c: Include tdesc.h.
5383         (outreg, prepare_resume_reply): Adjust.
5384         * server.c: Include tdesc.h.
5385         (gdbserver_xmltarget): Delete declaration.
5386         (get_features_xml, process_serial_event): Adjust.
5387         * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
5388         declare.
5389         (struct process_info) <tdesc>: New field.
5390         (ipa_tdesc): Declare.
5391         * tdesc.c: New file.
5392         * tdesc.h: New file.
5393         * tracepoint.c: Include tdesc.h.
5394         [IN_PROCESS_AGENT] (ipa_tdesc): Define.
5395         (get_context_regcache): Adjust to pass ipa_tdesc down.
5396         (do_action_at_tracepoint): Adjust to get the register cache size
5397         from the context regcache's description.
5398         (traceframe_walk_blocks): Adjust to get the register cache size
5399         from the current trace frame's description.
5400         (traceframe_get_pc): Adjust to get current trace frame's
5401         description and pass it down.
5402         (gdb_collect): Adjust to get the register cache size from the
5403         IPA's description.
5404         * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
5405         (gdbserver_xmltarget): Delete.
5406         (initialize_low_tracepoint): Set the ipa's target description.
5407         * linux-i386-ipa.c (tdesc_i386_linux): Declare.
5408         (initialize_low_tracepoint): Set the ipa's target description.
5409         * linux-x86-low.c: Include tdesc.h.
5410         [__x86_64__] (is_64bit_tdesc): New.
5411         (ps_get_thread_area, x86_get_thread_area): Use it.
5412         (i386_cannot_store_register): Rename to ...
5413         (x86_cannot_store_register): ... this.  Use is_64bit_tdesc.
5414         (i386_cannot_fetch_register): Rename to ...
5415         (x86_cannot_fetch_register): ... this.  Use is_64bit_tdesc.
5416         (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
5417         to new interface.
5418         (target_regsets): Rename to ...
5419         (x86_regsets): ... this.
5420         (x86_get_pc, x86_set_pc): Adjust register_size calls to new
5421         interface.
5422         (x86_siginfo_fixup): Use is_64bit_tdesc.
5423         [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
5424         (tdesc_x32_avx_linux, tdesc_x32_linux)
5425         (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
5426         Declare.
5427         (x86_linux_update_xmltarget): Delete.
5428         (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
5429         (have_ptrace_getfpxregs, have_ptrace_getregset): New.
5430         (AMD64_LINUX_USER64_CS): New.
5431         (x86_linux_read_description): New, based on
5432         x86_linux_update_xmltarget.
5433         (same_process_callback): New.
5434         (x86_arch_setup_process_callback): New.
5435         (x86_linux_update_xmltarget): New.
5436         (x86_regsets_info): New.
5437         (amd64_linux_regs_info): New.
5438         (i386_linux_usrregs_info): New.
5439         (i386_linux_regs_info): New.
5440         (x86_linux_regs_info): New.
5441         (x86_arch_setup): Reimplement.
5442         (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
5443         (x86_emit_ops): Ditto.
5444         (the_low_target): Adjust.  Install x86_linux_regs_info,
5445         x86_cannot_fetch_register, and x86_cannot_store_register.
5446         (initialize_low_arch): New.
5447         * linux-ia64-low.c (tdesc_ia64): Declare.
5448         (ia64_fetch_register): Adjust.
5449         (ia64_usrregs_info, regs_info): New globals.
5450         (ia64_regs_info): New function.
5451         (the_low_target): Adjust.
5452         (initialize_low_arch): New function.
5453         * linux-sparc-low.c (tdesc_sparc64): Declare.
5454         (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
5455         Adjust.
5456         (sparc_arch_setup): New function.
5457         (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
5458         (the_low_target): Adjust.
5459         (initialize_low_arch): New function.
5460         * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
5461         (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
5462         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
5463         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
5464         (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
5465         (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
5466         (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
5467         (tdesc_powerpc_isa205_vsx64l): Declare.
5468         (ppc_cannot_store_register, ppc_collect_ptrace_register)
5469         (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
5470         (ppc_set_pc, ppc_get_hwcap): Adjust.
5471         (ppc_usrregs_info): Forward declare.
5472         (!__powerpc64__) ppc_regmap_adjusted: New global.
5473         (ppc_arch_setup): Adjust to the current process'es target
5474         description.
5475         (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
5476         (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
5477         (ppc_store_evrregset): Adjust.
5478         (target_regsets): Rename to ...
5479         (ppc_regsets): ... this, and make static.
5480         (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
5481         (ppc_regs_info): New function.
5482         (the_low_target): Adjust.
5483         (initialize_low_arch): New function.
5484         * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
5485         (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
5486         (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
5487         (tdesc_s390x_linux64v2): Declare.
5488         (s390_collect_ptrace_register, s390_supply_ptrace_register)
5489         (s390_fill_gregset, s390_store_last_break): Adjust.
5490         (target_regsets): Rename to ...
5491         (s390_regsets): ... this, and make static.
5492         (s390_get_pc, s390_set_pc): Adjust.
5493         (s390_get_hwcap): New target_desc parameter, and use it.
5494         [__s390x__] (have_hwcap_s390_high_gprs): New global.
5495         (s390_arch_setup): Adjust to set the current process'es target
5496         description.  Don't adjust the regmap.
5497         (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
5498         [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
5499         (regs_info_3264): New globals.
5500         (s390_regs_info): New function.
5501         (the_low_target): Adjust.
5502         (initialize_low_arch): New function.
5503         * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
5504         (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
5505         [__mips64] (init_registers_mips_linux)
5506         (init_registers_mips_dsp_linux): Delete defines.
5507         [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
5508         (have_dsp): New global.
5509         (mips_read_description): New, based on mips_arch_setup.
5510         (mips_arch_setup): Reimplement.
5511         (get_usrregs_info): New function.
5512         (mips_cannot_fetch_register, mips_cannot_store_register)
5513         (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
5514         (mips_fill_fpregset, mips_store_fpregset): Adjust.
5515         (target_regsets): Rename to ...
5516         (mips_regsets): ... this, and make static.
5517         (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
5518         (dsp_regs_info, regs_info): New globals.
5519         (mips_regs_info): New function.
5520         (the_low_target): Adjust.
5521         (initialize_low_arch): New function.
5522         * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
5523         (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
5524         Declare.
5525         (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
5526         (arm_read_description): New, with bits factored from
5527         arm_arch_setup.
5528         (arm_arch_setup): Reimplement.
5529         (target_regsets): Rename to ...
5530         (arm_regsets): ... this, and make static.
5531         (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
5532         (arm_regs_info): New function.
5533         (the_low_target): Adjust.
5534         (initialize_low_arch): New function.
5535         * linux-m68k-low.c (tdesc_m68k): Declare.
5536         (target_regsets): Rename to ...
5537         (m68k_regsets): ... this, and make static.
5538         (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
5539         (m68k_regs_info): New function.
5540         (m68k_arch_setup): New function.
5541         (the_low_target): Adjust.
5542         (initialize_low_arch): New function.
5543         * linux-sh-low.c (tdesc_sharch): Declare.
5544         (target_regsets): Rename to ...
5545         (sh_regsets): ... this, and make static.
5546         (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
5547         (sh_regs_info, sh_arch_setup): New functions.
5548         (the_low_target): Adjust.
5549         (initialize_low_arch): New function.
5550         * linux-bfin-low.c (tdesc_bfin): Declare.
5551         (bfin_arch_setup): New function.
5552         (bfin_usrregs_info, regs_info): New globals.
5553         (bfin_regs_info): New function.
5554         (the_low_target): Adjust.
5555         (initialize_low_arch): New function.
5556         * linux-cris-low.c (tdesc_cris): Declare.
5557         (cris_arch_setup): New function.
5558         (cris_usrregs_info, regs_info): New globals.
5559         (cris_regs_info): New function.
5560         (the_low_target): Adjust.
5561         (initialize_low_arch): New function.
5562         * linux-cris-low.c (tdesc_crisv32): Declare.
5563         (cris_arch_setup): New function.
5564         (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
5565         (cris_regs_info): New function.
5566         (the_low_target): Adjust.
5567         (initialize_low_arch): New function.
5568         * linux-m32r-low.c (tdesc_m32r): Declare.
5569         (m32r_arch_setup): New function.
5570         (m32r_usrregs_info, regs_info): New globals.
5571         (m32r_regs_info): Adjust.
5572         (initialize_low_arch): New function.
5573         * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
5574         (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
5575         (tic6x_usrregs_info): Forward declare.
5576         (tic6x_read_description): New function, based on ...
5577         (tic6x_arch_setup): ... this.  Reimplement.
5578         (target_regsets): Rename to ...
5579         (tic6x_regsets): ... this, and make static.
5580         (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
5581         (tic6x_regs_info): New function.
5582         (the_low_target): Adjust.
5583         (initialize_low_arch): New function.
5584         * linux-xtensa-low.c (tdesc_xtensa): Declare.
5585         (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
5586         (target_regsets): Rename to ...
5587         (xtensa_regsets): ... this, and make static.
5588         (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
5589         globals.
5590         (xtensa_arch_setup, xtensa_regs_info): New functions.
5591         (the_low_target): Adjust.
5592         (initialize_low_arch): New function.
5593         * linux-nios2-low.c (tdesc_nios2_linux): Declare.
5594         (nios2_arch_setup): Set the current process'es tdesc.
5595         (target_regsets): Rename to ...
5596         (nios2_regsets): ... this.
5597         (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
5598         (nios2_regs_info): New function.
5599         (the_low_target): Adjust.
5600         (initialize_low_arch): New function.
5601         * linux-aarch64-low.c (tdesc_aarch64): Declare.
5602         (aarch64_arch_setup): Set the current process'es tdesc.
5603         (target_regsets): Rename to ...
5604         (aarch64_regsets): ... this.
5605         (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
5606         (aarch64_regs_info): New function.
5607         (the_low_target): Adjust.
5608         (initialize_low_arch): New function.
5609         * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
5610         globals.
5611         (target_regsets): Rename to ...
5612         (tile_regsets): ... this.
5613         (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
5614         (tile_regs_info): New function.
5615         (tile_arch_setup): Set the current process'es tdesc.
5616         (the_low_target): Adjust.
5617         (initialize_low_arch): New function.
5618         * spu-low.c (tdesc_spu): Declare.
5619         (spu_create_inferior, spu_attach): Set the new process'es tdesc.
5620         * win32-arm-low.c (tdesc_arm): Declare.
5621         (arm_arch_setup): New function.
5622         (the_low_target): Install arm_arch_setup instead of
5623         init_registers_arm.
5624         * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
5625         (init_windows_x86): Rename to ...
5626         (i386_arch_setup): ... this.  Set `win32_tdesc'.
5627         (the_low_target): Adjust.
5628         * win32-low.c (win32_tdesc): New global.
5629         (child_add_thread): Don't create the thread cache here.
5630         (do_initial_child_stuff): Set the new process'es tdesc.
5631         * win32-low.h (struct target_desc): Forward declare.
5632         (win32_tdesc): Declare.
5633         * lynx-i386-low.c (tdesc_i386): Declare global.
5634         (lynx_i386_arch_setup): Set `lynx_tdesc'.
5635         * lynx-low.c (lynx_tdesc): New global.
5636         (lynx_add_process): Set the new process'es tdesc.
5637         * lynx-low.h (struct target_desc): Forward declare.
5638         (lynx_tdesc): Declare global.
5639         * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
5640         (lynx_ppc_arch_setup): Set `lynx_tdesc'.
5641         * nto-low.c (nto_tdesc): New global.
5642         (do_attach): Set the new process'es tdesc.
5643         * nto-low.h (struct target_desc): Forward declare.
5644         (nto_tdesc): Declare.
5645         * nto-x86-low.c (tdesc_i386): Declare.
5646         (nto_x86_arch_setup): Set `nto_tdesc'.
5647
5648 2013-06-04  Gary Benson  <gbenson@redhat.com>
5649
5650         * server.c (handle_query): Add "augmented-libraries-svr4-read+"
5651         to qSupported response when appropriate.
5652         (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
5653         with nonzero-length annex.
5654         * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
5655         arguments supplied in annex.
5656
5657 2013-05-31  Doug Evans  <dje@google.com>
5658
5659         PR server/15594
5660         * linux-x86-low.c (ps_get_thread_area): Properly extend address to
5661         64 bits in 64-cross-32 environment.
5662
5663 2013-05-28  Pedro Alves  <palves@redhat.com>
5664
5665         * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
5666         (aarch64-without-fpu.c): Delete rule.
5667         * configure.srv (aarch64*-*-linux*): Remove references to
5668         aarch64-without-fpu.o and aarch64-without-fpu.xml.
5669         * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
5670         declaration.
5671
5672 2013-05-24  Pedro Alves  <palves@redhat.com>
5673
5674         * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
5675         instead of strchr/decode_address.  Error if the range isn't split
5676         with a ','.  Don't assume there's be a ':' in the action.
5677
5678 2013-05-23  Yao Qi  <yao@codesourcery.com>
5679             Pedro Alves  <palves@redhat.com>
5680
5681         * linux-low.c (lwp_in_step_range): New function.
5682         (linux_wait_1): If the thread was range stepping and stopped
5683         outside the stepping range, report the stop to GDB.  Otherwise,
5684         continue stepping.  Add range stepping debug output.
5685         (linux_set_resume_request): Copy the step range from the resume
5686         request to the lwp.
5687         (linux_supports_range_stepping): New.
5688         (linux_target_ops) <supports_range_stepping>: Set to
5689         linux_supports_range_stepping.
5690         * linux-low.h (struct linux_target_ops)
5691         <supports_range_stepping>: New field.
5692         (struct lwp_info) <step_range_start, step_range_end>: New fields.
5693         * linux-x86-low.c (x86_supports_range_stepping): New.
5694         (the_low_target) <supports_range_stepping>: Set to
5695         x86_supports_range_stepping.
5696         * server.c (handle_v_cont): Handle 'r' action.
5697         (handle_v_requests): Append ";r" if the target supports range
5698         stepping.
5699         * target.h (struct thread_resume) <step_range_start,
5700         step_range_end>: New fields.
5701         (struct target_ops) <supports_range_stepping>:
5702         New field.
5703         (target_supports_range_stepping): New macro.
5704
5705 2013-05-17  Joel Brobecker  <brobecker@adacore.com>
5706
5707         * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
5708         confusion in comment.
5709
5710 2013-05-17  Joel Brobecker  <brobecker@adacore.com>
5711
5712         * lynx-low.c (struct process_info_private): New type.
5713         (lynx_add_process): New function.
5714         (lynx_create_inferior, lynx_attach): Replace calls to
5715         add_process by calls to lynx_add_process.
5716         (lynx_resume): If PTID is null, then try using
5717         current_process()->private->last_wait_event_ptid.
5718         Add comments.
5719         (lynx_clear_inferiors): Delete.  The contents of that function
5720         has been inlined in lynx_mourn;
5721         (lynx_wait_1): Save the ptid in the process's private data.
5722         (lynx_mourn): Free the process' private data.  Replace call
5723         to lynx_clear_inferiors by call to clear_inferiors.
5724
5725 2013-05-17  Yao Qi  <yao@codesourcery.com>
5726
5727         * i386-low.c (i386_length_and_rw_bits): Move the comment to
5728         the right place.
5729
5730 2013-05-16  Luis Machado  <lgustavo@codesourcery.com>
5731
5732         * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
5733         PT_DATA_ADDR and PT_TEXT_END_ADDR.  Update comments.
5734         (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
5735         PT_TEXT_END_ADDR guards.  Update comments.
5736         (linux_target_op) <read_offsets>: Conditionally define to
5737         linux_read_offsets if the target is UCLIBC and if it defines
5738         PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
5739
5740 2013-05-06  Sandra Loosemore  <sandra@codesourcery.com>
5741             Andrew Jenner  <andrew@codesourcery.com>
5742
5743         * Makefile.in (SFILES): Add linux-nios2-low.c.
5744         (clean): Add action to delete nios2-linux.c.
5745         (nios2-linux.c): New rule.
5746         * configure.srv: Add nios2*-*-linux*.
5747         * linux-nios2-low.c: New.
5748
5749 2013-05-03  Hafiz Abid Qadeer  <abidh@codesourcery.com>
5750
5751         * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
5752
5753 2013-04-25  Hui Zhu  <hui@codesourcery.com>
5754
5755         PR gdb/15186
5756         * ax.c (ax_printf): Add fflush.
5757
5758 2013-04-22  Tom Tromey  <tromey@redhat.com>
5759
5760         * Makefile.in (SFILES): Add filestuff.c.
5761         (OBS): Add filestuff.o.
5762         (filestuff.o): New target.
5763         * config.in, configure: Rebuild.
5764         * configure.ac: Check for fdwalk, pipe2.
5765
5766 2013-04-17  Pedro Alves  <palves@redhat.com>
5767
5768         * configure.ac (USE_THREAD_DB): Delete variable.
5769         (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
5770         Don't AC_SUBST USE_THREAD_DB.
5771         * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
5772         * config.in, configure: Regenerate.
5773
5774 2013-04-16  Pedro Alves  <palves@redhat.com>
5775
5776         * linux-low.h (struct lwp_info) <thread_known>: Move under
5777         the USE_THREAD_DB #ifdef.
5778
5779 2013-04-16  Pedro Alves  <palves@redhat.com>
5780
5781         * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
5782         (linux-low.o): Delete rule.
5783         * linux-low.h: Always include "gdb_thread_db.h" instead of
5784         conditionally including thread_db.h.
5785         (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
5786         HAVE_THREAD_DB_H.
5787
5788 2013-04-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
5789
5790         * Makefile.in (install-only): Fix make install regression.
5791
5792 2013-04-05  Jan Kratochvil  <jan.kratochvil@redhat.com>
5793
5794         Convert man pages to texinfo, new gdbinit.5 texinfo page.
5795         * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
5796         installation.
5797         * gdbserver.1: Remove.
5798
5799 2013-03-22  Pedro Alves  <palves@redhat.com>
5800
5801         * linux-low.c (handle_extended_wait): Don't call
5802         linux_enable_event_reporting.
5803
5804 2013-03-15  Tony Theodore  <tonyt@logyst.com>
5805
5806         PR build/9098:
5807         * Makefile.in (SHELL): Use @SHELL@.
5808
5809 2013-03-14  Sergio Durigan Junior  <sergiodj@redhat.com>
5810
5811         * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
5812         compiler warning.
5813
5814 2013-03-13  Joel Brobecker  <brobecker@adacore.com>
5815
5816         * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
5817         Remove extraneous NULL element.
5818
5819 2013-03-13  Yao Qi  <yao@codesourcery.com>
5820
5821         * tracepoint.c (traceframe_read_tsv): Look for the last matched
5822         'V' block in trace frame.
5823
5824 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
5825
5826         * target.h (struct target_ops): Add btrace ops.
5827         (target_supports_btrace): New macro.
5828         (target_enable_btrace): New macro.
5829         (target_disable_btrace): New macro.
5830         (target_read_btrace): New macro.
5831         * gdbthread.h (struct thread_info): Add btrace field.
5832         * server.c: Include btrace-common.h.
5833         (handle_btrace_general_set): New function.
5834         (handle_btrace_enable): New function.
5835         (handle_btrace_disable): New function.
5836         (handle_general_set): Call handle_btrace_general_set.
5837         (handle_qxfer_btrace): New function.
5838         (struct qxfer qxfer_packets[]): Add btrace entry.
5839         * inferiors.c (remove_thread): Disable btrace.
5840         * linux-low: Include linux-btrace.h.
5841         (linux_low_enable_btrace): New function.
5842         (linux_low_read_btrace): New function.
5843         (linux_target_ops): Add btrace ops.
5844         * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
5845         Add srv_linux_btrace=yes.
5846         (x86_64-*-linux*): Add linux-btrace.o.
5847         Add srv_linux_btrace=yes.
5848         * configure.ac: Define HAVE_LINUX_BTRACE.
5849         * config.in: Regenerated.
5850         * configure: Regenerated.
5851
5852 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
5853
5854         * server.c (handle_qxfer): Preserve error message if -3 is
5855         returned.
5856         (qxfer): Document the -3 return value.
5857
5858 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
5859
5860         * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
5861         (linux_btrace_h): New variable.
5862         (linux-btrace.o): New rule.
5863
5864 2013-03-08  Stan Shebs  <stan@codesourcery.com>
5865             Hafiz Abid Qadeer  <abidh@codesourcery.com>
5866
5867         * tracepoint.c (trace_buffer_size): New global.
5868         (DEFAULT_TRACE_BUFFER_SIZE): New define.
5869         (init_trace_buffer): Change to one-argument function. Allocate
5870         trace buffer memory.
5871         (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
5872         handle QTBuffer:size packet.
5873         (cmd_bigqtbuffer_size): New function.
5874         (initialize_tracepoint): Call init_trace_buffer with
5875         DEFAULT_TRACE_BUFFER_SIZE.
5876         * server.c (handle_query): Add QTBuffer:size in the
5877         supported packets.
5878
5879 2013-03-07  Yao Qi  <yao@codesourcery.com>
5880
5881         * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5882         (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5883         of -1.
5884         (cmd_qtsp): Adjust condition.  Do post increment.
5885         Set cur_action and cur_step_action back to 0.
5886
5887 2013-03-07  Jeremy Bennett  <jeremy.bennett@embecosm.com>
5888
5889         PR server/15236
5890         * linux-low.c (linux_write_memory): Return early success if LEN is
5891         zero.
5892
5893 2013-03-05  Corinna Vinschen  <vinschen@redhat.de>
5894
5895         * configure.srv: Add x86_64-*-cygwin* as target.
5896
5897 2013-02-28  Tom Tromey  <tromey@redhat.com>
5898
5899         * configure.ac: Invoke AC_SYS_LARGEFILE.
5900         * configure, config.in: Rebuild.
5901
5902 2013-02-28  Corinna Vinschen  <vinschen@redhat.com>
5903
5904         * win32-low.c: Throughout, fix format strings and casts of
5905         printf-like functions to avoid type related warnings on all
5906         platforms.
5907         (get_child_debug_event): Print dwDebugEventCode as hex since
5908         that's how it's usually documented.
5909
5910 2013-02-28  Yao Qi  <yao@codesourcery.com>
5911
5912         * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5913         pulongest.
5914
5915 2013-02-27  Jiong Wang  <jiwang@tilera.com>
5916
5917         * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5918         (reg-tilegx32.c): New rule.
5919         * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5920         * linux-tile-low.c (tile_arch_setup): New function.  Invoke
5921         different register info initializer according to elf class.
5922         (init_registers_tilgx32): New function.  The tilegx32 register info
5923         initializer.
5924         (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5925         (tile_store_gregset): Likewise.
5926
5927 2013-02-27  Yao Qi  <yao@codesourcery.com>
5928
5929         * server.c (process_point_options): Print debug message when
5930         debug_threads is true.
5931
5932 2013-02-26  Yao Qi  <yao@codesourcery.com>
5933
5934         * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5935
5936 2013-02-19  Pedro Alves  <palves@redhat.com>
5937             Kai Tietz <ktietz@redhat.com>
5938
5939         PR gdb/15161
5940
5941         * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5942         instead of strtoul to extract address from packet.
5943         (process_serial_event) <'z'>: Likewise.
5944
5945 2013-02-18  Yao Qi  <yao@codesourcery.com>
5946
5947         * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5948
5949 2013-02-14  Pedro Alves  <palves@redhat.com>
5950
5951         Plug memory leak.
5952
5953         * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5954         TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5955
5956 2013-02-14  Pedro Alves  <palves@redhat.com>
5957
5958         * tracepoint.c (cmd_qtdpsrc): Use savestring.
5959
5960 2013-02-14  Pedro Alves  <palves@redhat.com>
5961
5962         * tracepoint.c (save_string): Delete.
5963         (add_tracepoint_action): Use savestring instead of save_string.
5964
5965 2013-02-12  Pedro Alves  <palves@redhat.com>
5966
5967         * linux-xtensa-low.c: Ditto.
5968         * xtensa-xtregs.c: Ditto.
5969
5970 2013-02-12  Sanimir Agovic  <sanimir.agovic@intel.com>
5971
5972         * thread-db.c (thread_db_get_tls_address): NULL pointer check
5973         thread_db.
5974
5975 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
5976
5977         * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5978         aarch64_num_wp_regs and aarch64_num_bp_regs to
5979         AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5980
5981 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
5982
5983         * linux-aarch64-low.c (ps_get_thread_area): Replace
5984         PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5985
5986 2013-02-04  Jim MacArthur  <jim.macarthur@arm.com>
5987             Marcus Shawcroft  <marcus.shawcroft@arm.com>
5988             Nigel Stephens  <nigel.stephens@arm.com>
5989             Yufeng Zhang  <yufeng.zhang@arm.com>
5990
5991         * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5992         (aarch64.c, aarch64-without-fpu.c): New targets.
5993         * configure.srv (aarch64*-*-linux*): New.
5994         * linux-aarch64-low.c: New file.
5995
5996 2013-02-04  Marcus Shawcroft  <marcus.shawcroft@arm.com>
5997
5998         * linux-low.c (handle_extended_wait, linux_create_inferior)
5999         (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
6000         (dequeue_one_deferred_signal, linux_resume_one_thread)
6001         (fetch_register, linux_write_memory, linux_enable_event_reporting)
6002         (linux_tracefork_grandchild, linux_test_for_tracefork)
6003         (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
6004         PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
6005         where the argument is 0.
6006
6007 2013-01-25  Yao Qi  <yao@codesourcery.com>
6008
6009         * event-loop.c: Include "queue.h".
6010         (gdb_event_p): New typedef.
6011         (struct gdb_event) <next_event>: Remove.
6012         (event_queue): Change to QUEUE(gdb_event_p).
6013         (async_queue_event): Remove.
6014         (gdb_event_xfree): New.
6015         (initialize_event_loop): New.
6016         (process_event): Use API from QUEUE.
6017         (wait_for_event): Likewise.
6018         * server.c (main): Call initialize_event_loop.
6019         * server.h (initialize_event_loop): Declare.
6020
6021 2013-01-18  Yao Qi  <yao@codesourcery.com>
6022
6023         * ax.h (struct eval_agent_expr_context): New.
6024         (gdb_eval_agent_expr): Update declaration.
6025         * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
6026         TFRAME.  Add new argument CTX.
6027         * server.h (struct eval_agent_expr_context): Declare.
6028         (agent_mem_read, agent_tsv_read): Update declaration.
6029         (agent_mem_read_string): Likewise.
6030         * tracepoint.c (eval_tracepoint_agent_expr): Remove.
6031         (add_traceframe_block): Add new argument TPOINT.
6032         Increase TPOINT->traceframe_usage.
6033         (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
6034         eval_tracepoint_agent_expr.
6035         (condition_true_at_tracepoint): Likewise.
6036         (agent_mem_read): Remove argument TFRAME.  Add argument CTX.
6037         (agent_mem_read_string, agent_tsv_read): Likewise.
6038
6039 2013-01-16  Yao Qi  <yao@codesourcery.com>
6040
6041         * linux-low.c (linux_resume_one_lwp): Don't check
6042         'lwp->bp_reinsert != 0'.
6043
6044 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
6045             Pedro Alves  <palves@redhat.com>
6046
6047         * lynx-low.c (ptrace_request_to_str): Define a temporary
6048         macro and use it to simplify this function's implementation.
6049
6050 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
6051
6052         * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
6053         sets errno.
6054
6055 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
6056
6057         * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
6058
6059 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
6060
6061         * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
6062
6063 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
6064
6065         * lynx-low.c (lynx_resume): Use the resume_info parameter
6066         to determine the ptid for the lynx_ptrace call, unless
6067         it is equal to minus_one_ptid, in which case we use the
6068         ptid of the current_inferior.
6069         (lynx_wait_1): After having received a thread create/exit
6070         event, resume the inferior's execution using the signaling
6071         thread's ptid, rather than the old ptid.
6072
6073 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
6074
6075         * lynx-low.c (lynx_resume): Delete variable ret.
6076
6077 2013-01-01  Joel Brobecker  <brobecker@adacore.com>
6078
6079         * gdbreplay.c (gdbreplay_version): Update copyright year.
6080         * server.c (gdbserver_version): Likewise.
6081
6082 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
6083
6084         * lynx-low.c (lynx_wait_1): Add debug trace before adding
6085         new thread.
6086
6087 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
6088
6089         * lynx-low.c (ptrace_request_to_str): Add handling for
6090         PTRACE_GETTRACESIG.
6091
6092 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
6093
6094         * lynx-low.c (lynx_attach): Delete variable new_process.
6095
6096 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
6097
6098         * lynx-low.c (lynx_create_inferior): Delete variable
6099         new_process.
6100
6101 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
6102
6103         * lynx-low.c (ptrace_request_to_str): Do not handle
6104         PTRACE_GETTHREADLIST if this macro does not exist.
6105
6106 2012-12-15  Yao Qi  <yao@codesourcery.com>
6107
6108         * Makefile.in (OBS): Add notif.o.
6109         * notif.c, notif.h: New.
6110         * server.c: Include "notif.h".
6111         (struct vstop_notif) <next>: Remove.
6112         <base>: New field.
6113         (queue_stop_reply): Update.
6114         (push_event, send_next_stop_reply): Remove.
6115         (discard_queued_stop_replies): Update.
6116         (notif_stop): New variable.
6117         (handle_v_stopped): Remove.
6118         (handle_v_requests): Don't call handle_v_stopped.  Call
6119         handle_ack_notif instead.
6120         (queue_stop_reply_callback): Call notif_event_enque instead
6121         of queue_stop_reply.
6122         (handle_status): Don't call send_next_stop_reply, call
6123         notif_write_event instead.
6124         (kill_inferior_callback): Likewise.
6125         (detach_or_kill_inferior_callback): Likewise.
6126         (main): Call initialize_notif.
6127         (process_serial_event): Call QUEUE_is_empty.
6128         (handle_target_event): Call notif_push instead of push event.
6129         * server.h (push_event): Remove declaration.
6130
6131 2012-12-10  Tom Tromey  <tromey@redhat.com>
6132
6133         * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
6134         (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
6135         macros.
6136         (.c.o): Rewrite.
6137         (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
6138         (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
6139         (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
6140         (amd64-linux-ipa.o, ax.o): Rewrite.
6141         (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
6142         (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
6143         (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
6144         (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
6145         (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
6146         (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
6147         (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
6148         (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
6149         (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
6150         (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
6151         (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
6152         (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
6153         (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
6154         (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
6155         (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
6156         (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
6157         (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
6158         (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
6159         (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
6160         (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
6161         (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
6162         (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
6163         (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
6164         (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
6165         (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
6166         (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
6167         (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
6168         (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
6169         (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
6170         (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
6171         (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
6172         (reg-tilegx.o): Remove.
6173         (all_object_files): New macro.
6174         Include .deps files.
6175         * aclocal.m4, configure: Rebuild.
6176         * acinclude.m4: Include depstand.m4, lead-dot.m4.
6177         * configure.ac: Invoke ZW_CREATE_DEPDIR,
6178         ZW_PROG_COMPILER_DEPENDENCIES.  Compute GMAKE condition.
6179
6180 2012-12-05  Tom Tromey  <tromey@redhat.com>
6181
6182         PR gdb/14917:
6183         * server.h (current_insn_ptr, emit_error): Declare 'extern'.
6184
6185 2012-11-28  Markus Metzger  <markus.t.metzger@intel.com>
6186
6187         * configure.ac: Check for linux/perf_event.h.
6188         * config.in: Regenerated.
6189         * configure: Regenerated.
6190
6191 2012-11-26  Maxime Villard  <rustyBSD@gmx.fr>
6192
6193         * hostio.c (handle_readlink): Decrease buffer size
6194         parameter passed to readlink by one byte.
6195
6196 2012-11-26  Yao Qi  <yao@codesourcery.com>
6197
6198         * configure.ac (build_warnings): Append '-Wempty-body'.
6199         * configure: Regenerated.
6200         * linux-low.c (linux_create_inferior): Use braces for empty 'if'
6201         body.
6202
6203 2012-11-15  Pierre Muller  <muller@sourceware.org>
6204
6205         * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
6206         * config.in: Regenerate.
6207         * configure: Regenerate.
6208         * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
6209         Use "gdb_wait.h" header instead of <sys/wait.h> header.
6210         * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6211         * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
6212         header.
6213         * server.c: Remove HAVE_WAIT_H conditional.  Use "gdb_wait.h" header
6214         instead of <sys/wait.h> header.
6215         * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6216
6217 2012-11-13 Markus Metzger  <markus.t.metzger@intel.com>
6218
6219         * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
6220         (various make rules): Remove -DGDBSERVER
6221
6222 2012-11-09  Yao Qi  <yao@codesourcery.com>
6223
6224         * spu-low.c (current_ptid): Move it to ..
6225         * gdbthread.h: ... here.  New.
6226         * remote-utils.c (read_ptid): Use macro 'current_ptid'.
6227         * server.c (myresume, process_serial_event): Likewise.
6228         * thread-db.c (thread_db_find_new_threads): Likewise.
6229         * tracepoint.c (run_inferior_command): Likewise.
6230
6231 2012-10-01  Andrew Burgess  <aburgess@broadcom.com>
6232
6233         * server.c (handle_search_memory_1): Include access length in
6234         warning message.
6235
6236 2012-09-05  Michael Brandt  <michael.brandt@axis.com>
6237
6238         * linux-crisv32-low.c: Fix compile errors.
6239
6240 2012-09-04  Yao Qi  <yao@codesourcery.com>
6241
6242         * tracepoint.c (cmd_qtsv): Adjust debug message.
6243         Don't check CUR_TPOINT.
6244
6245 2012-08-28  Yao Qi  <yao@codesourcery.com>
6246
6247         * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
6248         * server.h: Include 'libiberty.h' and 'ansidecl.h'.
6249         (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
6250         Remove declarations of xmalloc, xreallloc, xstrdup and
6251         freeargv.
6252         * Makefile.in (libiberty_h): New.
6253         (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
6254         (linux-bfin-low.o): Append dependency 'libiberty.h'.
6255
6256 2012-08-23  Yao Qi  <yao@codesourcery.com>
6257
6258         * server.h: Remove declaration of 'xsnprintf'.
6259
6260 2012-08-22  Keith Seitz  <keiths@redhat.com>
6261
6262         * server.h: Include build-gnulib-gbserver/config.h.
6263         * gdbreplay.c: Likewise.
6264
6265 2012-08-08  Doug Evans  <dje@google.com>
6266
6267         * Makefile.in (SFILES): Add gdb_vecs.c.
6268         (OBS): Add gdb_vecs.o.
6269         (gdb_vecs_h, host_defs_h): New variables.
6270         (thread-db.o): Add $(gdb_vecs_h) dependency.
6271         (gdb_vecs.o): New rule.
6272         * thread-db.c: #include "gdb_vecs.h".
6273         (thread_db_load_search): Use a vector to iterate over path elements.
6274         Handle text appearing after "$pdir".
6275
6276         * configure.ac: Add check for strstr.
6277         * config.in: Regenerate.
6278         * configure: Regenerate.
6279
6280 2012-08-02  Ulrich Weigand  <ulrich.weigand@linaro.org>
6281
6282         * hostio.c (handle_pread): If pread fails, fall back to attempting
6283         lseek/read.
6284         (handle_pwrite): Likewise for pwrite.
6285
6286 2012-08-01  Ulrich Weigand  <ulrich.weigand@linaro.org>
6287
6288         * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
6289         between unsupported TYPE and unimplementable ADDR/LEN combination.
6290         (arm_insert_point): Act on new return value.
6291
6292 2012-07-31  Pedro Alves  <palves@redhat.com>
6293
6294         * server.c (process_point_options): Only skip tokens if we find
6295         one that is unrecognized.  Don't treat 'X' specially while
6296         skipping unrecognized tokens.
6297
6298 2012-07-30  Ulrich Weigand  <ulrich.weigand@linaro.org>
6299
6300         * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
6301         to 4-byte-align HW breakpoint addresses for Thumb.
6302
6303 2012-07-27  Yao Qi  <yao@codesourcery.com>
6304
6305         PR remote/14161.
6306
6307         * server.h: Declare gdb_agent_about_to_close.
6308         * target.c (kill_inferior): Include "agent.h".
6309         New.  Send command 'kill'.
6310         * target.h (kill_inferior): Removed macro.
6311         * tracepoint.c (gdb_agent_about_to_close): New.
6312         (gdb_agent_helper_thread): Handle command 'close'.
6313         Wait endlessly until the inferior stops.
6314         Install gdb_agent_remove_socket to atexit hook.
6315         (agent_socket_name): New static variable.
6316         (gdb_agent_socket_init): Replace local variable 'name' with
6317         'agent_socket_name'.
6318         (gdb_agent_remove_socket): New.
6319
6320 2012-07-27  Yao Qi  <yao@codesourcery.com>
6321
6322         * server.c (process_point_options): Stop at 'X' when parsing.
6323
6324 2012-07-19  Michael Eager  <eager@eagercon.com>
6325
6326         * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
6327         to hw_execute.
6328         * linux-x86-low.c (x86_insert_point, x86_remove_point):
6329         Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
6330         hardware breakpoint.
6331
6332 2012-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
6333
6334         * gdbserver/linux-low.c (initialize_low): Call
6335         linux_ptrace_init_warnings.
6336
6337 2012-07-02  Doug Evans  <dje@google.com>
6338
6339         * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
6340         pointer to int.
6341
6342 2012-07-02  Stan Shebs  <stan@codesourcery.com>
6343
6344         * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
6345         (ax.o): Add it to build rule.
6346         (ax-ipa.o): Ditto.
6347         (OBS): Add format.o.
6348         (IPA_OBS): Add format.o.
6349         * server.c (handle_query): Claim support for breakpoint commands.
6350         (process_point_options): Add command case.
6351         (process_serial_event): Leave running if there are printfs in
6352         effect.
6353         * mem-break.h (any_persistent_commands): Declare.
6354         (add_breakpoint_commands): Declare.
6355         (gdb_no_commands_at_breakpoint): Declare.
6356         (run_breakpoint_commands): Declare.
6357         * mem-break.c (struct point_command_list): New struct.
6358         (struct breakpoint): New field command_list.
6359         (any_persistent_commands): New function.
6360         (add_commands_to_breakpoint): New function.
6361         (add_breakpoint_commands): New function.
6362         (gdb_no_commands_at_breakpoint): New function.
6363         (run_breakpoint_commands): New function.
6364         * linux-low.c (linux_wait_1): Test for and run breakpoint commands
6365         locally.
6366         * ax.c: Include format.h.
6367         (ax_printf): New function.
6368         (gdb_eval_agent_expr): Add printf opcode.
6369
6370 2012-06-13  Yao Qi  <yao@codesourcery.com>
6371
6372         * server.c (start_inferior): Remove duplicated writes to fields
6373         'last_resume_kind' and 'last_status' of 'current_inferior'.
6374
6375 2012-06-12  Yao Qi  <yao@codesourcery.com>
6376             Pedro Alves  <palves@redhat.com>
6377
6378         * linux-low.c (linux_set_resume_request): Simplify predicate.  Add
6379         comment.
6380         * server.c (handle_v_cont): Extend comment.
6381
6382 2012-06-11  Yao Qi  <yao@codesourcery.com>
6383
6384         * linux-low.c (linux_attach): Add 'static'.
6385
6386 2012-06-06  Yao Qi  <yao@codesourcery.com>
6387
6388         * ax.c (gdb_eval_agent_expr): Print `top' in hex.
6389
6390 2012-06-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
6391
6392         Fix gcc -flto compilation warning.
6393         * server.c (main): Make variable multi_mode and attach volatile.
6394
6395 2012-05-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
6396
6397         * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
6398         if the platform doesn't know about it.
6399
6400 2012-05-30  Jeff Kenton  <jkenton@tilera.com>
6401
6402         * Makefile.in (SFILES): Add linux-tile-low.c.
6403         (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
6404         * configure.srv: Handle tilegx-*-linux*.
6405         * linux-tile-low.c: New file.
6406
6407 2012-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
6408
6409         * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
6410
6411 2012-05-24  Pedro Alves  <palves@redhat.com>
6412
6413         PR gdb/7205
6414
6415         Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
6416
6417 2012-05-24  Pedro Alves  <palves@redhat.com>
6418
6419         PR gdb/7205
6420
6421         Replace target_signal with gdb_signal throughout.
6422
6423 2012-05-22  Maciej W. Rozycki  <macro@codesourcery.com>
6424
6425         * linux-low.c (linux_store_registers): Avoid the copying sequence
6426         when no data has been retrieved by ptrace.
6427
6428 2012-05-22  Will Deacon  <will.deacon@arm.com>
6429
6430         * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
6431         Include asm/ptrace.h.
6432         (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
6433         already defined.
6434
6435 2012-05-21  Maciej W. Rozycki  <macro@codesourcery.com>
6436
6437         * linux-low.c (linux_store_registers): Don't re-retrieve data
6438         with ptrace that has already been obtained from /proc.  Always
6439         copy any data retrieved with ptrace to the buffer supplied.
6440
6441 2012-05-11  Yao Qi  <yao@codesourcery.com>
6442             Pedro Alves  <palves@redhat.com>
6443
6444         * linux-low.c (enum stopping_threads_kind): New.
6445         (stopping_threads): Change type to `enum stopping_threads_kind'.
6446         (handle_extended_wait): If stopping and suspending threads, leave
6447         the new_lwp suspended too.
6448         (linux_wait_for_event): Adjust.
6449         (stop_all_lwps): Set `stopping_threads' to
6450         STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
6451         whether we're suspending threads or just stopping them.  Assert no
6452         recursion happens.
6453
6454 2012-04-29  Yao Qi  <yao@codesourcery.com>
6455
6456         * server.h: Move some code to ...
6457         * gdbthread.h: ... here.  New.
6458         * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
6459         (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
6460         (nto-low.o, win32-low.o): Likewise.
6461         * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
6462         * regcache.c, remote-utils.c, server.c: Likewise.
6463         * target.c, tracepoint.c, win32-low.c: Likewise.
6464
6465 2012-04-24  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
6466
6467         * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
6468         (PTRACE_ARG4_TYPE): Likewise.
6469         (PTRACE_XFER_TYPE): Likewise.
6470         * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
6471         ptrace to PTRACE_ARG3_TYPE.
6472         * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
6473         (PTRACE_ARG4_TYPE): Likewise.
6474         (PTRACE_XFER_TYPE): Likewise.
6475         (linux_detach_one_lwp): Cast fourth argument of
6476         ptrace to long then PTRACE_ARG4_TYPE.
6477         (regsets_fetch_inferior_registers): Cast third argument of
6478         ptrace to long then PTRACE_ARG3_TYPE.
6479         (regsets_store_inferior_registers): Likewise.
6480
6481 2012-04-20  Pedro Alves  <palves@redhat.com>
6482
6483         * configure: Regenerate.
6484
6485 2012-04-19  Pedro Alves  <palves@redhat.com>
6486
6487         * Makefile.in (GNULIB_BUILDDIR): New.
6488         (LIBGNU, INCGNU, GNULIB_H): Adjust.
6489         (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
6490         (all, install-only, uninstall, clean-info, all-lib, clean): No
6491         longer pass GNULIB_FLAGS_TO_PASS.  Use subdir_do.
6492         (maintainer-clean realclean distclean): Use subdir_do.
6493         (subdir_do): New.
6494         (gnulib/import/Makefile): Adjust.  Replace gnulib/import with
6495         $(GNULIB_BUILDDIR).  Don't pass argument to config.status.
6496         * acinclude.m4: Include acx_configure_dir.m4.
6497         * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
6498         calls.  Call AC_PROG_RANLIB.  Configure gnulib using
6499         ACX_CONFIGURE_DIR.
6500         (GNULIB): New.
6501         (GNULIB_STDINT_H): Adjust.
6502         (AC_OUTPUT): Don't output gnulib/Makefile anymore.
6503         * gdbreplay.c: Include build-gnulib/config.h.
6504         * server.h: Likewise.
6505         * aclocal.m4: Regenerate.
6506         * config.in: Regenerate.
6507         * configure: Regenerate.
6508
6509 2012-04-19  Pedro Alves  <palves@redhat.com>
6510
6511         * Makefile.in (LIBGNU, INCGNU): Adjust.
6512         (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
6513         (all, install-only, uninstall, clean-info, all-lib, clean)
6514         (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
6515         * configure.ac: Adjust AC_OUTPUT output.
6516         * aclocal.m4: Regenerate.
6517         * configure: Regenerate.
6518
6519 2012-04-19  Pedro Alves  <palves@redhat.com>
6520
6521         * Makefile.in (generated_files): New.
6522         (server_h): Remove the explicit dependency on config.h, and depend
6523         on $generated_files.
6524
6525 2012-04-19  Pedro Alves  <palves@redhat.com>
6526
6527         * Makefile.in (INCGNU): Add -Ignulib.
6528
6529 2012-04-19  Pedro Alves  <palves@redhat.com>
6530
6531         * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
6532         (INCGNU): ... this, and spell out -I here.
6533         (GNULIB_LIB): Rename to ...
6534         (LIBGNU): ... this.
6535         (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
6536
6537 2012-04-19  Pedro Alves  <palves@redhat.com>
6538
6539         * config.in: Regenerate.
6540
6541 2012-04-19  Pedro Alves  <palves@redhat.com>
6542
6543         * configure.ac: Remove AC_CHECK_DECLS check for memmem.
6544         * server.h (memmem): Remove declaration.
6545         * config.in: Regenerate.
6546         * configure: Regenerate.
6547
6548 2012-04-19  Yao Qi  <yao@codesourcery.com>
6549
6550         * Makefile.in (SFILES): Add common/vec.c.
6551         (OBS): Add vec.o.
6552         (vec.o): New rule.
6553
6554 2012-04-19  Yao Qi  <yao@codesourcery.com>
6555
6556         * remote-utils.c (prepare_resume_reply): Replace with macro
6557         target_core_of_thread.
6558         * server.c (handle_qxfer_threads_proper): Likewise.
6559         * target.h (traget_core_of_thread): New macro.
6560
6561 2012-04-18  Pedro Alves  <palves@redhat.com>
6562
6563         * aclocal.m4: Regenerate.
6564         * configure: Regenerate.
6565
6566 2012-04-16  Yao Qi  <yao@codesourcery.com>
6567
6568         * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
6569         duplicated on address.
6570
6571 2012-04-16  Yao Qi  <yao@codesourcery.com>
6572
6573         * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
6574         (struct tracepoint_action_ops) <send>: New field.
6575         (m_tracepoint_action_send, r_tracepoint_action_send): New.
6576         (agent_expr_send, x_tracepoint_action_send): New.
6577         (l_tracepoint_action_send): New.
6578         (cmd_qtdp): Download and install tracepoint
6579         according to `use_agent'.
6580         (run_inferior_command): Add one more parameter `len'.
6581         Update callers.
6582         (tracepoint_send_agent): New.
6583         (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
6584
6585 2012-04-16  Yao Qi  <yao@codesourcery.com>
6586
6587         * tracepoint.c (download_tracepoints): Moved to ...
6588         (cmd_qtstart): ... here.
6589
6590 2012-04-14  Yao Qi  <yao@codesourcery.com>
6591
6592         * tracepoint.c: Include inttypes.h.
6593         (struct collect_memory_action): Use sized types.
6594         (struct tracepoint): Likewise.
6595         (cmd_qtdp, stop_tracing): Update print specifiers.
6596         (cmd_qtp, response_tracepoint): Likewise.
6597         (collect_data_at_tracepoint): Likewise.
6598         (collect_data_at_step): Likewise.
6599
6600 2012-04-14  Yao Qi  <yao@codesourcery.com>
6601
6602         Import gnulib module inttypes.
6603         * aclocal.m4, config.in, configure: Regenerated.
6604
6605 2012-04-14  Yao Qi  <yao@codesourcery.com>
6606
6607         * Makefile.in (maintainer-clean, realclean, distclean): Remove
6608         Makefile and config.status at last.
6609
6610 2012-04-13  Yao Qi  <yao@codesourcery.com>
6611
6612         * tracepoint.c: Include stdint.h unconditionally.
6613
6614 2012-04-13  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
6615
6616         * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
6617         on BFD_HAVE_SYS_PROCFS_TYPE.
6618         * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
6619         * configure: Regenerate.
6620         * config.in: Likewise.
6621
6622 2012-04-13  H.J. Lu  <hongjiu.lu@intel.com>
6623
6624         * Makefile.in (clean): Also remove x32.c x32-linux.c
6625         x32-avx.c x32-avx-linux.c.
6626         (x32.o): New target.
6627         (x32.c): Likewise.
6628         (x32-linux.o): Likewise.
6629         (x32-linux.c): Likewise.
6630         (x32-avx.o): Likewise.
6631         (x32-avx.c): Likewise.
6632         (x32-avx-linux.o): Likewise.
6633         (x32-avx-linux.c): Likewise.
6634
6635         * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
6636         (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
6637         (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
6638         (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
6639         (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
6640         i386/x32-avx-linux.xml.
6641
6642         * linux-x86-low.c (init_registers_x32_linux): New prototype.
6643         (init_registers_x32_avx_linux): Likwise.
6644         (x86_linux_update_xmltarget): Call init_registers_x32_linux
6645         or init_registers_x32_avx_linux if linux_is_elf64 is false.
6646
6647 2012-04-13  Pedro Alves  <palves@redhat.com>
6648
6649         * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
6650         (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
6651         (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
6652         (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
6653         the sub-make.
6654
6655 2012-04-12  H.J. Lu  <hongjiu.lu@intel.com>
6656
6657         * linux-x86-low.c (compat_x32_clock_t): New.
6658         (compat_x32_siginfo_t): Likewise.
6659         (compat_x32_siginfo_from_siginfo): Likewise.
6660         (siginfo_from_compat_x32_siginfo): Likewise.
6661         (linux_is_elf64): Likewise.
6662         (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
6663         and siginfo_from_compat_x32_siginfo for x32.
6664         (x86_arch_setup): Set linux_is_elf64.
6665
6666 2012-04-12  H.J. Lu  <hongjiu.lu@intel.com>
6667
6668         PR gdb/13969
6669         * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
6670         e_machine field.
6671         (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
6672         * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
6673         * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
6674         compatible with process.
6675
6676 2012-04-12  Yao Qi  <yao@codesourcery.com>
6677
6678         * Makefile.in: Define abs_top_srcdir and abs_srcdir.
6679         (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
6680         (install-only, install-info, clean): Handle sub dir gnulib.
6681         (all-lib, am--refresh): New targets.
6682         (memmem.o): Remove target.
6683         * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
6684         Invoke gl_EARLY.  Invoke AC_CHECK_PROGS for make.
6685         (AC_REPLACE_FUNCS): Remove memmem.
6686         Invoke gl_INIT and AM_INIT_AUTOMAKE.
6687         (AC_OUTPUT): Generate Makefile in gnulib/.
6688         * aclocal.m4, config.in, configure: Regenerated.
6689
6690 2012-04-10  Maciej W. Rozycki  <macro@codesourcery.com>
6691
6692         * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
6693
6694 2012-04-05  Pedro Alves  <palves@redhat.com>
6695
6696         -Werror=strict-aliasing
6697
6698         * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
6699         pointer.
6700
6701 2012-04-04  Pedro Alves  <palves@redhat.com>
6702
6703         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6704         (sparc_store_gregset_from_stack, sparc_store_gregset)
6705         (sparc_breakpoint_at): Fix formatting.
6706
6707 2012-03-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
6708
6709         * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
6710         are available.
6711         * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
6712         [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
6713         * config.in: Regenerate.
6714         * configure: Likewise.
6715
6716 2012-03-29  Pedro Alves  <palves@redhat.com>
6717
6718         * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
6719         Correct ptrace arguments.
6720
6721 2012-03-28  Pedro Alves  <palves@redhat.com>
6722
6723         * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
6724         (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
6725         (IA64_FR1_REGNUM): New defines.
6726         (ia64_fetch_register): New.
6727         (the_low_target): Install it.
6728         * linux-low.h (struct linux_target_ops) <fetch_register>: New
6729         field.
6730         * linux-low.c (linux_fetch_registers): Try the
6731         the_low_target.fetch_register hook first.
6732
6733         * linux-arm-low.c (the_low_target): Adjust.
6734         * linux-bfin-low.c (the_low_target): Adjust.
6735         * linux-cris-low.c (the_low_target): Adjust.
6736         * linux-crisv32-low.c (the_low_target): Adjust.
6737         * linux-m32r-low.c (the_low_target): Adjust.
6738         * linux-m68k-low.c (the_low_target): Adjust.
6739         * linux-mips-low.c (the_low_target): Adjust.
6740         * linux-ppc-low.c (the_low_target): Adjust.
6741         * linux-s390-low.c (the_low_target): Adjust.
6742         * linux-sh-low.c (the_low_target): Adjust.
6743         * linux-sparc-low.c (the_low_target): Adjust.
6744         * linux-tic6x-low.c (the_low_target): Adjust.
6745         * linux-x86-low.c (the_low_target): Adjust.
6746         * linux-xtensa-low.c (the_low_target): Adjust.
6747
6748 2012-03-26  Pedro Alves  <palves@redhat.com>
6749
6750         * server.c (handle_qxfer_libraries): Don't bail early if
6751         the_target->qxfer_libraries_svr4 is not NULL.
6752
6753 2012-03-26  Pedro Alves  <palves@redhat.com>
6754
6755         * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
6756
6757 2012-03-23  Pedro Alves  <palves@redhat.com>
6758
6759         * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
6760         "library-list-svr4" element's start tag when the the DSO list is
6761         empty.
6762
6763 2012-03-23  Pedro Alves  <palves@redhat.com>
6764
6765         * linux-low.c (read_one_ptr): Read the inferior's pointer through
6766         a variable whose type size is the same as the inferior's pointer
6767         size.
6768
6769 2012-03-21  Thomas Schwinge  <thomas@codesourcery.com>
6770
6771         * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
6772         struct siginfo.
6773         * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
6774         * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6775         * linux-low.h: Include <signal.h>.
6776         (struct siginfo): Remove forward declaration.
6777         (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
6778         struct siginfo.
6779
6780 2012-03-21  Mike Frysinger  <vapier@gentoo.org>
6781
6782         * .gitignore: Ignore more files.
6783
6784 2012-03-19  Pedro Alves  <palves@redhat.com>
6785             Jan Kratochvil  <jan.kratochvil@redhat.com>
6786
6787         * server.c (cont_thread, general_thread): Add describing comments.
6788         (start_inferior): Clear `cont_thread'.
6789         (handle_v_cont): Don't set `cont_thread' if resuming all threads
6790         of a process.
6791
6792 2012-03-15  Yao Qi  <yao@codesourcery.com>
6793
6794         * tracepoint.c (install_tracepoint): Move duplicated tracepoint
6795         handling to ...
6796         (cmd_qtdp): ... here.
6797
6798 2012-03-15  Yao Qi  <yao@codesourcery.com>
6799
6800         * tracepoint.c (struct tracepoint_action_ops): New.
6801         (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
6802         (m_tracepoint_action_download): New.
6803         (r_tracepoint_action_download): New.
6804         (x_tracepoint_action_download): New.
6805         (l_tracepoint_action_download): New.
6806         (add_tracepoint_action): Install `action->ops' according type.
6807         (download_tracepoint_1): Move code `download' function pointer
6808         of various tracepoint_action_ops.
6809
6810 2012-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
6811
6812         * linux-low.c (linux_attach_lwp_1): New variable buffer.  Call
6813         linux_ptrace_attach_warnings.
6814
6815 2012-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
6816
6817         * Makefile.in (linux-ptrace.o): New.
6818         * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
6819         (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
6820         (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
6821         (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
6822         (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
6823         of these targets.
6824         * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
6825
6826 2012-03-08  Yao Qi  <yao@codesourcery.com>
6827             Pedro Alves  <palves@redhat.com>
6828
6829         Fix PR server/13392.
6830         * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
6831         offset of JMP insn.
6832         * tracepoint.c (remove_tracepoint): New.
6833         (cmd_qtdp): Call remove_tracepoint when failed to install.
6834
6835 2012-03-07  Pedro Alves  <palves@redhat.com>
6836
6837         * linux-low.c (get_detach_signal): New.
6838         (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
6839         Pass on pending signals to PTRACE_DETACH.  Check the result of the
6840         ptrace call.
6841         * server.c (program_signals, program_signals_p): New.
6842         (handle_general_set): Handle QProgramSignals.
6843         * server.h (program_signals, program_signals_p): Declare.
6844
6845 2012-03-05  Pedro Alves  <palves@redhat.com>
6846             Jan Kratochvil  <jan.kratochvil@redhat.com>
6847
6848         * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
6849         New comment why.
6850
6851 2012-03-03  Yao Qi  <yao@codesourcery.com>
6852
6853         * tracepoint.c (tracepoint_look_up_symbols): Update call to
6854         agent_look_up_symbols.
6855
6856 2012-03-03  Yao Qi  <yao@codesourcery.com>
6857
6858         * Makefile.in (linux-low.o): Keep dependence on agent.h.
6859         (linux-x86-low.o): Likewise.
6860         * server.h: Remove in_process_agent_loaded.
6861         * tracepoint.c (in_process_agent_loaded): Removed.  Moved it
6862         common/agent.c.
6863         Update callers.
6864
6865 2012-03-03  Yao Qi  <yao@codesourcery.com>
6866
6867         * tracepoint.c (gdb_agent_capability): New global.
6868         (in_process_agent_loaded_ust): Renamed to
6869         `in_process_agent_supports_ust'.
6870         Update callers.
6871         (in_process_agent_supports_ust): Call agent_capability_check.
6872         (clear_installed_tracepoints): Assert that agent supports
6873         agent.
6874
6875 2012-03-03  Yao Qi  <yao@codesourcery.com>
6876
6877         * linux-low.c (linux_supports_agent): New.
6878         (linux_target_ops): Initialize field `supports_agent' with
6879         linux_supports_agent.
6880         * target.h (struct target_ops) <supports_agent>: New.
6881         (target_supports_agent): New macro.
6882         * server.c (handle_general_set): Handle packet 'QAgent'.
6883         (handle_query): Send `QAgent+'.
6884         * Makefile.in (server.o): Depends on agent.h.
6885
6886 2012-03-03  Yao Qi  <yao@codesourcery.com>
6887
6888         * Makefile.in (OBS): Add agent.o.
6889         Add new rule for agent.o.
6890         Track dependence of tracepoint.c on agent.h.
6891         * tracepoint.c (run_inferior_command_1):
6892         (run_inferior_command): Call agent_run_command.
6893         (gdb_ust_connect_sync_socket): Deleted.  Move it to
6894         common/agent.c.
6895         (resume_thread, stop_thread): Likewise.
6896         (gdb_ust_socket_init): Renamed to ...
6897         (gdb_agent_socket_init): ... New.
6898         (gdb_ust_thread): Renamed to ...
6899         (gdb_agent_helper_thread): ... New.
6900         (gdb_ust_init): Move some code to ...
6901         (gdb_agent_init): ... here.  New.
6902         [HAVE_UST]: Call gdb_ust_init.
6903         (initialize_tracepoint_ftlib):  Call gdb_agent_init.
6904         * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6905         * config.in, configure: Regenerated.
6906
6907 2012-03-02  Pedro Alves  <palves@redhat.com>
6908
6909         * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6910         * linux-low.c (struct simple_pid_list): New.
6911         (stopped_pids): New a struct simple_pid_list pointer.
6912         (add_to_pid_list, pull_pid_from_list): New.
6913         (handle_extended_wait): Don't assume the first signal new children
6914         report is SIGSTOP.  Adjust call to pull_pid_from_list.
6915         (linux_wait_for_lwp): Adjust.
6916
6917 2012-03-02  Yao Qi  <yao@codesourcery.com>
6918
6919         * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6920         debug log.
6921
6922 2012-03-02  Yao Qi  <yao@codesourcery.com>
6923
6924         * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6925         `stop_pc' and `tpoint'.  Update caller.
6926
6927 2012-03-01  Maciej W. Rozycki  <macro@codesourcery.com>
6928
6929         * linux-low.h (linux_target_ops): Add regset_bitmap member.
6930         * linux-low.c (use_linux_regsets): New macro.
6931         [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6932         [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6933         (linux_register_in_regsets): New function.
6934         (usr_fetch_inferior_registers): Skip registers covered by
6935         regsets.
6936         (usr_store_inferior_registers): Likewise.
6937         (usr_fetch_inferior_registers): New macro.
6938         (usr_store_inferior_registers): Likewise.
6939         (linux_fetch_registers): Handle mixed regset/non-regset targets.
6940         (linux_store_registers): Likewise.
6941         * linux-mips-low.c (init_registers_mips_dsp_linux): New
6942         prototype.
6943         (init_registers_mips64_dsp_linux): Likewise.
6944         (init_registers_mips_linux): New macro.
6945         (init_registers_mips_dsp_linux): Likewise.
6946         (mips_dsp_num_regs): Likewise.
6947         (DSP_BASE, DSP_CONTROL): New fallback macros.
6948         (mips_base_regs): New macro.
6949         (mips_regmap): Use it.  Fix the size.
6950         (mips_dsp_regmap): New variable.
6951         (mips_dsp_regset_bitmap): Likewise.
6952         (mips_arch_setup): New function.
6953         (mips_cannot_fetch_register): Use the_low_target.regmap rather
6954         than mips_regmap.
6955         (mips_cannot_store_register): Likewise.
6956         (the_low_target): Update .arch_setup, .num_regs and .regmap
6957         initializers.  Add .regset_bitmap initializer.
6958         * linux-arm-low.c (the_low_target): Add .regset_bitmap
6959         initializer.
6960         * linux-bfin-low.c (the_low_target): Likewise.
6961         * linux-cris-low.c (the_low_target): Likewise.
6962         * linux-crisv32-low.c (the_low_target): Likewise.
6963         * linux-ia64-low.c (the_low_target): Likewise.
6964         * linux-m32r-low.c (the_low_target): Likewise.
6965         * linux-m68k-low.c (the_low_target): Likewise.
6966         * linux-ppc-low.c (the_low_target): Likewise.
6967         * linux-s390-low.c (the_low_target): Likewise.
6968         * linux-sh-low.c (the_low_target): Likewise.
6969         * linux-sparc-low.c (the_low_target): Likewise.
6970         * linux-tic6x-low.c (the_low_target): Likewise.
6971         * linux-x86-low.c (the_low_target): Likewise.
6972         * linux-xtensa-low.c (the_low_target): Likewise.
6973         * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6974         mips64-dsp-linux.o to srv_regobj.  Add mips-dsp-linux.xml,
6975         mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6976         srv_xmlfiles.
6977         * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6978         (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6979
6980 2012-02-29  Yao Qi  <yao@codesourcery.com>
6981             Pedro Alves  <palves@redhat.com>
6982
6983         * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6984         `step_over_finished' is true.
6985
6986 2012-02-27  Pedro Alves  <palves@redhat.com>
6987
6988         * linux-low.c (pid_is_stopped): Delete, moved to common/.
6989         (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6990
6991 2012-02-27  Pedro Alves  <palves@redhat.com>
6992
6993         PR server/9684
6994         * linux-low.c (pid_is_stopped): New.
6995         (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6996
6997 2012-02-25  Luis Machado  <lgustavo@codesourcery.com>
6998
6999         * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
7000         of conditions.
7001
7002 2012-02-24  Maciej W. Rozycki  <macro@codesourcery.com>
7003
7004         * linux-mips-low.c (mips_regmap): Correct the index of $f9.
7005
7006 2012-02-24  Luis Machado  <lgustavo@codesourcery>
7007
7008         * server.c (handle_query): Advertise support for target-side
7009         breakpoint condition evaluation.
7010         (process_point_options): New function.
7011         (process_serial_event): When inserting a breakpoint, check for
7012         a target-side condition that should be evaluated.
7013
7014         * mem-break.c: Include regcache.h and ax.h.
7015         (point_cond_list_t): New data structure.
7016         (breakpoint) <cond_list>: New field.
7017         (find_gdb_breakpoint_at): Make non-static.
7018         (delete_gdb_breakpoint_at): Clear any target-side
7019         conditions.
7020         (clear_gdb_breakpoint_conditions): New function.
7021         (add_condition_to_breakpoint): Likewise.
7022         (add_breakpoint_condition): Likewise.
7023         (gdb_condition_true_at_breakpoint): Likewise.
7024         (gdb_breakpoint_here): Return result directly instead
7025         of going through a local variable.
7026
7027         * mem-break.h (find_gdb_breakpoint_at): New prototype.
7028         (clear_gdb_breakpoint_conditions): Likewise.
7029         (add_breakpoint_condition): Likewise.
7030         (gdb_condition_true_at_breakpoint): Likewise.
7031
7032         * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
7033         (need_step_over_p): Take target-side breakpoint condition into
7034         consideration.
7035
7036 2012-02-24  Luis Machado  <lgustavo@codesourcery>
7037
7038         * server.h: Include tracepoint.h.
7039         (agent_mem_read, agent_get_trace_state_variable_value,
7040         agent_set_trace_state_variable_value,
7041         agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
7042         get_set_tsv_func_addr): New prototypes.
7043
7044         * ax.h: New include file.
7045         * ax.c: New source file.
7046
7047         * tracepoint.c: Include ax.h.
7048         (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
7049         agent_expr, eval_result_type): Move to ax.h.
7050         (parse_agent_expr): Rename to ...
7051         (gdb_parse_agent_expr): ... this, make it non-static and move
7052         to ax.h.
7053         (unparse_agent_expr) Rename to ...
7054         (gdb_unparse_agent_expr): ... this, make it non-static and move
7055         to ax.h.
7056         (eval_agent_expr): Rename to ...
7057         (eval_tracepoint_agent_expr): ... this.
7058         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
7059         forward declarations.
7060         (add_tracepoint_action): Call gdb_parse_agent_expr (...).
7061         (agent_get_trace_state_variable_value): New function.
7062         (agent_set_trace_state_variable_value): New function.
7063         (cmd_qtdp): Call gdb_parse_agent_expr (...).
7064         (response_tracepoint): Call gdb_unparse_agent_expr (...).
7065         (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
7066         (condition_true_at_tracepoint): Likewise.
7067         (parse_agent_expr): Rename to ...
7068         (gdb_parse_agent_expr): ... this and move to ax.c.
7069         (unparse_agent_expr): Rename to ...
7070         (gdb_unparse_agent_expr): ... this and move to ax.c.
7071         (gdb_agent_op_name): Move to ax.c.
7072         (eval_agent_expr): Rename to ...
7073         (gdb_eval_agent_expr): ... this, use regcache passed as parameter
7074         and move to ax.c.
7075         (eval_tracepoint_agent_expr): New function.
7076         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
7077         non-static.
7078         (current_insn_ptr, emit_error, struct bytecode_address): Move to
7079         ax.c.
7080         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
7081         emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
7082         emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
7083         emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
7084         emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
7085         emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
7086         emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
7087         emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
7088         (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
7089         (compile_bytecodes): Remove forward declaration.
7090         (is_goto_target): Move to ax.c.
7091         (compile_bytecodes): Move to ax.c and call
7092         agent_get_trace_state_variable_value (...) and
7093         agent_set_trace_state_variable_value (...).
7094
7095         * Makefile.in: Update ax.c and IPA dependencies.
7096
7097 2012-02-24  Pedro Alves  <palves@redhat.com>
7098
7099         * tracepoint.c (cmd_bigqtbuffer): Rename as ...
7100         (cmd_bigqtbuffer_circular): ... this.  Only handle
7101         'QTBuffer:circular:'.
7102         (handle_tracepoint_general_set): Adjust.
7103
7104 2012-02-16  Yao Qi  <yao@codesourcery.com>
7105
7106         * inferiors.c: Move code to ...
7107         * dll.c: .... here.  New.
7108         * server.h: Declare clear_dlls.
7109         * Makefile.in (SFILES): Add dll.c.
7110         (OBS): Add dll.o
7111         (dll.o): New rule.
7112
7113 2012-02-11  Yao Qi  <yao@codesourcery.com>
7114
7115         * server.c: (handle_monitor_command): Add a new parameter
7116         `own_buf'.
7117         (handle_query): Update caller.
7118
7119 2012-02-09  Joel Brobecker  <brobecker@adacore.com>
7120
7121         * configure.ac: Add readlink to AC_CHECK_FUNCS list.
7122         * configure, config.in: Regenerate.
7123         * hostio.c: Provide an alternate implementation if HAVE_READLINK
7124         is not defined.
7125
7126 2012-02-02  Pedro Alves  <palves@redhat.com>
7127
7128         Try SIGKILL first, then PTRACE_KILL.
7129         * linux-low.c (linux_kill_one_lwp): New.
7130         (linux_kill_one_lwp): Rename to ...
7131         (kill_one_lwp_callback): ... this.  Use the new
7132         linux_kill_one_lwp.
7133
7134 2012-02-02  Pedro Alves  <palves@redhat.com>
7135
7136         * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
7137         inferior.
7138
7139 2012-01-27  Pedro Alves  <palves@redhat.com>
7140
7141         * linux-low.c (linux_child_pid_to_exec_file): Delete.
7142         (elf_64_file_p): Make static.
7143         (linux_pid_exe_is_elf_64_file): New.
7144         * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
7145         Delete declarations.
7146         (linux_pid_exe_is_elf_64_file): Declare.
7147         * linux-x86-low.c (x86_arch_setup): Use
7148         linux_pid_exe_is_elf_64_file.
7149
7150 2012-01-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
7151
7152         * linux-low.c (linux_wait_for_event_1): Rename to ...
7153         (linux_wait_for_event): ... here and merge it with former
7154         linux_wait_for_event - new variable wait_ptid, use it.
7155         (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
7156
7157 2012-01-23  Pedro Alves  <palves@redhat.com>
7158
7159         * server.c (main): Avoid yet another case of infinite loop while
7160         detaching/killing after a longjmp.
7161
7162 2012-01-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
7163
7164         Code cleanup.
7165         * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
7166
7167 2012-01-20  Ulrich Weigand  <ulrich.weigand@linaro.org>
7168
7169         * hostio.c (handle_readlink): New function.
7170         (handle_vFile): Call it to handle "vFile:readlink" packets.
7171
7172 2012-01-20  Pedro Alves  <palves@redhat.com>
7173             Ulrich Weigand  <ulrich.weigand@linaro.org>
7174
7175         * server.c (handle_v_requests): Only support vAttach and vRun to
7176         start multiple processes when in extended protocol mode.
7177
7178 2012-01-17  Pedro Alves  <palves@redhat.com>
7179
7180         * tracepoint.c (initialize_tracepoint): Use mmap instead of
7181         memalign plus mprotect to allocate the scratch buffer.
7182
7183 2012-01-13  Pedro Alves  <palves@redhat.com>
7184
7185         * server.c (attach_inferior): Clear `cont_thread'.
7186
7187 2012-01-13  Pedro Alves  <palves@redhat.com>
7188
7189         * server.c (main): Avoid infinite loop while detaching/killing
7190         after a longjmp.
7191
7192 2012-01-09  Doug Evans  <dje@google.com>
7193
7194         * server.c (start_inferior): Set last_ptid in --wrapper case.
7195
7196 2012-01-06  Yao Qi  <yao@codesourcery.com>
7197
7198         * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
7199         defined.
7200         [IN_PROCESS_AGENT] (debug_agent): New global variable.
7201
7202 2012-01-04  Yao Qi  <yao@codesourcery.com>
7203
7204         * tracepoint.c (cmd_qtdp): Print debug message
7205         for static tracepoint.
7206
7207 2012-01-04  Yao Qi  <yao@codesourcery.com>
7208
7209         * tracepoint.c (trace_vdebug): Differentiate debug message
7210         between gdbserver and IPA.
7211
7212 2012-01-03  Yao Qi  <yao@codesourcery.com>
7213
7214         * tracepoint.c (tracepoint_was_hit): Don't collect for
7215         static tracepoint.
7216
7217 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
7218
7219         * terminal.h: Reformat copyright header.
7220
7221 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
7222
7223         * server.c (gdbserver_version): Update copyright year.
7224         * gdbreplay.c (gdbreplay_version): Likewise.
7225
7226 2011-12-18  Jan Kratochvil  <jan.kratochvil@redhat.com>
7227
7228         * linux-low.c (linux_create_inferior): Put empty if clause for write.
7229
7230         Revert:
7231         2011-12-18  Hui Zhu  <teawater@gmail.com>
7232         * linux-low.c (linux_create_inferior): Save return value to ret.
7233
7234 2011-12-18  Hui Zhu  <teawater@gmail.com>
7235
7236         * linux-low.c (linux_create_inferior): Save return value to ret.
7237
7238 2011-12-16  Doug Evans  <dje@google.com>
7239
7240         * linux-low.c (linux_create_inferior): If stdio connection,
7241         redirect stdin from /dev/null, stdout to stderr.
7242         * remote-utils.c (remote_is_stdio): New static global.
7243         (remote_connection_is_stdio): New function.
7244         (remote_prepare): Handle stdio connection.
7245         (remote_open): Ditto.
7246         (remote_close): Don't close stdin for stdio connections.
7247         (read_prim,write_prim): New functions.  Replace all calls to
7248         read/write to these.
7249         * server.c (main): Watch for "-" argument.  Move call to
7250         remote_prepare before start_inferior.
7251         * server.h (STDIO_CONNECTION_NAME): New macro.
7252         (remote_connection_is_stdio): Declare.
7253
7254         * remote-utils.c (prepare_resume_reply): Remove extraneous \n
7255         in debugging output.
7256
7257 2011-12-15  Yao Qi  <yao@codesourcery.com>
7258
7259         * tracepoint.c: Include sys/syscall.h.
7260         (gdb_ust_thread): Remove preprocessor conditional.
7261
7262 2011-12-14  Pedro Alves  <pedro@codesourcery.com>
7263
7264         * linux-low.c (linux_detach_one_lwp): Call
7265         the_low_target.prepare_to_resume before detaching.
7266
7267 2011-12-14  Yao Qi  <yao@codesourcery.com>
7268
7269         * tracepoint.c (gdb_ust_thread): Don't ignore return value
7270         of write.
7271
7272 2011-12-14  Yao Qi  <yao@codesourcery.com>
7273
7274         * i386-low.c (i386_low_stopped_data_address): Initialize local
7275         variable `control'.
7276
7277 2011-12-13  Pedro Alves  <pedro@codesourcery.com>
7278
7279         PR remote/13492
7280
7281         * i386-low.c (i386_low_stopped_data_address): Avoid fetching
7282         DR_CONTROL unless necessary.  Extend comments.
7283         * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
7284         DR0-3 if not used.  If any watchpoint was set, clear DR_STATUS.
7285
7286 2011-12-13  Yao Qi  <yao@codesourcery.com>
7287
7288         * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
7289         macros.
7290         (upload_fast_traceframes, upload_fast_traceframes): Likewise.
7291
7292 2011-12-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
7293
7294         * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
7295         Print new debug message for such case.
7296
7297 2011-12-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
7298
7299         Fix overlapping memcpy.
7300         * mem-break.c (set_raw_breakpoint_at): New variable buf.  Use it for
7301         the read_inferior_memory transfer.
7302         (delete_fast_tracepoint_jump): New variable buf.  Use it for the
7303         write_inferior_memory transfer.
7304         (set_fast_tracepoint_jump): New variable buf.  Use it for the
7305         read_inferior_memory and write_inferior_memory transfers.
7306         (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
7307         (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
7308         Use it for the write_inferior_memory transfer.
7309         (check_mem_read, check_mem_write): New gdb_asserts for overlapping
7310         buffers.
7311
7312 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
7313
7314         * linux-low.c (fetch_register, store_register): Make code
7315         consistent, fix formatting.
7316
7317 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
7318
7319         * linux-low.c (usr_store_inferior_registers): Factor out code
7320         to handle individual registers into...
7321         (store_register): ... this new function.
7322
7323 2011-12-06  Ulrich Weigand  <uweigand@de.ibm.com>
7324
7325         * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
7326         (s390-linux32v2.o, s390-linux32v2.c): Likewise.
7327         (s390-linux64v1.o, s390-linux64v1.c): Likewise.
7328         (s390-linux64v2.o, s390-linux64v2.c): Likewise.
7329         (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
7330         (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
7331         * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
7332         (srv_xmlfiles): Add new XML files.
7333
7334         * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
7335         and <sys/uio.h>.
7336         (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
7337         (init_registers_s390_linux32v1): Add prototype.
7338         (init_registers_s390_linux32v2): Likewise.
7339         (init_registers_s390_linux64v1): Likewise.
7340         (init_registers_s390_linux64v2): Likewise.
7341         (init_registers_s390x_linux64v1): Likewise.
7342         (init_registers_s390x_linux64v2): Likewise.
7343         (s390_num_regs): Increment to 52.
7344         (s390_regmap): Add orig_r2 register.
7345         (s390_num_regs_3264): Increment to 68.
7346         (s390_regmap_3264): Add orig_r2 register.
7347         (s390_collect_ptrace_register): Handle orig_r2 register.
7348         (s390_supply_ptrace_register): Likewise.
7349         (s390_fill_last_break): New function.
7350         (s390_store_last_break): Likewise.
7351         (s390_fill_system_call): New function.
7352         (s390_store_system_call): Likewise.
7353         (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
7354         register sets.
7355         (s390_check_regset): New function.
7356         (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
7357         NT_S390_SYSTEM_CALL regsets and use appropriate description.
7358         Update target_regsets for available register sets.
7359
7360 2011-12-02  Paul Pluzhnikov  <ppluzhnikov@google.com>
7361             Jan Kratochvil  <jan.kratochvil@redhat.com>
7362
7363         * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
7364         (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
7365         New.
7366         (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
7367         * linux-low.h (struct process_info_private): New member r_debug.
7368         * server.c (handle_qxfer_libraries): Call
7369         the_target->qxfer_libraries_svr4.
7370         (handle_qxfer_libraries_svr4): New function.
7371         (qxfer_packets): New entry "libraries-svr4".
7372         (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
7373         * target.h (struct target_ops): New member qxfer_libraries_svr4.
7374         * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
7375         PACKET_qXfer_libraries_svr4.
7376
7377 2011-11-30  Ulrich Weigand  <uweigand@de.ibm.com>
7378
7379         * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
7380         PSW address/mask between 8-byte and 16-byte formats.
7381         (s390_supply_ptrace_register): Likewise.
7382         (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
7383         basic addressing mode bit.
7384
7385 2011-11-24  Stan Shebs  <stan@codesourcery.com>
7386
7387         * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
7388
7389 2011-11-17  Stan Shebs  <stan@codesourcery.com>
7390
7391         * tracepoint.c (struct tracepoint): New field traceframe_usage.
7392         (tracing_start_time): New global.
7393         (tracing_stop_time): New global.
7394         (tracing_user_name): New global.
7395         (tracing_notes): New global.
7396         (tracing_stop_note): New global.
7397         (cmd_qtstart): Set traceframe_usage, start_time.
7398         (stop_tracing): Set stop_time.
7399         (cmd_qtstatus): Report additional status.
7400         (cmd_qtp): New function.
7401         (handle_tracepoint_query): Call it.
7402         (cmd_qtnotes): New function.
7403         (handle_tracepoint_general_set): Call it.
7404         (get_timestamp): Rename from tsv_get_timestamp.
7405
7406 2011-11-14  Stan Shebs  <stan@codesourcery.com>
7407             Kwok Cheung Yeung  <kcy@codesourcery.com>
7408
7409         * linux-x86-low.c (small_jump_insn): New.
7410         (i386_install_fast_tracepoint_jump_pad): Add arguments for
7411         trampoline and error message, build a trampoline and issue a small
7412         jump instruction to it.
7413         (x86_install_fast_tracepoint_jump_pad): Add arguments for
7414         trampoline and error message.
7415         (x86_get_min_fast_tracepoint_insn_len): New.
7416         (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
7417         * linux-low.h (struct linux_target_ops): Add arguments to
7418         install_fast_tracepoint_jump_pad operation, add new operation.
7419         * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
7420         arguments.
7421         (linux_get_min_fast_tracepoint_insn_len): New function.
7422         (linux_target_op): Add new operation.
7423         * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
7424         (gdb_trampoline_buffer_end): Ditto.
7425         (gdb_trampoline_buffer_error): Ditto.
7426         (struct ipa_sym_addresses): Add fields for new IPA variables.
7427         (symbol_list): Add entries for new IPA variables.
7428         (struct tracepoint): Add fields to hold the address range of the
7429         trampoline used by the tracepoint.
7430         (trampoline_buffer_head): New static variable.
7431         (trampoline_buffer_tail): Ditto.
7432         (claim_trampoline_space): New function.
7433         (have_fast_tracepoint_trampoline_buffer): New function.
7434         (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
7435         structure.
7436         (install_fast_tracepoint): Ditto, also add error buffer argument.
7437         (cmd_qtminftpilen): New function.
7438         (handle_tracepoint_query): Add response to qTMinFTPILen packet.
7439         (fast_tracepoint_from_trampoline_address): New function.
7440         (fast_tracepoint_collecting): Handle trampoline as part of jump
7441         pad space.
7442         (set_trampoline_buffer_space): New function.
7443         (initialize_tracepoint): Initialize new IPA variables.
7444         * target.h (struct target_ops): Add arguments to
7445         install_fast_tracepoint_jump_pad operation, add new
7446         get_min_fast_tracepoint_insn_len operation.
7447         (target_get_min_fast_tracepoint_insn_len): New.
7448         (install_fast_tracepoint_jump_pad): Add arguments.
7449         * server.h (IPA_BUFSIZ): Define.
7450         * linux-i386-ipa.c: Include extra header files.
7451         (initialize_fast_tracepoint_trampoline_buffer): New function.
7452         (initialize_low_tracepoint): Call it.
7453         * server.h (set_trampoline_buffer_space): Declare.
7454         (claim_trampoline_space): Ditto.
7455         (have_fast_tracepoint_trampoline_buffer): Ditto.
7456
7457 2011-11-14  Yao Qi  <yao@codesourcery.com>
7458
7459         * server.c (handle_query): Handle InstallInTrace for qSupported.
7460         * tracepoint.c (add_tracepoint): Sort list.
7461         (install_tracepoint, download_tracepoint): New.
7462         (cmd_qtdp): Call them to install and download tracepoints.
7463         (sort_tracepoints): Removed.
7464         (cmd_qtstart): Update.
7465
7466 2011-11-14  Yao Qi  <yao@codesourcery.com>
7467
7468         * mem-break.c (inc_ref_fast_tracepoint_jump): New.
7469         * mem-break.h: Declare.
7470         * tracepoint.c (cmd_qtstart): Move some code to ...
7471         (clone_fast_tracepoint, install_fast_tracepoint): ... here.
7472         New.
7473         (download_tracepoints): Move some code to ...
7474         (download_tracepoint_1): ... here.  New.
7475
7476 2011-11-08  Yao Qi  <yao@codesourcery.com>
7477
7478         * remote-utils.c (relocate_instruction): A comment fix.
7479
7480 2011-11-07  Joel Brobecker  <brobecker@adacore.com>
7481
7482         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
7483         (i386_dr_low_get_control, i386_dr_low_get_status): Use
7484         dr_status_mirror and dr_control_mirror from debug_reg_state.
7485         (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
7486         (i386_initial_stuff): Remove use of deleted globals.
7487         (i386_get_thread_context, i386_set_thread_context,
7488         i386_thread_added): Use dr_status_mirror and dr_control_mirror
7489         from debug_reg_state.
7490
7491 2011-11-05  Yao Qi  <yao@codesourcery.com>
7492
7493         * tracepoint.c (gdb_collect): Loop over tracepoints of same
7494         address as TPOINT's.
7495
7496 2011-11-02  Stan Shebs  <stan@codesourcery.com>
7497
7498         * tracepoint.c (agent_mem_read_string): New function.
7499         (eval_agent_expr): Call it for tracenz.
7500         * server.c (handle_query): Report support for tracenz.
7501
7502 2011-11-02  Yao Qi  <yao@codesourcery.com>
7503
7504         * tracepoint.c (cmd_qtstart): Remove unused local variables.
7505
7506 2011-11-02  Yao Qi  <yao@codesourcery.com>
7507
7508         * target.h: Fix a typo in comment.
7509
7510 2011-10-31  Pedro Alves  <pedro@codesourcery.com>
7511
7512         * mem-break.c (check_mem_write): Add `myaddr' parameter.  Don't
7513         clobber the breakpoints' shadows with fast tracepoint jumps.
7514         * mem-break.h (check_mem_write): Add `myaddr' parameter.
7515         * target.c (write_inferior_memory): Also pass MYADDR down to
7516         check_mem_write.
7517
7518 2011-10-07  Ulrich Weigand  <ulrich.weigand@linaro.org>
7519
7520         * configure.ac: Check support for personality routine.
7521         * configure: Regenerate.
7522         * config.in: Likewise.
7523         * linux-low.c: Include <sys/personality.h>.
7524         Define ADDR_NO_RANDOMIZE if necessary.
7525         (linux_create_inferior): Disable address space randomization when
7526         forking inferior, if requested.
7527         (linux_supports_disable_randomization): New function.
7528         (linux_target_ops): Install it.
7529         * server.h (disable_randomization): Declare.
7530         * server.c (disable_randomization): New global variable.
7531         (handle_general_set): Handle QDisableRandomization.
7532         (handle_query): Likewise for qSupported.
7533         (main): Support --disable-randomization and --no-disable-randomization
7534         command line arguments.
7535         * target.h (struct target_ops): Add supports_disable_randomization.
7536         (target_supports_disable_randomization): New macro.
7537
7538 2011-09-29  Mike Frysinger  <vapier@gentoo.org>
7539
7540         * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
7541         ifdef check.
7542         [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
7543         [!PT_GETDSBT] (target_loadmap): New definition.
7544         (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
7545         (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
7546         LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
7547         and PT_GETDSBT to LINUX_LOADMAP.
7548         [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
7549         (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
7550
7551 2011-09-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
7552
7553         * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
7554         (arm_linux_hwbp_cap): New static variable.
7555         (arm_linux_get_hwbp_cap): Replace by ...
7556         (arm_linux_init_hwbp_cap): ... this new function.
7557         (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
7558         (arm_linux_get_hw_watchpoint_count): Likewise.
7559         (arm_linux_get_hw_watchpoint_max_length): Likewise.
7560         (arm_arch_setup): Call arm_linux_init_hwbp_cap.
7561         (arm_prepare_to_resume): Use perror_with_name instead of error.
7562
7563 2011-09-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
7564
7565         * linux-arm-low.c: Include <signal.h>.
7566         (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
7567         (struct arm_linux_hwbp_cap): New data type.
7568         (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
7569         (struct arm_linux_hw_breakpoint): New data type.
7570         (MAX_BPTS, MAX_WPTS): Define.
7571         (struct arch_process_info, struct arch_lwp_info): New data types.
7572         (arm_linux_get_hwbp_cap): New function.
7573         (arm_linux_get_hw_breakpoint_count): Likewise.
7574         (arm_linux_get_hw_watchpoint_count): Likewise.
7575         (arm_linux_get_hw_watchpoint_max_length): Likewise.
7576         (arm_hwbp_control_initialize): Likewise.
7577         (arm_hwbp_control_is_enabled): Likewise.
7578         (arm_hwbp_control_is_initialized): Likewise.
7579         (arm_hwbp_control_disable): Likewise.
7580         (arm_linux_hw_breakpoint_equal): Likewise.
7581         (arm_linux_hw_point_initialize): Likewise.
7582         (struct update_registers_data): New data structure.
7583         (update_registers_callback: New function.
7584         (arm_insert_point): Likewise.
7585         (arm_remove_point): Likewise.
7586         (arm_stopped_by_watchpoint): Likewise.
7587         (arm_stopped_data_address): Likewise.
7588         (arm_new_process): Likewise.
7589         (arm_new_thread): Likewise.
7590         (arm_prepare_to_resume): Likewise.
7591         (the_low_target): Register arm_insert_point, arm_remove_point,
7592         arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
7593         arm_new_thread, and arm_prepare_to_resume.
7594
7595 2011-09-15  Stan Shebs  <stan@codesourcery.com>
7596
7597         * server.h (struct emit_ops): Add compare-goto fields.
7598         * tracepoint.c (gdb_agent_op_sizes): New table.
7599         (emit_eq_goto): New function.
7600         (emit_ne_goto): New function.
7601         (emit_lt_goto): New function.
7602         (emit_le_goto): New function.
7603         (emit_gt_goto): New function.
7604         (emit_ge_goto): New function.
7605         (is_goto_target): New function.
7606         (compile_bytecodes): Recognize special cases of compare-goto
7607         combinations and call specialized emitters for them.
7608         * linux-x86-low.c (amd64_emit_eq_goto): New function.
7609         (amd64_emit_ne_goto): New function.
7610         (amd64_emit_lt_goto): New function.
7611         (amd64_emit_le_goto): New function.
7612         (amd64_emit_gt_goto): New function.
7613         (amd64_emit_ge_goto): New function.
7614         (amd64_emit_ops): Add the new functions.
7615         (i386_emit_eq_goto): New function.
7616         (i386_emit_ne_goto): New function.
7617         (i386_emit_lt_goto): New function.
7618         (i386_emit_le_goto): New function.
7619         (i386_emit_gt_goto): New function.
7620         (i386_emit_ge_goto): New function.
7621         (i386_emit_ops): Add the new functions.
7622
7623 2011-09-08  Stan Shebs  <stan@codesourcery.com>
7624
7625         * linux-x86-low.c (i386_emit_prologue): Save %ebx.
7626         (i386_emit_epilogue): Restore %ebx.
7627
7628 2011-08-31  Jie Zhang  <jzhang918@gmail.com>
7629
7630         * server.c (step_thread): Remove definition.
7631         (process_serial_event): Don't handle Hs.
7632         * server.h (step_thread): Remove declaration.
7633         * target.c (set_desired_inferior): Remove use of step_thread.
7634
7635 2011-08-24  Luis Machado  <lgustavo@codesourcery.com>
7636
7637         * linux-low.c: Include linux-procfs.h.
7638         (linux_attach_lwp_1): Update comments.
7639         (linux_attach): Scan for existing threads when attaching to a
7640         process that is the tgid.
7641         * Makefile.in: Update dependencies.
7642
7643 2011-08-24  Luis Machado  <lgustavo@codesourcery.com>
7644
7645         * configure.srv: Add linux-procfs.o dependencies.
7646
7647 2011-08-14  Yao Qi  <yao@codesourcery.com>
7648
7649         * target.h (struct target_ops): Fix indent.
7650         * win32-low.c (win32_target_ops): Fix comment.
7651
7652 2011-08-14  Andrew Jenner  <andrew@codesourcery.com>
7653             Yao Qi  <yao@codesourcery.com>
7654
7655         * Makefile.in (clean): Remove tic6x-*.c files.
7656         (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
7657         (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
7658         (tic6x-c64xp-linux.c): Likewise.
7659         * configure.srv: Add support for tic6x-*-uclinux.
7660         * linux-tic6x-low.c: New.
7661         * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
7662
7663 2011-08-14  Andrew Stubbs <ams@codesourcery.com>
7664             Yao Qi  <yao@codesourcery.com>
7665
7666         * target.h (struct target_ops): Add read_loadmap.
7667         * linux-low.c (struct target_loadseg): New type.
7668         (struct target_loadmap): New type.
7669         (linux_read_loadmap): New function.
7670         (linux_target_ops): Add linux_read_loadmap.
7671         * server.c (handle_query): Support qXfer:fdpic:read packet.
7672         * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
7673         to NULL.
7674
7675 2011-08-05  Eli Zaretskii  <eliz@gnu.org>
7676
7677         * win32-low.c: Include <stdint.h>.
7678
7679 2011-07-22  Pedro Alves  <pedro@codesourcery.com>
7680
7681         * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
7682         to the inferior here.
7683         (i386_remove_aligned_watchpoint): Ditto.
7684         (i386_handle_nonaligned_watchpoint): Return immediate on fail to
7685         fit part of the watchpoint in the debug registers.
7686         (i386_update_inferior_debug_regs): New.
7687         (i386_low_insert_watchpoint): Work on a local mirror of the debug
7688         registers, and only update the inferior on success.
7689         (i386_low_remove_watchpoint): Ditto.
7690
7691 2011-07-22  Kwok Cheung Yeung  <kcy@codesourcery.com>
7692
7693         * linux-low.c (compare_ints, unique, list_threads, show_process,
7694         linux_core_of_thread): Delete.
7695         (linux_target_ops): Change linux_core_of_thread to
7696         linux_common_core_of_thread.
7697         (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
7698         * utils.c (malloc_failure): Change type of argument.
7699         (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
7700         * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
7701         common/linux-osdata.c, common/ptid.c and common/buffer.c.
7702         (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
7703         (IPA_OBJS): Add common-utils-ipa.o.
7704         (ptid_h, linux_osdata_h): New macros.
7705         (server_h): Add common/common-utils.h, common/xml-utils.h,
7706         common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
7707         common/ptid.h.
7708         (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
7709         ptid.o, buffer.o): New rules.
7710         (linux-low.o): Add common/linux-osdata.h as a dependency.
7711         * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
7712         * configure.ac: Add AC_HEADER_DIRENT check.
7713         * config.in: Regenerate.
7714         * configure: Regenerate.
7715         * remote-utils.c (xml_escape_text): Delete.
7716         (buffer_grow, buffer_free, buffer_init, buffer_finish,
7717         buffer_xml_printf): Move to common/buffer.c.
7718         * server.c (main): Remove call to initialize_inferiors.
7719         * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
7720         ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
7721         ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
7722         internal_error, gdb_assert, gdb_assert_fail): Delete.
7723         (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
7724         buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
7725         common/buffer.h.
7726         * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
7727         ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
7728         initialize_inferiors): Delete.
7729
7730 2011-07-20  Pedro Alves  <pedro@codesourcery.com>
7731
7732         * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
7733         symbol error.
7734
7735 2011-05-31  Pedro Alves  <pedro@codesourcery.com>
7736
7737         * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
7738         assertion.
7739         * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
7740
7741 2011-05-26  Yao Qi  <yao@codesourcery.com>
7742
7743         * Makefile.in (thread-db.o): Track dependence to
7744         common/gdb_thread_db.h.
7745         * thread-db.c: include gdb_thread_db.h from right place.
7746
7747 2011-05-16  Adrian Cornish  <gnu@bluedreamer.com>
7748
7749         * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
7750         __FILE__ and __LINE__ to internal_error.
7751
7752 2011-05-13  Doug Evans  <dje@google.com>
7753
7754         * thread-db.c (try_thread_db_load_from_sdir): New function.
7755         (try_thread_db_load_from_dir): New function.
7756         (thread_db_load_search): Handle $sdir, ignore $pdir.
7757         Remove trying of system directories if search of
7758         libthread-db-search-path fails, that is now done via $sdir.
7759
7760 2011-05-12  Kwok Cheung Yeung  <kcy@codesourcery.com>
7761
7762         * server.c (handle_query): Add EnableDisableTracepoints to the list
7763         of supported features.
7764         * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
7765         tracepoints.
7766         (cmd_qtenable_disable): New.
7767         (cmd_qtstart): Install tracepoints even if disabled.
7768         (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
7769         receiving a QTEnable or QTDisable packet.
7770         (gdb_collect): Skip data collection if fast tracepoint is disabled.
7771         (ust_marker_to_static_tracepoint): Do not ignore disabled static
7772         tracepoints.
7773         (gdb_probe): Skip data collection if static tracepoint is disabled.
7774
7775 2011-05-10  Doug Evans  <dje@google.com>
7776
7777         * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
7778
7779 2011-05-04  Doug Evans  <dje@google.com>
7780
7781         * linux-low.c (linux_join): Skip process lookup.
7782         * spu-low.c (spu_join): Ditto.
7783         * server.c (join_inferiors_callback): Delete.
7784         (process_serial_event): For 'D' packet (detach) call join_inferior
7785         directly.
7786
7787 2011-05-04  Joseph Myers  <joseph@codesourcery.com>
7788
7789         * README: Don't mention xscale*-*-linux*.
7790         * configure.srv (xscale*-*-linux*): Don't handle target.
7791
7792 2011-04-27  Nathan Froyd  <froydnj@codesourcery.com>
7793
7794         * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
7795         casting pointers.
7796         (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
7797         (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
7798         (i386_emit_void_call_2): Likewise.
7799
7800 2011-04-26  Yao Qi  <yao@codesourcery.com>
7801
7802         * linux-low.c: Move common macros to linux-ptrace.h.
7803         Include linux-ptrace.h.
7804         * Makefile.in (linux_ptrace_h): New.
7805         (linux-low.o): Depends on linux-ptrace.h.
7806
7807 2011-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
7808
7809         * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
7810         RUN_ONCE.  Comment for the LISTEN_DESC delete_file_handler call.
7811         (remote_prepare): New function with most of the TCP code from ...
7812         (remote_open): ... here.  Detect PORT here unconditionally.  Move also
7813         setting transport_is_reliable.
7814         * server.c (run_once): New variable.
7815         (gdbserver_usage): Document it.
7816         (main): Set run_once for `--once'.  Call remote_prepare.  Exit after
7817         the first run if RUN_ONCE.
7818         * server.h (run_once, remote_prepare): New declarations.
7819
7820 2011-04-19  Tom Tromey  <tromey@redhat.com>
7821
7822         * win32-low.c (handle_load_dll): Remove duplicate "the".
7823
7824 2011-04-07  Pierre Muller  <muller@ics.u-strasbg.fr>
7825
7826         Remove support for old Cygwin 1.5 versions.
7827         * win32-low.c (win32_create_inferior): Use new cygwin_path_list
7828         function to avoid warning.
7829         (win32_add_one_solib): Use cygwin_conv_path function to avoid
7830         warning.
7831
7832 2011-03-18  Pierre Muller  <muller@ics.u-strasbg.fr>
7833
7834         * gdbserver/server.h (Macro _): Define it if not available.
7835
7836 2011-03-14  Michael Snyder  <msnyder@vmware.com>
7837
7838         * hostio.c (handle_close): Remove unnecessary null test.
7839
7840 2011-03-10  Joel Brobecker  <brobecker@adacore.com>
7841
7842         * Makefile.in (maintainer-clean realclean distclean): Remove
7843         "make ...  subdir_do" command.
7844
7845 2011-03-10  Michael Snyder  <msnyder@vmware.com>
7846
7847         * tracepoint.c (tracepoint_finish_step): Fix loop variable.
7848
7849         * server.c (handle_v_run): Free alloced buffer on early return.
7850
7851 2011-03-09  Yao Qi  <yao@codesourcery.com>
7852
7853         Revert:
7854         2011-03-04  Yao Qi  <yao@codesourcery.com>
7855
7856         * Makefile.in: Remove GNU make feature --directory.
7857
7858         2011-03-05  Yao Qi  <yao@codesourcery.com>
7859
7860         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7861         (subdir_do): New make target.  Copied from gdb/Makefile.
7862         (maintainer-clean, realclean, distclean, clean): Call corresponding
7863         make targets in common/Makefile.
7864
7865         2011-02-11  Yao Qi  <yao@codesourcery.com>
7866
7867         * configure.ac: Call AC_PROG_RANLIB.
7868         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
7869         * configure: Regenerate.
7870
7871 2011-03-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
7872
7873         * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
7874
7875 2011-03-06  Yao Qi  <yao@codesourcery.com>
7876
7877         * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
7878
7879 2011-03-05  Yao Qi  <yao@codesourcery.com>
7880
7881         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7882         (subdir_do): New make target.  Copied from gdb/Makefile.
7883         (maintainer-clean, realclean, distclean, clean): Call corresponding
7884         make targets in common/Makefile.
7885
7886 2011-03-04  Yao Qi  <yao@codesourcery.com>
7887
7888         * Makefile.in: Remove GNU make feature --directory.
7889
7890 2011-03-04  Michael Snyder  <msnyder@vmware.com>
7891
7892         * server.c (queue_stop_reply): Call xmalloc not malloc.
7893
7894 2011-03-02  Michael Snyder  <msnyder@vmware.com>
7895
7896         * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7897
7898 2011-02-28  Michael Snyder  <msnyder@vmware.com>
7899
7900         * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7901         (cmd_qtframe): Ditto.
7902         (cmd_qtbuffer): Ditto.
7903         (cmd_bigqtbuffer): Ditto.
7904
7905         * utils.c (decimal2str): Initialize 'width' to nine, then
7906         don't mess with it.
7907
7908 2011-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
7909
7910         * hostio.c (require_data): Free *data, not data.
7911
7912 2011-02-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
7913
7914         * hostio.c (require_data): Use free, not xfree.
7915
7916 2011-02-27  Michael Snyder  <msnyder@vmware.com>
7917
7918         * server.c (handle_query): Discard unused value.
7919
7920         * hostio.c (require_data): Free malloc memory before returning
7921         error.
7922
7923 2011-02-26  Michael Snyder  <msnyder@vmware.com>
7924
7925         * linux-low.c (list_threads): Call closedir for dirent.
7926
7927 2011-02-27  Michael Snyder  <msnyder@vmware.com>
7928
7929         * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7930         a case statement falls through.
7931
7932         * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7933
7934         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7935         in comparison.
7936
7937 2011-02-26  Michael Snyder  <msnyder@vmware.com>
7938
7939         * utils.c (decimal2str): Eliminate dead code and dead param.
7940         (pulongest): Drop dead param from call to decimal2str.
7941         (plongest): Ditto.
7942
7943 2011-02-24  Joel Brobecker  <brobecker@adacore.com>
7944
7945         Revert the following patch (not approved yet):
7946         2011-02-21  Hui Zhu  <teawater@gmail.com>
7947         * tracepoint.c (tp_printf): New function.
7948         (eval_agent_expr): Handle gdb_agent_op_printf.
7949
7950 2011-02-21  Hui Zhu  <teawater@gmail.com>
7951
7952         * tracepoint.c (tp_printf): New function.
7953         (eval_agent_expr): Handle gdb_agent_op_printf.
7954
7955 2011-02-18  Tom Tromey  <tromey@redhat.com>
7956
7957         * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7958         (tracepoint.o): Likewise.
7959         * tracepoint.c (enum gdb_agent_op): Use ax.def.
7960         (gdb_agent_op_names): Likewise.
7961
7962 2011-02-18  Tom Tromey  <tromey@redhat.com>
7963
7964         * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7965         gdb_agent_op_rot>: New constants.
7966         (gdb_agent_op_names): Add pick and roll.
7967         (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7968         cases.
7969
7970 2011-02-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
7971
7972         * aclocal.m4: Regenerated with aclocal-1.11.1.
7973
7974 2011-02-14  Pedro Alves  <pedro@codesourcery.com>
7975
7976         * server.c (handle_qxfer_traceframe_info): New.
7977         (qxfer_packets): Register "traceframe-info".
7978         (handle_query): Report support for qXfer:traceframe-info:read+.
7979         * tracepoint.c (match_blocktype): New.
7980         (traceframe_find_block_type): Rename to ...
7981         (traceframe_walk_blocks): ... this.  Add callback filter argument,
7982         and use it.
7983         (traceframe_find_block_type): New, reimplemented on top of
7984         traceframe_walk_blocks.
7985         (build_traceframe_info_xml): New.
7986         (traceframe_read_info): New.
7987         * server.h (traceframe_read_info): Declare.
7988
7989 2011-02-11  Yao Qi  <yao@codesourcery.com>
7990
7991         * configure.ac: Call AC_PROG_RANLIB.
7992         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
7993         * configure: Regenerate.
7994
7995 2011-02-07  Pedro Alves  <pedro@codesourcery.com>
7996
7997         * server.c (gdb_read_memory): Change return semantics to allow
7998         partial transfers.
7999         (handle_search_memory_1): Adjust.
8000         (process_serial_event) <'m' packet>: Handle partial transfers.
8001         * tracepoint.c (traceframe_read_mem): Handle partial transfers.
8002
8003 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
8004
8005         * regcache.c (init_register_cache): Initialize
8006         regcache->register_status.
8007         (free_register_cache): Release regcache->register_status.
8008         (regcache_cpy): Copy register_status.
8009         (registers_to_string): Print 'x's for unavailable registers.
8010         (supply_register): Mark the register's status valid or
8011         unavailable, depending on whether a buffer was passed in or not.
8012         (supply_register_zeroed): New.
8013         (supply_regblock): Mark the registers' status valid or
8014         unavailable, depending on whether a buffer was passed in or not.
8015         * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
8016         (struct regcache): New `register_status' field.
8017         (supply_register_zeroed): Declare.
8018         * i387-fp.c (i387_xsave_to_cache): Zero out registers using
8019         supply_register_zeroed, rather than passing a NULL buffer to
8020         supply_register.
8021         * tracepoint.c (fetch_traceframe_registers): Update comment.
8022
8023 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
8024
8025         * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
8026         buffer explicit.
8027
8028 2011-01-25  Pedro Alves  <pedro@codesourcery.com>
8029
8030         * server.h (decode_xfer_write): Change prototype.
8031         * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
8032         and don't extract the annex here.
8033         * server.c (decode_xfer_read): Remove `annex' parameter,
8034         and don't extract the annex here.
8035         (decode_xfer): New.
8036         (struct qxfer): New.
8037         (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
8038         (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
8039         (handle_qxfer_statictrace): New functions, abstracted out from
8040         handle_query, and made to use the struct qxfer interface.
8041         (handle_threads_qxfer_proper): Rename to ...
8042         (handle_qxfer_threads_proper): ... this.
8043         (handle_threads_qxfer): Rename to ...
8044         (handle_qxfer_threads): ... this.  Adjust.
8045         (qxfer_packets): New array.
8046         (handle_qxfer): New function.
8047         (handle_query): Use handle_qxfer.
8048
8049 2011-01-05  Michael Snyder  <msnyder@msnyder-server.eng.vmware.com>
8050
8051         * gdbreplay.c: Shorten lines of >= 80 columns.
8052         * linux-low.c: Ditto.
8053         * linux-ppc-low.c: Ditto.
8054         * linux-s390-low.c: Ditto.
8055         * linux-sparc-low.c: Ditto.
8056         * linux-x86-low.c: Ditto.
8057         * linux-xtensa-low.c: Ditto.
8058         * mem-break.c: Ditto.
8059         * nto-low.c: Ditto.
8060         * regcache.h: Ditto.
8061         * remote-utils.c: Ditto.
8062         * server.c: Ditto.
8063         * server.h: Ditto.
8064         * thread-db.c: Ditto.
8065         * tracepoint.c: Ditto.
8066         * utils.c: Ditto.
8067         * win32-low.h: Ditto.
8068
8069 2011-01-05  Joel Brobecker  <brobecker@adacore.com>
8070
8071         * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
8072         update.
8073
8074 2011-01-01  Joel Brobecker  <brobecker@adacore.com>
8075
8076         * server.c (gdbserver_version): Update copyright year in version
8077         output.
8078         * gdbreplay.c (gdbreplay_version): Ditto.
8079
8080 2010-12-29  Jie Zhang  <jie.zhang@analog.com>
8081
8082         * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
8083         * linux-bfin-low.c: New file.
8084         * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
8085         PT_DATA_ADDR for BFIN targets.
8086         * Makefile.in (SFILES): Add linux-bfin-low.c.
8087         (clean): Remove reg-bfin.c.
8088         (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
8089         * README: Mention supported Blackfin targets.
8090
8091 2010-12-23  Mike Frysinger  <vapier@gentoo.org>
8092
8093         * .gitignore: New file.
8094
8095 2010-11-16  Mike Frysinger  <vapier@gentoo.org>
8096
8097         * linux-low.c (linux_tracefork_child): Add char* cast to arg.
8098
8099 2010-10-22  Jie Zhang  <jie@codesourcery.com>
8100
8101         * Makefile.in: Add FLAGS_TO_PASS variable.
8102         (install): Remove dependency of install-only and recursively
8103         invoke make for install-only.
8104
8105 2010-10-04  Doug Evans  <dje@google.com>
8106
8107         * Makefile.in (uninstall): Use $(DESTDIR).
8108
8109 2010-09-24  Pedro Alves  <pedro@codesourcery.com>
8110
8111         PR gdb/11842
8112
8113         * linux-x86-low.c (compat_siginfo_from_siginfo)
8114         (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
8115         si_code is < 0.  Check for si_code == SI_TIMER before checking for
8116         si_code < 0.
8117
8118 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
8119
8120         * lynx-i386-low.c: New file.
8121         * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
8122
8123 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
8124
8125         * lynx-low.c (ptrace_request_to_str): Remove handling for
8126         request values that have been removed in LynxOS 5.x.
8127
8128 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
8129
8130         * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
8131         <ptrace.h>
8132
8133 2010-09-09  Nathan Sidwell  <nathan@codesourcery.com>
8134
8135         * configure.ac: Add --enable-inprocess-agent option.
8136         * configure: Rebuilt.
8137
8138 2010-09-06  Yao Qi  <yao@codesourcery.com>
8139
8140         * linux-low.c (linux_kill): Remove unused variable.
8141         (linux_stabilize_threads): Likewise.
8142         * server.c (start_inferior): Likewise.
8143         (queue_stop_reply_callback): Likewise.
8144         * tracepoint.c (do_action_at_tracepoint): Likewise.
8145
8146 2010-09-06  Yao Qi  <yao@codesourcery.com>
8147
8148         * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
8149         on return.
8150
8151 2010-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
8152
8153         * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
8154
8155 2010-09-06  Pedro Alves  <pedro@codesourcery.com>
8156
8157         * Makefile.in (install-only): Replace $IPA_DEPFILES with
8158         "$(IPA_DEPFILES)".
8159
8160 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
8161
8162         * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
8163         gdbserver/lynx-ppc-low.c: New files.
8164         * Makefile.in (lynx_low_h): New variable.
8165         (lynx-low.o, lynx-ppc-low.o): New rules.
8166         * configure.ac: On LynxOS, link with -lnetinet.
8167         * configure.srv: Add handling of powerpc-*-lynxos* targets.
8168         * configure: regenerate.
8169
8170 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
8171
8172         * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
8173         * configure.ac: Add check for vasprintf and vsnprintf.
8174         * configure, config.in: Regenerate.
8175         * server.h (vasprintf, vsnprintf): Add conditional declarations.
8176
8177 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
8178
8179         * gdbreplay.c: Move include of alloca.h up, next to include of
8180         malloc.h.
8181         * server.h: Add include of malloc.h.
8182         * mem-break.c: Remove include of malloc.h.
8183         * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
8184
8185 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
8186
8187         * Makefile.in (memmem.o): Build with -Wno-error.
8188
8189 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
8190
8191         * utils.c (xsnprintf): Make non-static.
8192         * server.h: Add xsnprintf declaration.
8193         * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
8194         replace calls to snprintf by calls to xsnprintf throughout.
8195
8196 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
8197
8198         * configure.ac: Add configure check for alloca.
8199         * configure, config.in: Regenerate.
8200         * server.h: Include alloca.h if it exists.
8201         * gdbreplay.c: Include alloca.h if it exists.
8202
8203 2010-08-28  Pedro Alves  <pedro@codesourcery.com>
8204
8205         * linux-low.c (__SIGRTMIN): Define if not already defined.
8206         (linux_create_inferior): Check for __ANDROID__ rather than
8207         __SIGRTMIN.
8208         (enqueue_one_deferred_signal): Don't requeue non-RT signals that
8209         are already deferred.
8210         (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
8211         (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
8212         stopped and already has a pending signal to report.
8213         (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
8214         a pending signal to report or is moving out of a jump pad.
8215         (linux_init_signals): Check for __ANDROID__ rather than
8216         __SIGRTMIN.
8217
8218 2010-08-28  Pedro Alves  <pedro@codesourcery.com>
8219
8220         * linux-low.c (linux_stabilize_threads): Wrap debug output in a
8221         debug_threads check.  Avoid a linear search when not doing debug
8222         output.
8223
8224 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
8225
8226         * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
8227         (struct gdb_event) <fd>: Change type to gdb_fildes_t.
8228         (struct file_handler) <fd>: Change type to gdb_fildes_t.
8229         (process_event): Change local fd's type to gdb_fildes_t.
8230         (create_file_handler): Adjust prototype.
8231         (delete_file_handler): Adjust prototype.
8232         (handle_file_event): Adjust prototype.  Use pfildes.
8233         (create_file_event): Adjsut prototype.
8234         * remote-utils.c (remote_desc, listen_desc): Change type to
8235         gdb_fildes_t.
8236         * server.h: New gdb_fildes_t typedef.
8237         [USE_WIN32API]: Include winsock2.h.
8238         (delete_file_handler, add_file_handler): Adjust prototypes.
8239         (pfildes): Declare.
8240         * utils.c (pfildes): New.
8241
8242 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
8243
8244         * configure.ac (build_warnings): Add -Wno-char-subscripts.
8245         * configure: Regenerate.
8246
8247 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
8248
8249         * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
8250         (linux_done_accessing_memory): ... this.
8251         (linux_target_ops): Adjust.
8252         * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
8253         * nto-low.c (nto_target_ops): Adjust comment.
8254         * server.c (gdb_read_memory, gdb_write_memory): Adjust.
8255         * spu-low.c (spu_target_ops): Adjust comment.
8256         * target.h (target_ops): Rename unprepare_to_access_memory field
8257         to done_accessing_memory.
8258         (unprepare_to_access_memory): Rename to ...
8259         (done_accessing_memory): ... this.
8260
8261 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
8262
8263         * linux-low.c (linux_prepare_to_access_memory): New.
8264         (linux_unprepare_to_access_memory): New.
8265         (linux_target_ops): Install them.
8266         * server.c (read_memory): Rename to ...
8267         (gdb_read_memory): ... this.  Use
8268         prepare_to_access_memory/prepare_to_access_memory.
8269         (write_memory): Rename to ...
8270         (gdb_write_memory): ... this.  Use
8271         prepare_to_access_memory/prepare_to_access_memory.
8272         (handle_search_memory_1): Adjust.
8273         (process_serial_event): Adjust.
8274         * target.h (struct target_ops): New fields
8275         prepare_to_access_memory and unprepare_to_access_memory.
8276         (prepare_to_access_memory, unprepare_to_access_memory): New.
8277         * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
8278         prepare_to_access_memory/prepare_to_access_memory.
8279         * nto-low.c (nto_target_ops): Adjust.
8280         * spu-low.c (spu_target_ops): Adjust.
8281         * win32-low.c (win32_target_ops): Adjust.
8282
8283 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
8284
8285         * Makefile.in (WARN_CFLAGS): Get it from configure.
8286         (WERROR_CFLAGS): New.
8287         (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
8288         * configure.ac: Introduce --enable-werror, which adds -Werror to
8289         the compiler command line.  Enabled by default.  Disable with
8290         --disable-werror.  Add -Wdeclaration-after-statement
8291         Wpointer-arith and -Wformat-nonliteral to warning flags.
8292         * configure: Regenerate.
8293
8294 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
8295
8296         * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
8297
8298 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
8299
8300         * gdbreplay.c (remote_error): New.
8301         (gdbchar): New.
8302         (expect): Use gdbchar.  Check for error reading from GDB.
8303         Clarify sync error output.
8304         (play): Check for errors writing to GDB.
8305         * linux-low.c (sigchld_handler): Really ignore `write' errors.
8306         * remote-utils.c (getpkt): Check for errors writing to the remote
8307         descriptor.
8308
8309 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
8310
8311         * linux-low.c (linux_wait_1): Move non-debugging code out of
8312         `debug_threads' control.
8313
8314 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
8315
8316         * linux-low.c (linux_wait_1): Don't set last_status here.
8317         * server.c (push_event, queue_stop_reply_callback): Assert we're
8318         not pushing a TARGET_WAITKIND_IGNORE event.
8319         (start_inferior, start_inferior, attach_inferior, handle_v_cont)
8320         (myresume, handle_target_event): Set the thread's last_resume_kind
8321         and last_status from the target returned status.
8322
8323 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
8324
8325         PR threads/10729
8326
8327         * linux-x86-low.c (update_debug_registers_callback): New.
8328         (i386_dr_low_set_addr): Use it.
8329         (i386_dr_low_get_addr): New.
8330         (i386_dr_low_set_control): Use update_debug_registers_callback.
8331         (i386_dr_low_get_control): New.
8332         (i386_dr_low_get_status): Adjust.
8333         * linux-low.c (linux_stop_lwp): New.
8334         * linux-low.h (linux_stop_lwp): Declare.
8335
8336         * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
8337         argument instead of a i386_debug_reg_state.
8338         (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
8339         a i386_debug_reg_state.
8340         (i386_insert_aligned_watchpoint): Adjust.
8341         (i386_remove_aligned_watchpoint): Adjust.
8342         (i386_low_stopped_data_address): Read the debug registers from the
8343         inferior instead of from the mirrors.
8344         * i386-low.h (struct i386_debug_reg_state): Extend comment.
8345         (i386_dr_low_get_addr): Declare.
8346         (i386_dr_low_get_control): Declare.
8347         (i386_dr_low_get_status): Change prototype.
8348
8349         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
8350         (i386_dr_low_get_addr): New.
8351         (i386_dr_low_get_control): New.
8352         (i386_dr_low_get_status): Adjust prototype.  Return
8353         dr_status_mirror.
8354         (i386_initial_stuff): Clear dr_status_mirror and
8355         dr_control_mirror.
8356         (i386_get_thread_context): Adjust.
8357         (i386_set_thread_context): Adjust.
8358         (i386_thread_added): Adjust.
8359
8360 2010-08-24  Pedro Alves  <pedro@codesourcery.com>
8361
8362         * linux-low.h (linux_thread_area): Delete declaration.
8363
8364 2010-08-11  Thomas Schwinge  <thomas@codesourcery.com>
8365
8366         * linux-low.c (linux_wait_1): Correctly return the ptid of the child
8367         after its termination.
8368
8369 2010-08-09  Pedro Alves  <pedro@codesourcery.com>
8370
8371         * linux-low.c (gdb_wants_lwp_stopped): Delete.
8372         (gdb_wants_all_stopped): Delete.
8373         (linux_wait_1): Don't call them.
8374         * server.c (handle_v_cont): Tag all threads as want-stopped.
8375         (gdb_wants_thread_stopped): Fix comments.  Tag the thread that
8376         stopped as "client-wants-stopped".
8377
8378 2010-07-31  Pedro Alves  <pedro@codesourcery.com>
8379
8380         * Makefile.in (signals_h): New.
8381         (server_h): Depend on it.
8382         (server.o): Don't depend on $(signals_def).
8383         (signals.o): Depend on $(signals_def).
8384
8385 2010-07-31  Jan Kratochvil  <jan.kratochvil@redhat.com>
8386
8387         * Makefile.in (signals_def): New.
8388         (server_h): Append include/gdb/signals.h and signals_def.
8389         (server.o): Append signals_def.
8390
8391 2010-07-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
8392
8393         * server.c (handle_target_event): Use target_signal_to_host for
8394         resume_info.sig initialization.
8395         * target.h (struct thread_resume) <sig>: New comment.
8396
8397 2010-07-20  Ozkan Sezer  <sezeroz@gmail.com>
8398
8399         * server.c (handle_query): strcpy() the returned string from paddress()
8400         instead of sprintf().
8401         * utils.c (paddress): Return phex_nz().
8402
8403 2010-07-07  Joel Brobecker  <brobecker@adacore.com>
8404
8405         * server.c (handle_v_cont): Call mourn_inferior if process
8406         just exited.
8407         (myresume): Likewise.
8408
8409 2010-07-01  Pedro Alves  <pedro@codesourcery.com>
8410
8411         Static tracepoints, and integration with UST.
8412
8413         * configure.ac: Handle --with-ust.  substitute ustlibs and ustinc.
8414         * mem-break.c (uninsert_all_breakpoints)
8415         (reinsert_all_breakpoints): New.
8416         * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
8417         * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
8418         (gdb_agent_ust_loaded, helper_thread_id)
8419         (gdb_agent_helper_thread_id): New macros.
8420         (struct ipa_sym_addresses): Add addr_ust_loaded,
8421         addr_helper_thread_id, addr_cmd_buf.
8422         (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
8423         (in_process_agent_loaded_ust): New.
8424         (write_e_ust_not_loaded): New.
8425         (maybe_write_ipa_ust_not_loaded): New.
8426         (struct collect_static_trace_data_action): New.
8427         (enum tracepoint_type) <static_tracepoint>: New.
8428         (struct tracepoint) <handle>: Mention static tracepoints.
8429         (struct static_tracepoint_ctx): New.
8430         (CMD_BUF_SIZE): New.
8431         (add_tracepoint_action): Handle static tracepoint actions.
8432         (unprobe_marker_at): New.
8433         (clear_installed_tracepoints): Handle static tracepoints.
8434         (cmd_qtdp): Handle static tracepoints.
8435         (probe_marker_at): New.
8436         (cmd_qtstart): Handle static tracepoints.
8437         (response_tracepoint): Handle static tracepoints.
8438         (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
8439         (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
8440         (get_context_regcache): Handle static tracepoints.
8441         (do_action_at_tracepoint): Handle static tracepoint actions.
8442         (traceframe_find_block_type): Handle static trace data blocks.
8443         (traceframe_read_sdata): New.
8444         (download_tracepoints): Download static tracepoint actions.
8445         [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
8446         (GDB_PROBE_NAME): New.
8447         (ust_ops): New.
8448         (GET_UST_SYM): New.
8449         (USTF): New.
8450         (dlsym_ust): New.
8451         (ust_marker_to_static_tracepoint): New.
8452         (gdb_probe): New.
8453         (collect_ust_data_at_tracepoint): New.
8454         (gdb_ust_probe): New.
8455         (UNIX_PATH_MAX, SOCK_DIR): New.
8456         (gdb_ust_connect_sync_socket): New.
8457         (resume_thread, stop_thread): New.
8458         (run_inferior_command): New.
8459         (init_named_socket): New.
8460         (gdb_ust_socket_init): New.
8461         (cstr_to_hexstr): New.
8462         (next_st): New.
8463         (first_marker, next_marker): New.
8464         (response_ust_marker): New.
8465         (cmd_qtfstm, cmd_qtsstm): New.
8466         (unprobe_marker_at, probe_marker_at): New.
8467         (cmd_qtstmat, gdb_ust_thread): New.
8468         (gdb_ust_init): New.
8469         (initialize_tracepoint_ftlib): Call gdb_ust_init.
8470         * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
8471         (ST_REGENTRY): New.
8472         (x86_64_st_collect_regmap): New.
8473         (X86_64_NUM_ST_COLLECT_GREGS): New.
8474         (AMD64_RIP_REGNUM): New.
8475         (supply_static_tracepoint_registers): New.
8476         * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
8477         (ST_REGENTRY): New.
8478         (i386_st_collect_regmap): New.
8479         (i386_NUM_ST_COLLECT_GREGS): New.
8480         (supply_static_tracepoint_registers): New.
8481         * server.c (handle_query): Handle qXfer:statictrace:read.
8482         <qSupported>: Report support for StaticTracepoints, and
8483         qXfer:statictrace:read features.
8484         * server.h (traceframe_read_sdata)
8485         (supply_static_tracepoint_registers): Declare.
8486         * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
8487         (unpack_varlen_hex): Include in IPA build.
8488         * Makefile.in (ustlibs, ustinc): New.
8489         (IPA_OBJS): Add remote-utils-ipa.o.
8490         ($(IPA_LIB)): Link -ldl and -lpthread.
8491         (UST_CFLAGS): New.
8492         (IPAGENT_CFLAGS): Add UST_CFLAGS.
8493         * config.in, configure: Regenerate.
8494
8495 2010-06-20  Ian Lance Taylor  <iant@google.com>
8496             Pedro Alves  <pedro@codesourcery.com>
8497
8498         * linux-x86-low.c (always_true): Delete.
8499         (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
8500         trying to fool the compiler with always_true.
8501
8502 2010-06-20  Pedro Alves  <pedro@codesourcery.com>
8503
8504         * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
8505         conditions in gdbserver.
8506
8507 2010-06-19  Ulrich Weigand  <uweigand@de.ibm.com>
8508
8509         * spu-low.c (spu_read_memory): Wrap around local store limit.
8510         (spu_write_memory): Likewise.
8511
8512 2010-06-15  Pedro Alves  <pedro@codesourcery.com>
8513
8514         * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
8515         (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
8516         LONGEST uses.
8517         * server.h (struct emit_ops): Replace int64_t uses with LONGEST
8518         uses.
8519         * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
8520         uses with LONGEST uses.
8521
8522 2010-06-14  Stan Shebs  <stan@codesourcery.com>
8523             Pedro Alves  <pedro@codesourcery.com>
8524
8525         Bytecode compiler.
8526
8527         * linux-x86-low.c: Include limits.h.
8528         (add_insns): New.
8529         (always_true): New.
8530         (EMIT_ASM): New.
8531         (EMIT_ASM32): New.
8532         (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
8533         (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
8534         (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
8535         (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
8536         (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
8537         (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
8538         (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
8539         (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
8540         (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
8541         (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
8542         (amd64_emit_void_call_2): New.
8543         (amd64_emit_ops): New.
8544         (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
8545         (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
8546         (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
8547         (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
8548         (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
8549         (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
8550         (i386_emit_goto, i386_write_goto_address, i386_emit_const)
8551         (i386_emit_call, i386_emit_reg, i386_emit_pop)
8552         (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
8553         (i386_emit_stack_adjust, i386_emit_int_call_1)
8554         (i386_emit_void_call_2): New.
8555         (i386_emit_ops): New.
8556         (x86_emit_ops): New.
8557         (the_low_target): Install x86_emit_ops.
8558         * server.h (struct emit_ops): New.
8559         (get_raw_reg_func_addr): Declare.
8560         (current_insn_ptr, emit_error): Declare.
8561         * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
8562         (set_trace_state_variable_value): New defines.
8563         (struct ipa_sym_addresses): New fields addr_get_raw_reg,
8564         addr_get_trace_state_variable_value and
8565         addr_set_trace_state_variable_value.
8566         (symbol_list): New fields for get_raw_reg,
8567         get_trace_state_variable_value and set_trace_state_variable_value.
8568         (condfn): New typedef.
8569         (struct tracepoint): New field `compiled_cond'.
8570         (do_action_at_tracepoint): Clear compiled_cond.
8571         (get_trace_state_variable_value, set_trace_state_variable_value):
8572         Export in the IPA.
8573         (condition_true_at_tracepoint): If there's a compiled condition,
8574         run that.
8575         (current_insn_ptr, emit_error): New globals.
8576         (struct bytecode_address): New.
8577         (get_raw_reg_func_addr): New.
8578         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
8579         (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
8580         (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
8581         (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
8582         (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
8583         (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
8584         (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
8585         (compile_tracepoint_condition, compile_bytecodes): New.
8586         * target.h (emit_ops): Forward declare.
8587         (struct target_ops): New field emit_ops.
8588         (target_emit_ops): New.
8589         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
8590         * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
8591         * linux-low.c (linux_emit_ops): New.
8592         (linux_target_ops): Install it.
8593         * linux-low.h (struct linux_target_ops): New field emit_ops.
8594
8595 2010-06-14  Ulrich Weigand  <uweigand@de.ibm.com>
8596
8597         * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
8598         * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
8599
8600 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
8601             Stan Shebs  <stan@codesourcery.com>
8602
8603         * Makefile.in (IPA_DEPFILES, extra_libraries): New.
8604         (all): Depend on $(extra_libraries).
8605         (install-only): Install the IPA.
8606         (IPA_OBJS, IPA_LIB): New.
8607         (clean): Remove the IPA lib.
8608         (IPAGENT_CFLAGS): New.
8609         (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
8610         (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
8611         (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
8612         * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
8613         * configure.ac: Check for atomic builtins support in the compiler.
8614         (IPA_DEPFILES, extra_libraries): Define.
8615         * configure.srv (ipa_obj): Add description.
8616         (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
8617         (i[34567]86-*-linux*): Set ipa_obj.
8618         (x86_64-*-linux*): Set ipa_obj.
8619         * linux-low.c (stabilizing_threads): New.
8620         (supports_fast_tracepoints): New.
8621         (linux_detach): Stabilize threads before detaching.
8622         (handle_tracepoints): Handle internal tracing breakpoints.  Assert
8623         the lwp is either not stabilizing, or is moving out of a jump pad.
8624         (linux_fast_tracepoint_collecting): New.
8625         (maybe_move_out_of_jump_pad): New.
8626         (enqueue_one_deferred_signal): New.
8627         (dequeue_one_deferred_signal): New.
8628         (linux_wait_for_event_1): If moving out of a jump pad, defer
8629         pending signals to later.
8630         (linux_stabilize_threads): New.
8631         (linux_wait_1): Check if threads need moving out of jump pads, and
8632         do it if so.
8633         (stuck_in_jump_pad_callback): New.
8634         (move_out_of_jump_pad_callback): New.
8635         (lwp_running): New.
8636         (linux_resume_one_lwp): Handle moving out of jump pads.
8637         (linux_set_resume_request): Dequeue deferred signals.
8638         (need_step_over_p): Also step over fast tracepoint jumps.
8639         (start_step_over): Also uninsert fast tracepoint jumps.
8640         (finish_step_over): Also reinsert fast tracepoint jumps.
8641         (linux_install_fast_tracepoint_jump): New.
8642         (linux_target_ops): Install linux_stabilize_threads and
8643         linux_install_fast_tracepoint_jump_pad.
8644         * linux-low.h (linux_target_ops) <get_thread_area,
8645         install_fast_tracepoint_jump_pad>: New fields.
8646         (struct lwp_info) <collecting_fast_tracepoint,
8647         pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
8648         (linux_get_thread_area): Declare.
8649         * linux-x86-low.c (jump_insn): New.
8650         (x86_get_thread_area): New.
8651         (append_insns): New.
8652         (push_opcode): New.
8653         (amd64_install_fast_tracepoint_jump_pad): New.
8654         (i386_install_fast_tracepoint_jump_pad): New.
8655         (x86_install_fast_tracepoint_jump_pad): New.
8656         (the_low_target): Install x86_get_thread_area and
8657         x86_install_fast_tracepoint_jump_pad.
8658         * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
8659         (struct fast_tracepoint_jump): New.
8660         (fast_tracepoint_jump_insn): New.
8661         (fast_tracepoint_jump_shadow): New.
8662         (find_fast_tracepoint_jump_at): New.
8663         (fast_tracepoint_jump_here): New.
8664         (delete_fast_tracepoint_jump): New.
8665         (set_fast_tracepoint_jump): New.
8666         (uninsert_fast_tracepoint_jumps_at): New.
8667         (reinsert_fast_tracepoint_jumps_at): New.
8668         (set_breakpoint_at): Use write_inferior_memory.
8669         (uninsert_raw_breakpoint): Use write_inferior_memory.
8670         (check_mem_read): Mask out fast tracepoint jumps.
8671         (check_mem_write): Mask out fast tracepoint jumps.
8672         * mem-break.h (struct fast_tracepoint_jump): Forward declare.
8673         (set_fast_tracepoint_jump): Declare.
8674         (delete_fast_tracepoint_jump)
8675         (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
8676         (reinsert_fast_tracepoint_jumps_at): Declare.
8677         * regcache.c: Don't compile many functions when building the
8678         in-process agent library.
8679         (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
8680         the register buffer in the heap.
8681         (free_register_cache): If the register buffer isn't owned by the
8682         regcache, don't free it.
8683         (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
8684         pre-existing register caches.
8685         * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
8686         type.
8687         (convert_ascii_to_int): : Constify `from' parameter type.
8688         (decode_M_packet, decode_X_packet): Replace the `to' parameter by
8689         a `to_p' pointer to pointer parameter.  If TO_P is NULL, malloc
8690         the needed buffer in-place.
8691         (relocate_instruction): New.
8692         * server.c (handle_query) <qSymbols>: If the target supports
8693         tracepoints, give it a chance of looking up symbols.  Report
8694         support for fast tracepoints.
8695         (handle_status): Stabilize threads.
8696         (process_serial_event): Adjust.
8697         * server.h (struct fast_tracepoint_jump): Forward declare.
8698         (struct process_info) <fast_tracepoint_jumps>: New field.
8699         (convert_ascii_to_int, convert_int_to_ascii): Adjust.
8700         (decode_X_packet, decode_M_packet): Adjust.
8701         (relocate_instruction): Declare.
8702         (in_process_agent_loaded): Declare.
8703         (tracepoint_look_up_symbols): Declare.
8704         (struct fast_tpoint_collect_status): Declare.
8705         (fast_tracepoint_collecting): Declare.
8706         (force_unlock_trace_buffer): Declare.
8707         (handle_tracepoint_bkpts): Declare.
8708         (initialize_low_tracepoint)
8709         (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
8710         * target.h (struct target_ops) <stabilize_threads,
8711         install_fast_tracepoint_jump_pad>: New fields.
8712         (stabilize_threads, install_fast_tracepoint_jump_pad): New.
8713         * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
8714         [HAVE_STDINT_H]: Include stdint.h.
8715         (trace_debug_1): Rename to ...
8716         (trace_vdebug): ... this.
8717         (trace_debug): Rename to ...
8718         (trace_debug_1): ... this.  Add `level' parameter.
8719         (trace_debug): New.
8720         (ATTR_USED, ATTR_NOINLINE): New.
8721         (IP_AGENT_EXPORT): New.
8722         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8723         (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
8724         (about_to_request_buffer_space, trace_buffer_is_full)
8725         (stopping_tracepoint, expr_eval_result, error_tracepoint)
8726         (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
8727         (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
8728         (traceframe_write_count, traceframes_created)
8729         (trace_state_variables)
8730         New renaming defines.
8731         (struct ipa_sym_addresses): New.
8732         (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
8733         (symbol_list): New.
8734         (ipa_sym_addrs): New.
8735         (all_tracepoint_symbols_looked_up): New.
8736         (in_process_agent_loaded): New.
8737         (write_e_ipa_not_loaded): New.
8738         (maybe_write_ipa_not_loaded): New.
8739         (tracepoint_look_up_symbols): New.
8740         (debug_threads) [IN_PROCESS_AGENT]: New.
8741         (read_inferior_memory) [IN_PROCESS_AGENT]: New.
8742         (UNKNOWN_SIDE_EFFECTS): New.
8743         (stop_tracing): New.
8744         (flush_trace_buffer): New.
8745         (stop_tracing_bkpt): New.
8746         (flush_trace_buffer_bkpt): New.
8747         (read_inferior_integer): New.
8748         (read_inferior_uinteger): New.
8749         (read_inferior_data_pointer): New.
8750         (write_inferior_data_pointer): New.
8751         (write_inferior_integer): New.
8752         (write_inferior_uinteger): New.
8753         (struct collect_static_trace_data_action): Delete.
8754         (enum tracepoint_type): New.
8755         (struct tracepoint) <type>: New field `type'.
8756         <actions_str, step_actions, step_actions_str>: Only include in
8757         GDBserver.
8758         <orig_size, obj_addr_on_target, adjusted_insn_addr>
8759         <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
8760         (tracepoints): Use IP_AGENT_EXPORT.
8761         (last_tracepoint): Don't include in the IPA.
8762         (stopping_tracepoint): Use IP_AGENT_EXPORT.
8763         (trace_buffer_is_full): Use IP_AGENT_EXPORT.
8764         (alloced_trace_state_variables): New.
8765         (trace_state_variables): Use IP_AGENT_EXPORT.
8766         (traceframe_t): Delete unused variable.
8767         (circular_trace_buffer): Don't include in the IPA.
8768         (trace_buffer_start): Delete.
8769         (struct trace_buffer_control): New.
8770         (trace_buffer_free): Delete.
8771         (struct ipa_trace_buffer_control): New.
8772         (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
8773         (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
8774         New.
8775         (trace_buffer_ctrl): New.
8776         (TRACE_BUFFER_CTRL_CURR): New.
8777         (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
8778         Reimplement as macros.
8779         (trace_buffer_wrap): Delete.
8780         (traceframe_write_count, traceframe_read_count)
8781         (traceframes_created, tracing): Use IP_AGENT_EXPORT.
8782         (struct tracepoint_hit_ctx) <type>: New field.
8783         (struct fast_tracepoint_ctx): New.
8784         (memory_barrier): New.
8785         (cmpxchg): New.
8786         (record_tracepoint_error): Update atomically in the IPA.
8787         (clear_inferior_trace_buffer): New.
8788         (about_to_request_buffer_space): New.
8789         (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
8790         updating the same buffer.
8791         (add_tracepoint): Default the tracepoint's type to trap
8792         tracepoint, and orig_size to -1.
8793         (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
8794         internal variables.
8795         (create_trace_state_variable): New parameter `gdb'.  Handle it.
8796         (clear_installed_tracepoints): Clear fast tracepoint jumps.
8797         (cmd_qtdp): Handle fast tracepoints.
8798         (cmd_qtdv): Adjust.
8799         (max_jump_pad_size): New.
8800         (gdb_jump_pad_head): New.
8801         (get_jump_space_head): New.
8802         (claim_jump_space): New.
8803         (sort_tracepoints): New.
8804         (MAX_JUMP_SIZE): New.
8805         (cmd_qtstart): Handle fast tracepoints.  Sync tracepoints with the
8806         IPA.
8807         (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
8808         support.  Upload fast traceframes, and delete internal IPA
8809         breakpoints.
8810         (stop_tracing_handler): New.
8811         (flush_trace_buffer_handler): New.
8812         (cmd_qtstop): Upload fast tracepoints.
8813         (response_tracepoint): Handle fast tracepoints.
8814         (tracepoint_finished_step): Upload fast traceframes.  Set the
8815         tracepoint hit context's tracepoint type.
8816         (handle_tracepoint_bkpts): New.
8817         (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
8818         type.  Add comment about fast tracepoints.
8819         (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
8820         non-existing action_str field.
8821         (get_context_regcache): Handle fast tracepoints.
8822         (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
8823         to the regcache.
8824         (fast_tracepoint_from_jump_pad_address): New.
8825         (fast_tracepoint_from_ipa_tpoint_address): New.
8826         (collecting_t): New.
8827         (force_unlock_trace_buffer): New.
8828         (fast_tracepoint_collecting): New.
8829         (collecting): New.
8830         (gdb_collect): New.
8831         (write_inferior_data_ptr): New.
8832         (target_tp_heap): New.
8833         (target_malloc): New.
8834         (download_agent_expr): New.
8835         (UALIGN): New.
8836         (download_tracepoints): New.
8837         (download_trace_state_variables): New.
8838         (upload_fast_traceframes): New.
8839         (IPA_FIRST_TRACEFRAME): New.
8840         (IPA_NEXT_TRACEFRAME_1): New.
8841         (IPA_NEXT_TRACEFRAME): New.
8842         [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
8843         [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
8844         (gdb_jump_pad_buffer_end): New.
8845         [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
8846         (initialize_tracepoint): Adjust.
8847         [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
8848         buffer.  Initialize the low module.
8849         * utils.c (PREFIX, TOOLNAME): New.
8850         (malloc_failure): Use PREFIX.
8851         (error): In the IPA, an error causes an exit.
8852         (fatal, warning): Use PREFIX.
8853         (internal_error): Use TOOLNAME.
8854         (NUMCELLS): Increase to 10.
8855         * configure, config.in: Regenerate.
8856
8857 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
8858
8859         * server.c (handle_query) <qSupported>: Do two passes over the
8860         qSupported string to avoid nesting strtok.
8861
8862 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
8863
8864         * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
8865         (CDEPS): New.
8866         * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping.  Test also
8867         -Wl,--dynamic-list.
8868         * configure: Regenerate.
8869         * proc-service.list: New.
8870
8871 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
8872
8873         * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
8874         New comment.
8875
8876 2010-05-26  Ozkan Sezer  <sezeroz@gmail.com>
8877
8878         * gdbreplay.c (remote_open): Check error return from socket() call by
8879         its equality to -1 not by it being negative.
8880         * remote-utils.c (remote_open): Likewise.
8881
8882 2010-05-23  Pedro Alves  <pedro@codesourcery.com>
8883
8884         * config.h: Regenerate.
8885
8886 2010-05-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
8887
8888         * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8889         doesn't provide PTRACE_GET_THREAD_AREA.
8890
8891 2010-05-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
8892
8893         * linux-m68k-low.c: Include <asm/ptrace.h>
8894         (ps_get_thread_area): Implement.
8895
8896 2010-05-03  Doug Evans  <dje@google.com>
8897
8898         * event-loop.c (struct callback_event): New struct.
8899         (callback_list): New global.
8900         (append_callback_event, delete_callback_event): New functions.
8901         (process_callback): New function.
8902         (start_event_loop): Call it.
8903         * remote-utils.c (NOT_SCHEDULED): Define.
8904         (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8905         moved out of readchar.
8906         (readchar): Rewrite.  Call reschedule before returning.
8907         (reset_readchar): New function.
8908         (remote_close): Call it.
8909         (process_remaining, reschedule): New functions.
8910         * server.h (callback_handler_func): New typedef.
8911         (append_callback_event, delete_callback_event): Declare.
8912
8913 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
8914
8915         * proc-service.c (ps_pglobal_lookup): Use
8916         thread_db_look_up_one_symbol.
8917         * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8918         parameter.  Use it instead of all_symbols_looked_up.
8919         * server.h (struct process_info) <all_symbols_looked_up>: Delete
8920         field.
8921         (all_symbols_looked_up): Don't declare.
8922         (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8923         * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8924         field.
8925         (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8926         Set all_symbols_looked_up here.
8927         (thread_db_look_up_one_symbol): New.
8928         (thread_db_get_tls_address): Adjust.
8929         (thread_db_load_search, try_thread_db_load_1): Always allocate the
8930         thread_db object on the heap, and tentatively set it in the
8931         process structure.
8932         (thread_db_init): Don't set all_symbols_looked_up here.
8933         * linux-low.h (thread_db_look_up_one_symbol): Declare.
8934
8935 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
8936
8937         * linux-low.c (linux_kill, linux_detach): Adjust.
8938         (status_pending_p_callback): Remove redundant statement.  Check
8939         for !TARGET_WAITIKIND_IGNORE, instead of
8940         TARGET_WAITKIND_STOPPED.
8941         (handle_tracepoints): Make sure LWP is locked.  Adjust.
8942         (linux_wait_for_event_1): Adjust.
8943         (linux_cancel_breakpoints): New.
8944         (unsuspend_one_lwp): New.
8945         (unsuspend_all_lwps): New.
8946         (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8947         (send_sigstop_callback): Change return type to int, add new
8948         `except' parameter and handle it.
8949         (suspend_and_send_sigstop_callback): New.
8950         (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8951         pass them down.  If SUSPEND, also increment the lwp's suspend
8952         count.
8953         (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8954         (need_step_over_p): Don't consider suspended LWPs.
8955         (start_step_over): Adjust.
8956         (proceed_one_lwp): Change return type to int, add new `except'
8957         parameter and handle it.
8958         (unsuspend_and_proceed_one_lwp): New.
8959         (proceed_all_lwps): Use find_inferior instead of
8960         for_each_inferior.
8961         (unstop_all_lwps): Add `unsuspend' parameter.  If UNSUSPEND, them
8962         also decrement the suspend count of LWPs.  Pass `except' down,
8963         instead of hacking its suspend count.
8964         (linux_pause_all): Add `freeze' parameter.  Adjust.
8965         (linux_unpause_all): New.
8966         (linux_target_ops): Install linux_unpause_all.
8967         * server.c (handle_status): Adjust.
8968         * target.h (struct target_ops): New fields `unpause_all' and
8969         `cancel_breakpoints'.  Add new parameter to `pause_all'.
8970         (pause_all): Add new `freeze' parameter.
8971         (unpause_all): New.
8972         (cancel_breakpoints): New.
8973         * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8974         cancel breakpoints.
8975         (cmd_qtstart): Pause threads.
8976         (stop_tracing): Pause threads, and cancel breakpoints.
8977         * win32-low.c (win32_target_ops): Adjust.
8978
8979 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
8980
8981         * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8982         the inferior right away from here...
8983         (linux_wait_1): ... to here, and adjust to check the thread's
8984         last_resume_kind instead of the lwp's step or stop_expected flags.
8985
8986 2010-05-02  Pedro Alves  <pedro@codesourcery.com>
8987
8988         * README: Use consistent `GDB' and `GDBserver' spellings.
8989
8990 2010-05-02  Pedro Alves  <pedro@codesourcery.com>
8991
8992         * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8993         (linux_kill): Stop all lwps here.  Don't delete the main lwp here.
8994         (linux_detach_one_lwp): Assume the lwp is stopped.
8995         (any_thread_of): Delete.
8996         (linux_detach): Stop all lwps here.  Don't blindly delete all
8997         breakpoints.
8998         (delete_lwp_callback): New.
8999         (linux_mourn): Delete all lwps of the process that is gone.
9000         (linux_wait_1): Don't delete the last lwp of the process here.
9001         * mem-break.h (mark_breakpoints_out): Declare.
9002         * mem-break.c (mark_breakpoints_out): New.
9003         (free_all_breakpoints): Use it.
9004         * server.c (handle_target_event): If the process is gone, mark
9005         breakpoints out.
9006         * thread-db.c (struct thread_db) <create_bp>: New field.
9007         (thread_db_enable_reporting): Fix prototype.  Store a thread event
9008         breakpoint reference in the thread_db struct.
9009         (thread_db_load_search): Clear the thread_db object.
9010         (try_thread_db_load_1): Ditto.
9011         (switch_to_process): New.
9012         (disable_thread_event_reporting): Use it.
9013         (remove_thread_event_breakpoints): New.
9014         (thread_db_detach, thread_db_mourn): Use it.
9015
9016 2010-05-01  Pedro Alves  <pedro@codesourcery.com>
9017
9018         * linux-low.c (linux_enable_event_reporting): New.
9019         (linux_wait_for_event_1, handle_extended_wait): Use it.
9020
9021 2010-04-30  Pedro Alves  <pedro@codesourcery.com>
9022
9023         * linux-low.c (linux_kill_one_lwp, linux_kill)
9024         (linux_detach_one_lwp): Adjust to send_sigstop interface change.
9025         (send_sigstop): Take an lwp_info as parameter instead.  Queue a
9026         SIGSTOP even if the LWP is stopped.
9027         (send_sigstop_callback): New.
9028         (stop_all_lwps): Use send_sigstop_callback instead.
9029         (linux_resume_one_thread): Adjust.
9030         (proceed_one_lwp): Still proceed an LWP that the client has
9031         requested to stop, if we haven't reported it as stopped yet.  Make
9032         sure that LWPs the client want stopped, have a pending SIGSTOP.
9033
9034 2010-04-26  Doug Evans  <dje@google.com>
9035
9036         * server.c (handle_general_set): Make static.
9037
9038         * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
9039         Print received char after testing for error/eof instead of before.
9040         (input_interrupt): Tweak comment.
9041
9042 2010-04-23  Doug Evans  <dje@google.com>
9043
9044         * server.c (start_inferior): Print inferior argv if --debug.
9045
9046 2010-04-21  Aleksandar Ristovski  <aristovski@qnx.com>
9047
9048         * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
9049         * nto-x86-low.c: Include server.h
9050
9051 2010-04-20  Pierre Muller  <muller@ics.u-strasbg.fr>
9052
9053         * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
9054         be consistent with other sources of this directory.
9055         (init_registers_amd64): Correct name of source file of this function
9056         in the comment.
9057
9058 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
9059
9060         * configure.srv (x86_64-*-mingw*): New configuration for Windows
9061         64-bit executables.
9062
9063 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
9064
9065         * win32-i386-low.c: Add 64-bit support.
9066         (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
9067         (init_registers_amd64): Declare.
9068         (mappings): Add 64-bit version of array.
9069         (init_windows_x86): New function.
9070         (the_low_target): Change init_arch field to init_windows_x86.
9071
9072 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
9073
9074         * win32-low.c: Adapt to support also 64-bit architecture.
9075         (child_xfer_memory): Use uintptr_t type for local variable `addr'.
9076         (get_image_name): Use SIZE_T type for local variable `done'.
9077         (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
9078         (toolhelp_get_dll_name): Idem.
9079         (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
9080         Use uintptr_t typecast to avoid warning.
9081         (handle_unload_dll): Use uintptr_t typecast to avoid warning.
9082         (handle_exception): Use phex_nz to avoid warning.
9083         (win32_wait): Remove unused local variable `process'.
9084
9085 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
9086
9087         * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
9088         `amd64-avx.o'.
9089
9090 2010-04-17  Pierre Muller  <muller@ics.u-strasbg.fr>
9091
9092         * configure.ac: Use `ws2_32' library for srv_mingw.
9093         * configure: Regenerate.
9094         * gdbreplay.c: Include winsock2.h instead of winsock.h.
9095         * remote-utils.c: Likewise.
9096
9097 2010-04-17  H.J. Lu  <hongjiu.lu@intel.com>
9098
9099         * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
9100         if __x86_64__ is defined.
9101
9102 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
9103
9104         * configure: Regenerate.
9105
9106 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
9107
9108         * server.c (handle_query): Handle 'qGetTIBAddr' query.
9109         * target.h (target_ops): New get_tib_address field.
9110         * win32-low.h (win32_thread_info): Add thread_local_base field.
9111         * win32-low.c (child_add_thread): Add tlb argument.
9112         Set thread_local_base field to TLB.
9113         (get_child_debug_event): Adapt to child_add_thread change.
9114         (win32_get_tib_address): New function.
9115         (win32_target_ops): Set get_tib_address field to
9116         win32_get_tib_address.
9117         * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
9118
9119 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
9120
9121         * linux-low.c (linux_mourn): Also remove the process.
9122         * server.c (handle_target_event): Don't remove the process here.
9123         * nto-low.c (nto_mourn): New.
9124         (nto_target_ops): Install it.
9125         * spu-low.c (spu_mourn): New.
9126         (spu_target_ops): Install it.
9127         * win32-low.c (win32_mourn): New.
9128         (win32_target_ops): Install it.
9129
9130 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
9131
9132         * server.h (buffer_xml_printf): Remove redundant `;'.
9133
9134 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
9135
9136         * regcache.c (set_register_cache): Invalidate regcaches before
9137         changing the register cache layout.
9138         (regcache_invalidate_one): Allow a NULL regcache.
9139         * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
9140         regcaches before changing the register cache layout or the target
9141         regsets.
9142
9143 2010-04-12  H.J. Lu  <hongjiu.lu@intel.com>
9144
9145         * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
9146         variable warning on Linux/x86-64.
9147
9148 2010-04-11  Pedro Alves  <pedro@codesourcery.com>
9149
9150         GDBserver disconnected tracing support.
9151
9152         * linux-low.c (linux_remove_process): Delete.
9153         (add_lwp): Don't set last_resume_kind here.
9154         (linux_kill): Use `mourn'.
9155         (linux_detach): Use `thread_db_detach', and `mourn'.
9156         (linux_mourn): New.
9157         (linux_attach_lwp_1): Adjust comment.
9158         (linux_attach): last_resume_kind moved the thread_info; adjust.
9159         (status_pending_p_callback): Adjust.
9160         (linux_wait_for_event_1): Adjust.
9161         (count_events_callback, select_singlestep_lwp_callback)
9162         (select_event_lwp_callback, cancel_breakpoints_callback)
9163         (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
9164         (proceed_one_lwp): Adjust.
9165         (linux_async): Add debug output.
9166         (linux_thread_stopped): New.
9167         (linux_pause_all): New.
9168         (linux_target_ops): Install linux_mourn, linux_thread_stopped and
9169         linux_pause_all.
9170         * linux-low.h (struct lwp_info): Delete last_resume_kind field.
9171         (thread_db_free): Delete declaration.
9172         (thread_db_detach, thread_db_mourn): Declare.
9173         * thread-db.c (thread_db_init): Use thread_db_mourn.
9174         (thread_db_free): Delete, split in two.
9175         (disable_thread_event_reporting): New.
9176         (thread_db_detach): New.
9177         (thread_db_mourn): New.
9178
9179         * server.h (struct thread_info) <last_resume_kind>: New field.
9180         <attached>: Add comment.
9181         <gdb_detached>: New field.
9182         (handler_func): Change return type to int.
9183         (handle_serial_event, handle_target_event): Ditto.
9184         (gdb_connected): Declare.
9185         (tracing): Delete.
9186         (disconnected_tracing): Declare.
9187         (stop_tracing): Declare.
9188
9189         * server.c (handle_query) <qSupported>: Report support for
9190         disconnected tracing.
9191         (queue_stop_reply_callback): Account for running threads.
9192         (gdb_wants_thread_stopped): New.
9193         (gdb_wants_all_threads_stopped): New.
9194         (gdb_reattached_process): New.
9195         (handle_status): Clear the `gdb_detached' flag of all processes.
9196         In all-stop, stop all threads.
9197         (main): Be sure to leave tfind mode.  Handle disconnected tracing.
9198         (process_serial_event): If the remote connection breaks, or if an
9199         exit was forced with "monitor exit", force an event loop exit.
9200         Handle disconnected tracing on detach.
9201         (handle_serial_event): Adjust.
9202         (handle_target_event): If GDB isn't connected, forward events back
9203         to the inferior, unless the last process exited, in which case,
9204         exit gdbserver.  Adjust interface.
9205
9206         * remote-utils.c (remote_open): Don't block in accept.  Instead
9207         register an event loop source on the listen socket file
9208         descriptor.  Refactor bits into ...
9209         (listen_desc): ... this new global.
9210         (gdb_connected): ... this new function.
9211         (enable_async_notification): ... this new function.
9212         (handle_accept_event): ... this new function.
9213         (remote_close): Clear remote_desc.
9214
9215         * inferiors.c (add_thread): Set the new thread's last_resume_kind.
9216
9217         * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
9218         New fields.
9219         (mourn_inferior): Define.
9220         (target_process_qsupported): Avoid the dangling else problem.
9221         (thread_stopped): Define.
9222         (pause_all): Define.
9223         (target_waitstatus_to_string): Declare.
9224         * target.c (target_waitstatus_to_string): New.
9225
9226         * tracepoint.c (tracing): Make extern.
9227         (disconnected_tracing): New.
9228         (stop_tracing): Make extern.  Handle tracing stops due to GDB
9229         disconnecting.
9230         (cmd_qtdisconnected): New.
9231         (cmd_qtstatus): Report disconnected tracing status in trace reply.
9232         (handle_tracepoint_general_set): Handle QTDisconnected.
9233
9234         * event-loop.c (event_handler_func): Change return type to int.
9235         (process_event): Bail out if the event handler wants the event
9236         loop to stop.
9237         (handle_file_event): Ditto.
9238         (start_event_loop): Bail out if the event handler wants the event
9239         loop to stop.
9240
9241         * nto-low.c (nto_target_ops): Adjust.
9242         * spu-low.c (spu_wait): Don't remove the process here.
9243         (spu_target_ops): Adjust.
9244         * win32-low.c (win32_wait): Don't remove the process here.
9245         (win32_target_ops): Adjust.
9246
9247 2010-04-11  Pedro Alves  <pedro@codesourcery.com>
9248
9249         * regcache.c (realloc_register_cache): Invalidate inferior's
9250         regcache before recreating it.
9251
9252 2010-04-09  Pedro Alves  <pedro@codesourcery.com>
9253
9254         * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
9255
9256 2010-04-09  Stan Shebs  <stan@codesourcery.com>
9257             Pedro Alves  <pedro@codesourcery.com>
9258
9259         * server.h (LONGEST): New.
9260         (struct thread_info) <while_stepping>: New field.
9261         (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
9262         Declare.
9263         (initialize_tracepoint, handle_tracepoint_general_set)
9264         (handle_tracepoint_query, tracepoint_finished_step)
9265         (tracepoint_was_hit, release_while_stepping_state_list):
9266         (current_traceframe): Declare.
9267         * server.c (handle_general_set): Handle tracepoint packets.
9268         (read_memory): New.
9269         (write_memory): New.
9270         (handle_search_memory_1): Use read_memory.
9271         (handle_query): Report support for conditional tracepoints, trace
9272         state variables, and tracepoint sources.  Handle tracepoint
9273         queries.
9274         (main): Initialize the tracepoints module.
9275         (process_serial_event): Handle traceframe reads/writes.
9276
9277         * linux-low.c (handle_tracepoints): New.
9278         (linux_wait_1): Call it.
9279         (linux_resume_one_lwp): Handle while-stepping.
9280         (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
9281         (linux_target_ops): Install them.
9282         * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
9283         New field.
9284         * linux-x86-low.c (x86_supports_tracepoints): New.
9285         (the_low_target). Install it.
9286
9287         * mem-break.h (delete_breakpoint): Declare.
9288         * mem-break.c (delete_breakpoint): Make external.
9289
9290         * target.h (struct target_ops): Add `supports_tracepoints',
9291         `read_pc', and `write_pc' fields.
9292         (target_supports_tracepoints): Define.
9293         * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
9294         (phex_nz): New.
9295
9296         * regcache.h (struct regcache) <registers_owned>: New field.
9297         (init_register_cache, regcache_cpy): Declare.
9298         (regcache_read_pc, regcache_write_pc): Declare.
9299         (register_cache_size): Declare.
9300         (supply_regblock): Declare.
9301         * regcache.c (init_register_cache): New.
9302         (new_register_cache): Use it.
9303         (regcache_cpy): New.
9304         (register_cache_size): New.
9305         (supply_regblock): New.
9306         (regcache_read_pc, regcache_write_pc): New.
9307
9308         * tracepoint.c: New.
9309
9310         * Makefile.in (OBS): Add tracepoint.o.
9311         (tracepoint.o): New rule.
9312
9313 2010-04-08  H.J. Lu  <hongjiu.lu@intel.com>
9314
9315         * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
9316         (i386-mmx.o): New.
9317         (i386-mmx.c): Likewise.
9318         (i386-mmx-linux.o): Likewise.
9319         (i386-mmx-linux.c): Likewise.
9320
9321         * configure.srv (srv_i386_regobj): Add i386-mmx.o.
9322         (srv_i386_linux_regobj): Add i386-mmx-linux.o.
9323         (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
9324         (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
9325
9326         * linux-x86-low.c (init_registers_i386_mmx_linux): New.
9327         (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
9328         and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
9329
9330 2010-04-07  H.J. Lu  <hongjiu.lu@intel.com>
9331
9332         * Makefile.in (clean): Updated.
9333         (i386-avx.o): New.
9334         (i386-avx.c): Likewise.
9335         (i386-avx-linux.o): Likewise.
9336         (i386-avx-linux.c): Likewise.
9337         (amd64-avx.o): Likewise.
9338         (amd64-avx.c): Likewise.
9339         (amd64-avx-linux.o): Likewise.
9340         (amd64-avx-linux.c): Likewise.
9341
9342         * configure.srv (srv_i386_regobj): Add i386-avx.o.
9343         (srv_i386_linux_regobj): Add i386-avx-linux.o.
9344         (srv_amd64_regobj): Add amd64-avx.o.
9345         (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
9346         (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
9347         (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
9348         (srv_i386_xmlfiles): Add i386/i386-avx.xml.
9349         (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
9350         (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
9351         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
9352
9353         * i387-fp.c: Include "i386-xstate.h".
9354         (i387_xsave): New.
9355         (i387_cache_to_xsave): Likewise.
9356         (i387_xsave_to_cache): Likewise.
9357         (x86_xcr0): Likewise.
9358
9359         * i387-fp.h (i387_cache_to_xsave): Likewise.
9360         (i387_xsave_to_cache): Likewise.
9361         (x86_xcr0): Likewise.
9362
9363         * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
9364         * linux-crisv32-low.c (target_regsets): Likewise.
9365         * linux-m68k-low.c (target_regsets): Likewise.
9366         * linux-mips-low.c (target_regsets): Likewise.
9367         * linux-ppc-low.c (target_regsets): Likewise.
9368         * linux-s390-low.c (target_regsets): Likewise.
9369         * linux-sh-low.c (target_regsets): Likewise.
9370         * linux-sparc-low.c (target_regsets): Likewise.
9371         * linux-xtensa-low.c (target_regsets): Likewise.
9372
9373         * linux-low.c: Include <sys/uio.h>.
9374         (regsets_fetch_inferior_registers): Support nt_type.
9375         (regsets_store_inferior_registers): Likewise.
9376         (linux_process_qsupported): New.
9377         (linux_target_ops): Add linux_process_qsupported.
9378
9379         * linux-low.h (regset_info): Add nt_type.
9380         (linux_target_ops): Add process_qsupported.
9381
9382         * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
9383         and <sys/uio.h>.
9384         (init_registers_i386_avx_linux): New.
9385         (init_registers_amd64_avx_linux): Likewise.
9386         (xmltarget_i386_linux_no_xml): Likewise.
9387         (xmltarget_amd64_linux_no_xml): Likewise.
9388         (PTRACE_GETREGSET): Likewise.
9389         (PTRACE_SETREGSET): Likewise.
9390         (x86_fill_xstateregset): Likewise.
9391         (x86_store_xstateregset): Likewise.
9392         (use_xml): Likewise.
9393         (x86_linux_update_xmltarget): Likewise.
9394         (x86_linux_process_qsupported): Likewise.
9395         (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
9396         (x86_arch_setup): Don't call init_registers_amd64_linux nor
9397         init_registers_i386_linux here.  Call
9398         x86_linux_update_xmltarget.
9399         (the_low_target): Add x86_linux_process_qsupported.
9400
9401         * server.c (handle_query): Call target_process_qsupported.
9402
9403         * target.h (target_ops): Add process_qsupported.
9404         (target_process_qsupported): New.
9405
9406 2010-04-03  Pedro Alves  <pedro@codesourcery.com>
9407
9408         * inferiors.c (add_thread): Set last_status kind to
9409         TARGET_WAITKIND_IGNORE.
9410         * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
9411         fetch.  Use ptid_of.  Avoid unnecessary get_lwp_thread calls.
9412         (linux_wait_1): Move `thread' local definition to block that uses
9413         it.  Don't NULL initialize `event_child'.
9414         (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
9415         Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
9416         * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
9417
9418 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
9419
9420         * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
9421         an extended waitstatus, or by a watchpoint.
9422         (cancel_breakpoints_callback): Don't cancel a breakpoint if the
9423         thread was stepping or has been stopped by a watchpoint.
9424
9425 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
9426
9427         * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
9428         (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
9429         of another, then delete the previous, and validate all
9430         breakpoints.
9431         (validate_inserted_breakpoint): New.
9432         (delete_disabled_breakpoints): New.
9433         (validate_breakpoints): New.
9434         (check_mem_read): Validate breakpoints before trusting their
9435         shadow.  Delete disabled breakpoints.
9436         (check_mem_write): Validate breakpoints before trusting they
9437         should be inserted.  Delete disabled breakpoints.
9438         * mem-break.h (validate_breakpoints):
9439         * server.c (handle_query): Validate breakpoints when we see a
9440         qSymbol query.
9441
9442 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
9443
9444         * linux-low.c (linux_wait_1): Avoid setting need_step_over is
9445         there's a GDB breakpoint at stop_pc.  Always report a trap to GDB
9446         if we could tell there's a GDB breakpoint at stop_pc.
9447         (need_step_over_p): Don't do a step over if we find a GDB
9448         breakpoint at the resume PC.
9449
9450         * mem-break.c (struct raw_breakpoint): New.
9451         (enum bkpt_type): New type `gdb_breakpoint'.
9452         (struct breakpoint): Delete the `PC', `old_data' and `inserted'
9453         fields.  New field `raw'.
9454         (find_raw_breakpoint_at): New.
9455         (set_raw_breakpoint_at): Handle refcounting.  Create a raw
9456         breakpoint instead.
9457         (set_breakpoint_at): Adjust.
9458         (delete_raw_breakpoint): New.
9459         (release_breakpoint): New.
9460         (delete_breakpoint): Rename to...
9461         (delete_breakpoint_1): ... this.  Add proc parameter.  Use
9462         release_breakpoint.  Return ENOENT.
9463         (delete_breakpoint): Reimplement.
9464         (find_breakpoint_at): Delete.
9465         (find_gdb_breakpoint_at): New.
9466         (delete_breakpoint_at): Delete.
9467         (set_gdb_breakpoint_at): New.
9468         (delete_gdb_breakpoint_at): New.
9469         (gdb_breakpoint_here): New.
9470         (set_reinsert_breakpoint): Use release_breakpoint.
9471         (uninsert_breakpoint): Rename to ...
9472         (uninsert_raw_breakpoint): ... this.
9473         (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
9474         (reinsert_raw_breakpoint): Change parameter type to
9475         raw_breakpoint.
9476         (reinsert_breakpoints_at): Adjust to handle raw breakpoints
9477         instead.
9478         (check_breakpoints): Adjust.  Use release_breakpoint.
9479         (breakpoint_here): Rewrite using find_raw_breakpoint_at.
9480         (breakpoint_inserted_here): Ditto.
9481         (check_mem_read): Adjust to iterate over raw breakpoints instead.
9482         Don't trust the breakpoint's shadow if it is not inserted.
9483         (check_mem_write): Adjust to iterate over raw breakpoints instead.
9484         (delete_all_breakpoints): Adjust.
9485         (free_all_breakpoints): Mark all breakpoints as uninserted, and
9486         use delete_breakpoint_1.
9487
9488         * mem-break.h (breakpoints_supported): Delete declaration.
9489         (set_gdb_breakpoint_at): Declare.
9490         (gdb_breakpoint_here): Declare.
9491         (delete_breakpoint_at): Delete.
9492         (delete_gdb_breakpoint_at): Declare.
9493
9494         * server.h (struct raw_breakpoint): Forward declare.
9495         (struct process_info): New field `raw_breakpoints'.
9496
9497         * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
9498         breakpoints.
9499
9500 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
9501
9502         * linux-low.c (status_pending_p_callback): Fix comment.
9503         (linux_wait_for_event_1): Move most of the internal breakpoint
9504         handling from here...
9505         (linux_wait_1): ... to here.
9506         (count_events_callback): New.
9507         (select_singlestep_lwp_callback): New.
9508         (select_event_lwp_callback): New.
9509         (cancel_breakpoints_callback): New.
9510         (select_event_lwp): New.
9511         (linux_wait_1): Simplify internal breakpoint handling.  Give equal
9512         priority to all LWPs that have had events that should be reported
9513         to the client.  Cancel breakpoints when about to reporting the
9514         event to the client, not while stopping lwps.  No longer cancel
9515         finished single-steps here.
9516         (cancel_finished_single_step): Delete.
9517         (cancel_finished_single_steps): Delete.
9518
9519 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
9520
9521         * mem-break.c (enum bkpt_type): New.
9522         (struct breakpoint): New field `type'.
9523         (set_breakpoint_at): Change return type to struct breakpoint
9524         pointer.  Set type to `other_breakpoint' by default.
9525         (delete_breakpoint): Rewrite, supporting more than one breakpoint
9526         in the breakpoint list.
9527         (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
9528         (reinsert_breakpoint): Rename to ...
9529         (reinsert_raw_breakpoint): ... this.
9530         (reinsert_breakpoints_at): Adjust.
9531         * mem-break.h (struct breakpoint): Declare.
9532         (set_breakpoint_at): Change return type to struct breakpoint
9533         pointer.
9534
9535 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
9536
9537         * server.c (handle_query): Assign, not compare.
9538
9539 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
9540
9541         Teach linux gdbserver to step-over-breakpoints.
9542
9543         * linux-low.c (can_hardware_single_step): New.
9544         (supports_breakpoints): New.
9545         (handle_extended_wait): If stopping threads, read the stop pc of
9546         the new cloned LWP.
9547         (get_pc): New.
9548         (get_stop_pc): Add `lwp' parameter.  Handle it.  Bail out if the
9549         low target doesn't support retrieving the PC.
9550         (add_lwp): Set last_resume_kind to resume_continue.
9551         (linux_attach_lwp_1): Adjust comments.  Always set stop_expected.
9552         (linux_attach): Don't clear stop_expected.  Set the lwp's
9553         last_resume_kind to resume_stop.
9554         (linux_detach_one_lwp): Don't check for removed breakpoints.
9555         (check_removed_breakpoint): Delete.
9556         (status_pending_p): Rename to ...
9557         (status_pending_p_callback): ... this.  Don't check for removed
9558         breakpoints.  Don't consider threads that are stopped from GDB's
9559         perspective.
9560         (linux_wait_for_lwp): Always read the stop_pc here.
9561         (cancel_breakpoint): New.
9562         (step_over_bkpt): New global.
9563         (linux_wait_for_event_1): Implement stepping over breakpoints.
9564         (gdb_wants_lwp_stopped): New.
9565         (gdb_wants_all_stopped): New.
9566         (linux_wait_1): Tag threads as gdb-wants-stopped.  Cancel finished
9567         single-step traps here.  Store the thread's last reported target
9568         wait status.
9569         (send_sigstop): Don't clear stop_expected.  Always set it,
9570         instead.
9571         (mark_lwp_dead): Remove reference to pending_is_breakpoint.
9572         (cancel_finished_single_step): New.
9573         (cancel_finished_single_steps): New.
9574         (wait_for_sigstop): Don't cancel finished single-step traps here.
9575         (linux_resume_one_lwp): Don't check for removed breakpoints.
9576         Don't set `step' on non-hardware step archs.
9577         (linux_set_resume_request): Ignore resume_stop requests if already
9578         stopping or stopped.  Set the lwp's last_resume_kind.
9579         (resume_status_pending_p): Don't check for removed breakpoints.
9580         (need_step_over_p): New.
9581         (start_step_over): New.
9582         (finish_step_over): New.
9583         (linux_resume_one_thread): Always queue a sigstop for resume_stop
9584         requests.  Clear the thread's last reported target waitstatus.
9585         Don't use the `suspended' flag.  Don't consider pending breakpoints.
9586         (linux_resume): Start a step-over if necessary.
9587         (proceed_one_lwp): New.
9588         (proceed_all_lwps): New.
9589         (unstop_all_lwps): New.
9590         * linux-low.h (struct lwp_info): Rewrite comment for the
9591         `suspended' flag.  Add the `stop_pc' field.  Delete the
9592         `pending_stop_pc' field.  Tweak the `stepping' flag's comment.
9593         Add `'last_resume_kind' and `need_step_over' fields.
9594         * inferiors.c (struct thread_info): Delete, moved elsewhere.
9595         * mem-break.c (struct breakpoint): Delete `reinserting' flag.
9596         Delete `breakpoint_to_reinsert' field.  New flag `inserted'.
9597         (set_raw_breakpoint_at): New.
9598         (set_breakpoint_at): Rewrite to use it.
9599         (reinsert_breakpoint_handler): Delete.
9600         (set_reinsert_breakpoint): New.
9601         (reinsert_breakpoint_by_bp): Delete.
9602         (delete_reinsert_breakpoints): New.
9603         (uninsert_breakpoint): Rewrite.
9604         (uninsert_breakpoints_at): New.
9605         (reinsert_breakpoint): Rewrite.
9606         (reinsert_breakpoints_at): New.
9607         (check_breakpoints): Rewrite.
9608         (breakpoint_here): New.
9609         (breakpoint_inserted_here): New.
9610         (check_mem_read): Adjust.
9611         * mem-break.h (breakpoints_supported, breakpoint_here)
9612         (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
9613         (reinsert_breakpoint_by_bp): Delete declaration.
9614         (delete_reinsert_breakpoints): Declare.
9615         (reinsert_breakpoint): Delete declaration.
9616         (reinsert_breakpoints_at): Declare.
9617         (uninsert_breakpoint): Delete declaration.
9618         (uninsert_breakpoints_at): Declare.
9619         (check_breakpoints): Adjust prototype.
9620         * server.h: Adjust include order.
9621         (struct thread_info): Declare here.  Add a `last_status' field.
9622
9623 2010-03-23  Michael Snyder  <msnyder@vmware.com>
9624
9625         * server.c (crc32): New function.
9626         (handle_query): Add handling for 'qCRC:' request.
9627
9628 2010-03-23  Pedro Alves  <pedro@codesourcery.com>
9629
9630         * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
9631         lwp had been stopped by a watchpoint.
9632
9633 2010-03-16  Pedro Alves  <pedro@codesourcery.com>
9634
9635         * server.h (internal_error): Declare.
9636         (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
9637         * utils.c (internal_error): New function.
9638
9639 2010-03-15  Andreas Schwab  <schwab@redhat.com>
9640
9641         * configure.srv: Fix typo setting srv_regobj.
9642
9643 2010-03-15  Pedro Alves  <pedro@codesourcery.com>
9644
9645         * linux-low.c (fetch_register): Avoid passing a non string literal
9646         format to `error'.
9647         (usr_store_inferior_registers): Ditto.
9648
9649 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
9650
9651         * linux-low.c (linux_write_memory): Bail out early if peeking
9652         memory failed.
9653
9654 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
9655
9656         * linux-low.h (struct lwp_info): New fields
9657         `stopped_by_watchpoint' and `stopped_data_address'.
9658         * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
9659         here, and cache them in the lwp object.
9660         (wait_for_sigstop): Check stopped_by_watchpoint lwp field
9661         directly.
9662         (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
9663         field.
9664         (linux_stopped_by_watchpoint): Rewrite.
9665         (linux_stopped_data_address): Rewrite.
9666
9667 2010-03-06  Simo Melenius  <simo.melenius@iki.fi>
9668
9669         * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
9670         switching the current inferior, not before.
9671
9672 2010-03-01  H.J. Lu  <hongjiu.lu@intel.com>
9673
9674         * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
9675         reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
9676         i386-linux.c and amd64-linux.c.
9677         (reg-i386.o): Removed.
9678         (reg-i386.c): Likewise.
9679         (reg-i386-linux.o): Likewise.
9680         (reg-i386-linux.c): Likewise.
9681         (reg-x86-64.o): Likewise.
9682         (reg-x86-64.c): Likewise.
9683         (reg-x86-64-linux.o): Likewise.
9684         (reg-x86-64-linux.c): Likewise.
9685         (i386.o): New.
9686         (i386.c): Likewise.
9687         (i386-linux.o): Likewise.
9688         (i386-linux.c): Likewise.
9689         (amd64.o): Likewise.
9690         (amd64.c): Likewise.
9691         (amd64-linux.o): Likewise.
9692         (amd64-linux.c): Likewise.
9693
9694         * configure.srv (srv_i386_regobj): New.
9695         (srv_i386_linux_regobj): Likewise.
9696         (srv_amd64_regobj): Likewise.
9697         (srv_amd64_linux_regobj): Likewise.
9698         (srv_i386_32bit_xmlfiles): Likewise.
9699         (srv_i386_64bit_xmlfiles): Likewise.
9700         (srv_i386_xmlfiles): Likewise.
9701         (srv_amd64_xmlfiles): Likewise.
9702         (srv_i386_linux_xmlfiles): Likewise.
9703         (srv_amd64_linux_xmlfiles): Likewise.
9704         (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj.  Set
9705         srv_xmlfiles to $srv_i386_xmlfiles.
9706         (i[34567]86-*-mingw32ce*): Likewise.
9707         (i[34567]86-*-mingw*): Likewise.
9708         (i[34567]86-*-nto*): Likewise.
9709         (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
9710         and $srv_amd64_linux_regobj.  Set srv_xmlfiles to
9711         $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
9712         (x86_64-*-linux*): Likewise.
9713
9714         * linux-x86-low.c (init_registers_x86_64_linux): Removed.
9715         (init_registers_amd64_linux): New.
9716         (x86_arch_setup): Replace init_registers_x86_64_linux with
9717         init_registers_amd64_linux.
9718
9719 2010-02-23  Maxim Kuvyrkov  <maxim@codesourcery.com>
9720
9721         * configure.ac: Check for libdl.  If it is not available link against
9722         static libthread_db.
9723         * configure: Regenerate.
9724
9725 2010-02-22  Pedro Alves  <pedro@codesourcery.com>
9726
9727         PR9605
9728
9729         * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
9730         handing a read watchpoint.
9731         (i386_low_insert_watchpoint): Read watchpoints aren't supported.
9732
9733 2010-02-12  Doug Evans  <dje@google.com>
9734
9735         * linux-low.c (linux_supports_tracefork_flag): Document.
9736         (linux_look_up_symbols): Add comment.
9737
9738 2010-02-03  H.J. Lu  <hongjiu.lu@intel.com>
9739
9740         * regcache.c (supply_register): Clear regcache if buf is NULL.
9741
9742 2010-02-02  Nicolas Roche  <roche@sourceware.org>
9743             Joel Brobecker  <brobecker@adacore.com>
9744
9745         * inferiors.c (find_inferior): Add function documentation.
9746         (unloaded_dll): Handle the case where the unloaded dll has not
9747         been previously registered in the dll list.
9748
9749 2010-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
9750
9751         * linux-arm-low.c (thumb_breakpoint_len): Delete.
9752         (thumb2_breakpoint): New.
9753         (arm_breakpoint_at): Check for Thumb-2 breakpoints.
9754
9755 2010-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
9756
9757         * linux-low.c (get_stop_pc): Check for SIGTRAP.
9758         (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
9759         breakpoints.
9760
9761 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
9762
9763         * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
9764
9765 2010-01-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
9766
9767         * linux-s390-low.c (s390_collect_ptrace_register)
9768         (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
9769
9770 2010-01-21  Doug Evans  <dje@google.com>
9771
9772         * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
9773         (PTRACE_ARG4_TYPE): New macro.
9774         (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
9775         (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
9776         (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
9777         (usr_store_inferior_registers): Ditto.
9778         (linux_read_memory, linux_write_memory): Ditto.
9779         (linux_test_for_tracefork): Ditto.
9780
9781         * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
9782         Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
9783
9784 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
9785
9786         * proc-service.c (ps_lgetregs): Don't refetch registers from the
9787         target.
9788
9789 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
9790
9791         * spu-low.c (spu_fetch_registers, spu_store_registers): Change
9792         prototype to take a regcache.  Adjust.
9793
9794 2010-01-20  Pedro Alves  <pedro@codesourcery.com>
9795
9796         * regcache.h (struct thread_info): Forward declare.
9797         (struct regcache): New.
9798         (new_register_cache): Adjust prototype.
9799         (get_thread_regcache): Declare.
9800         (free_register_cache): Adjust prototype.
9801         (registers_to_string, registers_from_string): Ditto.
9802         (supply_register, supply_register_by_name, collect_register)
9803         (collect_register_as_string, collect_register_by_name): Ditto.
9804         * regcache.c (struct inferior_regcache_data): Delete.
9805         (get_regcache): Rename to ...
9806         (get_thread_regcache): ... this.  Adjust.  Switch inferior before
9807         fetching registers.
9808         (regcache_invalidate_one): Adjust.
9809         (regcache_invalidate): Fix prototype.
9810         (new_register_cache): Return the new register cache.
9811         (free_register_cache): Change prototype.
9812         (realloc_register_cache): Adjust.
9813         (registers_to_string): Change prototype to take a regcache.  Adjust.
9814         (registers_from_string): Ditto.
9815         (register_data): Ditto.
9816         (supply_register): Ditto.
9817         (supply_register_by_name): Ditto.
9818         (collect_register): Ditto.
9819         (collect_register_as_string): Ditto.
9820         (collect_register_by_name): Ditto.
9821         * server.c (process_serial_event): Adjust.
9822         * linux-low.h (regset_fill_func, regset_store_func): Change
9823         prototype.
9824         (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
9825         Change prototype.
9826         * linux-low.c (get_stop_pc): Adjust.
9827         (check_removed_breakpoint): Adjust.
9828         (linux_wait_for_event): Adjust.
9829         (linux_resume_one_lwp): Adjust.
9830         (fetch_register): Add regcache parameter.  Adjust.
9831         (usr_store_inferior_registers): Ditto.
9832         (regsets_fetch_inferior_registers): Ditto.
9833         (regsets_store_inferior_registers): Ditto.
9834         (linux_fetch_registers, linux_store_registers): Ditto.
9835         * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
9836         regcache.  Adjust.
9837         (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
9838         Ditto.
9839         * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
9840         prototype to take a regcache.
9841         (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
9842         * remote-utils.c (convert_ascii_to_int, outreg)
9843         (prepare_resume_reply): Change prototype to take a regcache.
9844         Adjust.
9845         * target.h (struct target_ops) <fetch_registers, store_registers>:
9846         Change prototype to take a regcache.
9847         (fetch_inferior_registers, store_inferior_registers): Change
9848         prototype to take a regcache.  Adjust.
9849         * proc-service.c (ps_lgetregs): Adjust.
9850         * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
9851         (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
9852         (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
9853         take a regcache.  Adjust.
9854         * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
9855         (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
9856         (arm_store_vfpregset, arm_get_pc, arm_set_pc):
9857         (arm_breakpoint_at): Change prototype to take a regcache.  Adjust.
9858         * linux-cris-low.c (cris_get_pc, cris_set_pc)
9859         (cris_cannot_fetch_register):
9860         (cris_breakpoint_at): Change prototype to take a regcache.
9861         Adjust.
9862         * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
9863         cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
9864         to take a regcache.  Adjust.
9865         (cris_breakpoint_at, cris_insert_point, cris_remove_point):
9866         Adjust.
9867         * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
9868         take a regcache.  Adjust.
9869         * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
9870         (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
9871         (m68k_set_pc): Change prototype to take a regcache.  Adjust.
9872         * linux-mips-low.c (mips_get_pc):
9873         (mips_set_pc): Change prototype to take a regcache.  Adjust.
9874         (mips_reinsert_addr): Adjust.
9875         (mips_collect_register): Change prototype to take a regcache.
9876         Adjust.
9877         (mips_supply_register):
9878         (mips_collect_register_32bit, mips_supply_register_32bit)
9879         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9880         (mips_store_fpregset): Ditto.
9881         * linux-ppc-low.c (ppc_supply_ptrace_register)
9882         (ppc_supply_ptrace_register): Ditto.
9883         (parse_spufs_run): Adjust.
9884         (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9885         (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9886         (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9887         take a regcache.  Adjust.
9888         * linux-s390-low.c (s390_collect_ptrace_register)
9889         (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9890         (s390_set_pc): Change prototype to take a regcache.  Adjust.
9891         (s390_arch_setup): Adjust.
9892         * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9893         (sh_fill_gregset): Change prototype to take a regcache.  Adjust.
9894         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9895         (sparc_fill_gregset, sparc_store_gregset_from_stack)
9896         (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9897         regcache.  Adjust.
9898         (sparc_breakpoint_at): Adjust.
9899         * linux-xtensa-low.c (xtensa_fill_gregset):
9900         (xtensa_store_gregset):
9901         (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9902         (xtensa_set_pc): Change prototype to take a regcache.  Adjust.
9903         * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9904         prototype to take a regcache.  Adjust.
9905         * win32-arm-low.c (arm_fetch_inferior_register)
9906         (arm_store_inferior_register): Change prototype to take a
9907         regcache.  Adjust.
9908         * win32-i386-low.c (i386_fetch_inferior_register)
9909         (i386_store_inferior_register): Change prototype to take a
9910         regcache.  Adjust.
9911         * win32-low.c (child_fetch_inferior_registers)
9912         (child_store_inferior_registers): Change prototype to take a
9913         regcache.  Adjust.
9914         (win32_wait): Adjust.
9915         (win32_fetch_inferior_registers): Change prototype to take a
9916         regcache.  Adjust.
9917         (win32_store_inferior_registers): Adjust.
9918         * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9919         store_inferior_register>: Change prototype to take a regcache.
9920
9921 2010-01-20  Doug Evans  <dje@google.com>
9922
9923         * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9924         #ifdef.
9925         (linux_wait_for_event1, linux_init_signals): Ditto.
9926         (W_STOPCODE): Provide definition if missing.
9927
9928 2010-01-13  Vladimir Prus  <vladimir@codesourcery.com>
9929
9930         * linux-low.c (linux_core_of_thread): New.
9931         (compare_ints, show_process, list_threads): New.
9932         (linux_qxfer_osdata): Report threads and cores.
9933         (linux_target_op): Register linux_core_of_thread.
9934         * remote-utils.c (prepare_resume_reply): Report the core.
9935         (buffer_xml_printf): Support %d specifier.
9936         * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9937         New.
9938         (handle_query): Handle qXfer:threads.  Announce availability
9939         thereof.
9940         * target.h (struct target_ops): New field core_of_thread.
9941
9942 2010-01-04  Ulrich Weigand  <uweigand@de.ibm.com>
9943
9944         * Makefile.in (clean): Remove new generated files.
9945         (reg-s390.o, reg-s390.c): Remove rules.
9946         (reg-s390x.o, reg-s390x.c): Likewise.
9947         (s390-linux32.o, s390-linux32.c): Add rules.
9948         (s390-linux64.o, s390-linux64.c): Likewise.
9949         (s390x-linux64.o, s390x-linux64.c): Likewise.
9950         * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9951         * linux-s390-low.c: Include <elf.h>.
9952         (HWCAP_S390_HIGH_GPRS): Define if undefined.
9953         (init_registers_s390): Remove prototype.
9954         (init_registers_s390x): Likewise.
9955         (init_registers_s390_linux32): Add prototype.
9956         (init_registers_s390_linux64): Likewise.
9957         (init_registers_s390x_linux64): Likewise.
9958         (s390_num_regs_3264): New define.
9959         (s390_regmap_3264): New global variable.
9960         (s390_cannot_fetch_register): Remove obsolete check.
9961         (s390_cannot_store_register): Likewise.
9962         (s390_collect_ptrace_register): Handle upper/lower register halves.
9963         (s390_supply_ptrace_register): Likewise.
9964         (s390_fill_gregset): Update to register number changes.
9965         (s390_get_hwcap): New routine.
9966         (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9967         Install appropriate regmap and register set.
9968
9969 2010-01-01  Joel Brobecker  <brobecker@adacore.com>
9970
9971         * server.c (gdbserver_version): Update copyright year to 2010.
9972         * gdbreplay.c (gdbreplay_version): Likewise.
9973
9974 2009-12-28  Doug Evans  <dje@google.com>
9975
9976         * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9977         elf/external.h.  Include <elf.h> instead but only if necessary.
9978
9979 2009-12-28  Pedro Alves  <pedro@codesourcery.com>
9980
9981         * linux-low.c (linux_remove_process): Remove `detaching'
9982         parameter.  Don't release/detach from thread_db here.
9983         (linux_kill): Release/detach from thread_db here, ...
9984         (linux_detach): ... and here, before actually detaching.
9985         (linux_wait_1): ... and here, when a process exits.
9986         * thread-db.c (any_thread_of): New.
9987         (thread_db_free): Switch the current inferior to a thread of the
9988         passed in process.
9989
9990 2009-12-21  Doug Evans  <dje@google.com>
9991
9992         * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9993
9994         * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9995         Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9996         warning ifndef __NR_tkill.  Move setting of errno there too.
9997         Delete unnecessary resetting of errno after syscall.
9998         Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9999
10000         * configure.ac: Check for dladdr.
10001         * config.in: Regenerate.
10002         * configure: Regenerate.
10003         * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
10004         (try_thread_db_load): Update.
10005
10006         * linux-low.c (my_waitpid): Delete unnecessary prototype.
10007
10008 2009-12-18  Doug Evans  <dje@google.com>
10009
10010         * event-loop.c: Include unistd.h if it exists.
10011
10012         * linux-low.c (my_waitpid): Move definition away from being in
10013         between linux_tracefork_child/linux_test_for_tracefork.
10014
10015         * gdb_proc_service.h (psaddr_t): Fix type.
10016         * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
10017         signature to match glibc.
10018
10019 2009-12-16  Doug Evans  <dje@google.com>
10020
10021         * linux-low.c (linux_read_memory): Fix argument to read.
10022
10023 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
10024
10025         * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
10026         events, don't leave current_inferior pointing at null.
10027
10028 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
10029
10030         * win32-low.c (LOG): Delete.
10031         (OUTMSG): Output to stderr.
10032         (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
10033         on compile time LOG macro.
10034         (win32_wait): Fix debug output.
10035
10036 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
10037
10038         * win32-low.c (win32_add_one_solib): If the dll name is
10039         "ntdll.dll", prepend the system directory to the dll path.
10040
10041 2009-11-17  Daniel Jacobowitz  <dan@codesourcery.com>
10042
10043         * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
10044
10045 2009-11-17  Nathan Sidwell  <nathan@codesourcery.com>
10046             Vladimir Prus  <vladimir@codesourcery.com>
10047
10048         * Makefile.in (reg-cf.o, reg-cf.c): New targets.
10049         * configure.ac: Check for __mcoldfire__ and set
10050         gdb_cv_m68k_is_coldfire.
10051         * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
10052         reg-cf.o and reg-m68k.o.
10053         * configure: Regenerated.
10054
10055 2009-11-16  Pedro Alves  <pedro@codesourcery.com>
10056
10057         * linux-low.c (linux_remove_process): Add `detaching' parameter.
10058         Pass it to thread_db_free.
10059         (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
10060         proper `detaching' argument to linux_remove_process.
10061         * linux-low.h (thread_db_free): Add `detaching' parameter.
10062         * thread-db.c (thread_db_init): Pass false as `detaching' argument
10063         to thread_db_free.
10064         (thread_db_free): Add `detaching' parameter.  Only
10065         call td_ta_clear_event if detaching from process.
10066
10067 2009-11-12  Maxim Kuvyrkov  <maxim@codesourcery.com>
10068
10069         * thread-db.c (thread_db_free): Fix typo.
10070
10071 2009-11-11  Paul Pluzhnikov  <ppluzhnikov@google.com>
10072
10073         PR gdb/10838
10074         * thread-db.c (thread_db_free): Call td_ta_clear_event.
10075
10076 2009-11-03  Nathan Sidwell  <nathan@codesourcery.com>
10077
10078         * configure.ac (i[34567]86-*): Check if we're targetting x86-64
10079         with an i686 compiler.
10080         * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
10081         needed.
10082         * configure: Rebuilt.
10083
10084 2009-10-29  Sandra Loosemore  <sandra@codesourcery.com>
10085
10086         PR gdb/10783
10087
10088         * server.c (handle_search_memory_1): Correct read_addr initialization
10089         in loop for searching subsequent chunks.
10090
10091 2009-10-29  Paul Pluzhnikov  <ppluzhnikov@google.com>
10092
10093         * configure.ac: New --with-libthread-db option.
10094         * thread-db.c: Allow direct dependence on libthread_db.
10095         (thread_db_free): Adjust.
10096         * config.in: Regenerate.
10097         * configure: Likewise.
10098
10099 2009-10-28  Paul Pluzhnikov  <ppluzhnikov@google.com>
10100
10101         PR gdb/10757
10102         * thread-db.c (attach_thread): New function.
10103         (maybe_attach_thread): Return success/failure.
10104         (find_new_threads_callback): Adjust.
10105         (thread_db_find_new_threads): Loop until no new threads.
10106
10107 2009-10-13  Pedro Alves  <pedro@codesourcery.com>
10108
10109         * proc-service.c (ps_lgetregs): Formatting.
10110
10111 2009-10-08  Paul Pluzhnikov  <ppluzhnikov@google.com>
10112
10113         * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
10114         * configure.ac: Adjust.
10115         * linux-low.h (struct process_info_private): Move members to struct
10116         thread_db.
10117         (thread_db_free, thread_db_handle_monitor_command): New prototype.
10118         * linux-low.c (linux_remove_process): Adjust.
10119         (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
10120         * server.c (handle_query): Move code ...
10121         (handle_monitor_command): ... here. New function.
10122         * target.h (struct target_ops): New member.
10123         * thread-db.c (struct thread_db): New.
10124         (libthread_db_search_path): New variable.
10125         (thread_db_create_event, thread_db_enable_reporting)
10126         (find_one_thread, maybe_attach_thread, find_new_threads_callback)
10127         (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
10128         (try_thread_db_load_1, dladdr_to_soname): New functions.
10129         (try_thread_db_load, thread_db_load_search): New functions.
10130         (thread_db_init): Search for libthread_db.
10131         (thread_db_free): New function.
10132         (thread_db_handle_monitor_command): Likewise.
10133         * config.in: Regenerate.
10134         * configure: Regenerate.
10135
10136 2009-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
10137
10138         * spu-low.c (spu_kill): Wait for inferior to terminate.
10139         Call clear_inferiors.
10140         (spu_detach): Call clear_inferiors.
10141
10142 2009-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10143
10144         * aclocal.m4: Regenerate.
10145         * config.in: Likewise.
10146         * configure: Likewise.
10147
10148 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
10149
10150         * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
10151         (parse_spufs_run): New function.
10152         (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
10153         (ppc_breakpoint_at): Handle SPU breakpoints.
10154
10155 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
10156
10157         * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
10158         (SPUFS_MAGIC): Define.
10159         (spu_enumerate_spu_ids): New function.
10160         (linux_qxfer_spu): New function.
10161         (linux_target_ops): Install linux_qxfer_spu.
10162
10163 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
10164
10165         * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
10166         and powerpc-cell64l.o to srv_regobj.  Add rs6000/powerpc-cell32l.xml
10167         and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
10168         * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
10169         (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
10170         (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
10171         * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
10172         (init_registers_powerpc_cell32l): Add prototype.
10173         (init_registers_powerpc_cell64l): Likewise.
10174         (ppc_arch_setup): Detect Cell/B.E. architecture.
10175
10176 2009-07-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10177
10178         * Makefile.in (datarootdir): New variable.
10179
10180 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
10181
10182         * linux-low.c (linux_write_memory): Update debugging output.
10183         * Makefile.in (clean): Add new descriptions.
10184         (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
10185         (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
10186         * configure.srv: Add new files for arm*-*-linux*.
10187         * linux-arm-low.c: Add new declarations.
10188         (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
10189         (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
10190         (HWCAP_VFPv3D16): New.
10191         (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
10192         instead of __IWMMXT__.
10193         (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
10194         (arm_arch_setup): New.
10195         (target_regsets): Remove #ifdef.  Add VFP regset.
10196         (the_low_target): Use arm_arch_setup.
10197
10198 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
10199
10200         * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
10201         the main thread again.
10202
10203 2009-07-06  Aleksandar Ristovski  <aristovski@qnx.com>
10204
10205         Adding Neutrino gdbserver.
10206         * configure: Regenerated.
10207         * configure.ac: Add case for srv_qnx and set LIBS accordingly.
10208         * configure.srv (i[34567]86-*-nto*): New target.
10209         * nto-low.c, nto-low.h, nto-x86-low.c: New files.
10210         * remote-utils.c [__QNX__]: Include sys/iomgr.h
10211         (nto_comctrl) [__QNX__]: New function.
10212         (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
10213
10214 2009-07-05  Danny Backx  <dannybackx@users.sourceforge.net>
10215
10216         * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
10217         srv_tgtobj.
10218
10219 2009-07-04  Danny Backx  <dannybackx@users.sourceforge.net>
10220             Pedro Alves  <pedro@codesourcery.com>
10221
10222         * win32-i386-low.c (i386_get_thread_context): Handle systems that
10223         don't support CONTEXT_EXTENDED_REGISTERS.
10224         (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
10225         (the_low_target): Install them.
10226         * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
10227         failing with ERROR_PIPE_NOT_CONNECTED.
10228
10229 2009-06-30  Doug Evans  <dje@google.com>
10230             Pierre Muller  <muller@ics.u-strasbg.fr>
10231
10232         Add h/w watchpoint support to x86-linux, win32-i386.
10233         * Makefile.in (SFILES): Add i386-low.c
10234         (i386_low_h): Define.
10235         (i386-low.o): Add dependencies.
10236         (linux-x86-low.o): Add i386-low.h dependency.
10237         (win32-i386-low.o): Ditto.
10238         * i386-low.c: New file.
10239         * i386-low.h: New file.
10240         * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
10241         (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
10242         * linux-low.c (linux_add_process): Initialize arch_private.
10243         (linux_remove_process): Free arch_private.
10244         (add_lwp): Initialize arch_private.
10245         (delete_lwp): Free arch_private.
10246         (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
10247         provided.
10248         * linux-low.h (process_info_private): New member arch_private.
10249         (lwp_info): New member arch_private.
10250         (linux_target_ops): New members new_process, new_thread,
10251         prepare_to_resume.
10252         (ptid_of): New macro.
10253         * linux-x86-low.c: Include stddef.h, i386-low.h.
10254         (arch_process_info): New struct.
10255         (arch_lwp_info): New struct.
10256         (x86_linux_dr_get, x86_linux_dr_set): New functions.
10257         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10258         (i386_dr_low_get_status): New function.
10259         (x86_insert_point, x86_remove_point): New functions.
10260         (x86_stopped_by_watchpoint): New function.
10261         (x86_stopped_data_address): New function.
10262         (x86_linux_new_process, x86_linux_new_thread): New functions.
10263         (x86_linux_prepare_to_resume): New function.
10264         (the_low_target): Add entries for insert_point, remove_point,
10265         stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
10266         prepare_to_resume.
10267         * server.c (debug_hw_points): New global.
10268         (monitor_show_help): Document set debug-hw-points.
10269         (handle_query): Process "set debug-hw-points".
10270         * server.h (debug_hw_points): Declare.
10271         (paddress): Declare.
10272         * utils.c (NUMCELLS, CELLSIZE): New macros.
10273         (get_sell, xsnprintf, paddress): New functions.
10274         * win32-arm-low.c (the_low_target): Add entries for insert_point,
10275         remove_point, stopped_by_watchpoint, stopped_data_address.
10276         * win32-i386-low.c: Include i386-low.h.
10277         (debug_reg_state): Replaces dr.
10278         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10279         (i386_dr_low_get_status): New function.
10280         (i386_insert_point, i386_remove_point): New functions.
10281         (i386_stopped_by_watchpoint): New function.
10282         (i386_stopped_data_address): New function.
10283         (i386_initial_stuff): Update.
10284         (get_thread_context,set_thread_context,i386_thread_added): Update.
10285         (the_low_target): Add entries for insert_point,
10286         remove_point, stopped_by_watchpoint, stopped_data_address.
10287         * win32-low.c (win32_insert_watchpoint): New function.
10288         (win32_remove_watchpoint): New function.
10289         (win32_stopped_by_watchpoint): New function.
10290         (win32_stopped_data_address): New function.
10291         (win32_target_ops): Add entries for insert_watchpoint,
10292         remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
10293         * win32-low.h (win32_target_ops): New members insert_point,
10294         remove_point, stopped_by_watchpoint, stopped_data_address.
10295
10296 2009-06-25  Pedro Alves  <pedro@codesourcery.com>
10297
10298         * server.c (process_serial_event): Re-return unsupported, not
10299         error, if the type isn't recognized.  Re-allow supporting only
10300         insert or remove packets.  Also call require_running for
10301         breakpoints.  Add missing break statement to default case.  Tidy.
10302         * target.h (struct target_ops): Rename insert_watchpoint to
10303         insert_point, and remove_watchpoint to remove_point.
10304
10305         * linux-low.h (struct linux_target_ops): Likewise.
10306         * linux-low.c (linux_insert_watchpoint): Rename to ...
10307         (linux_insert_point): ... this.  Adjust.
10308         (linux_remove_watchpoint): Rename to ...
10309         (linux_remove_point): ... this.  Adjust.
10310         (linux_target_ops): Adjust.
10311         * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
10312         (cris_insert_point): ... this.
10313         (cris_remove_watchpoint): Rename to ...
10314         (cris_remove_point): ... this.
10315         (the_low_target): Adjust.
10316
10317 2009-06-24  Pierre Muller  <muller@ics.u-strasbg.fr>
10318
10319         * server.c (handle_v_kill): Pass signal_pid to
10320         kill_inferior if multi_process is zero.
10321
10322 2009-06-23  Aleksandar Ristovski  <aristovski@qnx.com>
10323
10324         * server.c (process_serial_event): Add support for Z0 and Z1 packet.
10325         * target.h (target_ops): Comment for *_watchpoint to make it clear
10326         the functions can get types '0' and '1'.
10327
10328 2009-06-22  Aleksandar Ristovski  <aristovski@qnx.com>
10329
10330         * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
10331         * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
10332         * regcache.c (get_regcache): Likewise.
10333         * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
10334         * win32-low.c (child_fetch_inferior_registers): Remove check for
10335         regno 0.
10336
10337 2009-06-19  Aleksandar Ristovski  <aristovski@qnx.com>
10338             Pedro Alves <pedro@codesourcery.com>
10339
10340         * target.h (struct target_ops) <supports_multi_process>: New
10341         callback.
10342         (target_supports_multi_process): New.
10343         * server.c (handle_query): Even if GDB reports support, only
10344         enable multi-process if the target also supports it.  Report
10345         multi-process support only if the target backend supports it.
10346         * linux-low.c (linux_supports_multi_process): New function.
10347         (linux_target_ops): Install it as target_supports_multi_process
10348         callback.
10349
10350 2009-05-24  Doug Evans  <dje@google.com>
10351
10352         Global renaming of find_thread_pid to find_thread_ptid.
10353         * server.h (find_thread_ptid): Renamed from find_thread_pid.
10354         * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
10355         All callers updated.
10356
10357         * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
10358         to resume the newly created thread, don't call ptrace (PTRACE_CONT)
10359         directly.
10360
10361         * linux-low.c (get_stop_pc): Print pc if debug_threads.
10362         (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
10363         (linux_resume_one_lwp): Ditto.
10364
10365 2009-05-23  Doug Evans  <dje@google.com>
10366
10367         * linux-low.c (linux_resume_one_lwp): Change type of first arg
10368         from struct inferior_list_entry * to struct lwp_info *.
10369         All callers updated.
10370
10371 2009-05-13  Doug Evans  <dje@google.com>
10372
10373         * linux-x86-low.c: Don't include assert.h.
10374         (x86_siginfo_fixup): Use fatal, not assert.
10375         (x86_arch_setup): Fix comment.
10376
10377 2009-05-12  Doug Evans  <dje@google.com>
10378
10379         Biarch support for i386/amd64 gdbserver.
10380         * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
10381         Add linux-x86-low.c.
10382         (linux-i386-low.o, linux-x86-64-low.o): Delete.
10383         (linux-x86-low.o): Add.
10384         * linux-x86-64-low.c: Delete.
10385         * linux-i386-low.c: Delete.
10386         * linux-x86-low.c: New file.
10387         * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
10388         linux-x86-low.o.
10389         (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
10390         linux-x86-low.o.
10391         (x86_64-linux srv_regobj): Add reg-i386-linux.o.
10392         * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
10393         (linux_child_pid_to_exec_file): New function.
10394         (elf_64_header_p, elf_64_file_p): New functions.
10395         (siginfo_fixup): New function.
10396         (linux_xfer_siginfo): New local inf_siginfo.  Call siginfo_fixup to
10397         give target a chance to convert layout.
10398         * linux-low.h (linux_target_ops): New member siginfo_fixup.
10399         (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
10400
10401 2009-05-07  Doug Evans  <dje@google.com>
10402
10403         * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
10404         (regsets_store_inferior_registers): Ditto.
10405
10406 2009-05-06  Pedro Alves  <pedro@codesourcery.com>
10407
10408         PR server/10048
10409
10410         * linux-low.c (must_set_ptrace_flags): Delete.
10411         (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
10412         of the global.
10413         (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here.  Set
10414         `lwp->must_set_ptrace_flags' instead.
10415         (linux_wait_for_event_1): Set ptrace options here.
10416         (linux_wait_1): ... not here.
10417
10418 2009-04-30  Doug Evans  <dje@google.com>
10419
10420         * inferiors.c (started_inferior_callback): New function.
10421         (attached_inferior_callback): New function.
10422         (have_started_inferiors_p, have_attached_inferiors_p): New functions.
10423         * server.c (print_started_pid, print_attached_pid): New functions.
10424         (detach_or_kill_for_exit): New function.
10425         (main): Call it instead of for_each_inferior (kill_inferior_callback).
10426         * server.h (have_started_inferiors_p): Declare.
10427         (have_attached_inferiors_p): Declare.
10428
10429         * inferiors.c (remove_process): Fix memory leak, free process.
10430         * linux-low.c (linux_remove_process): New function.
10431         (linux_kill): Call it instead of remove_process.
10432         (linux_detach, linux_wait_1): Ditto.
10433
10434 2009-04-19  Danny Backx  <dannybackx@users.sourceforge.net>
10435
10436         * configure.srv: Add x86 Windows CE target.
10437
10438 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
10439
10440         * inferiors.c (get_thread_process): Make global.
10441         * server.h (get_thread_process): Add prototype.
10442         * thread-db.c (find_one_thread): Use get_thread_process
10443         instead of current_process.
10444         (thread_db_get_tls_address): Do not crash if called when
10445         thread layer is not yet initialized.
10446
10447 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
10448
10449         * remote-utils.c (prepare_resume_reply): Null-terminate packet.
10450         * spu-low.c (current_tid): Rename to ...
10451         (current_ptid): ... this.
10452         (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
10453         spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
10454         ptid_get_lwp (current_ptid) instead of current_tid.
10455         (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
10456         instead of current_tid.  Use find_process_pid to verify pid
10457         argument is valid.  Pass proper argument to remove_process.
10458         (spu_thread_alive): Compare current_ptid instead of current_tid.
10459         (spu_resume): Likewise.
10460
10461 2009-04-02  Pedro Alves  <pedro@codesourcery.com>
10462
10463         * linux-low.c (usr_store_inferior_registers): Declare local `pid'
10464         variable.
10465
10466 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
10467
10468         Implement the multiprocess extensions, and add linux multiprocess
10469         support.
10470
10471         * server.h (ULONGEST): Declare.
10472         (struct ptid, ptid_t): New.
10473         (minus_one_ptid, null_ptid): Declare.
10474         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10475         (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
10476         (struct inferior_list_entry): Change `id' type from unsigned from
10477         to ptid_t.
10478         (struct sym_cache, struct breakpoint, struct
10479         process_info_private): Forward declare.
10480         (struct process_info): Declare.
10481         (current_process): Declare.
10482         (all_processes): Declare.
10483         (initialize_inferiors): Declare.
10484         (add_thread): Adjust to use ptid_t.
10485         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
10486         (add_process, remove_process, find_thread_pid): Declare.
10487         (find_inferior_id): Adjust to use ptid_t.
10488         (cont_thread, general_thread, step_thread): Change type to ptid_t.
10489         (multi_process): Declare.
10490         (push_event): Adjust to use ptid_t.
10491         (read_ptid, write_ptid): Declare.
10492         (prepare_resume_reply): Adjust to use ptid_t.
10493         (clear_symbol_cache): Declare.
10494         * inferiors.c (all_processes): New.
10495         (null_ptid, minus_one_ptid): New.
10496         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10497         (ptid_get_tid, ptid_equal, ptid_is_pid): New.
10498         (add_thread): Change unsigned long to ptid.  Remove gdb_id
10499         parameter.  Adjust.
10500         (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
10501         (gdb_id_to_thread): Rename to ...
10502         (find_thread_pid): ... this.  Change unsigned long to ptid.
10503         (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
10504         (loaded_dll, pull_pid_from_list): Adjust.
10505         (add_process, remove_process, find_process_pid)
10506         (get_thread_process, current_process, initialize_inferiors): New.
10507         * target.h (struct thread_resume) <thread>: Change type to ptid_t.
10508         (struct target_waitstatus) <related_pid>: Ditto.
10509         (struct target_ops) <kill, detach>: Add `pid' argument.  Change
10510         return type to int.
10511         (struct target_ops) <join>: Add `pid' argument.
10512         (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
10513         (struct target_ops) <wait>: Add `ptid' field.  Change return type
10514         to ptid.
10515         (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
10516         (mywait): Add `ptid' argument.  Change return type to ptid_t.
10517         (target_pid_to_str): Declare.
10518         * target.c (set_desired_inferior): Adjust to use ptids.
10519         (mywait): Add new `ptid' argument.  Adjust.
10520         (target_pid_to_str): New.
10521         * mem-break.h (free_all_breakpoints): Declare.
10522         * mem-break.c (breakpoints): Delelete.
10523         (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
10524         (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
10525         to use per-process breakpoint list.
10526         (free_all_breakpoints): New.
10527         * remote-utils.c (struct sym_cache) <name>: Drop `const'.
10528         (symbol_cache, all_symbols_looked_up): Delete.
10529         (hexchars): New.
10530         (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
10531         read_ptid): New.
10532         (prepare_resume_reply): Change ptid argument's type from unsigned
10533         long to ptid_t.  Adjust.  Implement W;process and X;process.
10534         (free_sym_cache, clear_symbol_cache): New.
10535         (look_up_one_symbol): Adjust to per-process symbol cache.  *
10536         * server.c (cont_thread, general_thread, step_thread): Change type
10537         to ptid_t.
10538         (attached): Delete.
10539         (multi_process): New.
10540         (last_ptid): Change type to ptid_t.
10541         (struct vstop_notif) <ptid>: Change type to ptid_t.
10542         (queue_stop_reply, push_event): Change `ptid' argument's type to
10543         ptid_t.
10544         (discard_queued_stop_replies): Add `pid' argument.
10545         (start_inferior): Adjust to use ptids.  Adjust to mywait interface
10546         changes.  Don't reference the `attached' global.
10547         (attach_inferior): Adjust to mywait interface changes.
10548         (handle_query): Adjust to use ptids.  Parse GDB's qSupported
10549         features.  Handle and report "multiprocess+".  Handle
10550         "qAttached:PID".
10551         (handle_v_cont): Adjust to use ptids.  Adjust to mywait interface
10552         changes.
10553         (handle_v_kill): New.
10554         (handle_v_stopped): Adjust to use target_pid_to_str.
10555         (handle_v_requests): Allow multiple attaches and runs when
10556         multiprocess extensions are in effect.  Handle "vKill".
10557         (myresume): Adjust to use ptids.
10558         (queue_stop_reply_callback): Add `arg' parameter.  Handle it.
10559         (handle_status): Adjust to discard_queued_stop_replies interface
10560         change.
10561         (first_thread_of, kill_inferior_callback)
10562         (detach_or_kill_inferior_callback, join_inferiors_callback): New.
10563         (main): Call initialize_inferiors.  Adjust to use ptids, killing
10564         and detaching from all inferiors.  Handle multiprocess packet
10565         variants.
10566         * linux-low.h: Include gdb_proc_service.h.
10567         (struct process_info_private): New.
10568         (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
10569         <lwpid_of>: Use ptid_get_lwp.
10570         (get_lwp_thread): Adjust.
10571         (struct lwp_info): Add `dead' member.
10572         (find_lwp_pid): Declare.
10573         * linux-low.c (thread_db_active): Delete.
10574         (new_inferior): Adjust comment.
10575         (inferior_pid): Delete.
10576         (linux_add_process): New.
10577         (handle_extended_wait): Adjust.
10578         (add_lwp): Change unsigned long to ptid.
10579         (linux_create_inferior): Add process to processes table.  Adjust
10580         to use ptids.  Don't set new_inferior here.
10581         (linux_attach_lwp): Rename to ...
10582         (linux_attach_lwp_1): ... this.  Add `initial' argument.  Handle
10583         it.  Adjust to use ptids.
10584         (linux_attach_lwp): New.
10585         (linux_attach): Add process to processes table.  Don't set
10586         new_inferior here.
10587         (struct counter): New.
10588         (second_thread_of_pid_p, last_thread_of_process_p): New.
10589         (linux_kill_one_lwp): Add `args' parameter.  Handle it.  Adjust to
10590         multiple processes.
10591         (linux_kill): Add `pid' argument.  Handle it.  Adjust to multiple
10592         processes.  Remove process from process table.
10593         (linux_detach_one_lwp): Add `args' parameter.  Handle it.  Adjust
10594         to multiple processes.
10595         (any_thread_of): New.
10596         (linux_detach): Add `pid' argument, and handle it.  Remove process
10597         from processes table.
10598         (linux_join): Add `pid' argument.  Handle it.
10599         (linux_thread_alive): Change unsighed long argument to ptid_t.
10600         Consider dead lwps as not being alive.
10601         (status_pending_p): Rename `dummy' argument to `arg'.  Filter out
10602         threads we're not interested in.
10603         (same_lwp, find_lwp_pid): New.
10604         (linux_wait_for_lwp): Change `pid' argument's type from int to
10605         ptid_t.  Adjust.
10606         (linux_wait_for_event): Rename to ...
10607         (linux_wait_for_event_1): ... this.  Change `pid' argument's type
10608         from int to ptid_t.  Adjust.
10609         (linux_wait_for_event): New.
10610         (linux_wait_1): Add `ptid' argument.  Change return type to
10611         ptid_t.  Adjust.  Use last_thread_of_process_p.  Remove processes
10612         that exit from the process table.
10613         (linux_wait): Add `ptid' argument.  Change return type to ptid_t.
10614         Adjust.
10615         (mark_lwp_dead): New.
10616         (wait_for_sigstop): Adjust to use ptids.  If a process exits while
10617         stopping all threads, mark its main lwp as dead.
10618         (linux_set_resume_request, linux_resume_one_thread): Adjust to use
10619         ptids.
10620         (fetch_register, usr_store_inferior_registers)
10621         (regsets_fetch_inferior_registers)
10622         (regsets_store_inferior_registers, linux_read_memory)
10623         (linux_write_memory): Inline `inferior_pid'.
10624         (linux_look_up_symbols): Adjust to use per-process
10625         `thread_db_active'.
10626         (linux_request_interrupt): Adjust to use ptids.
10627         (linux_read_auxv): Inline `inferior_pid'.
10628         (initialize_low): Don't reference thread_db_active.
10629         * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
10630         * proc-service.c (ps_lgetregs): Use find_lwp_pid.
10631         (ps_getpid): Return the pid of the current inferior.
10632         * thread-db.c (proc_handle, thread_agent): Delete.
10633         (thread_db_create_event, thread_db_enable_reporting): Adjust to
10634         per-process data.
10635         (find_one_thread): Change argument type to ptid_t.  Adjust to
10636         per-process data.
10637         (maybe_attach_thread): Adjust to per-process data and ptids.
10638         (thread_db_find_new_threads): Ditto.
10639         (thread_db_init): Ditto.
10640         * spu-low.c (spu_create_inferior, spu_attach): Add process to
10641         processes table.  Adjust to use ptids.
10642         (spu_kill, spu_detach): Adjust interface.  Remove process from
10643         processes table.
10644         (spu_join, spu_thread_alive): Adjust interface.
10645         (spu_wait): Adjust interface.  Remove process from processes
10646         table.  Adjust to use ptids.
10647         * win32-low.c (current_inferior_tid): Delete.
10648         (current_inferior_ptid): New.
10649         (debug_event_ptid): New.
10650         (thread_rec): Take a ptid.  Adjust.
10651         (child_add_thread): Add `pid' argument.  Adjust to use ptids.
10652         (child_delete_thread): Ditto.
10653         (do_initial_child_stuff): Add `attached' argument.  Add process to
10654         processes table.
10655         (child_fetch_inferior_registers, child_store_inferior_registers):
10656         Adjust.
10657         (win32_create_inferior): Pass 0 to do_initial_child_stuff.
10658         (win32_attach): Pass 1 to do_initial_child_stuff.
10659         (win32_kill): Adjust interface.  Remove process from processes
10660         table.
10661         (win32_detach): Ditto.
10662         (win32_join): Adjust interface.
10663         (win32_thread_alive): Take a ptid.
10664         (win32_resume): Adjust to use ptids.
10665         (get_child_debug_event): Ditto.
10666         (win32_wait): Adjust interface.  Remove exiting process from
10667         processes table.
10668
10669 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
10670
10671         Non-stop mode support.
10672
10673         * server.h (non_stop): Declare.
10674         (gdb_client_data, handler_func): Declare.
10675         (delete_file_handler, add_file_handler, start_event_loop):
10676         Declare.
10677         (handle_serial_event, handle_target_event, push_event)
10678         (putpkt_notif): Declare.
10679         * target.h (enum resume_kind): New.
10680         (struct thread_resume): Replace `step' field by `kind' field.
10681         (TARGET_WNOHANG): Define.
10682         (struct target_ops) <wait>: Add `options' argument.
10683         <supports_non_stop, async, start_non_stop>: New fields.
10684         (target_supports_non_stop, target_async): New.
10685         (start_non_stop): Declare.
10686         (mywait): Add `options' argument.
10687         * target.c (mywait): Add `options' argument.  Print child exit
10688         notifications here.
10689         (start_non_stop): New.
10690         * server.c (non_stop, own_buf, mem_buf): New globals.
10691         (struct vstop_notif): New.
10692         (notif_queue): New global.
10693         (queue_stop_reply, push_event, discard_queued_stop_replies)
10694         (send_next_stop_reply): New.
10695         (start_inferior): Adjust to use resume_kind.  Adjust to mywait
10696         interface changes.
10697         (attach_inferior): In non-stop mode, don't wait for the target
10698         here.
10699         (handle_general_set): Handle QNonStop.
10700         (handle_query): When handling qC, return the current general
10701         thread, instead of the first thread of the list.
10702         (handle_query): If the backend supports non-stop mode, include
10703         QNonStop+ in the qSupported query response.
10704         (handle_v_cont): Adjust to use resume_kind.  Handle resume_stop
10705         and non-stop mode.
10706         (handle_v_attach, handle_v_run): Handle non-stop mode.
10707         (handle_v_stopped): New.
10708         (handle_v_requests): Report support for vCont;t.  Handle vStopped.
10709         (myresume): Adjust to use resume_kind.  Handle non-stop.
10710         (queue_stop_reply_callback): New.
10711         (handle_status): Handle non-stop mode.
10712         (main): Clear non_stop flag on reconnection.  Use the event-loop.
10713         Refactor serial protocol handling from here ...
10714         (process_serial_event): ... to this new function.  When GDB
10715         selects any thread, select one here.  In non-stop mode, wait until
10716         GDB acks all pending events before exiting.
10717         (handle_serial_event, handle_target_event): New.
10718         * remote-utils.c (remote_open): Install remote_desc in the event
10719         loop.
10720         (remote_close): Remove remote_desc from the event loop.
10721         (putpkt_binary): Rename to...
10722         (putpkt_binary_1): ... this.  Add `is_notic' argument.  Handle it.
10723         (putpkt_binary): New as wrapper around putpkt_binary_1.
10724         (putpkt_notif): New.
10725         (prepare_resume_reply): In non-stop mode, don't change the
10726         general_thread.
10727         * event-loop.c: New.
10728         * Makefile.in (OBJ): Add event-loop.o.
10729         (event-loop.o): New rule.
10730
10731         * linux-low.h (pid_of): Moved here.
10732         (lwpid_of): New.
10733         (get_lwp_thread): Use lwpid_of.
10734         (struct lwp_info): Delete `lwpid' field.  Add `suspended' field.
10735         * linux-low.c (pid_of): Delete.
10736         (inferior_pid): Use lwpid_of.
10737         (linux_event_pipe): New.
10738         (target_is_async_p): New.
10739         (delete_lwp): New.
10740         (handle_extended_wait): Use lwpid_of.
10741         (add_lwp): Don't set lwpid field.
10742         (linux_attach_lwp): Adjust debug output.  Use lwpid_of.
10743         (linux_kill_one_lwp): If killing a running lwp, stop it first.
10744         Use lwpid_of.  Adjust to linux_wait_for_event interface changes.
10745         (linux_detach_one_lwp): If detaching from a running lwp, stop it
10746         first.  Adjust to linux_wait_for_event interface changes.  Use
10747         lwpid_of.
10748         (linux_detach): Don't delete the main lwp here.
10749         (linux_join): Use my_waitpid.  Avoid signal_pid.  Use lwpid_of.
10750         (status_pending_p): Don't consider explicitly suspended lwps.
10751         (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
10752         pointer.  Add OPTIONS argument.  Change return type to int.  Use
10753         my_waitpid instead of sleeping.  Handle WNOHANG.  Use lwpid_of.
10754         (linux_wait_for_event): Take an integer pid instead of a lwp_info
10755         pointer.  Add status pointer argument.  Return a pid instead of a
10756         status.  Use lwpid_of.  Adjust to linux_wait_for_lwp interface
10757         changes.  In non-stop mode, don't switch to a random thread.
10758         (linux_wait): Rename to...
10759         (linux_wait_1): ... this.  Add target_options argument, and handle
10760         it.  Adjust to use resume_kind.  Use lwpid_of.  In non-stop mode,
10761         don't handle the continue thread.  Handle TARGET_WNOHANG.  Merge
10762         clean exit and signal exit code.  Don't stop all threads in
10763         non-stop mode.  In all-stop mode, only stop all threads when
10764         reporting a stop to GDB.  Handle explicit thread stop requests.
10765         (async_file_flush, async_file_mark): New.
10766         (linux_wait): New.
10767         (send_sigstop): Use lwpid_of.
10768         (wait_for_sigstop): Use lwpid_of.  Adjust to linux_wait_for_event
10769         interface changes.  In non-stop mode, don't switch to a random
10770         thread.
10771         (linux_resume_one_lwp): Use lwpid_of.
10772         (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
10773         (linux_resume_one_thread): ... this.  Handle resume_stop.  In
10774         non-stop mode, don't look for pending flag in all threads.
10775         (resume_status_pending_p): Don't consider explicitly suspended
10776         threads.
10777         (my_waitpid): Reimplement.  Emulate __WALL.
10778         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10779         Use lwpid_of.
10780         (sigchld_handler, linux_supports_non_stop, linux_async)
10781         (linux_start_non_stop): New.
10782         (linux_target_ops): Register linux_supports_non_stop, linux_async
10783         and linux_start_non_stop.
10784         (initialize_low): Install SIGCHLD handler.
10785         * thread-db.c (thread_db_create_event, find_one_thread)
10786         (thread_db_get_tls_address): Use lwpid_of.
10787         * win32-low.c (win32_detach): Adjust to use resume_kind.
10788         (win32_wait): Add `options' argument.
10789         * spu-low.c (spu_resume): Adjust to use resume_kind.
10790         (spu_wait): Add `options' argument.
10791
10792 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
10793
10794         Decouple target code from remote protocol.
10795
10796         * target.h (enum target_waitkind): New.
10797         (struct target_waitstatus): New.
10798         (struct target_ops) <wait>: Return an unsigned long.  Take a
10799         target_waitstatus pointer instead of a char pointer.
10800         (mywait): Likewise.
10801         * target.c (mywait): Change prototype to return an unsigned long.
10802         Take a target_waitstatus pointer instead of a char pointer.  Adjust.
10803         * server.h (thread_from_wait, old_thread_from_wait): Delete
10804         declarations.
10805         (prepare_resume_reply): Change prototype to take a
10806         target_waitstatus.
10807         * server.c (thread_from_wait, old_thread_from_wait): Delete.
10808         (last_status, last_ptid): New.
10809         (start_inferior): Remove "statusptr" argument.  Adjust.  Return a
10810         pid instead of a signal.
10811         (attach_inferior): Remove "status" and "signal" parameters.
10812         Adjust.
10813         (handle_query): For qGetTLSAddr, parse the thread id with strtol,
10814         not as an address.
10815         (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
10816         (handle_v_requests, myresume): Remove "status" and "signal"
10817         parameters.  Adjust.
10818         (handle_status): New.
10819         (main): Delete local `status'.  Adjust.
10820         * remote-utils.c: Include target.h.
10821         (prepare_resume_reply): Change prototype to take a
10822         target_waitstatus.  Adjust.
10823
10824         * linux-low.c (linux_wait): Adjust to new target_ops->wait
10825         interface.
10826         * spu-low.c (spu_wait): Adjust.
10827         * win32-low.c (enum target_waitkind, struct target_waitstatus):
10828         Delete.
10829         (win32_wait): Adjust.
10830
10831 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
10832
10833         * target.h (struct thread_resume): Delete leave_stopped member.
10834         (struct target_ops): Add a `n' argument to the `resume' callback.
10835         * server.c (start_inferior): Adjust.
10836         (handle_v_cont, myresume): Adjust.
10837         * linux-low.c (check_removed_breakpoint): Adjust to resume
10838         interface change, and to removed leave_stopped field.
10839         (resume_ptr): Delete.
10840         (struct thread_resume_array): New.
10841         (linux_set_resume_request): Add new `arg' parameter.  Adjust to
10842         resume interface change.
10843         (linux_continue_one_thread, linux_queue_one_thread)
10844         (resume_status_pending_p): Check if the resume field is NULL
10845         instead of checking the leave_stopped member.
10846         (linux_resume): Adjust to the target resume interface change.
10847         * spu-low.c (spu_resume): Adjust to the target resume interface
10848         change.
10849         * win32-low.c (win32_detach, win32_resume): Ditto.
10850
10851 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
10852
10853         * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
10854         flag.
10855         (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
10856         pending.
10857         (linux_continue_one_thread): Only preserve the stepping flag if
10858         there's a pending breakpoint.
10859
10860 2009-03-31  Pedro Alves  <pedro@codesourcery.com>
10861
10862         * server.c (main): After the inferior having exited, call
10863         remote_close before exiting gdbserver.
10864
10865 2009-03-25  Thiago Jung Bauermann  <bauerman@br.ibm.com>
10866
10867         Fix size of FPSCR in Power 7 processors.
10868         * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
10869         (PPC_FEATURE_HAS_DFP): New #define.
10870         (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
10871         size of the FPSCR.
10872
10873 2009-03-23  Pedro Alves  <pedro@codesourcery.com>
10874
10875         * server.c (handle_query) Whitespace and formatting.
10876
10877 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
10878
10879         * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10880         linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10881         linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10882         linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10883         regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10884         thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10885         Makefile.in, configure.ac: Fix whitespace throughout.
10886         * configure: Regenerate.
10887
10888 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
10889
10890         * inferiors.c (find_inferior): Make it safe for the callback
10891         function to delete the currently iterated inferior.
10892
10893 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
10894
10895         * Makefile.in (linuw_low_h): Move higher.
10896         (thread-db.o): Depend on $(linux_low_h).
10897
10898 2009-03-17  Pedro Alves  <pedro@codesourcery.com>
10899
10900         Rename "process" to "lwp" throughout.
10901
10902         * linux-low.c (all_processes): Rename to...
10903         (all_lwps): ... this.
10904         (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10905         (add_process): Rename to ...
10906         (add_lwp): ... this.  Adjust.
10907         (linux_create_inferior): Adjust.
10908         (linux_attach_lwp): Adjust.
10909         (linux_attach): Adjust.
10910         (linux_kill_one_process): Rename to ...
10911         (linux_kill_one_lwp): ... this.  Adjust.
10912         (linux_kill): Adjust.
10913         (linux_detach_one_process): Rename to ...
10914         (linux_detach_one_lwp): ... this.  Adjust.
10915         (linux_detach): Adjust.
10916         (check_removed_breakpoint): Adjust.
10917         (status_pending_p): Adjust.
10918         (linux_wait_for_process): Rename to ...
10919         (linux_wait_for_lwp): ... this.  Adjust.
10920         (linux_wait_for_event): Adjust.
10921         (send_sigstop): Adjust.
10922         (wait_for_sigstop): Adjust.
10923         (stop_all_processes): Rename to ...
10924         (stop_all_lwps): ... this.
10925         (linux_resume_one_process): Rename to ...
10926         (linux_resume_one_lwp): ... this.  Adjust.
10927         (linux_set_resume_request, linux_continue_one_thread)
10928         (linux_queue_one_thread, resume_status_pending_p)
10929         (usr_store_inferior_registers, regsets_store_inferior_registers)
10930         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10931         Adjust.
10932         * linux-low.h (get_process): Rename to ...
10933         (get_lwp): ... this.  Adjust.
10934         (get_thread_process): Rename to ...
10935         (get_thread_lwp): ... this.  Adjust.
10936         (get_process_thread): Rename to ...
10937         (get_lwp_thread): ... this.  Adjust.
10938         (struct process_info): Rename to ...
10939         (struct lwp_info): ... this.
10940         (all_processes): Rename to ...
10941         (all_lwps): ... this.
10942         * proc-service.c (ps_lgetregs): Adjust.
10943         * thread-db.c (thread_db_create_event, find_one_thread)
10944         (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10945
10946 2009-03-14  Pedro Alves  <pedro@codesourcery.com>
10947
10948         * server.c (handle_query): Handle "qAttached".
10949
10950 2009-03-13  Nathan Sidwell  <nathan@codesourcery.com>
10951
10952         * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10953         GPLv3, update license URL.
10954
10955 2009-03-01  Doug Evans  <dje@google.com>
10956
10957         * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
10958         (server_h): Add gdb_signals.h.
10959         (signals.o): Update.
10960         * server.h (target_signal_from_host,target_signal_to_host_p)
10961         (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10962
10963 2009-02-14  Pierre Muller  <muller@ics.u-strasbg.fr>
10964
10965         * remote-utils.c (getpkt): Also generate remote-debug
10966         information if noack_mode is set.
10967
10968 2009-02-06  Pedro Alves  <pedro@codesourcery.com>
10969
10970         * server.c (handle_query): Report qXfer:siginfo:read and
10971         qXfer:siginfo:write as supported and handle them.
10972         * target.h (struct target_ops) <qxfer_siginfo>: New field.
10973         * linux-low.c (linux_xfer_siginfo): New.
10974         (linux_target_ops): Set it.
10975
10976 2009-01-26  Pedro Alves  <pedro@codesourcery.com>
10977
10978         * server.c (gdbserver_usage): Mention --remote-debug.
10979         (main): Accept '--remote-debug' switch.
10980
10981 2009-01-18  Doug Evans  <dje@google.com>
10982
10983         * regcache.c (new_register_cache): No need to check result of xcalloc.
10984         * server.c (handle_search_memory): Back out calls to xmalloc,
10985         result is checked and error is returned to user upon failure.
10986         (handle_query): Ditto.  Add more checks for result of malloc.
10987         (handle_v_cont): Check result of malloc, report error back to
10988         user upon failure.
10989         (handle_v_run): Ditto.  Call freeargv.
10990         * server.h (freeargv): Declare.
10991         * utils.c (freeargv): New fn.
10992
10993 2009-01-15  Doug Evans  <dje@google.com>
10994
10995         * gdbreplay.c (perror_with_name): Make arg const char *.
10996         * server.h (target_signal_to_name): Make return type const char *.
10997         * thread-db.c (thread_db_err_str): Make return type const char *.
10998         * utils.c (perror_with_name): Make arg const char *.
10999
11000 2009-01-14  Pedro Alves  <pedro@codesourcery.com>
11001
11002         * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
11003         when handling a EXIT_PROCESS_DEBUG_EVENT.
11004
11005 2009-01-06  Joel Brobecker  <brobecker@adacore.com>
11006
11007         * gdbreplay.c (gdbreplay_version): Update copyright year.
11008         * server.c (gdbserver_version): Likewise.
11009
11010 2009-01-05  Doug Evans  <dje@google.com>
11011
11012         * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
11013         (handle_extended_wait): Improve comment.
11014
11015 2008-12-13  Doug Evans  <dje@google.com>
11016
11017         * utils.c (xmalloc,xcalloc,xstrdup): New fns.
11018         * server.h (ATTR_MALLOC): New macro.
11019         (xmalloc,xcalloc,xstrdup): Declare.
11020         * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
11021         * inferiors.c: Ditto.
11022         * linux-low.c: Ditto.
11023         * mem-break.c: Ditto.
11024         * regcache.c: Ditto.
11025         * remote-utils.c: Ditto.
11026         * server.c: Ditto.
11027         * target.c: Ditto.
11028         * win32-low.c: Ditto.
11029
11030 2008-12-12  Doug Evans  <dje@google.com>
11031
11032         * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
11033         in debugging printf.
11034
11035         * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
11036
11037 2008-12-09  Doug Evans  <dje@google.com>
11038
11039         * linux-low.h (struct process_info): Delete member tid, unused.
11040         * thread-db.c (find_one_thread): Update.
11041         (maybe_attach_thread): Update.
11042
11043 2008-12-02  Pedro Alves  <pedro@codesourcery.com>
11044
11045         * target.h (struct target_ops): Add qxfer_osdata member.
11046         * linux-low.c: Include ctype.h and pwd.h and sys/types.h
11047         and dirent.h.
11048         (linux_qxfer_osdata): New functions.
11049         (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
11050         callback.
11051         * server.c (handle_query): Handle "qXfer:osdata:read:".
11052         * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
11053         (buffer_xml_printf): New functions.
11054         * server.h (struct buffer): New.
11055         (buffer_grow_str, buffer_grow_str0): New macros.
11056         (buffer_grow, buffer_free, buffer_init, buffer_finish)
11057         (buffer_xml_printf): Declare.
11058
11059 2008-11-24  Doug Evans  <dje@google.com>
11060
11061         * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
11062
11063 2008-11-24  Daniel Jacobowitz  <dan@codesourcery.com>
11064
11065         * server.c (handle_v_run): Always use the supplied argument list.
11066
11067 2008-11-19  Bob Wilson  <bob.wilson@acm.org>
11068
11069         * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
11070         (xtensa_regmap_table): Add entry for scompare1.
11071
11072 2008-11-18  Thiago Jung Bauermann  <bauerman@br.ibm.com>
11073
11074         * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
11075         powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
11076         powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
11077         powerpc-isa205-64l.o, powerpc-isa205-64l.c,
11078         powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
11079         powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
11080         * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
11081         XML target descriptions.
11082         * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
11083         when inferior is running on an ISA 2.05 or later processor.  Add
11084         special case to return offset for full 64-bit slot of FPSCR when
11085         in 32-bits.
11086
11087 2008-11-14  Daniel Gutson  <dgutson@codesourcery.com>
11088
11089         * Makefile.in (SFILES, clean): Added sparc64 files.
11090         (reg-sparc64.o, reg-sparc64.c): New.
11091         * configure.srv (sparc*-*-linux*): New configuration.
11092         * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
11093         syscall arguments for SPARC.
11094         (regsets_store_inferior_registers): Likewise.
11095         * linux-sparc-low.c: New file.
11096
11097 2008-10-21  Doug Evans  <dje@google.com>
11098
11099         * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
11100         (READLINE_DIR,READLINE_DEP): Delete.
11101         (INTERNAL_CFLAGS): Update.
11102         (LINTFLAGS): Update.
11103
11104 2008-10-10  Pedro Alves  <pedro@codesourcery.com>
11105
11106         * server.c (handle_v_run): If GDB didn't specify an argv, use the
11107         whole argv from the last run, not just argv[0].
11108
11109 2008-09-08  Pedro Alves  <pedro@codesourcery.com>
11110
11111         * regcache.c (new_register_cache): Return NULL if the register
11112         cache size isn't known yet.
11113         (free_register_cache): Avoid dereferencing a NULL regcache.
11114
11115 2008-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
11116
11117         * configure.srv: Merge MIPS and MIPS64.
11118
11119 2008-08-24  Maciej W. Rozycki  <macro@linux-mips.org>
11120
11121         * Makefile.in (uninstall): Apply $(EXEEXT) too.
11122
11123 2008-08-18  Luis Machado  <luisgpm@br.ibm.com>
11124
11125         * Makefile.in: Add required vsx dependencies.
11126
11127         * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
11128         Declare init_registers_powerpc_vsx32l.
11129         Declare init_registers_powerpc_vsx64l.
11130         Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
11131         (ppc_arch_setup): Check for VSX in hwcap.
11132         (ppc_fill_vsxregset): New function.
11133         (ppc_store_vsxregset): New function.
11134         Add new VSX entry in regset_info target_regsets.
11135
11136         * configure.srv: Add new VSX dependencies.
11137
11138 2008-08-12  Pedro Alves  <pedro@codesourcery.com>
11139
11140         * remote-utils.c (noack_mode, transport_is_reliable): New globals.
11141         (remote_open): Set or clear transport_is_reliable.
11142         (putpkt_binary): Don't expect acks in noack mode.
11143         (getpkt): Don't send ack/nac in noack mode.
11144         * server.c (handle_general_set): Handle QStartNoAckMode.
11145         (handle_query): If connected by tcp pass QStartNoAckMode+ in
11146         qSupported.
11147         (main): Reset noack_mode on every connection.
11148         * server.h (noack_mode): Declare.
11149
11150 2008-08-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11151
11152         * Makefile.in (GDBREPLAY_OBS): New variable.
11153         (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
11154
11155 2008-08-05  Ulrich Weigand  <uweigand@de.ibm.com>
11156             Daniel Jacobowitz  <dan@codesourcery.com>
11157
11158         * linux-low.c (linux_resume_one_process): Ignore ESRCH.
11159         (usr_store_inferior_registers): Likewise.
11160         (regsets_store_inferior_registers): Likewise.
11161
11162 2008-07-31  Rolf Jansen  <rj@surtec.com>
11163             Pedro Alves  <pedro@codesourcery.com>
11164
11165         * configure.ac: Check for memmem declaration.
11166         * server.c [HAVE_MALLOC_H]: Include malloc.h.
11167         (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
11168         (disable_packet_qfThreadInfo): Unconditionally compile.
11169         * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
11170         * configure, config.in: Regenerate.
11171
11172 2008-07-28  Doug Kwan  <dougkwan@google.com>
11173
11174         * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
11175         (linux_write_memory): Remove declaration of errno.
11176
11177 2008-07-12  Ulrich Weigand  <uweigand@de.ibm.com>
11178
11179         * linux-low.c (handle_extended_wait): Do not use "status"
11180         variable uninitialized.
11181
11182 2008-07-07  Pedro Alves  <pedro@codesourcery.com>
11183
11184         * server.c (handle_v_attach): Inhibit reporting dll changes.
11185
11186 2008-06-27  Pedro Alves  <pedro@codesourcery.com>
11187
11188         * remote-utils.c (prepare_resume_reply): If requested, don't
11189         output "thread:TID" in the T stop reply.
11190
11191         * server.c (disable_packet_vCont, disable_packet_Tthread)
11192         (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
11193         (handle_query): If requested, disable support for qC, qfThreadInfo
11194         and qsThreadInfo.
11195         (handle_v_requests): If requested, disable support for vCont.
11196         (gdbserver_show_disableable): New.
11197         (main): Handle --disable-packet and --disable-packet=LIST.
11198
11199         * server.h (disable_packet_vCont, disable_packet_Tthread)
11200         (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
11201
11202 2008-06-20  Carlos O'Donell  <carlos@codesourcery.com>
11203
11204         * server.c (gdbserver_usage): Mention --version.
11205
11206 2008-06-06  Daniel Jacobowitz  <dan@codesourcery.com>
11207
11208         * Makefile.in (gdbreplay.o): New rule.
11209
11210 2008-06-06  Joseph Myers  <joseph@codesourcery.com>
11211
11212         * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
11213         message, not gdbserver.
11214
11215 2008-06-05  Vladimir Prus  <vladimir@codesourcery.com>
11216             Nathan Sidwell  <nathan@codesourcery.com>
11217             Joseph Myers  <joseph@codesourcery.com>
11218
11219         * acinclude.m4: Include ../../config/acx.m4.
11220         * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
11221         * configure, config.in: Regenerate.
11222         * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
11223         * server.c (gdbserver_version): Print PKGVERSION.
11224         (gdbsrever_usage): Add stream parameter.  Print REPORT_BUGS_TO.
11225         (main): Adjust gdbserver_usage calls.
11226         * gdbreplay.c (version, host_name): Add declarations.
11227         (gdbreplay_version, gdbreplay_usage): New.
11228         (main): Accept --version and --help options.
11229
11230 2008-06-04  Daniel Jacobowitz  <dan@codesourcery.com>
11231
11232         * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
11233         (arm_breakpoint_at): Handle Thumb.
11234         (the_low_target): Add comment.
11235
11236 2008-05-29  Ulrich Weigand  <uweigand@de.ibm.com>
11237
11238         * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
11239
11240 2008-05-09  Doug Evans  <dje@google.com>
11241
11242         * server.h (decode_search_memory_packet): Declare.
11243         * remote-utils.c (decode_search_memory_packet): New fn.
11244         * server.c (handle_search_memory_1): New fn.
11245         (handle_search_memory): New fn.
11246         (handle_query): Process qSearch:memory packets.
11247
11248 2008-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
11249
11250         * regcache.c (registers_length): Remove.
11251         (set_register_cache): Verify that PBUFSIZ is large enough to hold a
11252         full register packet.
11253         * regcache.h (registers_length): Remove prototype.
11254         * server.h (PBUFSIZ): Define to 16384.
11255
11256 2008-05-03  Ulrich Weigand  <uweigand@de.ibm.com>
11257
11258         * configure.srv (powerpc*-*-linux*): Set srv_regobj to
11259         powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
11260         powerpc-64l.o, and powerpc-altivec64l.o.
11261         Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
11262         rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
11263         rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
11264         rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
11265         rs6000/power-linux.xml, and rs6000/power64-linux.xml
11266         to srv_xmlfiles.
11267
11268         * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
11269         (powerpc-32l.o, powerpc-32l.c): ... these new rules.
11270         (powerpc-32.o, powerpc-32.c): Remove, replace by ...
11271         (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
11272         (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
11273         (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
11274         (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
11275         (powerpc-64l.o, powerpc-64l.c): ... these new rules.
11276         (powerpc-64.o, powerpc-64.c): Remove, replace by ...
11277         (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
11278         (clean): Update.
11279
11280         * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
11281         (init_registers_powerpc_32l): ... this new prototype.
11282         (init_registers_powerpc_32): Remove, replace by ...
11283         (init_registers_powerpc_altivec32l): ... this new prototype.
11284         (init_registers_powerpc_e500): Remove, replace by ...
11285         (init_registers_powerpc_e500l): ... this new prototype.
11286         (init_registers_ppc64): Remove, replace by ...
11287         (init_registers_powerpc_64l): ... this new prototype.
11288         (init_registers_powerpc_64): Remove, replace by ...
11289         (init_registers_powerpc_altivec64l): ... this new prototype.
11290         (ppc_num_regs): Set to 73.
11291         (PT_ORIG_R3, PT_TRAP): Define if necessary.
11292         (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
11293         (ppc_cannot_store_register): Handle orig_r3 and trap.
11294         (ppc_arch_setup): Update init_registers_... calls.
11295         (ppc_fill_gregset): Handle orig_r3 and trap.
11296
11297         * inferiors.c (clear_inferiors): Reset current_inferior.
11298
11299 2008-04-23  Paolo Bonzini  <bonzini@gnu.org>
11300
11301         * acinclude.m4: Add override.m4.
11302         * configure: Regenerate.
11303
11304 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
11305
11306         * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
11307         initial call to init_register_ppc64.
11308
11309 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
11310
11311         * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
11312         single powerpc*-*-linux* case.
11313         (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
11314
11315 2008-04-17  Ulrich Weigand  <uweigand@de.ibm.com>
11316
11317         * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
11318         srv_regobj.  Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
11319         from reg_xmlfiles.
11320         * linux-ppc-low.c: Include <elf.h>.
11321         (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
11322         (ppc_hwcap): New global variable.
11323         (ppc_regmap): Remove __SPE__ #ifdef sections.
11324         (ppc_regmap_e500): New global variable.
11325         (ppc_cannot_store_register): Update __SPE__ special case.
11326         (ppc_get_hwcap): New function.
11327         (ppc_arch_setup): Use it to determine whether inferior supports
11328         AltiVec or SPE registers.  Set the_low_target.regmap if appropriate.
11329         (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
11330         Do not access registers if target does not support AltiVec.
11331         (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
11332         Do not access registers if target does not support SPE.
11333         (target_regsets): Unconditionally include AltiVec and SPE regsets.
11334
11335 2008-04-17  Daniel Jacobowitz  <dan@codesourcery.com>
11336
11337         * linux-low.c (disabled_regsets, num_regsets): New.
11338         (use_regsets_p): Delete.
11339         (linux_wait_for_process): Clear disabled_regsets.
11340         (regsets_fetch_inferior_registers): Check and set it.
11341         (regsets_store_inferior_registers): Likewise.
11342         (linux_fetch_registers, linux_store_registers): Do not use
11343         use_regsets_p.
11344         (initialize_low): Allocate disabled_regsets.
11345
11346 2008-04-14  Daniel Jacobowitz  <dan@codesourcery.com>
11347
11348         * Makefile.in (LIBOBJS): New.
11349         (OBS): Use LIBOBJS.
11350         (memmem.o): New rule.
11351         * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
11352         * configure: Regenerated.
11353
11354 2008-04-04  Ulrich Weigand  <uweigand@de.ibm.com>
11355
11356         * server.c (handle_query): Never return "unsupported" for
11357         qXfer:features:read queries.
11358
11359 2008-03-27  Ulrich Weigand  <uweigand@de.ibm.com>
11360
11361         * server.c (get_features_xml): Fix inverted condition.
11362         (handle_query): Always support qXfer:feature:read.
11363
11364 2008-03-10  Daniel Jacobowitz  <dan@codesourcery.com>
11365
11366         * server.c (wrapper_argv): New.
11367         (start_inferior): Handle wrapper_argv.  If set, expect an extra
11368         trap.
11369         (gdbserver_usage): Document --wrapper.
11370         (main): Parse --wrapper.
11371
11372 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
11373
11374         * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
11375         powerpc-*-linux* to srv_regobj and reg_xmlfiles.
11376         * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
11377         (ppc_set_pc): Likewise.
11378         (ppc_arch_setup): New function.
11379         (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
11380         of collect_register.
11381         (the_low_target): Use ppc_arch_setup as arch_setup initializer.
11382
11383 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
11384
11385         * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
11386         instead of linux-ppc64-low.o.
11387         * linux-ppc64-low.c: Remove file.
11388         * Makefile.in (SFILES): Remove linux-ppc64-low.c.
11389         (linux-ppc64-low.o): Remove rule.
11390
11391         * linux-ppc-low.c (init_registers_ppc64): Add prototype.
11392         (init_registers_powerpc_64): Likewise.
11393         (ppc_regmap): Conditionally define depending on __powerpc64__.
11394         (ppc_cannot_store_register): Do not special-case "fpscr" when
11395         compiled on __powerpc64__.
11396         (ppc_collect_ptrace_register): New function.
11397         (ppc_supply_ptrace_register): New function.
11398         (ppc_breakpoint): Change type to "unsigned int".
11399         (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
11400         (the_low_target): Conditionally provide initializers for the
11401         arch_setup member depending on __powerpc64__.  Install
11402         collect_ptrace_register and supply_ptrace_register members.
11403
11404 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
11405
11406         * regcache.h (gdbserver_xmltarget): Add extern declaration.
11407         * server.c (gdbserver_xmltarget): Define.
11408         (get_features_xml): Use it to replace "target.xml" and arch_string.
11409
11410         * configure.srv: Remove srv_xmltarget.  Add XML files that were
11411         mentioned there to srv_xmlfiles instead.  Remove conditional tests
11412         on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
11413         srv_xmlfiles and srv_regobj to include all possible choices.
11414         * configure.ac (srv_xmltarget): Remove.
11415         (srv_xmlfiles): Do not add "target.xml".
11416         (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
11417         checks for supplementary target information.
11418         * configure: Regenerate.
11419         * Makefile.in (XML_TARGET): Remove.
11420         (target.xml): Remove rule.
11421         (clean): Do not clean up target.xml.
11422         (.PRECIOUS): Do not mention target.xml.
11423
11424         * target.h (struct target_ops): Remove arch_string member.
11425         * linux-low.c (linux_arch_string): Remove.
11426         (linux_target_ops): Remove arch_string initializer.
11427         * linux-low.h (struct linux_target_ops): Remove arch_string member.
11428         * linux-i386-low.c (the_low_target): Remove arch_string initializer.
11429         * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
11430         * spu-low.c (spu_arch_string): Remove.
11431         (spu_target_ops): Remove arch_string initializer.
11432         * win32-low.c (win32_arch_string): Remove.
11433         (win32_target_ops): Remove arch_string initializer.
11434         * win32-low.h (struct win32_target_ops): Remove arch_string member.
11435         * win32-arm-low.c (the_low_target): Remove arch_string initializer.
11436         * win32-i368-low.c (the_low_target): Remove arch_string initializer.
11437
11438 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
11439
11440         * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
11441         by collect_ptrace_register and supply_ptrace_register hooks.
11442         * linux-low.c (fetch_register): Use supply_ptrace_register callback
11443         instead of checking for the_low_target.left_pad_xfer.
11444         (usr_store_inferior_registers): Use collect_ptrace_register callback
11445         instead of checking for the_low_target.left_pad_xfer.
11446
11447         * linux-s390-low.c (s390_collect_ptrace_register): New function.
11448         (s390_supply_ptrace_register): Likewise.
11449         (s390_fill_gregset): Call s390_collect_ptrace_register.
11450         (the_low_target): Update.
11451
11452         * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
11453         (ppc_supply_ptrace_register): Likewise.
11454         (the_low_target): Update.
11455
11456         * linux-i386-low.c (the_low_target): Update.
11457         * linux-x86-64-low.c (the_low_target): Update.
11458
11459 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
11460
11461         * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
11462         reg-s390.o and reg-s390x.o.
11463
11464         * linux-low.c (new_inferior): New global variable.
11465         (linux_create_inferior, linux_attach): Set it.
11466         (linux_wait_for_process): Call the_low_target.arch_setup after the
11467         target has stopped for the first time.
11468         (initialize_low): Do not call the_low_target.arch_setup.
11469
11470         * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
11471         (s390_set_pc): Likewise.
11472         (s390_arch_setup): New function.
11473         (the_low_target): Use s390_arch_setup as arch_setup routine.
11474
11475         * regcache.c (realloc_register_cache): New function.
11476         (set_register_cache): Call it for each existing regcache.
11477
11478 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
11479
11480         * server.h (init_registers): Remove prototype.
11481
11482         * linux-low.h (struct linux_target_ops): Add arch_setup field.
11483         * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
11484         instead of init_registers ().
11485         * linux-arm-low.c (init_registers_arm): Add prototype.
11486         (init_registers_arm_with_iwmmxt): Likewise.
11487         (the_low_target): Add initializer for arch_setup field.
11488         * linux-cris-low.c (init_registers_cris): Add prototype.
11489         (the_low_target): Add initializer for arch_setup field.
11490         * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
11491         (the_low_target): Add initializer for arch_setup field.
11492         * linux-i386-low.c (init_registers_i386_linux): Add prototype.
11493         (the_low_target): Add initializer for arch_setup field.
11494         * linux-ia64-low.c (init_registers_ia64): Add prototype.
11495         (the_low_target): Add initializer for arch_setup field.
11496         * linux-m32r-low.c (init_registers_m32r): Add prototype.
11497         (the_low_target): Add initializer for arch_setup field.
11498         * linux-m68k-low.c (init_registers_m68k): Add prototype.
11499         (the_low_target): Add initializer for arch_setup field.
11500         * linux-mips-low.c (init_registers_mips_linux): Add prototype.
11501         (init_registers_mips64_linux): Likewise.
11502         (the_low_target): Add initializer for arch_setup field.
11503         * linux-ppc-low.c (init_registers_ppc): Add prototype.
11504         (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
11505         (the_low_target): Add initializer for arch_setup field.
11506         * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
11507         (init_registers_powerpc_64): Likewise.
11508         (the_low_target): Add initializer for arch_setup field.
11509         * linux-s390-low.c (init_registers_s390): Add prototype.
11510         (init_registers_s390x): Likewise.
11511         (the_low_target): Add initializer for arch_setup field.
11512         * linux-sh-low.c (init_registers_sh): Add prototype.
11513         (the_low_target): Add initializer for arch_setup field.
11514         * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
11515         (the_low_target): Add initializer for arch_setup field.
11516         * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
11517         (the_low_target): Add initializer for arch_setup field.
11518
11519         * win32-low.h (struct win32_target_ops): Add arch_setup field.
11520         * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
11521         instead of init_registers ().
11522         * win32-arm-low.c (init_registers_arm): Add prototype.
11523         (the_low_target): Add initializer for arch_setup field.
11524         * win32-i386-low.c (init_registers_i386): Add prototype.
11525         (the_low_target): Add initializer for arch_setup field.
11526
11527         * spu-low.c (init_registers_spu): Add prototype.
11528         (initialize_low): Call initialie_registers_spu () instead of
11529         initialize_registers ().
11530
11531 2008-02-19  Pedro Alves  <pedro@codesourcery.com>
11532
11533         * server.c (handle_v_requests): When handling the vRun and vAttach
11534         packets, if already debugging a process, don't kill it.  Return an
11535         error instead.
11536
11537 2008-02-17  Daniel Jacobowitz  <dan@codesourcery.com>
11538
11539         * server.c (handle_query): Correct length check.
11540
11541 2008-02-14  Pedro Alves  <pedro_alves@portugalmail.pt>
11542
11543         * win32-low.c (do_initial_child_stuff): Add process handle
11544         parameter.  Set current_process_handle and current_process_id from the
11545         parameters. Clear globals.
11546         (win32_create_inferior): Don't set current_process_handle and
11547         current_process_id here.  Instead pass them on the call to
11548         do_initial_child_stuff.
11549         (win32_attach): Likewise.
11550         (win32_clear_inferiors): New.
11551         (win32_kill): Don't close the current process handle or the
11552         current thread handle here.  Instead call win32_clear_inferiors.
11553         (win32_detach): Don't open a new handle to the process.  Call
11554         win32_clear_inferiors.
11555         (win32_join): Don't rely on current_process_handle; open a new
11556         handle using the process id.
11557         (win32_wait): Call win32_clear_inferiors when the inferior process
11558         has exited.
11559
11560 2008-02-14  Daniel Jacobowitz  <dan@codesourcery.com>
11561
11562         * server.c (monitor_show_help): Add "exit".
11563
11564 2008-02-11  Maxim Grigoriev  <maxim2405@gmail.com>
11565
11566         * Makefile.in (SFILES): Add linux-xtensa-low.c.
11567         (clean): Add reg-xtensa.c.
11568         (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
11569         * configure.srv (xtensa*-*-linux*) New target.
11570         * linux-xtensa-low.c: New.
11571         * xtensa-xtregs.c: New.
11572
11573 2008-02-01  Pedro Alves  <pedro_alves@portugalmail.pt>
11574
11575         * hostio.c: Don't include errno.h.
11576         (errno_to_fileio_errno): Move to hostio-errno.
11577         * hostio.c: (hostio_error): Remove the error parameter.  Defer the
11578         error number outputting to the target->hostio_last_error callback.
11579         (hostio_packet_error): Use FILEIO_EINVAL directly.
11580         (handle_open, handle_pread, hostio_error, handle_unlink): Update
11581         calls to hostio_error.
11582         * hostio-errno.c: New.
11583         * server.h (hostio_last_error_from_errno): Declare.
11584         * target.h (target_ops): Add hostio_last_error member.
11585         * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
11586         as hostio_last_error handler.
11587         * spu-low.c (spu_target_ops): Likewise.
11588         * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
11589         (wince_hostio_last_error): New functions.
11590         (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
11591         as hostio_last_error handler.
11592         (win32_target_ops) [!_WIN32_WCE]: Register
11593         hostio_last_error_from_errno as hostio_last_error handler.
11594         * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
11595         (hostio-errno.o): New rule.
11596         * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
11597         * configure.srv (srv_hostio_err_objs): New variable.  Default to
11598         hostio-errno.o.
11599         (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
11600         * configure: Regenerate.
11601
11602 2008-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
11603
11604         * linux-low.c (linux_attach_lwp): Do not _exit after errors.
11605         (linux_kill, linux_detach): Clean up the process list.
11606         * remote-utils.c (remote_open): Improve port number parsing.
11607         (putpkt_binary, input_interrupt): Only send interrupts if the target
11608         is running.
11609         * server.c (extended_protocol): Make static.
11610         (attached): Define earlier.
11611         (exit_requested, response_needed, program_argv): New variables.
11612         (target_running): New.
11613         (start_inferior): Clear attached here.
11614         (attach_inferior): Set attached here.
11615         (require_running): Define.
11616         (handle_query): Use require_running and target_running.  Implement
11617         "monitor exit".
11618         (handle_v_attach, handle_v_run): New.
11619         (handle_v_requests): Use require_running.  Handle vAttach and vRun.
11620         (gdbserver_usage): Update.
11621         (main): Redo argument parsing.  Handle --debug and --multi.  Handle
11622         --attach along with other options or after the port.  Save
11623         program_argv.  Support no initial program.  Resynchronize
11624         communication with GDB after an error.  Handle "monitor exit".
11625         Use require_running and target_running.  Always allow the extended
11626         protocol.  Do not error out for Hc0 or Hc-1.  Do not automatically
11627         restart in extended mode.
11628         * README: Refer to the GDB manual.  Update --attach usage.
11629
11630 2007-12-20  Andreas Schwab  <schwab@suse.de>
11631
11632         * linux-low.c (STACK_SIZE): Define.
11633         (linux_tracefork_child): Use it.  Use __clone2 on ia64.
11634         (linux_test_for_tracefork): Likewise.
11635
11636 2007-12-18  Daniel Jacobowitz  <dan@codesourcery.com>
11637
11638         * linux-low.c (linux_wait_for_event): Update messages.  Do not
11639         reinsert auto-delete breakpoints.
11640         * mem-break.c (struct breakpoint): Change return type of handler to
11641         int.
11642         (set_breakpoint_at): Update handler type.
11643         (reinsert_breakpoint_handler): Return 1 instead of calling
11644         delete_breakpoint.
11645         (reinsert_breakpoint_by_bp): Check for the original breakpoint before
11646         setting a new one.
11647         (check_breakpoints): Delete auto-delete breakpoints and return 2.
11648         * mem-break.h (set_breakpoint_at): Update handler type.
11649         * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
11650         * win32-low.c (auto_delete_breakpoint): New.
11651         (get_child_debug_event): Use it.
11652
11653 2007-12-16  Daniel Jacobowitz  <dan@codesourcery.com>
11654
11655         * configure.ac: Check for pread and pwrite.
11656         * hostio.c (handle_pread): Fall back to lseek and read.
11657         (handle_pwrite): Fall back to lseek and write.
11658         * config.in, configure: Regenerated.
11659
11660 2007-12-07  Daniel Jacobowitz  <dan@codesourcery.com>
11661
11662         * server.c (myresume): Add own_buf argument.
11663         (main): Update calls.
11664
11665 2007-12-06  Daniel Jacobowitz  <dan@codesourcery.com>
11666
11667         * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
11668         * remote-utils.c (remote_open): Do not call disable_async_io.
11669         (block_async_io): Delete.
11670         (unblock_async_io): Make static.
11671         (initialize_async_io): New.
11672         * server.c (handle_v_cont): Handle async I/O here.
11673         (myresume): Likewise.  Move other common resume tasks here...
11674         (main): ... from here.  Call initialize_async_io.  Disable async
11675         I/O before the main loop.
11676         * server.h (initialize_async_io): Declare.
11677         (block_async_io, unblock_async_io): Delete prototypes.
11678         * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
11679
11680 2007-12-06  Mick Davis  <mickd@goanna.iinet.net.au>
11681
11682         * remote-utils.c (readchar): Allow binary data in received messages.
11683
11684 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11685
11686         * win32-low.c (attaching): New global.
11687         (win32_create_inferior): Clear the `attaching' global.
11688         (win32_attach): Set the `attaching' global.
11689         (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
11690         attaching.  Only set a breakpoint at the entry point if not
11691         attaching.
11692
11693 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11694
11695         * server.c (main): Don't report dll events on the initial
11696         connection on attaches.
11697
11698 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11699
11700         * server.c (main): Relax numerical bases supported for the pid of
11701         the --attach command line argument.
11702
11703 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11704
11705         * win32-low.c (win32_attach): Call OpenProcess before
11706         DebugActiveProcess, not after.  Add last error output to error
11707         call.
11708
11709 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11710
11711         * win32-low.c (win32_get_thread_context)
11712         (win32_set_thread_context): New functions.
11713         (thread_rec): Use win32_get_thread_context.
11714         (continue_one_thread, win32_resume): Use win32_set_thread_context.
11715         * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
11716         field.
11717
11718 2007-12-03  Leo Zayas
11719             Pedro Alves  <pedro_alves@portugalmail.pt>
11720
11721         * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
11722         global variables.
11723         (child_add_thread): Minor cleanup.
11724         (child_continue): Resume artificially suspended threads before
11725         calling ContinueDebugEvent.
11726         (suspend_one_thread): New.
11727         (fake_breakpoint_event): New.
11728         (get_child_debug_event): Change return type to int.  Check here if
11729         gdb sent an interrupt request.  If a soft interrupt was requested,
11730         fake a breakpoint event.  Return 0 if there is no event to handle,
11731         and 1 otherwise.
11732         (win32_wait): Don't check here if gdb sent an interrupt request.
11733         Ensure there is a valid event to handle.
11734         (win32_request_interrupt): Add soft interruption method as last
11735         resort.
11736
11737 2007-12-03  Leo Zayas
11738             Pedro Alves  <pedro_alves@portugalmail.pt>
11739
11740         * win32-low.h (win32_thread_info): Add descriptions to the
11741         structure members.  Replace `suspend_count' counter by a
11742         `suspended' flag.
11743         * win32-low.c (thread_rec): Update condition of when to get the
11744         context from the inferior.  Rely on ContextFlags being set if it
11745         has already been retrieved.  Only suspend the inferior thread if
11746         we haven't already.  Warn if that fails.
11747         (continue_one_thread): s/suspend_count/suspended/.  Only call
11748         ResumeThread once.  Warn if that fails.
11749
11750 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
11751
11752         * win32-low.c (win32_wait): Don't read from the inferior when it
11753         has already exited.
11754
11755 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
11756
11757         * Makefile.in (win32_low_h): New variable.
11758         (win32-low.o): Add dependency on $(win32_low_h).
11759         (win32-arm-low.o, win32-i386-low.o): New rules.
11760
11761 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
11762
11763         * hostio.c: Correct copyright year.
11764
11765 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
11766
11767         * Makefile.in (OBS): Add hostio.o.
11768         (hostio.o): New rule.
11769         * server.h (handle_vFile): Declare.
11770         * hostio.c: New file.
11771         * server.c (handle_v_requests): Take packet_len and new_packet_len
11772         for binary packets.  Call handle_vFile.
11773         (main): Update call to handle_v_requests.
11774
11775 2007-11-05  Daniel Jacobowitz  <dan@codesourcery.com>
11776
11777         * linux-low.c: Include <sched.h>.
11778
11779 2007-11-01  Daniel Jacobowitz  <dan@codesourcery.com>
11780
11781         * linux-low.c (linux_tracefork_grandchild): New.
11782         (linux_tracefork_child): Use clone.
11783         (linux_test_for_tracefork): Use clone; allocate and free a stack.
11784
11785 2007-10-31  Joel Brobecker  <brobecker@adacore.com>
11786
11787         * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
11788
11789 2007-10-24  Daniel Jacobowitz  <dan@codesourcery.com>
11790
11791         * linux-low.c (handle_extended_wait): Handle unexpected signals.
11792
11793 2007-10-23  Daniel Jacobowitz  <dan@codesourcery.com>
11794
11795         * inferiors.c (change_inferior_id): Delete.
11796         (add_pid_to_list, pull_pid_from_list): New.
11797         * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
11798         (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
11799         (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
11800         (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
11801         (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
11802         (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
11803         (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
11804         (using_threads): Always set to 1.
11805         (handle_extended_wait): New.
11806         (add_process): Do not set TID.
11807         (linux_create_inferior): Set must_set_ptrace_flags.
11808         (linux_attach_lwp): Remove TID argument.  Do not check using_threads.
11809         Use PTRACE_SETOPTIONS.  Call new_thread_notify.  Update all callers.
11810         (linux_thread_alive): Rename TID argument to LWPID.
11811         (linux_wait_for_process): Handle unknown processes.  Do not use TID.
11812         (linux_wait_for_event): Do not use TID or check using_threads.  Update
11813         call to dead_thread_notify.  Call handle_extended_wait.
11814         (linux_create_inferior): Use PTRACE_SETOPTIONS.
11815         (send_sigstop): Delete sigstop_sent.
11816         (wait_for_sigstop): Avoid TID.
11817         (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
11818         (linux_test_for_tracefork): New.
11819         (linux_lookup_signals): Use thread_db_active and
11820         linux_supports_tracefork_flag.
11821         (initialize_low): Use thread_db_active and linux_test_for_tracefork.
11822         * linux-low.h (get_process_thread): Avoid TID.
11823         (struct process_ifo): Move thread_known and tid to the end.  Remove
11824         sigstop_sent.
11825         (linux_attach_lwp, thread_db_init): Update prototypes.
11826         * server.h (change_inferior_id): Delete prototype.
11827         (add_pid_to_list, pull_pid_from_list): New prototypes.
11828         * thread-db.c (thread_db_use_events): New.
11829         (find_first_thread): Rename to...
11830         (find_one_thread): ...this.  Update callers and messages.  Do not
11831         call fatal.  Check thread_db_use_events.  Do not call
11832         change_inferior_id or new_thread_notify.
11833         (maybe_attach_thread): Update.  Do not call new_thread_notify.
11834         (thread_db_init): Set thread_db_use_events.  Check use_events.
11835         * utils.c (fatal, warning): Correct message prefix.
11836
11837 2007-10-15  Daniel Jacobowitz  <dan@codesourcery.com>
11838
11839         * Makefile.in (clean): Remove new files.
11840         (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
11841         (powerpc-64.o, powerpc-64.c): New rules.
11842         * configure.srv: Use alternate register sets for powerpc64-*-linux*
11843         with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
11844         with SPE.
11845         * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
11846         SPE targets.
11847         (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
11848         (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
11849         (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
11850         (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
11851         (target_regsets): Add AltiVec and SPE register sets.
11852         * configure.ac: Check for AltiVec and SPE.
11853         * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
11854         (ppc_fill_vrregset, ppc_store_vrregset): New.
11855         (target_regsets): Add AltiVec register set.
11856         * configure: Regenerated.
11857
11858 2007-09-19  Daniel Jacobowitz  <dan@codesourcery.com>
11859
11860         * linux-low.c (O_LARGEFILE): Define.
11861         (linux_read_memory): Use /proc/PID/mem.
11862         * configure.ac: Use AC_GNU_SOURCE.  Check for pread64.
11863         * configure, config.in: Regenerated.
11864
11865 2007-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
11866
11867         * linux-low.c (linux_wait_for_event): Do not pass signals while
11868         single-stepping.
11869
11870 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11871
11872         * win32-low.c (create_process): New.
11873         (win32_create_inferior): Use create_process instead of
11874         CreateProcess.  If create_process failed retry appending an ".exe"
11875         suffix.  Store the GetLastError result immediatelly after
11876         create_process calls and use it on the call to error.
11877
11878 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11879
11880         * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11881
11882 2007-08-23  Joel Brobecker  <brobecker@adacore.com>
11883
11884         * configure.ac: Switch license to GPLv3.
11885
11886 2007-08-01  Michael Snyder  <msnyder@access-company.com>
11887
11888         * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11889
11890 2007-07-31  Pedro Alves  <pedro_alves@portugalmail.pt>
11891
11892         * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11893         typedef.
11894         (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11895         (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL.  Get
11896         CloseToolhelp32Snapshot.
11897         (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11898         CloseToolhelp32Snapshot.
11899
11900 2007-07-27  Michael Snyder  <michael.snyder@access-company.com>
11901
11902         * server.c (main): Check for inferior exit before main loop.
11903
11904 2007-07-18  Pedro Alves  <pedro_alves@portugalmail.pt>
11905
11906         * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11907         instead of on tmp_desc.
11908
11909 2007-07-17  Pedro Alves  <pedro_alves@portugalmail.pt>
11910             Daniel Jacobowitz  <dan@codesourcery.com>
11911
11912         * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11913         (add_thread): Minor cleanups.
11914         (clear_inferiors): Move lower in the file.  Clear the DLL
11915         list.
11916         (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11917         * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11918         (xml_escape_text): New.
11919         * server.c (handle_query): Handle qXfer:libraries:read.  Report it
11920         for qSupported.
11921         (handle_v_cont): Report errors.
11922         (gdbserver_version): Update.
11923         (main): Correct size of own_buf.  Do not report initial DLL events.
11924         * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11925         (unloaded_dll, xml_escape_text): New.
11926         * win32-low.c (enum target_waitkind): Update comments.
11927         (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11928         (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11929         (win32_EnumProcessModules, win32_GetModuleInformation)
11930         (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11931         (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11932         (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11933         (win32_Module32First, win32_Module32Next, load_toolhelp)
11934         (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11935         (get_child_debug_event): Handle DLL events.
11936         (win32_wait): Likewise.
11937
11938 2007-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
11939
11940         * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11941         * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11942
11943 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
11944
11945         * win32-low.c (handle_output_debug_string): Ignore event if not
11946         waiting.
11947
11948 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
11949
11950         * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11951
11952 2007-07-03  Daniel Jacobowitz  <dan@codesourcery.com>
11953
11954         * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11955
11956 2007-07-02  Daniel Jacobowitz  <dan@codesourcery.com>
11957
11958         * inferiors.c (change_inferior_id): Add comment.
11959         * linux-low.c (check_removed_breakpoint): Add an early
11960         prototype.  Improve debug output.
11961         (linux_attach): Doc update.
11962         (linux_detach_one_process, linux_detach): Clean up before releasing
11963         each process.
11964         (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11965         * linux-low.h (struct process_info): Doc improvement.
11966         * mem-break.c (delete_all_breakpoints): New.
11967         * mem-break.h (delete_all_breakpoints): New prototype.
11968         * thread-db.c (find_first_thread): New.
11969         (thread_db_create_event): Call it instead of
11970         thread_db_find_new_threads.  Clean up unused variables.
11971         (maybe_attach_thread): Remove first thread handling.
11972         (thread_db_find_new_threads): Use find_first_thread.
11973         (thread_db_get_tls_address): Likewise.
11974
11975 2007-06-27  Daniel Jacobowitz  <dan@codesourcery.com>
11976
11977         * thread-db.c (thread_db_find_new_threads): Add prototype.
11978         (thread_db_create_event): Check for the main thread before adding
11979         a new thread.
11980         (maybe_attach_thread): Only enable event reporting if TID == 0.
11981         (thread_db_get_tls_address): Check for new threads.
11982
11983 2007-06-20  Daniel Jacobowitz  <dan@codesourcery.com>
11984
11985         * linux-low.c (linux_create_inferior): Try execv before execvp.
11986         * spu-low.c (spu_create_inferior): Likewise.
11987
11988 2007-06-13  Mike Frysinger  <vapier@gentoo.org>
11989
11990         * linux-low.c (linux_create_inferior): Change execv to execvp.
11991         * spu-low.c (spu_create_inferior): Likewies.
11992
11993 2007-06-13  Daniel Jacobowitz  <dan@codesourcery.com>
11994
11995         * Makefile.in (clean): Clean new files instead of deleted ones.
11996         (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11997         (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11998         rules.
11999         * configure.srv: Specify XML files and new regformats for MIPS and
12000         MIPS64 GNU/Linux.
12001         * linux-mips-low.c (mips_num_regs): Set to only used registers.
12002         (mips_regmap): Do not fetch $0.  Remove unused registers.  Add
12003         an entry for the restart register.
12004         (mips_cannot_fetch_register, mips_cannot_store_register)
12005         (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
12006         register names to match the XML descriptions.
12007         (mips_fill_gregset, mips_store_gregset): Likewise.  Handle the
12008         restart register instead of $0.
12009
12010 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
12011             Markus Deuling  <deuling@de.ibm.com>
12012
12013         * remote-utils.c (decode_xfer_write): New function.
12014         * server.h (decode_xfer_write): Add prototype.
12015         * server.c (handle_query): Add PACKET_LEN argument.  Support
12016         qXfer:spu:read and qXfer:spu:write packets.
12017         (main): Pass packet_len to handle_query.
12018         * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
12019         * target.h (target_ops): Add qxfer_spu.
12020
12021 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
12022
12023         * spu-low.c (spu_proc_xfer_spu): Do not return failure when
12024         accessing non-seekable spufs files.
12025
12026 2007-05-16  Markus Deuling  <deuling@de.ibm.com>
12027
12028         * server.c (handle_query): Add reply for qC packet.
12029
12030 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
12031             Leo Zayas  <lerele@champenstudios@com>
12032
12033         * server.h (check_remote_input_interrupt_request): New function.
12034         * remote_utils.c (INVALID_DESCRIPTOR): New define.
12035         (remote_desc): Initialize with INVALID_DESCRIPTOR.
12036         (input_interrupt): Expose on USE_WIN32API too.  Fix whitespace.
12037         (check_remote_input_interrupt_request): New function.
12038         * server.h (check_remote_input_interrupt_request): Declare.
12039         * win32-low.c (winapi_DebugBreakProcess,
12040         winapi_GenerateConsoleCtrlEvent): New typedefs.
12041         (get_child_debug_event): Lower Win32 debug event polling from 1 sec
12042         to 250 ms.
12043         (win32_wait): Check for remote interrupt request
12044         with check_remote_input_interrupt_request.
12045         (win32_request_interrupt): New function.
12046         (win32_target_op): Set request_interrupt to win32_request_interrupt.
12047
12048 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
12049
12050         * win32-low.c (debug_registers_changed,
12051         debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
12052         CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
12053         CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
12054         (thread_rec): Get context using the low target.
12055         (child_add_thread): Call thread_added on the low target,
12056         which does the same thing.
12057         (regptr): Delete.
12058         (do_initial_child_stuff): Remove debug registers references.
12059         Set context using the low target.  Resume threads after
12060         setting the contexts.
12061         (child_continue): Remove dead variable.  Remove debug
12062         registers references.
12063         (child_fetch_inferior_registers): Go through the low target.
12064         (do_child_store_inferior_registers): Remove.
12065         (child_store_inferior_registers): Go through the low target.
12066         (win32_resume): Remove debug registers references.
12067         Set context using the low target.
12068         (handle_exception): Change return type to void.  Don't record
12069         context here.  Set status to TARGET_WAITKIND_SPURIOUS on a
12070         first chance exception.
12071         (get_child_debug_event): Change return type to void.  Remove
12072         goto loop.  Always return after waiting for debug event.
12073         (win32_wait): Convert to switch statement.  Handle spurious
12074         events.
12075
12076         * win32-i386-low.c (debug_registers_changed,
12077         debug_registers_used): New.
12078         (initial_stuff): Rename to ...
12079         (i386_initial_stuff): ... this.  Clear debug registers
12080         state variables.
12081         (store_debug_registers): Delete.
12082         (i386_get_thread_context): New.
12083         (load_debug_registers): Delete.
12084         (i386_set_thread_context): New.
12085         (i386_thread_added): New.
12086         (single_step): Rename to ...
12087         (i386_single_step): ... this.
12088         (do_fetch_inferior_registers): Rename to ...
12089         (i386_fetch_inferior_register): ... this.
12090         (i386_store_inferior_register): New.
12091         (the_low_target): Adapt to new interface.
12092
12093         * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
12094         (arm_get_thread_context): New.
12095         (arm_set_thread_context): New.
12096         (regptr): New.
12097         (do_fetch_inferior_registers): Rename to ...
12098         (arm_fetch_inferior_register): ... this.
12099         (arm_store_inferior_register): New.
12100         (arm_wince_breakpoint): Reimplement as unsigned long.
12101         (arm_wince_breakpoint_len): Define.
12102         (the_low_target): Adapt to new interface.
12103
12104         * win32-low.h (target_ops): Remove regmap, store_debug_registers and
12105         load_debug_registers.  Add get_thread_context, set_thread_context,
12106         thread_added and store_inferior_register.  Rename
12107         fetch_inferior_registers to fetch_inferior_register.
12108         (regptr): Remove declaration.
12109
12110 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
12111
12112         * linux-low.c (linux_detach): Change return type to int.  Return 0.
12113         * spu-low.c (spu_detach): Likewise.
12114
12115 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
12116
12117         * target.h (target_ops): Change return type of detach to int.
12118         Add join.
12119         (join_inferior): New.
12120         * server.c (main): Don't skip detach support on mingw32.
12121         If the inferior doesn't support detaching return error.
12122         Call join_inferior instead of using waitpid.
12123         * linux-low.c (linux_join): New.
12124         (linux_target_op): Add linux_join.
12125         * spu-low.c (spu_join): New.
12126         (spu_target_ops): Add spu_join.
12127         * win32-low.c (win32_detach): Adapt to new interface.
12128         Reopen current_process_handle before detaching.  Issue a child
12129         resume before detaching.
12130         (win32_join): New.
12131         (win32_target_op): Add win32_join.
12132
12133 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
12134
12135         * win32-low.c (win32-attach): Fix return value.
12136         * target.h (target_ops): Describe ATTACH return values.
12137
12138 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
12139
12140         * win32-low.c (GETPROCADDRESS): Define.
12141         (winapi_DebugActiveProcessStop): Add WINAPI.  typedef as pointer.
12142         (winapi_DebugSetProcessKillOnExit): Likewise.
12143         (win32_create_inferior): Force usage of ansi CreateProcessA.
12144         (win32_attach): Use GETPROCADDRESS.
12145         (win32_detach): Likewise.
12146
12147 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
12148
12149         * win32-low.c (win32_wait): Don't use WSTOPSIG.
12150
12151 2007-03-30  Pedro Alves  <pedro_alves@portugalmail.pt>
12152
12153         * win32-low.c: Commit leftover changes from 2007-03-29.
12154
12155 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
12156
12157         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
12158         fields short instead of int.  Add explicit padding.
12159         (i387_cache_to_fsave): Remove unnecessary casts.
12160         (i387_fsave_to_cache): Doc fix.
12161         (i387_cache_to_fxsave): Remove unnecessary casts and masking.
12162
12163 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
12164
12165         * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
12166         (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
12167
12168 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
12169
12170         * configure.srv (arm*-*-mingw32ce*): Move near the other
12171         arm targets.
12172
12173 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
12174
12175         * configure.ac: Add errno checking.
12176         (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
12177         sys/file.h and malloc.h.
12178         (AC_CHECK_DECLS): Add perror.
12179         (srv_mingwce): Handle.
12180         * configure.srv (i[34567]86-*-cygwin*): Add
12181         win32-i386-low.o to srv_tgtobj.
12182         (i[34567]86-*-mingw*): Likewise.
12183         (arm*-*-mingw32ce*): Add case.
12184         * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12185         HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
12186         [__MINGW32CE__] (strerror): New function.
12187         [__MINGW32CE__] (errno): Define to GetLastError.
12188         [__MINGW32CE__] (COUNTOF): New macro.
12189         (remote_open): Remove extra close call.
12190         * mem-break.c (delete_breakpoint_at): New function.
12191         * mem-break.h (delete_breakpoint_at): Declare.
12192         * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12193         HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
12194         [USE_WIN32API] (read, write): Add char* casts.
12195         * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
12196         * server.h: Include wincecompat.h on Windows CE.
12197         [HAVE_ERRNO_H]: Check.
12198         (perror): Declare if not declared.
12199         * utils.c: Add stdlib.h, errno.h and malloc.h includes.
12200         (perror_with_name): Remove errno declaration.
12201         * wincecompat.h: New.
12202         * wincecompat.c: New.
12203         * win32-low.h: New.
12204         * win32-arm-low.c: New.
12205         * win32-i386-low.c: New.
12206         (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
12207         (OUTMSG2): Make it safe.
12208         (_T): New macro.
12209         (COUNTOF): New macro.
12210         (NUM_REGS): Get it from the low target.
12211         (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
12212         CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
12213         (thread_rec): Let low target handle debug registers.
12214         (child_add_thread): Likewise.
12215         (child_init_thread_list): Likewise.
12216         (continue_one_thread): Likewise.
12217         (regptr): New.
12218         (do_child_fetch_inferior_registers): Move to ...
12219         * win32-i386-low.c: ... here, and rename to ...
12220         (do_fetch_inferior_registers): ... this.
12221         * win32-low.c (child_fetch_inferior_registers):
12222         Go through the low target.
12223         (do_child_store_inferior_registers): Use regptr.
12224         (strwinerror): New function.
12225         (win32_create_inferior): Handle Windows CE.
12226         Use strwinerror instead of strerror on Windows error
12227         codes.  Add program to the error output.
12228         Don't close the main thread handle on Windows CE.
12229         (win32_attach): Use coredll.dll on Windows CE.
12230         (win32_kill): Close current process and current
12231         thread handles.
12232         (win32_detach): Use coredll.dll on Windows CE.
12233         (win32_resume): Let low target handle debug registers, and
12234         step request.
12235         (handle_exception): Add/Remove initial breakpoint.  Avoid
12236         non-existant WSTOPSIG on Windows CE.
12237         (win32_read_inferior_memory): Cast to remove warning.
12238         (win32_arch_string): Go through the low target.
12239         (initialize_low): Call set_breakpoint_data with the low
12240         target's breakpoint.
12241         * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
12242         FOP_REGNUM, mappings): Move to ...
12243         * win32-i386-low.c: ... here.
12244         * win32-low.c (win32_thread_info): Move to ...
12245         * win32-low.h: ... here.
12246         * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
12247         win32-arm-low.c and wincecompat.c.
12248         (all:): Add $EXEEXT.
12249         (install-only:): Likewise.
12250         (gdbserver:): Likewise.
12251         (gdbreplay:): Likewise.
12252         * config.in: Regenerate.
12253         * configure: Regenerate.
12254
12255 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
12256
12257         * win32-low.c: Rename typedef thread_info to
12258         win32_thread_info throughout.
12259
12260 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
12261
12262         * win32-i386-low.c: Rename to ...
12263         * win32-low.c: ... this.
12264         * configure.srv: Replace win32-i386-low.o with win32-low.o.
12265         * Makefile.in: Likewise.
12266
12267 2007-03-27  Pedro Alves  <pedro_alves@portugalmail.pt>
12268
12269         * remote-utils.c (monitor_output): Constify msg parameter.
12270         * server.h (monitor_output): Likewise.
12271         * win32-i386-low.c (handle_output_debug_string): New.
12272         (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
12273         handle_output_debug_string.
12274         (get_child_debug_event): Likewise.
12275
12276 2007-03-27  Mat Hostetter  <mat@lcs.mit.edu>
12277
12278         * server.c (main): Correct strtoul check.
12279
12280 2007-03-27  Jon Ringle  <jon@ringle.org>
12281
12282         * linux-low.c: Check __ARCH_HAS_MMU__ also.
12283
12284 2007-03-27  Brooks Moses  <brooks.moses@codesourcery.com>
12285
12286         * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
12287
12288 2007-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
12289
12290         * terminal.h: Check HAVE_SGTTY_H.
12291
12292 2007-02-27  Mat Hostetter  <mat@lcs.mit.edu>
12293
12294         * remote-utils.c (remote_open): Print out the assigned port number.
12295
12296 2007-02-26  Daniel Jacobowitz  <dan@codesourcery.com>
12297
12298         * remote-utils.c (monitor_output): New function.
12299         * server.c (debug_threads): Define here.
12300         (monitor_show_help): New function.
12301         (handle_query): Handle qRcmd.
12302         (main): Do not handle 'd' packet.
12303         * server.h (debug_threads, remote_debug, monitor_output): Declare.
12304         * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
12305         of debug_threads.
12306
12307 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
12308
12309         * Makefile.in (EXEEXT): New.
12310         (clean): Use $(EXEEXT).
12311
12312 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
12313
12314         * target.h (target_ops): Rename send_signal to request_interrupt,
12315         and remove enum target_signal parameter.
12316         * linux-low.c (linux_request_interrupt): Rename from
12317         linux_send_signal, and always send SIGINT.
12318         * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
12319         and always send SIGINT.
12320         * remote-utils.c (putpkt_binary): Call request_interrupt, instead
12321         of send_signal.
12322         (input_interrupt): Likewise.
12323
12324 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
12325
12326         * server.c (get_features_xml): Check if target implemented
12327         arch_string.
12328         * win32-i386-low.c (win32_arch_string): New.
12329         (win32_target_ops): Add win32_arch_string as arch_string member.
12330
12331 2007-02-22  Markus Deuling  <deuling@de.ibm.com>
12332
12333         * spu-low.c (spu_arch_string): New.
12334         (spu_target_ops): Add spu_arch_string.
12335
12336 2007-02-16  Daniel Jacobowitz  <dan@codesourcery.com>
12337
12338         * remote-utils.c: Remove HAVE_TERMINAL_H check.
12339         * configure.ac: Do not check for terminal.h.
12340         * configure, config.in: Regenerated.
12341
12342 2007-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
12343
12344         * Makefile.in (OBS): Add $(XML_BUILTIN).
12345         (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
12346         (clean): Update.
12347         (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
12348         (arm-with-iwmmxt.c): New.
12349         * config.in, configure: Regenerate.
12350         * configure.ac: Check for iWMMXt.  Handle srv_xmltarget,
12351         srv_xmlbuiltin, and srv_xmlfiles.  Define USE_XML.
12352         * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
12353         (arm*-*-linux*): Add iWMMXt and regset support.
12354         * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
12355         (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
12356         (arm_store_wmmxregset, target_regsets): New.
12357         * server.c (get_features_xml): Take annex argument.  Check builtin
12358         XML documents.
12359         (handle_query): Handle multiple annexes.
12360
12361 2007-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
12362
12363         * remote-utils.c [USE_WIN32API] (read, write): Define.
12364         (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
12365         write.
12366
12367 2007-01-09  Daniel Jacobowitz  <dan@codesourcery.com>
12368
12369         * linux-i386-low.c (the_low_target): Set arch_string.
12370         * linux-x86-64-low.c (the_low_target): Likewise.
12371         * linux-low.c (linux_arch_string): New.
12372         (linux_target_ops): Add it.
12373         * linux-low.h (struct linux_target_ops): Add arch_string.
12374         * server.c (write_qxfer_response): Use const void * for DATA.
12375         (get_features_xml): New.
12376         (handle_query): Handle qXfer:features:read.  Report it for qSupported.
12377         * target.h (struct target_ops): Add arch_string method.
12378
12379 2007-01-03  Denis Pilat  <denis.pilat@st.com>
12380             Daniel Jacobowitz  <dan@codesourcery.com>
12381
12382         * linux-low.c (linux_kill): Handle being called with no threads.
12383         * win32-i386-low.c (win32_kill): Likewise.
12384         (get_child_debug_event): Clear current_process_handle.
12385
12386 2006-12-30  Denis PILAT  <denis.pilat@st.com>
12387             Daniel Jacobowitz  <dan@codesourcery.com>
12388
12389         * remote-utils.c (remote_open): Check the type of specified
12390         serial port devices before opening them.
12391         * server.c (main): Kill the inferior if an error occurs during
12392         the first remote_open.
12393
12394 2006-12-05  Markus Deuling  <deuling@de.ibm.com>
12395
12396         * README: Update supported targets.
12397
12398 2006-11-28  Daniel Jacobowitz  <dan@codesourcery.com>
12399
12400         * Makefile.in (clean): Remove reg-mips64.c.
12401         (reg-mips64.c, reg-mips64.o): New rules.
12402         * configure.srv: Handle mips64.  Include regset support for mips.
12403         * linux-mips-low.c (union mips_register): New.
12404         (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
12405         (mips_breakpoint, mips_breakpoint_at): Use int.
12406         (mips_collect_register, mips_supply_register)
12407         (mips_collect_register_32bit, mips_supply_register_32bit)
12408         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12409         (mips_store_fpregset, target_regsets): New.
12410         * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
12411
12412 2006-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
12413
12414         * configure.srv: Add target "spu*-*-*".
12415         * Makefile.in (clean): Remove reg-spu.c.
12416         (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
12417         * spu-low.c: New file.
12418
12419 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
12420
12421         * configure.ac: Correct td_thr_tls_get_addr test.
12422         * configure: Regenerated.
12423
12424 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
12425
12426         * linux-low.c (linux_wait_for_event): Reformat.  Use the
12427         pass_signals array.
12428         * remote-utils.c (decode_address_to_semicolon): New.
12429         * server.c (pass_signals, handle_general_set): New.
12430         (handle_query): Mention QPassSignals for qSupported.
12431         (main): Call handle_general_set.
12432         * server.h (pass_signals, decode_address_to_semicolon): New.
12433
12434 2006-11-06  Daniel Jacobowitz  <dan@codesourcery.com>
12435
12436         * server.c (handle_query): Correct error handling for read_auxv.
12437
12438 2005-10-19  Ulrich Weigand  <uweigand@de.ibm.com>
12439
12440         * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
12441         and srv_linux_thread_db to yes.
12442         * linux-s390-low.c (s390_fill_gregset): New function.
12443         (target_regsets): Define data structure.
12444
12445 2006-10-17  Daniel Jacobowitz  <dan@codesourcery.com>
12446
12447         * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
12448         * configure.ac: Use it.  Define HAVE_TD_THR_TLS_GET_ADDR.
12449         * config.in, configure: Regenerated.
12450         * inferiors.c (gdb_id_to_thread): New function.
12451         (gdb_id_to_thread_id): Use it.
12452         * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
12453         * linux-low.h (struct process_info): Add th member.
12454         (thread_db_get_tls_address): New prototype.
12455         * remote-utils.c (decode_address): Make non-static.
12456         * server.c (handle_query): Handle qGetTLSAddr.
12457         * server.h (gdb_id_to_thread, decode_address): New prototypes.
12458         * target.h (struct target_ops): Add get_tls_address.
12459         * thread-db.c (maybe_attach_thread): Save the thread handle.
12460         (thread_db_get_tls_address): New.
12461
12462 2006-09-28  Daniel Jacobowitz  <dan@codesourcery.com>
12463
12464         * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
12465         (linux_resume_one_process): Take a siginfo_t *.  Update all
12466         callers.  Queue it if necessary.  Use PTRACE_SETSIGINFO.
12467         (struct pending_signals): Add a siginfo_t.
12468         (linux_wait_for_process): Always set last_status.
12469         (linux_wait_for_event): Use PTRACE_GETSIGINFO.
12470         (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
12471         * linux-low.h (struct process_info): Add last_status.
12472
12473 2006-09-21  Daniel Jacobowitz  <dan@codesourcery.com>
12474
12475         * remote-utils.c (try_rle): New function.
12476         (putpkt_binary): Use it.
12477
12478 2006-08-19  Daniel Jacobowitz  <dan@codesourcery.com>
12479
12480         * Makefile.in (clean): Clean reg-x86-64-linux.c.
12481         (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
12482         * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
12483         * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
12484         (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
12485         point registers.
12486
12487 2006-08-08  Richard Sandiford  <richard@codesourcery.com>
12488
12489         * server.c (terminal_fd): New variable.
12490         (old_foreground_pgrp): Likewise.
12491         (restore_old_foreground_pgrp): New function.
12492         (start_inferior): Record the terminal file descriptor in terminal_fd
12493         and its original foreground group in old_foreground_pgrp.  Register
12494         restore_old_foreground_pgrp with atexit().
12495
12496 2006-07-26  Daniel Jacobowitz  <dan@codesourcery.com>
12497
12498         * server.c (handle_query): Correct qPart to qXfer.
12499
12500 2006-07-22  Daniel Jacobowitz  <dan@codesourcery.com>
12501
12502         * configure.ac: Check for more headers which are missing on
12503         Windows.  Automatically supply -lwsock32 and USE_WIN32API.
12504         * configure.srv: Add Cygwin and mingw32.
12505         * remote-utils.c: Don't include headers unconditionally which
12506         are missing on mingw32.  Include <winsock.h> for mingw32.
12507         (remote_open): Adjust for mingw32 support.  Flush
12508         standard error after writing to it.
12509         (remote_close, putpkt_binary, input_interrupt, block_async_io)
12510         (unblock_async_io, enable_async_io, disable_async_io)
12511         (readchar, getpkt): Update for Winsock support.
12512         (prepare_resume_reply): Expect a protocol signal number.
12513         * server.c: Disable <sys/wait.h> on mingw32.
12514         (start_inferior): Adjust for mingw32 support.  Flush
12515         standard error after writing to it.
12516         (attach_inferior): Likewise.  Use protocol signal
12517         numbers.
12518         (main): Skip 'D' packet on mingw32.  Use protocol signal numbers
12519         and names.
12520         * win32-i386-low.c: New file.
12521         * Makefile.in (XM_CLIBS): Set.
12522         (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
12523         (win32-i386-low.o): New dependency rule.
12524         * linux-low.c (linux_wait): Use target signal numbers.
12525         * target.h (struct target_ops): Doc fix.
12526         * server.h (target_signal_to_name): New prototype.
12527         * gdbreplay.c: Don't include headers unconditionally which
12528         are missing on mingw32.  Include <winsock.h> for mingw32.
12529         (remote_close, remote_open): Adjust for Winsock support.
12530         * configure, config.in: Regenerated.
12531
12532 2006-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
12533
12534         * server.c (decode_xfer_read, write_qxfer_response): New.
12535         (handle_query): Take a packet length argument.  Handle
12536         qXfer:auxv:read instead of qPart:auxv:read.  Mention it in
12537         the qSupported response.
12538         (main): Update call to handle_query.
12539
12540 2006-06-22  Daniel Jacobowitz  <dan@codesourcery.com>
12541
12542         * remote-utils.c (remote_escape_output, remote_unescape_input): New.
12543         (putpkt_binary): Renamed from putpkt and adjusted for binary
12544         data.
12545         (putpkt): New wrapper for putpkt_binary.
12546         (readchar): Don't mask off the high bit.
12547         (decode_X_packet): New function.
12548         * server.c (main): Call putpkt_binary if a handler sets the packet
12549         length.  Save the length of the incoming packet.  Handle 'X'.
12550         * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
12551
12552 2006-06-21  Daniel Jacobowitz  <dan@codesourcery.com>
12553
12554         * server.c (handle_query): Handle qSupported.
12555
12556 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
12557
12558         * remote-utils.c (all_symbols_looked_up): New variable.
12559         (look_up_one_symbol): Check it.
12560         * server.h (look_up_one_symbol): New declaration.
12561         * thread-db.c (thread_db_init): Set all_symbols_looked_up.
12562
12563 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
12564
12565         * Makefile.in (linux-arm-low.o): Update dependencies.
12566         * linux-arm-low.c: Include "gdb_proc_service.h".
12567         (PTRACE_GET_THREAD_AREA): Define.
12568         (ps_get_thread_area): New function.
12569
12570 2006-05-09  Nathan Sidwell  <nathan@codesourcery.com>
12571
12572         * configure.srv (m68k*-*-uclinux*): New target.
12573         * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
12574         (linux_resume_one_process): Remove extraneous cast.
12575         (linux_read_offsets): New.
12576         (linux_target_op): Add linux_read_offsets on mmuless systems.
12577         * server.c (handle_query): Add qOffsets logic.
12578         * target.h (struct target_ops): Add read_offsets.
12579
12580 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
12581
12582         * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
12583         (PTRACE_GET_THREAD_AREA): Define.
12584         (ps_get_thread_area): New function.
12585         * Makefile.in (linux-i386-low.o, linux-mips-low.o)
12586         (linux-x86-64-low.o): Update.
12587
12588 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
12589
12590         * configure.ac: Remove checks for prfpregset_t.
12591         * gdb_proc_service.h: New file.
12592         * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
12593         new "gdb_proc_service.h".
12594         * proc-service.c: Likewise.
12595         (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
12596         (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
12597         * Makefile.in (gdb_proc_service_h): Updated.
12598         * configure, config.in: Regenerated.
12599
12600 2006-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
12601
12602         * remote-utils.c (prepare_resume_reply): Move declaration
12603         of gdb_id_from_wait to the top of the block.
12604
12605 2006-02-15  Daniel Jacobowitz  <dan@codesourcery.com>
12606
12607         * linux-low.c (regsets_store_inferior_registers): Read the regset
12608         from the target before filling it.
12609
12610 2006-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
12611
12612         * server.c (attach_inferior): Return SIGTRAP for a successful
12613         attach.
12614
12615 2006-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
12616
12617         * Makefile.in (OBS): Add version.o.
12618         (STAGESTUFF): Delete.
12619         (version.o): Add dependencies.
12620         (version.c): Replace rule.
12621         (clean): Remove version.c.
12622         * server.c (gdbserver_version): New.
12623         (gdbserver_usage): Use printf.
12624         (main): Handle --version and --help.
12625         * server.h (version, host_name): Add declarations.
12626
12627 2005-12-23  Eli Zaretskii  <eliz@gnu.org>
12628
12629         * linux-arm-low.c:
12630         * linux-arm-low.c:
12631         * inferiors.c:
12632         * i387-fp.h:
12633         * i387-fp.c:
12634         * gdbreplay.c:
12635         * regcache.c:
12636         * proc-service.c:
12637         * mem-break.h:
12638         * mem-break.c:
12639         * linux-x86-64-low.c:
12640         * linux-sh-low.c:
12641         * linux-s390-low.c:
12642         * linux-ppc64-low.c:
12643         * linux-ppc-low.c:
12644         * linux-mips-low.c:
12645         * linux-m68k-low.c:
12646         * linux-m32r-low.c:
12647         * linux-low.h:
12648         * linux-low.c:
12649         * linux-ia64-low.c:
12650         * linux-i386-low.c:
12651         * linux-crisv32-low.c:
12652         * thread-db.c:
12653         * terminal.h:
12654         * target.h:
12655         * target.c:
12656         * server.h:
12657         * server.c:
12658         * remote-utils.c:
12659         * regcache.h:
12660         * utils.c:
12661         * Makefile.in:
12662         * configure.ac:
12663         * gdbserver.1: Add (C) after Copyright.  Update the FSF
12664         address.
12665
12666 2005-11-13  Daniel Jacobowitz  <dan@codesourcery.com>
12667
12668         * linux-arm-low.c (arm_eabi_breakpoint): New variable.
12669         (arm_breakpoint_at): Recognize both breakpoints.
12670         (the_low_target): Use the correct breakpoint instruction.
12671
12672 2005-11-02  Daniel Jacobowitz  <dan@codesourcery.com>
12673
12674         * configure.srv (x86_64-*-linux*): Turn on thread_db support.
12675         * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
12676         (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
12677         (the_low_target): Update.
12678
12679 2005-10-25  Andreas Schwab  <schwab@suse.de>
12680
12681         * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
12682
12683         * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
12684         (ia64_num_regs): Reduce to 462.
12685
12686 2005-09-17  Daniel Jacobowitz  <dan@codesourcery.com>
12687
12688         * acinclude.m4: Correct quoting.
12689         * aclocal.m4: Regenerated.
12690
12691         Suggested by SZOKOVACS Robert <szo@ies.hu>:
12692         * thread-db.c (thread_db_err_str): Handle TD_VERSION.
12693         (thread_db_init): Call thread_db_err_str.
12694         * configure.ac: Check for TD_VERSION.
12695         * config.in, configure: Regenerated.
12696
12697 2005-07-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12698
12699         * server.h (error, fatal, warning): Add ATTR_FORMAT.
12700
12701 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
12702
12703         * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
12704         is not available.  Define HAVE_PTRACE_GETREGS if it is.
12705         * config.in, configure: Regenerated.
12706         * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
12707         * linux-i386-low.c, linux-m68k-low.c: Update to use
12708         HAVE_PTRACE_GETREGS.
12709         * linux-low.c (regsets_fetch_inferior_registers)
12710         (regsets_store_inferior_registers): Only return 0 if we processed
12711         GENERAL_REGS.
12712         * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
12713         * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
12714
12715 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
12716
12717         * inferiors.c (struct thread_info): Add gdb_id.
12718         (add_thread): Add gdb_id argument.
12719         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
12720         * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
12721         calls to add_thread.
12722         * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
12723         * server.c (handle_query): Use thread_to_gdb_id.
12724         (handle_v_cont, main): Use gdb_id_to_thread_id.
12725         * server.h (add_thread): Update prototype.
12726         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
12727         prototypes.
12728
12729 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
12730
12731         * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
12732         left-padded registers.
12733         * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
12734         * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
12735
12736 2005-07-01  Steve Ellcey  <sje@cup.hp.com>
12737
12738         * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
12739         * configure: Regenerate.
12740         * config.in: Regenerate.
12741         * server.h (NEED_DECLARATION_STRERROR):
12742         Replace with !HAVE_DECL_STRERROR.
12743
12744 2005-06-16  Daniel Jacobowitz  <dan@codesourcery.com>
12745
12746         * linux-low.c (linux_wait, linux_send_signal): Don't test
12747         an unsigned long variable for > 0 if it could be MAX_ULONG.
12748         * server.c (myresume): Likewise.
12749         * target.c (set_desired_inferior): Likewise.
12750
12751 2005-06-13  Mark Kettenis  <kettenis@gnu.org>
12752
12753         * configure.ac: Simplify and improve check for socklen_t.
12754         * configure, config.in: Regenerate.
12755
12756 2005-06-12  Daniel Jacobowitz  <dan@codesourcery.com>
12757
12758         * acconfig.h: Remove.
12759         * configure.ac: Add a test for socklen_t.  Use three-argument
12760         AC_DEFINE throughout.
12761         * config.in: Regenerated using autoheader 2.59.
12762         * configure: Regenerated.
12763
12764         * gdbreplay.c (socklen_t): Provide a default.
12765         (remote_open): Use socklen_t.
12766         * remote-utils.c (socklen_t): Provide a default.
12767         (remote_open): Use socklen_t.
12768         (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
12769         unsigned char.
12770
12771         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
12772         char for buffers.
12773         * linux-low.c (linux_read_memory, linux_write_memory)
12774         (linux_read_auxv): Likewise.
12775         * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
12776         (check_mem_write): Likewise.
12777         * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
12778         Likewise.
12779         * regcache.c (struct inferior_rgcache_data, registers_to_string)
12780         (registers_from_string, register_data): Likewise.
12781         * server.c (handle_query, main): Likewise.
12782         * server.h (convert_ascii_to_int, convert_int_to_ascii)
12783         (decode_M_packet): Likewise.
12784         * target.c (read_inferior_memory, write_inferior_memory): Likewise.
12785         * target.h (struct target_ops): Update read_memory, write_memory,
12786         and read_auxv.
12787         (read_inferior_memory, write_inferior_memory): Update.
12788         * linux-low.h (struct linux_target_ops): Change type of breakpoint
12789         to unsigned char *.
12790         * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
12791         linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
12792         linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
12793         linux-s390-low.c, linux-sh-low.c: Update for changes in
12794         read_inferior_memory and the_low_target->breakpoint.
12795
12796 2005-05-28  Daniel Jacobowitz  <dan@codesourcery.com>
12797
12798         * Makefile.in (SFILES): Add linux-ppc64-low.c.
12799         (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
12800         * configure.srv: Add powerpc64-*-linux*.
12801         * linux-ppc64-low.c: New file.
12802
12803 2005-05-23  Orjan Friberg  <orjanf@axis.com>
12804
12805         * linux-cris-low.c: New file with support for CRIS.
12806         * linux-crisv32-low.c: Ditto for CRISv32.
12807         * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
12808         (clean): Add reg-cris.c and reg-crisv32.c.
12809         Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
12810         reg-crisv32.o, and reg-crisv32.c to make rules.
12811         * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
12812         recognized targets.
12813
12814 2005-05-16  Ulrich Weigand  <uweigand@de.ibm.com>
12815
12816         * linux-low.c (fetch_register): Ensure buffer size is a multiple
12817         of sizeof (PTRACE_XFER_TYPE).
12818         (usr_store_inferior_registers): Likewise.  Zero out excess bytes.
12819
12820 2005-05-12  Orjan Friberg  <orjanf@axis.com>
12821
12822         * target.h (struct target_ops): Add insert_watchpoint,
12823         remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
12824         pointers for hardware watchpoint support.
12825         * linux-low.h (struct linux_target_ops): Ditto.
12826         * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
12827         (linux_stopped_by_watchpoint, linux_stopped_data_address): New.  Add
12828         to linux_target_ops.
12829         * remote-utils.c (prepare_resume_reply): Add watchpoint information to
12830         reply packet.
12831         * server.c (main): Recognize 'Z' and 'z' packets.
12832
12833 2005-05-10  Ulrich Weigand  <uweigand@de.ibm.com>
12834
12835         * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
12836         (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
12837         (the_low_target): Add new members.
12838
12839 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
12840
12841         * proc-service.c (ps_lgetregs): Search all_processes instead of
12842         all_threads.
12843
12844 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
12845
12846         * server.c (start_inferior): Change return type to int.
12847         (attach_inferior): Change sigptr to int *.
12848         (handle_v_cont, handle_v_requests): Change signal to int *.
12849         (main): Change signal to int.
12850
12851 2005-04-15  Kei Sakamoto  <sakamoto.kei@renesas.com>
12852
12853         * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
12854         * configure.srv: Add m32r*-*-linux*.
12855         * linux-m32r-low.c: New file.
12856
12857 2005-03-04  Daniel Jacobowitz  <dan@codesourcery.com>
12858
12859         * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
12860
12861 2005-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
12862
12863         * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
12864         Take unsigned long arguments for PIDs.
12865         * linux-low.c (add_process, linux_attach_lwp, linux_attach)
12866         (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
12867         (wait_for_sigstop, linux_resume_one_process)
12868         (regsets_fetch_inferior_registers, linux_send_signal)
12869         (linux_read_auxv): Likewise.  Update the types of variables holding
12870         PIDs.  Update format string specifiers.
12871         * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
12872         * remote-utils.c (prepare_resume_reply): Likewise.
12873         * server.c (cont_thread, general_thread, step_thread)
12874         (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
12875         unsigned long.
12876         (handle_query): Update format specifiers.
12877         (handle_v_cont, main): Use strtoul for thread IDs.
12878         * server.h (struct inferior_list_entry): Use unsigned long for ID.
12879         (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12880         (general_thread, step_thread, thread_from_wait)
12881         (old_thread_from_wait): Update.
12882         * target.h (struct thread_resume): Use unsigned long for THREAD.
12883         (struct target_ops): Use unsigned long for arguments to attach and
12884         thread_alive.
12885
12886 2005-02-24  Daniel Jacobowitz  <dan@codesourcery.com>
12887
12888         * acinclude.m4: Include bfd/bfd.m4 directly.
12889         * configure.ac: Use AC_ARG_PROGRAM.  Suggested by Aron Griffis
12890         <agriffis@toolchain.org>.
12891         * aclocal.m4, configure: Regenerated.
12892
12893 2005-01-07  Andrew Cagney  <cagney@gnu.org>
12894
12895         * configure.ac: Rename configure.in, require autoconf 2.59.
12896         * configure: Re-generate.
12897
12898 2004-12-08  Daniel Jacobowitz  <dan@debian.org>
12899
12900         * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area.  Reset
12901         LIBS when finished.
12902         * aclocal.m4: Regenerated.
12903         * configure: Regenerated.
12904
12905 2004-11-21  Andreas Schwab  <schwab@suse.de>
12906
12907         * linux-m68k-low.c (m68k_num_gregs): Define.
12908         (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12909         (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12910         (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12911         (m68k_breakpoint_at): New.  Add to the_low_target.
12912
12913         * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12914         srv_linux_thread_db to yes.
12915
12916 2004-10-20  Joel Brobecker  <brobecker@gnat.com>
12917
12918         * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12919         (ARCH_SET_FS): Likewise.
12920         (ARCH_GET_FS): Likewise.
12921         (ARCH_GET_GS): Likewise.
12922
12923 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
12924
12925         * linux-i386-low.c (ps_get_thread_area): New.
12926         * linux-x86-64-low.c (ps_get_thread_area): New.
12927         * linux-low.c: Include <sys/syscall.h>.
12928         (linux_kill_one_process): Don't kill the first thread here.
12929         (linux_kill): Kill the first thread here.
12930         (kill_lwp): New function.
12931         (send_sigstop, linux_send_signal): Use it.
12932         * proc-service.c: Clean up #ifdefs.
12933         (fpregset_info): Delete.
12934         (ps_lgetregs): Update and enable implementation.
12935         (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12936         implementations.
12937         * remote-utils.c (struct sym_cache, symbol_cache): New.
12938         (input_interrupt): Print a clearer message.
12939         (async_io_enabled): New variable.
12940         (enable_async_io, disable_async_io): Use it.  Update comments.
12941         (look_up_one_symbol): Use the symbol cache.
12942         * thread-db.c (thread_db_look_up_symbols): New function.
12943         (thread_db_init): Update comments.  Call thread_db_look_up_symbols.
12944
12945 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
12946
12947         * configure.in: Test for -rdynamic.
12948         * configure: Regenerated.
12949         * Makefile (INTERNAL_LDFLAGS): New.
12950         (gdbserver, gdbreplay): Use it.
12951
12952 2004-09-02  Andrew Cagney  <cagney@gnu.org>
12953
12954         * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12955
12956 2004-03-23  Daniel Jacobowitz  <drow@mvista.com>
12957
12958         * linux-low.c (linux_wait): Clear all_processes list also.
12959
12960 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
12961
12962         * linux-low.c: Include <errno.h>.  Remove extern declaration of
12963         errno.
12964
12965 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
12966
12967         * gdbreplay.c, server.h, utils.c: Update copyright years.
12968
12969 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
12970
12971         * server.c (main): Print child status or termination signal from
12972         variable 'signal', not 'sig'.
12973
12974 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
12975
12976         * linux-low.c (linux_read_memory): Change return type to
12977         int.  Check for and return error from ptrace().
12978         * target.c (read_inferior_memory): Change return type to int.  Pass
12979         back return status from the_target->read_memory().
12980         * target.h (struct target_ops): Adapt *read_memory() prototype.
12981         Update comment.
12982         (read_inferior_memory): Adapt prototype.
12983         * server.c (main): Return an error packet if
12984         read_inferior_memory() returns an error.
12985
12986 2004-03-04  Daniel Jacobowitz  <drow@mvista.com>
12987
12988         * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12989         Unify with other clean targets.
12990
12991 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
12992
12993         * server.c (handle_v_cont): Call set_desired_inferior.
12994
12995 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
12996
12997         * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12998
12999 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
13000
13001         * linux-low.c (linux_wait): Unblock async I/O.
13002         (linux_resume): Block and enable async I/O.
13003         * remote-utils.c (block_async_io, unblock_async_io): New functions.
13004         * server.h (block_async_io, unblock_async_io): Add prototypes.
13005
13006 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
13007
13008         * remote-utils.c (remote_open): Print a status notice after
13009         opening a TCP port.
13010         * server.c (attach_inferior): Print a status notice after
13011         attaching.
13012
13013 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
13014
13015         * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
13016
13017 2004-02-26  Daniel Jacobowitz  <drow@mvista.com>
13018
13019         * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
13020         error packet.
13021         * server.c, target.h: Update copyright years.
13022
13023 2004-02-25  Roland McGrath  <roland@redhat.com>
13024
13025         * target.h (struct target_ops): New member `read_auxv'.
13026         * server.c (handle_query): Handle qPart:auxv:read: query using that.
13027         * linux-low.c (linux_read_auxv): New function.
13028         (linux_target_ops): Initialize `read_auxv' member to that.
13029
13030 2004-02-17  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
13031
13032         Committed by Jim Blandy  <jimb@redhat.com>.
13033
13034         * linux-s390-low.c (s390_num_regs): Update.
13035         (s390_regmap): Remove control registers.  Use __s390x__ predefine
13036         instead of GPR_SIZE to distiguish s390 and s390x targets.
13037
13038 2004-01-31  Daniel Jacobowitz  <drow@mvista.com>
13039
13040         * linux-low.c: Update copyright year.
13041         (check_removed_breakpoint): Clear pending_is_breakpoint.
13042         (linux_set_resume_request, linux_queue_one_thread)
13043         (resume_status_pending_p): New functions.
13044         (linux_continue_one_thread): Use process->resume.
13045         (linux_resume): Only resume threads if there are no pending events.
13046         * linux-low.h (struct process_info): Add resume request
13047         pointer.
13048
13049 2004-01-30  Daniel Jacobowitz  <drow@mvista.com>
13050
13051         * regcache.c (new_register_cache): Clear the allocated register
13052         buffer.  Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
13053
13054 2003-10-13  Daniel Jacobowitz  <drow@mvista.com>
13055
13056         * linux-low.c (linux_resume): Take a struct thread_resume *
13057         argument.
13058         (linux_wait): Update call.
13059         (resume_ptr): New static variable.
13060         (linux_continue_one_thread): Renamed from
13061         linux_continue_one_process.  Use resume_ptr.
13062         (linux_resume): Use linux_continue_one_thread.
13063         * server.c (handle_v_cont, handle_v_requests): New functions.
13064         (myresume): New function.
13065         (main): Handle 'v' case.
13066         * target.h (struct thread_resume): New type.
13067         (struct target_ops): Change argument of "resume" to struct
13068         thread_resume *.
13069         (myresume): Delete macro.
13070
13071 2003-08-08  H.J. Lu  <hongjiu.lu@intel.com>
13072
13073         * Makefile.in (install-only): Create dest dir. Support DESTDIR.
13074         (uninstall): Support DESTDIR.
13075
13076 Mon Jul 21 20:09:34 UTC 2003  Brendan Conoboy  <blc@redhat.com>
13077
13078         * configure.srv: Add xscale*linux copy of arm*linux entry.
13079
13080 2003-07-24  Daniel Jacobowitz  <drow@mvista.com>
13081
13082         * linux-arm-low.c (arm_reinsert_addr): New function.
13083         (the_low_target): Add arm_reinsert_addr.
13084
13085 2003-07-08  Mark Kettenis  <kettenis@gnu.org>
13086
13087         * mem-break.c: Remove whitespace at end of file.
13088
13089 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
13090
13091         * configure.in: Check whether we need to prototype strerror.
13092         * server.h: Optionally prototype strerror.
13093         * gdbreplay.c (perror_with_name): Use strerror.
13094         * linux-low.c (linux_attach_lwp): Use strerror.
13095         * utils.c (perror_with_name): Use strerror.
13096         * config.in, configure: Regenerated.
13097
13098 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
13099
13100         * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
13101         SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
13102
13103 2003-06-20  Daniel Jacobowitz  <drow@mvista.com>
13104
13105         * Makefile.in (SFILES): Update.
13106         * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
13107         low-sun3.c: Remove files.
13108
13109 2003-06-17  Daniel Jacobowitz  <drow@mvista.com>
13110
13111         * linux-low.c: Move comment to linux_thread_alive where it belonged.
13112         (linux_detach_one_process, linux_detach): New functions.
13113         (linux_target_ops): Add linux_detach.
13114         * server.c (main): Handle 'D' packet.
13115         * target.h (struct target_ops): Add "detach" member.
13116         (detach_inferior): Define.
13117
13118 2003-06-13  Mark Kettenis  <kettenis@gnu.org>
13119
13120         From Kelley Cook  <kelleycook@wideopenwest.com>:
13121         * configure.srv: Accept i[34567]86 variants.
13122
13123 2003-06-05  Daniel Jacobowitz  <drow@mvista.com>
13124
13125         * linux-low.c (linux_wait_for_event): Correct comment typos.
13126         (linux_resume_one_process): Call check_removed_breakpoint.
13127         (linux_send_signal): New function.
13128         (linux_target_ops): Add linux_send_signal.
13129         * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
13130         of kill.
13131         * target.h (struct target_ops): Add send_signal.
13132
13133 2003-05-29  Jim Blandy  <jimb@redhat.com>
13134
13135         * linux-low.c (usr_store_inferior_registers): Transfer buf in
13136         PTRACE_XFER_TYPE-sized chunks, not int-sized chunks.  Otherwise,
13137         if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
13138         away part of the register's value.
13139
13140 2003-03-26  Daniel Jacobowitz  <drow@mvista.com>
13141
13142         * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
13143         (linux_wait_for_event, linux_init_signals): Likewise.
13144
13145 2003-03-17  Daniel Jacobowitz  <drow@mvista.com>
13146
13147         * configure.in: Check for stdlib.h.
13148         * configure: Regenerated.
13149         * config.in: Regenerated.
13150
13151 2003-01-04  Andreas Schwab  <schwab@suse.de>
13152
13153         * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
13154
13155 2003-01-02  Andrew Cagney  <ac131313@redhat.com>
13156
13157         * Makefile.in: Remove obsolete code.
13158
13159 2002-11-20  Daniel Jacobowitz  <drow@mvista.com>
13160
13161         * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
13162         defined(PT_FPR0_HI).
13163
13164 2002-11-17  Stuart Hughes  <seh@zee2.com>
13165
13166         * linux-arm-low.c (arm_num_regs): Increase.
13167         (arm_regmap): Include status register.
13168
13169 2002-11-17  Daniel Jacobowitz  <drow@mvista.com>
13170
13171         * linux-low.c (register_addr): Remove incorrect -1 check.
13172
13173 2002-08-29  Daniel Jacobowitz  <drow@mvista.com>
13174
13175         * linux-low.c (linux_create_inferior): Call setpgid.  Return
13176         the new PID.
13177         (unstopped_p, linux_signal_pid): Remove.
13178         (linux_target_ops): Remove linux_signal_pid.
13179         * remote-utils.c (putpkt, input_interrupt): Use signal_pid
13180         global instead of target method.
13181         * target.h (struct target_ops): Remove signal_pid.  Update comment
13182         for create_inferior.
13183         * server.c (signal_pid): New variable.
13184         (create_inferior): Set signal_pid.  Block SIGTTOU and SIGTTIN in
13185         gdbserver.  Set the child to be the foreground process group.
13186         (attach_inferior): Set signal_pid.
13187
13188 2002-08-23  Daniel Jacobowitz  <drow@mvista.com>
13189
13190         * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
13191
13192 2002-08-20  Jim Blandy  <jimb@redhat.com>
13193
13194         * Makefile.in (LDFLAGS): Allow the configure script to establish a
13195         default for this.
13196
13197 2002-08-01  Andrew Cagney  <cagney@redhat.com>
13198
13199         * Makefile.in: Make chill references obsolete.
13200
13201 2002-07-24  Kevin Buettner  <kevinb@redhat.com>
13202
13203         * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
13204         * configure: Regenerate.
13205         * config.in: Regenerate.
13206
13207 2002-07-09  David O'Brien  <obrien@FreeBSD.org>
13208
13209         * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
13210         (perror_with_name, remote_close, remote_open, expect, play): Static.
13211
13212 2002-07-04  Michal Ludvig  <mludvig@suse.cz>
13213
13214         * linux-x86-64-low.c (x86_64_regmap): Make it an array of
13215         byte offsets instead of an array of indexes.
13216         (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
13217
13218 2002-06-13  Daniel Jacobowitz  <drow@mvista.com>
13219
13220         * regcache.c: Add comment.
13221
13222 2002-06-11  Daniel Jacobowitz  <drow@mvista.com>
13223
13224         * thread-db.c: New file.
13225         * proc-service.c: New file.
13226         * acinclude.m4: New file.
13227         * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
13228         proc-service.o, and thread-db.o.
13229         (linux-low.o): Add USE_THREAD_DB.
13230         * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
13231         HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
13232         * aclocal.m4: Regenerated.
13233         * config.in: Regenerated.
13234         * configure: Regenerated.
13235         * configure.in: Check for proc_service.h, sys/procfs.h,
13236         thread_db.h, and linux/elf.h headrs.
13237         Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
13238         PRFPREGSET_T_BROKEN.  Introduce srv_thread_depfiles and USE_THREAD_DB.
13239         Check for -lthread_db and thread support.
13240         * configure.srv: Enable thread_db support for ARM, i386, MIPS,
13241         PowerPC, and SuperH.
13242         * i387-fp.c: Constify arguments.
13243         * i387-fp.h: Likewise.
13244         * inferiors.c: (struct thread_info): Renamed from
13245         `struct inferior_info'.  Remove PID member.  Use generic inferior
13246         list header.  All uses updated.
13247         (inferiors, signal_pid): Removed.
13248         (all_threads): New variable.
13249         (get_thread): Define.
13250         (add_inferior_to_list): New function.
13251         (for_each_inferior): New function.
13252         (change_inferior_id): New function.
13253         (add_inferior): Removed.
13254         (remove_inferior): New function.
13255         (add_thread): New function.
13256         (free_one_thread): New function.
13257         (remove_thread): New function.
13258         (clear_inferiors): Use for_each_inferior and free_one_thread.
13259         (find_inferior): New function.
13260         (find_inferior_id): New function.
13261         (inferior_target_data): Update argument type.
13262         (set_inferior_target_data): Likewise.
13263         (inferior_regcache_data): Likewise.
13264         (set_inferior_regcache_data): Likewise.
13265         * linux-low.c (linux_bp_reinsert): Remove.
13266         (all_processes, stopping_threads, using_thrads)
13267         (struct pending_signals, debug_threads, pid_of): New.
13268         (inferior_pid): Replace with macro.
13269         (struct inferior_linux_data): Remove.
13270         (get_stop_pc, add_process): New functions.
13271         (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
13272         Use add_process and add_thread.
13273         (linux_attach_lwp): New function, based on old linux_attach.  Use
13274         add_process and add_thread.  Set stop_expected for new threads.
13275         (linux_attach): New function.
13276         (linux_kill_one_process): New function.
13277         (linux_kill): Kill all LWPs.
13278         (linux_thread_alive): Use find_inferior_id.
13279         (check_removed_breakpoints, status_pending_p): New functions.
13280         (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
13281         Update.  Use WNOHANG.  Wait for cloned processes also.  Update process
13282         struct for the found process.
13283         (linux_wait_for_event): New function.
13284         (linux_wait): Use it.  Support LWPs.
13285         (send_sigstop, wait_for_sigstop, stop_all_processes)
13286         (linux_resume_one_process, linux_continue_one_process): New functions.
13287         (linux_resume): Support LWPs.
13288         (REGISTER_RAW_SIZE): Remove.
13289         (fetch_register): Use register_size instead.  Call supply_register.
13290         (usr_store_inferior_registers): Likewise.  Call collect_register.
13291         Fix recursive case.
13292         (regsets_fetch_inferior_registers): Improve error message.
13293         (regsets_store_inferior_registers): Add debugging.
13294         (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
13295         (unstopped_p, linux_signal_pid): New functions.
13296         (linux_target_ops): Add linux_signal_pid.
13297         (linux_init_signals): New function.
13298         (initialize_low): Call it.  Initialize using_threads.
13299         * regcache.c (inferior_regcache_data): Add valid
13300         flag.
13301         (get_regcache): Fetch registers lazily.  Add fetch argument
13302         and update all callers.
13303         (regcache_invalidate_one, regcache_invalidate): New
13304         functions.
13305         (new_register_cache): Renamed from create_register_cache.
13306         Return the new regcache.
13307         (free_register_cache): Change argument to a void *.
13308         (registers_to_string, registers_from_string): Call get_regcache
13309         with fetch flag set.
13310         (register_data): Make static.  Pass fetch flag to get_regcache.
13311         (supply_register): Call get_regcache with fetch flag clear.
13312         (collect_register): Call get_regcache with fetch flag set.
13313         (collect_register_as_string): New function.
13314         * regcache.h: Update.
13315         * remote-utils.c (putpkt): Flush after debug output and use
13316         stderr.
13317         Handle input interrupts while waiting for an ACK.
13318         (input_interrupt): Use signal_pid method.
13319         (getpkt): Flush after debug output and use stderr.
13320         (outreg): Use collect_register_as_string.
13321         (new_thread_notify, dead_thread_notify): New functions.
13322         (prepare_resume_reply): Check using_threads.  Set thread_from_wait
13323         and general_thread.
13324         (look_up_one_symbol): Flush after debug output.
13325         * server.c (step_thread, server_waiting): New variables.
13326         (start_inferior): Don't use signal_pid.  Update call to mywait.
13327         (attach_inferior): Update call to mywait.
13328         (handle_query): Handle qfThreadInfo and qsThreadInfo.
13329         (main): Don't fetch/store registers explicitly.  Use
13330         set_desired_inferior.  Support proposed ``Hs'' packet.  Update
13331         calls to mywait.
13332         * server.h: Update.
13333         (struct inferior_list, struct_inferior_list_entry): New.
13334         * target.c (set_desired_inferior): New.
13335         (write_inferior_memory): Constify.
13336         (mywait): New function.
13337         * target.h: Update.
13338         (struct target_ops): New signal_pid method.
13339         (mywait): Removed macro, added prototype.
13340
13341         * linux-low.h (regset_func): Removed.
13342         (regset_fill_func, regset_store_func): New.
13343         (enum regset_type): New.
13344         (struct regset_info): Add type field.  Use new operation types.
13345         (struct linux_target_ops): stop_pc renamed to get_pc.
13346         Add decr_pc_after_break and breakpoint_at.
13347         (get_process, get_thread_proess, get_process_thread)
13348         (strut process_info, all_processes, linux_attach_lwp)
13349         (thread_db_init): New.
13350
13351         * linux-arm-low.c (arm_get_pc, arm_set_pc,
13352         arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
13353         (the_low_target): Add new members.
13354         * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
13355         (i386_store_fpxregset): Constify.
13356         (target_regsets): Add new kind identifier.
13357         (i386_get_pc): Renamed from i386_stop_pc.  Simplify.
13358         (i386_set_pc): Add debugging.
13359         (i386_breakpoint_at): New function.
13360         (the_low_target): Add new members.
13361         * linux-mips-low.c (mips_get_pc, mips_set_pc)
13362         (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
13363         (mips_breakpoint_at): New.
13364         (the_low_target): Add new members.
13365         * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
13366         (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
13367         (the_low_target): Add new members.
13368         * linux-sh-low.c (sh_get_pc, sh_set_pc)
13369         (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
13370         (the_low_target): Add new members.
13371         * linux-x86-64-low.c (target_regsets): Add new kind
13372         identifier.
13373
13374 2002-05-15  Daniel Jacobowitz  <drow@mvista.com>
13375
13376         From Martin Pool <mbp@samba.org>:
13377         * server.c (gdbserver_usage): New function.
13378         (main): Call it.
13379
13380 2002-05-14  Daniel Jacobowitz  <drow@mvista.com>
13381
13382         * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
13383         stop_at -> stop_pc.
13384
13385 2002-05-04  Andrew Cagney  <ac131313@redhat.com>
13386
13387         * Makefile.in: Remove obsolete code.
13388
13389 2002-04-24  Michal Ludvig  <mludvig@suse.cz>
13390
13391         * linux-low.c (regsets_fetch_inferior_registers),
13392         (regsets_store_inferior_registers): Removed cast to int from
13393         ptrace() calls.
13394         * regcache.h: Added declaration of struct inferior_info.
13395
13396 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
13397
13398         * inferiors.c (struct inferior_info): Add regcache_data.
13399         (add_inferior): Call create_register_cache.
13400         (clear_inferiors): Call free_register_cache.
13401         (inferior_regcache_data, set_inferior_regcache_data): New functions.
13402         * regcache.c (struct inferior_regcache_data): New.
13403         (registers): Remove.
13404         (get_regcache): New function.
13405         (create_register_cache, free_register_cache): New functions.
13406         (set_register_cache): Don't initialize the register cache here.
13407         (registers_to_string, registers_from_string, register_data): Call
13408         get_regcache.
13409         * regcache.h: Add prototypes.
13410         * server.h: Likewise.
13411
13412 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
13413
13414         * mem-break.c: New file.
13415         * mem-break.h: New file.
13416         * Makefile.in: Add mem-break.o rule; update server.h
13417         dependencies.
13418         * inferiors.c (struct inferior_info): Add target_data
13419         member.
13420         (clear_inferiors): Free target_data member if set.
13421         (inferior_target_data, set_inferior_target_data): New functions.
13422         * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
13423         (i386_stop_pc, i386_set_pc): New.  Add to the_low_target.
13424         * linux-low.c (linux_bp_reinsert): New variable.
13425         (struct inferior_linux_data): New.
13426         (linux_create_inferior): Use set_inferior_target_data.
13427         (linux_attach): Likewise.  Call add_inferior.
13428         (linux_wait_for_one_inferior): New function.
13429         (linux_wait): Call it.
13430         (linux_write_memory): Add const.
13431         (initialize_low): Call set_breakpoint_data.
13432         * linux-low.h (struct linux_target_ops): Add breakpoint
13433         handling members.
13434         * server.c (attach_inferior): Remove extra add_inferior
13435         call.
13436         * server.h: Include mem-break.h.  Update inferior.c
13437         prototypes.
13438         * target.c (read_inferior_memory)
13439         (write_inferior_memory): New functions.
13440         * target.h (read_inferior_memory)
13441         (write_inferior_memory): Change macros to prototypes.
13442         (struct target_ops): Update comments.  Add const to write_memory
13443         definition.
13444
13445 2002-04-11  Daniel Jacobowitz  <drow@mvista.com>
13446
13447         * linux-low.c (usr_store_inferior_registers): Support
13448         registers which are allowed to fail to store.
13449         * linux-low.h (linux_target_ops): Likewise.
13450         * linux-ppc-low.c (ppc_regmap): Support FPSCR.
13451         (ppc_cannot_store_register): FPSCR may not be storable.
13452
13453 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13454
13455         * server.h: Include <string.h> if HAVE_STRING_H.
13456         * ChangeLog: Correct paths in last ChangeLog entry.
13457
13458 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13459
13460         * linux-low.h: Remove obsolete prototypes.
13461         (struct linux_target_ops): New.
13462         (extern the_low_target): New.
13463         * linux-low.c (num_regs, regmap): Remove declarations.
13464         (register_addr): Use the_low_target explicitly.
13465         (fetch_register): Likewise.
13466         (usr_fetch_inferior_registers): Likewise.
13467         (usr_store_inferior_registers): Likewise.
13468         * linux-arm-low.c (num_regs): Remove.
13469         (arm_num_regs): Define.
13470         (arm_regmap): Renamed from regmap, made static.
13471         (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
13472         made static.
13473         (arm_cannot_store_register): Renamed from cannot_store_register,
13474         made static.
13475         (the_low_target): New.
13476         * linux-i386-low.c (num_regs): Remove.
13477         (i386_num_regs): Define.
13478         (i386_regmap): Renamed from regmap, made static.
13479         (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
13480         made static.
13481         (i386_cannot_store_register): Renamed from cannot_store_register,
13482         made static.
13483         (the_low_target): New.
13484         * linux-ia64-low.c (num_regs): Remove.
13485         (ia64_num_regs): Define.
13486         (ia64_regmap): Renamed from regmap, made static.
13487         (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
13488         made static.
13489         (ia64_cannot_store_register): Renamed from cannot_store_register,
13490         made static.
13491         (the_low_target): New.
13492         * linux-m68k-low.c (num_regs): Remove.
13493         (m68k_num_regs): Define.
13494         (m68k_regmap): Renamed from regmap, made static.
13495         (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
13496         made static.
13497         (m68k_cannot_store_register): Renamed from cannot_store_register,
13498         made static.
13499         (the_low_target): New.
13500         * linux-mips-low.c (num_regs): Remove.
13501         (mips_num_regs): Define.
13502         (mips_regmap): Renamed from regmap, made static.
13503         (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
13504         made static.
13505         (mips_cannot_store_register): Renamed from cannot_store_register,
13506         made static.
13507         (the_low_target): New.
13508         * linux-ppc-low.c (num_regs): Remove.
13509         (ppc_num_regs): Define.
13510         (ppc_regmap): Renamed from regmap, made static.
13511         (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
13512         made static.
13513         (ppc_cannot_store_register): Renamed from cannot_store_register,
13514         made static.
13515         (the_low_target): New.
13516         * linux-s390-low.c (num_regs): Remove.
13517         (s390_num_regs): Define.
13518         (s390_regmap): Renamed from regmap, made static.
13519         (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
13520         made static.
13521         (s390_cannot_store_register): Renamed from cannot_store_register,
13522         made static.
13523         (the_low_target): New.
13524         * linux-sh-low.c (num_regs): Remove.
13525         (sh_num_regs): Define.
13526         (sh_regmap): Renamed from regmap, made static.
13527         (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
13528         made static.
13529         (sh_cannot_store_register): Renamed from cannot_store_register,
13530         made static.
13531         (the_low_target): New.
13532         * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
13533         (the_low_target): New.
13534
13535 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13536
13537         * Makefile.in: Add stamp-h target.
13538         * configure.in: Create stamp-h.
13539         * configure: Regenerated.
13540
13541 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13542
13543         * inferiors.c: New file.
13544         * target.c: New file.
13545         * target.h: New file.
13546         * Makefile.in:  Add target.o and inferiors.o.  Update
13547         dependencies.
13548         * linux-low.c (inferior_pid): New static variable,
13549         moved from server.c.
13550         (linux_create_inferior): Renamed from create_inferior.
13551         Call add_inferior.  Return 0 on success instead of a PID.
13552         (linux_attach): Renamed from myattach.
13553         (linux_kill): Renamed from kill_inferior.  Call clear_inferiors ().
13554         (linux_thread_alive): Renamed from mythread_alive.
13555         (linux_wait): Renamed from mywait.  Call clear_inferiors () if the
13556         child dies.
13557         (linux_resume): Renamed from myresume.  Add missing ``return 0''.
13558         (regsets_store_inferior_registers): Correct error message.
13559         Add missing ``return 0''.
13560         (linux_fetch_registers): Renamed from fetch_inferior_registers.
13561         (linux_store_registers): Renamed from store_inferior_registers.
13562         (linux_read_memory): Renamed from read_inferior_memory.
13563         (linux_write_memory): Renamed from write_inferior_memory.
13564         (linux_target_ops): New structure.
13565         (initialize_low): Call set_target_ops ().
13566         * remote-utils.c (unhexify): New function.
13567         (hexify): New function.
13568         (input_interrupt): Send signals to ``signal_pid''.
13569         * server.c (inferior_pid): Remove.
13570         (start_inferior): Update create_inferior call.
13571         (attach_inferior): Call add_inferior.
13572         (handle_query): New function.
13573         (main): Call handle_query for `q' packets.
13574         * server.h: Include "target.h".  Remove obsolete prototypes.
13575         Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
13576
13577 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13578
13579         * Makefile.in: Add WARN_CFLAGS.  Update configury
13580         dependencies.
13581         * configure.in: Check for <string.h>
13582         * configure: Regenerate.
13583         * config.in: Regenerate.
13584         * gdbreplay.c: Include needed system headers.
13585         (remote_open): Remove strchr prototype.
13586         * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
13587         * regcache.c (supply_register): Change buf argument to const void *.
13588         (supply_register_by_name): Likewise.
13589         (collect_register): Change buf argument to void *.
13590         (collect_register_by_name): Likewise.
13591         * regcache.h: Add missing prototypes.
13592         * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
13593         * server.c (handle_query): New function.
13594         (attached): New static variable, moved out of main.
13595         (main): Quiet longjmp clobber warnings.
13596         * server.h: Add ATTR_NORETURN and ATTR_FORMAT.  Update prototypes.
13597         * utils.c (error): Remove NORETURN.
13598         (fatal): Likewise.