757424c4df78dab9a9fcd169bfc71104767f88a1
[external/binutils.git] / gdb / gdbserver / ChangeLog
1 2016-01-12  Josh Stone  <jistone@redhat.com>
2             Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3
4         * inferiors.h: Include "gdb_vecs.h".
5         (struct process_info): Add syscalls_to_catch.
6         * inferiors.c (remove_process): Free syscalls_to_catch.
7         * remote-utils.c (prepare_resume_reply): Report syscall_entry and
8         syscall_return stops.
9         * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
10         * server.c (handle_general_set): Handle QCatchSyscalls.
11         (handle_query): Report support for QCatchSyscalls.
12         * target.h (struct target_ops): Add supports_catch_syscall.
13         (target_supports_catch_syscall): New macro.
14         * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
15         (struct lwp_info): Add syscall_state.
16         * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
17         Maintain syscall_state and syscalls_to_catch across exec.
18         (get_syscall_trapinfo): New function, proxy to the_low_target.
19         (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
20         (linux_low_filter_event): Toggle syscall_state entry/return for
21         syscall traps, and set it ignored for all others.
22         (gdb_catching_syscalls_p): New function.
23         (gdb_catch_this_syscall_p): New function.
24         (linux_wait_1): Handle SYSCALL_SIGTRAP.
25         (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
26         (linux_supports_catch_syscall): New function.
27         (linux_target_ops): Install it.
28         * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
29         (the_low_target): Install it.
30
31 2016-01-12  Mike Frysinger  <vapier@gentoo.org>
32
33         * acinclude.m4: Include new ../warning.m4 file.
34         * configure: Regenerated.
35         * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
36
37 2016-01-12  Mike Frysinger  <vapier@gentoo.org>
38
39         * ax.c (is_goto_target): Mark static.
40         * linux-low.c (register_addr): Likewise.
41         (linux_fetch_registers, linux_store_registers): Likewise.
42         * mem-break.c (any_persistent_commands): Fix old prototype.
43         (add_commands_to_breakpoint): Mark static.
44         * regcache.c (find_register_by_name): Delete unused func.
45         * remote-utils.c (hex_or_minus_one): Mark static.
46         * server.c (monitor_show_help): Mark static.
47         (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
48         handle_v_requests): Likewise.
49
50 2016-01-12  Pedro Alves  <palves@redhat.com>
51
52         Remove use of the registered trademark symbol throughout.
53
54 2016-01-08  Yao Qi  <yao.qi@linaro.org>
55
56         * remote-utils.c (getpkt): If c is '\003', call target hook
57         request_interrupt.
58
59 2016-01-06  Yao Qi  <yao.qi@linaro.org>
60
61         * linux-aarch32-low.h (arm_abi_breakpoint): Move to
62         linux-aarch32-low.c.
63         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
64         (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
65         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
66         (thumb2_breakpoint): Declare.
67         * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
68         linux-aarch32-low.h.
69         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
70         (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
71         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
72
73 2016-01-01  Joel Brobecker  <brobecker@adacore.com>
74
75         * gdbreplay.c (gdbreplay_version): Change copyright year in
76         version message.
77         * server.c (gdbserver_version): Likewise.
78
79 2015-12-28  Patrick Palka  <patrick@parcs.ath.cx>
80
81         * server.c (crc32_table): Delete.
82         (crc32): Use libiberty's xcrc32 function.
83
84 2015-12-22  Joel Brobecker  <brobecker@adacore.com>
85
86         * lynx-low.c (lynx_delete_thread_callback): New function.
87         (lynx_mourn): Properly delete our process and all of its
88         threads.  Remove call to clear_inferiors.
89
90 2015-12-22  Joel Brobecker  <brobecker@adacore.com>
91
92         * target.c (thread_search_callback): Add check that
93         the thread_stopped target callback is not NULL before
94         calling it.
95
96 2015-12-21  Yao Qi  <yao.qi@linaro.org>
97
98         * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
99         arm breakpoint.
100
101 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
102
103         * server.c (handle_query): Call target_supports_software_single_step.
104
105 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
106
107         * linux-low.c (single_step): New function.
108         (linux_resume_one_lwp_throw): Call single_step.
109         (start_step_over): Likewise.
110
111 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
112
113         * Makefile.in (SFILES): Append arch/arm-linux.c,
114         arch/arm-get-next-pcs.c.
115         (arm-linux.o): New rule.
116         (arm-get-next-pcs.o): New rule.
117         * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
118         arm-linux.o.
119         * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro.  Moved
120         to linux-aarch32-low.c.
121         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
122         (arm_breakpoint_len, thumb_breakpoint): Likewise.
123         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
124         (thumb2_breakpoint_len): Likewise.
125         (arm_is_thumb_mode): Make non-static.
126         * linux-aarch32-low.h (arm_abi_breakpoint): New macro.  Moved
127         from linux-aarch32-low.c.
128         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
129         (arm_breakpoint_len, thumb_breakpoint): Likewise.
130         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
131         (thumb2_breakpoint_len): Likewise.
132         (arm_is_thumb_mode): New declaration.
133         * linux-arm-low.c: Include arch/arm-linux.h
134         aarch/arm-get-next-pcs.h, sys/syscall.h.
135         (get_next_pcs_ops): New struct.
136         (get_next_pcs_addr_bits_remove): New function.
137         (get_next_pcs_is_thumb): New function.
138         (get_next_pcs_read_memory_unsigned_integer): Likewise.
139         (arm_sigreturn_next_pc): Likewise.
140         (get_next_pcs_syscall_next_pc): Likewise.
141         (arm_gdbserver_get_next_pcs): Likewise.
142         (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
143         Initialize.
144         * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
145         * server.h: Include gdb_vecs.h.
146
147 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
148
149         * Makefile.in (SFILES): Append common/common-regcache.c.
150         (OBS): Append common-regcache.o.
151         (common-regcache.o): New rule.
152         * regcache.c (init_register_cache): Initialize cache to
153         REG_UNAVAILABLE.
154         (regcache_raw_read_unsigned): New function.
155         * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
156         register_status enum.
157
158 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
159
160         * linux-aarch64-low.c (the_low_targets): Rename
161         breakpoint_reinsert_addr to get_next_pcs.
162         * linux-arm-low.c (the_low_targets): Likewise.
163         * linux-bfin-low.c (the_low_targets): Likewise.
164         * linux-cris-low.c (the_low_targets): Likewise.
165         * linux-crisv32-low.c (the_low_targets): Likewise.
166         * linux-low.c (can_software_single_step): Likewise.
167         (install_software_single_step_breakpoints): New function.
168         (start_step_over): Use install_software_single_step_breakpoints.
169         * linux-low.h: New CORE_ADDR vector.
170         (struct linux_target_ops) Rename breakpoint_reinsert_addr to
171         get_next_pcs.
172         * linux-mips-low.c (the_low_targets): Likewise.
173         * linux-nios2-low.c (the_low_targets): Likewise.
174         * linux-sparc-low.c (the_low_targets): Likewise.
175
176 2015-12-17  Pedro Alves  <palves@redhat.com>
177
178         * linux-low.c (linux_kill_one_lwp): Remove references to
179         LinuxThreads.
180         (kill_lwp): Remove HAVE_TKILL_SYSCALL check.  No longer fall back
181         to 'kill'.
182         (linux_init_signals): Delete.
183         (initialize_low): Adjust.
184         * thread-db.c (thread_db_init): Remove LinuxThreads reference.
185
186 2015-12-16  Pedro Alves  <palves@redhat.com>
187
188         * configure.ac (compiler warning flags): When testing a
189         -Wno-foo option, check whether -Wfoo works instead.
190         * configure: Regenerate.
191
192 2015-12-11  Don Breazeal  <donb@codesourcery.com>
193
194         * server.c (process_serial_event): Don't exit from gdbserver
195         in remote mode if there are still active inferiors.
196
197 2015-12-11  Yao Qi  <yao.qi@linaro.org>
198
199         * linux-aarch64-low.c (aarch64_breakpoint_at): Call
200         arm_breakpoint_at if the process is 32-bit.
201
202 2015-12-11  Yao Qi  <yao.qi@linaro.org>
203
204         * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
205         arm breakpoint.
206
207 2015-12-07  Yao Qi  <yao.qi@linaro.org>
208
209         * configure.srv: Append arm.o to srv_tgtobj for
210         aarch64*-*-linux* target.
211         * linux-aarch32-low.c (arm_abi_breakpoint): New macro.  Moved
212         from linux-arm-low.c.
213         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
214         (arm_breakpoint_len, thumb_breakpoint): Likewise.
215         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
216         (thumb2_breakpoint_len): Likewise.
217         (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
218         (arm_breakpoint_kinds): Likewise.
219         (arm_breakpoint_kind_from_pc): Likewise.
220         (arm_sw_breakpoint_from_kind): Likewise.
221         (arm_breakpoint_kind_from_current_state): Likewise.
222         * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
223         (arm_sw_breakpoint_from_kind): Declare.
224         (arm_breakpoint_kind_from_current_state): Declare.
225         (arm_breakpoint_at): Declare.
226         * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
227         arm_sw_breakpoint_from_kind if process is 32-bit.
228         (aarch64_breakpoint_kind_from_pc): New function.
229         (aarch64_breakpoint_kind_from_current_state): New function.
230         (the_low_target): Initialize fields breakpoint_kind_from_pc
231         and breakpoint_kind_from_current_state.
232         * linux-arm-low.c (arm_breakpoint_kinds): Move to
233         linux-aarch32-low.c.
234         (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
235         (arm_breakpoint, arm_breakpoint_len): Likewise.
236         (thumb_breakpoint, thumb_breakpoint_len): Likewise.
237         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
238         (arm_is_thumb_mode): Likewise.
239         (arm_breakpoint_at): Likewise.
240         (arm_breakpoint_kind_from_pc): Likewise.
241         (arm_sw_breakpoint_from_kind): Likewise.
242         (arm_breakpoint_kind_from_current_state): Likewise.
243
244         Revert:
245         2015-08-04  Yao Qi  <yao.qi@linaro.org>
246
247         * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
248         0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
249         * server.c (extended_protocol): Remove "static".
250         * server.h (extended_protocol): Declare it.
251
252 2015-12-04  Josh Stone  <jistone@redhat.com>
253
254         * target.h (struct target_ops) <arch_setup>: Rename to ...
255         (struct target_ops) <post_create_inferior>: ... this.
256         (target_arch_setup): Rename to ...
257         (target_post_create_inferior): ... this, calling post_create_inferior.
258         * server.c (start_inferior): Update target_arch_setup calls to
259         target_post_create_inferior.
260         * linux-low.c (linux_low_ptrace_options): Forward declare.
261         (linux_arch_setup): Update its comment for general use.
262         (linux_post_create_inferior): New, run arch_setup and setup ptrace.
263         (struct linux_target_ops): Use linux_post_create_inferior.
264         * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
265         to post_create_inferior.
266         * nto-low.c (struct nto_target_ops): Likewise.
267         * spu-low.c (struct spu_target_ops): Likewise.
268         * win32-low.c (struct win32_target_ops): Likewise.
269
270 2015-12-03  Antoine Tremblay  <antoine.tremblay@ericsson.com>
271
272         * linux-arm-low.c: Remove duplicate arch/arm.h include.
273
274 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
275
276         * linux-arm-low.c (arm_reinsert_addr): Remove function.
277         (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
278         * linux-cris-low.c (cris_reinsert_addr> Remove function.
279         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
280         * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
281         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
282         * linux-mips-low.c (mips_reinsert_addr): Remove function.
283         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
284         * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
285         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
286         * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
287         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
288
289 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
290
291         * linux-low.c (linux_look_up_symbols): Don't call
292         linux_supports_traceclone.
293         * linux-low.h (thread_db_init): Remove use_events argument.
294         * thread-db.c (thread_db_use_event): Remove global variable.
295         (struct thread_db) <td_thr_event_enable_p>: Remove field.
296         (struct thread_db) <td_create_bp>: Remove field.
297         (thread_db_create_event): Remove function.
298         (thread_db_enable_reporting): Likewise.
299         (find_one_thread): Don't check for thread_db_use_events.
300         (attach_thread): Likewise.
301         (thread_db_load_search): Remove td_thr_event_enable_p initialization.
302         (try_thread_db_load_1): Don't check for thread_db_use_events.
303         (thread_db_init): Remove use_events argument and thread events
304         handling.
305         (remove_thread_event_breakpoints): Remove function.
306         (thread_db_detach): Remove call to remove_thred_event_breakpoints.
307
308 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
309
310         * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
311         New function.
312         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
313         * linux-arm-low.c (arm_supports_hardware_single_step): New function.
314         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
315         * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
316         (struct linux_target_ops) <bfin_supports_hardware_single_step>:
317         Initialize.
318         * linux-crisv32-low.c (cris_supports_hardware_single_step):
319         New function.
320         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
321         * linux-low.c (can_hardware_single_step): Use
322         supports_hardware_single_step.
323         (can_software_single_step): New function.
324         (start_step_over): Call can_software_single_step.
325         (linux_supports_hardware_single_step): New function.
326         (struct target_ops) <supports_software_single_step>: Initialize.
327         * linux-low.h (struct linux_target_ops)
328         <supports_hardware_single_step>: Initialize.
329         * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
330         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
331         * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
332         (struct linux_target_ops) <supports_hardware_single_step> Initialize.
333         * linux-s390-low.c (s390_supports_hardware_single_step): New function.
334         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
335         * linux-sh-low.c (sh_supports_hardware_single_step): New function.
336         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
337         * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
338         (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
339         Initialize.
340         * linux-tile-low.c (tile_supports_hardware_single_step): New function.
341         (struct linux_target_ops) <tile_supports_hardware_single_step>:
342         Initialize.
343         * linux-x86-low.c (x86_supports_hardware_single_step) New function.
344         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
345         * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
346         New function.
347         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
348         * target.h (struct target_ops): <supports_software_single_step>:
349         New field.
350         (target_supports_software_single_step): New macro.
351
352 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
353
354         * linux-low.c (linux_wait_1): Fix pc advance condition.
355         * mem-break.c (reinsert_breakpoint_inserted_here): New function.
356         * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
357
358 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
359
360         * linux-arm-low.c (arm_is_thumb_mode): New function.
361         (arm_breakpoint_at): Use arm_is_thumb_mode.
362         (arm_breakpoint_kind_from_current_state): New function.
363         (struct linux_target_ops) <breakpoint_kind_from_current_state>:
364         Initialize.
365         * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
366         (linux_breakpoint_kind_from_current_state): New function.
367         (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
368         * linux-low.h (struct linux_target_ops)
369         <breakpoint_kind_from_current_state>: New field.
370         * target.h (struct target_ops): Likewise.
371         (target_breakpoint_kind_from_current_state): New macro.
372
373 2015-11-30  Pedro Alves  <palves@redhat.com>
374
375         * linux-low.c (linux_resume): Wake up the event loop before
376         returning.
377
378 2015-11-30  Pedro Alves  <palves@redhat.com>
379
380         * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
381         check.
382         (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
383         to -1.
384         * target.c (struct thread_search): New structure.
385         (thread_search_callback): New function.
386         (prev_general_thread): New global.
387         (prepare_to_access_memory, done_accessing_memory): New functions.
388         * target.h (prepare_to_access_memory, done_accessing_memory):
389         Replace macros with function declarations.
390
391 2015-11-30  Pedro Alves  <palves@redhat.com>
392
393         PR 14618
394         * linux-low.c (linux_wait_1): If the last resumed thread is gone,
395         report TARGET_WAITKIND_NO_RESUMED.
396         * remote-utils.c (prepare_resume_reply): Handle
397         TARGET_WAITKIND_NO_RESUMED.
398         * server.c (report_no_resumed): New global.
399         (handle_query) <qSupported>: Handle "no-resumed+".  Report
400         "no-resumed+" support.
401         (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
402         return error if the client doesn't support no-resumed events.
403         (push_stop_notification): New function.
404         (handle_target_event): Use it.  Report TARGET_WAITKIND_NO_RESUMED
405         events if the client supports them.
406
407 2015-11-30  Pedro Alves  <palves@redhat.com>
408
409         * linux-low.c (thread_still_has_status_pending_p): Don't check
410         vCont;t here.
411         (lwp_resumed): New function.
412         (status_pending_p_callback): Return early if the LWP is not
413         supposed to be resumed.
414
415 2015-11-30  Pedro Alves  <palves@redhat.com>
416
417         * linux-low.c (handle_extended_wait): Assert that the LWP's
418         waitstatus is TARGET_WAITKIND_IGNORE.  If GDB wants to hear about
419         thread create events, leave the new child's status pending.
420         (linux_low_filter_event): If GDB wants to hear about thread exit
421         events, leave the LWP marked dead and don't delete it.
422         (linux_wait_for_event_filtered): Don't check for thread exit.
423         (filter_exit_event): New function.
424         (linux_wait_1): Use it, when returning an exit event.
425         (linux_resume_one_lwp_throw): Assert that the LWP's
426         waitstatus is TARGET_WAITKIND_IGNORE.
427         * remote-utils.c (prepare_resume_reply): Handle
428         TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
429         * server.c (report_thread_events): New global.
430         (handle_general_set): Handle QThreadEvents.
431         (handle_query) <qSupported>: Handle and report QThreadEvents+;
432         (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
433         TARGET_WAITKIND_THREAD_EXITED.
434         * server.h (report_thread_events): Declare.
435
436 2015-11-30  Pedro Alves  <palves@redhat.com>
437
438         * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
439         the thread's last_resume_kind was resume_stop.
440
441 2015-11-30  Pedro Alves  <palves@redhat.com>
442
443         * linux-low.c (linux_attach): In non-stop mode, wait for one stop
444         before returning.
445
446 2015-11-30  Pedro Alves  <palves@redhat.com>
447
448         * server.c (handle_v_requests): Handle vCtrlC.
449
450 2015-11-30  Pedro Alves  <palves@redhat.com>
451
452         * gdbthread.h (find_any_thread_of_pid): Declare.
453         * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
454         functions.
455         * server.c (handle_query): If current_thread is NULL, look for
456         another thread of the selected process.
457
458 2015-11-26  Daniel Colascione  <dancol@dancol.org>
459             Simon Marchi  <simon.marchi@ericsson.com>
460
461         * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
462         * server.c (handle_qxfer_threads_worker): Refactor to include thread
463         name in reply.
464         * target.h (struct target_ops) <thread_name>: New field.
465         (target_thread_name): New macro.
466
467 2015-11-23  Joel Brobecker  <brobecker@adacore.com>
468
469         * regcache.h (regcache_invalidate_pid): Add declaration.
470         * regcache.c (regcache_invalidate_pid): New function, extracted
471         from regcache_invalidate.
472         (regcache_invalidate): Reimplement using regcache_invalidate_pid.
473         Add trivial documentation comment.
474         * lynx-low.c: Use regcache_invalidate_pid instead of
475         regcache_invalidate.
476
477 2015-11-23  Joel Brobecker  <brobecker@adacore.com>
478
479         * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
480         and Elf64_auxv_t if the target is Android.
481
482 2015-11-22  Doug Evans  <xdje42@gmail.com>
483
484         * target.h: #include <sys/types.h>.
485
486 2015-11-19  Pedro Alves  <palves@redhat.com>
487
488         * linux-low.c (linux_process_qsupported): Change prototype.
489         Adjust.
490         * linux-low.h (struct linux_target_ops) <process_qsupported>:
491         Change prototype.
492         * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
493         and adjust to loop over all features.
494         * server.c (handle_query) <qSupported>: Adjust to call
495         target_process_qsupported once, passing it a vector of unprocessed
496         features.
497         * target.h (struct target_ops) <process_qsupported>: Change
498         prototype.
499         (target_process_qsupported): Adjust.
500
501 2015-11-19  Pedro Alves  <palves@redhat.com>
502
503         * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
504         mode.
505         * configure: Regenerate.
506
507 2015-11-19  Pedro Alves  <palves@redhat.com>
508
509         * configure: Regenerate.
510
511 2015-11-19  Yao Qi  <yao.qi@linaro.org>
512
513         * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
514         type to uint32_t.
515
516 2015-11-19  Yao Qi  <yao.qi@linaro.org>
517
518         * linux-aarch64-low.c (enum aarch64_operand_type): New.
519         (struct aarch64_operand): Move enum out.
520
521 2015-11-19  Yao Qi  <yao.qi@linaro.org>
522
523         * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
524         struct user_fpsimd_state *.
525         (aarch64_store_fpregset): Likewise.
526
527 2015-11-19  Yao Qi  <yao.qi@linaro.org>
528
529         * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
530         struct user_pt_regs *.
531         (aarch64_store_gregset): Likewise.
532
533 2015-11-18  Pedro Alves  <palves@redhat.com>
534
535         * Makefile.in (all_object_files): Add $IPA_OBJS.
536
537 2015-11-17  Pedro Alves  <palves@redhat.com>
538
539         * win32-low.c (win32_resume): Use gdb_signal_from_host,
540         GDB_SIGNAL_0 and gdb_signal_to_string.
541
542 2015-11-17  Pedro Alves  <palves@redhat.com>
543
544         * win32-low.c (handle_output_debug_string): Remove parameter.
545         (win32_kill): Remove our_status local and adjust call to
546         handle_output_debug_string.
547         (get_child_debug_event): Adjust call to
548         handle_output_debug_string.
549
550 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
551
552         * linux-mips-low.c (mips_fill_gregset): Add cast.
553         (mips_store_gregset): Likewise.
554         (mips_fill_fpregset): Likewise.
555         (mips_store_fpregset): Likewise.
556
557 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
558
559         * linux-mips-low.c (mips_add_watchpoint): Rename private to
560         priv.
561
562 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
563
564         * linux-mips-low.c (mips_linux_new_thread): Change type of
565         watch_type to enum target_hw_bp_type.
566
567 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
568
569                 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
570                 Change return type to arm_hwbp_type.
571
572 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
573
574         * linux-aarch32-low.c (arm_fill_gregset): Add cast.
575         (arm_store_gregset): Likewise.
576         * linux-arm-low.c (arm_get_hwcap): Likewise.
577         (arm_read_description): Likewise.
578
579 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
580
581         * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
582
583 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
584
585         * linux-ppc-low.c (ppc_get_hwcap): Add cast.
586         (ppc_fill_vsxregset): Likewise.
587         (ppc_store_vsxregset): Likewise.
588         (ppc_fill_vrregset): Likewise.
589         (ppc_store_vrregset): Likewise.
590         (ppc_fill_evrregset): Likewise.
591         (ppc_store_evrregset): Likewise.
592
593 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
594
595         * linux-ppc-low.c (ppc_usrregs_info): Remove
596         forward-declaration.
597         (ppc_arch_setup): Move lower in file.
598
599 2015-10-30  Simon Marchi  <simon.marchi@ericsson.com>
600
601         * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
602         (ps_pdwrite): Likewise.
603
604 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
605
606         * linux-arm-low.c (arm_new_thread): Move pointer dereference
607         to after assert checks.
608
609 2015-10-29  Simon Marchi  <simon.marchi@ericsson.com>
610
611         * proc-service.c (ps_pdread): Add/adjust casts.
612         (ps_pdwrite): Add/adjust casts.
613
614 2015-10-29  Simon Marchi  <simon.marchi@polymtl.ca>
615
616         * server.c (handle_search_memory_1): Cast return value of
617         memmem.
618
619 2015-10-29  Simon Marchi  <simon.marchi@polymtl.ca>
620
621         * server.c (write_qxfer_response): Change type of data to
622         gdb_byte *.
623
624 2015-10-29  Pedro Alves  <palves@redhat.com>
625
626         * mem-break.c (Z_packet_to_bkpt_type): Add cast.
627
628 2015-10-29  Pedro Alves  <palves@redhat.com>
629
630         * tracepoint.c (clear_installed_tracepoints): Add casts.
631
632 2015-10-29  Pedro Alves  <palves@redhat.com>
633
634         * server.c (handle_v_cont, process_serial_event): Add enum
635         gdb_signal casts to signal parsing code.
636
637 2015-10-29  Pedro Alves  <palves@redhat.com>
638
639         * linux-low.h (NULL_REGSET): Define.
640         * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
641         * linux-arm-low.c (arm_regsets): Likewise.
642         * linux-crisv32-low.c (cris_regsets): Likewise.
643         * linux-m68k-low.c (m68k_regsets): Likewise.
644         * linux-mips-low.c (mips_regsets): Likewise.
645         * linux-nios2-low.c (nios2_regsets): Likewise.
646         * linux-ppc-low.c (ppc_regsets): Likewise.
647         * linux-s390-low.c (s390_regsets): Likewise.
648         * linux-sh-low.c (sh_regsets): Likewise.
649         * linux-sparc-low.c (sparc_regsets): Likewise.
650         * linux-tic6x-low.c (tic6x_regsets): Likewise.
651         * linux-tile-low.c (tile_regsets): Likewise.
652         * linux-x86-low.c (x86_regsets): Likewise.
653         * linux-xtensa-low.c (xtensa_regsets): Likewise.
654
655 2015-10-29  Pedro Alves  <palves@redhat.com>
656
657         * linux-low.h (NULL_REGSET): Define.
658         * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
659         * linux-arm-low.c (arm_regsets): Likewise.
660         * linux-crisv32-low.c (cris_regsets): Likewise.
661         * linux-m68k-low.c (m68k_regsets): Likewise.
662         * linux-mips-low.c (mips_regsets): Likewise.
663         * linux-nios2-low.c (nios2_regsets): Likewise.
664         * linux-ppc-low.c (ppc_regsets): Likewise.
665         * linux-s390-low.c (s390_regsets): Likewise.
666         * linux-sh-low.c (sh_regsets): Likewise.
667         * linux-sparc-low.c (sparc_regsets): Likewise.
668         * linux-tic6x-low.c (tic6x_regsets): Likewise.
669         * linux-tile-low.c (tile_regsets): Likewise.
670         * linux-x86-low.c (x86_regsets): Likewise.
671         * linux-xtensa-low.c (xtensa_regsets): Likewise.
672
673 2015-10-26  Doug Evans  <dje@google.com>
674
675         * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
676
677 2015-10-26  Doug Evans  <dje@google.com>
678
679         * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
680
681 2015-10-26  Doug Evans  <dje@google.com>
682
683         * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
684         for debug_printf.
685         (attach_thread, find_new_threads_callback): Ditto.
686
687 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
688
689         * mem-break.h (set_breakpoint_data): Remove.
690
691 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
692
693         * nto-low.c (nto_sw_breakpoint_from_kind): New function.
694         (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
695         (initialize_low): Remove set_breakpoint_data call.
696         * spu-low.c (spu_sw_breakpoint_from_kind): New function.
697         (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
698         (initialize_low): Remove set_breakpoint_data call.
699         * win32-low.c (win32_sw_breakpoint_from_kind): New function.
700         (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
701         (initialize_low): Remove set_breakpoint_data call.
702
703 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
704
705         * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
706         * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
707         * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
708         * target.h (target_breakpoint_kind_from_pc): New macro.
709
710 2015-10-22  Antoine Tremblay  <antoine.tremblay@ericsson.com>
711
712         * linux-low.c (default_breakpoint_kind_from_pc): New function.
713         (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
714         the default breakpoint kind.
715
716 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
717
718         * linux-arm-low.c (arm_supports_z_point_type): Add software
719         breakpoint support.
720
721 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
722
723         * linux-arm-low.c: Refactor breakpoint definitions.
724         (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
725         (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
726
727 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
728
729         * Makefile.in: Add arm.c/o.
730         * configure.srv: Likewise.
731         * linux-arm-low.c (arm_breakpoint_kinds): New enum.
732         (arm_breakpoint_kind_from_pc): New function.
733         (arm_sw_breakpoint_from_kind): Return proper kind.
734         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
735
736 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
737
738         * linux-low.c (initialize_low): Ajdust for breakpoint global variables
739         removal.
740         * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
741         (struct raw_breakpoint) <size>: Remove.
742         (struct raw_breakpoint) <kind>: Add.
743         (bp_size): New function.
744         (bp_opcode): Likewise.
745         (find_raw_breakpoint_at): Adjust for kind.
746         (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
747         (remove_memory_breakpoint): Adjust for kind call bp_size.
748         (set_raw_breakpoint_at): Adjust for kind.
749         (set_breakpoint): Likewise.
750         (set_breakpoint_at): Call breakpoint_kind_from_pc.
751         (delete_raw_breakpoint): Adjust for kind.
752         (delete_breakpoint): Likewise.
753         (find_gdb_breakpoint): Likewise.
754         (set_gdb_breakpoint_1): Likewise.
755         (set_gdb_breakpoint): Likewise.
756         (delete_gdb_breakpoint_1): Likewise.
757         (delete_gdb_breakpoint): Likewise.
758         (uninsert_raw_breakpoint): Likewise.
759         (reinsert_raw_breakpoint): Likewise.
760         (set_breakpoint_data): Remove.
761         (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
762         (check_mem_read): Adjust for kind call bp_size.
763         (check_mem_write): Adjust for kind call bp_size,bp_opcode.
764         (clone_one_breakpoint): Adjust for kind.
765         * mem-break.h (set_gdb_breakpoint): Likewise.
766         (delete_gdb_breakpoint): Likewise.
767         * server.c (process_serial_event): Likewise.
768
769 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
770
771         * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
772         (struct linux_target_ops) <breakpoint>: Remove.
773         (struct linux_target_ops) <breakpoint_len>: Remove.
774         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
775         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
776         * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
777         (arm_sw_breakpoint_from_kind): New function.
778         * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
779         (struct linux_target_ops) <breakpoint>: Remove.
780         (struct linux_target_ops) <breakpoint_len>: Remove.
781         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
782         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
783         * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
784         (struct linux_target_ops) <breakpoint>: Remove.
785         (struct linux_target_ops) <breakpoint_len>: Remove.
786         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
787         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
788         * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
789         (struct linux_target_ops) <breakpoint>: Remove.
790         (struct linux_target_ops) <breakpoint_len>: Remove.
791         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
792         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
793         * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
794         and sw_breakpoint_from_kind to increment the pc.
795         (linux_breakpoint_kind_from_pc): New function.
796         (linux_sw_breakpoint_from_kind): New function.
797         (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
798         (initialize_low): Call breakpoint_kind_from_pc and
799         sw_breakpoint_from_kind to replace breakpoint_data/len.
800         * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
801         New field.
802         (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
803         * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
804         (struct linux_target_ops) <breakpoint>: Remove.
805         (struct linux_target_ops) <breakpoint_len>: Remove.
806         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
807         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
808         * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
809         (struct linux_target_ops) <breakpoint>: Remove.
810         (struct linux_target_ops) <breakpoint_len>: Remove.
811         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
812         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
813         * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
814         (struct linux_target_ops) <breakpoint>: Remove.
815         (struct linux_target_ops) <breakpoint_len>: Remove.
816         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
817         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
818         * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
819         (struct linux_target_ops) <breakpoint>: Remove.
820         (struct linux_target_ops) <breakpoint_len>: Remove.
821         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
822         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
823         * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
824         (struct linux_target_ops) <breakpoint>: Remove.
825         (struct linux_target_ops) <breakpoint_len>: Remove.
826         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
827         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
828         * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
829         (struct linux_target_ops) <breakpoint>: Remove.
830         (struct linux_target_ops) <breakpoint_len>: Remove.
831         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
832         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
833         * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
834         (struct linux_target_ops) <breakpoint>: Remove.
835         (struct linux_target_ops) <breakpoint_len>: Remove.
836         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
837         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
838         * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
839         (struct linux_target_ops) <breakpoint>: Remove.
840         (struct linux_target_ops) <breakpoint_len>: Remove.
841         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
842         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
843         * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
844         (struct linux_target_ops) <breakpoint>: Remove.
845         (struct linux_target_ops) <breakpoint_len>: Remove.
846         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
847         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
848         * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
849         * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
850         (struct linux_target_ops) <breakpoint>: Remove.
851         (struct linux_target_ops) <breakpoint_len>: Remove.
852         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
853         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
854         * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
855         (struct linux_target_ops) <breakpoint>: Remove.
856         (struct linux_target_ops) <breakpoint_len>: Remove.
857         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
858         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
859
860 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
861
862         * linux-cris-low.c (cris_get_pc): Remove void arg.
863
864 2015-10-16  Aleksandar Ristovski  <aristovski@qnx.com>
865
866         * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
867         variable name.
868
869 2015-10-16  Aleksandar Ristovski  <aristovski@qnx.com>
870
871         * inferiors.c (thread_pid_matches_callback): New function.
872         (find_thread_process): New function.
873         (remove_thread): Reset current_thread.
874         (remove_process): Assert threads have been removed first.
875
876 2015-10-15  Yao Qi  <yao.qi@linaro.org>
877
878         * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
879         if it is 3.
880         (aarch64_remove_point): Likewise.
881         * regcache.c (regcache_register_size): New function.
882
883 2015-10-12  Yao Qi  <yao.qi@linaro.org>
884
885         * linux-aarch64-low.c: Update all callers as emit_load_store
886         is renamed to aarch64_emit_load_store.
887
888 2015-10-12  Yao Qi  <yao.qi@linaro.org>
889
890         * linux-aarch64-low.c: Update all callers of function renaming
891         from emit_insn to aarch64_emit_insn.
892
893 2015-10-12  Yao Qi  <yao.qi@linaro.org>
894
895         * linux-aarch64-low.c (enum aarch64_opcodes): Move to
896         arch/aarch64-insn.h.
897         (struct aarch64_memory_operand): Likewise.
898         (ENCODE): Likewise.
899         (emit_insn): Move to arch/aarch64-insn.c.
900         (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
901         (emit_load_store): Move to arch/aarch64-insn.c.
902         (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
903         (can_encode_int32): Remove.
904
905 2015-10-12  Yao Qi  <yao.qi@linaro.org>
906
907         * linux-aarch64-low.c (extract_signed_bitfield): Remove.
908         (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
909         (aarch64_relocate_instruction): Likewise.
910         (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
911         (struct aarch64_insn_visitor): Likewise.
912
913 2015-10-12  Yao Qi  <yao.qi@linaro.org>
914
915         * linux-aarch64-low.c (struct aarch64_insn_data): New.
916         (struct aarch64_insn_visitor): New.
917         (struct aarch64_insn_relocation_data): New.
918         (aarch64_ftrace_insn_reloc_b): New function.
919         (aarch64_ftrace_insn_reloc_b_cond): Likewise.
920         (aarch64_ftrace_insn_reloc_cb): Likewise.
921         (aarch64_ftrace_insn_reloc_tb): Likewise.
922         (aarch64_ftrace_insn_reloc_adr): Likewise.
923         (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
924         (aarch64_ftrace_insn_reloc_others): Likewise.
925         (visitor): New.
926         (aarch64_relocate_instruction): Use visitor.
927
928 2015-10-12  Yao Qi  <yao.qi@linaro.org>
929
930         * linux-aarch64-low.c (aarch64_relocate_instruction): Return
931         int.  Add argument buf.
932         (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
933         aarch64_relocate_instruction.
934
935 2015-10-12  Yao Qi  <yao.qi@linaro.org>
936
937         * linux-aarch64-low.c (aarch64_relocate_instruction): Add
938         argument insn.  Remove local variable insn.  Don't call
939         target_read_uint32.
940         (aarch64_install_fast_tracepoint_jump_pad): Call
941         target_read_uint32.
942
943 2015-09-30  Yao Qi  <yao.qi@linaro.org>
944
945         * linux-aarch64-low.c (emit_movk): Shorten a long line.
946         (emit_load_store_pair): Likewise.
947
948 2015-09-25  Simon Marchi  <simon.marchi@ericsson.com>
949
950         * dll.c (match_dll): Add cast(s).
951         (unloaded_dll): Likewise.
952         * linux-low.c (second_thread_of_pid_p): Likewise.
953         (delete_lwp_callback): Likewise.
954         (count_events_callback): Likewise.
955         (select_event_lwp_callback): Likewise.
956         (linux_set_resume_request): Likewise.
957         * server.c (accumulate_file_name_length): Likewise.
958         (emit_dll_description): Likewise.
959         (handle_qxfer_threads_worker): Likewise.
960         (visit_actioned_threads): Likewise.
961         * thread-db.c (any_thread_of): Likewise.
962         * tracepoint.c (same_process_p): Likewise.
963         (match_blocktype): Likewise.
964         (build_traceframe_info_xml): Likewise.
965
966 2015-09-25  Simon Marchi  <simon.marchi@ericsson.com>
967
968         * ax.c (gdb_parse_agent_expr): Add cast to allocation result
969         assignment.
970         (gdb_unparse_agent_expr): Likewise.
971         * hostio.c (require_data): Likewise.
972         (handle_pread): Likewise.
973         * linux-low.c (disable_regset): Likewise.
974         (fetch_register): Likewise.
975         (store_register): Likewise.
976         (get_dynamic): Likewise.
977         (linux_qxfer_libraries_svr4): Likewise.
978         * mem-break.c (delete_fast_tracepoint_jump): Likewise.
979         (set_fast_tracepoint_jump): Likewise.
980         (uninsert_fast_tracepoint_jumps_at): Likewise.
981         (reinsert_fast_tracepoint_jumps_at): Likewise.
982         (validate_inserted_breakpoint): Likewise.
983         (clone_agent_expr): Likewise.
984         * regcache.c (init_register_cache): Likewise.
985         * remote-utils.c (putpkt_binary_1): Likewise.
986         (decode_M_packet): Likewise.
987         (decode_X_packet): Likewise.
988         (look_up_one_symbol): Likewise.
989         (relocate_instruction): Likewise.
990         (monitor_output): Likewise.
991         * server.c (handle_search_memory): Likewise.
992         (handle_qxfer_exec_file): Likewise.
993         (handle_qxfer_libraries): Likewise.
994         (handle_qxfer): Likewise.
995         (handle_query): Likewise.
996         (handle_v_cont): Likewise.
997         (handle_v_run): Likewise.
998         (captured_main): Likewise.
999         * target.c (write_inferior_memory): Likewise.
1000         * thread-db.c (try_thread_db_load_from_dir): Likewise.
1001         * tracepoint.c (init_trace_buffer): Likewise.
1002         (add_tracepoint_action): Likewise.
1003         (add_traceframe): Likewise.
1004         (add_traceframe_block): Likewise.
1005         (cmd_qtdpsrc): Likewise.
1006         (cmd_qtdv): Likewise.
1007         (cmd_qtstatus): Likewise.
1008         (response_source): Likewise.
1009         (response_tsv): Likewise.
1010         (cmd_qtnotes): Likewise.
1011         (gdb_collect): Likewise.
1012         (initialize_tracepoint): Likewise.
1013
1014 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
1015
1016         * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
1017         (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
1018         <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
1019         <NOP>: New.
1020         (enum aarch64_condition_codes): New enum.
1021         (w0): New static global.
1022         (fp): Likewise.
1023         (lr): Likewise.
1024         (struct aarch64_memory_operand) <type>: New
1025         MEMORY_OPERAND_POSTINDEX type.
1026         (postindex_memory_operand): New helper function.
1027         (emit_ret): New function.
1028         (emit_load_store_pair): New function, factored out of emit_stp
1029         with support for MEMORY_OPERAND_POSTINDEX.
1030         (emit_stp): Rewrite using emit_load_store_pair.
1031         (emit_ldp): New function.
1032         (emit_load_store): Likewise.
1033         (emit_ldr): Mention post-index instruction in comment.
1034         (emit_ldrh): New function.
1035         (emit_ldrb): New function.
1036         (emit_ldrsw): Mention post-index instruction in comment.
1037         (emit_str): Likewise.
1038         (emit_subs): New function.
1039         (emit_cmp): Likewise.
1040         (emit_and): Likewise.
1041         (emit_orr): Likewise.
1042         (emit_orn): Likewise.
1043         (emit_eor): Likewise.
1044         (emit_mvn): Likewise.
1045         (emit_lslv): Likewise.
1046         (emit_lsrv): Likewise.
1047         (emit_asrv): Likewise.
1048         (emit_mul): Likewise.
1049         (emit_sbfm): Likewise.
1050         (emit_sbfx): Likewise.
1051         (emit_ubfm): Likewise.
1052         (emit_ubfx): Likewise.
1053         (emit_csinc): Likewise.
1054         (emit_cset): Likewise.
1055         (emit_nop): Likewise.
1056         (emit_ops_insns): New helper function.
1057         (emit_pop): Likewise.
1058         (emit_push): Likewise.
1059         (aarch64_emit_prologue): New function.
1060         (aarch64_emit_epilogue): Likewise.
1061         (aarch64_emit_add): Likewise.
1062         (aarch64_emit_sub): Likewise.
1063         (aarch64_emit_mul): Likewise.
1064         (aarch64_emit_lsh): Likewise.
1065         (aarch64_emit_rsh_signed): Likewise.
1066         (aarch64_emit_rsh_unsigned): Likewise.
1067         (aarch64_emit_ext): Likewise.
1068         (aarch64_emit_log_not): Likewise.
1069         (aarch64_emit_bit_and): Likewise.
1070         (aarch64_emit_bit_or): Likewise.
1071         (aarch64_emit_bit_xor): Likewise.
1072         (aarch64_emit_bit_not): Likewise.
1073         (aarch64_emit_equal): Likewise.
1074         (aarch64_emit_less_signed): Likewise.
1075         (aarch64_emit_less_unsigned): Likewise.
1076         (aarch64_emit_ref): Likewise.
1077         (aarch64_emit_if_goto): Likewise.
1078         (aarch64_emit_goto): Likewise.
1079         (aarch64_write_goto_address): Likewise.
1080         (aarch64_emit_const): Likewise.
1081         (aarch64_emit_call): Likewise.
1082         (aarch64_emit_reg): Likewise.
1083         (aarch64_emit_pop): Likewise.
1084         (aarch64_emit_stack_flush): Likewise.
1085         (aarch64_emit_zero_ext): Likewise.
1086         (aarch64_emit_swap): Likewise.
1087         (aarch64_emit_stack_adjust): Likewise.
1088         (aarch64_emit_int_call_1): Likewise.
1089         (aarch64_emit_void_call_2): Likewise.
1090         (aarch64_emit_eq_goto): Likewise.
1091         (aarch64_emit_ne_goto): Likewise.
1092         (aarch64_emit_lt_goto): Likewise.
1093         (aarch64_emit_le_goto): Likewise.
1094         (aarch64_emit_gt_goto): Likewise.
1095         (aarch64_emit_ge_got): Likewise.
1096         (aarch64_emit_ops_impl): New static global variable.
1097         (aarch64_emit_ops): New target function, return
1098         &aarch64_emit_ops_impl.
1099         (struct linux_target_ops): Install it.
1100
1101 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
1102
1103         * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
1104         * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
1105         aarch64-ipa.o.
1106         * linux-aarch64-ipa.c: New file.
1107         * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
1108         and endian.h.
1109         (aarch64_get_thread_area): New target method.
1110         (extract_signed_bitfield): New helper function.
1111         (aarch64_decode_ldr_literal): New function.
1112         (enum aarch64_opcodes): New enum.
1113         (struct aarch64_register): New struct.
1114         (struct aarch64_operand): New struct.
1115         (x0): New static global.
1116         (x1): Likewise.
1117         (x2): Likewise.
1118         (x3): Likewise.
1119         (x4): Likewise.
1120         (w2): Likewise.
1121         (ip0): Likewise.
1122         (sp): Likewise.
1123         (xzr): Likewise.
1124         (aarch64_register): New helper function.
1125         (register_operand): Likewise.
1126         (immediate_operand): Likewise.
1127         (struct aarch64_memory_operand): New struct.
1128         (offset_memory_operand): New helper function.
1129         (preindex_memory_operand): Likewise.
1130         (enum aarch64_system_control_registers): New enum.
1131         (ENCODE): New macro.
1132         (emit_insn): New helper function.
1133         (emit_b): New function.
1134         (emit_bcond): Likewise.
1135         (emit_cb): Likewise.
1136         (emit_tb): Likewise.
1137         (emit_blr): Likewise.
1138         (emit_stp): Likewise.
1139         (emit_ldp_q_offset): Likewise.
1140         (emit_stp_q_offset): Likewise.
1141         (emit_load_store): Likewise.
1142         (emit_ldr): Likewise.
1143         (emit_ldrsw): Likewise.
1144         (emit_str): Likewise.
1145         (emit_ldaxr): Likewise.
1146         (emit_stxr): Likewise.
1147         (emit_stlr): Likewise.
1148         (emit_data_processing_reg): Likewise.
1149         (emit_data_processing): Likewise.
1150         (emit_add): Likewise.
1151         (emit_sub): Likewise.
1152         (emit_mov): Likewise.
1153         (emit_movk): Likewise.
1154         (emit_mov_addr): Likewise.
1155         (emit_mrs): Likewise.
1156         (emit_msr): Likewise.
1157         (emit_sevl): Likewise.
1158         (emit_wfe): Likewise.
1159         (append_insns): Likewise.
1160         (can_encode_int32_in): New helper function.
1161         (aarch64_relocate_instruction): New function.
1162         (aarch64_install_fast_tracepoint_jump_pad): Likewise.
1163         (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
1164         (struct linux_target_ops): Install aarch64_get_thread_area,
1165         aarch64_install_fast_tracepoint_jump_pad and
1166         aarch64_get_min_fast_tracepoint_insn_len.
1167
1168 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
1169
1170         * Makefile.in (aarch64-insn.o): New rule.
1171         * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
1172
1173 2015-09-21  Yao Qi  <yao.qi@linaro.org>
1174
1175         * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
1176
1177 2015-09-21  Yao Qi  <yao.qi@linaro.org>
1178
1179         * tracepoint.c (max_jump_pad_size): Remove.
1180
1181 2015-09-18  Yao Qi  <yao.qi@linaro.org>
1182
1183         * linux-aarch64-low.c: Don't include sys/uio.h.
1184         (ps_get_thread_area): Call aarch64_ps_get_thread_area.
1185
1186 2015-09-16  Wei-cheng Wang  <cole945@gmail.com>
1187
1188         * tracepoint.c (eval_result_type): Change prototype.
1189         (condition_true_at_tracepoint): Fix argument to compiled_cond.
1190
1191 2015-09-15  Pedro Alves  <palves@redhat.com>
1192
1193         * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
1194         Check whether to report exec events instead of checking whether
1195         multiprocess is enabled.
1196
1197 2015-09-15  Pedro Alves  <palves@redhat.com>
1198
1199         PR remote/18965
1200         * remote-utils.c (prepare_resume_reply): Merge
1201         TARGET_WAITKIND_VFORK_DONE switch case with the
1202         TARGET_WAITKIND_FORKED case.
1203
1204 2015-09-15  Yao Qi  <yao.qi@linaro.org>
1205
1206         * server.c (handle_query): Check string comparison using
1207         "else if" instead of "if".
1208
1209 2015-09-15  Yao Qi  <yao.qi@linaro.org>
1210
1211         * server.c (vCont_supported): New global variable.
1212         (handle_query): Set vCont_supported to 1 if "vContSupported+"
1213         matches.  Append ";vContSupported+" to own_buf.
1214         (handle_v_requests): Append ";s;S" to own_buf if target supports
1215         hardware single step or vCont_supported is false.
1216         (capture_main): Set vCont_supported to zero.
1217
1218 2015-09-15  Yao Qi  <yao.qi@linaro.org>
1219
1220         * linux-low.c (linux_supports_conditional_breakpoints): Rename
1221         it to ...
1222         (linux_supports_hardware_single_step): ... New function.
1223         (linux_target_ops): Update.
1224         * lynx-low.c (lynx_target_ops): Set field
1225         supports_hardware_single_step to target_can_do_hardware_single_step.
1226         * nto-low.c (nto_target_ops): Likewise.
1227         * spu-low.c (spu_target_ops): Likewise.
1228         * win32-low.c (win32_target_ops): Likewise.
1229         * target.c (target_can_do_hardware_single_step): New function.
1230         * target.h (struct target_ops) <supports_conditional_breakpoints>:
1231         Remove.  <supports_hardware_single_step>: New field.
1232         (target_supports_conditional_breakpoints): Remove.
1233         (target_supports_hardware_single_step): New macro.
1234         (target_can_do_hardware_single_step): Declare.
1235         * server.c (handle_query): Use target_supports_hardware_single_step
1236         instead of target_supports_conditional_breakpoints.
1237
1238 2015-09-15  Yao Qi  <yao.qi@linaro.org>
1239
1240         * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
1241         function.
1242         (struct linux_target_ops the_low_target): Install
1243         aarch64_linux_siginfo_fixup.
1244
1245 2015-09-11  Don Breazeal  <donb@codesourcery.com>
1246             Luis Machado  <lgustavo@codesourcery.com>
1247
1248         * linux-low.c (linux_mourn): Static declaration.
1249         (linux_arch_setup): Move in front of
1250         handle_extended_wait.
1251         (linux_arch_setup_thread): New function.
1252         (handle_extended_wait): Handle exec events.  Call
1253         linux_arch_setup_thread.  Make event_lwp argument a
1254         pointer-to-a-pointer.
1255         (check_zombie_leaders): Do not check stopped threads.
1256         (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
1257         (linux_low_filter_event): Add lwp and thread for exec'ing
1258         non-leader thread if leader thread has been deleted.
1259         Refactor code into linux_arch_setup_thread and call it.
1260         Pass child lwp pointer by reference to handle_extended_wait.
1261         (linux_wait_for_event_filtered): Update comment.
1262         (linux_wait_1): Prevent clobbering exec event status.
1263         (linux_supports_exec_events): New function.
1264         (linux_target_ops) <supports_exec_events>: Initialize new member.
1265         * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
1266         new member.
1267         * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
1268         * server.c (report_exec_events): New global variable.
1269         (handle_query): Handle qSupported query for exec-events feature.
1270         (captured_main): Initialize report_exec_events.
1271         * server.h (report_exec_events): Declare new global variable.
1272         * target.h (struct target_ops) <supports_exec_events>: New
1273         member.
1274         (target_supports_exec_events): New macro.
1275         * win32-low.c (win32_target_ops) <supports_exec_events>:
1276         Initialize new member.
1277
1278 2015-09-09  Markus Metzger  <markus.t.metzger@intel.com>
1279
1280         * linux-low.c (linux_low_enable_btrace): Remove.
1281         (linux_target_ops): Replace linux_low_enable_btrace with
1282         linux_enable_btrace.
1283
1284 2015-09-03  Yao Qi  <yao.qi@linaro.org>
1285
1286         * linux-aarch64-low.c (aarch64_insert_point): Call
1287         aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
1288         returns true.
1289
1290 2015-08-27  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1291
1292         * linux-low.c (check_stopped_by_breakpoint): Use
1293         GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
1294
1295 2015-08-27  Pedro Alves  <palves@redhat.com>
1296
1297         * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
1298
1299 2015-08-26  Simon Marchi  <simon.marchi@ericsson.com>
1300
1301         * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
1302         the XNEW-family equivalent.
1303         (compile_bytecodes): Likewise.
1304         * dll.c (loaded_dll): Likewise.
1305         * event-loop.c (append_callback_event): Likewise.
1306         (create_file_handler): Likewise.
1307         (create_file_event): Likewise.
1308         * hostio.c (handle_open): Likewise.
1309         * inferiors.c (add_thread): Likewise.
1310         (add_process): Likewise.
1311         * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
1312         * linux-arm-low.c (arm_new_process): Likewise.
1313         (arm_new_thread): Likewise.
1314         * linux-low.c (add_to_pid_list): Likewise.
1315         (linux_add_process): Likewise.
1316         (handle_extended_wait): Likewise.
1317         (add_lwp): Likewise.
1318         (enqueue_one_deferred_signal): Likewise.
1319         (enqueue_pending_signal): Likewise.
1320         (linux_resume_one_lwp_throw): Likewise.
1321         (linux_resume_one_thread): Likewise.
1322         (linux_read_memory): Likewise.
1323         (linux_write_memory): Likewise.
1324         * linux-mips-low.c (mips_linux_new_process): Likewise.
1325         (mips_linux_new_thread): Likewise.
1326         (mips_add_watchpoint): Likewise.
1327         * linux-x86-low.c (initialize_low_arch): Likewise.
1328         * lynx-low.c (lynx_add_process): Likewise.
1329         * mem-break.c (set_raw_breakpoint_at): Likewise.
1330         (set_breakpoint): Likewise.
1331         (add_condition_to_breakpoint): Likewise.
1332         (add_commands_to_breakpoint): Likewise.
1333         (clone_agent_expr): Likewise.
1334         (clone_one_breakpoint): Likewise.
1335         * regcache.c (new_register_cache): Likewise.
1336         * remote-utils.c (look_up_one_symbol): Likewise.
1337         * server.c (queue_stop_reply): Likewise.
1338         (start_inferior): Likewise.
1339         (queue_stop_reply_callback): Likewise.
1340         (handle_target_event): Likewise.
1341         * spu-low.c (fetch_ppc_memory): Likewise.
1342         (store_ppc_memory): Likewise.
1343         * target.c (set_target_ops): Likewise.
1344         * thread-db.c (thread_db_load_search): Likewise.
1345         (try_thread_db_load_1): Likewise.
1346         * tracepoint.c (add_tracepoint): Likewise.
1347         (add_tracepoint_action): Likewise.
1348         (create_trace_state_variable): Likewise.
1349         (cmd_qtdpsrc): Likewise.
1350         (cmd_qtro): Likewise.
1351         (add_while_stepping_state): Likewise.
1352         * win32-low.c (child_add_thread): Likewise.
1353         (get_image_name): Likewise.
1354
1355 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1356
1357         * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
1358
1359 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1360
1361         * Makefile.in (aarch64-linux.o): New rule.
1362         * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
1363         srv_tgtobj.
1364         * linux-aarch64-low.c: Include nat/aarch64-linux.h.
1365         (aarch64_init_debug_reg_state): Make it extern.
1366         (aarch64_linux_prepare_to_resume): Remove.
1367
1368 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1369
1370         * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
1371         lwp_arch_private_info and ptid_of_lwp.
1372
1373 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1374
1375         * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
1376         Find proc_info by find_process_pid.  All callers updated.
1377
1378 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1379
1380         * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
1381         Remove.
1382         (debug_reg_change_callback): Remove.
1383         (aarch64_notify_debug_reg_change): Remove.
1384
1385 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1386
1387         * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
1388         Call current_lwp_ptid.
1389
1390 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1391
1392         * linux-aarch64-low.c (debug_reg_change_callback): Use
1393         debug_printf.
1394
1395 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1396
1397         * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
1398
1399 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1400
1401         * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
1402
1403 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1404
1405         * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
1406         the code.
1407
1408 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1409
1410         * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
1411         Remove.
1412         (debug_reg_change_callback): Remove argument entry and add argument
1413         lwp.  Remove local variable thread.  Don't print thread id in the
1414         debugging output.  Don't check whether pid of thread equals to pid.
1415         (aarch64_notify_debug_reg_change): Don't set param.pid.  Call
1416         iterate_over_lwps instead find_inferior.
1417
1418 2015-08-24  Pedro Alves  <palves@redhat.com>
1419
1420         * inferiors.c (get_first_process): New function.
1421         * inferiors.h (get_first_process): New declaration.
1422         * remote-utils.c (read_ptid): Default to the first process in the
1423         list, instead of to the current thread's process.
1424
1425 2015-08-24  Pedro Alves  <palves@redhat.com>
1426
1427         * debug.c: Include gdb_sys_time.h instead of sys/time.h.
1428         * event-loop.c: Likewise.
1429         * remote-utils.c: Likewise.
1430         * tracepoint.c: Likewise.
1431
1432 2015-08-24  Pedro Alves  <palves@redhat.com>
1433
1434         * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
1435         ptid_get_lwp.
1436
1437 2015-08-21  Pedro Alves  <palves@redhat.com>
1438
1439         * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
1440         instead of literal 1.
1441
1442 2015-08-21  Pedro Alves  <palves@redhat.com>
1443
1444         * tdesc.c (default_description): Explicitly zero-initialize.
1445
1446 2015-08-21  Pedro Alves  <palves@redhat.com>
1447
1448         PR gdb/18749
1449         * inferiors.c (remove_thread): Discard any pending stop reply for
1450         this thread.
1451         * server.c (remove_all_on_match_pid): Rename to ...
1452         (remove_all_on_match_ptid): ... this.  Work with a filter ptid
1453         instead of a pid.
1454         (discard_queued_stop_replies): Change parameter to a ptid.  Now
1455         extern.
1456         (handle_v_kill, kill_inferior_callback, captured_main)
1457         (process_serial_event): Adjust.
1458         * server.h (discard_queued_stop_replies): Declare.
1459
1460 2015-08-21  Pedro Alves  <palves@redhat.com>
1461
1462         * linux-low.c (wait_for_sigstop): Always switch to no thread
1463         selected if the previously current thread dies.
1464         * lynx-low.c (lynx_request_interrupt): Use the first thread's
1465         process instead of the current thread's.
1466         * remote-utils.c (input_interrupt): Don't check if there's no
1467         current thread.
1468         * server.c (gdb_read_memory, gdb_write_memory): If setting the
1469         current thread to the general thread fails, error out.
1470         (handle_qxfer_auxv, handle_qxfer_libraries)
1471         (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
1472         (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
1473         (handle_query): Check if there's a thread selected instead of
1474         checking whether there's any thread in the thread list.
1475         (handle_qxfer_threads, handle_qxfer_btrace)
1476         (handle_qxfer_btrace_conf): Don't error out early if there's no
1477         thread in the thread list.
1478         (handle_v_cont, myresume): Don't set the current thread to the
1479         continue thread.
1480         (process_serial_event) <Hg handling>: Also set thread_id if the
1481         previous general thread is still alive.
1482         (process_serial_event) <g/G handling>: If setting the current
1483         thread to the general thread fails, error out.
1484         * spu-low.c (spu_resume, spu_request_interrupt): Use the first
1485         thread's lwp instead of the current thread's.
1486         * target.c (set_desired_thread): If the desired thread was not
1487         found, leave the current thread pointing to NULL.  Return an int
1488         (boolean) indicating success.
1489         * target.h (set_desired_thread): Change return type to int.
1490
1491 2015-08-20  Max Filippov  <jcmvbkbc@gmail.com>
1492
1493         * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
1494         * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
1495         #includes.
1496         (ps_get_thread_area): New function.
1497
1498 2015-08-19  Gary Benson  <gbenson@redhat.com>
1499
1500         * hostio.c (handle_pread): Do not attempt to read more data
1501         than hostio_reply_with_data can fit in a packet.
1502
1503 2015-08-18  Joel Brobecker  <brobecker@adacore.com>
1504
1505         * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
1506
1507 2015-08-14  Matthew Fortune  <matthew.fortune@imgtec.com>
1508
1509         * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
1510
1511 2015-08-06  Pedro Alves  <palves@redhat.com>
1512
1513         * tracepoint.c (expr_eval_result): Now an int.
1514
1515 2015-08-06  Pedro Alves  <palves@redhat.com>
1516
1517         * gdbthread.h (struct regcache): Forward declare.
1518         (struct thread_info) <regcache_data>: Now a struct regcache
1519         pointer.
1520         * inferiors.c (inferior_regcache_data)
1521         (set_inferior_regcache_data): Now work with struct regcache
1522         pointers.
1523         * inferiors.h (struct regcache): Forward declare.
1524         (inferior_regcache_data, set_inferior_regcache_data): Now work
1525         with struct regcache pointers.
1526         * regcache.c (get_thread_regcache, regcache_invalidate_thread)
1527         (free_register_cache_thread): Remove struct regcache pointer
1528         casts.
1529
1530 2015-08-06  Pedro Alves  <palves@redhat.com>
1531
1532         * server.c (captured_main): On error, print the exception message
1533         to stderr, and if run_once is set, throw a quit.
1534
1535 2015-08-06  Pedro Alves  <palves@redhat.com>
1536
1537         * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
1538         the current thread.
1539
1540 2015-08-06  Pedro Alves  <palves@redhat.com>
1541
1542         * linux-low.c (linux_write_memory): Rewrite debug output to avoid
1543         reading beyond the passed in buffer length.
1544
1545 2015-08-06  Pierre Langlois  <pierre.langlois@arm.com>
1546
1547         * tracepoint.c (symbol_list) <required>: Remove.
1548
1549 2015-08-06  Pedro Alves  <palves@redhat.com>
1550
1551         * linux-low.c (handle_extended_wait): Set the fork child's suspend
1552         count if stopping and suspending threads.
1553         (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1554         stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1555         (linux_detach): Complete an ongoing step-over.
1556         (lwp_suspended_inc, lwp_suspended_decr): New functions.  Use
1557         throughout.
1558         (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1559         (linux_wait_1): If passing a signal to the inferior after
1560         finishing a step-over, unsuspend and re-resume all lwps.  If we
1561         see a single-step event but the thread should be continuing, don't
1562         pass the trap to gdb.
1563         (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1564         internal_error instead of gdb_assert.
1565         (enqueue_pending_signal): New function.
1566         (check_ptrace_stopped_lwp_gone): Add debug output.
1567         (start_step_over): Use internal_error instead of gdb_assert.
1568         (complete_ongoing_step_over): New function.
1569         (linux_resume_one_thread): Don't resume a suspended thread.
1570         (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1571         it stepping.
1572
1573 2015-08-06  Pedro Alves  <palves@redhat.com>
1574
1575         * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1576         (linux_thread_alive): Use lwp_is_marked_dead.
1577         (extended_event_reported): Delete.
1578         (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1579         instead of extended_event_reported.
1580         (mark_lwp_dead): Don't set the 'dead' flag.  Store the waitstatus
1581         as well.
1582         (lwp_is_marked_dead): New function.
1583         (lwp_running): Use lwp_is_marked_dead.
1584         * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1585         comment.
1586
1587 2015-08-06  Pedro Alves  <palves@redhat.com>
1588
1589         * linux-low.c (linux_wait_1): Move fork event output out of the
1590         !report_to_gdb check.  Pass event_child->waitstatus to
1591         target_waitstatus_to_string instead of ourstatus.
1592
1593 2015-08-04  Yao Qi  <yao.qi@linaro.org>
1594
1595         * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1596         if current_thread is 32 bit.
1597
1598 2015-08-04  Yao Qi  <yao.qi@linaro.org>
1599
1600         * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1601         0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1602         * server.c (extended_protocol): Remove "static".
1603         * server.h (extended_protocol): Declare it.
1604
1605 2015-08-04  Yao Qi  <yao.qi@linaro.org>
1606
1607         * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1608         both aarch64 and aarch32.
1609         (aarch64_set_pc): Likewise.
1610
1611 2015-08-04  Yao Qi  <yao.qi@linaro.org>
1612
1613         * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1614         to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1615         arm-with-neon.xml to srv_xmlfiles.
1616         * linux-aarch64-low.c: Include linux-aarch32-low.h.
1617         (is_64bit_tdesc): New function.
1618         (aarch64_linux_read_description): New function.
1619         (aarch64_arch_setup): Call aarch64_linux_read_description.
1620         (regs_info): Rename to regs_info_aarch64.
1621         (aarch64_regs_info): Return right regs_info.
1622         (initialize_low_arch): Call initialize_low_arch_aarch32.
1623
1624 2015-08-04  Yao Qi  <yao.qi@linaro.org>
1625
1626         * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1627         * linux-aarch32-low.c: New file.
1628         * linux-aarch32-low.h: New file.
1629         * linux-arm-low.c (arm_fill_gregset): Move it to
1630         linux-aarch32-low.c.
1631         (arm_store_gregset): Likewise.
1632         (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1633         (arm_store_vfpregset): Call arm_store_vfpregset_num.
1634         (arm_arch_setup): Check if PTRACE_GETREGSET works.
1635         (regs_info): Rename to regs_info_arm.
1636         (arm_regs_info): Return regs_info_aarch32 if
1637         have_ptrace_getregset is 1 and target description is
1638         arm_with_neon or arm_with_vfpv3.
1639         (initialize_low_arch): Don't call init_registers_arm_with_neon.
1640         Call initialize_low_arch_aarch32 instead.
1641
1642 2015-08-04  Yao Qi  <yao.qi@linaro.org>
1643
1644         * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1645         * linux-low.c: ... here.
1646         * linux-low.h (have_ptrace_getregset): Declare it.
1647
1648 2015-08-04  Pedro Alves  <palves@redhat.com>
1649
1650         * thread-db.c (struct thread_db): Use new typedefs.
1651         (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1652         CHK calls.
1653         (disable_thread_event_reporting): Cast result of dlsym to
1654         destination function pointer type.
1655         (thread_db_mourn): Use td_ta_delete_ftype.
1656
1657 2015-08-03  Sandra Loosemore  <sandra@codesourcery.com>
1658
1659         * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1660         arch variant.
1661         (CDX_BREAKPOINT): Define for R2.
1662         (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1663         (the_low_target): Add comments.
1664
1665 2015-07-30  Yao Qi  <yao.qi@linaro.org>
1666
1667         * linux-arm-low.c (arm_hwcap): Remove it.
1668         (arm_read_description): New local variable arm_hwcap.  Don't
1669         set arm_hwcap to zero.
1670
1671 2015-07-30  Yao Qi  <yao.qi@linaro.org>
1672
1673         * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1674         Use regcache->tdesc instead.
1675         (arm_store_wmmxregset): Likewise.
1676         (arm_fill_vfpregset): Likewise.
1677         (arm_store_vfpregset): Likewise.
1678
1679 2015-07-30  Yao Qi  <yao.qi@linaro.org>
1680
1681         * linux-arm-low.c: Include arch/arm.h.
1682         (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1683         (arm_store_gregset): Likewise.
1684
1685 2015-07-29  Simon Marchi  <simon.marchi@ericsson.com>
1686
1687         * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1688         ptrace's 4th parameter.
1689
1690 2015-07-27  Yao Qi  <yao.qi@linaro.org>
1691
1692         * configure.srv (case aarch64*-*-linux*): Don't set
1693         srv_linux_usrregs.
1694
1695 2015-07-24  Pedro Alves  <palves@redhat.c: Likewise.om>
1696
1697         * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1698         sys/ptrace.h.
1699         * linux-arm-low.c: Likewise.
1700         * linux-cris-low.c: Likewise.
1701         * linux-crisv32-low.c: Likewise.
1702         * linux-low.c: Likewise.
1703         * linux-m68k-low.c: Likewise.
1704         * linux-mips-low.c: Likewise.
1705         * linux-nios2-low.c: Likewise.
1706         * linux-s390-low.c: Likewise.
1707         * linux-sparc-low.c: Likewise.
1708         * linux-tic6x-low.c: Likewise.
1709         * linux-tile-low.c: Likewise.
1710         * linux-x86-low.c: Likewise.
1711
1712 2015-07-24  Pedro Alves  <palves@redhat.com>
1713
1714         * config.in: Regenerate.
1715         * configure: Regenerate.
1716
1717 2015-07-24  Pedro Alves  <palves@redhat.com>
1718
1719         * acinclude.m4: Include ../ptrace.m4.
1720         * configure.ac: Call GDB_AC_PTRACE.
1721         * config.in, configure: Regenerate.
1722
1723 2015-07-24  Yao Qi  <yao.qi@linaro.org>
1724
1725         * linux-low.c (linux_create_inferior): Remove setting to
1726         proc->priv->new_inferior.
1727         (linux_attach): Likewise.
1728         (linux_low_filter_event): Likewise.
1729         * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1730
1731 2015-07-24  Yao Qi  <yao.qi@linaro.org>
1732
1733         * linux-low.c (linux_arch_setup): New function.
1734         (linux_low_filter_event): If proc->tdesc is NULL and
1735         proc->attached is true, call the_low_target.arch_setup.
1736         Otherwise, keep status pending, and return.
1737         (linux_resume_one_lwp_throw): Don't call get_pc if
1738         thread->while_stepping isn't NULL.  Don't call
1739         get_thread_regcache if proc->tdesc is NULL.
1740         (need_step_over_p): Return 0 if proc->tdesc is NULL.
1741         (linux_target_ops): Install arch_setup.
1742         * server.c (start_inferior): Call the_target->arch_setup.
1743         * target.h (struct target_ops) <arch_setup>: New field.
1744         (target_arch_setup): New marco.
1745         * lynx-low.c (lynx_target_ops): Update.
1746         * nto-low.c (nto_target_ops): Update.
1747         * spu-low.c (spu_target_ops): Update.
1748         * win32-low.c (win32_target_ops): Update.
1749
1750 2015-07-24  Yao Qi  <yao.qi@linaro.org>
1751
1752         * linux-low.c (linux_add_process): Don't set
1753         proc->priv->new_inferior.
1754         (linux_create_inferior): Set proc->priv->new_inferior to 1.
1755         (linux_attach): Likewise.
1756
1757 2015-07-24  Yao Qi  <yao.qi@linaro.org>
1758
1759         * server.c (start_inferior): Code refactor.
1760
1761 2015-07-24  Yao Qi  <yao.qi@linaro.org>
1762
1763         * server.c (process_serial_event): Set general_thread.
1764
1765 2015-07-21  Yao Qi  <yao.qi@linaro.org>
1766
1767         * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1768         aarch64_linux_get_debug_reg_capacity.
1769
1770 2015-07-17  Yao Qi  <yao.qi@linaro.org>
1771
1772         * Makefile.in (aarch64-linux-hw-point.o): New rule.
1773         * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1774         * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1775         (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1776         (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1777         (AARCH64_HWP_ALIGNMENT): Likewise.
1778         (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1779         (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1780         (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1781         (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1782         (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1783         (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1784         (struct aarch64_debug_reg_state): Likewise.
1785         (struct arch_lwp_info): Likewise.
1786         (aarch64_align_watchpoint): Likewise.
1787         (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1788         (aarch64_watchpoint_length): Likewise.
1789         (aarch64_point_encode_ctrl_reg): Likewise
1790         (aarch64_point_is_aligned): Likewise.
1791         (aarch64_align_watchpoint): Likewise.
1792         (aarch64_linux_set_debug_regs):
1793         (aarch64_dr_state_insert_one_point): Likewise.
1794         (aarch64_dr_state_remove_one_point): Likewise.
1795         (aarch64_handle_breakpoint): Likewise.
1796         (aarch64_handle_aligned_watchpoint): Likewise.
1797         (aarch64_handle_unaligned_watchpoint): Likewise.
1798         (aarch64_handle_watchpoint): Likewise.
1799
1800 2015-07-17  Yao Qi  <yao.qi@linaro.org>
1801
1802         * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1803         and don't aarch64_get_debug_reg_state.  All callers update.
1804         (aarch64_handle_aligned_watchpoint): Likewise.
1805         (aarch64_handle_unaligned_watchpoint): Likewise.
1806         (aarch64_handle_watchpoint): Likewise.
1807         (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1808         (aarch64_remove_point): Likewise.
1809
1810 2015-07-17  Yao Qi  <yao.qi@linaro.org>
1811
1812         * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1813         debug_printf.
1814         (aarch64_handle_unaligned_watchpoint): Likewise.
1815
1816 2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
1817
1818         Revert the previous 3 commits:
1819         Move gdb_regex* to common/
1820         Move linux_find_memory_regions_full & co.
1821         gdbserver build-id attribute generator
1822
1823 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
1824             Jan Kratochvil  <jan.kratochvil@redhat.com>
1825
1826         gdbserver build-id attribute generator.
1827         * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1828         (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1829         (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1830         (find_phdr): New.
1831         (get_dynamic): Use find_pdhr to traverse program headers.
1832         (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1833         (compare_mapping_entry_range, struct find_memory_region_callback_data)
1834         (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1835         (get_hex_build_id): New.
1836         (linux_qxfer_libraries_svr4): Add optional build-id attribute
1837         to reply XML document.
1838
1839 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
1840             Jan Kratochvil  <jan.kratochvil@redhat.com>
1841
1842         * target.c: Include target/target-utils.h and fcntl.h.
1843         (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1844         (target_fileio_read_stralloc): New functions.
1845
1846 2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
1847
1848         * Makefile.in (OBS): Add gdb_regex.o.
1849         (gdb_regex.o): New.
1850         * config.in: Rebuilt.
1851         * configure: Rebuilt.
1852
1853 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
1854             Jan Kratochvil  <jan.kratochvil@redhat.com>
1855
1856         Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1857         * Makefile.in (OBS): Add target-utils.o.
1858         (linux-maps.o, target-utils.o): New.
1859         * configure.srv (srv_linux_obj): Add linux-maps.o.
1860
1861 2015-07-15  Pierre Langlois  <pierre.langlois@arm.com>
1862
1863         * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1864         function, return 1.
1865         (the_low_target): Install it.
1866
1867 2015-07-14  Pedro Alves  <palves@redhat.com>
1868
1869         * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1870         Instead, ignore ECHILD, and throw an error for other errnos.
1871
1872 2015-07-10  Pedro Alves  <palves@redhat.com>
1873
1874         * event-loop.c (struct callback_event) <data>: Change type to
1875         gdb_client_data instance instead of gdb_client_data pointer.
1876         (append_callback_event): Adjust.
1877
1878 2015-07-10  Pierre Langlois  <pierre.langlois@arm.com>
1879
1880         * linux-aarch64-low.c: Add comments for each linux_target_ops
1881         method.  Remove comments already covered in target_ops and
1882         linux_target_ops definitions.
1883         (the_low_target): Add comments for each unimplemented method.
1884
1885 2015-07-09  Yao Qi  <yao.qi@linaro.org>
1886
1887         * linux-aarch64-low.c (aarch64_regmap): Remove.
1888         (aarch64_usrregs_info): Remove.
1889         (regs_info): Set field usrregs to NULL.
1890
1891 2015-07-02  Markus Metzger  <markus.t.metzger@intel.com>
1892
1893         * linux-low.c: Include "rsp-low.h"
1894         (linux_low_encode_pt_config, linux_low_encode_raw): New.
1895         (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1896         (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1897         (handle_btrace_enable_pt): New.
1898         (handle_btrace_general_set): Support "pt".
1899         (handle_btrace_conf_general_set): Support "pt:size".
1900
1901 2015-06-29  Pierre Langlois  <pierre.langlois@arm.com>
1902
1903         * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1904         Z_PACKET_SW_BP.
1905
1906 2015-06-29  Pierre Langlois  <pierre.langlois@arm.com>
1907
1908         * linux-aarch64-low.c: Remove comment about endianness.
1909         (aarch64_breakpoint): Change type to gdb_byte[].  Set to "brk #0".
1910         (aarch64_breakpoint_at): Change type of insn to gdb_byte[].  Use
1911         memcmp.
1912
1913 2015-06-24  Gary Benson  <gbenson@redhat.com>
1914
1915         * linux-i386-ipa.c (stdint.h): Do not include.
1916         * lynx-i386-low.c (stdint.h): Likewise.
1917         * lynx-ppc-low.c (stdint.h): Likewise.
1918         * mem-break.c (stdint.h): Likewise.
1919         * thread-db.c (stdint.h): Likewise.
1920         * tracepoint.c (stdint.h): Likewise.
1921         * win32-low.c (stdint.h): Likewise.
1922
1923 2015-06-18  Simon Marchi  <simon.marchi@ericsson.com>
1924
1925         * server.c (write_qxfer_response): Update call to
1926         remote_escape_output.
1927
1928 2015-06-15  Aleksandar Ristovski  <aristovski@qnx.com
1929             Jan Kratochvil  <jan.kratochvil@redhat.com>
1930
1931         Merge multiple hex conversions.
1932         * gdbreplay.c (tohex): Rename to 'fromhex'.
1933         (logchar): Use fromhex.
1934
1935 2015-06-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
1936
1937         * server.c (handle_qxfer_libraries): Set `version' attribute for
1938         <library-list>.
1939
1940 2015-06-10  Gary Benson  <gbenson@redhat.com>
1941
1942         * target.h (struct target_ops) <multifs_open>: New field.
1943         <multifs_unlink>: Likewise.
1944         <multifs_readlink>: Likewise.
1945         * linux-low.c (nat/linux-namespaces.h): New include.
1946         (linux_target_ops): Initialize the_target->multifs_open,
1947         the_target->multifs_unlink and the_target->multifs_readlink.
1948         * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1949         * hostio.c (hostio_fs_pid): New static variable.
1950         (hostio_handle_new_gdb_connection): New function.
1951         (handle_setfs): Likewise.
1952         (handle_open): Use the_target->multifs_open as appropriate.
1953         (handle_unlink): Use the_target->multifs_unlink as appropriate.
1954         (handle_readlink): Use the_target->multifs_readlink as
1955         appropriate.
1956         (handle_vFile): Handle vFile:setfs packets.
1957         * server.c (handle_query): Call hostio_handle_new_gdb_connection
1958         after target_handle_new_gdb_connection.
1959
1960 2015-06-10  Gary Benson  <gbenson@redhat.com>
1961
1962         * configure.ac (AC_CHECK_FUNCS): Add setns.
1963         * config.in: Regenerate.
1964         * configure: Likewise.
1965         * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1966         (linux-namespaces.o): New rule.
1967         * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1968
1969 2015-06-09  Gary Benson <gbenson@redhat.com>
1970
1971         * hostio.c (handle_open): Process mode argument with
1972         fileio_to_host_mode.
1973
1974 2015-06-01  Yao Qi  <yao.qi@linaro.org>
1975
1976         * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1977         * linux-x86-low.c: Likewise.
1978
1979 2015-05-28  Don Breazeal  <donb@codesourcery.com>
1980
1981         * linux-low.c (handle_extended_wait): Initialize
1982         thread_info.last_resume_kind for new fork children.
1983
1984 2015-05-15  Pedro Alves  <palves@redhat.com>
1985
1986         * target.h (target_handle_new_gdb_connection): Rewrite using if
1987         wrapped in do/while.
1988
1989 2015-05-14  Joel Brobecker  <brobecker@adacore.com>
1990
1991         * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1992         * configure, config.in: Regenerate.
1993         * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1994         Declare typedef.
1995
1996 2015-05-12  Don Breazeal  <donb@codesourcery.com>
1997
1998         * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1999         PTRACE_EVENT_VFORK_DONE.
2000         (linux_low_ptrace_options, extended_event_reported): Add vfork
2001         events.
2002         * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
2003         and "vforkdone" for RSP 'T' Stop Reply Packet.
2004         * server.h (report_vfork_events): Declare
2005         global variable.
2006
2007 2015-05-12  Don Breazeal  <donb@codesourcery.com>
2008
2009         * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
2010         (the_low_target) <new_fork>: Initialize new member.
2011         * linux-arm-low.c (arm_new_fork): New function.
2012         (the_low_target) <new_fork>: Initialize new member.
2013         * linux-low.c (handle_extended_wait): Call new target function
2014         new_fork.
2015         * linux-low.h (struct linux_target_ops) <new_fork>: New member.
2016         * linux-mips-low.c (mips_add_watchpoint): New function
2017         extracted from mips_insert_point.
2018         (the_low_target) <new_fork>: Initialize new member.
2019         (mips_linux_new_fork): New function.
2020         (mips_insert_point): Call mips_add_watchpoint.
2021         * linux-x86-low.c (x86_linux_new_fork): New function.
2022         (the_low_target) <new_fork>: Initialize new member.
2023
2024 2015-05-12  Don Breazeal  <donb@codesourcery.com>
2025
2026         * linux-low.c (handle_extended_wait): Implement return value,
2027         rename argument 'event_child' to 'event_lwp', handle
2028         PTRACE_EVENT_FORK, call internal_error for unrecognized event.
2029         (linux_low_ptrace_options): New function.
2030         (linux_low_filter_event): Call linux_low_ptrace_options,
2031         use different argument fo linux_enable_event_reporting,
2032         use return value from handle_extended_wait.
2033         (extended_event_reported): New function.
2034         (linux_wait_1): Call extended_event_reported and set
2035         status to report fork events.
2036         (linux_write_memory): Add pid to debug message.
2037         (reset_lwp_ptrace_options_callback): New function.
2038         (linux_handle_new_gdb_connection): New function.
2039         (linux_target_ops): Initialize new structure member.
2040         * linux-low.h (struct lwp_info) <waitstatus>: New member.
2041         * lynx-low.c: Initialize new structure member.
2042         * remote-utils.c (prepare_resume_reply): Implement stop reason
2043         "fork" for "T" stop message.
2044         * server.c (handle_query): Call handle_new_gdb_connection.
2045         * server.h (report_fork_events): Declare global flag.
2046         * target.h (struct target_ops) <handle_new_gdb_connection>:
2047         New member.
2048         (target_handle_new_gdb_connection): New macro.
2049         * win32-low.c: Initialize new structure member.
2050
2051 2015-05-12  Don Breazeal  <donb@codesourcery.com>
2052
2053         * mem-break.c (APPEND_TO_LIST): Define macro.
2054         (clone_agent_expr): New function.
2055         (clone_one_breakpoint): New function.
2056         (clone_all_breakpoints): New function.
2057         * mem-break.h: Declare new functions.
2058
2059 2015-05-12  Don Breazeal  <donb@codesourcery.com>
2060
2061         * linux-low.c (linux_supports_fork_events): New function.
2062         (linux_supports_vfork_events): New function.
2063         (linux_target_ops): Initialize new structure members.
2064         (initialize_low): Call linux_check_ptrace_features.
2065         * lynx-low.c (lynx_target_ops): Initialize new structure
2066         members.
2067         * server.c (report_fork_events, report_vfork_events):
2068         New global flags.
2069         (handle_query): Add new features to qSupported packet and
2070         response.
2071         (captured_main): Initialize new global variables.
2072         * target.h (struct target_ops) <supports_fork_events>:
2073         New member.
2074         <supports_vfork_events>: New member.
2075         (target_supports_fork_events): New macro.
2076         (target_supports_vfork_events): New macro.
2077         * win32-low.c (win32_target_ops): Initialize new structure
2078         members.
2079
2080 2015-05-12  Gary Benson <gbenson@redhat.com>
2081
2082         * server.c (handle_qxfer_exec_file): Use current process
2083         if annex is empty.
2084
2085 2015-05-08  Sandra Loosemore  <sandra@codesourcery.com>
2086
2087         * linux-nios2-low.c: Include elf/common.h.  Adjust comments.
2088         Remove HAVE_PTRACE_GETREGS conditionals.
2089         (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
2090         instead of PTRACE_GETREGS and PTRACE_SETREGS.
2091
2092 2015-05-08  Yao Qi  <yao.qi@linaro.org>
2093
2094         * linux-low.c (linux_supports_conditional_breakpoints): New
2095         function.
2096         (linux_target_ops): Install new target method.
2097         * lynx-low.c (lynx_target_ops): Install NULL hook for
2098         supports_conditional_breakpoints.
2099         * nto-low.c (nto_target_ops): Likewise.
2100         * spu-low.c (spu_target_ops): Likewise.
2101         * win32-low.c (win32_target_ops): Likewise.
2102         * server.c (handle_query): Check
2103         target_supports_conditional_breakpoints.
2104         * target.h (struct target_ops) <supports_conditional_breakpoints>:
2105         New field.
2106         (target_supports_conditional_breakpoints): New macro.
2107
2108 2015-05-06  Pedro Alves  <palves@redhat.com>
2109
2110         PR server/18081
2111         * server.c (start_inferior): If the process exits, mourn it.
2112
2113 2015-04-21  Gary Benson <gbenson@redhat.com>
2114
2115         * hostio.c (fileio_open_flags_to_host): Factored out to
2116         fileio_to_host_openflags in common/fileio.c.  Single use
2117         updated.
2118
2119 2015-04-17  Max Filippov  <jcmvbkbc@gmail.com>
2120
2121         * linux-xtensa-low.c (xtensa_fill_gregset)
2122         (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
2123         XCHAL_HAVE_LOOP.
2124
2125 2015-04-17  Max Filippov  <jcmvbkbc@gmail.com>
2126
2127         * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
2128         (regs_info): Replace usrregs pointer with NULL.
2129
2130 2015-04-17  Gary Benson  <gbenson@redhat.com>
2131
2132         * target.h (struct target_ops) <pid_to_exec_file>: New field.
2133         * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
2134         * server.c (handle_qxfer_exec_file): New function.
2135         (qxfer_packets): Add exec-file entry.
2136         (handle_query): Report qXfer:exec-file:read as supported packet.
2137
2138 2015-04-14  Romain Naour <romain.naour@openwide.fr>  (tiny change)
2139
2140         * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
2141
2142 2015-04-09  Gary Benson <gbenson@redhat.com>
2143
2144         * hostio-errno.c (errno_to_fileio_error): Remove function.
2145         Update caller to use remote_fileio_to_fio_error.
2146
2147 2015-04-09  Yao Qi  <yao.qi@linaro.org>
2148
2149         * linux-low.c (linux_insert_point): Call
2150         insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
2151         (linux_remove_point): Call remove_memory_breakpoint if type is
2152         raw_bkpt_type_sw.
2153         * linux-x86-low.c (x86_insert_point): Don't call
2154         insert_memory_breakpoint.
2155         (x86_remove_point): Don't call remove_memory_breakpoint.
2156
2157 2015-04-01  Pedro Alves  <palves@redhat.com>
2158             Cleber Rosa  <crosa@redhat.com>
2159
2160         * server.c (gdbserver_usage): Reorganize and extend the usage
2161         message.
2162
2163 2015-03-24  Pedro Alves  <palves@redhat.com>
2164
2165         * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
2166         output.  Also dump TRAP_TRACE.
2167         (linux_low_filter_event): In debug output, distinguish a
2168         resume_stop SIGSTOP from a delayed SIGSTOP.
2169
2170 2015-03-24  Gary Benson  <gbenson@redhat.com>
2171
2172         * linux-x86-low.c (x86_linux_new_thread): Moved to
2173         nat/x86-linux.c.
2174         (x86_linux_prepare_to_resume): Likewise.
2175
2176 2015-03-24  Gary Benson  <gbenson@redhat.com>
2177
2178         * Makefile.in (x86-linux-dregs.o): New rule.
2179         * configure.srv: Add x86-linux-dregs.o to relevant targets.
2180         * linux-x86-low.c: Include nat/x86-linux-dregs.h.
2181         (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
2182         (x86_linux_dr_get): Likewise.
2183         (x86_linux_dr_set): Likewise.
2184         (update_debug_registers_callback): Likewise.
2185         (x86_linux_dr_set_addr): Likewise.
2186         (x86_linux_dr_get_addr): Likewise.
2187         (x86_linux_dr_set_control): Likewise.
2188         (x86_linux_dr_get_control): Likewise.
2189         (x86_linux_dr_get_status): Likewise.
2190         (x86_linux_update_debug_registers): Likewise.
2191
2192 2015-03-24  Gary Benson  <gbenson@redhat.com>
2193
2194         * linux-x86-low.c (x86_linux_update_debug_registers):
2195         New function, factored out from...
2196         (x86_linux_prepare_to_resume): ...this.
2197
2198 2015-03-24  Gary Benson  <gbenson@redhat.com>
2199
2200         * linux-x86-low.c (x86_linux_dr_get): Update comments.
2201         (x86_linux_dr_set): Likewise.
2202         (update_debug_registers_callback): Likewise.
2203         (x86_linux_dr_set_addr): Likewise.
2204         (x86_linux_dr_get_addr): Likewise.
2205         (x86_linux_dr_set_control): Likewise.
2206         (x86_linux_dr_get_control): Likewise.
2207         (x86_linux_dr_get_status): Likewise.
2208         (x86_linux_prepare_to_resume): Likewise.
2209
2210 2015-03-24  Gary Benson  <gbenson@redhat.com>
2211
2212         * linux-x86-low.c (x86_linux_dr_get): Add assertion.
2213         Use perror_with_name.  Pass string through gettext.
2214         (x86_linux_dr_set): Likewise.
2215
2216 2015-03-24  Gary Benson  <gbenson@redhat.com>
2217
2218         * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
2219         (x86_linux_dr_set_addr): ...this.
2220         (x86_dr_low_get_addr): Rename to...
2221         (x86_linux_dr_get_addr): ...this.
2222         (x86_dr_low_set_control): Rename to...
2223         (x86_linux_dr_set_control): ...this.
2224         (x86_dr_low_get_control): Rename to...
2225         (x86_linux_dr_get_control): ...this.
2226         (x86_dr_low_get_status): Rename to...
2227         (x86_linux_dr_get_status): ...this.
2228         (x86_dr_low): Update with new function names.
2229
2230 2015-03-24  Gary Benson  <gbenson@redhat.com>
2231
2232         * Makefile.in (x86-linux.o): New rule.
2233         * configure.srv: Add x86-linux.o to relevant targets.
2234         * linux-low.c (lwp_set_arch_private_info): New function.
2235         (lwp_arch_private_info): Likewise.
2236         * linux-x86-low.c: Include nat/x86-linux.h.
2237         (arch_lwp_info): Removed structure.
2238         (update_debug_registers_callback):
2239         Use lwp_set_debug_registers_changed.
2240         (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
2241         and lwp_set_debug_registers_changed.
2242         (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
2243
2244 2015-03-24  Gary Benson  <gbenson@redhat.com>
2245
2246         * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
2247         * linux-arm-low.c (arm_new_thread): Likewise.
2248         * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
2249         * linux-mips-low.c (mips_linux_new_thread): Likewise.
2250         * linux-x86-low.c (x86_linux_new_thread): Likewise.
2251         * linux-low.c (add_lwp): Update the_low_target.new_thread call.
2252
2253 2015-03-24  Gary Benson  <gbenson@redhat.com>
2254
2255         * linux-low.c (ptid_of_lwp): New function.
2256         (lwp_is_stopped): Likewise.
2257         (lwp_stop_reason): Likewise.
2258         * linux-x86-low.c (update_debug_registers_callback):
2259         Use lwp_is_stopped.
2260         (x86_linux_prepare_to_resume): Use ptid_of_lwp and
2261         lwp_stop_reason.
2262
2263 2015-03-24  Gary Benson  <gbenson@redhat.com>
2264
2265         * linux-low.h (linux_stop_lwp): Remove declaration.
2266
2267 2015-03-24  Gary Benson  <gbenson@redhat.com>
2268
2269         * linux-low.h: Include nat/linux-nat.h.
2270         * linux-low.c (iterate_over_lwps_args): New structure.
2271         (iterate_over_lwps_filter): New function.
2272         (iterate_over_lwps): Likewise.
2273         * linux-x86-low.c (update_debug_registers_callback):
2274         Update signature to what iterate_over_lwps expects.
2275         Remove PID check that iterate_over_lwps now performs.
2276         (x86_dr_low_set_addr): Use iterate_over_lwps.
2277         (x86_dr_low_set_control): Likewise.
2278
2279 2015-03-24  Gary Benson  <gbenson@redhat.com>
2280
2281         * linux-x86-low.c (x86_debug_reg_state): New function.
2282         (x86_linux_prepare_to_resume): Use the above.
2283
2284 2015-03-24  Gary Benson  <gbenson@redhat.com>
2285
2286         * linux-low.c (current_lwp_ptid): New function.
2287         * linux-x86-low.c: Include nat/linux-nat.h.
2288         (x86_dr_low_get_addr): Use current_lwp_ptid.
2289         (x86_dr_low_get_control): Likewise.
2290         (x86_dr_low_get_status): Likewise.
2291
2292 2015-03-20  Pedro Alves  <palves@redhat.com>
2293
2294         * tracepoint.c (cmd_qtstatus): Make "str" const.
2295
2296 2015-03-20  Pedro Alves  <palves@redhat.com>
2297
2298         * server.c (handle_general_set): Make "req_str" const.
2299
2300 2015-03-19  Pedro Alves  <palves@redhat.com>
2301
2302         * linux-low.c (linux_resume_one_lwp): Rename to ...
2303         (linux_resume_one_lwp_throw): ... this.  Don't handle ESRCH here,
2304         instead call perror_with_name.
2305         (check_ptrace_stopped_lwp_gone): New function.
2306         (linux_resume_one_lwp): Reimplement as wrapper around
2307         linux_resume_one_lwp_throw that swallows errors if the LWP is
2308         gone.
2309
2310 2015-03-19  Pedro Alves  <palves@redhat.com>
2311
2312         * linux-low.c (count_events_callback, select_event_lwp_callback):
2313         No longer check whether the thread has resume_stop as last resume
2314         kind.
2315
2316 2015-03-19 Pedro Alves  <palves@redhat.com>
2317
2318         * linux-low.c (count_events_callback, select_event_lwp_callback):
2319         Use the lwp's status_pending_p field, not the thread's.
2320
2321 2015-03-19  Pedro Alves  <palves@redhat.com>
2322
2323         * linux-low.c (select_event_lwp_callback): Update comments to
2324         no longer mention SIGTRAP.
2325
2326 2015-03-18  Gary Benson  <gbenson@redhat.com>
2327
2328         * server.c (handle_query): Do not report vFile:fstat as supported.
2329
2330 2015-03-11  Gary Benson  <gbenson@redhat.com>
2331
2332         * hostio.c (sys/types.h): New include.
2333         (sys/stat.h): Likewise.
2334         (common-remote-fileio.h): Likewise.
2335         (handle_fstat): New function.
2336         (handle_vFile): Handle vFile:fstat packets.
2337
2338 2015-03-11  Gary Benson  <gbenson@redhat.com>
2339
2340         * configure.ac (AC_CHECK_MEMBERS): Add checks for
2341         struct stat.st_blocks and struct stat.st_blksize.
2342         * configure: Regenerate.
2343         * config.in: Likewise.
2344         * Makefile.in (SFILES): Add common/common-remote-fileio.c.
2345         (OBS): Add common-remote-fileio.o.
2346         (common-remote-fileio.o): New rule.
2347
2348 2015-03-09  Pedro Alves  <palves@redhat.com>
2349
2350         * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
2351         'struct sockaddr' pointer in 'accept' call.
2352
2353 2015-03-09  Pedro Alves  <palves@redhat.com>
2354
2355         Revert:
2356         2015-03-07  Pedro Alves  <palves@redhat.com>
2357         * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2358         or <winsock2.h> here.  Instead include "gdb_socket.h".
2359         (remote_open): Use union gdb_sockaddr_u.
2360         * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2361         or <winsock2.h> here.  Instead include "gdb_socket.h".
2362         (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2363         * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2364         or <sys/un.h>.
2365         (init_named_socket, gdb_agent_helper_thread): Use union
2366         gdb_sockaddr_u.
2367
2368 2015-03-07  Pedro Alves  <palves@redhat.com>
2369
2370         * configure.ac (build_warnings): Move
2371         -Wdeclaration-after-statement to the C-specific set.
2372         * configure: Regenerate.
2373
2374 2015-03-07  Pedro Alves  <palves@redhat.com>
2375
2376         * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2377         or <winsock2.h> here.  Instead include "gdb_socket.h".
2378         (remote_open): Use union gdb_sockaddr_u.
2379         * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2380         or <winsock2.h> here.  Instead include "gdb_socket.h".
2381         (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2382         * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2383         or <sys/un.h>.
2384         (init_named_socket, gdb_agent_helper_thread): Use union
2385         gdb_sockaddr_u.
2386
2387 2015-03-07  Pedro Alves  <palves@redhat.com>
2388
2389         Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
2390         instead.
2391
2392 2015-03-06  Yao Qi  <yao.qi@linaro.org>
2393
2394         * linux-aarch64-low.c (aarch64_insert_point): Use
2395         show_debug_regs as a boolean.
2396         (aarch64_remove_point): Likewise.
2397
2398 2015-03-05  Pedro Alves  <palves@redhat.com>
2399
2400         * lynx-low.c (lynx_target_ops): Install NULL hooks for
2401         stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2402         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
2403         * nto-low.c (nto_target_ops): Likewise.
2404         * spu-low.c (spu_target_ops): Likewise.
2405         * win32-low.c (win32_target_ops): Likewise.
2406
2407 2015-03-04  Pedro Alves  <palves@redhat.com>
2408
2409         * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
2410         Decide whether a breakpoint triggered based on the SIGTRAP's
2411         siginfo.si_code.
2412         (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
2413         breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
2414         (linux_low_filter_event): Check for breakpoints before checking
2415         watchpoints.
2416         (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
2417         siginfo.si_code.
2418         (linux_stopped_by_sw_breakpoint)
2419         (linux_supports_stopped_by_sw_breakpoint)
2420         (linux_stopped_by_hw_breakpoint)
2421         (linux_supports_stopped_by_hw_breakpoint): New functions.
2422         (linux_target_ops): Install new target methods.
2423
2424 2015-03-04  Pedro Alves  <palves@redhat.com>
2425
2426         * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
2427         * server.c (swbreak_feature, hwbreak_feature): New globals.
2428         (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
2429         (captured_main): Clear swbreak_feature and hwbreak_feature.
2430         * server.h (swbreak_feature, hwbreak_feature): Declare.
2431         * target.h (struct target_ops) <stopped_by_sw_breakpoint,
2432         supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
2433         supports_stopped_by_hw_breakpoint>: New fields.
2434         (target_supports_stopped_by_sw_breakpoint)
2435         (target_stopped_by_sw_breakpoint)
2436         (target_supports_stopped_by_hw_breakpoint)
2437         (target_stopped_by_hw_breakpoint): Declare.
2438
2439 2015-03-04  Pedro Alves  <palves@redhat.com>
2440
2441         enum lwp_stop_reason -> enum target_stop_reason
2442         * linux-low.c (check_stopped_by_breakpoint): Adjust.
2443         (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
2444         (linux_wait_1, stuck_in_jump_pad_callback)
2445         (move_out_of_jump_pad_callback, linux_resume_one_lwp)
2446         (linux_stopped_by_watchpoint):
2447         * linux-low.h (enum lwp_stop_reason): Delete.
2448         (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
2449         * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2450
2451 2015-03-04  Yao Qi  <yao.qi@linaro.org>
2452
2453         * Makefile.in (SFILES): Add linux-aarch64-low.c.
2454
2455 2015-03-03  Gary Benson  <gbenson@redhat.com>
2456
2457         * hostio.c (handle_vFile): Fix prefix lengths.
2458
2459 2015-03-03  Markus Metzger  <markus.t.metzger@intel.com>
2460
2461         * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
2462         ptr_bits.
2463
2464 2015-03-02  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2465
2466         * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
2467         (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
2468         (clean): Add "rm -f" for above C files.
2469         * configure.srv (srv_regobj): Add s390-vx-linux64.o,
2470         s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
2471         (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
2472         s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
2473         * linux-s390-low.c (HWCAP_S390_VX): New macro.
2474         (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
2475         (init_registers_s390x_vx_linux64)
2476         (init_registers_s390x_tevx_linux64)
2477         (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
2478         (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
2479         declarations.
2480         (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
2481         (s390_store_vxrs_high): New functions.
2482         (s390_regsets): Add entries for NT_S390_VXRS_LOW and
2483         NT_S390_VXRS_HIGH.
2484         (s390_arch_setup): Add logic for selecting one of the new target
2485         descriptions.  Activate the new vector regsets if applicable.
2486         (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
2487         init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
2488         and init_registers_s390x_tevx_linux64.
2489
2490 2015-03-01  Pedro Alves  <palves@redhat.com>
2491
2492         * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
2493         parameter.
2494
2495 2015-02-27  Pedro Alves  <palves@redhat.com>
2496
2497         * linux-x86-low.c (u_debugreg_offset): New function.
2498         (x86_linux_dr_get, x86_linux_dr_set): Use it.
2499
2500 2015-02-27  Pedro Alves  <palves@redhat.com>
2501
2502         * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
2503         [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
2504         [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
2505         ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2506         (ps_lsetfpregs, ps_getpid)
2507         (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
2508         (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
2509         (ps_lsetxregs, ps_plog): Declare.
2510
2511 2015-02-27  Pedro Alves  <palves@redhat.com>
2512
2513         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
2514         IP_AGENT_EXPORT_FUNC.
2515         * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
2516         IP_AGENT_EXPORT_FUNC.
2517         * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
2518         (IP_AGENT_EXPORT): Delete.
2519         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2520         (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2521         (gdb_trampoline_buffer_error, collecting, gdb_collect)
2522         (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
2523         (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
2524         (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
2525         (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
2526         (traceframe_read_count, traceframe_write_count)
2527         (traceframes_created, trace_state_variables, get_raw_reg)
2528         (get_trace_state_variable_value, set_trace_state_variable_value)
2529         (ust_loaded, helper_thread_id, cmd_buf): Use
2530         IPA_SYM_EXPORTED_NAME.
2531         (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
2532         (tracepoints) Use IP_AGENT_EXPORT_VAR.
2533         (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
2534         IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2535         (last_tracepoint): Move into !IN_PROCESS_AGENT block.
2536         (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
2537         EXTERN_C_PUSH/EXTERN_C_POP.
2538         (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
2539         (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
2540         wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2541         (trace_buffer_ctrl, trace_buffer_ctrl_curr)
2542         (traceframe_write_count, traceframe_read_count)
2543         (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
2544         (about_to_request_buffer_space, get_trace_state_variable_value)
2545         (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
2546         (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
2547         EXTERN_C_PUSH/EXTERN_C_POP.
2548         (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2549         (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2550         (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2551         and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2552         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2553         (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2554         (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2555         * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2556         Define.
2557         (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2558         (IP_AGENT_EXPORT_VAR_DECL): Define.
2559         (tracing): Declare.
2560         (gdb_agent_get_raw_reg): Declare.
2561
2562 2015-02-27  Tom Tromey  <tromey@redhat.com>
2563             Pedro Alves  <palves@redhat.com>
2564
2565         Rename symbols whose names are reserved C++ keywords throughout.
2566
2567 2015-02-27  Pedro Alves  <palves@redhat.com>
2568
2569         * Makefile.in (COMPILER): New, get it from autoconf.
2570         (CXX): Get from autoconf instead.
2571         (COMPILE.pre): Use COMPILER.
2572         (CC-LD): Rename to ...
2573         (CC_LD): ... this.  Use COMPILER.
2574         (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2575         (CXX_FOR_TARGET): Default to g++ instead of gcc.
2576         * acinclude.m4: Include build-with-cxx.m4.
2577         * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2578         Disable -Werror by default if building in C++ mode.
2579         (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2580         -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2581         the C++ compiler.  Save/restore CXXFLAGS too.
2582         * configure: Regenerate.
2583
2584 2015-02-27  Pedro Alves  <palves@redhat.com>
2585
2586         * acinclude.m4: Include libiberty.m4.
2587         * configure.ac: Call libiberty_INIT.
2588         * config.in, configure: Regenerate.
2589
2590 2015-02-26  Pedro Alves  <palves@redhat.com>
2591
2592         * linux-low.c (linux_wait_1): When incrementing the PC past a
2593         program breakpoint always use the_low_target.breakpoint_len as
2594         increment, rather than the maximum between that and
2595         the_low_target.decr_pc_after_break.
2596
2597 2015-02-23  Pedro Alves  <palves@redhat.com>
2598
2599         * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2600         thread was doing a step-over; always adjust the PC if
2601         we stepped over a permanent breakpoint.
2602         (linux_wait_1): If we stepped over breakpoint that was on top of a
2603         permanent breakpoint, manually advance the PC past it.
2604
2605 2015-02-23  Pedro Alves  <palves@redhat.com>
2606
2607         * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2608         modes.
2609         (x86_fill_gregset, x86_store_gregset): Use it when handling
2610         $orig_eax.
2611
2612 2015-02-20  Pedro Alves  <palves@redhat.com>
2613
2614         * thread-db.c: Include "nat/linux-procfs.h".
2615         (thread_db_init): Skip listing new threads if the kernel supports
2616         PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2617
2618 2015-02-20  Pedro Alves  <palves@redhat.com>
2619
2620         * linux-low.c (status_pending_p_callback): Use ptid_match.
2621
2622 2015-02-19  Antoine Tremblay  <antoine.tremblay@ericsson.com>
2623
2624         PR breakpoints/16812
2625         * linux-low.c (wstatus_maybe_breakpoint): Remove.
2626         (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2627         (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2628
2629 2015-02-10  Antoine Tremblay <antoine.tremblay@ericsson.com>
2630
2631         PR breakpoints/15956
2632         * tracepoint.c (cmd_qtinit): Add check for current_thread.
2633
2634 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
2635
2636         * linux-low.c (linux_low_btrace_conf): Print size.
2637         * server.c (handle_btrace_conf_general_set): New.
2638         (hanle_general_set): Call handle_btrace_conf_general_set.
2639         (handle_query): Report Qbtrace-conf:bts:size as supported.
2640
2641 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
2642
2643         * linux-low.c (linux_low_enable_btrace): Update parameters.
2644         (linux_low_btrace_conf): New.
2645         (linux_target_ops)<to_btrace_conf>: Initialize.
2646         * server.c (current_btrace_conf): New.
2647         (handle_btrace_enable): Rename to ...
2648         (handle_btrace_enable_bts): ... this.  Pass &current_btrace_conf
2649         to target_enable_btrace.  Update comment.  Update users.
2650         (handle_qxfer_btrace_conf): New.
2651         (qxfer_packets): Add btrace-conf entry.
2652         (handle_query): Report qXfer:btrace-conf:read as supported packet.
2653         * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2654         (target_ops)<read_btrace_conf>: New.
2655         (target_enable_btrace): Update parameters.
2656         (target_read_btrace_conf): New.
2657
2658 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
2659
2660         * server.c (handle_btrace_general_set): Remove call to
2661         target_supports_btrace.
2662         (supported_btrace_packets): New.
2663         (handle_query): Call supported_btrace_packets.
2664         * target.h: include btrace-common.h.
2665         (btrace_target_info): Removed.
2666         (supports_btrace, target_supports_btrace): Update parameters.
2667
2668 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
2669
2670         * Makefile.in (SFILES): Add common/btrace-common.c.
2671         (OBS): Add common/btrace-common.o.
2672         (btrace-common.o): Add build rules.
2673         * linux-low: Include btrace-common.h.
2674         (linux_low_read_btrace): Use struct btrace_data.  Call
2675         btrace_data_init and btrace_data_fini.
2676
2677 2015-02-06  Pedro Alves  <palves@redhat.com>
2678
2679         * thread-db.c (find_new_threads_callback): Add debug output.
2680
2681 2015-02-04  Pedro Alves  <palves@redhat.com>
2682
2683         * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2684         (resume_stopped_resumed_lwps): New function.
2685         (linux_wait_for_event_filtered): Use it.
2686
2687 2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
2688
2689         * Makefile.in (SFILES): Add linux-personality.c.
2690         (linux-personality.o): New rule.
2691         * configure.srv (srv_linux_obj): Add linux-personality.o to the
2692         list of objects to be built.
2693         * linux-low.c: Include nat/linux-personality.h.
2694         (linux_create_inferior): Remove code to disable address space
2695         randomization (moved to ../nat/linux-personality.c).  Create
2696         cleanup to disable address space randomization.
2697
2698 2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
2699
2700         * Makefile.in (posix-strerror.o): New rule.
2701         (mingw-strerror.o): Likewise.
2702         * configure: Regenerated.
2703         * configure.ac: Source file ../common/common.host.  Initialize new
2704         variable srv_host_obs.  Add srv_host_obs to GDBSERVER_DEPFILES.
2705
2706 2015-01-14  Yao Qi  <yao@codesourcery.com>
2707
2708         * Makefile.in (SFILES): Add nat/ppc-linux.c.
2709         (ppc-linux.o): New rule.
2710         * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2711         * configure.ac: AC_CHECK_FUNCS(getauxval).
2712         * config.in: Re-generated.
2713         * configure: Re-generated.
2714         * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2715         ppc64_64bit_inferior_p
2716
2717 2015-01-14  Yao Qi  <yao@codesourcery.com>
2718
2719         * linux-ppc-low.c: Include "nat/ppc-linux.h".
2720          (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2721         (PPC_FEATURE_HAS_ALTIVEC,  PPC_FEATURE_HAS_SPE): Likewise.
2722         (PT_ORIG_R3, PT_TRAP): Likewise.
2723         (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2724         (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2725         (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2726
2727 2015-01-10  Joel Brobecker  <brobecker@adacore.com>
2728
2729         * i387-fp.c (i387_cache_to_xsave): In look over
2730         num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2731         zmmh_low_space field by use of zmmh_high_space.
2732
2733 2015-01-09  Pedro Alves  <palves@redhat.com>
2734
2735         * linux-low.c (step_over_bkpt): Move higher up in the file.
2736         (handle_extended_wait): Don't store the stop_pc here.
2737         (get_stop_pc): Adjust comments and rename to ...
2738         (check_stopped_by_breakpoint): ... this.  Record whether the LWP
2739         stopped for a software breakpoint or hardware breakpoint.
2740         (thread_still_has_status_pending_p): New function.
2741         (status_pending_p_callback): Use
2742         thread_still_has_status_pending_p.  If the event is no longer
2743         interesting, resume the LWP.
2744         (handle_tracepoints): Add assert.
2745         (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2746         (wstatus_maybe_breakpoint): New function.
2747         (cancel_breakpoint): Delete function.
2748         (check_stopped_by_watchpoint): New function, factored out from
2749         linux_low_filter_event.
2750         (lp_status_maybe_breakpoint): Delete function.
2751         (linux_low_filter_event): Remove filter_ptid argument.
2752         Leave thread group exits pending here.  Store the LWP's stop PC.
2753         Always leave events pending.
2754         (linux_wait_for_event_filtered): Pull all events out of the
2755         kernel, and leave them all pending.
2756         (count_events_callback, select_event_lwp_callback): Consider all
2757         events.
2758         (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2759         (select_event_lwp): Only give preference to the stepping LWP in
2760         all-stop mode.  Adjust comments.
2761         (ignore_event): New function.
2762         (linux_wait_1): Delete 'retry' label.  Use ignore_event.  Remove
2763         references to cancel_breakpoints.  Adjust to renames.  Also give
2764         equal priority to all LWPs that have had events in non-stop mode.
2765         If reporting a software breakpoint event, unadjust the LWP's PC.
2766         (linux_wait): If linux_wait_1 returned an ignored event, retry.
2767         (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2768         Adjust.
2769         (linux_resume_one_lwp): Store the LWP's PC.  Adjust.
2770         (resume_status_pending_p): Use thread_still_has_status_pending_p.
2771         (linux_stopped_by_watchpoint): Adjust.
2772         (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2773         * linux-low.h (enum lwp_stop_reason): New.
2774         (struct lwp_info) <stop_pc>: Adjust comment.
2775         <stopped_by_watchpoint>: Delete field.
2776         <stop_reason>: New field.
2777         * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2778         * mem-break.c (software_breakpoint_inserted_here)
2779         (hardware_breakpoint_inserted_here): New function.
2780         * mem-break.h (software_breakpoint_inserted_here)
2781         (hardware_breakpoint_inserted_here): Declare.
2782         * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2783         (cancel_breakpoints): Delete.
2784         * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2785         (upload_fast_traceframes): Remove references to
2786         cancel_breakpoints.
2787
2788 2015-01-09  Pedro Alves  <palves@redhat.com>
2789
2790         * thread-db.c (find_new_threads_callback): Ignore thread if the
2791         kernel thread ID is -1.
2792
2793 2015-01-09  Pedro Alves  <palves@redhat.com>
2794
2795         * linux-low.c (linux_attach_fail_reason_string): Move to
2796         nat/linux-ptrace.c, and rename.
2797         (linux_attach_lwp): Update comment.
2798         (attach_proc_task_lwp_callback): New function.
2799         (linux_attach): Adjust to rename and use
2800         linux_proc_attach_tgid_threads.
2801         (linux_attach_fail_reason_string): Delete declaration.
2802
2803 2015-01-01  Joel Brobecker  <brobecker@adacore.com>
2804
2805         * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2806         * server.c (gdbserver_version): Likewise.
2807
2808 2014-12-29  Sergio Durigan Junior  <sergiodj@redhat.com>
2809
2810         * remote-utils.c: Include ctype.h.
2811         (input_interrupt): Explicitly handle the case when the char
2812         received is the NUL byte.  Improve the printing of non-ASCII
2813         characters.
2814
2815 2014-12-16  Joel Brobecker  <brobecker@adacore.com>
2816
2817         * linux-low.c (linux_low_filter_event): Update call to
2818         linux_enable_event_reporting following the addition of
2819         a new parameter to that function.
2820
2821 2014-12-16  Catalin Udma  <catalin.udma@freescale.com>
2822
2823         PR server/17457
2824         * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2825         (AARCH64_FPCR_REGNO): Likewise.
2826         (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2827         (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2828         (aarch64_store_fpregset): Likewise.
2829
2830 2014-12-15  Joel Brobecker  <brobecker@adacore.com>
2831
2832         * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2833         Remove FIXME comment about assumption about N.
2834
2835 2014-12-13  Joel Brobecker  <brobecker@adacore.com>
2836
2837         * configure.ac: If large-file support is disabled in GDBserver,
2838         pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2839         * configure: Regenerate.
2840
2841 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2842
2843         * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2844         warning upon ENODATA from ptrace.
2845         * linux-s390-low.c (s390_store_tdb): New.
2846         (s390_regsets): Add regset for NT_S390_TDB.
2847
2848 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2849
2850         * linux-low.c (regsets_store_inferior_registers): Skip regsets
2851         without a fill_function.
2852         * linux-s390-low.c (s390_fill_last_break): Remove.
2853         (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2854         (s390_arch_setup): Use regset's size instead of fill_function for
2855         loop end condition.
2856
2857 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2858
2859         * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2860         the regset's store function when ptrace returned an error.
2861         * regcache.c (get_thread_regcache): Invalidate register cache
2862         before fetching inferior's registers.
2863
2864 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2865
2866         * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2867         while-loop as for-loop.
2868         (regsets_store_inferior_registers): Likewise.
2869
2870 2014-11-28  Yao Qi  <yao@codesourcery.com>
2871
2872         * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2873         * config.in, configure: Re-generate.
2874         * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2875         is defined.
2876
2877 2014-11-21  Yao Qi  <yao@codesourcery.com>
2878
2879         * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2880         (AC_CHECK_HEADERS): Remove malloc.h.
2881         * configure: Re-generated.
2882         * config.in: Re-generated.
2883         * server.h: Don't include alloca.h and malloc.h.
2884         * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2885         Don't include malloc.h.
2886
2887 2014-11-17  Joel Brobecker  <brobecker@adacore.com>
2888
2889         * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2890         corresponding ERRNO check in same block.
2891
2892 2014-11-12  Pedro Alves  <palves@redhat.com>
2893
2894         * server.c (cont_thread): Update comment.
2895         (start_inferior, attach_inferior): No longer clear cont_thread.
2896         (handle_v_cont): No longer set cont_thread.
2897         (captured_main): Clear cont_thread each time a GDB connects.
2898
2899 2014-11-12  Pedro Alves  <palves@redhat.com>
2900
2901         * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2902         thread, and don't resume all threads if the Hc thread has exited.
2903
2904 2014-11-12  Pedro Alves  <palves@redhat.com>
2905
2906         * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2907         the process group instead of to a specific LWP.
2908
2909 2014-10-15  Pedro Alves  <palves@redhat.com>
2910
2911         PR server/17487
2912         * win32-arm-low.c (arm_set_thread_context): Remove current_event
2913         parameter.
2914         (arm_set_thread_context): Delete.
2915         (the_low_target): Adjust.
2916         * win32-i386-low.c (debug_registers_changed)
2917         (debug_registers_used): Delete.
2918         (update_debug_registers_callback): New function.
2919         (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2920         needing to update their debug registers.
2921         (win32_get_current_dr): New function.
2922         (x86_dr_low_get_addr, x86_dr_low_get_control)
2923         (x86_dr_low_get_status): Fetch the debug register from the thread
2924         record's context.
2925         (i386_initial_stuff): Adjust.
2926         (i386_get_thread_context): Remove current_event parameter.  Don't
2927         clear debug_registers_changed nor copy DR values to
2928         debug_reg_state.
2929         (i386_set_thread_context): Delete.
2930         (i386_prepare_to_resume): New function.
2931         (i386_thread_added): Mark the thread as needing to update irs
2932         debug registers.
2933         (the_low_target): Remove i386_set_thread_context and install
2934         i386_prepare_to_resume.
2935         * win32-low.c (win32_get_thread_context): Adjust.
2936         (win32_set_thread_context): Use SetThreadContext
2937         directly.
2938         (win32_prepare_to_resume): New function.
2939         (win32_require_context): New function, factored out from ...
2940         (thread_rec): ... this.
2941         (continue_one_thread): Call win32_prepare_to_resume on each thread
2942         we're about to continue.
2943         (win32_resume): Call win32_prepare_to_resume on the event thread.
2944         * win32-low.h (struct win32_thread_info)
2945         <debug_registers_changed>: New field.
2946         (struct win32_target_ops): Change prototype of set_thread_context,
2947         delete set_thread_context and add prepare_to_resume.
2948         (win32_require_context): New declaration.
2949
2950 2014-10-08  Gary Benson  <gbenson@redhat.com>
2951
2952         * server.h: Do not include common-exceptions.h.
2953
2954 2014-10-08  Gary Benson  <gbenson@redhat.com>
2955
2956         * server.h: Do not include cleanups.h.
2957
2958 2014-09-30  James Hogan  <james.hogan@imgtec.com>
2959
2960         * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2961         mips64-dsp-linux.c.
2962
2963 2014-09-23  Yao Qi  <yao@codesourcery.com>
2964
2965         * linux-low.c (lp_status_maybe_breakpoint): New function.
2966         (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2967         (count_events_callback): Likewise.
2968         (select_event_lwp_callback): Likewise.
2969         (cancel_breakpoints_callback): Likewise.
2970
2971 2014-09-19  Don Breazeal  <donb@codesourcery.com>
2972
2973         * linux-low.c (handle_extended_wait): Call
2974         linux_ptrace_get_extended_event.
2975         (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2976         linux_is_extended_waitstatus.
2977
2978 2014-09-16  Joel Brobecker  <brobecker@adacore.com>
2979
2980         * Makefile.in (CPPFLAGS): Define.
2981         (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2982         (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2983
2984 2014-09-16  Gary Benson  <gbenson@redhat.com>
2985
2986         * inferiors.h (current_inferior): Renamed as...
2987         (current_thread): New variable.  All uses updated.
2988         * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2989         (maybe_move_out_of_jump_pad): Likewise.
2990         (cancel_breakpoint): Likewise.
2991         (linux_low_filter_event): Likewise.
2992         (wait_for_sigstop): Likewise.
2993         (linux_resume_one_lwp): Likewise.
2994         (need_step_over_p): Likewise.
2995         (start_step_over): Likewise.
2996         (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2997         * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2998         * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2999         and save_inferior as saved_thread.
3000         * regcache.c (get_thread_regcache): Renamed saved_inferior as
3001         saved_thread.
3002         (regcache_invalidate_thread): Likewise.
3003         * remote-utils.c (prepare_resume_reply): Likewise.
3004         * thread-db.c (thread_db_get_tls_address): Likewise.
3005         (disable_thread_event_reporting): Likewise.
3006         (remove_thread_event_breakpoints): Likewise.
3007         * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
3008         as saved_thread.
3009         * target.h (set_desired_inferior): Renamed as...
3010         (set_desired_thread): New declaration.  All uses updated.
3011         * server.c (myresume): Updated comment to reference thread instead
3012         of inferior.
3013         (handle_serial_event): Likewise.
3014         (handle_target_event): Likewise.
3015
3016 2014-09-12  Tom Tromey  <tromey@redhat.com>
3017             Gary Benson  <gbenson@redhat.com>
3018
3019         * regcache.h: Include common-regcache.h.
3020         (regcache_read_pc): Don't declare.
3021         * regcache.c (get_thread_regcache_for_ptid): New function.
3022
3023 2014-09-11  Tom Tromey  <tromey@redhat.com>
3024             Gary Benson  <gbenson@redhat.com>
3025
3026         * symbol.c: New file.
3027         * Makefile.in (SFILES): Add symbol.c.
3028         (OBS): Add symbol.o.
3029
3030 2014-09-11  Gary Benson  <gbenson@redhat.com>
3031
3032         * target.c (target_stop_ptid, target_continue_ptid): New
3033         functions.
3034
3035 2014-09-11  Tom Tromey  <tromey@redhat.com>
3036             Gary Benson  <gbenson@redhat.com>
3037
3038         * target.h: Include target/target.h.
3039         * target.c (target_read_memory, target_read_uint32)
3040         (target_write_memory): New functions.
3041
3042 2014-09-11  Gary Benson  <gbenson@redhat.com>
3043
3044         * server.h (debug_hw_points): Don't declare.
3045         * server.c (debug_hw_points): Don't define.  Replace all uses
3046         with show_debug_regs.
3047         * linux-aarch64-low.c (debug_hw_points): Don't define.  Replace
3048         all uses with show_debug_regs.
3049
3050 2014-09-08  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
3051
3052         * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
3053         endianness into account.
3054         (ppc_supply_ptrace_register): Likewise.
3055
3056 2014-09-03  James Hogan  <james.hogan@imgtec.com>
3057
3058         * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
3059         to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
3060
3061 2014-09-03  Gary Benson  <gbenson@redhat.com>
3062
3063         * linux-x86-low.c (x86_linux_prepare_to_resume): Use
3064         ALL_DEBUG_ADDRESS_REGISTERS.
3065
3066 2014-09-02  Gary Benson  <gbenson@redhat.com>
3067
3068         * i386-low.h: Renamed as...
3069         * x86-low.h: New file.  All type, function and variable name
3070         prefixes changed from "i386_" to "x86_".  All references updated.
3071         * i386-low.c: Renamed as...
3072         * x86-low.c: New file.  All type, function and variable name
3073         prefixes changed from "i386_" to "x86_".  All references updated.
3074
3075 2014-09-02  Gary Benson  <gbenson@redhat.com>
3076
3077         * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
3078         (x86_linux_new_thread): Likewise.
3079
3080 2014-08-29  Gary Benson  <gbenson@redhat.com>
3081
3082         * server.h (setjmp.h): Do not include.
3083         (toplevel): Do not declare.
3084         (common-exceptions.h): Include.
3085         (cleanups.h): Likewise.
3086         * server.c (toplevel): Do not define.
3087         (exit_code): New static global.
3088         (detach_or_kill_for_exit_cleanup): New function.
3089         (main): New function.  Original main renamed to...
3090         (captured_main): New function.
3091         * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
3092
3093 2014-08-29  Gary Benson  <gbenson@redhat.com>
3094
3095         * Makefile.in (SFILES): Add common/common-exceptions.c.
3096         (OBS): Add common-exceptions.o.
3097         (common-exceptions.o): New rule.
3098         * utils.c (prepare_to_throw_exception): New function.
3099
3100 2014-08-29  Gary Benson  <gbenson@redhat.com>
3101
3102         * config.in: Regenerate.
3103         * configure: Likewise.
3104
3105 2014-08-29  Gary Benson  <gbenson@redhat.com>
3106
3107         * Makefile.in (SFILES): Add common/cleanups.c.
3108         (OBS): cleanups.o.
3109         (cleanups.o): New rule.
3110
3111 2014-08-29  Gary Benson  <gbenson@redhat.com>
3112
3113         * utils.c (internal_vwarning): New function.
3114
3115 2014-08-28  Gary Benson  <gbenson@redhat.com>
3116
3117         * utils.h (fatal): Remove declaration.
3118         * utils.c (fatal): Remove function.
3119
3120 2014-08-28  Gary Benson  <gbenson@redhat.com>
3121
3122         * tracepoint.c (gdb_agent_init): Replace fatal with
3123         perror_with_name.
3124         (initialize_tracepoint): Likewise.
3125
3126 2014-08-28  Gary Benson  <gbenson@redhat.com>
3127
3128         * remote-utils.c (remote_prepare): Replace fatal with error.
3129
3130 2014-08-28  Gary Benson  <gbenson@redhat.com>
3131
3132         * linux-low.c (linux_async): Replace fatal with warning.
3133         Tidy up and return.
3134         (linux_start_non_stop): Return -1 if linux_async failed.
3135
3136 2014-08-28  Gary Benson  <gbenson@redhat.com>
3137
3138         * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
3139         gdb_assert.
3140         (i386_dr_low_get_addr): Remove vague comment.
3141         * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
3142         gdb_assert.
3143
3144 2014-08-28  Gary Benson  <gbenson@redhat.com>
3145
3146         * inferiors.c (get_thread_process): Replace check with gdb_assert.
3147         * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
3148         internal_error.
3149         (linux_resume_one_lwp): Likewise.
3150         * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
3151         gdb_assert.
3152         * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
3153         with internal_error.
3154         * regcache.c (get_thread_regcache): Replace check with gdb_assert.
3155         (init_register_cache): Replace fatal with gdb_assert_not_reached.
3156         (find_register_by_name): Replace fatal with internal_error.
3157         (find_regno): Likewise.
3158         * tdesc.c (init_target_desc): Replace check with gdb_assert.
3159         * thread-db.c (thread_db_create_event): Likewise.
3160         (thread_db_load_search): Likewise.
3161         (try_thread_db_load_1): Likewise.
3162         * tracepoint.c (get_jump_space_head): Replace fatal with
3163         internal_error.
3164         (claim_trampoline_space): Likewise.
3165         (have_fast_tracepoint_trampoline_buffer): Likewise.
3166         (cmd_qtstart): Likewise.
3167         (stop_tracing): Likewise.
3168         (fast_tracepoint_collecting): Likewise.
3169         (target_malloc): Likewise.
3170         (download_tracepoint): Likewise.
3171         (download_trace_state_variables): Replace check with gdb_assert.
3172         (upload_fast_traceframes): Replace fatal with internal_error.
3173
3174 2014-08-19  Tom Tromey  <tromey@redhat.com>
3175             Gary Benson  <gbenson@redhat.com>
3176
3177         * Makefile.in (SFILES): Add common/common-debug.c.
3178         (OBS): Add common-debug.o.
3179         (common-debug.o): New rule.
3180         * debug.h (debug_printf): Don't declare.
3181         * debug.c (debug_printf): Renamed and rewritten as...
3182         (debug_vprintf): New function.
3183
3184 2014-08-19  Gary Benson  <gbenson@redhat.com>
3185
3186         * utils.h: Do not include print-utils.h.
3187
3188 2014-08-19  Tom Tromey  <tromey@redhat.com>
3189             Gary Benson  <gbenson@redhat.com>
3190
3191         * server.h: Add static assertion.
3192         (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
3193
3194 2014-08-19  Tom Tromey  <tromey@redhat.com>
3195             Gary Benson  <gbenson@redhat.com>
3196
3197         * Makefile.in (SFILES): Add common/errors.c.
3198         (OBS): Add errors.o.
3199         (IPA_OBS): Add errors-ipa.o.
3200         (errors.o): New rule.
3201         (errors-ipa.o): Likewise.
3202         * utils.h (perror_with_name, error, warning): Don't declare.
3203         * utils.c (warning): Renamed and rewritten as...
3204         (vwarning): New function.
3205         (error): Renamed and rewritten as...
3206         (verror): New function.
3207         (internal_error): Renamed and rewritten as...
3208         (internal_verror): New function.
3209
3210 2014-08-07  Gary Benson  <gbenson@redhat.com>
3211
3212         * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
3213         * configure: Regenerate.
3214         * config.in: Likewise.
3215         * server.h: Do not include errno.h.
3216         * event-loop.c: Likewise.
3217         * hostio-errno.c: Likewise.
3218         * linux-low.c: Likewise.
3219         * remote-utils.c: Likewise.
3220         * spu-low.c: Likewise.
3221         * utils.c: Likewise.
3222         * gdbreplay.c: Unconditionally include errno.h.
3223
3224 2014-08-07  Gary Benson  <gbenson@redhat.com>
3225
3226         * server.h: Do not include string.h.
3227         * event-loop.c: Likewise.
3228         * linux-low.c: Likewise.
3229         * regcache.c: Likewise.
3230         * remote-utils.c: Likewise.
3231         * spu-low.c: Likewise.
3232         * utils.c: Likewise.
3233
3234 2014-08-07  Gary Benson  <gbenson@redhat.com>
3235
3236         * server.h: Do not include gdb_assert.h.
3237
3238 2014-08-07  Gary Benson  <gbenson@redhat.com>
3239
3240         * server.h: Do not include common-utils.h.
3241
3242 2014-08-07  Gary Benson  <gbenson@redhat.com>
3243
3244         * server.h: Do not include ptid.h.
3245         * notif.h: Likewise.
3246
3247 2014-08-07  Gary Benson  <gbenson@redhat.com>
3248
3249         * server.h: Do not include gdb_locale.h.
3250
3251 2014-08-07  Gary Benson  <gbenson@redhat.com>
3252
3253         * server.h: Do not include gdb/signals.h.
3254         * win32-low.c: Likewise.
3255
3256 2014-08-07  Gary Benson  <gbenson@redhat.com>
3257
3258         * server.h: Do not include pathmax.h.
3259
3260 2014-08-07  Gary Benson  <gbenson@redhat.com>
3261
3262         * server.h: Do not include libiberty.h.
3263         * linux-bfin-low.c: Likewise.
3264
3265 2014-08-07  Gary Benson  <gbenson@redhat.com>
3266
3267         * server.h: Do not include ansidecl.h.
3268
3269 2014-08-07  Gary Benson  <gbenson@redhat.com>
3270
3271         * linux-x86-low.c: Do not include stddef.h.
3272         * lynx-ppc-low.c: Likewise.
3273         * tracepoint.c: Likewise.
3274
3275 2014-08-07  Gary Benson  <gbenson@redhat.com>
3276
3277         * server.h: Do not include stdarg.h.
3278         * nto-low.c: Likewise.
3279
3280 2014-08-07  Gary Benson  <gbenson@redhat.com>
3281
3282         * server.h: Do not include stdlib.h.
3283         * inferiors.c: Likewise.
3284         * linux-low.c: Likewise.
3285         * regcache.c: Likewise.
3286         * spu-low.c: Likewise.
3287         * tracepoint.c: Likewise.
3288         * utils.c: Likewise.
3289
3290 2014-08-07  Gary Benson  <gbenson@redhat.com>
3291
3292         * server.h: Do not include stdio.h.
3293         * linux-low.c: Likewise.
3294         * remote-utils.c: Likewise.
3295         * spu-low.c: Likewise.
3296         * utils.c: Likewise.
3297         * wincecompat.c: Likewise.
3298
3299 2014-08-06  Gary Benson  <gbenson@redhat.com>
3300
3301         * regcache.c (init_register_cache): Move conditionals inside if.
3302
3303 2014-08-06  Gary Benson  <gbenson@redhat.com>
3304
3305         * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
3306
3307 2014-07-31  Gary Benson  <gbenson@redhat.com>
3308
3309         * ax.h: Do not include server.h.
3310         * gdbthread.h: Likewise.
3311         * lynx-low.h: Likewise.
3312         * notif.h: Likewise.
3313
3314 2014-07-30  Gary Benson  <gbenson@redhat.com>
3315
3316         * server.h: Include common-defs.h.
3317         Do not include config.h or build-gnulib-gdbserver/config.h.
3318
3319 2014-07-30  Gary Benson  <gbenson@redhat.com>
3320
3321         * hostio-errno.c: Move server.h to top of includes list.
3322         * inferiors.c: Likewise.
3323         * linux-x86-low.c: Likewise.
3324         * notif.c: Include server.h.
3325
3326 2014-07-24  Tom Tromey  <tromey@redhat.com>
3327             Gary Benson  <gbenson@redhat.com>
3328
3329         * server.h (CORE_ADDR): Now unsigned.
3330
3331 2014-07-16  Pedro Alves  <palves@redhat.com>
3332
3333         * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
3334
3335 2014-07-15  Pedro Alves  <palves@redhat.com>
3336
3337         * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
3338         copy.
3339
3340 2014-07-11  Pedro Alves  <palves@redhat.com>
3341
3342         * linux-low.c (kill_wait_lwp): New function, based on
3343         kill_one_lwp_callback, but use my_waitpid directly.
3344         (kill_one_lwp_callback, linux_kill): Use it.
3345
3346 2014-06-23  Pedro Alves  <palves@redhat.com>
3347
3348         * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
3349         before setting DR0..DR3.
3350
3351 2014-06-20  Gary Benson  <gbenson@redhat.com>
3352
3353         * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
3354         * configure: Regenerated.
3355         * config.in: Likewise.
3356
3357 2014-06-20  Gary Benson  <gbenson@redhat.com>
3358
3359         * Makefile.in (SFILES): Update locations for files moved
3360         from common to nat.
3361         (object file files): Reordered.
3362
3363 2014-06-20  Gary Benson  <gbenson@redhat.com>
3364
3365         * i386-low.h (i386_dr_low_can_set_addr): Removed.
3366         (i386_dr_low_set_addr): Likewise.
3367         (i386_dr_low_get_addr): Likewise.
3368         (i386_dr_low_can_set_control): Likewise.
3369         (i386_dr_low_set_control): Likewise.
3370         (i386_dr_low_get_control): Likewise.
3371         (i386_dr_low_get_status): Likewise.
3372         (i386_get_debug_register_length): Likewise.
3373         * linux-x86-low.c (i386_dr_low_set_addr):
3374         Changed signature.  Made static.
3375         (i386_dr_low_get_addr): Likewise.
3376         (i386_dr_low_set_control): Likewise.
3377         (i386_dr_low_get_control): Likewise.
3378         (i386_dr_low_get_status): Likewise.
3379         (i386_dr_low): New global variable.
3380         * win32-i386-low.c (i386_dr_low_set_addr):
3381         Changed signature.  Made static.
3382         (i386_dr_low_get_addr): Likewise.
3383         (i386_dr_low_set_control): Likewise.
3384         (i386_dr_low_get_control): Likewise.
3385         (i386_dr_low_get_status): Likewise.
3386         (i386_dr_low): New global variable.
3387
3388 2014-06-20  Marcus Shawcroft  <marcus.shawcroft@arm.com>
3389
3390         * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
3391         * Makefile.in (AR, AR_FLAGS): Define.
3392         * configure: Regenerate.
3393
3394 2014-06-19  Gary Benson  <gbenson@redhat.com>
3395
3396         * Makefile.in (i386-dregs.o): New rule.
3397         * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
3398         * i386-low.c (target.h): Remove include.
3399         (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
3400         (DR_CONTROL_SHIFT): Likewise.
3401         (DR_CONTROL_SIZE): Likewise.
3402         (DR_RW_EXECUTE): Likewise.
3403         (DR_RW_WRITE): Likewise.
3404         (DR_RW_READ): Likewise.
3405         (DR_RW_IORW): Likewise.
3406         (DR_LEN_1): Likewise.
3407         (DR_LEN_2): Likewise.
3408         (DR_LEN_4): Likewise.
3409         (DR_LEN_8): Likewise.
3410         (DR_LOCAL_ENABLE_SHIFT): Likewise.
3411         (DR_GLOBAL_ENABLE_SHIFT): Likewise.
3412         (DR_ENABLE_SIZE): Likewise.
3413         (DR_LOCAL_SLOWDOWN): Likewise.
3414         (DR_GLOBAL_SLOWDOWN): Likewise.
3415         (DR_CONTROL_RESERVED): Likewise.
3416         (I386_DR_CONTROL_MASK): Likewise.
3417         (I386_DR_VACANT): Likewise.
3418         (I386_DR_LOCAL_ENABLE): Likewise.
3419         (I386_DR_GLOBAL_ENABLE): Likewise.
3420         (I386_DR_DISABLE): Likewise.
3421         (I386_DR_SET_RW_LEN): Likewise.
3422         (I386_DR_GET_RW_LEN): Likewise.
3423         (I386_DR_WATCH_HIT): Likewise.
3424         (i386_wp_op_t): Likewise.
3425         (i386_show_dr): Likewise.
3426         (i386_length_and_rw_bits): Likewise.
3427         (i386_insert_aligned_watchpoint): Likewise.
3428         (i386_remove_aligned_watchpoint): Likewise.
3429         (i386_handle_nonaligned_watchpoint): Likewise.
3430         i386_update_inferior_debug_regs(): Likewise.
3431         (i386_dr_insert_watchpoint): Likewise.
3432         (i386_dr_remove_watchpoint): Likewise.
3433         (i386_dr_region_ok_for_watchpoint): Likewise.
3434         (i386_dr_stopped_data_address): Likewise.
3435         (i386_dr_stopped_by_watchpoint): Likewise.
3436
3437 2014-06-19  Gary Benson  <gbenson@redhat.com>
3438
3439         * i386-low.c (i386_dr_show): Renamed to
3440         i386_show_dr and made static.  All uses updated.
3441         (i386_dr_length_and_rw_bits): Renamed to
3442         i386_length_and_rw_bits and made static.
3443         All uses updated.
3444         (i386_dr_insert_aligned_watchpoint): Renamed to
3445         i386_insert_aligned_watchpoint and made static.
3446         All uses updated.
3447         (i386_dr_remove_aligned_watchpoint): Renamed to
3448         i386_remove_aligned_watchpoint and made static.
3449         All uses updated.
3450         (i386_dr_update_inferior_debug_regs): Renamed to
3451         i386_update_inferior_debug_regs and made static.
3452         All uses updated.
3453
3454 2014-06-18  Gary Benson  <gbenson@redhat.com>
3455
3456         * i386-low.h (i386_dr_low_can_set_addr): New macro.
3457         (i386_dr_low_can_set_control): Likewise.
3458         (i386_get_debug_register_length): Likewise.
3459         * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
3460         (i386_dr_low_can_set_control): Likewise.
3461         (i386_get_debug_register_length): Likewise.
3462
3463 2014-06-17  Gary Benson  <gbenson@redhat.com>
3464
3465         * i386-low.h (i386-dregs.h): New include.
3466         (DR_FIRSTADDR): Now in i386-dregs.h.
3467         (DR_LASTADDR): Likewise.
3468         (DR_NADDR): Likewise.
3469         (DR_STATUS): Likewise.
3470         (DR_CONTROL): Likewise.
3471         (i386_debug_reg_state): Likewise.
3472         (i386_dr_insert_watchpoint): Likewise.
3473         (i386_dr_remove_watchpoint): Likewise.
3474         (i386_dr_region_ok_for_watchpoint): Likewise.
3475         (i386_dr_stopped_data_address): Likewise.
3476         (i386_dr_stopped_by_watchpoint): Likewise.
3477         * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
3478
3479 2014-06-18  Gary Benson  <gbenson@redhat.com>
3480
3481         * i386-low.h (i386_low_insert_watchpoint): Renamed to
3482         i386_dr_insert_watchpoint.
3483         (i386_low_remove_watchpoint): Renamed to
3484         i386_dr_remove_watchpoint.
3485         (i386_low_region_ok_for_watchpoint): Renamed to
3486         i386_dr_region_ok_for_watchpoint.
3487         (i386_low_stopped_data_address): Renamed to
3488         i386_dr_stopped_data_address.
3489         (i386_low_stopped_by_watchpoint): Renamed to
3490         i386_dr_stopped_by_watchpoint.
3491         * i386-low.c (i386_show_dr): Renamed to
3492         i386_dr_show and made nonstatic.  All uses updated.
3493         (i386_length_and_rw_bits): Renamed to
3494         i386_dr_length_and_rw_bits and made nonstatic.
3495         All uses updated.
3496         (i386_insert_aligned_watchpoint): Renamed to
3497         i386_dr_insert_aligned_watchpoint and made nonstatic.
3498         All uses updated.
3499         (i386_remove_aligned_watchpoint): Renamed to
3500         i386_dr_remove_aligned_watchpoint and made nonstatic.
3501         All uses updated.
3502         (i386_update_inferior_debug_regs): Renamed to
3503         i386_dr_update_inferior_debug_regs and made nonstatic.
3504         All uses updated.
3505         (i386_low_insert_watchpoint): Renamed to
3506         i386_dr_insert_watchpoint.  All uses updated.
3507         (i386_low_remove_watchpoint): Renamed to
3508         i386_dr_remove_watchpoint.  All uses updated.
3509         (i386_low_region_ok_for_watchpoint): Renamed to
3510         i386_dr_region_ok_for_watchpoint.  All uses updated.
3511         (i386_low_stopped_data_address): Renamed to
3512         i386_dr_stopped_data_address.  All uses updated.
3513         (i386_low_stopped_by_watchpoint): Renamed to
3514         i386_dr_stopped_by_watchpoint.  All uses updated.
3515
3516 2014-06-18  Gary Benson  <gbenson@redhat.com>
3517
3518         * i386-low.c (i386_dr_low_can_set_addr): New macro.
3519         (i386_dr_low_can_set_control): Likewise.
3520         (i386_insert_aligned_watchpoint): New check.
3521
3522 2014-06-18  Gary Benson  <gbenson@redhat.com>
3523
3524         * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
3525         Renamed to state.
3526
3527 2014-06-18  Gary Benson  <gbenson@redhat.com>
3528
3529         * i386-low.c (i386_length_and_rw_bits): Use internal_error
3530         instead of fatal and error.
3531         (i386_handle_nonaligned_watchpoint): Likewise.
3532
3533 2014-06-18  Gary Benson  <gbenson@redhat.com>
3534
3535         * i386-low.c (i386_get_debug_register_length): New macro.
3536         (TARGET_HAS_DR_LEN_8): Remove conditional.  Use above macro.
3537         (i386_show_dr): Use debug_printf instead of fprintf.  Use
3538         phex to format values.
3539
3540 2014-06-18  Gary Benson  <gbenson@redhat.com>
3541
3542         * i386-low.h: Comment changes.
3543         * i386-low.c: Likewise.
3544
3545 2014-06-18  Gary Benson  <gbenson@redhat.com>
3546
3547         * i386-low.c: Whitespace changes.
3548
3549 2014-06-12  Tom Tromey  <tromey@redhat.com>
3550
3551         * utils.c (freeargv): Remove.
3552
3553 2014-06-12  Tom Tromey  <tromey@redhat.com>
3554
3555         * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3556         * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3557         (parse_debug_format_options): Likewise.
3558         (gdbserver_usage): Likewise.
3559         * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3560         (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3561         (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3562         against libiberty.
3563         ($(LIBGNU)): Depend on libiberty.
3564         (all-lib): Recurse into all subdirs.
3565         (install-only): Invoke "install" target in subdirs.
3566         (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3567         targets.
3568         * configure: Rebuild.
3569         * configure.ac: Add ACX_CONFIGURE_DIR for libiberty.  Don't check
3570         for vasprintf, vsnprintf, or gettimeofday.
3571         * configure.srv: Don't add safe-ctype.o or lbasename.o to
3572         srv_tgtobj.
3573
3574 2014-06-05  Joel Brobecker  <brobecker@adacore.com>
3575
3576         * development.sh: Delete.
3577         * Makefile.in (config.status): Adjust dependency on development.sh.
3578         * configure.ac: Adjust development.sh source call.
3579         * configure: Regenerate.
3580
3581 2014-06-02  Pedro Alves  <palves@redhat.com>
3582
3583         * ax.c (gdb_free_agent_expr): New function.
3584         * ax.h (gdb_free_agent_expr): New declaration.
3585         * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3586         list.
3587         (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3588         static.
3589         (clear_breakpoint_conditions_and_commands): New function.
3590         * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3591         (clear_breakpoint_conditions_and_commands): New declaration.
3592
3593 2014-05-23  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
3594
3595         * linux-aarch64-low.c (asm/ptrace.h): Include.
3596
3597 2014-05-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
3598
3599         Fix TLS access for -static -pthread.
3600         * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3601         (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3602         (thread_db_load_search, try_thread_db_load_1): Initialize it.
3603
3604 2014-05-20  Pedro Alves  <palves@redhat.com>
3605
3606         * linux-aarch64-low.c (aarch64_insert_point)
3607         (aarch64_remove_point): No longer check whether the type is
3608         supported here.  Adjust to new interface.
3609         (the_low_target): Install aarch64_supports_z_point_type as
3610         supports_z_point_type method.
3611         * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3612         (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3613         instead of a Z packet char.  Adjust.
3614         (arm_supports_z_point_type): New function.
3615         (arm_insert_point, arm_remove_point): Adjust to new interface.
3616         (the_low_target): Install arm_supports_z_point_type.
3617         * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3618         (cris_insert_point, cris_remove_point): Adjust to new interface.
3619         Don't check whether the type is supported here.
3620         (the_low_target): Install cris_supports_z_point_type.
3621         * linux-low.c (linux_supports_z_point_type): New function.
3622         (linux_insert_point, linux_remove_point): Adjust to new interface.
3623         * linux-low.h (struct linux_target_ops) <insert_point,
3624         remove_point>: Take an enum raw_bkpt_type instead of a char.  Add
3625         raw_breakpoint pointer parameter.
3626         <supports_z_point_type>: New method.
3627         * linux-mips-low.c (mips_supports_z_point_type): New function.
3628         (mips_insert_point, mips_remove_point): Adjust to new interface.
3629         Use mips_supports_z_point_type.
3630         (the_low_target): Install mips_supports_z_point_type.
3631         * linux-ppc-low.c (the_low_target): Install NULL as
3632         supports_z_point_type method.
3633         * linux-s390-low.c (the_low_target): Install NULL as
3634         supports_z_point_type method.
3635         * linux-sparc-low.c (the_low_target): Install NULL as
3636         supports_z_point_type method.
3637         * linux-x86-low.c (x86_supports_z_point_type): New function.
3638         (x86_insert_point): Adjust to new insert_point interface.  Use
3639         insert_memory_breakpoint.  Adjust to new
3640         i386_low_insert_watchpoint interface.
3641         (x86_remove_point): Adjust to remove_point interface.  Use
3642         remove_memory_breakpoint.  Adjust to new
3643         i386_low_remove_watchpoint interface.
3644         (the_low_target): Install x86_supports_z_point_type.
3645         * lynx-low.c (lynx_target_ops): Install NULL as
3646         supports_z_point_type callback.
3647         * nto-low.c (nto_supports_z_point_type): New.
3648         (nto_insert_point, nto_remove_point): Adjust to new interface.
3649         (nto_target_ops): Install nto_supports_z_point_type.
3650         * mem-break.c: Adjust intro comment.
3651         (struct raw_breakpoint) <raw_type, size>: New fields.
3652         <inserted>: Update comment.
3653         <shlib_disabled>: Delete field.
3654         (enum bkpt_type) <gdb_breakpoint>: Delete value.
3655         <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3656         gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3657         (raw_bkpt_type_to_target_hw_bp_type): New function.
3658         (find_enabled_raw_code_breakpoint_at): New function.
3659         (find_raw_breakpoint_at): New type and size parameters.  Use them.
3660         (insert_memory_breakpoint): New function, based off
3661         set_raw_breakpoint_at.
3662         (remove_memory_breakpoint): New function.
3663         (set_raw_breakpoint_at): Reimplement.
3664         (set_breakpoint): New, based on set_breakpoint_at.
3665         (set_breakpoint_at): Reimplement.
3666         (delete_raw_breakpoint): Go through the_target->remove_point
3667         instead of assuming memory breakpoints.
3668         (find_gdb_breakpoint_at): Delete.
3669         (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3670         (find_gdb_breakpoint): New function.
3671         (set_gdb_breakpoint_at): Delete.
3672         (z_type_supported): New function.
3673         (set_gdb_breakpoint_1): New function, loosely based off
3674         set_gdb_breakpoint_at.
3675         (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3676         (delete_gdb_breakpoint_at): Delete.
3677         (delete_gdb_breakpoint_1): New function, loosely based off
3678         delete_gdb_breakpoint_at.
3679         (delete_gdb_breakpoint): New function.
3680         (clear_gdb_breakpoint_conditions): Rename to ...
3681         (clear_breakpoint_conditions): ... this.  Don't handle a NULL
3682         breakpoint.
3683         (add_condition_to_breakpoint): Make static.
3684         (add_breakpoint_condition): Take a struct breakpoint pointer
3685         instead of an address.  Adjust.
3686         (gdb_condition_true_at_breakpoint): Rename to ...
3687         (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3688         z_type parameter.
3689         (gdb_condition_true_at_breakpoint): Reimplement.
3690         (add_breakpoint_commands): Take a struct breakpoint pointer
3691         instead of an address.  Adjust.
3692         (gdb_no_commands_at_breakpoint): Rename to ...
3693         (gdb_no_commands_at_breakpoint_z_type): ... this.  Add z_type
3694         parameter.  Return true if no breakpoint was found.  Change debug
3695         output.
3696         (gdb_no_commands_at_breakpoint): Reimplement.
3697         (run_breakpoint_commands): Rename to ...
3698         (run_breakpoint_commands_z_type): ... this.  Add z_type parameter,
3699         and change return type to boolean.
3700         (run_breakpoint_commands): New function.
3701         (gdb_breakpoint_here): Also check for Z1 breakpoints.
3702         (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3703         breakpoint.  Go through the_target->remove_point instead of
3704         assuming memory breakpoint.
3705         (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3706         software and hardware breakpoints.
3707         (reinsert_raw_breakpoint): Go through the_target->insert_point
3708         instead of assuming memory breakpoint.
3709         (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3710         software and hardware breakpoints.
3711         (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3712         Check both software and hardware breakpoints.
3713         (validate_inserted_breakpoint): Assert the breakpoint is a
3714         software breakpoint.  Set the inserted flag to -1 instead of
3715         setting shlib_disabled.
3716         (delete_disabled_breakpoints): Adjust.
3717         (validate_breakpoints): Only validate software breakpoints.
3718         Adjust to inserted flag change.
3719         (check_mem_read, check_mem_write): Skip breakpoint types other
3720         than software breakpoints.  Adjust to inserted flag change.
3721         * mem-break.h (enum raw_bkpt_type): New enum.
3722         (raw_breakpoint, struct process_info): Forward declare.
3723         (Z_packet_to_target_hw_bp_type): Delete declaration.
3724         (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3725         (set_gdb_breakpoint, delete_gdb_breakpoint)
3726         (clear_breakpoint_conditions): New declarations.
3727         (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3728         (breakpoint_inserted_here): Update comment.
3729         (add_breakpoint_condition, add_breakpoint_commands): Replace
3730         address parameter with a breakpoint pointer parameter.
3731         (gdb_breakpoint_here): Update comment.
3732         (delete_gdb_breakpoint_at): Delete.
3733         (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3734         * server.c (process_point_options): Take a struct breakpoint
3735         pointer instead of an address.  Adjust.
3736         (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3737         delete_gdb_breakpoint.
3738         * spu-low.c (spu_target_ops): Install NULL as
3739         supports_z_point_type method.
3740         * target.h: Include mem-break.h.
3741         (struct target_ops) <prepare_to_access_memory>: Update comment.
3742         <supports_z_point_type>: New field.
3743         <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3744         instead of a char.  Also take a raw breakpoint pointer.
3745         * win32-arm-low.c (the_low_target): Install NULL as
3746         supports_z_point_type.
3747         * win32-i386-low.c (i386_supports_z_point_type): New function.
3748         (i386_insert_point, i386_remove_point): Adjust to new interface.
3749         (the_low_target): Install i386_supports_z_point_type.
3750         * win32-low.c (win32_supports_z_point_type): New function.
3751         (win32_insert_point, win32_remove_point): Adjust to new interface.
3752         (win32_target_ops): Install win32_supports_z_point_type.
3753         * win32-low.h (struct win32_target_ops):
3754         <supports_z_point_type>: New method.
3755         <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3756         instead of a char.  Also take a raw breakpoint pointer.
3757
3758 2014-05-20  Pedro Alves  <palves@redhat.com>
3759
3760         * mem-break.h: Include break-common.h.
3761         (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3762         (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3763         (Z_packet_to_target_hw_bp_type): New declaration.
3764         * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3765         * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3766         (Z_PACKET_ACCESS_WP): Delete macros.
3767         (Z_packet_to_hw_type): Delete function.
3768         * i386-low.h: Don't include break-common.h here.
3769         (Z_packet_to_hw_type): Delete declaration.
3770         * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3771         Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3772         * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3773         Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3774         * linux-aarch64-low.c: Don't include break-common.h here.
3775         (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3776         (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3777         (Z_packet_to_target_hw_bp_type): Delete function.
3778         * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3779         function.
3780         (mips_insert_point, mips_remove_point): Use
3781         Z_packet_to_target_hw_bp_type.
3782
3783 2014-05-20  Pedro Alves  <palves@redhat.com>
3784
3785         * linux-aarch64-low.c: Include break-common.h.
3786         (enum target_point_type): Delete.
3787         (Z_packet_to_point_type): Rename to ...
3788         (Z_packet_to_target_hw_bp_type): ... this, and return a
3789         target_hw_bp_type instead.
3790         (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3791         instead of an enum target_point_type.
3792         (aarch64_point_encode_ctrl_reg): Likewise.  Compute type mask from
3793         breakpoint type.
3794         (aarch64_dr_state_insert_one_point)
3795         (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3796         (aarch64_handle_aligned_watchpoint)
3797         (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3798         Take an enum target_hw_bp_type instead of an enum
3799         target_point_type.
3800         (aarch64_supports_z_point_type): New function.
3801         (aarch64_insert_point, aarch64_remove_point): Use it.  Adjust to
3802         use Z_packet_to_target_hw_bp_type.
3803
3804 2014-05-20  Joel Brobecker  <brobecker@adacore.com>
3805
3806         * configure.ac: Only use -Werror by default when DEVELOPMENT
3807         is true.
3808         * configure: Regenerate.
3809
3810 2014-05-19  Jan Kratochvil  <jan.kratochvil@redhat.com>
3811
3812         Fix gdbserver qGetTLSAddr for x86_64 -m32.
3813         * linux-x86-low.c (X86_64_USER_REGS): New.
3814         (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3815
3816 2014-04-28  Yao Qi  <yao@codesourcery.com>
3817
3818         * Makefile.in (i386-avx512.c): Fix the typo of generated file
3819         name.
3820
3821 2014-04-25  Pedro Alves  <palves@redhat.com>
3822
3823         PR server/16255
3824         * linux-low.c (linux_attach_fail_reason_string): New function.
3825         (linux_attach_lwp): Delete.
3826         (linux_attach_lwp_1): Rename to ...
3827         (linux_attach_lwp): ... this.  Take a ptid instead of a pid as
3828         argument.  Remove "initial" parameter.  Return int instead of
3829         void.  Don't error or warn here.
3830         (linux_attach): Adjust to call linux_attach_lwp.  Call error on
3831         failure to attach to the tgid.  Call warning when failing to
3832         attach to an lwp.
3833         * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3834         argument.  Remove "initial" parameter.  Return int instead of
3835         void.  Don't error or warn here.
3836         (linux_attach_fail_reason_string): New declaration.
3837         * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3838         interface change.  Use linux_attach_fail_reason_string.
3839
3840 2014-04-24  Michael Sturm  <michael.sturm@mintel.com>
3841             Walfred Tedeschi  <walfred.tedeschi@intel.com>
3842
3843         * Makefile.in: Added rules to handle new files
3844         i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3845         amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3846         * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3847         (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3848         (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3849         (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3850         x32-avx512-linux.o.
3851         (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3852         (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3853         (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3854         i386/x32-avx512.xml.
3855         (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3856         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3857         i386/x32-avx512-linux.xml.
3858         * i387-fp.c (num_avx512_k_registers): New constant for number
3859         of K registers.
3860         (num_avx512_zmmh_low_registers): New constant for number of
3861         lower ZMM registers (0-15).
3862         (num_avx512_zmmh_high_registers): New constant for number of
3863         higher ZMM registers (16-31).
3864         (num_avx512_ymmh_registers): New contant for number of higher
3865         YMM registers (ymm16-31 added by avx521 on x86_64).
3866         (num_avx512_xmm_registers): New constant for number of higher
3867         XMM registers (xmm16-31 added by AVX512 on x86_64).
3868         (struct i387_xsave): Add space for AVX512 registers.
3869         (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3870         Add code to handle AVX512 registers.
3871         (i387_xsave_to_cache): Add code to handle AVX512 registers.
3872         * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3873         prototypei from generated file.
3874         (tdesc_amd64_avx512_linux): Likewise.
3875         (init_registers_x32_avx512_linux): Likewise.
3876         (tdesc_x32_avx512_linux): Likewise.
3877         (init_registers_i386_avx512_linux): Likewise.
3878         (tdesc_i386_avx512_linux): Likewise.
3879         (x86_64_regmap): Add AVX512 registers.
3880         (x86_linux_read_description): Add code to handle AVX512 XSTATE
3881         mask.
3882         (initialize_low_arch): Add code to initialize AVX512 registers.
3883
3884 2014-04-23  Pedro Alves  <palves@redhat.com>
3885
3886         * mem-break.c (find_gdb_breakpoint_at): Make static.
3887         * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3888
3889 2014-04-23  Pedro Alves  <palves@redhat.com>
3890
3891         * i386-low.c: Don't include break-common.h here.
3892         (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3893         prototype to take target_hw_bp_type as argument instead of a Z
3894         packet char.
3895         * i386-low.h: Include break-common.h here.
3896         (Z_packet_to_hw_type): Declare.
3897         (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3898         prototypes.
3899         * linux-x86-low.c (x86_insert_point): Convert the packet number to
3900         a target_hw_bp_type before calling i386_low_insert_watchpoint.
3901         (x86_remove_point): Convert the packet number to a
3902         target_hw_bp_type before calling i386_low_remove_watchpoint.
3903         * win32-i386-low.c (i386_insert_point): Convert the packet number
3904         to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3905         (i386_remove_point): Convert the packet number to a
3906         target_hw_bp_type before calling i386_low_remove_watchpoint.
3907
3908 2014-04-23  Pedro Alves  <palves@redhat.com>
3909
3910         * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3911
3912 2014-04-10  Pedro Alves  <palves@redhat.com>
3913
3914         * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3915         Check if the condition or command is NULL before checking if the
3916         breakpoint is known.  On success, return true.
3917         * mem-break.h (add_breakpoint_condition): Document return.
3918         (add_breakpoint_commands): Add describing comment.
3919         * server.c (skip_to_semicolon): New function.
3920         (process_point_options): Use it.
3921
3922 2014-04-09  Pedro Alves  <palves@redhat.com>
3923
3924         * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3925         to lwpid_of.
3926
3927 2014-02-27  Pedro Alves  <palves@redhat.com>
3928
3929         PR 12702
3930         * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3931         macros.
3932         * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3933         output.
3934         (last_thread_of_process_p): Take a PID argument instead of a
3935         thread pointer.
3936         (linux_wait_for_lwp): Delete.
3937         (num_lwps, check_zombie_leaders, not_stopped_callback): New
3938         functions.
3939         (linux_low_filter_event): New function, party factored out from
3940         linux_wait_for_event.
3941         (linux_wait_for_event): Rename to ...
3942         (linux_wait_for_event_filtered): ... this.  Add new filter ptid
3943         argument.  Partly rewrite.  Always use waitpid(-1, WNOHANG) and
3944         sigsuspend.  Check for zombie leaders.
3945         (linux_wait_for_event): Reimplement as wrapper around
3946         linux_wait_for_event_filtered.
3947         (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED.  Assume that if
3948         a normal or signal exit is seen, it's the whole process exiting.
3949         (wait_for_sigstop): No longer a for_each_inferior callback.
3950         Rewrite on top of linux_wait_for_event_filtered.
3951         (stop_all_lwps): Call wait_for_sigstop directly.
3952         * server.c (resume, handle_target_event): Handle
3953         TARGET_WAITKIND_NO_RESUMED.
3954
3955 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
3956
3957         * win32-low.c (psapi_get_dll_name,
3958         * win32_CreateToolhelp32Snapshot): Delete.
3959         (win32_CreateToolhelp32Snapshot, win32_Module32First)
3960         (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3961         Delete.
3962         (handle_load_dll): Add function description.
3963         Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3964
3965 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
3966
3967         * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3968         Add comment.
3969         (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3970         base address when calling win32_add_one_solib.
3971         (handle_load_dll): Delete local variable load_addr.
3972         Remove 0x1000 offset applied to DLL base address when calling
3973         win32_add_one_solib.
3974         (handle_unload_dll): Add comment.
3975
3976 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
3977
3978         * win32-low.c (win32_add_all_dlls): Renames
3979         win32_ensure_ntdll_loaded.  Rewrite function documentation.
3980         Adjust implementation to always load all DLLs.
3981         Add 0x1000 offset to DLL base address when calling
3982         win32_add_one_solib.
3983         (child_initialization_done): New static global.
3984         (do_initial_child_stuff): Set child_initialization_done to
3985         zero during child initialization, and 1 after.  Replace call
3986         to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3987         Add comment.
3988         (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3989         (handle_unload_dll): Add function documentation.
3990         (get_child_debug_event): Ignore load and unload DLL events
3991         during child initialization.
3992
3993 2014-02-20  Doug Evans  <dje@google.com>
3994
3995         Remove global all_lwps.
3996         * inferiors.h (ptid_of): Move here from linux-low.h.
3997         (pid_of, lwpid_of): Ditto.
3998         * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3999         parameter is a struct thread_info * now.
4000         (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
4001         directly.  Pass &all_threads to find_inferior instead of &all_lwps.
4002         (aarch64_stopped_data_address): Fetch lwpid from current_inferior
4003         directly.
4004         (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
4005         (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
4006         * linux-arm-low.c (update_registers_callback): Update, "entry"
4007         parameter is a struct thread_info * now.
4008         Fetch lwpid from current_inferior directly.
4009         (arm_insert_point): Pass &all_threads to find_inferior instead of
4010         &all_lwps.
4011         (arm_remove_point): Ditto.
4012         (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
4013         (arm_prepare_to_resume): Fetch pid from thread.
4014         (arm_read_description): Fetch lwpid from current_inferior directly.
4015         * linux-low.c (all_lwps): Delete.
4016         (delete_lwp): Delete call to remove_inferior.
4017         (handle_extended_wait): Fetch lwpid from thread.
4018         (add_lwp): Don't set lwp->entry.id.  Remove call to
4019         add_inferior_to_list.
4020         (linux_attach_lwp_1): Fetch pid from current_inferior directly.
4021         (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
4022         (kill_one_lwp_callback): Ditto.
4023         (linux_kill): Don't dereference NULL pointer.
4024         Fetch ptid,lwpid from thread.
4025         (get_detach_signal): Fetch ptid from thread.
4026         (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
4027         Simplify call to regcache_invalidate_thread.
4028         (delete_lwp_callback): Update, "entry" parameter is a
4029         struct thread_info * now.  Fetch pid from thread.
4030         (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
4031         (status_pending_p_callback): Update, "entry" parameter is a
4032         struct thread_info * now.  Fetch ptid from thread.
4033         (find_lwp_pid): Update, "entry" parameter is a
4034         struct thread_info * now.
4035         (linux_wait_for_lwp): Fetch pid from thread.
4036         (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
4037         (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
4038         (enqueue_one_deferred_signal): Fetch lwpid from thread.
4039         (dequeue_one_deferred_signal): Ditto.
4040         (cancel_breakpoint): Fetch ptid from current_inferior.
4041         (linux_wait_for_event): Pass &all_threads to find_inferior,
4042         not &all_lwps.  Fetch ptid, lwpid from thread.
4043         (count_events_callback): Update, "entry" parameter is a
4044         struct thread_info * now.
4045         (select_singlestep_lwp_callback): Ditto.
4046         (select_event_lwp_callback): Ditto.
4047         (cancel_breakpoints_callback): Ditto.
4048         (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
4049         not &all_lwps.
4050         (select_event_lwp): Ditto.  Fetch ptid from event_thread.
4051         (unsuspend_one_lwp): Update, "entry" parameter is a
4052         struct thread_info * now.
4053         (unsuspend_all_lwps): Pass &all_threads to find_inferior,
4054         not &all_lwps.
4055         (linux_stabilize_threads): Ditto.  And for for_each_inferior.
4056         Fetch lwpid from thread, not lwp.
4057         (linux_wait_1): Fetch ptid, lwpid from current_inferior.
4058         Pass &all_threads to find_inferior, not &all_lwps.
4059         (send_sigstop): Fetch lwpid from thread, not lwp.
4060         (send_sigstop_callback): Update, "entry" parameter is a
4061         struct thread_info * now.
4062         (suspend_and_send_sigstop_callback): Ditto.
4063         (wait_for_sigstop): Ditto.  Fetch ptid, lwpid from thread, lwp.
4064         (stuck_in_jump_pad_callback): Update, "entry" parameter is a
4065         struct thread_info * now.
4066         (move_out_of_jump_pad_callback): Ditto.  Fetch ptid, lwpid
4067         from thread, lwp.
4068         (lwp_running): Update, "entry" parameter is a
4069         struct thread_info * now.
4070         (stop_all_lwps): Fetch ptid from thread.
4071         Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
4072         (linux_resume_one_lwp): Fetch lwpid from thread.
4073         (linux_set_resume_request): Update, "entry" parameter is a
4074         struct thread_info * now.  Fetch pid, lwpid from thread.
4075         (resume_status_pending_p): Update, "entry" parameter is a
4076         struct thread_info * now.
4077         (need_step_over_p): Ditto.  Fetch lwpid from thread.
4078         (start_step_over): Fetch lwpid from thread.
4079         (linux_resume_one_thread): Update, "entry" parameter is a
4080         struct thread_info * now.  Fetch lwpid from thread.
4081         (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
4082         (proceed_one_lwp): Update, "entry" parameter is a
4083         struct thread_info * now.  Fetch lwpid from thread.
4084         (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
4085         struct thread_info * now.
4086         (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
4087         (unstop_all_lwps): Ditto.  Fetch lwpid from thread.
4088         (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
4089         directly.
4090         (regsets_store_inferior_registers): Ditto.
4091         (fetch_register, store_register): Ditto.
4092         (linux_read_memory, linux_write_memory): Ditto.
4093         (linux_request_interrupt): Ditto.
4094         (linux_read_auxv): Ditto.
4095         (linux_xfer_siginfo): Ditto.
4096         (linux_qxfer_spu): Ditto.
4097         (linux_qxfer_libraries_svr4): Ditto.
4098         * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
4099         moved to inferiors.h.
4100         (get_lwp): Delete.
4101         (get_thread_lwp): Update.
4102         (struct lwp_info): Delete member "entry".  Simplify comment for
4103         member "thread".
4104         (all_lwps): Delete.
4105         * linux-mips-low.c (mips_read_description): Fetch lwpid from
4106         current_inferior directly.
4107         (update_watch_registers_callback): Update, "entry" parameter is a
4108         struct thread_info * now.  Fetch pid from thread.
4109         (mips_linux_prepare_to_resume): Fetch ptid from thread.
4110         (mips_insert_point): Fetch lwpid from current_inferior.
4111         Pass &all_threads to find_inferior, not &all_lwps.
4112         (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
4113         (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
4114         directly.
4115         (mips_stopped_data_address): Ditto.
4116         * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
4117         directly.
4118         * linux-tile-low.c (tile_arch_setup): Ditto.
4119         * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
4120         (update_debug_registers_callback): Update, "entry" parameter is a
4121         struct thread_info * now.  Fetch pid from thread.
4122         (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
4123         Pass &all_threads to find_inferior, not &all_lwps.
4124         (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
4125         (i386_dr_low_set_control): Fetch pid from current_inferior directly.
4126         Pass &all_threads to find_inferior, not &all_lwps.
4127         (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
4128         (i386_dr_low_get_status): Ditto.
4129         (x86_linux_prepare_to_resume): Fetch ptid from thread.
4130         (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
4131         (x86_linux_read_description): Ditto.
4132         * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
4133
4134 2014-02-20  Doug Evans  <dje@google.com>
4135
4136         * inferiors.c (get_first_inferior): Fix buglet.
4137
4138 2014-02-19  Doug Evans  <dje@google.com>
4139
4140         * gdbthread.h (add_thread): Change result type to struct thread_info *.
4141         * inferiors.c (add_thread): Change result type to struct thread_info *.
4142         All callers updated.
4143         (add_lwp): Call add_thread here instead of in callers.
4144         All callers updated.
4145         * linux-low.h (get_lwp_thread): Rewrite.
4146         (struct lwp_info): New member "thread".
4147
4148 2014-02-19  Doug Evans  <dje@google.com>
4149
4150         * linux-low.c (add_lwp): Change result to struct lwp_info *.
4151         All callers updated.
4152
4153 2014-02-19  Doug Evans  <dje@google.com>
4154
4155         * inferiors.c (add_thread): Fix whitespace.
4156
4157 2014-02-19  Doug Evans  <dje@google.com>
4158
4159         * dll.c (clear_dlls): Replace accessing list implemention details
4160         with API function.
4161         * gdbthread.h (get_first_thread): Declare.
4162         * inferiors.c (for_each_inferior_with_data): New function.
4163         (get_first_thread): New function.
4164         (find_thread_ptid): Simplify.
4165         (get_first_inferior): New function.
4166         (clear_list): Delete.
4167         (one_inferior_p): New function.
4168         (clear_inferior_list): New function.
4169         (clear_inferiors): Update.
4170         * inferiors.h (for_each_inferior_with_data): Declare.
4171         (clear_inferior_list): Declare.
4172         (one_inferior_p): Declare.
4173         (get_first_inferior): Declare.
4174         * linux-low.c (linux_wait_for_event): Replace accessing list
4175         implemention details with API function.
4176         * server.c (target_running): Ditto.
4177         (accumulate_file_name_length): New function.
4178         (emit_dll_description): New function.
4179         (handle_qxfer_libraries): Replace accessing list implemention
4180         details with API function.
4181         (handle_qxfer_threads_worker): New function.
4182         (handle_qxfer_threads_proper): Replace accessing list implemention
4183         details with API function.
4184         (handle_query): Ditto.
4185         (visit_actioned_threads_callback_ftype): New typedef.
4186         (visit_actioned_threads_data): New struct.
4187         (visit_actioned_threads): Rewrite to be find_inferior callback.
4188         (resume): Call find_inferior.
4189         (handle_status): Replace accessing list implemention
4190         details with API function.
4191         (process_serial_event): Replace accessing list implemention details
4192         with API function.
4193         * target.c (set_desired_inferior): Replace accessing list implemention
4194         details with API function.
4195         * tracepoint.c (same_process_p): New function.
4196         (gdb_agent_about_to_close): Replace accessing list implemention
4197         details with API function.
4198         * win32-low.c (child_delete_thread): Replace accessing list
4199         implemention details with API function.
4200         (match_dll_by_basename): New function.
4201         (dll_is_loaded_by_basename): New function.
4202         (win32_ensure_ntdll_loaded): Replace accessing list implemention
4203         details call to dll_is_loaded_by_basename.
4204
4205 2014-02-19  Doug Evans  <dje@google.com>
4206
4207         * dll.h (struct dll_info): Add comment.
4208         * gdbthread.h (struct thread_info): Add comment.
4209         (current_ptid): Simplify.
4210         * inferiors.c (add_process): Update.
4211         (remove_process): Update.
4212         * inferiors.h (struct process_info): Rename member "head" to "entry".
4213         * linux-low.c (delete_lwp): Update.
4214         (add_lwp): Update.
4215         (last_thread_of_process_p): Update.
4216         (kill_one_lwp_callback, linux_kill): Update.
4217         (status_pending_p_callback): Update.
4218         (wait_for_sigstop): Update.  Simplify read of ptid.
4219         (start_step_over): Update.
4220         * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
4221         (get_lwp_thread): Update.
4222         (struct lwp_info): Rename member "head" to "entry".
4223         * regcache.h (inferior_list_entry): Delete.
4224         * server.c (kill_inferior_callback): Update.
4225         (detach_or_kill_inferior_callback): Update.
4226         (print_started_pid): Update.
4227         (print_attached_pid): Update.
4228         (process_serial_event): Simplify read of ptid.
4229         * thread-db.c (thread_db_create_event): Update.
4230         (thread_db_get_tls_address): Update.
4231         * win32-low.c (current_inferior_ptid): Simplify.
4232
4233 2014-02-19  Tom Tromey  <tromey@redhat.com>
4234
4235         * target.h (struct target_ops) <supports_btrace>: Add target_ops
4236         argument.
4237         (target_supports_btrace): Update.
4238
4239 2014-02-14  Yao Qi  <yao@codesourcery.com>
4240
4241         * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
4242         (rsp-low-ipa.o): New target.
4243
4244 2014-02-12  Tom Tromey  <tromey@redhat.com>
4245
4246         * ax.c (gdb_parse_agent_expr): Use hex2bin, not
4247         convert_ascii_to_int.
4248         * regcache.c (registers_to_string): Likewise.
4249         * remote-utils.c (decode_M_packet): Likewise.
4250         * server.c (process_serial_event): Likewise.
4251
4252 2014-02-12  Tom Tromey  <tromey@redhat.com>
4253
4254         * server.c (handle_query, handle_v_run): Use hex2bin, not
4255         unhexify.
4256         * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
4257
4258 2014-02-12  Tom Tromey  <tromey@redhat.com>
4259
4260         * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
4261         convert_int_to_ascii.
4262         * regcache.c (registers_to_string, collect_register_as_string):
4263         Likewise.
4264         * remote-utils.c (look_up_one_symbol, relocate_instruction):
4265         Likewise.
4266         * server.c (process_serial_event): Likewise.
4267         * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
4268         (cmd_qtbuffer, cstr_to_hexstr): Likewise.
4269
4270 2014-02-12  Tom Tromey  <tromey@redhat.com>
4271
4272         * remote-utils.c (look_up_one_symbol, monitor_output): Use
4273         bin2hex, not hexify.
4274         * tracepoint.c (cmd_qtstatus): Likewise.
4275
4276 2014-02-12  Tom Tromey  <tromey@redhat.com>
4277
4278         * remote-utils.c (monitor_output): Pass explicit length to
4279         hexify.
4280
4281 2014-02-12  Tom Tromey  <tromey@redhat.com>
4282
4283         * tracepoint.c: Include rsp-low.h.
4284         * server.c: Include rsp-low.h.
4285         * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
4286         (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
4287         declare.
4288         * remote-utils.c: Include rsp-low.h.
4289         (fromhex, hexchars, ishex, unhexify, tohex, hexify)
4290         (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
4291         (convert_int_to_ascii, convert_ascii_to_int): Move to
4292         common/rsp-low.c.
4293         * regcache.c: Include rsp-low.h.
4294         * ax.c: Include rsp-low.h.
4295         * Makefile.in (SFILES): Add common/rsp-low.c.
4296         (OBS): Add rsp-low.o.
4297         (rsp-low.o): New target.
4298
4299 2014-02-12  Tom Tromey  <tromey@redhat.com>
4300
4301         * utils.h (pulongest, plongest, phex_nz): Don't declare.
4302         Include print-utils.h.
4303         * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
4304         (plongest, thirty_two, phex_nz): Remove.
4305         * Makefile.in (SFILES): Add common/print-utils.c.
4306         (OBS): Add print-utils.o.
4307         (print-utils-ipa.o): New target.
4308         (print-utils.o): New target.
4309         (IPA_OBJS): Add print-utils-ipa.o.
4310
4311 2014-02-06  Tom Tromey  <tromey@redhat.com>
4312
4313         * Makefile.in (SFILES): Fix indentation.
4314
4315 2014-02-05  Doug Evans  <dje@google.com>
4316
4317         * linux-low.c (linux_wait_for_event): Improve comment.
4318         (linux_wait_1): Keep current_inferior in sync with event_child.
4319
4320 2014-01-22  Doug Evans  <dje@google.com>
4321
4322         * gdbthread.h (gdb_id_to_thread): Delete, unused.
4323
4324 2014-01-22  Doug Evans  <dje@google.com>
4325
4326         * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
4327         * configure: Regenerate.
4328         * config.in: Regenerate.
4329         * Makefile.in (SFILES): Add debug.c.
4330         (OBS): Add debug.o.
4331         * debug.c: New file.
4332         * debug.h: New file.
4333         * linux-aarch64-low.c (*): Update all debugging printfs to use
4334         debug_printf instead of fprintf.
4335         * linux-arm-low.c (*): Ditto.
4336         * linux-cris-low.c (*): Ditto.
4337         * linux-crisv32-low.c (*): Ditto.
4338         * linux-m32r-low.c (*): Ditto.
4339         * linux-sparc-low.c (*): Ditto.
4340         * linux-x86.c (*): Ditto.
4341         * linux-low.c (*): Ditto.
4342         (linux_wait_1): Add calls to debug_enter, debug_exit.
4343         (linux_wait): Remove redundant debugging printf.
4344         (stop_all_lwps): Add calls to debug_enter, debug_exit.
4345         (linux_resume, unstop_all_lwps): Ditto.
4346         * mem-break.c (*): Update all debugging printfs to use
4347         debug_printf instead of fprintf.
4348         * remote-utils.c (*): Ditto.
4349         * thread-db.c (*): Ditto.
4350         * server.c #include <ctype.h>, "gdb_vecs.h".
4351         (debug_threads): Moved to debug.c.
4352         (*): Update all debugging printfs to use debug_printf instead of
4353         fprintf.
4354         (start_inferior): Replace call to fflush with call to debug_flush.
4355         (monitor_show_help): Mention set debug-format.
4356         (parse_debug_format_options): New function.
4357         (handle_monitor_command): Handle "monitor set debug-format".
4358         (gdbserver_usage): Mention --debug-format.
4359         (main): Parse --debug-format.
4360         * server.h (debug_threads): Declaration moved to debug.h.
4361         #include "debug.h".
4362         * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
4363         trace_debug_1 that uses debug_printf.
4364         (tracepoint_look_up_symbols): Update all debugging printfs to use
4365         debug_printf instead of fprintf.
4366
4367 2014-01-20  Baruch Siach  <baruch@tkos.co.il>
4368
4369         * linux-xtensa-low.c: Include asm/ptrace.h instead of
4370         sys/ptrace.h.
4371
4372 2014-01-17  Pedro Alves  <palves@redhat.com>
4373
4374         PR build/16445
4375         * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
4376         defined after including gdb_proc_service.h.
4377
4378 2014-01-16  Doug Evans  <dje@google.com>
4379
4380         * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
4381         (match_dll): Use it.
4382
4383 2014-01-16  Markus Metzger  <markus.t.metzger@intel.com>
4384
4385         * target.h (target_ops) <read_btrace>: Change parameters and
4386         return type to allow error reporting.
4387         * server.c (handle_qxfer_btrace): Support delta reads.  Pass
4388         trace reading errors on.
4389         * linux-low.c (linux_low_read_btrace): Pass trace reading
4390         errors on.
4391         (linux_low_disable_btrace): New.
4392
4393 2014-01-15  Doug Evans  <dje@google.com>
4394
4395         * inferiors.c (thread_id_to_gdb_id): Delete.
4396         * inferiors.h (thread_id_to_gdb_id): Delete.
4397
4398 2014-01-13  Eli Zaretskii  <eliz@gnu.org>
4399
4400         * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
4401         "-I$(srcdir)/../".  Fixes MinGW compilation errors with old GCC
4402         versions.
4403
4404 2014-01-08  Pedro Alves  <palves@redhat.com>
4405
4406         * server.c (handle_status): Don't discard previous queued stop
4407         replies or thread's pending status here.
4408         (main) <disconnection>: Do it here instead.
4409
4410 2014-01-08  Pedro Alves  <palves@redhat.com>
4411
4412         * gdbthread.h (struct thread_info) <status_pending_p>: New field.
4413         * server.c (visit_actioned_threads, handle_pending_status): New
4414         function.
4415         (handle_v_cont): Factor out parts to ...
4416         (resume): ... this new function.  If in all-stop, and a thread
4417         being resumed has a pending status, report it without actually
4418         resuming.
4419         (myresume): Adjust to use the new 'resume' function.
4420         (clear_pending_status_callback, set_pending_status_callback)
4421         (find_status_pending_thread_callback): New functions.
4422         (handle_status): Handle the case of multiple threads having
4423         interesting statuses to report.  Report threads' real last signal
4424         instead of always reporting GDB_SIGNAL_TRAP.  Look for a thread
4425         with an interesting thread to report the status for, instead of
4426         always reporting the status of the first thread.
4427
4428 2014-01-01  Joel Brobecker  <brobecker@adacore.com>
4429
4430         * gdbserver.c (gdbserver_version): Set copyright year to 2014.
4431         * gdbreplay.c (gdbreplay_version): Likewise.
4432
4433 2013-12-18  Yufeng Zhang  <yufeng.zhang@arm.com>
4434
4435         * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
4436         iov.iov_len with the real length in use.
4437
4438 2013-12-13  Joel Brobecker  <brobecker@adacore.com>
4439
4440         * Makefile.in (safe-ctype.o, lbasename.o): New rules.
4441         * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
4442         for all targets that use win32-low.c.
4443         * win32-low.c (win32_ensure_ntdll_loaded): New function.
4444         (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
4445
4446 2013-12-13  Pedro Alves  <palves@redhat.com>
4447
4448         * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
4449         if equal to TARGET_WAITKIND_LOADED.
4450         * win32-low.c (cached_status): New static global.
4451         (win32_wait): Add declaration.
4452         (do_initial_child_stuff): Flush all initial pending debug events
4453         up to the initial breakpoint.
4454         (win32_wait): If CACHED_STATUS was set, return that instead
4455         of doing a real wait.  Remove the code resuming the execution
4456         of the inferior after receiving a TARGET_WAITKIND_LOADED event
4457         during the initial phase.  Also remove the code changing
4458         OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
4459         TARGET_WAITKIND_STOPPED.
4460
4461 2013-12-11  Yao Qi  <yao@codesourcery.com>
4462
4463         * notif.c (handle_notif_ack): Return 0 if no notification
4464         matches.
4465
4466 2013-11-20  Doug Evans  <dje@google.com>
4467
4468         * linux-low.c (linux_set_resume_request): Fix comment.
4469
4470 2013-11-20  Doug Evans  <dje@google.com>
4471
4472         * linux-low.c (resume_status_pending_p): Tweak comment.
4473
4474 2013-11-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4475
4476         * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
4477         amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
4478         * configure.srv (srv_i386_regobj): Add i386-mpx.o.
4479         (srv_i386_linux_regobj): Add i386-mpx-linux.o.
4480         (srv_amd64_regobj): Add amd64-mpx.o.
4481         (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
4482         (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
4483         (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
4484         * i387-fp.c (num_pl_bnd_register) Added constant.
4485         (num_pl_bnd_cfg_registers) Added constant.
4486         (struct i387_xsave) Added reserved area and MPX fields.
4487         (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
4488         * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
4489         function.
4490         (tdesc_i386_mpx_linux): Add MPX amd64 target.
4491         (init_registers_amd64_mpx_linux): Declare new function.
4492         (tdesc_amd64_mpx_linux): Add MPX amd64 target.
4493         (x86_64_regmap): Add MPX registers.
4494         (x86_linux_read_description): Add MPX case.
4495         (initialize_low_arch): Initialize MPX targets.
4496
4497 2013-11-18  Tom Tromey  <tromey@redhat.com>
4498
4499         * configure: Rebuild.
4500         * configure.ac: Don't check for stdlib.h.
4501         * gdbreplay.c: Unconditionally include stdlib.h.
4502
4503 2013-11-18  Tom Tromey  <tromey@redhat.com>
4504
4505         * config.in: Rebuild.
4506         * configure: Rebuild.
4507         * configure.ac: Don't use AC_HEADER_DIRENT.
4508
4509 2013-11-18  Tom Tromey  <tromey@redhat.com>
4510
4511         * server.h: Don't check HAVE_STRING_H.
4512         * gdbreplay.c: Don't check HAVE_STRING_H.
4513         * configure: Rebuild.
4514
4515 2013-11-18  Tom Tromey  <tromey@redhat.com>
4516
4517         * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
4518         LIBGNU.
4519
4520 2013-11-08  Tom Tromey  <tromey@redhat.com>
4521
4522         * configure, config.in: Rebuild.
4523         * configure.ac: Remove unused configury.
4524
4525 2013-11-08  Tom Tromey  <tromey@redhat.com>
4526
4527         * acinclude.m4: Include common.m4, codeset.m4.
4528         * configure, config.in: Rebuild.
4529         * configure.ac: Use GDB_AC_COMMON.
4530
4531 2013-11-06  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4532
4533         * linux-s390-low.c (HWCAP_S390_TE): New define.
4534         (s390_arch_setup): Consider the TE field in the HWCAP for
4535         determining 'have_regset_tdb'.
4536
4537 2013-10-16  Sergio Durigan Junior  <sergiodj@redhat.com>
4538
4539         PR gdb/16014
4540         * tracepoint.c (download_tracepoint_1): Remove unnecessary double
4541         call to sizeof.
4542
4543 2013-10-02  Pedro Alves  <palves@redhat.com>
4544
4545         * server.c (process_serial_event): Don't output "GDBserver
4546         exiting" if GDB is connected through stdio.
4547         * target.c (mywait): Likewise, be silent if GDB is connected
4548         through stdio.
4549
4550 2013-10-01  Joel Brobecker  <brobecker@adacore.com>
4551
4552         * lynx-low.c (lynx_add_threads_after_attach): New function.
4553         (lynx_attach): Remove call to add_thread.  Add call to
4554         lynx_add_threads_after_attach instead.
4555
4556 2013-09-28  Mike Frysinger  <vapier@gentoo.org>
4557
4558         * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4559         * config.in, configure: Regenerated.
4560
4561 2013-09-18  Yao Qi  <yao@codesourcery.com>
4562
4563         PR server/15959
4564         * server.c (start_inferior): Clear 'resume_info'.
4565
4566 2013-09-16  Jiong Wang  <jiwang@tilera.com>
4567
4568         * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4569         for each register.
4570
4571 2013-09-16  Jiong Wang  <jiwang@tilera.com>
4572
4573         * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4574         linux-tile-low.o to srv_tgtobj.
4575
4576 2013-09-16  Will Newton  <will.newton@linaro.org>
4577
4578         * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4579         out regs.
4580
4581 2013-09-06  Pedro Alves  <palves@redhat.com>
4582
4583         * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4584         (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4585         (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4586         (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4587         (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4588         (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4589
4590 2013-09-06  Pedro Alves  <palves@redhat.com>
4591
4592         * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4593         explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4594
4595 2013-09-06  Pedro Alves  <palves@redhat.com>
4596
4597         * linux-amd64-ipa.c: Include tracepoint.h.
4598         * linux-i386-ipa.c: Include tracepoint.h.
4599
4600 2013-09-06  Ricard Wanderlof  <ricardw@axis.com>
4601
4602         * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4603         (ps_get_thread_area): New function.
4604
4605 2013-09-06  Ricard Wanderlof  <ricardw@axis.com>
4606
4607         * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4608         (initialize_low_arch): Call init_registers_crisv32 rather than
4609         init_register_crisv32.
4610
4611 2013-09-05  Pedro Alves  <palves@redhat.com>
4612
4613         * server.h (handle_vFile, hostio_last_error_from_errno): Move
4614         to ...
4615         * hostio.h: ... this new file.
4616         * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4617         win32-low.c: Include hostio.h.
4618
4619 2013-09-05  Pedro Alves  <palves@redhat.com>
4620
4621         * server.h (gdb_client_data, handler_func, callback_handler_func)
4622         (delete_file_handler, add_file_handler, append_callback_event)
4623         (delete_callback_event, start_event_loop, initialize_event_loop):
4624         Move to event-loop.h and include it.
4625         * event-loop.h: New file.
4626
4627 2013-09-05  Pedro Alves  <palves@redhat.com>
4628
4629         * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4630         * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4631         (loaded_dll, unloaded_dll): Move to ...
4632         * dll.h: ... this new file.
4633         * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4634
4635 2013-09-05  Pedro Alves  <palves@redhat.com>
4636
4637         * server.h (current_process, get_thread_process, all_processes)
4638         (add_inferior_to_list, for_each_inferior, current_inferior)
4639         (remove_inferior, add_process, remove_process, find_process_pid)
4640         (have_started_inferiors_p, have_attached_inferiors_p)
4641         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4642         (clear_inferiors, find_inferior, find_inferior_id)
4643         (inferior_target_data, set_inferior_target_data)
4644         (inferior_regcache_data, set_inferior_regcache_data): Move to
4645         inferiors.h, and include it.
4646         * inferiors.h: New file.
4647
4648 2013-09-05  Pedro Alves  <palves@redhat.com>
4649
4650         * server.h (struct emit_ops, current_insn_ptr, emit_error):
4651         Move ...
4652         * ax.h: ... here.
4653
4654 2013-09-05  Pedro Alves  <palves@redhat.com>
4655
4656         * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4657         tracepoint.h.
4658         * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4659         (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4660         (handle_tracepoint_general_set, handle_tracepoint_query)
4661         (tracepoint_finished_step, tracepoint_was_hit)
4662         (release_while_stepping_state_list, current_traceframe)
4663         (in_readonly_region, traceframe_read_mem)
4664         (fetch_traceframe_registers, traceframe_read_sdata)
4665         (traceframe_read_info, struct fast_tpoint_collect_status)
4666         (fast_tracepoint_collecting, force_unlock_trace_buffer)
4667         (handle_tracepoit_bkpts, initialize_low_tracepoint)
4668         (supply_fast_tracepoint_registers)
4669         (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4670         (ipa_tdesc, claim_trampoline_space)
4671         (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4672         (agent_mem_read, agent_get_trace_state_variable_value)
4673         (agent_set_trace_state_variable_value, agent_tsv_read)
4674         (agent_mem_read_string, get_raw_reg_func_addr)
4675         (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4676         * tracepoint.h: ... this new file.
4677
4678 2013-09-05  Pedro Alves  <palves@redhat.com>
4679
4680         * server.h (perror_with_name, error, fatal, warning, paddress)
4681         (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4682         include it.
4683         * utils.h: New file.
4684
4685 2013-09-05  Pedro Alves  <palves@redhat.com>
4686
4687         * server.h (remote_debug, noack_mode, transport_is_reliable)
4688         (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4689         (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4690         (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4691         (write_enn, initialize_async_io, enable_async_io)
4692         (disable_async_io, check_remote_input_interrupt_request)
4693         (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4694         (dead_thread_notify, prepare_resume_reply)
4695         (decode_address_to_semicolon, decode_address, decode_m_packet)
4696         (decode_M_packet, decode_X_packet, decode_xfer_write)
4697         (decode_search_memory_packet, unhexify, hexify)
4698         (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4699         (look_up_one_symbol, relocate_instruction)
4700         (monitor_output): Move to remote-utils.h, and include it.
4701         * remote-utils.h: New file.
4702
4703 2013-09-05  Pedro Alves  <palves@redhat.com>
4704
4705         * server.h (_): Delete.
4706
4707 2013-09-02  Pedro Alves  <palves@redhat.com>
4708
4709         * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4710         (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4711         allocated.
4712         (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4713
4714 2013-09-02  Pierre Muller  <muller@sourceware.org>
4715
4716         * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4717         or WriteProcessMemory complete successfully and handle
4718         ERROR_PARTIAL_COPY error.
4719
4720 2013-09-02  Pedro Alves  <palves@redhat.com>
4721
4722         * server.c (gdb_read_memory): Return -1 on traceframe memory read
4723         error instead of EIO.
4724
4725 2013-08-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
4726
4727         PR server/15604
4728         * linux-low.c: Include filestuff.h.
4729         (linux_create_inferior) <pid == 0>: Call close_most_fds.
4730         * lynx-low.c: Include filestuff.h.
4731         (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4732         * server.c: Include filestuff.h.
4733         (main): Call notice_open_fds.
4734         * spu-low.c: Include filestuff.h.
4735         (spu_create_inferior) <pid == 0>: Call close_most_fds.
4736
4737 2013-08-22  Luis Machado  <lgustavo@codesourcery.com>
4738
4739         * Makefile.in: Explain why ../target and ../nat are not
4740         listed as include file search paths.
4741         (linux-waitpid.o): New object file rule.
4742         * configure.srv (srv_native_linux_obj): New variable.
4743         Replace all occurrences of linux native object files with
4744         $srv_native_linux_obj.
4745         * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4746         (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4747         (linux_enable_event_reporting): Remove declaration.
4748         (my_waitpid): Moved to common/linux-waitpid.c.
4749         (linux_wait_for_event): Pass ptid when calling
4750         linux_enable_event_reporting.
4751         (linux_supports_tracefork_flag): Remove.
4752         (linux_enable_event_reporting): Likewise.
4753         (linux_tracefork_grandchild): Remove.
4754         (STACK_SIZE): Moved to common/linux-ptrace.c.
4755         (linux_tracefork_child): Remove.
4756         (linux_test_for_tracefork): Remove.
4757         (linux_look_up_symbols): Call linux_supports_traceclone.
4758         (initialize_low): Remove call to linux_test_for_tracefork.
4759         * linux-low.h (PTRACE_TYPE_ARG3): Move to
4760         common/linux-ptrace.h.
4761         (PTRACE_TYPE_ARG4): Likewise.
4762         Include linux-ptrace.h.
4763
4764 2013-08-21  Pedro Alves  <palves@redhat.com>
4765
4766         * config.in: Renegerate.
4767
4768 2013-08-19  Luis Machado  <lgustavo@codesourcery.com>
4769
4770         * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4771         (SFILES): Remove $(srcdir)/common/target-common.c and
4772         add $(srcdir)/target/waitstatus.c.
4773         (OBS): Remove target-common.o and add waitstatus.o.
4774         (server_h): Remove $(srcdir)/../common/target-common.h and
4775         add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4776         and $(srcdir)/../target/waitstatus.h.
4777         (target-common.o): Remove.
4778         (waitstatus.o): New target object file.
4779         * target.h: Do not include target-common.h and
4780         include target/resume.h, target/wait.h and
4781         target/waitstatus.h.
4782
4783 2013-08-13  Luis Machado  <lgustavo@codesourcery.com>
4784
4785         * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4786         to PTRACE_TYPE_ARG3.
4787         * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4788         to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4789         PTRACE_TYPE_ARG4.
4790         * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4791         (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4792
4793 2013-07-27  Jie Zhang  <jie@codesourcery.com>
4794             Daniel Jacobowitz  <dan@codesourcery.com>
4795             Yao Qi  <yao@codesourcery.com>
4796
4797         * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4798         (mips-linux-watch.o): New rule.
4799         (mips_linux_watch_h): New variable.
4800         * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4801         srv_tgtobj.
4802         * linux-mips-low.c: Include mips-linux-watch.h.
4803         (struct arch_process_info, struct arch_lwp_info): New.
4804         (update_watch_registers_callback): New function.
4805         (mips_linux_new_process, mips_linux_new_thread) New functions.
4806         (mips_linux_prepare_to_resume, mips_insert_point): New
4807         functions.
4808         (mips_remove_point, mips_stopped_by_watchpoint): New
4809         functions.
4810         (rsp_bp_type_to_target_hw_bp_type): New function.
4811         (mips_stopped_data_address): New function.
4812         (the_low_target): Add watchpoint support functions.
4813
4814 2013-07-27  Yao Qi  <yao@codesourcery.com>
4815
4816         * i386-low.c: Include break-common.h.
4817         (enum target_hw_bp_type): Remove.
4818
4819 2013-07-24  Luis Machado  <lgustavo@codesourcery.com>
4820
4821         * Makefile.in (SFILES): /common/target-common.c.
4822         (OBS): Add target-common.o.
4823         (server_h): Add $(srcdir)/../common/target-common.h.
4824         (target-common.o): New target.
4825         * server.c (queue_stop_reply_callback): Free
4826         status string after use.
4827         * target.c (target_waitstatus_to_string): Remove.
4828         * target.h: Include target-common.h.
4829         (resume_kind): Likewise.
4830         (target_waitkind): Likewise.
4831         (target_waitstatus): Likewise.
4832         (TARGET_WNOHANG): Likewise.
4833
4834 2013-07-04  Yao Qi  <yao@codesourcery.com>
4835
4836         * Makefile.in (host_alias): Use @host_noncanonical@.
4837         (target_alias): Use @target_noncanonical@.
4838         * configure.ac: Use ACX_NONCANONICAL_TARGET and
4839         ACX_NONCANONICAL_HOST.
4840         * configure: Regenerated.
4841
4842         Revert:
4843         2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>
4844
4845         * configure.ac (version_host, version_target): Set and AC_SUBST them.
4846         * configure: Rebuild.
4847         * Makefile.in (version_host, version_target): Get from configure.
4848         (version.c): Use $(version_host) and $(version_target).
4849
4850 2013-07-03  Pedro Alves  <palves@redhat.com>
4851
4852         * Makefile.in (config.status): Depend on development.sh.
4853         * acinclude.m4: Include libmcheck.m4.
4854         * configure: Regenerate.
4855
4856 2013-07-02  Mircea Gherzan  <mircea.gherzan@intel.com>
4857
4858         * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4859         attribute inside the parentheses.
4860         (winapi_DebugSetProcessKillOnExit): Ditto.
4861         (winapi_DebugBreakProcess): Ditto.
4862         (winapi_GenerateConsoleCtrlEvent): Ditto.
4863
4864 2013-07-02  Mircea Gherzan  <mircea.gherzan@intel.com>
4865
4866         * notif.h (notif_event): Add a dummy member to avoid compiler
4867         errors.
4868
4869 2013-07-01  Pedro Alves  <palves@redhat.com>
4870
4871         * hostio.c (HOSTIO_PATH_MAX): Define.
4872         (require_filename, handle_open, handle_unlink, handle_readlink):
4873         Use it.
4874
4875 2013-07-01  Pedro Alves  <palves@redhat.com>
4876
4877         * server.h: Include "pathmax.h".
4878         * linux-low.c: Don't include sys/param.h.
4879         (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4880         MAXPATHLEN.
4881         * win32-low.c: Don't include sys/param.h.
4882         (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4883
4884 2013-07-01  Pedro Alves  <palves@redhat.com>
4885
4886         * event-loop.c: Don't check HAVE_UNISTD_H before including
4887         <unistd.h>.
4888         * gdbreplay.c: Likewise.
4889         * remote-utils.c: Likewise.
4890         * server.c: Likewise.
4891         * configure.ac: Don't check for unistd.h.
4892         * configure: Regenerate.
4893
4894 2013-06-28  Tom Tromey  <tromey@redhat.com>
4895
4896         * Makefile.in (version.c): Use version.in, not
4897         common/version.in.
4898
4899 2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>
4900
4901         * configure.ac (version_host, version_target): Set and AC_SUBST them.
4902         * configure: Rebuild.
4903         * Makefile.in (version_host, version_target): Get from configure.
4904         (version.c): Use $(version_host) and $(version_target).
4905
4906 2013-06-10  Dmitry Kozlov <ddk@codesourcery.com>
4907
4908         Fix trace-status to output user name without trailing colon.
4909         * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4910
4911 2013-06-10  Dmitry Kozlov <ddk@codesourcery.com>
4912
4913         Fix trace-status to output proper start-time and stop-time.
4914         * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4915         output start time and stop time in hex as gdb expects.
4916
4917 2013-06-26  Pedro Alves  <pedro@codesourcery.com>
4918
4919         * tracepoint.c (build_traceframe_info_xml): Output trace state
4920         variables present in the trace buffer.
4921
4922 2013-06-24  Tom Tromey  <tromey@redhat.com>
4923
4924         * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4925         create-version.sh.
4926         (version.o): Remove.
4927         * gdbreplay.c: Include version.h.
4928         (version, host_name): Don't declare.
4929         * server.h: Include version.h.
4930         (version, host_name): Don't declare.
4931
4932 2013-06-12  Pedro Alves  <palves@redhat.com>
4933
4934         * linux-x86-low.c (linux_is_elf64): Delete global.
4935         (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4936         with local linux_pid_exe_is_elf_64_file use.
4937
4938 2013-06-11  Pedro Alves  <palves@redhat.com>
4939
4940         * linux-low.c (regset_disabled, disable_regset): New functions.
4941         (regsets_fetch_inferior_registers)
4942         (regsets_store_inferior_registers): Use them.
4943         (initialize_regsets_info); Don't allocate the disabled_regsets
4944         array here.
4945         * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4946         comment.
4947
4948 2013-06-11  Pedro Alves  <palves@redhat.com>
4949
4950         * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4951         xmalloc.
4952
4953 2013-06-11  Pedro Alves  <palves@redhat.com>
4954
4955         * linux-x86-low.c (initialize_low_arch): Call
4956         init_registers_x32_avx_linux.
4957
4958 2013-06-09  Jan Kratochvil  <jan.kratochvil@redhat.com>
4959
4960         Fix compatibility with Android Bionic.
4961         * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4962         it is not empty.
4963
4964 2013-06-07  Pedro Alves  <palves@redhat.com>
4965
4966         PR server/14823
4967         * Makefile.in (OBS): Add tdesc.o.
4968         (IPA_OBJS): Add tdesc-ipa.o.
4969         (tdesc-ipa.o): New rule.
4970         * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4971         interface.
4972         * linux-low.c (new_inferior): Delete.
4973         (disabled_regsets, num_regsets): Delete.
4974         (linux_add_process): Adjust to set the new per-process
4975         new_inferior flag.
4976         (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4977         (linux_wait_for_lwp): Adjust.  Only call arch_setup if the event
4978         was a stop.  When calling arch_setup, switch the current inferior
4979         to the thread that got an event.
4980         (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4981         (regsets_fetch_inferior_registers)
4982         (regsets_store_inferior_registers): New regsets_info parameter.
4983         Adjust to use it.
4984         (linux_register_in_regsets): New regs_info parameter.  Adjust to
4985         use it.
4986         (register_addr, fetch_register, store_register): New usrregs_info
4987         parameter.  Adjust to use it.
4988         (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4989         parameter regs_info.  Adjust to use it.
4990         (linux_fetch_registers): Get the current inferior's regs_info, and
4991         adjust to use it.
4992         (linux_store_registers): Ditto.
4993         [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4994         (initialize_low): Don't initialize the target_regsets here.  Call
4995         initialize_low_arch.
4996         * linux-low.h (target_regsets): Delete declaration.
4997         (struct regsets_info): New.
4998         (struct usrregs_info): New.
4999         (struct regs_info): New.
5000         (struct process_info_private) <new_inferior>: New field.
5001         (struct linux_target_ops): Delete the num_regs, regmap, and
5002         regset_bitmap fields.  New field regs_info.
5003         [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
5004         * i387-fp.c (num_xmm_registers): Delete.
5005         (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
5006         calls to new interface.
5007         (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
5008         (i387_xsave_to_cache): Adjust find_regno calls to new interface.
5009         Infer the number of xmm registers from the regcache's target
5010         description.
5011         * i387-fp.h (num_xmm_registers): Delete.
5012         * inferiors.c (add_thread): Don't install the thread's regcache
5013         here.
5014         * proc-service.c (gregset_info): Fetch the current inferior's
5015         regs_info.  Adjust to use it.
5016         * regcache.c: Include tdesc.h.
5017         (register_bytes, reg_defs, num_registers)
5018         (gdbserver_expedite_regs): Delete.
5019         (get_thread_regcache): If the thread doesn't have a regcache yet,
5020         create one, instead of aborting gdbserver.
5021         (regcache_invalidate_one): Rename to ...
5022         (regcache_invalidate_thread): ... this.
5023         (regcache_invalidate_one): New.
5024         (regcache_invalidate): Only invalidate registers of the current
5025         process.
5026         (init_register_cache): Add target_desc parameter, and use it.
5027         (new_register_cache): Ditto.  Assert the target description has a
5028         non zero registers_size.
5029         (regcache_cpy): Add assertions.  Adjust.
5030         (realloc_register_cache, set_register_cache): Delete.
5031         (registers_to_string, registers_from_string): Adjust.
5032         (find_register_by_name, find_regno, find_register_by_number)
5033         (register_cache_size): Add target_desc parameter, and use it.
5034         (free_register_cache_thread, free_register_cache_thread_one)
5035         (regcache_release, register_cache_size): New.
5036         (register_size): Add target_desc parameter, and use it.
5037         (register_data, supply_register, supply_register_zeroed)
5038         (supply_regblock, supply_register_by_name, collect_register)
5039         (collect_register_as_string, collect_register_by_name): Adjust.
5040         * regcache.h (struct target_desc): Forward declare.
5041         (struct regcache) <tdesc>: New field.
5042         (init_register_cache, new_register_cache): Add target_desc
5043         parameter.
5044         (regcache_invalidate_thread): Declare.
5045         (regcache_invalidate_one): Delete declaration.
5046         (regcache_release): Declare.
5047         (find_register_by_number, register_cache_size, register_size)
5048         (find_regno): Add target_desc parameter.
5049         (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
5050         declarations.
5051         * remote-utils.c: Include tdesc.h.
5052         (outreg, prepare_resume_reply): Adjust.
5053         * server.c: Include tdesc.h.
5054         (gdbserver_xmltarget): Delete declaration.
5055         (get_features_xml, process_serial_event): Adjust.
5056         * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
5057         declare.
5058         (struct process_info) <tdesc>: New field.
5059         (ipa_tdesc): Declare.
5060         * tdesc.c: New file.
5061         * tdesc.h: New file.
5062         * tracepoint.c: Include tdesc.h.
5063         [IN_PROCESS_AGENT] (ipa_tdesc): Define.
5064         (get_context_regcache): Adjust to pass ipa_tdesc down.
5065         (do_action_at_tracepoint): Adjust to get the register cache size
5066         from the context regcache's description.
5067         (traceframe_walk_blocks): Adjust to get the register cache size
5068         from the current trace frame's description.
5069         (traceframe_get_pc): Adjust to get current trace frame's
5070         description and pass it down.
5071         (gdb_collect): Adjust to get the register cache size from the
5072         IPA's description.
5073         * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
5074         (gdbserver_xmltarget): Delete.
5075         (initialize_low_tracepoint): Set the ipa's target description.
5076         * linux-i386-ipa.c (tdesc_i386_linux): Declare.
5077         (initialize_low_tracepoint): Set the ipa's target description.
5078         * linux-x86-low.c: Include tdesc.h.
5079         [__x86_64__] (is_64bit_tdesc): New.
5080         (ps_get_thread_area, x86_get_thread_area): Use it.
5081         (i386_cannot_store_register): Rename to ...
5082         (x86_cannot_store_register): ... this.  Use is_64bit_tdesc.
5083         (i386_cannot_fetch_register): Rename to ...
5084         (x86_cannot_fetch_register): ... this.  Use is_64bit_tdesc.
5085         (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
5086         to new interface.
5087         (target_regsets): Rename to ...
5088         (x86_regsets): ... this.
5089         (x86_get_pc, x86_set_pc): Adjust register_size calls to new
5090         interface.
5091         (x86_siginfo_fixup): Use is_64bit_tdesc.
5092         [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
5093         (tdesc_x32_avx_linux, tdesc_x32_linux)
5094         (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
5095         Declare.
5096         (x86_linux_update_xmltarget): Delete.
5097         (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
5098         (have_ptrace_getfpxregs, have_ptrace_getregset): New.
5099         (AMD64_LINUX_USER64_CS): New.
5100         (x86_linux_read_description): New, based on
5101         x86_linux_update_xmltarget.
5102         (same_process_callback): New.
5103         (x86_arch_setup_process_callback): New.
5104         (x86_linux_update_xmltarget): New.
5105         (x86_regsets_info): New.
5106         (amd64_linux_regs_info): New.
5107         (i386_linux_usrregs_info): New.
5108         (i386_linux_regs_info): New.
5109         (x86_linux_regs_info): New.
5110         (x86_arch_setup): Reimplement.
5111         (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
5112         (x86_emit_ops): Ditto.
5113         (the_low_target): Adjust.  Install x86_linux_regs_info,
5114         x86_cannot_fetch_register, and x86_cannot_store_register.
5115         (initialize_low_arch): New.
5116         * linux-ia64-low.c (tdesc_ia64): Declare.
5117         (ia64_fetch_register): Adjust.
5118         (ia64_usrregs_info, regs_info): New globals.
5119         (ia64_regs_info): New function.
5120         (the_low_target): Adjust.
5121         (initialize_low_arch): New function.
5122         * linux-sparc-low.c (tdesc_sparc64): Declare.
5123         (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
5124         Adjust.
5125         (sparc_arch_setup): New function.
5126         (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
5127         (the_low_target): Adjust.
5128         (initialize_low_arch): New function.
5129         * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
5130         (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
5131         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
5132         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
5133         (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
5134         (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
5135         (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
5136         (tdesc_powerpc_isa205_vsx64l): Declare.
5137         (ppc_cannot_store_register, ppc_collect_ptrace_register)
5138         (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
5139         (ppc_set_pc, ppc_get_hwcap): Adjust.
5140         (ppc_usrregs_info): Forward declare.
5141         (!__powerpc64__) ppc_regmap_adjusted: New global.
5142         (ppc_arch_setup): Adjust to the current process'es target
5143         description.
5144         (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
5145         (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
5146         (ppc_store_evrregset): Adjust.
5147         (target_regsets): Rename to ...
5148         (ppc_regsets): ... this, and make static.
5149         (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
5150         (ppc_regs_info): New function.
5151         (the_low_target): Adjust.
5152         (initialize_low_arch): New function.
5153         * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
5154         (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
5155         (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
5156         (tdesc_s390x_linux64v2): Declare.
5157         (s390_collect_ptrace_register, s390_supply_ptrace_register)
5158         (s390_fill_gregset, s390_store_last_break): Adjust.
5159         (target_regsets): Rename to ...
5160         (s390_regsets): ... this, and make static.
5161         (s390_get_pc, s390_set_pc): Adjust.
5162         (s390_get_hwcap): New target_desc parameter, and use it.
5163         [__s390x__] (have_hwcap_s390_high_gprs): New global.
5164         (s390_arch_setup): Adjust to set the current process'es target
5165         description.  Don't adjust the regmap.
5166         (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
5167         [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
5168         (regs_info_3264): New globals.
5169         (s390_regs_info): New function.
5170         (the_low_target): Adjust.
5171         (initialize_low_arch): New function.
5172         * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
5173         (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
5174         [__mips64] (init_registers_mips_linux)
5175         (init_registers_mips_dsp_linux): Delete defines.
5176         [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
5177         (have_dsp): New global.
5178         (mips_read_description): New, based on mips_arch_setup.
5179         (mips_arch_setup): Reimplement.
5180         (get_usrregs_info): New function.
5181         (mips_cannot_fetch_register, mips_cannot_store_register)
5182         (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
5183         (mips_fill_fpregset, mips_store_fpregset): Adjust.
5184         (target_regsets): Rename to ...
5185         (mips_regsets): ... this, and make static.
5186         (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
5187         (dsp_regs_info, regs_info): New globals.
5188         (mips_regs_info): New function.
5189         (the_low_target): Adjust.
5190         (initialize_low_arch): New function.
5191         * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
5192         (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
5193         Declare.
5194         (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
5195         (arm_read_description): New, with bits factored from
5196         arm_arch_setup.
5197         (arm_arch_setup): Reimplement.
5198         (target_regsets): Rename to ...
5199         (arm_regsets): ... this, and make static.
5200         (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
5201         (arm_regs_info): New function.
5202         (the_low_target): Adjust.
5203         (initialize_low_arch): New function.
5204         * linux-m68k-low.c (tdesc_m68k): Declare.
5205         (target_regsets): Rename to ...
5206         (m68k_regsets): ... this, and make static.
5207         (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
5208         (m68k_regs_info): New function.
5209         (m68k_arch_setup): New function.
5210         (the_low_target): Adjust.
5211         (initialize_low_arch): New function.
5212         * linux-sh-low.c (tdesc_sharch): Declare.
5213         (target_regsets): Rename to ...
5214         (sh_regsets): ... this, and make static.
5215         (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
5216         (sh_regs_info, sh_arch_setup): New functions.
5217         (the_low_target): Adjust.
5218         (initialize_low_arch): New function.
5219         * linux-bfin-low.c (tdesc_bfin): Declare.
5220         (bfin_arch_setup): New function.
5221         (bfin_usrregs_info, regs_info): New globals.
5222         (bfin_regs_info): New function.
5223         (the_low_target): Adjust.
5224         (initialize_low_arch): New function.
5225         * linux-cris-low.c (tdesc_cris): Declare.
5226         (cris_arch_setup): New function.
5227         (cris_usrregs_info, regs_info): New globals.
5228         (cris_regs_info): New function.
5229         (the_low_target): Adjust.
5230         (initialize_low_arch): New function.
5231         * linux-cris-low.c (tdesc_crisv32): Declare.
5232         (cris_arch_setup): New function.
5233         (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
5234         (cris_regs_info): New function.
5235         (the_low_target): Adjust.
5236         (initialize_low_arch): New function.
5237         * linux-m32r-low.c (tdesc_m32r): Declare.
5238         (m32r_arch_setup): New function.
5239         (m32r_usrregs_info, regs_info): New globals.
5240         (m32r_regs_info): Adjust.
5241         (initialize_low_arch): New function.
5242         * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
5243         (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
5244         (tic6x_usrregs_info): Forward declare.
5245         (tic6x_read_description): New function, based on ...
5246         (tic6x_arch_setup): ... this.  Reimplement.
5247         (target_regsets): Rename to ...
5248         (tic6x_regsets): ... this, and make static.
5249         (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
5250         (tic6x_regs_info): New function.
5251         (the_low_target): Adjust.
5252         (initialize_low_arch): New function.
5253         * linux-xtensa-low.c (tdesc_xtensa): Declare.
5254         (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
5255         (target_regsets): Rename to ...
5256         (xtensa_regsets): ... this, and make static.
5257         (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
5258         globals.
5259         (xtensa_arch_setup, xtensa_regs_info): New functions.
5260         (the_low_target): Adjust.
5261         (initialize_low_arch): New function.
5262         * linux-nios2-low.c (tdesc_nios2_linux): Declare.
5263         (nios2_arch_setup): Set the current process'es tdesc.
5264         (target_regsets): Rename to ...
5265         (nios2_regsets): ... this.
5266         (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
5267         (nios2_regs_info): New function.
5268         (the_low_target): Adjust.
5269         (initialize_low_arch): New function.
5270         * linux-aarch64-low.c (tdesc_aarch64): Declare.
5271         (aarch64_arch_setup): Set the current process'es tdesc.
5272         (target_regsets): Rename to ...
5273         (aarch64_regsets): ... this.
5274         (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
5275         (aarch64_regs_info): New function.
5276         (the_low_target): Adjust.
5277         (initialize_low_arch): New function.
5278         * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
5279         globals.
5280         (target_regsets): Rename to ...
5281         (tile_regsets): ... this.
5282         (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
5283         (tile_regs_info): New function.
5284         (tile_arch_setup): Set the current process'es tdesc.
5285         (the_low_target): Adjust.
5286         (initialize_low_arch): New function.
5287         * spu-low.c (tdesc_spu): Declare.
5288         (spu_create_inferior, spu_attach): Set the new process'es tdesc.
5289         * win32-arm-low.c (tdesc_arm): Declare.
5290         (arm_arch_setup): New function.
5291         (the_low_target): Install arm_arch_setup instead of
5292         init_registers_arm.
5293         * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
5294         (init_windows_x86): Rename to ...
5295         (i386_arch_setup): ... this.  Set `win32_tdesc'.
5296         (the_low_target): Adjust.
5297         * win32-low.c (win32_tdesc): New global.
5298         (child_add_thread): Don't create the thread cache here.
5299         (do_initial_child_stuff): Set the new process'es tdesc.
5300         * win32-low.h (struct target_desc): Forward declare.
5301         (win32_tdesc): Declare.
5302         * lynx-i386-low.c (tdesc_i386): Declare global.
5303         (lynx_i386_arch_setup): Set `lynx_tdesc'.
5304         * lynx-low.c (lynx_tdesc): New global.
5305         (lynx_add_process): Set the new process'es tdesc.
5306         * lynx-low.h (struct target_desc): Forward declare.
5307         (lynx_tdesc): Declare global.
5308         * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
5309         (lynx_ppc_arch_setup): Set `lynx_tdesc'.
5310         * nto-low.c (nto_tdesc): New global.
5311         (do_attach): Set the new process'es tdesc.
5312         * nto-low.h (struct target_desc): Forward declare.
5313         (nto_tdesc): Declare.
5314         * nto-x86-low.c (tdesc_i386): Declare.
5315         (nto_x86_arch_setup): Set `nto_tdesc'.
5316
5317 2013-06-04  Gary Benson  <gbenson@redhat.com>
5318
5319         * server.c (handle_query): Add "augmented-libraries-svr4-read+"
5320         to qSupported response when appropriate.
5321         (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
5322         with nonzero-length annex.
5323         * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
5324         arguments supplied in annex.
5325
5326 2013-05-31  Doug Evans  <dje@google.com>
5327
5328         PR server/15594
5329         * linux-x86-low.c (ps_get_thread_area): Properly extend address to
5330         64 bits in 64-cross-32 environment.
5331
5332 2013-05-28  Pedro Alves  <palves@redhat.com>
5333
5334         * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
5335         (aarch64-without-fpu.c): Delete rule.
5336         * configure.srv (aarch64*-*-linux*): Remove references to
5337         aarch64-without-fpu.o and aarch64-without-fpu.xml.
5338         * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
5339         declaration.
5340
5341 2013-05-24  Pedro Alves  <palves@redhat.com>
5342
5343         * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
5344         instead of strchr/decode_address.  Error if the range isn't split
5345         with a ','.  Don't assume there's be a ':' in the action.
5346
5347 2013-05-23  Yao Qi  <yao@codesourcery.com>
5348             Pedro Alves  <palves@redhat.com>
5349
5350         * linux-low.c (lwp_in_step_range): New function.
5351         (linux_wait_1): If the thread was range stepping and stopped
5352         outside the stepping range, report the stop to GDB.  Otherwise,
5353         continue stepping.  Add range stepping debug output.
5354         (linux_set_resume_request): Copy the step range from the resume
5355         request to the lwp.
5356         (linux_supports_range_stepping): New.
5357         (linux_target_ops) <supports_range_stepping>: Set to
5358         linux_supports_range_stepping.
5359         * linux-low.h (struct linux_target_ops)
5360         <supports_range_stepping>: New field.
5361         (struct lwp_info) <step_range_start, step_range_end>: New fields.
5362         * linux-x86-low.c (x86_supports_range_stepping): New.
5363         (the_low_target) <supports_range_stepping>: Set to
5364         x86_supports_range_stepping.
5365         * server.c (handle_v_cont): Handle 'r' action.
5366         (handle_v_requests): Append ";r" if the target supports range
5367         stepping.
5368         * target.h (struct thread_resume) <step_range_start,
5369         step_range_end>: New fields.
5370         (struct target_ops) <supports_range_stepping>:
5371         New field.
5372         (target_supports_range_stepping): New macro.
5373
5374 2013-05-17  Joel Brobecker  <brobecker@adacore.com>
5375
5376         * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
5377         confusion in comment.
5378
5379 2013-05-17  Joel Brobecker  <brobecker@adacore.com>
5380
5381         * lynx-low.c (struct process_info_private): New type.
5382         (lynx_add_process): New function.
5383         (lynx_create_inferior, lynx_attach): Replace calls to
5384         add_process by calls to lynx_add_process.
5385         (lynx_resume): If PTID is null, then try using
5386         current_process()->private->last_wait_event_ptid.
5387         Add comments.
5388         (lynx_clear_inferiors): Delete.  The contents of that function
5389         has been inlined in lynx_mourn;
5390         (lynx_wait_1): Save the ptid in the process's private data.
5391         (lynx_mourn): Free the process' private data.  Replace call
5392         to lynx_clear_inferiors by call to clear_inferiors.
5393
5394 2013-05-17  Yao Qi  <yao@codesourcery.com>
5395
5396         * i386-low.c (i386_length_and_rw_bits): Move the comment to
5397         the right place.
5398
5399 2013-05-16  Luis Machado  <lgustavo@codesourcery.com>
5400
5401         * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
5402         PT_DATA_ADDR and PT_TEXT_END_ADDR.  Update comments.
5403         (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
5404         PT_TEXT_END_ADDR guards.  Update comments.
5405         (linux_target_op) <read_offsets>: Conditionally define to
5406         linux_read_offsets if the target is UCLIBC and if it defines
5407         PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
5408
5409 2013-05-06  Sandra Loosemore  <sandra@codesourcery.com>
5410             Andrew Jenner  <andrew@codesourcery.com>
5411
5412         * Makefile.in (SFILES): Add linux-nios2-low.c.
5413         (clean): Add action to delete nios2-linux.c.
5414         (nios2-linux.c): New rule.
5415         * configure.srv: Add nios2*-*-linux*.
5416         * linux-nios2-low.c: New.
5417
5418 2013-05-03  Hafiz Abid Qadeer  <abidh@codesourcery.com>
5419
5420         * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
5421
5422 2013-04-25  Hui Zhu  <hui@codesourcery.com>
5423
5424         PR gdb/15186
5425         * ax.c (ax_printf): Add fflush.
5426
5427 2013-04-22  Tom Tromey  <tromey@redhat.com>
5428
5429         * Makefile.in (SFILES): Add filestuff.c.
5430         (OBS): Add filestuff.o.
5431         (filestuff.o): New target.
5432         * config.in, configure: Rebuild.
5433         * configure.ac: Check for fdwalk, pipe2.
5434
5435 2013-04-17  Pedro Alves  <palves@redhat.com>
5436
5437         * configure.ac (USE_THREAD_DB): Delete variable.
5438         (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
5439         Don't AC_SUBST USE_THREAD_DB.
5440         * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
5441         * config.in, configure: Regenerate.
5442
5443 2013-04-16  Pedro Alves  <palves@redhat.com>
5444
5445         * linux-low.h (struct lwp_info) <thread_known>: Move under
5446         the USE_THREAD_DB #ifdef.
5447
5448 2013-04-16  Pedro Alves  <palves@redhat.com>
5449
5450         * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
5451         (linux-low.o): Delete rule.
5452         * linux-low.h: Always include "gdb_thread_db.h" instead of
5453         conditionally including thread_db.h.
5454         (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
5455         HAVE_THREAD_DB_H.
5456
5457 2013-04-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
5458
5459         * Makefile.in (install-only): Fix make install regression.
5460
5461 2013-04-05  Jan Kratochvil  <jan.kratochvil@redhat.com>
5462
5463         Convert man pages to texinfo, new gdbinit.5 texinfo page.
5464         * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
5465         installation.
5466         * gdbserver.1: Remove.
5467
5468 2013-03-22  Pedro Alves  <palves@redhat.com>
5469
5470         * linux-low.c (handle_extended_wait): Don't call
5471         linux_enable_event_reporting.
5472
5473 2013-03-15  Tony Theodore  <tonyt@logyst.com>
5474
5475         PR build/9098:
5476         * Makefile.in (SHELL): Use @SHELL@.
5477
5478 2013-03-14  Sergio Durigan Junior  <sergiodj@redhat.com>
5479
5480         * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
5481         compiler warning.
5482
5483 2013-03-13  Joel Brobecker  <brobecker@adacore.com>
5484
5485         * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
5486         Remove extraneous NULL element.
5487
5488 2013-03-13  Yao Qi  <yao@codesourcery.com>
5489
5490         * tracepoint.c (traceframe_read_tsv): Look for the last matched
5491         'V' block in trace frame.
5492
5493 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
5494
5495         * target.h (struct target_ops): Add btrace ops.
5496         (target_supports_btrace): New macro.
5497         (target_enable_btrace): New macro.
5498         (target_disable_btrace): New macro.
5499         (target_read_btrace): New macro.
5500         * gdbthread.h (struct thread_info): Add btrace field.
5501         * server.c: Include btrace-common.h.
5502         (handle_btrace_general_set): New function.
5503         (handle_btrace_enable): New function.
5504         (handle_btrace_disable): New function.
5505         (handle_general_set): Call handle_btrace_general_set.
5506         (handle_qxfer_btrace): New function.
5507         (struct qxfer qxfer_packets[]): Add btrace entry.
5508         * inferiors.c (remove_thread): Disable btrace.
5509         * linux-low: Include linux-btrace.h.
5510         (linux_low_enable_btrace): New function.
5511         (linux_low_read_btrace): New function.
5512         (linux_target_ops): Add btrace ops.
5513         * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
5514         Add srv_linux_btrace=yes.
5515         (x86_64-*-linux*): Add linux-btrace.o.
5516         Add srv_linux_btrace=yes.
5517         * configure.ac: Define HAVE_LINUX_BTRACE.
5518         * config.in: Regenerated.
5519         * configure: Regenerated.
5520
5521 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
5522
5523         * server.c (handle_qxfer): Preserve error message if -3 is
5524         returned.
5525         (qxfer): Document the -3 return value.
5526
5527 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
5528
5529         * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
5530         (linux_btrace_h): New variable.
5531         (linux-btrace.o): New rule.
5532
5533 2013-03-08  Stan Shebs  <stan@codesourcery.com>
5534             Hafiz Abid Qadeer  <abidh@codesourcery.com>
5535
5536         * tracepoint.c (trace_buffer_size): New global.
5537         (DEFAULT_TRACE_BUFFER_SIZE): New define.
5538         (init_trace_buffer): Change to one-argument function. Allocate
5539         trace buffer memory.
5540         (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
5541         handle QTBuffer:size packet.
5542         (cmd_bigqtbuffer_size): New function.
5543         (initialize_tracepoint): Call init_trace_buffer with
5544         DEFAULT_TRACE_BUFFER_SIZE.
5545         * server.c (handle_query): Add QTBuffer:size in the
5546         supported packets.
5547
5548 2013-03-07  Yao Qi  <yao@codesourcery.com>
5549
5550         * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5551         (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5552         of -1.
5553         (cmd_qtsp): Adjust condition.  Do post increment.
5554         Set cur_action and cur_step_action back to 0.
5555
5556 2013-03-07  Jeremy Bennett  <jeremy.bennett@embecosm.com>
5557
5558         PR server/15236
5559         * linux-low.c (linux_write_memory): Return early success if LEN is
5560         zero.
5561
5562 2013-03-05  Corinna Vinschen  <vinschen@redhat.de>
5563
5564         * configure.srv: Add x86_64-*-cygwin* as target.
5565
5566 2013-02-28  Tom Tromey  <tromey@redhat.com>
5567
5568         * configure.ac: Invoke AC_SYS_LARGEFILE.
5569         * configure, config.in: Rebuild.
5570
5571 2013-02-28  Corinna Vinschen  <vinschen@redhat.com>
5572
5573         * win32-low.c: Throughout, fix format strings and casts of
5574         printf-like functions to avoid type related warnings on all
5575         platforms.
5576         (get_child_debug_event): Print dwDebugEventCode as hex since
5577         that's how it's usually documented.
5578
5579 2013-02-28  Yao Qi  <yao@codesourcery.com>
5580
5581         * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5582         pulongest.
5583
5584 2013-02-27  Jiong Wang  <jiwang@tilera.com>
5585
5586         * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5587         (reg-tilegx32.c): New rule.
5588         * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5589         * linux-tile-low.c (tile_arch_setup): New function.  Invoke
5590         different register info initializer according to elf class.
5591         (init_registers_tilgx32): New function.  The tilegx32 register info
5592         initializer.
5593         (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5594         (tile_store_gregset): Likewise.
5595
5596 2013-02-27  Yao Qi  <yao@codesourcery.com>
5597
5598         * server.c (process_point_options): Print debug message when
5599         debug_threads is true.
5600
5601 2013-02-26  Yao Qi  <yao@codesourcery.com>
5602
5603         * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5604
5605 2013-02-19  Pedro Alves  <palves@redhat.com>
5606             Kai Tietz <ktietz@redhat.com>
5607
5608         PR gdb/15161
5609
5610         * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5611         instead of strtoul to extract address from packet.
5612         (process_serial_event) <'z'>: Likewise.
5613
5614 2013-02-18  Yao Qi  <yao@codesourcery.com>
5615
5616         * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5617
5618 2013-02-14  Pedro Alves  <palves@redhat.com>
5619
5620         Plug memory leak.
5621
5622         * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5623         TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5624
5625 2013-02-14  Pedro Alves  <palves@redhat.com>
5626
5627         * tracepoint.c (cmd_qtdpsrc): Use savestring.
5628
5629 2013-02-14  Pedro Alves  <palves@redhat.com>
5630
5631         * tracepoint.c (save_string): Delete.
5632         (add_tracepoint_action): Use savestring instead of save_string.
5633
5634 2013-02-12  Pedro Alves  <palves@redhat.com>
5635
5636         * linux-xtensa-low.c: Ditto.
5637         * xtensa-xtregs.c: Ditto.
5638
5639 2013-02-12  Sanimir Agovic  <sanimir.agovic@intel.com>
5640
5641         * thread-db.c (thread_db_get_tls_address): NULL pointer check
5642         thread_db.
5643
5644 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
5645
5646         * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5647         aarch64_num_wp_regs and aarch64_num_bp_regs to
5648         AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5649
5650 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
5651
5652         * linux-aarch64-low.c (ps_get_thread_area): Replace
5653         PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5654
5655 2013-02-04  Jim MacArthur  <jim.macarthur@arm.com>
5656             Marcus Shawcroft  <marcus.shawcroft@arm.com>
5657             Nigel Stephens  <nigel.stephens@arm.com>
5658             Yufeng Zhang  <yufeng.zhang@arm.com>
5659
5660         * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5661         (aarch64.c, aarch64-without-fpu.c): New targets.
5662         * configure.srv (aarch64*-*-linux*): New.
5663         * linux-aarch64-low.c: New file.
5664
5665 2013-02-04  Marcus Shawcroft  <marcus.shawcroft@arm.com>
5666
5667         * linux-low.c (handle_extended_wait, linux_create_inferior)
5668         (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5669         (dequeue_one_deferred_signal, linux_resume_one_thread)
5670         (fetch_register, linux_write_memory, linux_enable_event_reporting)
5671         (linux_tracefork_grandchild, linux_test_for_tracefork)
5672         (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5673         PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5674         where the argument is 0.
5675
5676 2013-01-25  Yao Qi  <yao@codesourcery.com>
5677
5678         * event-loop.c: Include "queue.h".
5679         (gdb_event_p): New typedef.
5680         (struct gdb_event) <next_event>: Remove.
5681         (event_queue): Change to QUEUE(gdb_event_p).
5682         (async_queue_event): Remove.
5683         (gdb_event_xfree): New.
5684         (initialize_event_loop): New.
5685         (process_event): Use API from QUEUE.
5686         (wait_for_event): Likewise.
5687         * server.c (main): Call initialize_event_loop.
5688         * server.h (initialize_event_loop): Declare.
5689
5690 2013-01-18  Yao Qi  <yao@codesourcery.com>
5691
5692         * ax.h (struct eval_agent_expr_context): New.
5693         (gdb_eval_agent_expr): Update declaration.
5694         * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5695         TFRAME.  Add new argument CTX.
5696         * server.h (struct eval_agent_expr_context): Declare.
5697         (agent_mem_read, agent_tsv_read): Update declaration.
5698         (agent_mem_read_string): Likewise.
5699         * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5700         (add_traceframe_block): Add new argument TPOINT.
5701         Increase TPOINT->traceframe_usage.
5702         (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5703         eval_tracepoint_agent_expr.
5704         (condition_true_at_tracepoint): Likewise.
5705         (agent_mem_read): Remove argument TFRAME.  Add argument CTX.
5706         (agent_mem_read_string, agent_tsv_read): Likewise.
5707
5708 2013-01-16  Yao Qi  <yao@codesourcery.com>
5709
5710         * linux-low.c (linux_resume_one_lwp): Don't check
5711         'lwp->bp_reinsert != 0'.
5712
5713 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
5714             Pedro Alves  <palves@redhat.com>
5715
5716         * lynx-low.c (ptrace_request_to_str): Define a temporary
5717         macro and use it to simplify this function's implementation.
5718
5719 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
5720
5721         * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5722         sets errno.
5723
5724 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
5725
5726         * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5727
5728 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
5729
5730         * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5731
5732 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
5733
5734         * lynx-low.c (lynx_resume): Use the resume_info parameter
5735         to determine the ptid for the lynx_ptrace call, unless
5736         it is equal to minus_one_ptid, in which case we use the
5737         ptid of the current_inferior.
5738         (lynx_wait_1): After having received a thread create/exit
5739         event, resume the inferior's execution using the signaling
5740         thread's ptid, rather than the old ptid.
5741
5742 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
5743
5744         * lynx-low.c (lynx_resume): Delete variable ret.
5745
5746 2013-01-01  Joel Brobecker  <brobecker@adacore.com>
5747
5748         * gdbreplay.c (gdbreplay_version): Update copyright year.
5749         * server.c (gdbserver_version): Likewise.
5750
5751 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
5752
5753         * lynx-low.c (lynx_wait_1): Add debug trace before adding
5754         new thread.
5755
5756 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
5757
5758         * lynx-low.c (ptrace_request_to_str): Add handling for
5759         PTRACE_GETTRACESIG.
5760
5761 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
5762
5763         * lynx-low.c (lynx_attach): Delete variable new_process.
5764
5765 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
5766
5767         * lynx-low.c (lynx_create_inferior): Delete variable
5768         new_process.
5769
5770 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
5771
5772         * lynx-low.c (ptrace_request_to_str): Do not handle
5773         PTRACE_GETTHREADLIST if this macro does not exist.
5774
5775 2012-12-15  Yao Qi  <yao@codesourcery.com>
5776
5777         * Makefile.in (OBS): Add notif.o.
5778         * notif.c, notif.h: New.
5779         * server.c: Include "notif.h".
5780         (struct vstop_notif) <next>: Remove.
5781         <base>: New field.
5782         (queue_stop_reply): Update.
5783         (push_event, send_next_stop_reply): Remove.
5784         (discard_queued_stop_replies): Update.
5785         (notif_stop): New variable.
5786         (handle_v_stopped): Remove.
5787         (handle_v_requests): Don't call handle_v_stopped.  Call
5788         handle_ack_notif instead.
5789         (queue_stop_reply_callback): Call notif_event_enque instead
5790         of queue_stop_reply.
5791         (handle_status): Don't call send_next_stop_reply, call
5792         notif_write_event instead.
5793         (kill_inferior_callback): Likewise.
5794         (detach_or_kill_inferior_callback): Likewise.
5795         (main): Call initialize_notif.
5796         (process_serial_event): Call QUEUE_is_empty.
5797         (handle_target_event): Call notif_push instead of push event.
5798         * server.h (push_event): Remove declaration.
5799
5800 2012-12-10  Tom Tromey  <tromey@redhat.com>
5801
5802         * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5803         (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5804         macros.
5805         (.c.o): Rewrite.
5806         (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5807         (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5808         (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5809         (amd64-linux-ipa.o, ax.o): Rewrite.
5810         (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5811         (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5812         (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5813         (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5814         (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5815         (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5816         (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5817         (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5818         (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5819         (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5820         (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5821         (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5822         (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5823         (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5824         (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5825         (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5826         (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5827         (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5828         (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5829         (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5830         (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5831         (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5832         (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5833         (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5834         (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5835         (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5836         (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5837         (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5838         (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5839         (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5840         (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5841         (reg-tilegx.o): Remove.
5842         (all_object_files): New macro.
5843         Include .deps files.
5844         * aclocal.m4, configure: Rebuild.
5845         * acinclude.m4: Include depstand.m4, lead-dot.m4.
5846         * configure.ac: Invoke ZW_CREATE_DEPDIR,
5847         ZW_PROG_COMPILER_DEPENDENCIES.  Compute GMAKE condition.
5848
5849 2012-12-05  Tom Tromey  <tromey@redhat.com>
5850
5851         PR gdb/14917:
5852         * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5853
5854 2012-11-28  Markus Metzger  <markus.t.metzger@intel.com>
5855
5856         * configure.ac: Check for linux/perf_event.h.
5857         * config.in: Regenerated.
5858         * configure: Regenerated.
5859
5860 2012-11-26  Maxime Villard  <rustyBSD@gmx.fr>
5861
5862         * hostio.c (handle_readlink): Decrease buffer size
5863         parameter passed to readlink by one byte.
5864
5865 2012-11-26  Yao Qi  <yao@codesourcery.com>
5866
5867         * configure.ac (build_warnings): Append '-Wempty-body'.
5868         * configure: Regenerated.
5869         * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5870         body.
5871
5872 2012-11-15  Pierre Muller  <muller@sourceware.org>
5873
5874         * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5875         * config.in: Regenerate.
5876         * configure: Regenerate.
5877         * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5878         Use "gdb_wait.h" header instead of <sys/wait.h> header.
5879         * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5880         * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5881         header.
5882         * server.c: Remove HAVE_WAIT_H conditional.  Use "gdb_wait.h" header
5883         instead of <sys/wait.h> header.
5884         * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5885
5886 2012-11-13 Markus Metzger  <markus.t.metzger@intel.com>
5887
5888         * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5889         (various make rules): Remove -DGDBSERVER
5890
5891 2012-11-09  Yao Qi  <yao@codesourcery.com>
5892
5893         * spu-low.c (current_ptid): Move it to ..
5894         * gdbthread.h: ... here.  New.
5895         * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5896         * server.c (myresume, process_serial_event): Likewise.
5897         * thread-db.c (thread_db_find_new_threads): Likewise.
5898         * tracepoint.c (run_inferior_command): Likewise.
5899
5900 2012-10-01  Andrew Burgess  <aburgess@broadcom.com>
5901
5902         * server.c (handle_search_memory_1): Include access length in
5903         warning message.
5904
5905 2012-09-05  Michael Brandt  <michael.brandt@axis.com>
5906
5907         * linux-crisv32-low.c: Fix compile errors.
5908
5909 2012-09-04  Yao Qi  <yao@codesourcery.com>
5910
5911         * tracepoint.c (cmd_qtsv): Adjust debug message.
5912         Don't check CUR_TPOINT.
5913
5914 2012-08-28  Yao Qi  <yao@codesourcery.com>
5915
5916         * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5917         * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5918         (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5919         Remove declarations of xmalloc, xreallloc, xstrdup and
5920         freeargv.
5921         * Makefile.in (libiberty_h): New.
5922         (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5923         (linux-bfin-low.o): Append dependency 'libiberty.h'.
5924
5925 2012-08-23  Yao Qi  <yao@codesourcery.com>
5926
5927         * server.h: Remove declaration of 'xsnprintf'.
5928
5929 2012-08-22  Keith Seitz  <keiths@redhat.com>
5930
5931         * server.h: Include build-gnulib-gbserver/config.h.
5932         * gdbreplay.c: Likewise.
5933
5934 2012-08-08  Doug Evans  <dje@google.com>
5935
5936         * Makefile.in (SFILES): Add gdb_vecs.c.
5937         (OBS): Add gdb_vecs.o.
5938         (gdb_vecs_h, host_defs_h): New variables.
5939         (thread-db.o): Add $(gdb_vecs_h) dependency.
5940         (gdb_vecs.o): New rule.
5941         * thread-db.c: #include "gdb_vecs.h".
5942         (thread_db_load_search): Use a vector to iterate over path elements.
5943         Handle text appearing after "$pdir".
5944
5945         * configure.ac: Add check for strstr.
5946         * config.in: Regenerate.
5947         * configure: Regenerate.
5948
5949 2012-08-02  Ulrich Weigand  <ulrich.weigand@linaro.org>
5950
5951         * hostio.c (handle_pread): If pread fails, fall back to attempting
5952         lseek/read.
5953         (handle_pwrite): Likewise for pwrite.
5954
5955 2012-08-01  Ulrich Weigand  <ulrich.weigand@linaro.org>
5956
5957         * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5958         between unsupported TYPE and unimplementable ADDR/LEN combination.
5959         (arm_insert_point): Act on new return value.
5960
5961 2012-07-31  Pedro Alves  <palves@redhat.com>
5962
5963         * server.c (process_point_options): Only skip tokens if we find
5964         one that is unrecognized.  Don't treat 'X' specially while
5965         skipping unrecognized tokens.
5966
5967 2012-07-30  Ulrich Weigand  <ulrich.weigand@linaro.org>
5968
5969         * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5970         to 4-byte-align HW breakpoint addresses for Thumb.
5971
5972 2012-07-27  Yao Qi  <yao@codesourcery.com>
5973
5974         PR remote/14161.
5975
5976         * server.h: Declare gdb_agent_about_to_close.
5977         * target.c (kill_inferior): Include "agent.h".
5978         New.  Send command 'kill'.
5979         * target.h (kill_inferior): Removed macro.
5980         * tracepoint.c (gdb_agent_about_to_close): New.
5981         (gdb_agent_helper_thread): Handle command 'close'.
5982         Wait endlessly until the inferior stops.
5983         Install gdb_agent_remove_socket to atexit hook.
5984         (agent_socket_name): New static variable.
5985         (gdb_agent_socket_init): Replace local variable 'name' with
5986         'agent_socket_name'.
5987         (gdb_agent_remove_socket): New.
5988
5989 2012-07-27  Yao Qi  <yao@codesourcery.com>
5990
5991         * server.c (process_point_options): Stop at 'X' when parsing.
5992
5993 2012-07-19  Michael Eager  <eager@eagercon.com>
5994
5995         * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
5996         to hw_execute.
5997         * linux-x86-low.c (x86_insert_point, x86_remove_point):
5998         Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5999         hardware breakpoint.
6000
6001 2012-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
6002
6003         * gdbserver/linux-low.c (initialize_low): Call
6004         linux_ptrace_init_warnings.
6005
6006 2012-07-02  Doug Evans  <dje@google.com>
6007
6008         * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
6009         pointer to int.
6010
6011 2012-07-02  Stan Shebs  <stan@codesourcery.com>
6012
6013         * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
6014         (ax.o): Add it to build rule.
6015         (ax-ipa.o): Ditto.
6016         (OBS): Add format.o.
6017         (IPA_OBS): Add format.o.
6018         * server.c (handle_query): Claim support for breakpoint commands.
6019         (process_point_options): Add command case.
6020         (process_serial_event): Leave running if there are printfs in
6021         effect.
6022         * mem-break.h (any_persistent_commands): Declare.
6023         (add_breakpoint_commands): Declare.
6024         (gdb_no_commands_at_breakpoint): Declare.
6025         (run_breakpoint_commands): Declare.
6026         * mem-break.c (struct point_command_list): New struct.
6027         (struct breakpoint): New field command_list.
6028         (any_persistent_commands): New function.
6029         (add_commands_to_breakpoint): New function.
6030         (add_breakpoint_commands): New function.
6031         (gdb_no_commands_at_breakpoint): New function.
6032         (run_breakpoint_commands): New function.
6033         * linux-low.c (linux_wait_1): Test for and run breakpoint commands
6034         locally.
6035         * ax.c: Include format.h.
6036         (ax_printf): New function.
6037         (gdb_eval_agent_expr): Add printf opcode.
6038
6039 2012-06-13  Yao Qi  <yao@codesourcery.com>
6040
6041         * server.c (start_inferior): Remove duplicated writes to fields
6042         'last_resume_kind' and 'last_status' of 'current_inferior'.
6043
6044 2012-06-12  Yao Qi  <yao@codesourcery.com>
6045             Pedro Alves  <palves@redhat.com>
6046
6047         * linux-low.c (linux_set_resume_request): Simplify predicate.  Add
6048         comment.
6049         * server.c (handle_v_cont): Extend comment.
6050
6051 2012-06-11  Yao Qi  <yao@codesourcery.com>
6052
6053         * linux-low.c (linux_attach): Add 'static'.
6054
6055 2012-06-06  Yao Qi  <yao@codesourcery.com>
6056
6057         * ax.c (gdb_eval_agent_expr): Print `top' in hex.
6058
6059 2012-06-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
6060
6061         Fix gcc -flto compilation warning.
6062         * server.c (main): Make variable multi_mode and attach volatile.
6063
6064 2012-05-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
6065
6066         * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
6067         if the platform doesn't know about it.
6068
6069 2012-05-30  Jeff Kenton  <jkenton@tilera.com>
6070
6071         * Makefile.in (SFILES): Add linux-tile-low.c.
6072         (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
6073         * configure.srv: Handle tilegx-*-linux*.
6074         * linux-tile-low.c: New file.
6075
6076 2012-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
6077
6078         * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
6079
6080 2012-05-24  Pedro Alves  <palves@redhat.com>
6081
6082         PR gdb/7205
6083
6084         Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
6085
6086 2012-05-24  Pedro Alves  <palves@redhat.com>
6087
6088         PR gdb/7205
6089
6090         Replace target_signal with gdb_signal throughout.
6091
6092 2012-05-22  Maciej W. Rozycki  <macro@codesourcery.com>
6093
6094         * linux-low.c (linux_store_registers): Avoid the copying sequence
6095         when no data has been retrieved by ptrace.
6096
6097 2012-05-22  Will Deacon  <will.deacon@arm.com>
6098
6099         * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
6100         Include asm/ptrace.h.
6101         (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
6102         already defined.
6103
6104 2012-05-21  Maciej W. Rozycki  <macro@codesourcery.com>
6105
6106         * linux-low.c (linux_store_registers): Don't re-retrieve data
6107         with ptrace that has already been obtained from /proc.  Always
6108         copy any data retrieved with ptrace to the buffer supplied.
6109
6110 2012-05-11  Yao Qi  <yao@codesourcery.com>
6111             Pedro Alves  <palves@redhat.com>
6112
6113         * linux-low.c (enum stopping_threads_kind): New.
6114         (stopping_threads): Change type to `enum stopping_threads_kind'.
6115         (handle_extended_wait): If stopping and suspending threads, leave
6116         the new_lwp suspended too.
6117         (linux_wait_for_event): Adjust.
6118         (stop_all_lwps): Set `stopping_threads' to
6119         STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
6120         whether we're suspending threads or just stopping them.  Assert no
6121         recursion happens.
6122
6123 2012-04-29  Yao Qi  <yao@codesourcery.com>
6124
6125         * server.h: Move some code to ...
6126         * gdbthread.h: ... here.  New.
6127         * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
6128         (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
6129         (nto-low.o, win32-low.o): Likewise.
6130         * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
6131         * regcache.c, remote-utils.c, server.c: Likewise.
6132         * target.c, tracepoint.c, win32-low.c: Likewise.
6133
6134 2012-04-24  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
6135
6136         * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
6137         (PTRACE_ARG4_TYPE): Likewise.
6138         (PTRACE_XFER_TYPE): Likewise.
6139         * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
6140         ptrace to PTRACE_ARG3_TYPE.
6141         * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
6142         (PTRACE_ARG4_TYPE): Likewise.
6143         (PTRACE_XFER_TYPE): Likewise.
6144         (linux_detach_one_lwp): Cast fourth argument of
6145         ptrace to long then PTRACE_ARG4_TYPE.
6146         (regsets_fetch_inferior_registers): Cast third argument of
6147         ptrace to long then PTRACE_ARG3_TYPE.
6148         (regsets_store_inferior_registers): Likewise.
6149
6150 2012-04-20  Pedro Alves  <palves@redhat.com>
6151
6152         * configure: Regenerate.
6153
6154 2012-04-19  Pedro Alves  <palves@redhat.com>
6155
6156         * Makefile.in (GNULIB_BUILDDIR): New.
6157         (LIBGNU, INCGNU, GNULIB_H): Adjust.
6158         (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
6159         (all, install-only, uninstall, clean-info, all-lib, clean): No
6160         longer pass GNULIB_FLAGS_TO_PASS.  Use subdir_do.
6161         (maintainer-clean realclean distclean): Use subdir_do.
6162         (subdir_do): New.
6163         (gnulib/import/Makefile): Adjust.  Replace gnulib/import with
6164         $(GNULIB_BUILDDIR).  Don't pass argument to config.status.
6165         * acinclude.m4: Include acx_configure_dir.m4.
6166         * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
6167         calls.  Call AC_PROG_RANLIB.  Configure gnulib using
6168         ACX_CONFIGURE_DIR.
6169         (GNULIB): New.
6170         (GNULIB_STDINT_H): Adjust.
6171         (AC_OUTPUT): Don't output gnulib/Makefile anymore.
6172         * gdbreplay.c: Include build-gnulib/config.h.
6173         * server.h: Likewise.
6174         * aclocal.m4: Regenerate.
6175         * config.in: Regenerate.
6176         * configure: Regenerate.
6177
6178 2012-04-19  Pedro Alves  <palves@redhat.com>
6179
6180         * Makefile.in (LIBGNU, INCGNU): Adjust.
6181         (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
6182         (all, install-only, uninstall, clean-info, all-lib, clean)
6183         (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
6184         * configure.ac: Adjust AC_OUTPUT output.
6185         * aclocal.m4: Regenerate.
6186         * configure: Regenerate.
6187
6188 2012-04-19  Pedro Alves  <palves@redhat.com>
6189
6190         * Makefile.in (generated_files): New.
6191         (server_h): Remove the explicit dependency on config.h, and depend
6192         on $generated_files.
6193
6194 2012-04-19  Pedro Alves  <palves@redhat.com>
6195
6196         * Makefile.in (INCGNU): Add -Ignulib.
6197
6198 2012-04-19  Pedro Alves  <palves@redhat.com>
6199
6200         * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
6201         (INCGNU): ... this, and spell out -I here.
6202         (GNULIB_LIB): Rename to ...
6203         (LIBGNU): ... this.
6204         (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
6205
6206 2012-04-19  Pedro Alves  <palves@redhat.com>
6207
6208         * config.in: Regenerate.
6209
6210 2012-04-19  Pedro Alves  <palves@redhat.com>
6211
6212         * configure.ac: Remove AC_CHECK_DECLS check for memmem.
6213         * server.h (memmem): Remove declaration.
6214         * config.in: Regenerate.
6215         * configure: Regenerate.
6216
6217 2012-04-19  Yao Qi  <yao@codesourcery.com>
6218
6219         * Makefile.in (SFILES): Add common/vec.c.
6220         (OBS): Add vec.o.
6221         (vec.o): New rule.
6222
6223 2012-04-19  Yao Qi  <yao@codesourcery.com>
6224
6225         * remote-utils.c (prepare_resume_reply): Replace with macro
6226         target_core_of_thread.
6227         * server.c (handle_qxfer_threads_proper): Likewise.
6228         * target.h (traget_core_of_thread): New macro.
6229
6230 2012-04-18  Pedro Alves  <palves@redhat.com>
6231
6232         * aclocal.m4: Regenerate.
6233         * configure: Regenerate.
6234
6235 2012-04-16  Yao Qi  <yao@codesourcery.com>
6236
6237         * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
6238         duplicated on address.
6239
6240 2012-04-16  Yao Qi  <yao@codesourcery.com>
6241
6242         * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
6243         (struct tracepoint_action_ops) <send>: New field.
6244         (m_tracepoint_action_send, r_tracepoint_action_send): New.
6245         (agent_expr_send, x_tracepoint_action_send): New.
6246         (l_tracepoint_action_send): New.
6247         (cmd_qtdp): Download and install tracepoint
6248         according to `use_agent'.
6249         (run_inferior_command): Add one more parameter `len'.
6250         Update callers.
6251         (tracepoint_send_agent): New.
6252         (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
6253
6254 2012-04-16  Yao Qi  <yao@codesourcery.com>
6255
6256         * tracepoint.c (download_tracepoints): Moved to ...
6257         (cmd_qtstart): ... here.
6258
6259 2012-04-14  Yao Qi  <yao@codesourcery.com>
6260
6261         * tracepoint.c: Include inttypes.h.
6262         (struct collect_memory_action): Use sized types.
6263         (struct tracepoint): Likewise.
6264         (cmd_qtdp, stop_tracing): Update print specifiers.
6265         (cmd_qtp, response_tracepoint): Likewise.
6266         (collect_data_at_tracepoint): Likewise.
6267         (collect_data_at_step): Likewise.
6268
6269 2012-04-14  Yao Qi  <yao@codesourcery.com>
6270
6271         Import gnulib module inttypes.
6272         * aclocal.m4, config.in, configure: Regenerated.
6273
6274 2012-04-14  Yao Qi  <yao@codesourcery.com>
6275
6276         * Makefile.in (maintainer-clean, realclean, distclean): Remove
6277         Makefile and config.status at last.
6278
6279 2012-04-13  Yao Qi  <yao@codesourcery.com>
6280
6281         * tracepoint.c: Include stdint.h unconditionally.
6282
6283 2012-04-13  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
6284
6285         * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
6286         on BFD_HAVE_SYS_PROCFS_TYPE.
6287         * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
6288         * configure: Regenerate.
6289         * config.in: Likewise.
6290
6291 2012-04-13  H.J. Lu  <hongjiu.lu@intel.com>
6292
6293         * Makefile.in (clean): Also remove x32.c x32-linux.c
6294         x32-avx.c x32-avx-linux.c.
6295         (x32.o): New target.
6296         (x32.c): Likewise.
6297         (x32-linux.o): Likewise.
6298         (x32-linux.c): Likewise.
6299         (x32-avx.o): Likewise.
6300         (x32-avx.c): Likewise.
6301         (x32-avx-linux.o): Likewise.
6302         (x32-avx-linux.c): Likewise.
6303
6304         * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
6305         (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
6306         (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
6307         (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
6308         (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
6309         i386/x32-avx-linux.xml.
6310
6311         * linux-x86-low.c (init_registers_x32_linux): New prototype.
6312         (init_registers_x32_avx_linux): Likwise.
6313         (x86_linux_update_xmltarget): Call init_registers_x32_linux
6314         or init_registers_x32_avx_linux if linux_is_elf64 is false.
6315
6316 2012-04-13  Pedro Alves  <palves@redhat.com>
6317
6318         * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
6319         (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
6320         (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
6321         (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
6322         the sub-make.
6323
6324 2012-04-12  H.J. Lu  <hongjiu.lu@intel.com>
6325
6326         * linux-x86-low.c (compat_x32_clock_t): New.
6327         (compat_x32_siginfo_t): Likewise.
6328         (compat_x32_siginfo_from_siginfo): Likewise.
6329         (siginfo_from_compat_x32_siginfo): Likewise.
6330         (linux_is_elf64): Likewise.
6331         (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
6332         and siginfo_from_compat_x32_siginfo for x32.
6333         (x86_arch_setup): Set linux_is_elf64.
6334
6335 2012-04-12  H.J. Lu  <hongjiu.lu@intel.com>
6336
6337         PR gdb/13969
6338         * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
6339         e_machine field.
6340         (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
6341         * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
6342         * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
6343         compatible with process.
6344
6345 2012-04-12  Yao Qi  <yao@codesourcery.com>
6346
6347         * Makefile.in: Define abs_top_srcdir and abs_srcdir.
6348         (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
6349         (install-only, install-info, clean): Handle sub dir gnulib.
6350         (all-lib, am--refresh): New targets.
6351         (memmem.o): Remove target.
6352         * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
6353         Invoke gl_EARLY.  Invoke AC_CHECK_PROGS for make.
6354         (AC_REPLACE_FUNCS): Remove memmem.
6355         Invoke gl_INIT and AM_INIT_AUTOMAKE.
6356         (AC_OUTPUT): Generate Makefile in gnulib/.
6357         * aclocal.m4, config.in, configure: Regenerated.
6358
6359 2012-04-10  Maciej W. Rozycki  <macro@codesourcery.com>
6360
6361         * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
6362
6363 2012-04-05  Pedro Alves  <palves@redhat.com>
6364
6365         -Werror=strict-aliasing
6366
6367         * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
6368         pointer.
6369
6370 2012-04-04  Pedro Alves  <palves@redhat.com>
6371
6372         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6373         (sparc_store_gregset_from_stack, sparc_store_gregset)
6374         (sparc_breakpoint_at): Fix formatting.
6375
6376 2012-03-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
6377
6378         * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
6379         are available.
6380         * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
6381         [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
6382         * config.in: Regenerate.
6383         * configure: Likewise.
6384
6385 2012-03-29  Pedro Alves  <palves@redhat.com>
6386
6387         * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
6388         Correct ptrace arguments.
6389
6390 2012-03-28  Pedro Alves  <palves@redhat.com>
6391
6392         * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
6393         (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
6394         (IA64_FR1_REGNUM): New defines.
6395         (ia64_fetch_register): New.
6396         (the_low_target): Install it.
6397         * linux-low.h (struct linux_target_ops) <fetch_register>: New
6398         field.
6399         * linux-low.c (linux_fetch_registers): Try the
6400         the_low_target.fetch_register hook first.
6401
6402         * linux-arm-low.c (the_low_target): Adjust.
6403         * linux-bfin-low.c (the_low_target): Adjust.
6404         * linux-cris-low.c (the_low_target): Adjust.
6405         * linux-crisv32-low.c (the_low_target): Adjust.
6406         * linux-m32r-low.c (the_low_target): Adjust.
6407         * linux-m68k-low.c (the_low_target): Adjust.
6408         * linux-mips-low.c (the_low_target): Adjust.
6409         * linux-ppc-low.c (the_low_target): Adjust.
6410         * linux-s390-low.c (the_low_target): Adjust.
6411         * linux-sh-low.c (the_low_target): Adjust.
6412         * linux-sparc-low.c (the_low_target): Adjust.
6413         * linux-tic6x-low.c (the_low_target): Adjust.
6414         * linux-x86-low.c (the_low_target): Adjust.
6415         * linux-xtensa-low.c (the_low_target): Adjust.
6416
6417 2012-03-26  Pedro Alves  <palves@redhat.com>
6418
6419         * server.c (handle_qxfer_libraries): Don't bail early if
6420         the_target->qxfer_libraries_svr4 is not NULL.
6421
6422 2012-03-26  Pedro Alves  <palves@redhat.com>
6423
6424         * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
6425
6426 2012-03-23  Pedro Alves  <palves@redhat.com>
6427
6428         * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
6429         "library-list-svr4" element's start tag when the the DSO list is
6430         empty.
6431
6432 2012-03-23  Pedro Alves  <palves@redhat.com>
6433
6434         * linux-low.c (read_one_ptr): Read the inferior's pointer through
6435         a variable whose type size is the same as the inferior's pointer
6436         size.
6437
6438 2012-03-21  Thomas Schwinge  <thomas@codesourcery.com>
6439
6440         * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
6441         struct siginfo.
6442         * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
6443         * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6444         * linux-low.h: Include <signal.h>.
6445         (struct siginfo): Remove forward declaration.
6446         (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
6447         struct siginfo.
6448
6449 2012-03-21  Mike Frysinger  <vapier@gentoo.org>
6450
6451         * .gitignore: Ignore more files.
6452
6453 2012-03-19  Pedro Alves  <palves@redhat.com>
6454             Jan Kratochvil  <jan.kratochvil@redhat.com>
6455
6456         * server.c (cont_thread, general_thread): Add describing comments.
6457         (start_inferior): Clear `cont_thread'.
6458         (handle_v_cont): Don't set `cont_thread' if resuming all threads
6459         of a process.
6460
6461 2012-03-15  Yao Qi  <yao@codesourcery.com>
6462
6463         * tracepoint.c (install_tracepoint): Move duplicated tracepoint
6464         handling to ...
6465         (cmd_qtdp): ... here.
6466
6467 2012-03-15  Yao Qi  <yao@codesourcery.com>
6468
6469         * tracepoint.c (struct tracepoint_action_ops): New.
6470         (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
6471         (m_tracepoint_action_download): New.
6472         (r_tracepoint_action_download): New.
6473         (x_tracepoint_action_download): New.
6474         (l_tracepoint_action_download): New.
6475         (add_tracepoint_action): Install `action->ops' according type.
6476         (download_tracepoint_1): Move code `download' function pointer
6477         of various tracepoint_action_ops.
6478
6479 2012-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
6480
6481         * linux-low.c (linux_attach_lwp_1): New variable buffer.  Call
6482         linux_ptrace_attach_warnings.
6483
6484 2012-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
6485
6486         * Makefile.in (linux-ptrace.o): New.
6487         * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
6488         (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
6489         (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
6490         (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
6491         (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
6492         of these targets.
6493         * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
6494
6495 2012-03-08  Yao Qi  <yao@codesourcery.com>
6496             Pedro Alves  <palves@redhat.com>
6497
6498         Fix PR server/13392.
6499         * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
6500         offset of JMP insn.
6501         * tracepoint.c (remove_tracepoint): New.
6502         (cmd_qtdp): Call remove_tracepoint when failed to install.
6503
6504 2012-03-07  Pedro Alves  <palves@redhat.com>
6505
6506         * linux-low.c (get_detach_signal): New.
6507         (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
6508         Pass on pending signals to PTRACE_DETACH.  Check the result of the
6509         ptrace call.
6510         * server.c (program_signals, program_signals_p): New.
6511         (handle_general_set): Handle QProgramSignals.
6512         * server.h (program_signals, program_signals_p): Declare.
6513
6514 2012-03-05  Pedro Alves  <palves@redhat.com>
6515             Jan Kratochvil  <jan.kratochvil@redhat.com>
6516
6517         * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
6518         New comment why.
6519
6520 2012-03-03  Yao Qi  <yao@codesourcery.com>
6521
6522         * tracepoint.c (tracepoint_look_up_symbols): Update call to
6523         agent_look_up_symbols.
6524
6525 2012-03-03  Yao Qi  <yao@codesourcery.com>
6526
6527         * Makefile.in (linux-low.o): Keep dependence on agent.h.
6528         (linux-x86-low.o): Likewise.
6529         * server.h: Remove in_process_agent_loaded.
6530         * tracepoint.c (in_process_agent_loaded): Removed.  Moved it
6531         common/agent.c.
6532         Update callers.
6533
6534 2012-03-03  Yao Qi  <yao@codesourcery.com>
6535
6536         * tracepoint.c (gdb_agent_capability): New global.
6537         (in_process_agent_loaded_ust): Renamed to
6538         `in_process_agent_supports_ust'.
6539         Update callers.
6540         (in_process_agent_supports_ust): Call agent_capability_check.
6541         (clear_installed_tracepoints): Assert that agent supports
6542         agent.
6543
6544 2012-03-03  Yao Qi  <yao@codesourcery.com>
6545
6546         * linux-low.c (linux_supports_agent): New.
6547         (linux_target_ops): Initialize field `supports_agent' with
6548         linux_supports_agent.
6549         * target.h (struct target_ops) <supports_agent>: New.
6550         (target_supports_agent): New macro.
6551         * server.c (handle_general_set): Handle packet 'QAgent'.
6552         (handle_query): Send `QAgent+'.
6553         * Makefile.in (server.o): Depends on agent.h.
6554
6555 2012-03-03  Yao Qi  <yao@codesourcery.com>
6556
6557         * Makefile.in (OBS): Add agent.o.
6558         Add new rule for agent.o.
6559         Track dependence of tracepoint.c on agent.h.
6560         * tracepoint.c (run_inferior_command_1):
6561         (run_inferior_command): Call agent_run_command.
6562         (gdb_ust_connect_sync_socket): Deleted.  Move it to
6563         common/agent.c.
6564         (resume_thread, stop_thread): Likewise.
6565         (gdb_ust_socket_init): Renamed to ...
6566         (gdb_agent_socket_init): ... New.
6567         (gdb_ust_thread): Renamed to ...
6568         (gdb_agent_helper_thread): ... New.
6569         (gdb_ust_init): Move some code to ...
6570         (gdb_agent_init): ... here.  New.
6571         [HAVE_UST]: Call gdb_ust_init.
6572         (initialize_tracepoint_ftlib):  Call gdb_agent_init.
6573         * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6574         * config.in, configure: Regenerated.
6575
6576 2012-03-02  Pedro Alves  <palves@redhat.com>
6577
6578         * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6579         * linux-low.c (struct simple_pid_list): New.
6580         (stopped_pids): New a struct simple_pid_list pointer.
6581         (add_to_pid_list, pull_pid_from_list): New.
6582         (handle_extended_wait): Don't assume the first signal new children
6583         report is SIGSTOP.  Adjust call to pull_pid_from_list.
6584         (linux_wait_for_lwp): Adjust.
6585
6586 2012-03-02  Yao Qi  <yao@codesourcery.com>
6587
6588         * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6589         debug log.
6590
6591 2012-03-02  Yao Qi  <yao@codesourcery.com>
6592
6593         * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6594         `stop_pc' and `tpoint'.  Update caller.
6595
6596 2012-03-01  Maciej W. Rozycki  <macro@codesourcery.com>
6597
6598         * linux-low.h (linux_target_ops): Add regset_bitmap member.
6599         * linux-low.c (use_linux_regsets): New macro.
6600         [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6601         [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6602         (linux_register_in_regsets): New function.
6603         (usr_fetch_inferior_registers): Skip registers covered by
6604         regsets.
6605         (usr_store_inferior_registers): Likewise.
6606         (usr_fetch_inferior_registers): New macro.
6607         (usr_store_inferior_registers): Likewise.
6608         (linux_fetch_registers): Handle mixed regset/non-regset targets.
6609         (linux_store_registers): Likewise.
6610         * linux-mips-low.c (init_registers_mips_dsp_linux): New
6611         prototype.
6612         (init_registers_mips64_dsp_linux): Likewise.
6613         (init_registers_mips_linux): New macro.
6614         (init_registers_mips_dsp_linux): Likewise.
6615         (mips_dsp_num_regs): Likewise.
6616         (DSP_BASE, DSP_CONTROL): New fallback macros.
6617         (mips_base_regs): New macro.
6618         (mips_regmap): Use it.  Fix the size.
6619         (mips_dsp_regmap): New variable.
6620         (mips_dsp_regset_bitmap): Likewise.
6621         (mips_arch_setup): New function.
6622         (mips_cannot_fetch_register): Use the_low_target.regmap rather
6623         than mips_regmap.
6624         (mips_cannot_store_register): Likewise.
6625         (the_low_target): Update .arch_setup, .num_regs and .regmap
6626         initializers.  Add .regset_bitmap initializer.
6627         * linux-arm-low.c (the_low_target): Add .regset_bitmap
6628         initializer.
6629         * linux-bfin-low.c (the_low_target): Likewise.
6630         * linux-cris-low.c (the_low_target): Likewise.
6631         * linux-crisv32-low.c (the_low_target): Likewise.
6632         * linux-ia64-low.c (the_low_target): Likewise.
6633         * linux-m32r-low.c (the_low_target): Likewise.
6634         * linux-m68k-low.c (the_low_target): Likewise.
6635         * linux-ppc-low.c (the_low_target): Likewise.
6636         * linux-s390-low.c (the_low_target): Likewise.
6637         * linux-sh-low.c (the_low_target): Likewise.
6638         * linux-sparc-low.c (the_low_target): Likewise.
6639         * linux-tic6x-low.c (the_low_target): Likewise.
6640         * linux-x86-low.c (the_low_target): Likewise.
6641         * linux-xtensa-low.c (the_low_target): Likewise.
6642         * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6643         mips64-dsp-linux.o to srv_regobj.  Add mips-dsp-linux.xml,
6644         mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6645         srv_xmlfiles.
6646         * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6647         (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6648
6649 2012-02-29  Yao Qi  <yao@codesourcery.com>
6650             Pedro Alves  <palves@redhat.com>
6651
6652         * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6653         `step_over_finished' is true.
6654
6655 2012-02-27  Pedro Alves  <palves@redhat.com>
6656
6657         * linux-low.c (pid_is_stopped): Delete, moved to common/.
6658         (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6659
6660 2012-02-27  Pedro Alves  <palves@redhat.com>
6661
6662         PR server/9684
6663         * linux-low.c (pid_is_stopped): New.
6664         (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6665
6666 2012-02-25  Luis Machado  <lgustavo@codesourcery.com>
6667
6668         * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6669         of conditions.
6670
6671 2012-02-24  Maciej W. Rozycki  <macro@codesourcery.com>
6672
6673         * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6674
6675 2012-02-24  Luis Machado  <lgustavo@codesourcery>
6676
6677         * server.c (handle_query): Advertise support for target-side
6678         breakpoint condition evaluation.
6679         (process_point_options): New function.
6680         (process_serial_event): When inserting a breakpoint, check for
6681         a target-side condition that should be evaluated.
6682
6683         * mem-break.c: Include regcache.h and ax.h.
6684         (point_cond_list_t): New data structure.
6685         (breakpoint) <cond_list>: New field.
6686         (find_gdb_breakpoint_at): Make non-static.
6687         (delete_gdb_breakpoint_at): Clear any target-side
6688         conditions.
6689         (clear_gdb_breakpoint_conditions): New function.
6690         (add_condition_to_breakpoint): Likewise.
6691         (add_breakpoint_condition): Likewise.
6692         (gdb_condition_true_at_breakpoint): Likewise.
6693         (gdb_breakpoint_here): Return result directly instead
6694         of going through a local variable.
6695
6696         * mem-break.h (find_gdb_breakpoint_at): New prototype.
6697         (clear_gdb_breakpoint_conditions): Likewise.
6698         (add_breakpoint_condition): Likewise.
6699         (gdb_condition_true_at_breakpoint): Likewise.
6700
6701         * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6702         (need_step_over_p): Take target-side breakpoint condition into
6703         consideration.
6704
6705 2012-02-24  Luis Machado  <lgustavo@codesourcery>
6706
6707         * server.h: Include tracepoint.h.
6708         (agent_mem_read, agent_get_trace_state_variable_value,
6709         agent_set_trace_state_variable_value,
6710         agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6711         get_set_tsv_func_addr): New prototypes.
6712
6713         * ax.h: New include file.
6714         * ax.c: New source file.
6715
6716         * tracepoint.c: Include ax.h.
6717         (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6718         agent_expr, eval_result_type): Move to ax.h.
6719         (parse_agent_expr): Rename to ...
6720         (gdb_parse_agent_expr): ... this, make it non-static and move
6721         to ax.h.
6722         (unparse_agent_expr) Rename to ...
6723         (gdb_unparse_agent_expr): ... this, make it non-static and move
6724         to ax.h.
6725         (eval_agent_expr): Rename to ...
6726         (eval_tracepoint_agent_expr): ... this.
6727         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6728         forward declarations.
6729         (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6730         (agent_get_trace_state_variable_value): New function.
6731         (agent_set_trace_state_variable_value): New function.
6732         (cmd_qtdp): Call gdb_parse_agent_expr (...).
6733         (response_tracepoint): Call gdb_unparse_agent_expr (...).
6734         (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6735         (condition_true_at_tracepoint): Likewise.
6736         (parse_agent_expr): Rename to ...
6737         (gdb_parse_agent_expr): ... this and move to ax.c.
6738         (unparse_agent_expr): Rename to ...
6739         (gdb_unparse_agent_expr): ... this and move to ax.c.
6740         (gdb_agent_op_name): Move to ax.c.
6741         (eval_agent_expr): Rename to ...
6742         (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6743         and move to ax.c.
6744         (eval_tracepoint_agent_expr): New function.
6745         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
6746         non-static.
6747         (current_insn_ptr, emit_error, struct bytecode_address): Move to
6748         ax.c.
6749         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6750         emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6751         emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6752         emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6753         emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6754         emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6755         emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6756         emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6757         (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6758         (compile_bytecodes): Remove forward declaration.
6759         (is_goto_target): Move to ax.c.
6760         (compile_bytecodes): Move to ax.c and call
6761         agent_get_trace_state_variable_value (...) and
6762         agent_set_trace_state_variable_value (...).
6763
6764         * Makefile.in: Update ax.c and IPA dependencies.
6765
6766 2012-02-24  Pedro Alves  <palves@redhat.com>
6767
6768         * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6769         (cmd_bigqtbuffer_circular): ... this.  Only handle
6770         'QTBuffer:circular:'.
6771         (handle_tracepoint_general_set): Adjust.
6772
6773 2012-02-16  Yao Qi  <yao@codesourcery.com>
6774
6775         * inferiors.c: Move code to ...
6776         * dll.c: .... here.  New.
6777         * server.h: Declare clear_dlls.
6778         * Makefile.in (SFILES): Add dll.c.
6779         (OBS): Add dll.o
6780         (dll.o): New rule.
6781
6782 2012-02-11  Yao Qi  <yao@codesourcery.com>
6783
6784         * server.c: (handle_monitor_command): Add a new parameter
6785         `own_buf'.
6786         (handle_query): Update caller.
6787
6788 2012-02-09  Joel Brobecker  <brobecker@adacore.com>
6789
6790         * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6791         * configure, config.in: Regenerate.
6792         * hostio.c: Provide an alternate implementation if HAVE_READLINK
6793         is not defined.
6794
6795 2012-02-02  Pedro Alves  <palves@redhat.com>
6796
6797         Try SIGKILL first, then PTRACE_KILL.
6798         * linux-low.c (linux_kill_one_lwp): New.
6799         (linux_kill_one_lwp): Rename to ...
6800         (kill_one_lwp_callback): ... this.  Use the new
6801         linux_kill_one_lwp.
6802
6803 2012-02-02  Pedro Alves  <palves@redhat.com>
6804
6805         * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6806         inferior.
6807
6808 2012-01-27  Pedro Alves  <palves@redhat.com>
6809
6810         * linux-low.c (linux_child_pid_to_exec_file): Delete.
6811         (elf_64_file_p): Make static.
6812         (linux_pid_exe_is_elf_64_file): New.
6813         * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6814         Delete declarations.
6815         (linux_pid_exe_is_elf_64_file): Declare.
6816         * linux-x86-low.c (x86_arch_setup): Use
6817         linux_pid_exe_is_elf_64_file.
6818
6819 2012-01-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
6820
6821         * linux-low.c (linux_wait_for_event_1): Rename to ...
6822         (linux_wait_for_event): ... here and merge it with former
6823         linux_wait_for_event - new variable wait_ptid, use it.
6824         (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6825
6826 2012-01-23  Pedro Alves  <palves@redhat.com>
6827
6828         * server.c (main): Avoid yet another case of infinite loop while
6829         detaching/killing after a longjmp.
6830
6831 2012-01-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
6832
6833         Code cleanup.
6834         * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6835
6836 2012-01-20  Ulrich Weigand  <ulrich.weigand@linaro.org>
6837
6838         * hostio.c (handle_readlink): New function.
6839         (handle_vFile): Call it to handle "vFile:readlink" packets.
6840
6841 2012-01-20  Pedro Alves  <palves@redhat.com>
6842             Ulrich Weigand  <ulrich.weigand@linaro.org>
6843
6844         * server.c (handle_v_requests): Only support vAttach and vRun to
6845         start multiple processes when in extended protocol mode.
6846
6847 2012-01-17  Pedro Alves  <palves@redhat.com>
6848
6849         * tracepoint.c (initialize_tracepoint): Use mmap instead of
6850         memalign plus mprotect to allocate the scratch buffer.
6851
6852 2012-01-13  Pedro Alves  <palves@redhat.com>
6853
6854         * server.c (attach_inferior): Clear `cont_thread'.
6855
6856 2012-01-13  Pedro Alves  <palves@redhat.com>
6857
6858         * server.c (main): Avoid infinite loop while detaching/killing
6859         after a longjmp.
6860
6861 2012-01-09  Doug Evans  <dje@google.com>
6862
6863         * server.c (start_inferior): Set last_ptid in --wrapper case.
6864
6865 2012-01-06  Yao Qi  <yao@codesourcery.com>
6866
6867         * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6868         defined.
6869         [IN_PROCESS_AGENT] (debug_agent): New global variable.
6870
6871 2012-01-04  Yao Qi  <yao@codesourcery.com>
6872
6873         * tracepoint.c (cmd_qtdp): Print debug message
6874         for static tracepoint.
6875
6876 2012-01-04  Yao Qi  <yao@codesourcery.com>
6877
6878         * tracepoint.c (trace_vdebug): Differentiate debug message
6879         between gdbserver and IPA.
6880
6881 2012-01-03  Yao Qi  <yao@codesourcery.com>
6882
6883         * tracepoint.c (tracepoint_was_hit): Don't collect for
6884         static tracepoint.
6885
6886 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
6887
6888         * terminal.h: Reformat copyright header.
6889
6890 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
6891
6892         * server.c (gdbserver_version): Update copyright year.
6893         * gdbreplay.c (gdbreplay_version): Likewise.
6894
6895 2011-12-18  Jan Kratochvil  <jan.kratochvil@redhat.com>
6896
6897         * linux-low.c (linux_create_inferior): Put empty if clause for write.
6898
6899         Revert:
6900         2011-12-18  Hui Zhu  <teawater@gmail.com>
6901         * linux-low.c (linux_create_inferior): Save return value to ret.
6902
6903 2011-12-18  Hui Zhu  <teawater@gmail.com>
6904
6905         * linux-low.c (linux_create_inferior): Save return value to ret.
6906
6907 2011-12-16  Doug Evans  <dje@google.com>
6908
6909         * linux-low.c (linux_create_inferior): If stdio connection,
6910         redirect stdin from /dev/null, stdout to stderr.
6911         * remote-utils.c (remote_is_stdio): New static global.
6912         (remote_connection_is_stdio): New function.
6913         (remote_prepare): Handle stdio connection.
6914         (remote_open): Ditto.
6915         (remote_close): Don't close stdin for stdio connections.
6916         (read_prim,write_prim): New functions.  Replace all calls to
6917         read/write to these.
6918         * server.c (main): Watch for "-" argument.  Move call to
6919         remote_prepare before start_inferior.
6920         * server.h (STDIO_CONNECTION_NAME): New macro.
6921         (remote_connection_is_stdio): Declare.
6922
6923         * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6924         in debugging output.
6925
6926 2011-12-15  Yao Qi  <yao@codesourcery.com>
6927
6928         * tracepoint.c: Include sys/syscall.h.
6929         (gdb_ust_thread): Remove preprocessor conditional.
6930
6931 2011-12-14  Pedro Alves  <pedro@codesourcery.com>
6932
6933         * linux-low.c (linux_detach_one_lwp): Call
6934         the_low_target.prepare_to_resume before detaching.
6935
6936 2011-12-14  Yao Qi  <yao@codesourcery.com>
6937
6938         * tracepoint.c (gdb_ust_thread): Don't ignore return value
6939         of write.
6940
6941 2011-12-14  Yao Qi  <yao@codesourcery.com>
6942
6943         * i386-low.c (i386_low_stopped_data_address): Initialize local
6944         variable `control'.
6945
6946 2011-12-13  Pedro Alves  <pedro@codesourcery.com>
6947
6948         PR remote/13492
6949
6950         * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6951         DR_CONTROL unless necessary.  Extend comments.
6952         * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6953         DR0-3 if not used.  If any watchpoint was set, clear DR_STATUS.
6954
6955 2011-12-13  Yao Qi  <yao@codesourcery.com>
6956
6957         * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6958         macros.
6959         (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6960
6961 2011-12-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
6962
6963         * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6964         Print new debug message for such case.
6965
6966 2011-12-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
6967
6968         Fix overlapping memcpy.
6969         * mem-break.c (set_raw_breakpoint_at): New variable buf.  Use it for
6970         the read_inferior_memory transfer.
6971         (delete_fast_tracepoint_jump): New variable buf.  Use it for the
6972         write_inferior_memory transfer.
6973         (set_fast_tracepoint_jump): New variable buf.  Use it for the
6974         read_inferior_memory and write_inferior_memory transfers.
6975         (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6976         (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6977         Use it for the write_inferior_memory transfer.
6978         (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6979         buffers.
6980
6981 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
6982
6983         * linux-low.c (fetch_register, store_register): Make code
6984         consistent, fix formatting.
6985
6986 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
6987
6988         * linux-low.c (usr_store_inferior_registers): Factor out code
6989         to handle individual registers into...
6990         (store_register): ... this new function.
6991
6992 2011-12-06  Ulrich Weigand  <uweigand@de.ibm.com>
6993
6994         * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6995         (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6996         (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6997         (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6998         (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6999         (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
7000         * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
7001         (srv_xmlfiles): Add new XML files.
7002
7003         * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
7004         and <sys/uio.h>.
7005         (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
7006         (init_registers_s390_linux32v1): Add prototype.
7007         (init_registers_s390_linux32v2): Likewise.
7008         (init_registers_s390_linux64v1): Likewise.
7009         (init_registers_s390_linux64v2): Likewise.
7010         (init_registers_s390x_linux64v1): Likewise.
7011         (init_registers_s390x_linux64v2): Likewise.
7012         (s390_num_regs): Increment to 52.
7013         (s390_regmap): Add orig_r2 register.
7014         (s390_num_regs_3264): Increment to 68.
7015         (s390_regmap_3264): Add orig_r2 register.
7016         (s390_collect_ptrace_register): Handle orig_r2 register.
7017         (s390_supply_ptrace_register): Likewise.
7018         (s390_fill_last_break): New function.
7019         (s390_store_last_break): Likewise.
7020         (s390_fill_system_call): New function.
7021         (s390_store_system_call): Likewise.
7022         (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
7023         register sets.
7024         (s390_check_regset): New function.
7025         (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
7026         NT_S390_SYSTEM_CALL regsets and use appropriate description.
7027         Update target_regsets for available register sets.
7028
7029 2011-12-02  Paul Pluzhnikov  <ppluzhnikov@google.com>
7030             Jan Kratochvil  <jan.kratochvil@redhat.com>
7031
7032         * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
7033         (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
7034         New.
7035         (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
7036         * linux-low.h (struct process_info_private): New member r_debug.
7037         * server.c (handle_qxfer_libraries): Call
7038         the_target->qxfer_libraries_svr4.
7039         (handle_qxfer_libraries_svr4): New function.
7040         (qxfer_packets): New entry "libraries-svr4".
7041         (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
7042         * target.h (struct target_ops): New member qxfer_libraries_svr4.
7043         * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
7044         PACKET_qXfer_libraries_svr4.
7045
7046 2011-11-30  Ulrich Weigand  <uweigand@de.ibm.com>
7047
7048         * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
7049         PSW address/mask between 8-byte and 16-byte formats.
7050         (s390_supply_ptrace_register): Likewise.
7051         (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
7052         basic addressing mode bit.
7053
7054 2011-11-24  Stan Shebs  <stan@codesourcery.com>
7055
7056         * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
7057
7058 2011-11-17  Stan Shebs  <stan@codesourcery.com>
7059
7060         * tracepoint.c (struct tracepoint): New field traceframe_usage.
7061         (tracing_start_time): New global.
7062         (tracing_stop_time): New global.
7063         (tracing_user_name): New global.
7064         (tracing_notes): New global.
7065         (tracing_stop_note): New global.
7066         (cmd_qtstart): Set traceframe_usage, start_time.
7067         (stop_tracing): Set stop_time.
7068         (cmd_qtstatus): Report additional status.
7069         (cmd_qtp): New function.
7070         (handle_tracepoint_query): Call it.
7071         (cmd_qtnotes): New function.
7072         (handle_tracepoint_general_set): Call it.
7073         (get_timestamp): Rename from tsv_get_timestamp.
7074
7075 2011-11-14  Stan Shebs  <stan@codesourcery.com>
7076             Kwok Cheung Yeung  <kcy@codesourcery.com>
7077
7078         * linux-x86-low.c (small_jump_insn): New.
7079         (i386_install_fast_tracepoint_jump_pad): Add arguments for
7080         trampoline and error message, build a trampoline and issue a small
7081         jump instruction to it.
7082         (x86_install_fast_tracepoint_jump_pad): Add arguments for
7083         trampoline and error message.
7084         (x86_get_min_fast_tracepoint_insn_len): New.
7085         (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
7086         * linux-low.h (struct linux_target_ops): Add arguments to
7087         install_fast_tracepoint_jump_pad operation, add new operation.
7088         * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
7089         arguments.
7090         (linux_get_min_fast_tracepoint_insn_len): New function.
7091         (linux_target_op): Add new operation.
7092         * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
7093         (gdb_trampoline_buffer_end): Ditto.
7094         (gdb_trampoline_buffer_error): Ditto.
7095         (struct ipa_sym_addresses): Add fields for new IPA variables.
7096         (symbol_list): Add entries for new IPA variables.
7097         (struct tracepoint): Add fields to hold the address range of the
7098         trampoline used by the tracepoint.
7099         (trampoline_buffer_head): New static variable.
7100         (trampoline_buffer_tail): Ditto.
7101         (claim_trampoline_space): New function.
7102         (have_fast_tracepoint_trampoline_buffer): New function.
7103         (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
7104         structure.
7105         (install_fast_tracepoint): Ditto, also add error buffer argument.
7106         (cmd_qtminftpilen): New function.
7107         (handle_tracepoint_query): Add response to qTMinFTPILen packet.
7108         (fast_tracepoint_from_trampoline_address): New function.
7109         (fast_tracepoint_collecting): Handle trampoline as part of jump
7110         pad space.
7111         (set_trampoline_buffer_space): New function.
7112         (initialize_tracepoint): Initialize new IPA variables.
7113         * target.h (struct target_ops): Add arguments to
7114         install_fast_tracepoint_jump_pad operation, add new
7115         get_min_fast_tracepoint_insn_len operation.
7116         (target_get_min_fast_tracepoint_insn_len): New.
7117         (install_fast_tracepoint_jump_pad): Add arguments.
7118         * server.h (IPA_BUFSIZ): Define.
7119         * linux-i386-ipa.c: Include extra header files.
7120         (initialize_fast_tracepoint_trampoline_buffer): New function.
7121         (initialize_low_tracepoint): Call it.
7122         * server.h (set_trampoline_buffer_space): Declare.
7123         (claim_trampoline_space): Ditto.
7124         (have_fast_tracepoint_trampoline_buffer): Ditto.
7125
7126 2011-11-14  Yao Qi  <yao@codesourcery.com>
7127
7128         * server.c (handle_query): Handle InstallInTrace for qSupported.
7129         * tracepoint.c (add_tracepoint): Sort list.
7130         (install_tracepoint, download_tracepoint): New.
7131         (cmd_qtdp): Call them to install and download tracepoints.
7132         (sort_tracepoints): Removed.
7133         (cmd_qtstart): Update.
7134
7135 2011-11-14  Yao Qi  <yao@codesourcery.com>
7136
7137         * mem-break.c (inc_ref_fast_tracepoint_jump): New.
7138         * mem-break.h: Declare.
7139         * tracepoint.c (cmd_qtstart): Move some code to ...
7140         (clone_fast_tracepoint, install_fast_tracepoint): ... here.
7141         New.
7142         (download_tracepoints): Move some code to ...
7143         (download_tracepoint_1): ... here.  New.
7144
7145 2011-11-08  Yao Qi  <yao@codesourcery.com>
7146
7147         * remote-utils.c (relocate_instruction): A comment fix.
7148
7149 2011-11-07  Joel Brobecker  <brobecker@adacore.com>
7150
7151         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
7152         (i386_dr_low_get_control, i386_dr_low_get_status): Use
7153         dr_status_mirror and dr_control_mirror from debug_reg_state.
7154         (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
7155         (i386_initial_stuff): Remove use of deleted globals.
7156         (i386_get_thread_context, i386_set_thread_context,
7157         i386_thread_added): Use dr_status_mirror and dr_control_mirror
7158         from debug_reg_state.
7159
7160 2011-11-05  Yao Qi  <yao@codesourcery.com>
7161
7162         * tracepoint.c (gdb_collect): Loop over tracepoints of same
7163         address as TPOINT's.
7164
7165 2011-11-02  Stan Shebs  <stan@codesourcery.com>
7166
7167         * tracepoint.c (agent_mem_read_string): New function.
7168         (eval_agent_expr): Call it for tracenz.
7169         * server.c (handle_query): Report support for tracenz.
7170
7171 2011-11-02  Yao Qi  <yao@codesourcery.com>
7172
7173         * tracepoint.c (cmd_qtstart): Remove unused local variables.
7174
7175 2011-11-02  Yao Qi  <yao@codesourcery.com>
7176
7177         * target.h: Fix a typo in comment.
7178
7179 2011-10-31  Pedro Alves  <pedro@codesourcery.com>
7180
7181         * mem-break.c (check_mem_write): Add `myaddr' parameter.  Don't
7182         clobber the breakpoints' shadows with fast tracepoint jumps.
7183         * mem-break.h (check_mem_write): Add `myaddr' parameter.
7184         * target.c (write_inferior_memory): Also pass MYADDR down to
7185         check_mem_write.
7186
7187 2011-10-07  Ulrich Weigand  <ulrich.weigand@linaro.org>
7188
7189         * configure.ac: Check support for personality routine.
7190         * configure: Regenerate.
7191         * config.in: Likewise.
7192         * linux-low.c: Include <sys/personality.h>.
7193         Define ADDR_NO_RANDOMIZE if necessary.
7194         (linux_create_inferior): Disable address space randomization when
7195         forking inferior, if requested.
7196         (linux_supports_disable_randomization): New function.
7197         (linux_target_ops): Install it.
7198         * server.h (disable_randomization): Declare.
7199         * server.c (disable_randomization): New global variable.
7200         (handle_general_set): Handle QDisableRandomization.
7201         (handle_query): Likewise for qSupported.
7202         (main): Support --disable-randomization and --no-disable-randomization
7203         command line arguments.
7204         * target.h (struct target_ops): Add supports_disable_randomization.
7205         (target_supports_disable_randomization): New macro.
7206
7207 2011-09-29  Mike Frysinger  <vapier@gentoo.org>
7208
7209         * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
7210         ifdef check.
7211         [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
7212         [!PT_GETDSBT] (target_loadmap): New definition.
7213         (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
7214         (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
7215         LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
7216         and PT_GETDSBT to LINUX_LOADMAP.
7217         [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
7218         (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
7219
7220 2011-09-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
7221
7222         * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
7223         (arm_linux_hwbp_cap): New static variable.
7224         (arm_linux_get_hwbp_cap): Replace by ...
7225         (arm_linux_init_hwbp_cap): ... this new function.
7226         (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
7227         (arm_linux_get_hw_watchpoint_count): Likewise.
7228         (arm_linux_get_hw_watchpoint_max_length): Likewise.
7229         (arm_arch_setup): Call arm_linux_init_hwbp_cap.
7230         (arm_prepare_to_resume): Use perror_with_name instead of error.
7231
7232 2011-09-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
7233
7234         * linux-arm-low.c: Include <signal.h>.
7235         (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
7236         (struct arm_linux_hwbp_cap): New data type.
7237         (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
7238         (struct arm_linux_hw_breakpoint): New data type.
7239         (MAX_BPTS, MAX_WPTS): Define.
7240         (struct arch_process_info, struct arch_lwp_info): New data types.
7241         (arm_linux_get_hwbp_cap): New function.
7242         (arm_linux_get_hw_breakpoint_count): Likewise.
7243         (arm_linux_get_hw_watchpoint_count): Likewise.
7244         (arm_linux_get_hw_watchpoint_max_length): Likewise.
7245         (arm_hwbp_control_initialize): Likewise.
7246         (arm_hwbp_control_is_enabled): Likewise.
7247         (arm_hwbp_control_is_initialized): Likewise.
7248         (arm_hwbp_control_disable): Likewise.
7249         (arm_linux_hw_breakpoint_equal): Likewise.
7250         (arm_linux_hw_point_initialize): Likewise.
7251         (struct update_registers_data): New data structure.
7252         (update_registers_callback: New function.
7253         (arm_insert_point): Likewise.
7254         (arm_remove_point): Likewise.
7255         (arm_stopped_by_watchpoint): Likewise.
7256         (arm_stopped_data_address): Likewise.
7257         (arm_new_process): Likewise.
7258         (arm_new_thread): Likewise.
7259         (arm_prepare_to_resume): Likewise.
7260         (the_low_target): Register arm_insert_point, arm_remove_point,
7261         arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
7262         arm_new_thread, and arm_prepare_to_resume.
7263
7264 2011-09-15  Stan Shebs  <stan@codesourcery.com>
7265
7266         * server.h (struct emit_ops): Add compare-goto fields.
7267         * tracepoint.c (gdb_agent_op_sizes): New table.
7268         (emit_eq_goto): New function.
7269         (emit_ne_goto): New function.
7270         (emit_lt_goto): New function.
7271         (emit_le_goto): New function.
7272         (emit_gt_goto): New function.
7273         (emit_ge_goto): New function.
7274         (is_goto_target): New function.
7275         (compile_bytecodes): Recognize special cases of compare-goto
7276         combinations and call specialized emitters for them.
7277         * linux-x86-low.c (amd64_emit_eq_goto): New function.
7278         (amd64_emit_ne_goto): New function.
7279         (amd64_emit_lt_goto): New function.
7280         (amd64_emit_le_goto): New function.
7281         (amd64_emit_gt_goto): New function.
7282         (amd64_emit_ge_goto): New function.
7283         (amd64_emit_ops): Add the new functions.
7284         (i386_emit_eq_goto): New function.
7285         (i386_emit_ne_goto): New function.
7286         (i386_emit_lt_goto): New function.
7287         (i386_emit_le_goto): New function.
7288         (i386_emit_gt_goto): New function.
7289         (i386_emit_ge_goto): New function.
7290         (i386_emit_ops): Add the new functions.
7291
7292 2011-09-08  Stan Shebs  <stan@codesourcery.com>
7293
7294         * linux-x86-low.c (i386_emit_prologue): Save %ebx.
7295         (i386_emit_epilogue): Restore %ebx.
7296
7297 2011-08-31  Jie Zhang  <jzhang918@gmail.com>
7298
7299         * server.c (step_thread): Remove definition.
7300         (process_serial_event): Don't handle Hs.
7301         * server.h (step_thread): Remove declaration.
7302         * target.c (set_desired_inferior): Remove use of step_thread.
7303
7304 2011-08-24  Luis Machado  <lgustavo@codesourcery.com>
7305
7306         * linux-low.c: Include linux-procfs.h.
7307         (linux_attach_lwp_1): Update comments.
7308         (linux_attach): Scan for existing threads when attaching to a
7309         process that is the tgid.
7310         * Makefile.in: Update dependencies.
7311
7312 2011-08-24  Luis Machado  <lgustavo@codesourcery.com>
7313
7314         * configure.srv: Add linux-procfs.o dependencies.
7315
7316 2011-08-14  Yao Qi  <yao@codesourcery.com>
7317
7318         * target.h (struct target_ops): Fix indent.
7319         * win32-low.c (win32_target_ops): Fix comment.
7320
7321 2011-08-14  Andrew Jenner  <andrew@codesourcery.com>
7322             Yao Qi  <yao@codesourcery.com>
7323
7324         * Makefile.in (clean): Remove tic6x-*.c files.
7325         (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
7326         (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
7327         (tic6x-c64xp-linux.c): Likewise.
7328         * configure.srv: Add support for tic6x-*-uclinux.
7329         * linux-tic6x-low.c: New.
7330         * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
7331
7332 2011-08-14  Andrew Stubbs <ams@codesourcery.com>
7333             Yao Qi  <yao@codesourcery.com>
7334
7335         * target.h (struct target_ops): Add read_loadmap.
7336         * linux-low.c (struct target_loadseg): New type.
7337         (struct target_loadmap): New type.
7338         (linux_read_loadmap): New function.
7339         (linux_target_ops): Add linux_read_loadmap.
7340         * server.c (handle_query): Support qXfer:fdpic:read packet.
7341         * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
7342         to NULL.
7343
7344 2011-08-05  Eli Zaretskii  <eliz@gnu.org>
7345
7346         * win32-low.c: Include <stdint.h>.
7347
7348 2011-07-22  Pedro Alves  <pedro@codesourcery.com>
7349
7350         * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
7351         to the inferior here.
7352         (i386_remove_aligned_watchpoint): Ditto.
7353         (i386_handle_nonaligned_watchpoint): Return immediate on fail to
7354         fit part of the watchpoint in the debug registers.
7355         (i386_update_inferior_debug_regs): New.
7356         (i386_low_insert_watchpoint): Work on a local mirror of the debug
7357         registers, and only update the inferior on success.
7358         (i386_low_remove_watchpoint): Ditto.
7359
7360 2011-07-22  Kwok Cheung Yeung  <kcy@codesourcery.com>
7361
7362         * linux-low.c (compare_ints, unique, list_threads, show_process,
7363         linux_core_of_thread): Delete.
7364         (linux_target_ops): Change linux_core_of_thread to
7365         linux_common_core_of_thread.
7366         (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
7367         * utils.c (malloc_failure): Change type of argument.
7368         (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
7369         * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
7370         common/linux-osdata.c, common/ptid.c and common/buffer.c.
7371         (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
7372         (IPA_OBJS): Add common-utils-ipa.o.
7373         (ptid_h, linux_osdata_h): New macros.
7374         (server_h): Add common/common-utils.h, common/xml-utils.h,
7375         common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
7376         common/ptid.h.
7377         (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
7378         ptid.o, buffer.o): New rules.
7379         (linux-low.o): Add common/linux-osdata.h as a dependency.
7380         * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
7381         * configure.ac: Add AC_HEADER_DIRENT check.
7382         * config.in: Regenerate.
7383         * configure: Regenerate.
7384         * remote-utils.c (xml_escape_text): Delete.
7385         (buffer_grow, buffer_free, buffer_init, buffer_finish,
7386         buffer_xml_printf): Move to common/buffer.c.
7387         * server.c (main): Remove call to initialize_inferiors.
7388         * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
7389         ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
7390         ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
7391         internal_error, gdb_assert, gdb_assert_fail): Delete.
7392         (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
7393         buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
7394         common/buffer.h.
7395         * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
7396         ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
7397         initialize_inferiors): Delete.
7398
7399 2011-07-20  Pedro Alves  <pedro@codesourcery.com>
7400
7401         * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
7402         symbol error.
7403
7404 2011-05-31  Pedro Alves  <pedro@codesourcery.com>
7405
7406         * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
7407         assertion.
7408         * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
7409
7410 2011-05-26  Yao Qi  <yao@codesourcery.com>
7411
7412         * Makefile.in (thread-db.o): Track dependence to
7413         common/gdb_thread_db.h.
7414         * thread-db.c: include gdb_thread_db.h from right place.
7415
7416 2011-05-16  Adrian Cornish  <gnu@bluedreamer.com>
7417
7418         * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
7419         __FILE__ and __LINE__ to internal_error.
7420
7421 2011-05-13  Doug Evans  <dje@google.com>
7422
7423         * thread-db.c (try_thread_db_load_from_sdir): New function.
7424         (try_thread_db_load_from_dir): New function.
7425         (thread_db_load_search): Handle $sdir, ignore $pdir.
7426         Remove trying of system directories if search of
7427         libthread-db-search-path fails, that is now done via $sdir.
7428
7429 2011-05-12  Kwok Cheung Yeung  <kcy@codesourcery.com>
7430
7431         * server.c (handle_query): Add EnableDisableTracepoints to the list
7432         of supported features.
7433         * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
7434         tracepoints.
7435         (cmd_qtenable_disable): New.
7436         (cmd_qtstart): Install tracepoints even if disabled.
7437         (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
7438         receiving a QTEnable or QTDisable packet.
7439         (gdb_collect): Skip data collection if fast tracepoint is disabled.
7440         (ust_marker_to_static_tracepoint): Do not ignore disabled static
7441         tracepoints.
7442         (gdb_probe): Skip data collection if static tracepoint is disabled.
7443
7444 2011-05-10  Doug Evans  <dje@google.com>
7445
7446         * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
7447
7448 2011-05-04  Doug Evans  <dje@google.com>
7449
7450         * linux-low.c (linux_join): Skip process lookup.
7451         * spu-low.c (spu_join): Ditto.
7452         * server.c (join_inferiors_callback): Delete.
7453         (process_serial_event): For 'D' packet (detach) call join_inferior
7454         directly.
7455
7456 2011-05-04  Joseph Myers  <joseph@codesourcery.com>
7457
7458         * README: Don't mention xscale*-*-linux*.
7459         * configure.srv (xscale*-*-linux*): Don't handle target.
7460
7461 2011-04-27  Nathan Froyd  <froydnj@codesourcery.com>
7462
7463         * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
7464         casting pointers.
7465         (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
7466         (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
7467         (i386_emit_void_call_2): Likewise.
7468
7469 2011-04-26  Yao Qi  <yao@codesourcery.com>
7470
7471         * linux-low.c: Move common macros to linux-ptrace.h.
7472         Include linux-ptrace.h.
7473         * Makefile.in (linux_ptrace_h): New.
7474         (linux-low.o): Depends on linux-ptrace.h.
7475
7476 2011-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
7477
7478         * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
7479         RUN_ONCE.  Comment for the LISTEN_DESC delete_file_handler call.
7480         (remote_prepare): New function with most of the TCP code from ...
7481         (remote_open): ... here.  Detect PORT here unconditionally.  Move also
7482         setting transport_is_reliable.
7483         * server.c (run_once): New variable.
7484         (gdbserver_usage): Document it.
7485         (main): Set run_once for `--once'.  Call remote_prepare.  Exit after
7486         the first run if RUN_ONCE.
7487         * server.h (run_once, remote_prepare): New declarations.
7488
7489 2011-04-19  Tom Tromey  <tromey@redhat.com>
7490
7491         * win32-low.c (handle_load_dll): Remove duplicate "the".
7492
7493 2011-04-07  Pierre Muller  <muller@ics.u-strasbg.fr>
7494
7495         Remove support for old Cygwin 1.5 versions.
7496         * win32-low.c (win32_create_inferior): Use new cygwin_path_list
7497         function to avoid warning.
7498         (win32_add_one_solib): Use cygwin_conv_path function to avoid
7499         warning.
7500
7501 2011-03-18  Pierre Muller  <muller@ics.u-strasbg.fr>
7502
7503         * gdbserver/server.h (Macro _): Define it if not available.
7504
7505 2011-03-14  Michael Snyder  <msnyder@vmware.com>
7506
7507         * hostio.c (handle_close): Remove unnecessary null test.
7508
7509 2011-03-10  Joel Brobecker  <brobecker@adacore.com>
7510
7511         * Makefile.in (maintainer-clean realclean distclean): Remove
7512         "make ...  subdir_do" command.
7513
7514 2011-03-10  Michael Snyder  <msnyder@vmware.com>
7515
7516         * tracepoint.c (tracepoint_finish_step): Fix loop variable.
7517
7518         * server.c (handle_v_run): Free alloced buffer on early return.
7519
7520 2011-03-09  Yao Qi  <yao@codesourcery.com>
7521
7522         Revert:
7523         2011-03-04  Yao Qi  <yao@codesourcery.com>
7524
7525         * Makefile.in: Remove GNU make feature --directory.
7526
7527         2011-03-05  Yao Qi  <yao@codesourcery.com>
7528
7529         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7530         (subdir_do): New make target.  Copied from gdb/Makefile.
7531         (maintainer-clean, realclean, distclean, clean): Call corresponding
7532         make targets in common/Makefile.
7533
7534         2011-02-11  Yao Qi  <yao@codesourcery.com>
7535
7536         * configure.ac: Call AC_PROG_RANLIB.
7537         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
7538         * configure: Regenerate.
7539
7540 2011-03-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
7541
7542         * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
7543
7544 2011-03-06  Yao Qi  <yao@codesourcery.com>
7545
7546         * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
7547
7548 2011-03-05  Yao Qi  <yao@codesourcery.com>
7549
7550         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7551         (subdir_do): New make target.  Copied from gdb/Makefile.
7552         (maintainer-clean, realclean, distclean, clean): Call corresponding
7553         make targets in common/Makefile.
7554
7555 2011-03-04  Yao Qi  <yao@codesourcery.com>
7556
7557         * Makefile.in: Remove GNU make feature --directory.
7558
7559 2011-03-04  Michael Snyder  <msnyder@vmware.com>
7560
7561         * server.c (queue_stop_reply): Call xmalloc not malloc.
7562
7563 2011-03-02  Michael Snyder  <msnyder@vmware.com>
7564
7565         * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7566
7567 2011-02-28  Michael Snyder  <msnyder@vmware.com>
7568
7569         * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7570         (cmd_qtframe): Ditto.
7571         (cmd_qtbuffer): Ditto.
7572         (cmd_bigqtbuffer): Ditto.
7573
7574         * utils.c (decimal2str): Initialize 'width' to nine, then
7575         don't mess with it.
7576
7577 2011-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
7578
7579         * hostio.c (require_data): Free *data, not data.
7580
7581 2011-02-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
7582
7583         * hostio.c (require_data): Use free, not xfree.
7584
7585 2011-02-27  Michael Snyder  <msnyder@vmware.com>
7586
7587         * server.c (handle_query): Discard unused value.
7588
7589         * hostio.c (require_data): Free malloc memory before returning
7590         error.
7591
7592 2011-02-26  Michael Snyder  <msnyder@vmware.com>
7593
7594         * linux-low.c (list_threads): Call closedir for dirent.
7595
7596 2011-02-27  Michael Snyder  <msnyder@vmware.com>
7597
7598         * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7599         a case statement falls through.
7600
7601         * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7602
7603         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7604         in comparison.
7605
7606 2011-02-26  Michael Snyder  <msnyder@vmware.com>
7607
7608         * utils.c (decimal2str): Eliminate dead code and dead param.
7609         (pulongest): Drop dead param from call to decimal2str.
7610         (plongest): Ditto.
7611
7612 2011-02-24  Joel Brobecker  <brobecker@adacore.com>
7613
7614         Revert the following patch (not approved yet):
7615         2011-02-21  Hui Zhu  <teawater@gmail.com>
7616         * tracepoint.c (tp_printf): New function.
7617         (eval_agent_expr): Handle gdb_agent_op_printf.
7618
7619 2011-02-21  Hui Zhu  <teawater@gmail.com>
7620
7621         * tracepoint.c (tp_printf): New function.
7622         (eval_agent_expr): Handle gdb_agent_op_printf.
7623
7624 2011-02-18  Tom Tromey  <tromey@redhat.com>
7625
7626         * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7627         (tracepoint.o): Likewise.
7628         * tracepoint.c (enum gdb_agent_op): Use ax.def.
7629         (gdb_agent_op_names): Likewise.
7630
7631 2011-02-18  Tom Tromey  <tromey@redhat.com>
7632
7633         * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7634         gdb_agent_op_rot>: New constants.
7635         (gdb_agent_op_names): Add pick and roll.
7636         (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7637         cases.
7638
7639 2011-02-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
7640
7641         * aclocal.m4: Regenerated with aclocal-1.11.1.
7642
7643 2011-02-14  Pedro Alves  <pedro@codesourcery.com>
7644
7645         * server.c (handle_qxfer_traceframe_info): New.
7646         (qxfer_packets): Register "traceframe-info".
7647         (handle_query): Report support for qXfer:traceframe-info:read+.
7648         * tracepoint.c (match_blocktype): New.
7649         (traceframe_find_block_type): Rename to ...
7650         (traceframe_walk_blocks): ... this.  Add callback filter argument,
7651         and use it.
7652         (traceframe_find_block_type): New, reimplemented on top of
7653         traceframe_walk_blocks.
7654         (build_traceframe_info_xml): New.
7655         (traceframe_read_info): New.
7656         * server.h (traceframe_read_info): Declare.
7657
7658 2011-02-11  Yao Qi  <yao@codesourcery.com>
7659
7660         * configure.ac: Call AC_PROG_RANLIB.
7661         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
7662         * configure: Regenerate.
7663
7664 2011-02-07  Pedro Alves  <pedro@codesourcery.com>
7665
7666         * server.c (gdb_read_memory): Change return semantics to allow
7667         partial transfers.
7668         (handle_search_memory_1): Adjust.
7669         (process_serial_event) <'m' packet>: Handle partial transfers.
7670         * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7671
7672 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
7673
7674         * regcache.c (init_register_cache): Initialize
7675         regcache->register_status.
7676         (free_register_cache): Release regcache->register_status.
7677         (regcache_cpy): Copy register_status.
7678         (registers_to_string): Print 'x's for unavailable registers.
7679         (supply_register): Mark the register's status valid or
7680         unavailable, depending on whether a buffer was passed in or not.
7681         (supply_register_zeroed): New.
7682         (supply_regblock): Mark the registers' status valid or
7683         unavailable, depending on whether a buffer was passed in or not.
7684         * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7685         (struct regcache): New `register_status' field.
7686         (supply_register_zeroed): Declare.
7687         * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7688         supply_register_zeroed, rather than passing a NULL buffer to
7689         supply_register.
7690         * tracepoint.c (fetch_traceframe_registers): Update comment.
7691
7692 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
7693
7694         * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7695         buffer explicit.
7696
7697 2011-01-25  Pedro Alves  <pedro@codesourcery.com>
7698
7699         * server.h (decode_xfer_write): Change prototype.
7700         * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7701         and don't extract the annex here.
7702         * server.c (decode_xfer_read): Remove `annex' parameter,
7703         and don't extract the annex here.
7704         (decode_xfer): New.
7705         (struct qxfer): New.
7706         (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7707         (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7708         (handle_qxfer_statictrace): New functions, abstracted out from
7709         handle_query, and made to use the struct qxfer interface.
7710         (handle_threads_qxfer_proper): Rename to ...
7711         (handle_qxfer_threads_proper): ... this.
7712         (handle_threads_qxfer): Rename to ...
7713         (handle_qxfer_threads): ... this.  Adjust.
7714         (qxfer_packets): New array.
7715         (handle_qxfer): New function.
7716         (handle_query): Use handle_qxfer.
7717
7718 2011-01-05  Michael Snyder  <msnyder@msnyder-server.eng.vmware.com>
7719
7720         * gdbreplay.c: Shorten lines of >= 80 columns.
7721         * linux-low.c: Ditto.
7722         * linux-ppc-low.c: Ditto.
7723         * linux-s390-low.c: Ditto.
7724         * linux-sparc-low.c: Ditto.
7725         * linux-x86-low.c: Ditto.
7726         * linux-xtensa-low.c: Ditto.
7727         * mem-break.c: Ditto.
7728         * nto-low.c: Ditto.
7729         * regcache.h: Ditto.
7730         * remote-utils.c: Ditto.
7731         * server.c: Ditto.
7732         * server.h: Ditto.
7733         * thread-db.c: Ditto.
7734         * tracepoint.c: Ditto.
7735         * utils.c: Ditto.
7736         * win32-low.h: Ditto.
7737
7738 2011-01-05  Joel Brobecker  <brobecker@adacore.com>
7739
7740         * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7741         update.
7742
7743 2011-01-01  Joel Brobecker  <brobecker@adacore.com>
7744
7745         * server.c (gdbserver_version): Update copyright year in version
7746         output.
7747         * gdbreplay.c (gdbreplay_version): Ditto.
7748
7749 2010-12-29  Jie Zhang  <jie.zhang@analog.com>
7750
7751         * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7752         * linux-bfin-low.c: New file.
7753         * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7754         PT_DATA_ADDR for BFIN targets.
7755         * Makefile.in (SFILES): Add linux-bfin-low.c.
7756         (clean): Remove reg-bfin.c.
7757         (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7758         * README: Mention supported Blackfin targets.
7759
7760 2010-12-23  Mike Frysinger  <vapier@gentoo.org>
7761
7762         * .gitignore: New file.
7763
7764 2010-11-16  Mike Frysinger  <vapier@gentoo.org>
7765
7766         * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7767
7768 2010-10-22  Jie Zhang  <jie@codesourcery.com>
7769
7770         * Makefile.in: Add FLAGS_TO_PASS variable.
7771         (install): Remove dependency of install-only and recursively
7772         invoke make for install-only.
7773
7774 2010-10-04  Doug Evans  <dje@google.com>
7775
7776         * Makefile.in (uninstall): Use $(DESTDIR).
7777
7778 2010-09-24  Pedro Alves  <pedro@codesourcery.com>
7779
7780         PR gdb/11842
7781
7782         * linux-x86-low.c (compat_siginfo_from_siginfo)
7783         (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7784         si_code is < 0.  Check for si_code == SI_TIMER before checking for
7785         si_code < 0.
7786
7787 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
7788
7789         * lynx-i386-low.c: New file.
7790         * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7791
7792 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
7793
7794         * lynx-low.c (ptrace_request_to_str): Remove handling for
7795         request values that have been removed in LynxOS 5.x.
7796
7797 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
7798
7799         * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7800         <ptrace.h>
7801
7802 2010-09-09  Nathan Sidwell  <nathan@codesourcery.com>
7803
7804         * configure.ac: Add --enable-inprocess-agent option.
7805         * configure: Rebuilt.
7806
7807 2010-09-06  Yao Qi  <yao@codesourcery.com>
7808
7809         * linux-low.c (linux_kill): Remove unused variable.
7810         (linux_stabilize_threads): Likewise.
7811         * server.c (start_inferior): Likewise.
7812         (queue_stop_reply_callback): Likewise.
7813         * tracepoint.c (do_action_at_tracepoint): Likewise.
7814
7815 2010-09-06  Yao Qi  <yao@codesourcery.com>
7816
7817         * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7818         on return.
7819
7820 2010-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
7821
7822         * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7823
7824 2010-09-06  Pedro Alves  <pedro@codesourcery.com>
7825
7826         * Makefile.in (install-only): Replace $IPA_DEPFILES with
7827         "$(IPA_DEPFILES)".
7828
7829 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
7830
7831         * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7832         gdbserver/lynx-ppc-low.c: New files.
7833         * Makefile.in (lynx_low_h): New variable.
7834         (lynx-low.o, lynx-ppc-low.o): New rules.
7835         * configure.ac: On LynxOS, link with -lnetinet.
7836         * configure.srv: Add handling of powerpc-*-lynxos* targets.
7837         * configure: regenerate.
7838
7839 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
7840
7841         * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7842         * configure.ac: Add check for vasprintf and vsnprintf.
7843         * configure, config.in: Regenerate.
7844         * server.h (vasprintf, vsnprintf): Add conditional declarations.
7845
7846 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
7847
7848         * gdbreplay.c: Move include of alloca.h up, next to include of
7849         malloc.h.
7850         * server.h: Add include of malloc.h.
7851         * mem-break.c: Remove include of malloc.h.
7852         * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7853
7854 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
7855
7856         * Makefile.in (memmem.o): Build with -Wno-error.
7857
7858 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
7859
7860         * utils.c (xsnprintf): Make non-static.
7861         * server.h: Add xsnprintf declaration.
7862         * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7863         replace calls to snprintf by calls to xsnprintf throughout.
7864
7865 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
7866
7867         * configure.ac: Add configure check for alloca.
7868         * configure, config.in: Regenerate.
7869         * server.h: Include alloca.h if it exists.
7870         * gdbreplay.c: Include alloca.h if it exists.
7871
7872 2010-08-28  Pedro Alves  <pedro@codesourcery.com>
7873
7874         * linux-low.c (__SIGRTMIN): Define if not already defined.
7875         (linux_create_inferior): Check for __ANDROID__ rather than
7876         __SIGRTMIN.
7877         (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7878         are already deferred.
7879         (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7880         (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7881         stopped and already has a pending signal to report.
7882         (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7883         a pending signal to report or is moving out of a jump pad.
7884         (linux_init_signals): Check for __ANDROID__ rather than
7885         __SIGRTMIN.
7886
7887 2010-08-28  Pedro Alves  <pedro@codesourcery.com>
7888
7889         * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7890         debug_threads check.  Avoid a linear search when not doing debug
7891         output.
7892
7893 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
7894
7895         * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7896         (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7897         (struct file_handler) <fd>: Change type to gdb_fildes_t.
7898         (process_event): Change local fd's type to gdb_fildes_t.
7899         (create_file_handler): Adjust prototype.
7900         (delete_file_handler): Adjust prototype.
7901         (handle_file_event): Adjust prototype.  Use pfildes.
7902         (create_file_event): Adjsut prototype.
7903         * remote-utils.c (remote_desc, listen_desc): Change type to
7904         gdb_fildes_t.
7905         * server.h: New gdb_fildes_t typedef.
7906         [USE_WIN32API]: Include winsock2.h.
7907         (delete_file_handler, add_file_handler): Adjust prototypes.
7908         (pfildes): Declare.
7909         * utils.c (pfildes): New.
7910
7911 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
7912
7913         * configure.ac (build_warnings): Add -Wno-char-subscripts.
7914         * configure: Regenerate.
7915
7916 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
7917
7918         * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7919         (linux_done_accessing_memory): ... this.
7920         (linux_target_ops): Adjust.
7921         * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7922         * nto-low.c (nto_target_ops): Adjust comment.
7923         * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7924         * spu-low.c (spu_target_ops): Adjust comment.
7925         * target.h (target_ops): Rename unprepare_to_access_memory field
7926         to done_accessing_memory.
7927         (unprepare_to_access_memory): Rename to ...
7928         (done_accessing_memory): ... this.
7929
7930 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
7931
7932         * linux-low.c (linux_prepare_to_access_memory): New.
7933         (linux_unprepare_to_access_memory): New.
7934         (linux_target_ops): Install them.
7935         * server.c (read_memory): Rename to ...
7936         (gdb_read_memory): ... this.  Use
7937         prepare_to_access_memory/prepare_to_access_memory.
7938         (write_memory): Rename to ...
7939         (gdb_write_memory): ... this.  Use
7940         prepare_to_access_memory/prepare_to_access_memory.
7941         (handle_search_memory_1): Adjust.
7942         (process_serial_event): Adjust.
7943         * target.h (struct target_ops): New fields
7944         prepare_to_access_memory and unprepare_to_access_memory.
7945         (prepare_to_access_memory, unprepare_to_access_memory): New.
7946         * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7947         prepare_to_access_memory/prepare_to_access_memory.
7948         * nto-low.c (nto_target_ops): Adjust.
7949         * spu-low.c (spu_target_ops): Adjust.
7950         * win32-low.c (win32_target_ops): Adjust.
7951
7952 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
7953
7954         * Makefile.in (WARN_CFLAGS): Get it from configure.
7955         (WERROR_CFLAGS): New.
7956         (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7957         * configure.ac: Introduce --enable-werror, which adds -Werror to
7958         the compiler command line.  Enabled by default.  Disable with
7959         --disable-werror.  Add -Wdeclaration-after-statement
7960         Wpointer-arith and -Wformat-nonliteral to warning flags.
7961         * configure: Regenerate.
7962
7963 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
7964
7965         * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7966
7967 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
7968
7969         * gdbreplay.c (remote_error): New.
7970         (gdbchar): New.
7971         (expect): Use gdbchar.  Check for error reading from GDB.
7972         Clarify sync error output.
7973         (play): Check for errors writing to GDB.
7974         * linux-low.c (sigchld_handler): Really ignore `write' errors.
7975         * remote-utils.c (getpkt): Check for errors writing to the remote
7976         descriptor.
7977
7978 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
7979
7980         * linux-low.c (linux_wait_1): Move non-debugging code out of
7981         `debug_threads' control.
7982
7983 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
7984
7985         * linux-low.c (linux_wait_1): Don't set last_status here.
7986         * server.c (push_event, queue_stop_reply_callback): Assert we're
7987         not pushing a TARGET_WAITKIND_IGNORE event.
7988         (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7989         (myresume, handle_target_event): Set the thread's last_resume_kind
7990         and last_status from the target returned status.
7991
7992 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
7993
7994         PR threads/10729
7995
7996         * linux-x86-low.c (update_debug_registers_callback): New.
7997         (i386_dr_low_set_addr): Use it.
7998         (i386_dr_low_get_addr): New.
7999         (i386_dr_low_set_control): Use update_debug_registers_callback.
8000         (i386_dr_low_get_control): New.
8001         (i386_dr_low_get_status): Adjust.
8002         * linux-low.c (linux_stop_lwp): New.
8003         * linux-low.h (linux_stop_lwp): Declare.
8004
8005         * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
8006         argument instead of a i386_debug_reg_state.
8007         (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
8008         a i386_debug_reg_state.
8009         (i386_insert_aligned_watchpoint): Adjust.
8010         (i386_remove_aligned_watchpoint): Adjust.
8011         (i386_low_stopped_data_address): Read the debug registers from the
8012         inferior instead of from the mirrors.
8013         * i386-low.h (struct i386_debug_reg_state): Extend comment.
8014         (i386_dr_low_get_addr): Declare.
8015         (i386_dr_low_get_control): Declare.
8016         (i386_dr_low_get_status): Change prototype.
8017
8018         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
8019         (i386_dr_low_get_addr): New.
8020         (i386_dr_low_get_control): New.
8021         (i386_dr_low_get_status): Adjust prototype.  Return
8022         dr_status_mirror.
8023         (i386_initial_stuff): Clear dr_status_mirror and
8024         dr_control_mirror.
8025         (i386_get_thread_context): Adjust.
8026         (i386_set_thread_context): Adjust.
8027         (i386_thread_added): Adjust.
8028
8029 2010-08-24  Pedro Alves  <pedro@codesourcery.com>
8030
8031         * linux-low.h (linux_thread_area): Delete declaration.
8032
8033 2010-08-11  Thomas Schwinge  <thomas@codesourcery.com>
8034
8035         * linux-low.c (linux_wait_1): Correctly return the ptid of the child
8036         after its termination.
8037
8038 2010-08-09  Pedro Alves  <pedro@codesourcery.com>
8039
8040         * linux-low.c (gdb_wants_lwp_stopped): Delete.
8041         (gdb_wants_all_stopped): Delete.
8042         (linux_wait_1): Don't call them.
8043         * server.c (handle_v_cont): Tag all threads as want-stopped.
8044         (gdb_wants_thread_stopped): Fix comments.  Tag the thread that
8045         stopped as "client-wants-stopped".
8046
8047 2010-07-31  Pedro Alves  <pedro@codesourcery.com>
8048
8049         * Makefile.in (signals_h): New.
8050         (server_h): Depend on it.
8051         (server.o): Don't depend on $(signals_def).
8052         (signals.o): Depend on $(signals_def).
8053
8054 2010-07-31  Jan Kratochvil  <jan.kratochvil@redhat.com>
8055
8056         * Makefile.in (signals_def): New.
8057         (server_h): Append include/gdb/signals.h and signals_def.
8058         (server.o): Append signals_def.
8059
8060 2010-07-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
8061
8062         * server.c (handle_target_event): Use target_signal_to_host for
8063         resume_info.sig initialization.
8064         * target.h (struct thread_resume) <sig>: New comment.
8065
8066 2010-07-20  Ozkan Sezer  <sezeroz@gmail.com>
8067
8068         * server.c (handle_query): strcpy() the returned string from paddress()
8069         instead of sprintf().
8070         * utils.c (paddress): Return phex_nz().
8071
8072 2010-07-07  Joel Brobecker  <brobecker@adacore.com>
8073
8074         * server.c (handle_v_cont): Call mourn_inferior if process
8075         just exited.
8076         (myresume): Likewise.
8077
8078 2010-07-01  Pedro Alves  <pedro@codesourcery.com>
8079
8080         Static tracepoints, and integration with UST.
8081
8082         * configure.ac: Handle --with-ust.  substitute ustlibs and ustinc.
8083         * mem-break.c (uninsert_all_breakpoints)
8084         (reinsert_all_breakpoints): New.
8085         * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
8086         * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
8087         (gdb_agent_ust_loaded, helper_thread_id)
8088         (gdb_agent_helper_thread_id): New macros.
8089         (struct ipa_sym_addresses): Add addr_ust_loaded,
8090         addr_helper_thread_id, addr_cmd_buf.
8091         (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
8092         (in_process_agent_loaded_ust): New.
8093         (write_e_ust_not_loaded): New.
8094         (maybe_write_ipa_ust_not_loaded): New.
8095         (struct collect_static_trace_data_action): New.
8096         (enum tracepoint_type) <static_tracepoint>: New.
8097         (struct tracepoint) <handle>: Mention static tracepoints.
8098         (struct static_tracepoint_ctx): New.
8099         (CMD_BUF_SIZE): New.
8100         (add_tracepoint_action): Handle static tracepoint actions.
8101         (unprobe_marker_at): New.
8102         (clear_installed_tracepoints): Handle static tracepoints.
8103         (cmd_qtdp): Handle static tracepoints.
8104         (probe_marker_at): New.
8105         (cmd_qtstart): Handle static tracepoints.
8106         (response_tracepoint): Handle static tracepoints.
8107         (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
8108         (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
8109         (get_context_regcache): Handle static tracepoints.
8110         (do_action_at_tracepoint): Handle static tracepoint actions.
8111         (traceframe_find_block_type): Handle static trace data blocks.
8112         (traceframe_read_sdata): New.
8113         (download_tracepoints): Download static tracepoint actions.
8114         [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
8115         (GDB_PROBE_NAME): New.
8116         (ust_ops): New.
8117         (GET_UST_SYM): New.
8118         (USTF): New.
8119         (dlsym_ust): New.
8120         (ust_marker_to_static_tracepoint): New.
8121         (gdb_probe): New.
8122         (collect_ust_data_at_tracepoint): New.
8123         (gdb_ust_probe): New.
8124         (UNIX_PATH_MAX, SOCK_DIR): New.
8125         (gdb_ust_connect_sync_socket): New.
8126         (resume_thread, stop_thread): New.
8127         (run_inferior_command): New.
8128         (init_named_socket): New.
8129         (gdb_ust_socket_init): New.
8130         (cstr_to_hexstr): New.
8131         (next_st): New.
8132         (first_marker, next_marker): New.
8133         (response_ust_marker): New.
8134         (cmd_qtfstm, cmd_qtsstm): New.
8135         (unprobe_marker_at, probe_marker_at): New.
8136         (cmd_qtstmat, gdb_ust_thread): New.
8137         (gdb_ust_init): New.
8138         (initialize_tracepoint_ftlib): Call gdb_ust_init.
8139         * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
8140         (ST_REGENTRY): New.
8141         (x86_64_st_collect_regmap): New.
8142         (X86_64_NUM_ST_COLLECT_GREGS): New.
8143         (AMD64_RIP_REGNUM): New.
8144         (supply_static_tracepoint_registers): New.
8145         * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
8146         (ST_REGENTRY): New.
8147         (i386_st_collect_regmap): New.
8148         (i386_NUM_ST_COLLECT_GREGS): New.
8149         (supply_static_tracepoint_registers): New.
8150         * server.c (handle_query): Handle qXfer:statictrace:read.
8151         <qSupported>: Report support for StaticTracepoints, and
8152         qXfer:statictrace:read features.
8153         * server.h (traceframe_read_sdata)
8154         (supply_static_tracepoint_registers): Declare.
8155         * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
8156         (unpack_varlen_hex): Include in IPA build.
8157         * Makefile.in (ustlibs, ustinc): New.
8158         (IPA_OBJS): Add remote-utils-ipa.o.
8159         ($(IPA_LIB)): Link -ldl and -lpthread.
8160         (UST_CFLAGS): New.
8161         (IPAGENT_CFLAGS): Add UST_CFLAGS.
8162         * config.in, configure: Regenerate.
8163
8164 2010-06-20  Ian Lance Taylor  <iant@google.com>
8165             Pedro Alves  <pedro@codesourcery.com>
8166
8167         * linux-x86-low.c (always_true): Delete.
8168         (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
8169         trying to fool the compiler with always_true.
8170
8171 2010-06-20  Pedro Alves  <pedro@codesourcery.com>
8172
8173         * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
8174         conditions in gdbserver.
8175
8176 2010-06-19  Ulrich Weigand  <uweigand@de.ibm.com>
8177
8178         * spu-low.c (spu_read_memory): Wrap around local store limit.
8179         (spu_write_memory): Likewise.
8180
8181 2010-06-15  Pedro Alves  <pedro@codesourcery.com>
8182
8183         * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
8184         (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
8185         LONGEST uses.
8186         * server.h (struct emit_ops): Replace int64_t uses with LONGEST
8187         uses.
8188         * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
8189         uses with LONGEST uses.
8190
8191 2010-06-14  Stan Shebs  <stan@codesourcery.com>
8192             Pedro Alves  <pedro@codesourcery.com>
8193
8194         Bytecode compiler.
8195
8196         * linux-x86-low.c: Include limits.h.
8197         (add_insns): New.
8198         (always_true): New.
8199         (EMIT_ASM): New.
8200         (EMIT_ASM32): New.
8201         (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
8202         (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
8203         (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
8204         (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
8205         (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
8206         (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
8207         (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
8208         (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
8209         (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
8210         (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
8211         (amd64_emit_void_call_2): New.
8212         (amd64_emit_ops): New.
8213         (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
8214         (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
8215         (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
8216         (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
8217         (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
8218         (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
8219         (i386_emit_goto, i386_write_goto_address, i386_emit_const)
8220         (i386_emit_call, i386_emit_reg, i386_emit_pop)
8221         (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
8222         (i386_emit_stack_adjust, i386_emit_int_call_1)
8223         (i386_emit_void_call_2): New.
8224         (i386_emit_ops): New.
8225         (x86_emit_ops): New.
8226         (the_low_target): Install x86_emit_ops.
8227         * server.h (struct emit_ops): New.
8228         (get_raw_reg_func_addr): Declare.
8229         (current_insn_ptr, emit_error): Declare.
8230         * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
8231         (set_trace_state_variable_value): New defines.
8232         (struct ipa_sym_addresses): New fields addr_get_raw_reg,
8233         addr_get_trace_state_variable_value and
8234         addr_set_trace_state_variable_value.
8235         (symbol_list): New fields for get_raw_reg,
8236         get_trace_state_variable_value and set_trace_state_variable_value.
8237         (condfn): New typedef.
8238         (struct tracepoint): New field `compiled_cond'.
8239         (do_action_at_tracepoint): Clear compiled_cond.
8240         (get_trace_state_variable_value, set_trace_state_variable_value):
8241         Export in the IPA.
8242         (condition_true_at_tracepoint): If there's a compiled condition,
8243         run that.
8244         (current_insn_ptr, emit_error): New globals.
8245         (struct bytecode_address): New.
8246         (get_raw_reg_func_addr): New.
8247         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
8248         (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
8249         (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
8250         (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
8251         (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
8252         (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
8253         (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
8254         (compile_tracepoint_condition, compile_bytecodes): New.
8255         * target.h (emit_ops): Forward declare.
8256         (struct target_ops): New field emit_ops.
8257         (target_emit_ops): New.
8258         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
8259         * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
8260         * linux-low.c (linux_emit_ops): New.
8261         (linux_target_ops): Install it.
8262         * linux-low.h (struct linux_target_ops): New field emit_ops.
8263
8264 2010-06-14  Ulrich Weigand  <uweigand@de.ibm.com>
8265
8266         * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
8267         * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
8268
8269 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
8270             Stan Shebs  <stan@codesourcery.com>
8271
8272         * Makefile.in (IPA_DEPFILES, extra_libraries): New.
8273         (all): Depend on $(extra_libraries).
8274         (install-only): Install the IPA.
8275         (IPA_OBJS, IPA_LIB): New.
8276         (clean): Remove the IPA lib.
8277         (IPAGENT_CFLAGS): New.
8278         (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
8279         (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
8280         (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
8281         * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
8282         * configure.ac: Check for atomic builtins support in the compiler.
8283         (IPA_DEPFILES, extra_libraries): Define.
8284         * configure.srv (ipa_obj): Add description.
8285         (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
8286         (i[34567]86-*-linux*): Set ipa_obj.
8287         (x86_64-*-linux*): Set ipa_obj.
8288         * linux-low.c (stabilizing_threads): New.
8289         (supports_fast_tracepoints): New.
8290         (linux_detach): Stabilize threads before detaching.
8291         (handle_tracepoints): Handle internal tracing breakpoints.  Assert
8292         the lwp is either not stabilizing, or is moving out of a jump pad.
8293         (linux_fast_tracepoint_collecting): New.
8294         (maybe_move_out_of_jump_pad): New.
8295         (enqueue_one_deferred_signal): New.
8296         (dequeue_one_deferred_signal): New.
8297         (linux_wait_for_event_1): If moving out of a jump pad, defer
8298         pending signals to later.
8299         (linux_stabilize_threads): New.
8300         (linux_wait_1): Check if threads need moving out of jump pads, and
8301         do it if so.
8302         (stuck_in_jump_pad_callback): New.
8303         (move_out_of_jump_pad_callback): New.
8304         (lwp_running): New.
8305         (linux_resume_one_lwp): Handle moving out of jump pads.
8306         (linux_set_resume_request): Dequeue deferred signals.
8307         (need_step_over_p): Also step over fast tracepoint jumps.
8308         (start_step_over): Also uninsert fast tracepoint jumps.
8309         (finish_step_over): Also reinsert fast tracepoint jumps.
8310         (linux_install_fast_tracepoint_jump): New.
8311         (linux_target_ops): Install linux_stabilize_threads and
8312         linux_install_fast_tracepoint_jump_pad.
8313         * linux-low.h (linux_target_ops) <get_thread_area,
8314         install_fast_tracepoint_jump_pad>: New fields.
8315         (struct lwp_info) <collecting_fast_tracepoint,
8316         pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
8317         (linux_get_thread_area): Declare.
8318         * linux-x86-low.c (jump_insn): New.
8319         (x86_get_thread_area): New.
8320         (append_insns): New.
8321         (push_opcode): New.
8322         (amd64_install_fast_tracepoint_jump_pad): New.
8323         (i386_install_fast_tracepoint_jump_pad): New.
8324         (x86_install_fast_tracepoint_jump_pad): New.
8325         (the_low_target): Install x86_get_thread_area and
8326         x86_install_fast_tracepoint_jump_pad.
8327         * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
8328         (struct fast_tracepoint_jump): New.
8329         (fast_tracepoint_jump_insn): New.
8330         (fast_tracepoint_jump_shadow): New.
8331         (find_fast_tracepoint_jump_at): New.
8332         (fast_tracepoint_jump_here): New.
8333         (delete_fast_tracepoint_jump): New.
8334         (set_fast_tracepoint_jump): New.
8335         (uninsert_fast_tracepoint_jumps_at): New.
8336         (reinsert_fast_tracepoint_jumps_at): New.
8337         (set_breakpoint_at): Use write_inferior_memory.
8338         (uninsert_raw_breakpoint): Use write_inferior_memory.
8339         (check_mem_read): Mask out fast tracepoint jumps.
8340         (check_mem_write): Mask out fast tracepoint jumps.
8341         * mem-break.h (struct fast_tracepoint_jump): Forward declare.
8342         (set_fast_tracepoint_jump): Declare.
8343         (delete_fast_tracepoint_jump)
8344         (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
8345         (reinsert_fast_tracepoint_jumps_at): Declare.
8346         * regcache.c: Don't compile many functions when building the
8347         in-process agent library.
8348         (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
8349         the register buffer in the heap.
8350         (free_register_cache): If the register buffer isn't owned by the
8351         regcache, don't free it.
8352         (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
8353         pre-existing register caches.
8354         * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
8355         type.
8356         (convert_ascii_to_int): : Constify `from' parameter type.
8357         (decode_M_packet, decode_X_packet): Replace the `to' parameter by
8358         a `to_p' pointer to pointer parameter.  If TO_P is NULL, malloc
8359         the needed buffer in-place.
8360         (relocate_instruction): New.
8361         * server.c (handle_query) <qSymbols>: If the target supports
8362         tracepoints, give it a chance of looking up symbols.  Report
8363         support for fast tracepoints.
8364         (handle_status): Stabilize threads.
8365         (process_serial_event): Adjust.
8366         * server.h (struct fast_tracepoint_jump): Forward declare.
8367         (struct process_info) <fast_tracepoint_jumps>: New field.
8368         (convert_ascii_to_int, convert_int_to_ascii): Adjust.
8369         (decode_X_packet, decode_M_packet): Adjust.
8370         (relocate_instruction): Declare.
8371         (in_process_agent_loaded): Declare.
8372         (tracepoint_look_up_symbols): Declare.
8373         (struct fast_tpoint_collect_status): Declare.
8374         (fast_tracepoint_collecting): Declare.
8375         (force_unlock_trace_buffer): Declare.
8376         (handle_tracepoint_bkpts): Declare.
8377         (initialize_low_tracepoint)
8378         (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
8379         * target.h (struct target_ops) <stabilize_threads,
8380         install_fast_tracepoint_jump_pad>: New fields.
8381         (stabilize_threads, install_fast_tracepoint_jump_pad): New.
8382         * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
8383         [HAVE_STDINT_H]: Include stdint.h.
8384         (trace_debug_1): Rename to ...
8385         (trace_vdebug): ... this.
8386         (trace_debug): Rename to ...
8387         (trace_debug_1): ... this.  Add `level' parameter.
8388         (trace_debug): New.
8389         (ATTR_USED, ATTR_NOINLINE): New.
8390         (IP_AGENT_EXPORT): New.
8391         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8392         (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
8393         (about_to_request_buffer_space, trace_buffer_is_full)
8394         (stopping_tracepoint, expr_eval_result, error_tracepoint)
8395         (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
8396         (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
8397         (traceframe_write_count, traceframes_created)
8398         (trace_state_variables)
8399         New renaming defines.
8400         (struct ipa_sym_addresses): New.
8401         (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
8402         (symbol_list): New.
8403         (ipa_sym_addrs): New.
8404         (all_tracepoint_symbols_looked_up): New.
8405         (in_process_agent_loaded): New.
8406         (write_e_ipa_not_loaded): New.
8407         (maybe_write_ipa_not_loaded): New.
8408         (tracepoint_look_up_symbols): New.
8409         (debug_threads) [IN_PROCESS_AGENT]: New.
8410         (read_inferior_memory) [IN_PROCESS_AGENT]: New.
8411         (UNKNOWN_SIDE_EFFECTS): New.
8412         (stop_tracing): New.
8413         (flush_trace_buffer): New.
8414         (stop_tracing_bkpt): New.
8415         (flush_trace_buffer_bkpt): New.
8416         (read_inferior_integer): New.
8417         (read_inferior_uinteger): New.
8418         (read_inferior_data_pointer): New.
8419         (write_inferior_data_pointer): New.
8420         (write_inferior_integer): New.
8421         (write_inferior_uinteger): New.
8422         (struct collect_static_trace_data_action): Delete.
8423         (enum tracepoint_type): New.
8424         (struct tracepoint) <type>: New field `type'.
8425         <actions_str, step_actions, step_actions_str>: Only include in
8426         GDBserver.
8427         <orig_size, obj_addr_on_target, adjusted_insn_addr>
8428         <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
8429         (tracepoints): Use IP_AGENT_EXPORT.
8430         (last_tracepoint): Don't include in the IPA.
8431         (stopping_tracepoint): Use IP_AGENT_EXPORT.
8432         (trace_buffer_is_full): Use IP_AGENT_EXPORT.
8433         (alloced_trace_state_variables): New.
8434         (trace_state_variables): Use IP_AGENT_EXPORT.
8435         (traceframe_t): Delete unused variable.
8436         (circular_trace_buffer): Don't include in the IPA.
8437         (trace_buffer_start): Delete.
8438         (struct trace_buffer_control): New.
8439         (trace_buffer_free): Delete.
8440         (struct ipa_trace_buffer_control): New.
8441         (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
8442         (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
8443         New.
8444         (trace_buffer_ctrl): New.
8445         (TRACE_BUFFER_CTRL_CURR): New.
8446         (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
8447         Reimplement as macros.
8448         (trace_buffer_wrap): Delete.
8449         (traceframe_write_count, traceframe_read_count)
8450         (traceframes_created, tracing): Use IP_AGENT_EXPORT.
8451         (struct tracepoint_hit_ctx) <type>: New field.
8452         (struct fast_tracepoint_ctx): New.
8453         (memory_barrier): New.
8454         (cmpxchg): New.
8455         (record_tracepoint_error): Update atomically in the IPA.
8456         (clear_inferior_trace_buffer): New.
8457         (about_to_request_buffer_space): New.
8458         (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
8459         updating the same buffer.
8460         (add_tracepoint): Default the tracepoint's type to trap
8461         tracepoint, and orig_size to -1.
8462         (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
8463         internal variables.
8464         (create_trace_state_variable): New parameter `gdb'.  Handle it.
8465         (clear_installed_tracepoints): Clear fast tracepoint jumps.
8466         (cmd_qtdp): Handle fast tracepoints.
8467         (cmd_qtdv): Adjust.
8468         (max_jump_pad_size): New.
8469         (gdb_jump_pad_head): New.
8470         (get_jump_space_head): New.
8471         (claim_jump_space): New.
8472         (sort_tracepoints): New.
8473         (MAX_JUMP_SIZE): New.
8474         (cmd_qtstart): Handle fast tracepoints.  Sync tracepoints with the
8475         IPA.
8476         (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
8477         support.  Upload fast traceframes, and delete internal IPA
8478         breakpoints.
8479         (stop_tracing_handler): New.
8480         (flush_trace_buffer_handler): New.
8481         (cmd_qtstop): Upload fast tracepoints.
8482         (response_tracepoint): Handle fast tracepoints.
8483         (tracepoint_finished_step): Upload fast traceframes.  Set the
8484         tracepoint hit context's tracepoint type.
8485         (handle_tracepoint_bkpts): New.
8486         (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
8487         type.  Add comment about fast tracepoints.
8488         (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
8489         non-existing action_str field.
8490         (get_context_regcache): Handle fast tracepoints.
8491         (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
8492         to the regcache.
8493         (fast_tracepoint_from_jump_pad_address): New.
8494         (fast_tracepoint_from_ipa_tpoint_address): New.
8495         (collecting_t): New.
8496         (force_unlock_trace_buffer): New.
8497         (fast_tracepoint_collecting): New.
8498         (collecting): New.
8499         (gdb_collect): New.
8500         (write_inferior_data_ptr): New.
8501         (target_tp_heap): New.
8502         (target_malloc): New.
8503         (download_agent_expr): New.
8504         (UALIGN): New.
8505         (download_tracepoints): New.
8506         (download_trace_state_variables): New.
8507         (upload_fast_traceframes): New.
8508         (IPA_FIRST_TRACEFRAME): New.
8509         (IPA_NEXT_TRACEFRAME_1): New.
8510         (IPA_NEXT_TRACEFRAME): New.
8511         [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
8512         [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
8513         (gdb_jump_pad_buffer_end): New.
8514         [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
8515         (initialize_tracepoint): Adjust.
8516         [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
8517         buffer.  Initialize the low module.
8518         * utils.c (PREFIX, TOOLNAME): New.
8519         (malloc_failure): Use PREFIX.
8520         (error): In the IPA, an error causes an exit.
8521         (fatal, warning): Use PREFIX.
8522         (internal_error): Use TOOLNAME.
8523         (NUMCELLS): Increase to 10.
8524         * configure, config.in: Regenerate.
8525
8526 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
8527
8528         * server.c (handle_query) <qSupported>: Do two passes over the
8529         qSupported string to avoid nesting strtok.
8530
8531 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
8532
8533         * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
8534         (CDEPS): New.
8535         * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping.  Test also
8536         -Wl,--dynamic-list.
8537         * configure: Regenerate.
8538         * proc-service.list: New.
8539
8540 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
8541
8542         * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
8543         New comment.
8544
8545 2010-05-26  Ozkan Sezer  <sezeroz@gmail.com>
8546
8547         * gdbreplay.c (remote_open): Check error return from socket() call by
8548         its equality to -1 not by it being negative.
8549         * remote-utils.c (remote_open): Likewise.
8550
8551 2010-05-23  Pedro Alves  <pedro@codesourcery.com>
8552
8553         * config.h: Regenerate.
8554
8555 2010-05-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
8556
8557         * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8558         doesn't provide PTRACE_GET_THREAD_AREA.
8559
8560 2010-05-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
8561
8562         * linux-m68k-low.c: Include <asm/ptrace.h>
8563         (ps_get_thread_area): Implement.
8564
8565 2010-05-03  Doug Evans  <dje@google.com>
8566
8567         * event-loop.c (struct callback_event): New struct.
8568         (callback_list): New global.
8569         (append_callback_event, delete_callback_event): New functions.
8570         (process_callback): New function.
8571         (start_event_loop): Call it.
8572         * remote-utils.c (NOT_SCHEDULED): Define.
8573         (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8574         moved out of readchar.
8575         (readchar): Rewrite.  Call reschedule before returning.
8576         (reset_readchar): New function.
8577         (remote_close): Call it.
8578         (process_remaining, reschedule): New functions.
8579         * server.h (callback_handler_func): New typedef.
8580         (append_callback_event, delete_callback_event): Declare.
8581
8582 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
8583
8584         * proc-service.c (ps_pglobal_lookup): Use
8585         thread_db_look_up_one_symbol.
8586         * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8587         parameter.  Use it instead of all_symbols_looked_up.
8588         * server.h (struct process_info) <all_symbols_looked_up>: Delete
8589         field.
8590         (all_symbols_looked_up): Don't declare.
8591         (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8592         * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8593         field.
8594         (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8595         Set all_symbols_looked_up here.
8596         (thread_db_look_up_one_symbol): New.
8597         (thread_db_get_tls_address): Adjust.
8598         (thread_db_load_search, try_thread_db_load_1): Always allocate the
8599         thread_db object on the heap, and tentatively set it in the
8600         process structure.
8601         (thread_db_init): Don't set all_symbols_looked_up here.
8602         * linux-low.h (thread_db_look_up_one_symbol): Declare.
8603
8604 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
8605
8606         * linux-low.c (linux_kill, linux_detach): Adjust.
8607         (status_pending_p_callback): Remove redundant statement.  Check
8608         for !TARGET_WAITIKIND_IGNORE, instead of
8609         TARGET_WAITKIND_STOPPED.
8610         (handle_tracepoints): Make sure LWP is locked.  Adjust.
8611         (linux_wait_for_event_1): Adjust.
8612         (linux_cancel_breakpoints): New.
8613         (unsuspend_one_lwp): New.
8614         (unsuspend_all_lwps): New.
8615         (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8616         (send_sigstop_callback): Change return type to int, add new
8617         `except' parameter and handle it.
8618         (suspend_and_send_sigstop_callback): New.
8619         (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8620         pass them down.  If SUSPEND, also increment the lwp's suspend
8621         count.
8622         (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8623         (need_step_over_p): Don't consider suspended LWPs.
8624         (start_step_over): Adjust.
8625         (proceed_one_lwp): Change return type to int, add new `except'
8626         parameter and handle it.
8627         (unsuspend_and_proceed_one_lwp): New.
8628         (proceed_all_lwps): Use find_inferior instead of
8629         for_each_inferior.
8630         (unstop_all_lwps): Add `unsuspend' parameter.  If UNSUSPEND, them
8631         also decrement the suspend count of LWPs.  Pass `except' down,
8632         instead of hacking its suspend count.
8633         (linux_pause_all): Add `freeze' parameter.  Adjust.
8634         (linux_unpause_all): New.
8635         (linux_target_ops): Install linux_unpause_all.
8636         * server.c (handle_status): Adjust.
8637         * target.h (struct target_ops): New fields `unpause_all' and
8638         `cancel_breakpoints'.  Add new parameter to `pause_all'.
8639         (pause_all): Add new `freeze' parameter.
8640         (unpause_all): New.
8641         (cancel_breakpoints): New.
8642         * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8643         cancel breakpoints.
8644         (cmd_qtstart): Pause threads.
8645         (stop_tracing): Pause threads, and cancel breakpoints.
8646         * win32-low.c (win32_target_ops): Adjust.
8647
8648 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
8649
8650         * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8651         the inferior right away from here...
8652         (linux_wait_1): ... to here, and adjust to check the thread's
8653         last_resume_kind instead of the lwp's step or stop_expected flags.
8654
8655 2010-05-02  Pedro Alves  <pedro@codesourcery.com>
8656
8657         * README: Use consistent `GDB' and `GDBserver' spellings.
8658
8659 2010-05-02  Pedro Alves  <pedro@codesourcery.com>
8660
8661         * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8662         (linux_kill): Stop all lwps here.  Don't delete the main lwp here.
8663         (linux_detach_one_lwp): Assume the lwp is stopped.
8664         (any_thread_of): Delete.
8665         (linux_detach): Stop all lwps here.  Don't blindly delete all
8666         breakpoints.
8667         (delete_lwp_callback): New.
8668         (linux_mourn): Delete all lwps of the process that is gone.
8669         (linux_wait_1): Don't delete the last lwp of the process here.
8670         * mem-break.h (mark_breakpoints_out): Declare.
8671         * mem-break.c (mark_breakpoints_out): New.
8672         (free_all_breakpoints): Use it.
8673         * server.c (handle_target_event): If the process is gone, mark
8674         breakpoints out.
8675         * thread-db.c (struct thread_db) <create_bp>: New field.
8676         (thread_db_enable_reporting): Fix prototype.  Store a thread event
8677         breakpoint reference in the thread_db struct.
8678         (thread_db_load_search): Clear the thread_db object.
8679         (try_thread_db_load_1): Ditto.
8680         (switch_to_process): New.
8681         (disable_thread_event_reporting): Use it.
8682         (remove_thread_event_breakpoints): New.
8683         (thread_db_detach, thread_db_mourn): Use it.
8684
8685 2010-05-01  Pedro Alves  <pedro@codesourcery.com>
8686
8687         * linux-low.c (linux_enable_event_reporting): New.
8688         (linux_wait_for_event_1, handle_extended_wait): Use it.
8689
8690 2010-04-30  Pedro Alves  <pedro@codesourcery.com>
8691
8692         * linux-low.c (linux_kill_one_lwp, linux_kill)
8693         (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8694         (send_sigstop): Take an lwp_info as parameter instead.  Queue a
8695         SIGSTOP even if the LWP is stopped.
8696         (send_sigstop_callback): New.
8697         (stop_all_lwps): Use send_sigstop_callback instead.
8698         (linux_resume_one_thread): Adjust.
8699         (proceed_one_lwp): Still proceed an LWP that the client has
8700         requested to stop, if we haven't reported it as stopped yet.  Make
8701         sure that LWPs the client want stopped, have a pending SIGSTOP.
8702
8703 2010-04-26  Doug Evans  <dje@google.com>
8704
8705         * server.c (handle_general_set): Make static.
8706
8707         * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8708         Print received char after testing for error/eof instead of before.
8709         (input_interrupt): Tweak comment.
8710
8711 2010-04-23  Doug Evans  <dje@google.com>
8712
8713         * server.c (start_inferior): Print inferior argv if --debug.
8714
8715 2010-04-21  Aleksandar Ristovski  <aristovski@qnx.com>
8716
8717         * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8718         * nto-x86-low.c: Include server.h
8719
8720 2010-04-20  Pierre Muller  <muller@ics.u-strasbg.fr>
8721
8722         * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8723         be consistent with other sources of this directory.
8724         (init_registers_amd64): Correct name of source file of this function
8725         in the comment.
8726
8727 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
8728
8729         * configure.srv (x86_64-*-mingw*): New configuration for Windows
8730         64-bit executables.
8731
8732 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
8733
8734         * win32-i386-low.c: Add 64-bit support.
8735         (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8736         (init_registers_amd64): Declare.
8737         (mappings): Add 64-bit version of array.
8738         (init_windows_x86): New function.
8739         (the_low_target): Change init_arch field to init_windows_x86.
8740
8741 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
8742
8743         * win32-low.c: Adapt to support also 64-bit architecture.
8744         (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8745         (get_image_name): Use SIZE_T type for local variable `done'.
8746         (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8747         (toolhelp_get_dll_name): Idem.
8748         (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8749         Use uintptr_t typecast to avoid warning.
8750         (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8751         (handle_exception): Use phex_nz to avoid warning.
8752         (win32_wait): Remove unused local variable `process'.
8753
8754 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
8755
8756         * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8757         `amd64-avx.o'.
8758
8759 2010-04-17  Pierre Muller  <muller@ics.u-strasbg.fr>
8760
8761         * configure.ac: Use `ws2_32' library for srv_mingw.
8762         * configure: Regenerate.
8763         * gdbreplay.c: Include winsock2.h instead of winsock.h.
8764         * remote-utils.c: Likewise.
8765
8766 2010-04-17  H.J. Lu  <hongjiu.lu@intel.com>
8767
8768         * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8769         if __x86_64__ is defined.
8770
8771 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
8772
8773         * configure: Regenerate.
8774
8775 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
8776
8777         * server.c (handle_query): Handle 'qGetTIBAddr' query.
8778         * target.h (target_ops): New get_tib_address field.
8779         * win32-low.h (win32_thread_info): Add thread_local_base field.
8780         * win32-low.c (child_add_thread): Add tlb argument.
8781         Set thread_local_base field to TLB.
8782         (get_child_debug_event): Adapt to child_add_thread change.
8783         (win32_get_tib_address): New function.
8784         (win32_target_ops): Set get_tib_address field to
8785         win32_get_tib_address.
8786         * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8787
8788 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
8789
8790         * linux-low.c (linux_mourn): Also remove the process.
8791         * server.c (handle_target_event): Don't remove the process here.
8792         * nto-low.c (nto_mourn): New.
8793         (nto_target_ops): Install it.
8794         * spu-low.c (spu_mourn): New.
8795         (spu_target_ops): Install it.
8796         * win32-low.c (win32_mourn): New.
8797         (win32_target_ops): Install it.
8798
8799 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
8800
8801         * server.h (buffer_xml_printf): Remove redundant `;'.
8802
8803 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
8804
8805         * regcache.c (set_register_cache): Invalidate regcaches before
8806         changing the register cache layout.
8807         (regcache_invalidate_one): Allow a NULL regcache.
8808         * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8809         regcaches before changing the register cache layout or the target
8810         regsets.
8811
8812 2010-04-12  H.J. Lu  <hongjiu.lu@intel.com>
8813
8814         * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8815         variable warning on Linux/x86-64.
8816
8817 2010-04-11  Pedro Alves  <pedro@codesourcery.com>
8818
8819         GDBserver disconnected tracing support.
8820
8821         * linux-low.c (linux_remove_process): Delete.
8822         (add_lwp): Don't set last_resume_kind here.
8823         (linux_kill): Use `mourn'.
8824         (linux_detach): Use `thread_db_detach', and `mourn'.
8825         (linux_mourn): New.
8826         (linux_attach_lwp_1): Adjust comment.
8827         (linux_attach): last_resume_kind moved the thread_info; adjust.
8828         (status_pending_p_callback): Adjust.
8829         (linux_wait_for_event_1): Adjust.
8830         (count_events_callback, select_singlestep_lwp_callback)
8831         (select_event_lwp_callback, cancel_breakpoints_callback)
8832         (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8833         (proceed_one_lwp): Adjust.
8834         (linux_async): Add debug output.
8835         (linux_thread_stopped): New.
8836         (linux_pause_all): New.
8837         (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8838         linux_pause_all.
8839         * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8840         (thread_db_free): Delete declaration.
8841         (thread_db_detach, thread_db_mourn): Declare.
8842         * thread-db.c (thread_db_init): Use thread_db_mourn.
8843         (thread_db_free): Delete, split in two.
8844         (disable_thread_event_reporting): New.
8845         (thread_db_detach): New.
8846         (thread_db_mourn): New.
8847
8848         * server.h (struct thread_info) <last_resume_kind>: New field.
8849         <attached>: Add comment.
8850         <gdb_detached>: New field.
8851         (handler_func): Change return type to int.
8852         (handle_serial_event, handle_target_event): Ditto.
8853         (gdb_connected): Declare.
8854         (tracing): Delete.
8855         (disconnected_tracing): Declare.
8856         (stop_tracing): Declare.
8857
8858         * server.c (handle_query) <qSupported>: Report support for
8859         disconnected tracing.
8860         (queue_stop_reply_callback): Account for running threads.
8861         (gdb_wants_thread_stopped): New.
8862         (gdb_wants_all_threads_stopped): New.
8863         (gdb_reattached_process): New.
8864         (handle_status): Clear the `gdb_detached' flag of all processes.
8865         In all-stop, stop all threads.
8866         (main): Be sure to leave tfind mode.  Handle disconnected tracing.
8867         (process_serial_event): If the remote connection breaks, or if an
8868         exit was forced with "monitor exit", force an event loop exit.
8869         Handle disconnected tracing on detach.
8870         (handle_serial_event): Adjust.
8871         (handle_target_event): If GDB isn't connected, forward events back
8872         to the inferior, unless the last process exited, in which case,
8873         exit gdbserver.  Adjust interface.
8874
8875         * remote-utils.c (remote_open): Don't block in accept.  Instead
8876         register an event loop source on the listen socket file
8877         descriptor.  Refactor bits into ...
8878         (listen_desc): ... this new global.
8879         (gdb_connected): ... this new function.
8880         (enable_async_notification): ... this new function.
8881         (handle_accept_event): ... this new function.
8882         (remote_close): Clear remote_desc.
8883
8884         * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8885
8886         * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8887         New fields.
8888         (mourn_inferior): Define.
8889         (target_process_qsupported): Avoid the dangling else problem.
8890         (thread_stopped): Define.
8891         (pause_all): Define.
8892         (target_waitstatus_to_string): Declare.
8893         * target.c (target_waitstatus_to_string): New.
8894
8895         * tracepoint.c (tracing): Make extern.
8896         (disconnected_tracing): New.
8897         (stop_tracing): Make extern.  Handle tracing stops due to GDB
8898         disconnecting.
8899         (cmd_qtdisconnected): New.
8900         (cmd_qtstatus): Report disconnected tracing status in trace reply.
8901         (handle_tracepoint_general_set): Handle QTDisconnected.
8902
8903         * event-loop.c (event_handler_func): Change return type to int.
8904         (process_event): Bail out if the event handler wants the event
8905         loop to stop.
8906         (handle_file_event): Ditto.
8907         (start_event_loop): Bail out if the event handler wants the event
8908         loop to stop.
8909
8910         * nto-low.c (nto_target_ops): Adjust.
8911         * spu-low.c (spu_wait): Don't remove the process here.
8912         (spu_target_ops): Adjust.
8913         * win32-low.c (win32_wait): Don't remove the process here.
8914         (win32_target_ops): Adjust.
8915
8916 2010-04-11  Pedro Alves  <pedro@codesourcery.com>
8917
8918         * regcache.c (realloc_register_cache): Invalidate inferior's
8919         regcache before recreating it.
8920
8921 2010-04-09  Pedro Alves  <pedro@codesourcery.com>
8922
8923         * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8924
8925 2010-04-09  Stan Shebs  <stan@codesourcery.com>
8926             Pedro Alves  <pedro@codesourcery.com>
8927
8928         * server.h (LONGEST): New.
8929         (struct thread_info) <while_stepping>: New field.
8930         (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8931         Declare.
8932         (initialize_tracepoint, handle_tracepoint_general_set)
8933         (handle_tracepoint_query, tracepoint_finished_step)
8934         (tracepoint_was_hit, release_while_stepping_state_list):
8935         (current_traceframe): Declare.
8936         * server.c (handle_general_set): Handle tracepoint packets.
8937         (read_memory): New.
8938         (write_memory): New.
8939         (handle_search_memory_1): Use read_memory.
8940         (handle_query): Report support for conditional tracepoints, trace
8941         state variables, and tracepoint sources.  Handle tracepoint
8942         queries.
8943         (main): Initialize the tracepoints module.
8944         (process_serial_event): Handle traceframe reads/writes.
8945
8946         * linux-low.c (handle_tracepoints): New.
8947         (linux_wait_1): Call it.
8948         (linux_resume_one_lwp): Handle while-stepping.
8949         (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8950         (linux_target_ops): Install them.
8951         * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8952         New field.
8953         * linux-x86-low.c (x86_supports_tracepoints): New.
8954         (the_low_target). Install it.
8955
8956         * mem-break.h (delete_breakpoint): Declare.
8957         * mem-break.c (delete_breakpoint): Make external.
8958
8959         * target.h (struct target_ops): Add `supports_tracepoints',
8960         `read_pc', and `write_pc' fields.
8961         (target_supports_tracepoints): Define.
8962         * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8963         (phex_nz): New.
8964
8965         * regcache.h (struct regcache) <registers_owned>: New field.
8966         (init_register_cache, regcache_cpy): Declare.
8967         (regcache_read_pc, regcache_write_pc): Declare.
8968         (register_cache_size): Declare.
8969         (supply_regblock): Declare.
8970         * regcache.c (init_register_cache): New.
8971         (new_register_cache): Use it.
8972         (regcache_cpy): New.
8973         (register_cache_size): New.
8974         (supply_regblock): New.
8975         (regcache_read_pc, regcache_write_pc): New.
8976
8977         * tracepoint.c: New.
8978
8979         * Makefile.in (OBS): Add tracepoint.o.
8980         (tracepoint.o): New rule.
8981
8982 2010-04-08  H.J. Lu  <hongjiu.lu@intel.com>
8983
8984         * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8985         (i386-mmx.o): New.
8986         (i386-mmx.c): Likewise.
8987         (i386-mmx-linux.o): Likewise.
8988         (i386-mmx-linux.c): Likewise.
8989
8990         * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8991         (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8992         (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8993         (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8994
8995         * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8996         (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8997         and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8998
8999 2010-04-07  H.J. Lu  <hongjiu.lu@intel.com>
9000
9001         * Makefile.in (clean): Updated.
9002         (i386-avx.o): New.
9003         (i386-avx.c): Likewise.
9004         (i386-avx-linux.o): Likewise.
9005         (i386-avx-linux.c): Likewise.
9006         (amd64-avx.o): Likewise.
9007         (amd64-avx.c): Likewise.
9008         (amd64-avx-linux.o): Likewise.
9009         (amd64-avx-linux.c): Likewise.
9010
9011         * configure.srv (srv_i386_regobj): Add i386-avx.o.
9012         (srv_i386_linux_regobj): Add i386-avx-linux.o.
9013         (srv_amd64_regobj): Add amd64-avx.o.
9014         (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
9015         (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
9016         (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
9017         (srv_i386_xmlfiles): Add i386/i386-avx.xml.
9018         (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
9019         (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
9020         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
9021
9022         * i387-fp.c: Include "i386-xstate.h".
9023         (i387_xsave): New.
9024         (i387_cache_to_xsave): Likewise.
9025         (i387_xsave_to_cache): Likewise.
9026         (x86_xcr0): Likewise.
9027
9028         * i387-fp.h (i387_cache_to_xsave): Likewise.
9029         (i387_xsave_to_cache): Likewise.
9030         (x86_xcr0): Likewise.
9031
9032         * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
9033         * linux-crisv32-low.c (target_regsets): Likewise.
9034         * linux-m68k-low.c (target_regsets): Likewise.
9035         * linux-mips-low.c (target_regsets): Likewise.
9036         * linux-ppc-low.c (target_regsets): Likewise.
9037         * linux-s390-low.c (target_regsets): Likewise.
9038         * linux-sh-low.c (target_regsets): Likewise.
9039         * linux-sparc-low.c (target_regsets): Likewise.
9040         * linux-xtensa-low.c (target_regsets): Likewise.
9041
9042         * linux-low.c: Include <sys/uio.h>.
9043         (regsets_fetch_inferior_registers): Support nt_type.
9044         (regsets_store_inferior_registers): Likewise.
9045         (linux_process_qsupported): New.
9046         (linux_target_ops): Add linux_process_qsupported.
9047
9048         * linux-low.h (regset_info): Add nt_type.
9049         (linux_target_ops): Add process_qsupported.
9050
9051         * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
9052         and <sys/uio.h>.
9053         (init_registers_i386_avx_linux): New.
9054         (init_registers_amd64_avx_linux): Likewise.
9055         (xmltarget_i386_linux_no_xml): Likewise.
9056         (xmltarget_amd64_linux_no_xml): Likewise.
9057         (PTRACE_GETREGSET): Likewise.
9058         (PTRACE_SETREGSET): Likewise.
9059         (x86_fill_xstateregset): Likewise.
9060         (x86_store_xstateregset): Likewise.
9061         (use_xml): Likewise.
9062         (x86_linux_update_xmltarget): Likewise.
9063         (x86_linux_process_qsupported): Likewise.
9064         (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
9065         (x86_arch_setup): Don't call init_registers_amd64_linux nor
9066         init_registers_i386_linux here.  Call
9067         x86_linux_update_xmltarget.
9068         (the_low_target): Add x86_linux_process_qsupported.
9069
9070         * server.c (handle_query): Call target_process_qsupported.
9071
9072         * target.h (target_ops): Add process_qsupported.
9073         (target_process_qsupported): New.
9074
9075 2010-04-03  Pedro Alves  <pedro@codesourcery.com>
9076
9077         * inferiors.c (add_thread): Set last_status kind to
9078         TARGET_WAITKIND_IGNORE.
9079         * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
9080         fetch.  Use ptid_of.  Avoid unnecessary get_lwp_thread calls.
9081         (linux_wait_1): Move `thread' local definition to block that uses
9082         it.  Don't NULL initialize `event_child'.
9083         (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
9084         Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
9085         * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
9086
9087 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
9088
9089         * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
9090         an extended waitstatus, or by a watchpoint.
9091         (cancel_breakpoints_callback): Don't cancel a breakpoint if the
9092         thread was stepping or has been stopped by a watchpoint.
9093
9094 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
9095
9096         * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
9097         (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
9098         of another, then delete the previous, and validate all
9099         breakpoints.
9100         (validate_inserted_breakpoint): New.
9101         (delete_disabled_breakpoints): New.
9102         (validate_breakpoints): New.
9103         (check_mem_read): Validate breakpoints before trusting their
9104         shadow.  Delete disabled breakpoints.
9105         (check_mem_write): Validate breakpoints before trusting they
9106         should be inserted.  Delete disabled breakpoints.
9107         * mem-break.h (validate_breakpoints):
9108         * server.c (handle_query): Validate breakpoints when we see a
9109         qSymbol query.
9110
9111 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
9112
9113         * linux-low.c (linux_wait_1): Avoid setting need_step_over is
9114         there's a GDB breakpoint at stop_pc.  Always report a trap to GDB
9115         if we could tell there's a GDB breakpoint at stop_pc.
9116         (need_step_over_p): Don't do a step over if we find a GDB
9117         breakpoint at the resume PC.
9118
9119         * mem-break.c (struct raw_breakpoint): New.
9120         (enum bkpt_type): New type `gdb_breakpoint'.
9121         (struct breakpoint): Delete the `PC', `old_data' and `inserted'
9122         fields.  New field `raw'.
9123         (find_raw_breakpoint_at): New.
9124         (set_raw_breakpoint_at): Handle refcounting.  Create a raw
9125         breakpoint instead.
9126         (set_breakpoint_at): Adjust.
9127         (delete_raw_breakpoint): New.
9128         (release_breakpoint): New.
9129         (delete_breakpoint): Rename to...
9130         (delete_breakpoint_1): ... this.  Add proc parameter.  Use
9131         release_breakpoint.  Return ENOENT.
9132         (delete_breakpoint): Reimplement.
9133         (find_breakpoint_at): Delete.
9134         (find_gdb_breakpoint_at): New.
9135         (delete_breakpoint_at): Delete.
9136         (set_gdb_breakpoint_at): New.
9137         (delete_gdb_breakpoint_at): New.
9138         (gdb_breakpoint_here): New.
9139         (set_reinsert_breakpoint): Use release_breakpoint.
9140         (uninsert_breakpoint): Rename to ...
9141         (uninsert_raw_breakpoint): ... this.
9142         (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
9143         (reinsert_raw_breakpoint): Change parameter type to
9144         raw_breakpoint.
9145         (reinsert_breakpoints_at): Adjust to handle raw breakpoints
9146         instead.
9147         (check_breakpoints): Adjust.  Use release_breakpoint.
9148         (breakpoint_here): Rewrite using find_raw_breakpoint_at.
9149         (breakpoint_inserted_here): Ditto.
9150         (check_mem_read): Adjust to iterate over raw breakpoints instead.
9151         Don't trust the breakpoint's shadow if it is not inserted.
9152         (check_mem_write): Adjust to iterate over raw breakpoints instead.
9153         (delete_all_breakpoints): Adjust.
9154         (free_all_breakpoints): Mark all breakpoints as uninserted, and
9155         use delete_breakpoint_1.
9156
9157         * mem-break.h (breakpoints_supported): Delete declaration.
9158         (set_gdb_breakpoint_at): Declare.
9159         (gdb_breakpoint_here): Declare.
9160         (delete_breakpoint_at): Delete.
9161         (delete_gdb_breakpoint_at): Declare.
9162
9163         * server.h (struct raw_breakpoint): Forward declare.
9164         (struct process_info): New field `raw_breakpoints'.
9165
9166         * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
9167         breakpoints.
9168
9169 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
9170
9171         * linux-low.c (status_pending_p_callback): Fix comment.
9172         (linux_wait_for_event_1): Move most of the internal breakpoint
9173         handling from here...
9174         (linux_wait_1): ... to here.
9175         (count_events_callback): New.
9176         (select_singlestep_lwp_callback): New.
9177         (select_event_lwp_callback): New.
9178         (cancel_breakpoints_callback): New.
9179         (select_event_lwp): New.
9180         (linux_wait_1): Simplify internal breakpoint handling.  Give equal
9181         priority to all LWPs that have had events that should be reported
9182         to the client.  Cancel breakpoints when about to reporting the
9183         event to the client, not while stopping lwps.  No longer cancel
9184         finished single-steps here.
9185         (cancel_finished_single_step): Delete.
9186         (cancel_finished_single_steps): Delete.
9187
9188 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
9189
9190         * mem-break.c (enum bkpt_type): New.
9191         (struct breakpoint): New field `type'.
9192         (set_breakpoint_at): Change return type to struct breakpoint
9193         pointer.  Set type to `other_breakpoint' by default.
9194         (delete_breakpoint): Rewrite, supporting more than one breakpoint
9195         in the breakpoint list.
9196         (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
9197         (reinsert_breakpoint): Rename to ...
9198         (reinsert_raw_breakpoint): ... this.
9199         (reinsert_breakpoints_at): Adjust.
9200         * mem-break.h (struct breakpoint): Declare.
9201         (set_breakpoint_at): Change return type to struct breakpoint
9202         pointer.
9203
9204 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
9205
9206         * server.c (handle_query): Assign, not compare.
9207
9208 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
9209
9210         Teach linux gdbserver to step-over-breakpoints.
9211
9212         * linux-low.c (can_hardware_single_step): New.
9213         (supports_breakpoints): New.
9214         (handle_extended_wait): If stopping threads, read the stop pc of
9215         the new cloned LWP.
9216         (get_pc): New.
9217         (get_stop_pc): Add `lwp' parameter.  Handle it.  Bail out if the
9218         low target doesn't support retrieving the PC.
9219         (add_lwp): Set last_resume_kind to resume_continue.
9220         (linux_attach_lwp_1): Adjust comments.  Always set stop_expected.
9221         (linux_attach): Don't clear stop_expected.  Set the lwp's
9222         last_resume_kind to resume_stop.
9223         (linux_detach_one_lwp): Don't check for removed breakpoints.
9224         (check_removed_breakpoint): Delete.
9225         (status_pending_p): Rename to ...
9226         (status_pending_p_callback): ... this.  Don't check for removed
9227         breakpoints.  Don't consider threads that are stopped from GDB's
9228         perspective.
9229         (linux_wait_for_lwp): Always read the stop_pc here.
9230         (cancel_breakpoint): New.
9231         (step_over_bkpt): New global.
9232         (linux_wait_for_event_1): Implement stepping over breakpoints.
9233         (gdb_wants_lwp_stopped): New.
9234         (gdb_wants_all_stopped): New.
9235         (linux_wait_1): Tag threads as gdb-wants-stopped.  Cancel finished
9236         single-step traps here.  Store the thread's last reported target
9237         wait status.
9238         (send_sigstop): Don't clear stop_expected.  Always set it,
9239         instead.
9240         (mark_lwp_dead): Remove reference to pending_is_breakpoint.
9241         (cancel_finished_single_step): New.
9242         (cancel_finished_single_steps): New.
9243         (wait_for_sigstop): Don't cancel finished single-step traps here.
9244         (linux_resume_one_lwp): Don't check for removed breakpoints.
9245         Don't set `step' on non-hardware step archs.
9246         (linux_set_resume_request): Ignore resume_stop requests if already
9247         stopping or stopped.  Set the lwp's last_resume_kind.
9248         (resume_status_pending_p): Don't check for removed breakpoints.
9249         (need_step_over_p): New.
9250         (start_step_over): New.
9251         (finish_step_over): New.
9252         (linux_resume_one_thread): Always queue a sigstop for resume_stop
9253         requests.  Clear the thread's last reported target waitstatus.
9254         Don't use the `suspended' flag.  Don't consider pending breakpoints.
9255         (linux_resume): Start a step-over if necessary.
9256         (proceed_one_lwp): New.
9257         (proceed_all_lwps): New.
9258         (unstop_all_lwps): New.
9259         * linux-low.h (struct lwp_info): Rewrite comment for the
9260         `suspended' flag.  Add the `stop_pc' field.  Delete the
9261         `pending_stop_pc' field.  Tweak the `stepping' flag's comment.
9262         Add `'last_resume_kind' and `need_step_over' fields.
9263         * inferiors.c (struct thread_info): Delete, moved elsewhere.
9264         * mem-break.c (struct breakpoint): Delete `reinserting' flag.
9265         Delete `breakpoint_to_reinsert' field.  New flag `inserted'.
9266         (set_raw_breakpoint_at): New.
9267         (set_breakpoint_at): Rewrite to use it.
9268         (reinsert_breakpoint_handler): Delete.
9269         (set_reinsert_breakpoint): New.
9270         (reinsert_breakpoint_by_bp): Delete.
9271         (delete_reinsert_breakpoints): New.
9272         (uninsert_breakpoint): Rewrite.
9273         (uninsert_breakpoints_at): New.
9274         (reinsert_breakpoint): Rewrite.
9275         (reinsert_breakpoints_at): New.
9276         (check_breakpoints): Rewrite.
9277         (breakpoint_here): New.
9278         (breakpoint_inserted_here): New.
9279         (check_mem_read): Adjust.
9280         * mem-break.h (breakpoints_supported, breakpoint_here)
9281         (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
9282         (reinsert_breakpoint_by_bp): Delete declaration.
9283         (delete_reinsert_breakpoints): Declare.
9284         (reinsert_breakpoint): Delete declaration.
9285         (reinsert_breakpoints_at): Declare.
9286         (uninsert_breakpoint): Delete declaration.
9287         (uninsert_breakpoints_at): Declare.
9288         (check_breakpoints): Adjust prototype.
9289         * server.h: Adjust include order.
9290         (struct thread_info): Declare here.  Add a `last_status' field.
9291
9292 2010-03-23  Michael Snyder  <msnyder@vmware.com>
9293
9294         * server.c (crc32): New function.
9295         (handle_query): Add handling for 'qCRC:' request.
9296
9297 2010-03-23  Pedro Alves  <pedro@codesourcery.com>
9298
9299         * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
9300         lwp had been stopped by a watchpoint.
9301
9302 2010-03-16  Pedro Alves  <pedro@codesourcery.com>
9303
9304         * server.h (internal_error): Declare.
9305         (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
9306         * utils.c (internal_error): New function.
9307
9308 2010-03-15  Andreas Schwab  <schwab@redhat.com>
9309
9310         * configure.srv: Fix typo setting srv_regobj.
9311
9312 2010-03-15  Pedro Alves  <pedro@codesourcery.com>
9313
9314         * linux-low.c (fetch_register): Avoid passing a non string literal
9315         format to `error'.
9316         (usr_store_inferior_registers): Ditto.
9317
9318 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
9319
9320         * linux-low.c (linux_write_memory): Bail out early if peeking
9321         memory failed.
9322
9323 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
9324
9325         * linux-low.h (struct lwp_info): New fields
9326         `stopped_by_watchpoint' and `stopped_data_address'.
9327         * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
9328         here, and cache them in the lwp object.
9329         (wait_for_sigstop): Check stopped_by_watchpoint lwp field
9330         directly.
9331         (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
9332         field.
9333         (linux_stopped_by_watchpoint): Rewrite.
9334         (linux_stopped_data_address): Rewrite.
9335
9336 2010-03-06  Simo Melenius  <simo.melenius@iki.fi>
9337
9338         * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
9339         switching the current inferior, not before.
9340
9341 2010-03-01  H.J. Lu  <hongjiu.lu@intel.com>
9342
9343         * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
9344         reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
9345         i386-linux.c and amd64-linux.c.
9346         (reg-i386.o): Removed.
9347         (reg-i386.c): Likewise.
9348         (reg-i386-linux.o): Likewise.
9349         (reg-i386-linux.c): Likewise.
9350         (reg-x86-64.o): Likewise.
9351         (reg-x86-64.c): Likewise.
9352         (reg-x86-64-linux.o): Likewise.
9353         (reg-x86-64-linux.c): Likewise.
9354         (i386.o): New.
9355         (i386.c): Likewise.
9356         (i386-linux.o): Likewise.
9357         (i386-linux.c): Likewise.
9358         (amd64.o): Likewise.
9359         (amd64.c): Likewise.
9360         (amd64-linux.o): Likewise.
9361         (amd64-linux.c): Likewise.
9362
9363         * configure.srv (srv_i386_regobj): New.
9364         (srv_i386_linux_regobj): Likewise.
9365         (srv_amd64_regobj): Likewise.
9366         (srv_amd64_linux_regobj): Likewise.
9367         (srv_i386_32bit_xmlfiles): Likewise.
9368         (srv_i386_64bit_xmlfiles): Likewise.
9369         (srv_i386_xmlfiles): Likewise.
9370         (srv_amd64_xmlfiles): Likewise.
9371         (srv_i386_linux_xmlfiles): Likewise.
9372         (srv_amd64_linux_xmlfiles): Likewise.
9373         (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj.  Set
9374         srv_xmlfiles to $srv_i386_xmlfiles.
9375         (i[34567]86-*-mingw32ce*): Likewise.
9376         (i[34567]86-*-mingw*): Likewise.
9377         (i[34567]86-*-nto*): Likewise.
9378         (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
9379         and $srv_amd64_linux_regobj.  Set srv_xmlfiles to
9380         $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
9381         (x86_64-*-linux*): Likewise.
9382
9383         * linux-x86-low.c (init_registers_x86_64_linux): Removed.
9384         (init_registers_amd64_linux): New.
9385         (x86_arch_setup): Replace init_registers_x86_64_linux with
9386         init_registers_amd64_linux.
9387
9388 2010-02-23  Maxim Kuvyrkov  <maxim@codesourcery.com>
9389
9390         * configure.ac: Check for libdl.  If it is not available link against
9391         static libthread_db.
9392         * configure: Regenerate.
9393
9394 2010-02-22  Pedro Alves  <pedro@codesourcery.com>
9395
9396         PR9605
9397
9398         * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
9399         handing a read watchpoint.
9400         (i386_low_insert_watchpoint): Read watchpoints aren't supported.
9401
9402 2010-02-12  Doug Evans  <dje@google.com>
9403
9404         * linux-low.c (linux_supports_tracefork_flag): Document.
9405         (linux_look_up_symbols): Add comment.
9406
9407 2010-02-03  H.J. Lu  <hongjiu.lu@intel.com>
9408
9409         * regcache.c (supply_register): Clear regcache if buf is NULL.
9410
9411 2010-02-02  Nicolas Roche  <roche@sourceware.org>
9412             Joel Brobecker  <brobecker@adacore.com>
9413
9414         * inferiors.c (find_inferior): Add function documentation.
9415         (unloaded_dll): Handle the case where the unloaded dll has not
9416         been previously registered in the dll list.
9417
9418 2010-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
9419
9420         * linux-arm-low.c (thumb_breakpoint_len): Delete.
9421         (thumb2_breakpoint): New.
9422         (arm_breakpoint_at): Check for Thumb-2 breakpoints.
9423
9424 2010-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
9425
9426         * linux-low.c (get_stop_pc): Check for SIGTRAP.
9427         (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
9428         breakpoints.
9429
9430 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
9431
9432         * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
9433
9434 2010-01-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
9435
9436         * linux-s390-low.c (s390_collect_ptrace_register)
9437         (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
9438
9439 2010-01-21  Doug Evans  <dje@google.com>
9440
9441         * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
9442         (PTRACE_ARG4_TYPE): New macro.
9443         (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
9444         (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
9445         (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
9446         (usr_store_inferior_registers): Ditto.
9447         (linux_read_memory, linux_write_memory): Ditto.
9448         (linux_test_for_tracefork): Ditto.
9449
9450         * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
9451         Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
9452
9453 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
9454
9455         * proc-service.c (ps_lgetregs): Don't refetch registers from the
9456         target.
9457
9458 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
9459
9460         * spu-low.c (spu_fetch_registers, spu_store_registers): Change
9461         prototype to take a regcache.  Adjust.
9462
9463 2010-01-20  Pedro Alves  <pedro@codesourcery.com>
9464
9465         * regcache.h (struct thread_info): Forward declare.
9466         (struct regcache): New.
9467         (new_register_cache): Adjust prototype.
9468         (get_thread_regcache): Declare.
9469         (free_register_cache): Adjust prototype.
9470         (registers_to_string, registers_from_string): Ditto.
9471         (supply_register, supply_register_by_name, collect_register)
9472         (collect_register_as_string, collect_register_by_name): Ditto.
9473         * regcache.c (struct inferior_regcache_data): Delete.
9474         (get_regcache): Rename to ...
9475         (get_thread_regcache): ... this.  Adjust.  Switch inferior before
9476         fetching registers.
9477         (regcache_invalidate_one): Adjust.
9478         (regcache_invalidate): Fix prototype.
9479         (new_register_cache): Return the new register cache.
9480         (free_register_cache): Change prototype.
9481         (realloc_register_cache): Adjust.
9482         (registers_to_string): Change prototype to take a regcache.  Adjust.
9483         (registers_from_string): Ditto.
9484         (register_data): Ditto.
9485         (supply_register): Ditto.
9486         (supply_register_by_name): Ditto.
9487         (collect_register): Ditto.
9488         (collect_register_as_string): Ditto.
9489         (collect_register_by_name): Ditto.
9490         * server.c (process_serial_event): Adjust.
9491         * linux-low.h (regset_fill_func, regset_store_func): Change
9492         prototype.
9493         (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
9494         Change prototype.
9495         * linux-low.c (get_stop_pc): Adjust.
9496         (check_removed_breakpoint): Adjust.
9497         (linux_wait_for_event): Adjust.
9498         (linux_resume_one_lwp): Adjust.
9499         (fetch_register): Add regcache parameter.  Adjust.
9500         (usr_store_inferior_registers): Ditto.
9501         (regsets_fetch_inferior_registers): Ditto.
9502         (regsets_store_inferior_registers): Ditto.
9503         (linux_fetch_registers, linux_store_registers): Ditto.
9504         * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
9505         regcache.  Adjust.
9506         (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
9507         Ditto.
9508         * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
9509         prototype to take a regcache.
9510         (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
9511         * remote-utils.c (convert_ascii_to_int, outreg)
9512         (prepare_resume_reply): Change prototype to take a regcache.
9513         Adjust.
9514         * target.h (struct target_ops) <fetch_registers, store_registers>:
9515         Change prototype to take a regcache.
9516         (fetch_inferior_registers, store_inferior_registers): Change
9517         prototype to take a regcache.  Adjust.
9518         * proc-service.c (ps_lgetregs): Adjust.
9519         * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
9520         (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
9521         (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
9522         take a regcache.  Adjust.
9523         * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
9524         (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
9525         (arm_store_vfpregset, arm_get_pc, arm_set_pc):
9526         (arm_breakpoint_at): Change prototype to take a regcache.  Adjust.
9527         * linux-cris-low.c (cris_get_pc, cris_set_pc)
9528         (cris_cannot_fetch_register):
9529         (cris_breakpoint_at): Change prototype to take a regcache.
9530         Adjust.
9531         * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
9532         cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
9533         to take a regcache.  Adjust.
9534         (cris_breakpoint_at, cris_insert_point, cris_remove_point):
9535         Adjust.
9536         * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
9537         take a regcache.  Adjust.
9538         * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
9539         (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
9540         (m68k_set_pc): Change prototype to take a regcache.  Adjust.
9541         * linux-mips-low.c (mips_get_pc):
9542         (mips_set_pc): Change prototype to take a regcache.  Adjust.
9543         (mips_reinsert_addr): Adjust.
9544         (mips_collect_register): Change prototype to take a regcache.
9545         Adjust.
9546         (mips_supply_register):
9547         (mips_collect_register_32bit, mips_supply_register_32bit)
9548         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9549         (mips_store_fpregset): Ditto.
9550         * linux-ppc-low.c (ppc_supply_ptrace_register)
9551         (ppc_supply_ptrace_register): Ditto.
9552         (parse_spufs_run): Adjust.
9553         (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9554         (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9555         (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9556         take a regcache.  Adjust.
9557         * linux-s390-low.c (s390_collect_ptrace_register)
9558         (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9559         (s390_set_pc): Change prototype to take a regcache.  Adjust.
9560         (s390_arch_setup): Adjust.
9561         * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9562         (sh_fill_gregset): Change prototype to take a regcache.  Adjust.
9563         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9564         (sparc_fill_gregset, sparc_store_gregset_from_stack)
9565         (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9566         regcache.  Adjust.
9567         (sparc_breakpoint_at): Adjust.
9568         * linux-xtensa-low.c (xtensa_fill_gregset):
9569         (xtensa_store_gregset):
9570         (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9571         (xtensa_set_pc): Change prototype to take a regcache.  Adjust.
9572         * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9573         prototype to take a regcache.  Adjust.
9574         * win32-arm-low.c (arm_fetch_inferior_register)
9575         (arm_store_inferior_register): Change prototype to take a
9576         regcache.  Adjust.
9577         * win32-i386-low.c (i386_fetch_inferior_register)
9578         (i386_store_inferior_register): Change prototype to take a
9579         regcache.  Adjust.
9580         * win32-low.c (child_fetch_inferior_registers)
9581         (child_store_inferior_registers): Change prototype to take a
9582         regcache.  Adjust.
9583         (win32_wait): Adjust.
9584         (win32_fetch_inferior_registers): Change prototype to take a
9585         regcache.  Adjust.
9586         (win32_store_inferior_registers): Adjust.
9587         * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9588         store_inferior_register>: Change prototype to take a regcache.
9589
9590 2010-01-20  Doug Evans  <dje@google.com>
9591
9592         * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9593         #ifdef.
9594         (linux_wait_for_event1, linux_init_signals): Ditto.
9595         (W_STOPCODE): Provide definition if missing.
9596
9597 2010-01-13  Vladimir Prus  <vladimir@codesourcery.com>
9598
9599         * linux-low.c (linux_core_of_thread): New.
9600         (compare_ints, show_process, list_threads): New.
9601         (linux_qxfer_osdata): Report threads and cores.
9602         (linux_target_op): Register linux_core_of_thread.
9603         * remote-utils.c (prepare_resume_reply): Report the core.
9604         (buffer_xml_printf): Support %d specifier.
9605         * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9606         New.
9607         (handle_query): Handle qXfer:threads.  Announce availability
9608         thereof.
9609         * target.h (struct target_ops): New field core_of_thread.
9610
9611 2010-01-04  Ulrich Weigand  <uweigand@de.ibm.com>
9612
9613         * Makefile.in (clean): Remove new generated files.
9614         (reg-s390.o, reg-s390.c): Remove rules.
9615         (reg-s390x.o, reg-s390x.c): Likewise.
9616         (s390-linux32.o, s390-linux32.c): Add rules.
9617         (s390-linux64.o, s390-linux64.c): Likewise.
9618         (s390x-linux64.o, s390x-linux64.c): Likewise.
9619         * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9620         * linux-s390-low.c: Include <elf.h>.
9621         (HWCAP_S390_HIGH_GPRS): Define if undefined.
9622         (init_registers_s390): Remove prototype.
9623         (init_registers_s390x): Likewise.
9624         (init_registers_s390_linux32): Add prototype.
9625         (init_registers_s390_linux64): Likewise.
9626         (init_registers_s390x_linux64): Likewise.
9627         (s390_num_regs_3264): New define.
9628         (s390_regmap_3264): New global variable.
9629         (s390_cannot_fetch_register): Remove obsolete check.
9630         (s390_cannot_store_register): Likewise.
9631         (s390_collect_ptrace_register): Handle upper/lower register halves.
9632         (s390_supply_ptrace_register): Likewise.
9633         (s390_fill_gregset): Update to register number changes.
9634         (s390_get_hwcap): New routine.
9635         (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9636         Install appropriate regmap and register set.
9637
9638 2010-01-01  Joel Brobecker  <brobecker@adacore.com>
9639
9640         * server.c (gdbserver_version): Update copyright year to 2010.
9641         * gdbreplay.c (gdbreplay_version): Likewise.
9642
9643 2009-12-28  Doug Evans  <dje@google.com>
9644
9645         * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9646         elf/external.h.  Include <elf.h> instead but only if necessary.
9647
9648 2009-12-28  Pedro Alves  <pedro@codesourcery.com>
9649
9650         * linux-low.c (linux_remove_process): Remove `detaching'
9651         parameter.  Don't release/detach from thread_db here.
9652         (linux_kill): Release/detach from thread_db here, ...
9653         (linux_detach): ... and here, before actually detaching.
9654         (linux_wait_1): ... and here, when a process exits.
9655         * thread-db.c (any_thread_of): New.
9656         (thread_db_free): Switch the current inferior to a thread of the
9657         passed in process.
9658
9659 2009-12-21  Doug Evans  <dje@google.com>
9660
9661         * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9662
9663         * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9664         Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9665         warning ifndef __NR_tkill.  Move setting of errno there too.
9666         Delete unnecessary resetting of errno after syscall.
9667         Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9668
9669         * configure.ac: Check for dladdr.
9670         * config.in: Regenerate.
9671         * configure: Regenerate.
9672         * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9673         (try_thread_db_load): Update.
9674
9675         * linux-low.c (my_waitpid): Delete unnecessary prototype.
9676
9677 2009-12-18  Doug Evans  <dje@google.com>
9678
9679         * event-loop.c: Include unistd.h if it exists.
9680
9681         * linux-low.c (my_waitpid): Move definition away from being in
9682         between linux_tracefork_child/linux_test_for_tracefork.
9683
9684         * gdb_proc_service.h (psaddr_t): Fix type.
9685         * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9686         signature to match glibc.
9687
9688 2009-12-16  Doug Evans  <dje@google.com>
9689
9690         * linux-low.c (linux_read_memory): Fix argument to read.
9691
9692 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
9693
9694         * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9695         events, don't leave current_inferior pointing at null.
9696
9697 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
9698
9699         * win32-low.c (LOG): Delete.
9700         (OUTMSG): Output to stderr.
9701         (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9702         on compile time LOG macro.
9703         (win32_wait): Fix debug output.
9704
9705 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
9706
9707         * win32-low.c (win32_add_one_solib): If the dll name is
9708         "ntdll.dll", prepend the system directory to the dll path.
9709
9710 2009-11-17  Daniel Jacobowitz  <dan@codesourcery.com>
9711
9712         * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9713
9714 2009-11-17  Nathan Sidwell  <nathan@codesourcery.com>
9715             Vladimir Prus  <vladimir@codesourcery.com>
9716
9717         * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9718         * configure.ac: Check for __mcoldfire__ and set
9719         gdb_cv_m68k_is_coldfire.
9720         * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9721         reg-cf.o and reg-m68k.o.
9722         * configure: Regenerated.
9723
9724 2009-11-16  Pedro Alves  <pedro@codesourcery.com>
9725
9726         * linux-low.c (linux_remove_process): Add `detaching' parameter.
9727         Pass it to thread_db_free.
9728         (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9729         proper `detaching' argument to linux_remove_process.
9730         * linux-low.h (thread_db_free): Add `detaching' parameter.
9731         * thread-db.c (thread_db_init): Pass false as `detaching' argument
9732         to thread_db_free.
9733         (thread_db_free): Add `detaching' parameter.  Only
9734         call td_ta_clear_event if detaching from process.
9735
9736 2009-11-12  Maxim Kuvyrkov  <maxim@codesourcery.com>
9737
9738         * thread-db.c (thread_db_free): Fix typo.
9739
9740 2009-11-11  Paul Pluzhnikov  <ppluzhnikov@google.com>
9741
9742         PR gdb/10838
9743         * thread-db.c (thread_db_free): Call td_ta_clear_event.
9744
9745 2009-11-03  Nathan Sidwell  <nathan@codesourcery.com>
9746
9747         * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9748         with an i686 compiler.
9749         * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9750         needed.
9751         * configure: Rebuilt.
9752
9753 2009-10-29  Sandra Loosemore  <sandra@codesourcery.com>
9754
9755         PR gdb/10783
9756
9757         * server.c (handle_search_memory_1): Correct read_addr initialization
9758         in loop for searching subsequent chunks.
9759
9760 2009-10-29  Paul Pluzhnikov  <ppluzhnikov@google.com>
9761
9762         * configure.ac: New --with-libthread-db option.
9763         * thread-db.c: Allow direct dependence on libthread_db.
9764         (thread_db_free): Adjust.
9765         * config.in: Regenerate.
9766         * configure: Likewise.
9767
9768 2009-10-28  Paul Pluzhnikov  <ppluzhnikov@google.com>
9769
9770         PR gdb/10757
9771         * thread-db.c (attach_thread): New function.
9772         (maybe_attach_thread): Return success/failure.
9773         (find_new_threads_callback): Adjust.
9774         (thread_db_find_new_threads): Loop until no new threads.
9775
9776 2009-10-13  Pedro Alves  <pedro@codesourcery.com>
9777
9778         * proc-service.c (ps_lgetregs): Formatting.
9779
9780 2009-10-08  Paul Pluzhnikov  <ppluzhnikov@google.com>
9781
9782         * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9783         * configure.ac: Adjust.
9784         * linux-low.h (struct process_info_private): Move members to struct
9785         thread_db.
9786         (thread_db_free, thread_db_handle_monitor_command): New prototype.
9787         * linux-low.c (linux_remove_process): Adjust.
9788         (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9789         * server.c (handle_query): Move code ...
9790         (handle_monitor_command): ... here. New function.
9791         * target.h (struct target_ops): New member.
9792         * thread-db.c (struct thread_db): New.
9793         (libthread_db_search_path): New variable.
9794         (thread_db_create_event, thread_db_enable_reporting)
9795         (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9796         (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9797         (try_thread_db_load_1, dladdr_to_soname): New functions.
9798         (try_thread_db_load, thread_db_load_search): New functions.
9799         (thread_db_init): Search for libthread_db.
9800         (thread_db_free): New function.
9801         (thread_db_handle_monitor_command): Likewise.
9802         * config.in: Regenerate.
9803         * configure: Regenerate.
9804
9805 2009-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
9806
9807         * spu-low.c (spu_kill): Wait for inferior to terminate.
9808         Call clear_inferiors.
9809         (spu_detach): Call clear_inferiors.
9810
9811 2009-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9812
9813         * aclocal.m4: Regenerate.
9814         * config.in: Likewise.
9815         * configure: Likewise.
9816
9817 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
9818
9819         * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9820         (parse_spufs_run): New function.
9821         (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9822         (ppc_breakpoint_at): Handle SPU breakpoints.
9823
9824 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
9825
9826         * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9827         (SPUFS_MAGIC): Define.
9828         (spu_enumerate_spu_ids): New function.
9829         (linux_qxfer_spu): New function.
9830         (linux_target_ops): Install linux_qxfer_spu.
9831
9832 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
9833
9834         * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9835         and powerpc-cell64l.o to srv_regobj.  Add rs6000/powerpc-cell32l.xml
9836         and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9837         * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9838         (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9839         (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9840         * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9841         (init_registers_powerpc_cell32l): Add prototype.
9842         (init_registers_powerpc_cell64l): Likewise.
9843         (ppc_arch_setup): Detect Cell/B.E. architecture.
9844
9845 2009-07-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9846
9847         * Makefile.in (datarootdir): New variable.
9848
9849 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
9850
9851         * linux-low.c (linux_write_memory): Update debugging output.
9852         * Makefile.in (clean): Add new descriptions.
9853         (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9854         (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9855         * configure.srv: Add new files for arm*-*-linux*.
9856         * linux-arm-low.c: Add new declarations.
9857         (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9858         (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9859         (HWCAP_VFPv3D16): New.
9860         (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9861         instead of __IWMMXT__.
9862         (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9863         (arm_arch_setup): New.
9864         (target_regsets): Remove #ifdef.  Add VFP regset.
9865         (the_low_target): Use arm_arch_setup.
9866
9867 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
9868
9869         * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9870         the main thread again.
9871
9872 2009-07-06  Aleksandar Ristovski  <aristovski@qnx.com>
9873
9874         Adding Neutrino gdbserver.
9875         * configure: Regenerated.
9876         * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9877         * configure.srv (i[34567]86-*-nto*): New target.
9878         * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9879         * remote-utils.c [__QNX__]: Include sys/iomgr.h
9880         (nto_comctrl) [__QNX__]: New function.
9881         (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9882
9883 2009-07-05  Danny Backx  <dannybackx@users.sourceforge.net>
9884
9885         * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9886         srv_tgtobj.
9887
9888 2009-07-04  Danny Backx  <dannybackx@users.sourceforge.net>
9889             Pedro Alves  <pedro@codesourcery.com>
9890
9891         * win32-i386-low.c (i386_get_thread_context): Handle systems that
9892         don't support CONTEXT_EXTENDED_REGISTERS.
9893         (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9894         (the_low_target): Install them.
9895         * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9896         failing with ERROR_PIPE_NOT_CONNECTED.
9897
9898 2009-06-30  Doug Evans  <dje@google.com>
9899             Pierre Muller  <muller@ics.u-strasbg.fr>
9900
9901         Add h/w watchpoint support to x86-linux, win32-i386.
9902         * Makefile.in (SFILES): Add i386-low.c
9903         (i386_low_h): Define.
9904         (i386-low.o): Add dependencies.
9905         (linux-x86-low.o): Add i386-low.h dependency.
9906         (win32-i386-low.o): Ditto.
9907         * i386-low.c: New file.
9908         * i386-low.h: New file.
9909         * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9910         (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9911         * linux-low.c (linux_add_process): Initialize arch_private.
9912         (linux_remove_process): Free arch_private.
9913         (add_lwp): Initialize arch_private.
9914         (delete_lwp): Free arch_private.
9915         (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9916         provided.
9917         * linux-low.h (process_info_private): New member arch_private.
9918         (lwp_info): New member arch_private.
9919         (linux_target_ops): New members new_process, new_thread,
9920         prepare_to_resume.
9921         (ptid_of): New macro.
9922         * linux-x86-low.c: Include stddef.h, i386-low.h.
9923         (arch_process_info): New struct.
9924         (arch_lwp_info): New struct.
9925         (x86_linux_dr_get, x86_linux_dr_set): New functions.
9926         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9927         (i386_dr_low_get_status): New function.
9928         (x86_insert_point, x86_remove_point): New functions.
9929         (x86_stopped_by_watchpoint): New function.
9930         (x86_stopped_data_address): New function.
9931         (x86_linux_new_process, x86_linux_new_thread): New functions.
9932         (x86_linux_prepare_to_resume): New function.
9933         (the_low_target): Add entries for insert_point, remove_point,
9934         stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9935         prepare_to_resume.
9936         * server.c (debug_hw_points): New global.
9937         (monitor_show_help): Document set debug-hw-points.
9938         (handle_query): Process "set debug-hw-points".
9939         * server.h (debug_hw_points): Declare.
9940         (paddress): Declare.
9941         * utils.c (NUMCELLS, CELLSIZE): New macros.
9942         (get_sell, xsnprintf, paddress): New functions.
9943         * win32-arm-low.c (the_low_target): Add entries for insert_point,
9944         remove_point, stopped_by_watchpoint, stopped_data_address.
9945         * win32-i386-low.c: Include i386-low.h.
9946         (debug_reg_state): Replaces dr.
9947         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9948         (i386_dr_low_get_status): New function.
9949         (i386_insert_point, i386_remove_point): New functions.
9950         (i386_stopped_by_watchpoint): New function.
9951         (i386_stopped_data_address): New function.
9952         (i386_initial_stuff): Update.
9953         (get_thread_context,set_thread_context,i386_thread_added): Update.
9954         (the_low_target): Add entries for insert_point,
9955         remove_point, stopped_by_watchpoint, stopped_data_address.
9956         * win32-low.c (win32_insert_watchpoint): New function.
9957         (win32_remove_watchpoint): New function.
9958         (win32_stopped_by_watchpoint): New function.
9959         (win32_stopped_data_address): New function.
9960         (win32_target_ops): Add entries for insert_watchpoint,
9961         remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9962         * win32-low.h (win32_target_ops): New members insert_point,
9963         remove_point, stopped_by_watchpoint, stopped_data_address.
9964
9965 2009-06-25  Pedro Alves  <pedro@codesourcery.com>
9966
9967         * server.c (process_serial_event): Re-return unsupported, not
9968         error, if the type isn't recognized.  Re-allow supporting only
9969         insert or remove packets.  Also call require_running for
9970         breakpoints.  Add missing break statement to default case.  Tidy.
9971         * target.h (struct target_ops): Rename insert_watchpoint to
9972         insert_point, and remove_watchpoint to remove_point.
9973
9974         * linux-low.h (struct linux_target_ops): Likewise.
9975         * linux-low.c (linux_insert_watchpoint): Rename to ...
9976         (linux_insert_point): ... this.  Adjust.
9977         (linux_remove_watchpoint): Rename to ...
9978         (linux_remove_point): ... this.  Adjust.
9979         (linux_target_ops): Adjust.
9980         * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9981         (cris_insert_point): ... this.
9982         (cris_remove_watchpoint): Rename to ...
9983         (cris_remove_point): ... this.
9984         (the_low_target): Adjust.
9985
9986 2009-06-24  Pierre Muller  <muller@ics.u-strasbg.fr>
9987
9988         * server.c (handle_v_kill): Pass signal_pid to
9989         kill_inferior if multi_process is zero.
9990
9991 2009-06-23  Aleksandar Ristovski  <aristovski@qnx.com>
9992
9993         * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9994         * target.h (target_ops): Comment for *_watchpoint to make it clear
9995         the functions can get types '0' and '1'.
9996
9997 2009-06-22  Aleksandar Ristovski  <aristovski@qnx.com>
9998
9999         * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
10000         * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
10001         * regcache.c (get_regcache): Likewise.
10002         * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
10003         * win32-low.c (child_fetch_inferior_registers): Remove check for
10004         regno 0.
10005
10006 2009-06-19  Aleksandar Ristovski  <aristovski@qnx.com>
10007             Pedro Alves <pedro@codesourcery.com>
10008
10009         * target.h (struct target_ops) <supports_multi_process>: New
10010         callback.
10011         (target_supports_multi_process): New.
10012         * server.c (handle_query): Even if GDB reports support, only
10013         enable multi-process if the target also supports it.  Report
10014         multi-process support only if the target backend supports it.
10015         * linux-low.c (linux_supports_multi_process): New function.
10016         (linux_target_ops): Install it as target_supports_multi_process
10017         callback.
10018
10019 2009-05-24  Doug Evans  <dje@google.com>
10020
10021         Global renaming of find_thread_pid to find_thread_ptid.
10022         * server.h (find_thread_ptid): Renamed from find_thread_pid.
10023         * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
10024         All callers updated.
10025
10026         * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
10027         to resume the newly created thread, don't call ptrace (PTRACE_CONT)
10028         directly.
10029
10030         * linux-low.c (get_stop_pc): Print pc if debug_threads.
10031         (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
10032         (linux_resume_one_lwp): Ditto.
10033
10034 2009-05-23  Doug Evans  <dje@google.com>
10035
10036         * linux-low.c (linux_resume_one_lwp): Change type of first arg
10037         from struct inferior_list_entry * to struct lwp_info *.
10038         All callers updated.
10039
10040 2009-05-13  Doug Evans  <dje@google.com>
10041
10042         * linux-x86-low.c: Don't include assert.h.
10043         (x86_siginfo_fixup): Use fatal, not assert.
10044         (x86_arch_setup): Fix comment.
10045
10046 2009-05-12  Doug Evans  <dje@google.com>
10047
10048         Biarch support for i386/amd64 gdbserver.
10049         * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
10050         Add linux-x86-low.c.
10051         (linux-i386-low.o, linux-x86-64-low.o): Delete.
10052         (linux-x86-low.o): Add.
10053         * linux-x86-64-low.c: Delete.
10054         * linux-i386-low.c: Delete.
10055         * linux-x86-low.c: New file.
10056         * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
10057         linux-x86-low.o.
10058         (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
10059         linux-x86-low.o.
10060         (x86_64-linux srv_regobj): Add reg-i386-linux.o.
10061         * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
10062         (linux_child_pid_to_exec_file): New function.
10063         (elf_64_header_p, elf_64_file_p): New functions.
10064         (siginfo_fixup): New function.
10065         (linux_xfer_siginfo): New local inf_siginfo.  Call siginfo_fixup to
10066         give target a chance to convert layout.
10067         * linux-low.h (linux_target_ops): New member siginfo_fixup.
10068         (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
10069
10070 2009-05-07  Doug Evans  <dje@google.com>
10071
10072         * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
10073         (regsets_store_inferior_registers): Ditto.
10074
10075 2009-05-06  Pedro Alves  <pedro@codesourcery.com>
10076
10077         PR server/10048
10078
10079         * linux-low.c (must_set_ptrace_flags): Delete.
10080         (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
10081         of the global.
10082         (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here.  Set
10083         `lwp->must_set_ptrace_flags' instead.
10084         (linux_wait_for_event_1): Set ptrace options here.
10085         (linux_wait_1): ... not here.
10086
10087 2009-04-30  Doug Evans  <dje@google.com>
10088
10089         * inferiors.c (started_inferior_callback): New function.
10090         (attached_inferior_callback): New function.
10091         (have_started_inferiors_p, have_attached_inferiors_p): New functions.
10092         * server.c (print_started_pid, print_attached_pid): New functions.
10093         (detach_or_kill_for_exit): New function.
10094         (main): Call it instead of for_each_inferior (kill_inferior_callback).
10095         * server.h (have_started_inferiors_p): Declare.
10096         (have_attached_inferiors_p): Declare.
10097
10098         * inferiors.c (remove_process): Fix memory leak, free process.
10099         * linux-low.c (linux_remove_process): New function.
10100         (linux_kill): Call it instead of remove_process.
10101         (linux_detach, linux_wait_1): Ditto.
10102
10103 2009-04-19  Danny Backx  <dannybackx@users.sourceforge.net>
10104
10105         * configure.srv: Add x86 Windows CE target.
10106
10107 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
10108
10109         * inferiors.c (get_thread_process): Make global.
10110         * server.h (get_thread_process): Add prototype.
10111         * thread-db.c (find_one_thread): Use get_thread_process
10112         instead of current_process.
10113         (thread_db_get_tls_address): Do not crash if called when
10114         thread layer is not yet initialized.
10115
10116 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
10117
10118         * remote-utils.c (prepare_resume_reply): Null-terminate packet.
10119         * spu-low.c (current_tid): Rename to ...
10120         (current_ptid): ... this.
10121         (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
10122         spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
10123         ptid_get_lwp (current_ptid) instead of current_tid.
10124         (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
10125         instead of current_tid.  Use find_process_pid to verify pid
10126         argument is valid.  Pass proper argument to remove_process.
10127         (spu_thread_alive): Compare current_ptid instead of current_tid.
10128         (spu_resume): Likewise.
10129
10130 2009-04-02  Pedro Alves  <pedro@codesourcery.com>
10131
10132         * linux-low.c (usr_store_inferior_registers): Declare local `pid'
10133         variable.
10134
10135 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
10136
10137         Implement the multiprocess extensions, and add linux multiprocess
10138         support.
10139
10140         * server.h (ULONGEST): Declare.
10141         (struct ptid, ptid_t): New.
10142         (minus_one_ptid, null_ptid): Declare.
10143         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10144         (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
10145         (struct inferior_list_entry): Change `id' type from unsigned from
10146         to ptid_t.
10147         (struct sym_cache, struct breakpoint, struct
10148         process_info_private): Forward declare.
10149         (struct process_info): Declare.
10150         (current_process): Declare.
10151         (all_processes): Declare.
10152         (initialize_inferiors): Declare.
10153         (add_thread): Adjust to use ptid_t.
10154         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
10155         (add_process, remove_process, find_thread_pid): Declare.
10156         (find_inferior_id): Adjust to use ptid_t.
10157         (cont_thread, general_thread, step_thread): Change type to ptid_t.
10158         (multi_process): Declare.
10159         (push_event): Adjust to use ptid_t.
10160         (read_ptid, write_ptid): Declare.
10161         (prepare_resume_reply): Adjust to use ptid_t.
10162         (clear_symbol_cache): Declare.
10163         * inferiors.c (all_processes): New.
10164         (null_ptid, minus_one_ptid): New.
10165         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10166         (ptid_get_tid, ptid_equal, ptid_is_pid): New.
10167         (add_thread): Change unsigned long to ptid.  Remove gdb_id
10168         parameter.  Adjust.
10169         (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
10170         (gdb_id_to_thread): Rename to ...
10171         (find_thread_pid): ... this.  Change unsigned long to ptid.
10172         (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
10173         (loaded_dll, pull_pid_from_list): Adjust.
10174         (add_process, remove_process, find_process_pid)
10175         (get_thread_process, current_process, initialize_inferiors): New.
10176         * target.h (struct thread_resume) <thread>: Change type to ptid_t.
10177         (struct target_waitstatus) <related_pid>: Ditto.
10178         (struct target_ops) <kill, detach>: Add `pid' argument.  Change
10179         return type to int.
10180         (struct target_ops) <join>: Add `pid' argument.
10181         (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
10182         (struct target_ops) <wait>: Add `ptid' field.  Change return type
10183         to ptid.
10184         (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
10185         (mywait): Add `ptid' argument.  Change return type to ptid_t.
10186         (target_pid_to_str): Declare.
10187         * target.c (set_desired_inferior): Adjust to use ptids.
10188         (mywait): Add new `ptid' argument.  Adjust.
10189         (target_pid_to_str): New.
10190         * mem-break.h (free_all_breakpoints): Declare.
10191         * mem-break.c (breakpoints): Delelete.
10192         (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
10193         (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
10194         to use per-process breakpoint list.
10195         (free_all_breakpoints): New.
10196         * remote-utils.c (struct sym_cache) <name>: Drop `const'.
10197         (symbol_cache, all_symbols_looked_up): Delete.
10198         (hexchars): New.
10199         (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
10200         read_ptid): New.
10201         (prepare_resume_reply): Change ptid argument's type from unsigned
10202         long to ptid_t.  Adjust.  Implement W;process and X;process.
10203         (free_sym_cache, clear_symbol_cache): New.
10204         (look_up_one_symbol): Adjust to per-process symbol cache.  *
10205         * server.c (cont_thread, general_thread, step_thread): Change type
10206         to ptid_t.
10207         (attached): Delete.
10208         (multi_process): New.
10209         (last_ptid): Change type to ptid_t.
10210         (struct vstop_notif) <ptid>: Change type to ptid_t.
10211         (queue_stop_reply, push_event): Change `ptid' argument's type to
10212         ptid_t.
10213         (discard_queued_stop_replies): Add `pid' argument.
10214         (start_inferior): Adjust to use ptids.  Adjust to mywait interface
10215         changes.  Don't reference the `attached' global.
10216         (attach_inferior): Adjust to mywait interface changes.
10217         (handle_query): Adjust to use ptids.  Parse GDB's qSupported
10218         features.  Handle and report "multiprocess+".  Handle
10219         "qAttached:PID".
10220         (handle_v_cont): Adjust to use ptids.  Adjust to mywait interface
10221         changes.
10222         (handle_v_kill): New.
10223         (handle_v_stopped): Adjust to use target_pid_to_str.
10224         (handle_v_requests): Allow multiple attaches and runs when
10225         multiprocess extensions are in effect.  Handle "vKill".
10226         (myresume): Adjust to use ptids.
10227         (queue_stop_reply_callback): Add `arg' parameter.  Handle it.
10228         (handle_status): Adjust to discard_queued_stop_replies interface
10229         change.
10230         (first_thread_of, kill_inferior_callback)
10231         (detach_or_kill_inferior_callback, join_inferiors_callback): New.
10232         (main): Call initialize_inferiors.  Adjust to use ptids, killing
10233         and detaching from all inferiors.  Handle multiprocess packet
10234         variants.
10235         * linux-low.h: Include gdb_proc_service.h.
10236         (struct process_info_private): New.
10237         (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
10238         <lwpid_of>: Use ptid_get_lwp.
10239         (get_lwp_thread): Adjust.
10240         (struct lwp_info): Add `dead' member.
10241         (find_lwp_pid): Declare.
10242         * linux-low.c (thread_db_active): Delete.
10243         (new_inferior): Adjust comment.
10244         (inferior_pid): Delete.
10245         (linux_add_process): New.
10246         (handle_extended_wait): Adjust.
10247         (add_lwp): Change unsigned long to ptid.
10248         (linux_create_inferior): Add process to processes table.  Adjust
10249         to use ptids.  Don't set new_inferior here.
10250         (linux_attach_lwp): Rename to ...
10251         (linux_attach_lwp_1): ... this.  Add `initial' argument.  Handle
10252         it.  Adjust to use ptids.
10253         (linux_attach_lwp): New.
10254         (linux_attach): Add process to processes table.  Don't set
10255         new_inferior here.
10256         (struct counter): New.
10257         (second_thread_of_pid_p, last_thread_of_process_p): New.
10258         (linux_kill_one_lwp): Add `args' parameter.  Handle it.  Adjust to
10259         multiple processes.
10260         (linux_kill): Add `pid' argument.  Handle it.  Adjust to multiple
10261         processes.  Remove process from process table.
10262         (linux_detach_one_lwp): Add `args' parameter.  Handle it.  Adjust
10263         to multiple processes.
10264         (any_thread_of): New.
10265         (linux_detach): Add `pid' argument, and handle it.  Remove process
10266         from processes table.
10267         (linux_join): Add `pid' argument.  Handle it.
10268         (linux_thread_alive): Change unsighed long argument to ptid_t.
10269         Consider dead lwps as not being alive.
10270         (status_pending_p): Rename `dummy' argument to `arg'.  Filter out
10271         threads we're not interested in.
10272         (same_lwp, find_lwp_pid): New.
10273         (linux_wait_for_lwp): Change `pid' argument's type from int to
10274         ptid_t.  Adjust.
10275         (linux_wait_for_event): Rename to ...
10276         (linux_wait_for_event_1): ... this.  Change `pid' argument's type
10277         from int to ptid_t.  Adjust.
10278         (linux_wait_for_event): New.
10279         (linux_wait_1): Add `ptid' argument.  Change return type to
10280         ptid_t.  Adjust.  Use last_thread_of_process_p.  Remove processes
10281         that exit from the process table.
10282         (linux_wait): Add `ptid' argument.  Change return type to ptid_t.
10283         Adjust.
10284         (mark_lwp_dead): New.
10285         (wait_for_sigstop): Adjust to use ptids.  If a process exits while
10286         stopping all threads, mark its main lwp as dead.
10287         (linux_set_resume_request, linux_resume_one_thread): Adjust to use
10288         ptids.
10289         (fetch_register, usr_store_inferior_registers)
10290         (regsets_fetch_inferior_registers)
10291         (regsets_store_inferior_registers, linux_read_memory)
10292         (linux_write_memory): Inline `inferior_pid'.
10293         (linux_look_up_symbols): Adjust to use per-process
10294         `thread_db_active'.
10295         (linux_request_interrupt): Adjust to use ptids.
10296         (linux_read_auxv): Inline `inferior_pid'.
10297         (initialize_low): Don't reference thread_db_active.
10298         * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
10299         * proc-service.c (ps_lgetregs): Use find_lwp_pid.
10300         (ps_getpid): Return the pid of the current inferior.
10301         * thread-db.c (proc_handle, thread_agent): Delete.
10302         (thread_db_create_event, thread_db_enable_reporting): Adjust to
10303         per-process data.
10304         (find_one_thread): Change argument type to ptid_t.  Adjust to
10305         per-process data.
10306         (maybe_attach_thread): Adjust to per-process data and ptids.
10307         (thread_db_find_new_threads): Ditto.
10308         (thread_db_init): Ditto.
10309         * spu-low.c (spu_create_inferior, spu_attach): Add process to
10310         processes table.  Adjust to use ptids.
10311         (spu_kill, spu_detach): Adjust interface.  Remove process from
10312         processes table.
10313         (spu_join, spu_thread_alive): Adjust interface.
10314         (spu_wait): Adjust interface.  Remove process from processes
10315         table.  Adjust to use ptids.
10316         * win32-low.c (current_inferior_tid): Delete.
10317         (current_inferior_ptid): New.
10318         (debug_event_ptid): New.
10319         (thread_rec): Take a ptid.  Adjust.
10320         (child_add_thread): Add `pid' argument.  Adjust to use ptids.
10321         (child_delete_thread): Ditto.
10322         (do_initial_child_stuff): Add `attached' argument.  Add process to
10323         processes table.
10324         (child_fetch_inferior_registers, child_store_inferior_registers):
10325         Adjust.
10326         (win32_create_inferior): Pass 0 to do_initial_child_stuff.
10327         (win32_attach): Pass 1 to do_initial_child_stuff.
10328         (win32_kill): Adjust interface.  Remove process from processes
10329         table.
10330         (win32_detach): Ditto.
10331         (win32_join): Adjust interface.
10332         (win32_thread_alive): Take a ptid.
10333         (win32_resume): Adjust to use ptids.
10334         (get_child_debug_event): Ditto.
10335         (win32_wait): Adjust interface.  Remove exiting process from
10336         processes table.
10337
10338 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
10339
10340         Non-stop mode support.
10341
10342         * server.h (non_stop): Declare.
10343         (gdb_client_data, handler_func): Declare.
10344         (delete_file_handler, add_file_handler, start_event_loop):
10345         Declare.
10346         (handle_serial_event, handle_target_event, push_event)
10347         (putpkt_notif): Declare.
10348         * target.h (enum resume_kind): New.
10349         (struct thread_resume): Replace `step' field by `kind' field.
10350         (TARGET_WNOHANG): Define.
10351         (struct target_ops) <wait>: Add `options' argument.
10352         <supports_non_stop, async, start_non_stop>: New fields.
10353         (target_supports_non_stop, target_async): New.
10354         (start_non_stop): Declare.
10355         (mywait): Add `options' argument.
10356         * target.c (mywait): Add `options' argument.  Print child exit
10357         notifications here.
10358         (start_non_stop): New.
10359         * server.c (non_stop, own_buf, mem_buf): New globals.
10360         (struct vstop_notif): New.
10361         (notif_queue): New global.
10362         (queue_stop_reply, push_event, discard_queued_stop_replies)
10363         (send_next_stop_reply): New.
10364         (start_inferior): Adjust to use resume_kind.  Adjust to mywait
10365         interface changes.
10366         (attach_inferior): In non-stop mode, don't wait for the target
10367         here.
10368         (handle_general_set): Handle QNonStop.
10369         (handle_query): When handling qC, return the current general
10370         thread, instead of the first thread of the list.
10371         (handle_query): If the backend supports non-stop mode, include
10372         QNonStop+ in the qSupported query response.
10373         (handle_v_cont): Adjust to use resume_kind.  Handle resume_stop
10374         and non-stop mode.
10375         (handle_v_attach, handle_v_run): Handle non-stop mode.
10376         (handle_v_stopped): New.
10377         (handle_v_requests): Report support for vCont;t.  Handle vStopped.
10378         (myresume): Adjust to use resume_kind.  Handle non-stop.
10379         (queue_stop_reply_callback): New.
10380         (handle_status): Handle non-stop mode.
10381         (main): Clear non_stop flag on reconnection.  Use the event-loop.
10382         Refactor serial protocol handling from here ...
10383         (process_serial_event): ... to this new function.  When GDB
10384         selects any thread, select one here.  In non-stop mode, wait until
10385         GDB acks all pending events before exiting.
10386         (handle_serial_event, handle_target_event): New.
10387         * remote-utils.c (remote_open): Install remote_desc in the event
10388         loop.
10389         (remote_close): Remove remote_desc from the event loop.
10390         (putpkt_binary): Rename to...
10391         (putpkt_binary_1): ... this.  Add `is_notic' argument.  Handle it.
10392         (putpkt_binary): New as wrapper around putpkt_binary_1.
10393         (putpkt_notif): New.
10394         (prepare_resume_reply): In non-stop mode, don't change the
10395         general_thread.
10396         * event-loop.c: New.
10397         * Makefile.in (OBJ): Add event-loop.o.
10398         (event-loop.o): New rule.
10399
10400         * linux-low.h (pid_of): Moved here.
10401         (lwpid_of): New.
10402         (get_lwp_thread): Use lwpid_of.
10403         (struct lwp_info): Delete `lwpid' field.  Add `suspended' field.
10404         * linux-low.c (pid_of): Delete.
10405         (inferior_pid): Use lwpid_of.
10406         (linux_event_pipe): New.
10407         (target_is_async_p): New.
10408         (delete_lwp): New.
10409         (handle_extended_wait): Use lwpid_of.
10410         (add_lwp): Don't set lwpid field.
10411         (linux_attach_lwp): Adjust debug output.  Use lwpid_of.
10412         (linux_kill_one_lwp): If killing a running lwp, stop it first.
10413         Use lwpid_of.  Adjust to linux_wait_for_event interface changes.
10414         (linux_detach_one_lwp): If detaching from a running lwp, stop it
10415         first.  Adjust to linux_wait_for_event interface changes.  Use
10416         lwpid_of.
10417         (linux_detach): Don't delete the main lwp here.
10418         (linux_join): Use my_waitpid.  Avoid signal_pid.  Use lwpid_of.
10419         (status_pending_p): Don't consider explicitly suspended lwps.
10420         (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
10421         pointer.  Add OPTIONS argument.  Change return type to int.  Use
10422         my_waitpid instead of sleeping.  Handle WNOHANG.  Use lwpid_of.
10423         (linux_wait_for_event): Take an integer pid instead of a lwp_info
10424         pointer.  Add status pointer argument.  Return a pid instead of a
10425         status.  Use lwpid_of.  Adjust to linux_wait_for_lwp interface
10426         changes.  In non-stop mode, don't switch to a random thread.
10427         (linux_wait): Rename to...
10428         (linux_wait_1): ... this.  Add target_options argument, and handle
10429         it.  Adjust to use resume_kind.  Use lwpid_of.  In non-stop mode,
10430         don't handle the continue thread.  Handle TARGET_WNOHANG.  Merge
10431         clean exit and signal exit code.  Don't stop all threads in
10432         non-stop mode.  In all-stop mode, only stop all threads when
10433         reporting a stop to GDB.  Handle explicit thread stop requests.
10434         (async_file_flush, async_file_mark): New.
10435         (linux_wait): New.
10436         (send_sigstop): Use lwpid_of.
10437         (wait_for_sigstop): Use lwpid_of.  Adjust to linux_wait_for_event
10438         interface changes.  In non-stop mode, don't switch to a random
10439         thread.
10440         (linux_resume_one_lwp): Use lwpid_of.
10441         (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
10442         (linux_resume_one_thread): ... this.  Handle resume_stop.  In
10443         non-stop mode, don't look for pending flag in all threads.
10444         (resume_status_pending_p): Don't consider explicitly suspended
10445         threads.
10446         (my_waitpid): Reimplement.  Emulate __WALL.
10447         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10448         Use lwpid_of.
10449         (sigchld_handler, linux_supports_non_stop, linux_async)
10450         (linux_start_non_stop): New.
10451         (linux_target_ops): Register linux_supports_non_stop, linux_async
10452         and linux_start_non_stop.
10453         (initialize_low): Install SIGCHLD handler.
10454         * thread-db.c (thread_db_create_event, find_one_thread)
10455         (thread_db_get_tls_address): Use lwpid_of.
10456         * win32-low.c (win32_detach): Adjust to use resume_kind.
10457         (win32_wait): Add `options' argument.
10458         * spu-low.c (spu_resume): Adjust to use resume_kind.
10459         (spu_wait): Add `options' argument.
10460
10461 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
10462
10463         Decouple target code from remote protocol.
10464
10465         * target.h (enum target_waitkind): New.
10466         (struct target_waitstatus): New.
10467         (struct target_ops) <wait>: Return an unsigned long.  Take a
10468         target_waitstatus pointer instead of a char pointer.
10469         (mywait): Likewise.
10470         * target.c (mywait): Change prototype to return an unsigned long.
10471         Take a target_waitstatus pointer instead of a char pointer.  Adjust.
10472         * server.h (thread_from_wait, old_thread_from_wait): Delete
10473         declarations.
10474         (prepare_resume_reply): Change prototype to take a
10475         target_waitstatus.
10476         * server.c (thread_from_wait, old_thread_from_wait): Delete.
10477         (last_status, last_ptid): New.
10478         (start_inferior): Remove "statusptr" argument.  Adjust.  Return a
10479         pid instead of a signal.
10480         (attach_inferior): Remove "status" and "signal" parameters.
10481         Adjust.
10482         (handle_query): For qGetTLSAddr, parse the thread id with strtol,
10483         not as an address.
10484         (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
10485         (handle_v_requests, myresume): Remove "status" and "signal"
10486         parameters.  Adjust.
10487         (handle_status): New.
10488         (main): Delete local `status'.  Adjust.
10489         * remote-utils.c: Include target.h.
10490         (prepare_resume_reply): Change prototype to take a
10491         target_waitstatus.  Adjust.
10492
10493         * linux-low.c (linux_wait): Adjust to new target_ops->wait
10494         interface.
10495         * spu-low.c (spu_wait): Adjust.
10496         * win32-low.c (enum target_waitkind, struct target_waitstatus):
10497         Delete.
10498         (win32_wait): Adjust.
10499
10500 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
10501
10502         * target.h (struct thread_resume): Delete leave_stopped member.
10503         (struct target_ops): Add a `n' argument to the `resume' callback.
10504         * server.c (start_inferior): Adjust.
10505         (handle_v_cont, myresume): Adjust.
10506         * linux-low.c (check_removed_breakpoint): Adjust to resume
10507         interface change, and to removed leave_stopped field.
10508         (resume_ptr): Delete.
10509         (struct thread_resume_array): New.
10510         (linux_set_resume_request): Add new `arg' parameter.  Adjust to
10511         resume interface change.
10512         (linux_continue_one_thread, linux_queue_one_thread)
10513         (resume_status_pending_p): Check if the resume field is NULL
10514         instead of checking the leave_stopped member.
10515         (linux_resume): Adjust to the target resume interface change.
10516         * spu-low.c (spu_resume): Adjust to the target resume interface
10517         change.
10518         * win32-low.c (win32_detach, win32_resume): Ditto.
10519
10520 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
10521
10522         * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
10523         flag.
10524         (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
10525         pending.
10526         (linux_continue_one_thread): Only preserve the stepping flag if
10527         there's a pending breakpoint.
10528
10529 2009-03-31  Pedro Alves  <pedro@codesourcery.com>
10530
10531         * server.c (main): After the inferior having exited, call
10532         remote_close before exiting gdbserver.
10533
10534 2009-03-25  Thiago Jung Bauermann  <bauerman@br.ibm.com>
10535
10536         Fix size of FPSCR in Power 7 processors.
10537         * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
10538         (PPC_FEATURE_HAS_DFP): New #define.
10539         (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
10540         size of the FPSCR.
10541
10542 2009-03-23  Pedro Alves  <pedro@codesourcery.com>
10543
10544         * server.c (handle_query) Whitespace and formatting.
10545
10546 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
10547
10548         * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10549         linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10550         linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10551         linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10552         regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10553         thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10554         Makefile.in, configure.ac: Fix whitespace throughout.
10555         * configure: Regenerate.
10556
10557 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
10558
10559         * inferiors.c (find_inferior): Make it safe for the callback
10560         function to delete the currently iterated inferior.
10561
10562 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
10563
10564         * Makefile.in (linuw_low_h): Move higher.
10565         (thread-db.o): Depend on $(linux_low_h).
10566
10567 2009-03-17  Pedro Alves  <pedro@codesourcery.com>
10568
10569         Rename "process" to "lwp" throughout.
10570
10571         * linux-low.c (all_processes): Rename to...
10572         (all_lwps): ... this.
10573         (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10574         (add_process): Rename to ...
10575         (add_lwp): ... this.  Adjust.
10576         (linux_create_inferior): Adjust.
10577         (linux_attach_lwp): Adjust.
10578         (linux_attach): Adjust.
10579         (linux_kill_one_process): Rename to ...
10580         (linux_kill_one_lwp): ... this.  Adjust.
10581         (linux_kill): Adjust.
10582         (linux_detach_one_process): Rename to ...
10583         (linux_detach_one_lwp): ... this.  Adjust.
10584         (linux_detach): Adjust.
10585         (check_removed_breakpoint): Adjust.
10586         (status_pending_p): Adjust.
10587         (linux_wait_for_process): Rename to ...
10588         (linux_wait_for_lwp): ... this.  Adjust.
10589         (linux_wait_for_event): Adjust.
10590         (send_sigstop): Adjust.
10591         (wait_for_sigstop): Adjust.
10592         (stop_all_processes): Rename to ...
10593         (stop_all_lwps): ... this.
10594         (linux_resume_one_process): Rename to ...
10595         (linux_resume_one_lwp): ... this.  Adjust.
10596         (linux_set_resume_request, linux_continue_one_thread)
10597         (linux_queue_one_thread, resume_status_pending_p)
10598         (usr_store_inferior_registers, regsets_store_inferior_registers)
10599         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10600         Adjust.
10601         * linux-low.h (get_process): Rename to ...
10602         (get_lwp): ... this.  Adjust.
10603         (get_thread_process): Rename to ...
10604         (get_thread_lwp): ... this.  Adjust.
10605         (get_process_thread): Rename to ...
10606         (get_lwp_thread): ... this.  Adjust.
10607         (struct process_info): Rename to ...
10608         (struct lwp_info): ... this.
10609         (all_processes): Rename to ...
10610         (all_lwps): ... this.
10611         * proc-service.c (ps_lgetregs): Adjust.
10612         * thread-db.c (thread_db_create_event, find_one_thread)
10613         (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10614
10615 2009-03-14  Pedro Alves  <pedro@codesourcery.com>
10616
10617         * server.c (handle_query): Handle "qAttached".
10618
10619 2009-03-13  Nathan Sidwell  <nathan@codesourcery.com>
10620
10621         * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10622         GPLv3, update license URL.
10623
10624 2009-03-01  Doug Evans  <dje@google.com>
10625
10626         * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
10627         (server_h): Add gdb_signals.h.
10628         (signals.o): Update.
10629         * server.h (target_signal_from_host,target_signal_to_host_p)
10630         (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10631
10632 2009-02-14  Pierre Muller  <muller@ics.u-strasbg.fr>
10633
10634         * remote-utils.c (getpkt): Also generate remote-debug
10635         information if noack_mode is set.
10636
10637 2009-02-06  Pedro Alves  <pedro@codesourcery.com>
10638
10639         * server.c (handle_query): Report qXfer:siginfo:read and
10640         qXfer:siginfo:write as supported and handle them.
10641         * target.h (struct target_ops) <qxfer_siginfo>: New field.
10642         * linux-low.c (linux_xfer_siginfo): New.
10643         (linux_target_ops): Set it.
10644
10645 2009-01-26  Pedro Alves  <pedro@codesourcery.com>
10646
10647         * server.c (gdbserver_usage): Mention --remote-debug.
10648         (main): Accept '--remote-debug' switch.
10649
10650 2009-01-18  Doug Evans  <dje@google.com>
10651
10652         * regcache.c (new_register_cache): No need to check result of xcalloc.
10653         * server.c (handle_search_memory): Back out calls to xmalloc,
10654         result is checked and error is returned to user upon failure.
10655         (handle_query): Ditto.  Add more checks for result of malloc.
10656         (handle_v_cont): Check result of malloc, report error back to
10657         user upon failure.
10658         (handle_v_run): Ditto.  Call freeargv.
10659         * server.h (freeargv): Declare.
10660         * utils.c (freeargv): New fn.
10661
10662 2009-01-15  Doug Evans  <dje@google.com>
10663
10664         * gdbreplay.c (perror_with_name): Make arg const char *.
10665         * server.h (target_signal_to_name): Make return type const char *.
10666         * thread-db.c (thread_db_err_str): Make return type const char *.
10667         * utils.c (perror_with_name): Make arg const char *.
10668
10669 2009-01-14  Pedro Alves  <pedro@codesourcery.com>
10670
10671         * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10672         when handling a EXIT_PROCESS_DEBUG_EVENT.
10673
10674 2009-01-06  Joel Brobecker  <brobecker@adacore.com>
10675
10676         * gdbreplay.c (gdbreplay_version): Update copyright year.
10677         * server.c (gdbserver_version): Likewise.
10678
10679 2009-01-05  Doug Evans  <dje@google.com>
10680
10681         * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
10682         (handle_extended_wait): Improve comment.
10683
10684 2008-12-13  Doug Evans  <dje@google.com>
10685
10686         * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10687         * server.h (ATTR_MALLOC): New macro.
10688         (xmalloc,xcalloc,xstrdup): Declare.
10689         * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10690         * inferiors.c: Ditto.
10691         * linux-low.c: Ditto.
10692         * mem-break.c: Ditto.
10693         * regcache.c: Ditto.
10694         * remote-utils.c: Ditto.
10695         * server.c: Ditto.
10696         * target.c: Ditto.
10697         * win32-low.c: Ditto.
10698
10699 2008-12-12  Doug Evans  <dje@google.com>
10700
10701         * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10702         in debugging printf.
10703
10704         * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10705
10706 2008-12-09  Doug Evans  <dje@google.com>
10707
10708         * linux-low.h (struct process_info): Delete member tid, unused.
10709         * thread-db.c (find_one_thread): Update.
10710         (maybe_attach_thread): Update.
10711
10712 2008-12-02  Pedro Alves  <pedro@codesourcery.com>
10713
10714         * target.h (struct target_ops): Add qxfer_osdata member.
10715         * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10716         and dirent.h.
10717         (linux_qxfer_osdata): New functions.
10718         (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10719         callback.
10720         * server.c (handle_query): Handle "qXfer:osdata:read:".
10721         * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10722         (buffer_xml_printf): New functions.
10723         * server.h (struct buffer): New.
10724         (buffer_grow_str, buffer_grow_str0): New macros.
10725         (buffer_grow, buffer_free, buffer_init, buffer_finish)
10726         (buffer_xml_printf): Declare.
10727
10728 2008-11-24  Doug Evans  <dje@google.com>
10729
10730         * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10731
10732 2008-11-24  Daniel Jacobowitz  <dan@codesourcery.com>
10733
10734         * server.c (handle_v_run): Always use the supplied argument list.
10735
10736 2008-11-19  Bob Wilson  <bob.wilson@acm.org>
10737
10738         * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10739         (xtensa_regmap_table): Add entry for scompare1.
10740
10741 2008-11-18  Thiago Jung Bauermann  <bauerman@br.ibm.com>
10742
10743         * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10744         powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10745         powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10746         powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10747         powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10748         powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10749         * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10750         XML target descriptions.
10751         * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10752         when inferior is running on an ISA 2.05 or later processor.  Add
10753         special case to return offset for full 64-bit slot of FPSCR when
10754         in 32-bits.
10755
10756 2008-11-14  Daniel Gutson  <dgutson@codesourcery.com>
10757
10758         * Makefile.in (SFILES, clean): Added sparc64 files.
10759         (reg-sparc64.o, reg-sparc64.c): New.
10760         * configure.srv (sparc*-*-linux*): New configuration.
10761         * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10762         syscall arguments for SPARC.
10763         (regsets_store_inferior_registers): Likewise.
10764         * linux-sparc-low.c: New file.
10765
10766 2008-10-21  Doug Evans  <dje@google.com>
10767
10768         * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10769         (READLINE_DIR,READLINE_DEP): Delete.
10770         (INTERNAL_CFLAGS): Update.
10771         (LINTFLAGS): Update.
10772
10773 2008-10-10  Pedro Alves  <pedro@codesourcery.com>
10774
10775         * server.c (handle_v_run): If GDB didn't specify an argv, use the
10776         whole argv from the last run, not just argv[0].
10777
10778 2008-09-08  Pedro Alves  <pedro@codesourcery.com>
10779
10780         * regcache.c (new_register_cache): Return NULL if the register
10781         cache size isn't known yet.
10782         (free_register_cache): Avoid dereferencing a NULL regcache.
10783
10784 2008-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
10785
10786         * configure.srv: Merge MIPS and MIPS64.
10787
10788 2008-08-24  Maciej W. Rozycki  <macro@linux-mips.org>
10789
10790         * Makefile.in (uninstall): Apply $(EXEEXT) too.
10791
10792 2008-08-18  Luis Machado  <luisgpm@br.ibm.com>
10793
10794         * Makefile.in: Add required vsx dependencies.
10795
10796         * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10797         Declare init_registers_powerpc_vsx32l.
10798         Declare init_registers_powerpc_vsx64l.
10799         Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10800         (ppc_arch_setup): Check for VSX in hwcap.
10801         (ppc_fill_vsxregset): New function.
10802         (ppc_store_vsxregset): New function.
10803         Add new VSX entry in regset_info target_regsets.
10804
10805         * configure.srv: Add new VSX dependencies.
10806
10807 2008-08-12  Pedro Alves  <pedro@codesourcery.com>
10808
10809         * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10810         (remote_open): Set or clear transport_is_reliable.
10811         (putpkt_binary): Don't expect acks in noack mode.
10812         (getpkt): Don't send ack/nac in noack mode.
10813         * server.c (handle_general_set): Handle QStartNoAckMode.
10814         (handle_query): If connected by tcp pass QStartNoAckMode+ in
10815         qSupported.
10816         (main): Reset noack_mode on every connection.
10817         * server.h (noack_mode): Declare.
10818
10819 2008-08-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10820
10821         * Makefile.in (GDBREPLAY_OBS): New variable.
10822         (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10823
10824 2008-08-05  Ulrich Weigand  <uweigand@de.ibm.com>
10825             Daniel Jacobowitz  <dan@codesourcery.com>
10826
10827         * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10828         (usr_store_inferior_registers): Likewise.
10829         (regsets_store_inferior_registers): Likewise.
10830
10831 2008-07-31  Rolf Jansen  <rj@surtec.com>
10832             Pedro Alves  <pedro@codesourcery.com>
10833
10834         * configure.ac: Check for memmem declaration.
10835         * server.c [HAVE_MALLOC_H]: Include malloc.h.
10836         (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10837         (disable_packet_qfThreadInfo): Unconditionally compile.
10838         * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10839         * configure, config.in: Regenerate.
10840
10841 2008-07-28  Doug Kwan  <dougkwan@google.com>
10842
10843         * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10844         (linux_write_memory): Remove declaration of errno.
10845
10846 2008-07-12  Ulrich Weigand  <uweigand@de.ibm.com>
10847
10848         * linux-low.c (handle_extended_wait): Do not use "status"
10849         variable uninitialized.
10850
10851 2008-07-07  Pedro Alves  <pedro@codesourcery.com>
10852
10853         * server.c (handle_v_attach): Inhibit reporting dll changes.
10854
10855 2008-06-27  Pedro Alves  <pedro@codesourcery.com>
10856
10857         * remote-utils.c (prepare_resume_reply): If requested, don't
10858         output "thread:TID" in the T stop reply.
10859
10860         * server.c (disable_packet_vCont, disable_packet_Tthread)
10861         (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10862         (handle_query): If requested, disable support for qC, qfThreadInfo
10863         and qsThreadInfo.
10864         (handle_v_requests): If requested, disable support for vCont.
10865         (gdbserver_show_disableable): New.
10866         (main): Handle --disable-packet and --disable-packet=LIST.
10867
10868         * server.h (disable_packet_vCont, disable_packet_Tthread)
10869         (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10870
10871 2008-06-20  Carlos O'Donell  <carlos@codesourcery.com>
10872
10873         * server.c (gdbserver_usage): Mention --version.
10874
10875 2008-06-06  Daniel Jacobowitz  <dan@codesourcery.com>
10876
10877         * Makefile.in (gdbreplay.o): New rule.
10878
10879 2008-06-06  Joseph Myers  <joseph@codesourcery.com>
10880
10881         * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10882         message, not gdbserver.
10883
10884 2008-06-05  Vladimir Prus  <vladimir@codesourcery.com>
10885             Nathan Sidwell  <nathan@codesourcery.com>
10886             Joseph Myers  <joseph@codesourcery.com>
10887
10888         * acinclude.m4: Include ../../config/acx.m4.
10889         * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10890         * configure, config.in: Regenerate.
10891         * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10892         * server.c (gdbserver_version): Print PKGVERSION.
10893         (gdbsrever_usage): Add stream parameter.  Print REPORT_BUGS_TO.
10894         (main): Adjust gdbserver_usage calls.
10895         * gdbreplay.c (version, host_name): Add declarations.
10896         (gdbreplay_version, gdbreplay_usage): New.
10897         (main): Accept --version and --help options.
10898
10899 2008-06-04  Daniel Jacobowitz  <dan@codesourcery.com>
10900
10901         * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10902         (arm_breakpoint_at): Handle Thumb.
10903         (the_low_target): Add comment.
10904
10905 2008-05-29  Ulrich Weigand  <uweigand@de.ibm.com>
10906
10907         * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10908
10909 2008-05-09  Doug Evans  <dje@google.com>
10910
10911         * server.h (decode_search_memory_packet): Declare.
10912         * remote-utils.c (decode_search_memory_packet): New fn.
10913         * server.c (handle_search_memory_1): New fn.
10914         (handle_search_memory): New fn.
10915         (handle_query): Process qSearch:memory packets.
10916
10917 2008-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
10918
10919         * regcache.c (registers_length): Remove.
10920         (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10921         full register packet.
10922         * regcache.h (registers_length): Remove prototype.
10923         * server.h (PBUFSIZ): Define to 16384.
10924
10925 2008-05-03  Ulrich Weigand  <uweigand@de.ibm.com>
10926
10927         * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10928         powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10929         powerpc-64l.o, and powerpc-altivec64l.o.
10930         Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10931         rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10932         rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10933         rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10934         rs6000/power-linux.xml, and rs6000/power64-linux.xml
10935         to srv_xmlfiles.
10936
10937         * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10938         (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10939         (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10940         (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10941         (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10942         (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10943         (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10944         (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10945         (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10946         (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10947         (clean): Update.
10948
10949         * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10950         (init_registers_powerpc_32l): ... this new prototype.
10951         (init_registers_powerpc_32): Remove, replace by ...
10952         (init_registers_powerpc_altivec32l): ... this new prototype.
10953         (init_registers_powerpc_e500): Remove, replace by ...
10954         (init_registers_powerpc_e500l): ... this new prototype.
10955         (init_registers_ppc64): Remove, replace by ...
10956         (init_registers_powerpc_64l): ... this new prototype.
10957         (init_registers_powerpc_64): Remove, replace by ...
10958         (init_registers_powerpc_altivec64l): ... this new prototype.
10959         (ppc_num_regs): Set to 73.
10960         (PT_ORIG_R3, PT_TRAP): Define if necessary.
10961         (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10962         (ppc_cannot_store_register): Handle orig_r3 and trap.
10963         (ppc_arch_setup): Update init_registers_... calls.
10964         (ppc_fill_gregset): Handle orig_r3 and trap.
10965
10966         * inferiors.c (clear_inferiors): Reset current_inferior.
10967
10968 2008-04-23  Paolo Bonzini  <bonzini@gnu.org>
10969
10970         * acinclude.m4: Add override.m4.
10971         * configure: Regenerate.
10972
10973 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
10974
10975         * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10976         initial call to init_register_ppc64.
10977
10978 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
10979
10980         * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10981         single powerpc*-*-linux* case.
10982         (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10983
10984 2008-04-17  Ulrich Weigand  <uweigand@de.ibm.com>
10985
10986         * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
10987         srv_regobj.  Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
10988         from reg_xmlfiles.
10989         * linux-ppc-low.c: Include <elf.h>.
10990         (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10991         (ppc_hwcap): New global variable.
10992         (ppc_regmap): Remove __SPE__ #ifdef sections.
10993         (ppc_regmap_e500): New global variable.
10994         (ppc_cannot_store_register): Update __SPE__ special case.
10995         (ppc_get_hwcap): New function.
10996         (ppc_arch_setup): Use it to determine whether inferior supports
10997         AltiVec or SPE registers.  Set the_low_target.regmap if appropriate.
10998         (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10999         Do not access registers if target does not support AltiVec.
11000         (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
11001         Do not access registers if target does not support SPE.
11002         (target_regsets): Unconditionally include AltiVec and SPE regsets.
11003
11004 2008-04-17  Daniel Jacobowitz  <dan@codesourcery.com>
11005
11006         * linux-low.c (disabled_regsets, num_regsets): New.
11007         (use_regsets_p): Delete.
11008         (linux_wait_for_process): Clear disabled_regsets.
11009         (regsets_fetch_inferior_registers): Check and set it.
11010         (regsets_store_inferior_registers): Likewise.
11011         (linux_fetch_registers, linux_store_registers): Do not use
11012         use_regsets_p.
11013         (initialize_low): Allocate disabled_regsets.
11014
11015 2008-04-14  Daniel Jacobowitz  <dan@codesourcery.com>
11016
11017         * Makefile.in (LIBOBJS): New.
11018         (OBS): Use LIBOBJS.
11019         (memmem.o): New rule.
11020         * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
11021         * configure: Regenerated.
11022
11023 2008-04-04  Ulrich Weigand  <uweigand@de.ibm.com>
11024
11025         * server.c (handle_query): Never return "unsupported" for
11026         qXfer:features:read queries.
11027
11028 2008-03-27  Ulrich Weigand  <uweigand@de.ibm.com>
11029
11030         * server.c (get_features_xml): Fix inverted condition.
11031         (handle_query): Always support qXfer:feature:read.
11032
11033 2008-03-10  Daniel Jacobowitz  <dan@codesourcery.com>
11034
11035         * server.c (wrapper_argv): New.
11036         (start_inferior): Handle wrapper_argv.  If set, expect an extra
11037         trap.
11038         (gdbserver_usage): Document --wrapper.
11039         (main): Parse --wrapper.
11040
11041 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
11042
11043         * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
11044         powerpc-*-linux* to srv_regobj and reg_xmlfiles.
11045         * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
11046         (ppc_set_pc): Likewise.
11047         (ppc_arch_setup): New function.
11048         (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
11049         of collect_register.
11050         (the_low_target): Use ppc_arch_setup as arch_setup initializer.
11051
11052 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
11053
11054         * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
11055         instead of linux-ppc64-low.o.
11056         * linux-ppc64-low.c: Remove file.
11057         * Makefile.in (SFILES): Remove linux-ppc64-low.c.
11058         (linux-ppc64-low.o): Remove rule.
11059
11060         * linux-ppc-low.c (init_registers_ppc64): Add prototype.
11061         (init_registers_powerpc_64): Likewise.
11062         (ppc_regmap): Conditionally define depending on __powerpc64__.
11063         (ppc_cannot_store_register): Do not special-case "fpscr" when
11064         compiled on __powerpc64__.
11065         (ppc_collect_ptrace_register): New function.
11066         (ppc_supply_ptrace_register): New function.
11067         (ppc_breakpoint): Change type to "unsigned int".
11068         (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
11069         (the_low_target): Conditionally provide initializers for the
11070         arch_setup member depending on __powerpc64__.  Install
11071         collect_ptrace_register and supply_ptrace_register members.
11072
11073 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
11074
11075         * regcache.h (gdbserver_xmltarget): Add extern declaration.
11076         * server.c (gdbserver_xmltarget): Define.
11077         (get_features_xml): Use it to replace "target.xml" and arch_string.
11078
11079         * configure.srv: Remove srv_xmltarget.  Add XML files that were
11080         mentioned there to srv_xmlfiles instead.  Remove conditional tests
11081         on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
11082         srv_xmlfiles and srv_regobj to include all possible choices.
11083         * configure.ac (srv_xmltarget): Remove.
11084         (srv_xmlfiles): Do not add "target.xml".
11085         (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
11086         checks for supplementary target information.
11087         * configure: Regenerate.
11088         * Makefile.in (XML_TARGET): Remove.
11089         (target.xml): Remove rule.
11090         (clean): Do not clean up target.xml.
11091         (.PRECIOUS): Do not mention target.xml.
11092
11093         * target.h (struct target_ops): Remove arch_string member.
11094         * linux-low.c (linux_arch_string): Remove.
11095         (linux_target_ops): Remove arch_string initializer.
11096         * linux-low.h (struct linux_target_ops): Remove arch_string member.
11097         * linux-i386-low.c (the_low_target): Remove arch_string initializer.
11098         * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
11099         * spu-low.c (spu_arch_string): Remove.
11100         (spu_target_ops): Remove arch_string initializer.
11101         * win32-low.c (win32_arch_string): Remove.
11102         (win32_target_ops): Remove arch_string initializer.
11103         * win32-low.h (struct win32_target_ops): Remove arch_string member.
11104         * win32-arm-low.c (the_low_target): Remove arch_string initializer.
11105         * win32-i368-low.c (the_low_target): Remove arch_string initializer.
11106
11107 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
11108
11109         * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
11110         by collect_ptrace_register and supply_ptrace_register hooks.
11111         * linux-low.c (fetch_register): Use supply_ptrace_register callback
11112         instead of checking for the_low_target.left_pad_xfer.
11113         (usr_store_inferior_registers): Use collect_ptrace_register callback
11114         instead of checking for the_low_target.left_pad_xfer.
11115
11116         * linux-s390-low.c (s390_collect_ptrace_register): New function.
11117         (s390_supply_ptrace_register): Likewise.
11118         (s390_fill_gregset): Call s390_collect_ptrace_register.
11119         (the_low_target): Update.
11120
11121         * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
11122         (ppc_supply_ptrace_register): Likewise.
11123         (the_low_target): Update.
11124
11125         * linux-i386-low.c (the_low_target): Update.
11126         * linux-x86-64-low.c (the_low_target): Update.
11127
11128 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
11129
11130         * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
11131         reg-s390.o and reg-s390x.o.
11132
11133         * linux-low.c (new_inferior): New global variable.
11134         (linux_create_inferior, linux_attach): Set it.
11135         (linux_wait_for_process): Call the_low_target.arch_setup after the
11136         target has stopped for the first time.
11137         (initialize_low): Do not call the_low_target.arch_setup.
11138
11139         * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
11140         (s390_set_pc): Likewise.
11141         (s390_arch_setup): New function.
11142         (the_low_target): Use s390_arch_setup as arch_setup routine.
11143
11144         * regcache.c (realloc_register_cache): New function.
11145         (set_register_cache): Call it for each existing regcache.
11146
11147 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
11148
11149         * server.h (init_registers): Remove prototype.
11150
11151         * linux-low.h (struct linux_target_ops): Add arch_setup field.
11152         * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
11153         instead of init_registers ().
11154         * linux-arm-low.c (init_registers_arm): Add prototype.
11155         (init_registers_arm_with_iwmmxt): Likewise.
11156         (the_low_target): Add initializer for arch_setup field.
11157         * linux-cris-low.c (init_registers_cris): Add prototype.
11158         (the_low_target): Add initializer for arch_setup field.
11159         * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
11160         (the_low_target): Add initializer for arch_setup field.
11161         * linux-i386-low.c (init_registers_i386_linux): Add prototype.
11162         (the_low_target): Add initializer for arch_setup field.
11163         * linux-ia64-low.c (init_registers_ia64): Add prototype.
11164         (the_low_target): Add initializer for arch_setup field.
11165         * linux-m32r-low.c (init_registers_m32r): Add prototype.
11166         (the_low_target): Add initializer for arch_setup field.
11167         * linux-m68k-low.c (init_registers_m68k): Add prototype.
11168         (the_low_target): Add initializer for arch_setup field.
11169         * linux-mips-low.c (init_registers_mips_linux): Add prototype.
11170         (init_registers_mips64_linux): Likewise.
11171         (the_low_target): Add initializer for arch_setup field.
11172         * linux-ppc-low.c (init_registers_ppc): Add prototype.
11173         (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
11174         (the_low_target): Add initializer for arch_setup field.
11175         * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
11176         (init_registers_powerpc_64): Likewise.
11177         (the_low_target): Add initializer for arch_setup field.
11178         * linux-s390-low.c (init_registers_s390): Add prototype.
11179         (init_registers_s390x): Likewise.
11180         (the_low_target): Add initializer for arch_setup field.
11181         * linux-sh-low.c (init_registers_sh): Add prototype.
11182         (the_low_target): Add initializer for arch_setup field.
11183         * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
11184         (the_low_target): Add initializer for arch_setup field.
11185         * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
11186         (the_low_target): Add initializer for arch_setup field.
11187
11188         * win32-low.h (struct win32_target_ops): Add arch_setup field.
11189         * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
11190         instead of init_registers ().
11191         * win32-arm-low.c (init_registers_arm): Add prototype.
11192         (the_low_target): Add initializer for arch_setup field.
11193         * win32-i386-low.c (init_registers_i386): Add prototype.
11194         (the_low_target): Add initializer for arch_setup field.
11195
11196         * spu-low.c (init_registers_spu): Add prototype.
11197         (initialize_low): Call initialie_registers_spu () instead of
11198         initialize_registers ().
11199
11200 2008-02-19  Pedro Alves  <pedro@codesourcery.com>
11201
11202         * server.c (handle_v_requests): When handling the vRun and vAttach
11203         packets, if already debugging a process, don't kill it.  Return an
11204         error instead.
11205
11206 2008-02-17  Daniel Jacobowitz  <dan@codesourcery.com>
11207
11208         * server.c (handle_query): Correct length check.
11209
11210 2008-02-14  Pedro Alves  <pedro_alves@portugalmail.pt>
11211
11212         * win32-low.c (do_initial_child_stuff): Add process handle
11213         parameter.  Set current_process_handle and current_process_id from the
11214         parameters. Clear globals.
11215         (win32_create_inferior): Don't set current_process_handle and
11216         current_process_id here.  Instead pass them on the call to
11217         do_initial_child_stuff.
11218         (win32_attach): Likewise.
11219         (win32_clear_inferiors): New.
11220         (win32_kill): Don't close the current process handle or the
11221         current thread handle here.  Instead call win32_clear_inferiors.
11222         (win32_detach): Don't open a new handle to the process.  Call
11223         win32_clear_inferiors.
11224         (win32_join): Don't rely on current_process_handle; open a new
11225         handle using the process id.
11226         (win32_wait): Call win32_clear_inferiors when the inferior process
11227         has exited.
11228
11229 2008-02-14  Daniel Jacobowitz  <dan@codesourcery.com>
11230
11231         * server.c (monitor_show_help): Add "exit".
11232
11233 2008-02-11  Maxim Grigoriev  <maxim2405@gmail.com>
11234
11235         * Makefile.in (SFILES): Add linux-xtensa-low.c.
11236         (clean): Add reg-xtensa.c.
11237         (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
11238         * configure.srv (xtensa*-*-linux*) New target.
11239         * linux-xtensa-low.c: New.
11240         * xtensa-xtregs.c: New.
11241
11242 2008-02-01  Pedro Alves  <pedro_alves@portugalmail.pt>
11243
11244         * hostio.c: Don't include errno.h.
11245         (errno_to_fileio_errno): Move to hostio-errno.
11246         * hostio.c: (hostio_error): Remove the error parameter.  Defer the
11247         error number outputting to the target->hostio_last_error callback.
11248         (hostio_packet_error): Use FILEIO_EINVAL directly.
11249         (handle_open, handle_pread, hostio_error, handle_unlink): Update
11250         calls to hostio_error.
11251         * hostio-errno.c: New.
11252         * server.h (hostio_last_error_from_errno): Declare.
11253         * target.h (target_ops): Add hostio_last_error member.
11254         * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
11255         as hostio_last_error handler.
11256         * spu-low.c (spu_target_ops): Likewise.
11257         * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
11258         (wince_hostio_last_error): New functions.
11259         (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
11260         as hostio_last_error handler.
11261         (win32_target_ops) [!_WIN32_WCE]: Register
11262         hostio_last_error_from_errno as hostio_last_error handler.
11263         * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
11264         (hostio-errno.o): New rule.
11265         * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
11266         * configure.srv (srv_hostio_err_objs): New variable.  Default to
11267         hostio-errno.o.
11268         (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
11269         * configure: Regenerate.
11270
11271 2008-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
11272
11273         * linux-low.c (linux_attach_lwp): Do not _exit after errors.
11274         (linux_kill, linux_detach): Clean up the process list.
11275         * remote-utils.c (remote_open): Improve port number parsing.
11276         (putpkt_binary, input_interrupt): Only send interrupts if the target
11277         is running.
11278         * server.c (extended_protocol): Make static.
11279         (attached): Define earlier.
11280         (exit_requested, response_needed, program_argv): New variables.
11281         (target_running): New.
11282         (start_inferior): Clear attached here.
11283         (attach_inferior): Set attached here.
11284         (require_running): Define.
11285         (handle_query): Use require_running and target_running.  Implement
11286         "monitor exit".
11287         (handle_v_attach, handle_v_run): New.
11288         (handle_v_requests): Use require_running.  Handle vAttach and vRun.
11289         (gdbserver_usage): Update.
11290         (main): Redo argument parsing.  Handle --debug and --multi.  Handle
11291         --attach along with other options or after the port.  Save
11292         program_argv.  Support no initial program.  Resynchronize
11293         communication with GDB after an error.  Handle "monitor exit".
11294         Use require_running and target_running.  Always allow the extended
11295         protocol.  Do not error out for Hc0 or Hc-1.  Do not automatically
11296         restart in extended mode.
11297         * README: Refer to the GDB manual.  Update --attach usage.
11298
11299 2007-12-20  Andreas Schwab  <schwab@suse.de>
11300
11301         * linux-low.c (STACK_SIZE): Define.
11302         (linux_tracefork_child): Use it.  Use __clone2 on ia64.
11303         (linux_test_for_tracefork): Likewise.
11304
11305 2007-12-18  Daniel Jacobowitz  <dan@codesourcery.com>
11306
11307         * linux-low.c (linux_wait_for_event): Update messages.  Do not
11308         reinsert auto-delete breakpoints.
11309         * mem-break.c (struct breakpoint): Change return type of handler to
11310         int.
11311         (set_breakpoint_at): Update handler type.
11312         (reinsert_breakpoint_handler): Return 1 instead of calling
11313         delete_breakpoint.
11314         (reinsert_breakpoint_by_bp): Check for the original breakpoint before
11315         setting a new one.
11316         (check_breakpoints): Delete auto-delete breakpoints and return 2.
11317         * mem-break.h (set_breakpoint_at): Update handler type.
11318         * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
11319         * win32-low.c (auto_delete_breakpoint): New.
11320         (get_child_debug_event): Use it.
11321
11322 2007-12-16  Daniel Jacobowitz  <dan@codesourcery.com>
11323
11324         * configure.ac: Check for pread and pwrite.
11325         * hostio.c (handle_pread): Fall back to lseek and read.
11326         (handle_pwrite): Fall back to lseek and write.
11327         * config.in, configure: Regenerated.
11328
11329 2007-12-07  Daniel Jacobowitz  <dan@codesourcery.com>
11330
11331         * server.c (myresume): Add own_buf argument.
11332         (main): Update calls.
11333
11334 2007-12-06  Daniel Jacobowitz  <dan@codesourcery.com>
11335
11336         * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
11337         * remote-utils.c (remote_open): Do not call disable_async_io.
11338         (block_async_io): Delete.
11339         (unblock_async_io): Make static.
11340         (initialize_async_io): New.
11341         * server.c (handle_v_cont): Handle async I/O here.
11342         (myresume): Likewise.  Move other common resume tasks here...
11343         (main): ... from here.  Call initialize_async_io.  Disable async
11344         I/O before the main loop.
11345         * server.h (initialize_async_io): Declare.
11346         (block_async_io, unblock_async_io): Delete prototypes.
11347         * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
11348
11349 2007-12-06  Mick Davis  <mickd@goanna.iinet.net.au>
11350
11351         * remote-utils.c (readchar): Allow binary data in received messages.
11352
11353 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11354
11355         * win32-low.c (attaching): New global.
11356         (win32_create_inferior): Clear the `attaching' global.
11357         (win32_attach): Set the `attaching' global.
11358         (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
11359         attaching.  Only set a breakpoint at the entry point if not
11360         attaching.
11361
11362 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11363
11364         * server.c (main): Don't report dll events on the initial
11365         connection on attaches.
11366
11367 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11368
11369         * server.c (main): Relax numerical bases supported for the pid of
11370         the --attach command line argument.
11371
11372 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11373
11374         * win32-low.c (win32_attach): Call OpenProcess before
11375         DebugActiveProcess, not after.  Add last error output to error
11376         call.
11377
11378 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11379
11380         * win32-low.c (win32_get_thread_context)
11381         (win32_set_thread_context): New functions.
11382         (thread_rec): Use win32_get_thread_context.
11383         (continue_one_thread, win32_resume): Use win32_set_thread_context.
11384         * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
11385         field.
11386
11387 2007-12-03  Leo Zayas
11388             Pedro Alves  <pedro_alves@portugalmail.pt>
11389
11390         * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
11391         global variables.
11392         (child_add_thread): Minor cleanup.
11393         (child_continue): Resume artificially suspended threads before
11394         calling ContinueDebugEvent.
11395         (suspend_one_thread): New.
11396         (fake_breakpoint_event): New.
11397         (get_child_debug_event): Change return type to int.  Check here if
11398         gdb sent an interrupt request.  If a soft interrupt was requested,
11399         fake a breakpoint event.  Return 0 if there is no event to handle,
11400         and 1 otherwise.
11401         (win32_wait): Don't check here if gdb sent an interrupt request.
11402         Ensure there is a valid event to handle.
11403         (win32_request_interrupt): Add soft interruption method as last
11404         resort.
11405
11406 2007-12-03  Leo Zayas
11407             Pedro Alves  <pedro_alves@portugalmail.pt>
11408
11409         * win32-low.h (win32_thread_info): Add descriptions to the
11410         structure members.  Replace `suspend_count' counter by a
11411         `suspended' flag.
11412         * win32-low.c (thread_rec): Update condition of when to get the
11413         context from the inferior.  Rely on ContextFlags being set if it
11414         has already been retrieved.  Only suspend the inferior thread if
11415         we haven't already.  Warn if that fails.
11416         (continue_one_thread): s/suspend_count/suspended/.  Only call
11417         ResumeThread once.  Warn if that fails.
11418
11419 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
11420
11421         * win32-low.c (win32_wait): Don't read from the inferior when it
11422         has already exited.
11423
11424 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
11425
11426         * Makefile.in (win32_low_h): New variable.
11427         (win32-low.o): Add dependency on $(win32_low_h).
11428         (win32-arm-low.o, win32-i386-low.o): New rules.
11429
11430 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
11431
11432         * hostio.c: Correct copyright year.
11433
11434 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
11435
11436         * Makefile.in (OBS): Add hostio.o.
11437         (hostio.o): New rule.
11438         * server.h (handle_vFile): Declare.
11439         * hostio.c: New file.
11440         * server.c (handle_v_requests): Take packet_len and new_packet_len
11441         for binary packets.  Call handle_vFile.
11442         (main): Update call to handle_v_requests.
11443
11444 2007-11-05  Daniel Jacobowitz  <dan@codesourcery.com>
11445
11446         * linux-low.c: Include <sched.h>.
11447
11448 2007-11-01  Daniel Jacobowitz  <dan@codesourcery.com>
11449
11450         * linux-low.c (linux_tracefork_grandchild): New.
11451         (linux_tracefork_child): Use clone.
11452         (linux_test_for_tracefork): Use clone; allocate and free a stack.
11453
11454 2007-10-31  Joel Brobecker  <brobecker@adacore.com>
11455
11456         * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
11457
11458 2007-10-24  Daniel Jacobowitz  <dan@codesourcery.com>
11459
11460         * linux-low.c (handle_extended_wait): Handle unexpected signals.
11461
11462 2007-10-23  Daniel Jacobowitz  <dan@codesourcery.com>
11463
11464         * inferiors.c (change_inferior_id): Delete.
11465         (add_pid_to_list, pull_pid_from_list): New.
11466         * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
11467         (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
11468         (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
11469         (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
11470         (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
11471         (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
11472         (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
11473         (using_threads): Always set to 1.
11474         (handle_extended_wait): New.
11475         (add_process): Do not set TID.
11476         (linux_create_inferior): Set must_set_ptrace_flags.
11477         (linux_attach_lwp): Remove TID argument.  Do not check using_threads.
11478         Use PTRACE_SETOPTIONS.  Call new_thread_notify.  Update all callers.
11479         (linux_thread_alive): Rename TID argument to LWPID.
11480         (linux_wait_for_process): Handle unknown processes.  Do not use TID.
11481         (linux_wait_for_event): Do not use TID or check using_threads.  Update
11482         call to dead_thread_notify.  Call handle_extended_wait.
11483         (linux_create_inferior): Use PTRACE_SETOPTIONS.
11484         (send_sigstop): Delete sigstop_sent.
11485         (wait_for_sigstop): Avoid TID.
11486         (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
11487         (linux_test_for_tracefork): New.
11488         (linux_lookup_signals): Use thread_db_active and
11489         linux_supports_tracefork_flag.
11490         (initialize_low): Use thread_db_active and linux_test_for_tracefork.
11491         * linux-low.h (get_process_thread): Avoid TID.
11492         (struct process_ifo): Move thread_known and tid to the end.  Remove
11493         sigstop_sent.
11494         (linux_attach_lwp, thread_db_init): Update prototypes.
11495         * server.h (change_inferior_id): Delete prototype.
11496         (add_pid_to_list, pull_pid_from_list): New prototypes.
11497         * thread-db.c (thread_db_use_events): New.
11498         (find_first_thread): Rename to...
11499         (find_one_thread): ...this.  Update callers and messages.  Do not
11500         call fatal.  Check thread_db_use_events.  Do not call
11501         change_inferior_id or new_thread_notify.
11502         (maybe_attach_thread): Update.  Do not call new_thread_notify.
11503         (thread_db_init): Set thread_db_use_events.  Check use_events.
11504         * utils.c (fatal, warning): Correct message prefix.
11505
11506 2007-10-15  Daniel Jacobowitz  <dan@codesourcery.com>
11507
11508         * Makefile.in (clean): Remove new files.
11509         (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
11510         (powerpc-64.o, powerpc-64.c): New rules.
11511         * configure.srv: Use alternate register sets for powerpc64-*-linux*
11512         with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
11513         with SPE.
11514         * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
11515         SPE targets.
11516         (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
11517         (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
11518         (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
11519         (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
11520         (target_regsets): Add AltiVec and SPE register sets.
11521         * configure.ac: Check for AltiVec and SPE.
11522         * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
11523         (ppc_fill_vrregset, ppc_store_vrregset): New.
11524         (target_regsets): Add AltiVec register set.
11525         * configure: Regenerated.
11526
11527 2007-09-19  Daniel Jacobowitz  <dan@codesourcery.com>
11528
11529         * linux-low.c (O_LARGEFILE): Define.
11530         (linux_read_memory): Use /proc/PID/mem.
11531         * configure.ac: Use AC_GNU_SOURCE.  Check for pread64.
11532         * configure, config.in: Regenerated.
11533
11534 2007-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
11535
11536         * linux-low.c (linux_wait_for_event): Do not pass signals while
11537         single-stepping.
11538
11539 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11540
11541         * win32-low.c (create_process): New.
11542         (win32_create_inferior): Use create_process instead of
11543         CreateProcess.  If create_process failed retry appending an ".exe"
11544         suffix.  Store the GetLastError result immediatelly after
11545         create_process calls and use it on the call to error.
11546
11547 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11548
11549         * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11550
11551 2007-08-23  Joel Brobecker  <brobecker@adacore.com>
11552
11553         * configure.ac: Switch license to GPLv3.
11554
11555 2007-08-01  Michael Snyder  <msnyder@access-company.com>
11556
11557         * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11558
11559 2007-07-31  Pedro Alves  <pedro_alves@portugalmail.pt>
11560
11561         * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11562         typedef.
11563         (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11564         (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL.  Get
11565         CloseToolhelp32Snapshot.
11566         (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11567         CloseToolhelp32Snapshot.
11568
11569 2007-07-27  Michael Snyder  <michael.snyder@access-company.com>
11570
11571         * server.c (main): Check for inferior exit before main loop.
11572
11573 2007-07-18  Pedro Alves  <pedro_alves@portugalmail.pt>
11574
11575         * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11576         instead of on tmp_desc.
11577
11578 2007-07-17  Pedro Alves  <pedro_alves@portugalmail.pt>
11579             Daniel Jacobowitz  <dan@codesourcery.com>
11580
11581         * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11582         (add_thread): Minor cleanups.
11583         (clear_inferiors): Move lower in the file.  Clear the DLL
11584         list.
11585         (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11586         * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11587         (xml_escape_text): New.
11588         * server.c (handle_query): Handle qXfer:libraries:read.  Report it
11589         for qSupported.
11590         (handle_v_cont): Report errors.
11591         (gdbserver_version): Update.
11592         (main): Correct size of own_buf.  Do not report initial DLL events.
11593         * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11594         (unloaded_dll, xml_escape_text): New.
11595         * win32-low.c (enum target_waitkind): Update comments.
11596         (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11597         (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11598         (win32_EnumProcessModules, win32_GetModuleInformation)
11599         (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11600         (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11601         (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11602         (win32_Module32First, win32_Module32Next, load_toolhelp)
11603         (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11604         (get_child_debug_event): Handle DLL events.
11605         (win32_wait): Likewise.
11606
11607 2007-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
11608
11609         * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11610         * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11611
11612 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
11613
11614         * win32-low.c (handle_output_debug_string): Ignore event if not
11615         waiting.
11616
11617 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
11618
11619         * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11620
11621 2007-07-03  Daniel Jacobowitz  <dan@codesourcery.com>
11622
11623         * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11624
11625 2007-07-02  Daniel Jacobowitz  <dan@codesourcery.com>
11626
11627         * inferiors.c (change_inferior_id): Add comment.
11628         * linux-low.c (check_removed_breakpoint): Add an early
11629         prototype.  Improve debug output.
11630         (linux_attach): Doc update.
11631         (linux_detach_one_process, linux_detach): Clean up before releasing
11632         each process.
11633         (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11634         * linux-low.h (struct process_info): Doc improvement.
11635         * mem-break.c (delete_all_breakpoints): New.
11636         * mem-break.h (delete_all_breakpoints): New prototype.
11637         * thread-db.c (find_first_thread): New.
11638         (thread_db_create_event): Call it instead of
11639         thread_db_find_new_threads.  Clean up unused variables.
11640         (maybe_attach_thread): Remove first thread handling.
11641         (thread_db_find_new_threads): Use find_first_thread.
11642         (thread_db_get_tls_address): Likewise.
11643
11644 2007-06-27  Daniel Jacobowitz  <dan@codesourcery.com>
11645
11646         * thread-db.c (thread_db_find_new_threads): Add prototype.
11647         (thread_db_create_event): Check for the main thread before adding
11648         a new thread.
11649         (maybe_attach_thread): Only enable event reporting if TID == 0.
11650         (thread_db_get_tls_address): Check for new threads.
11651
11652 2007-06-20  Daniel Jacobowitz  <dan@codesourcery.com>
11653
11654         * linux-low.c (linux_create_inferior): Try execv before execvp.
11655         * spu-low.c (spu_create_inferior): Likewise.
11656
11657 2007-06-13  Mike Frysinger  <vapier@gentoo.org>
11658
11659         * linux-low.c (linux_create_inferior): Change execv to execvp.
11660         * spu-low.c (spu_create_inferior): Likewies.
11661
11662 2007-06-13  Daniel Jacobowitz  <dan@codesourcery.com>
11663
11664         * Makefile.in (clean): Clean new files instead of deleted ones.
11665         (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11666         (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11667         rules.
11668         * configure.srv: Specify XML files and new regformats for MIPS and
11669         MIPS64 GNU/Linux.
11670         * linux-mips-low.c (mips_num_regs): Set to only used registers.
11671         (mips_regmap): Do not fetch $0.  Remove unused registers.  Add
11672         an entry for the restart register.
11673         (mips_cannot_fetch_register, mips_cannot_store_register)
11674         (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11675         register names to match the XML descriptions.
11676         (mips_fill_gregset, mips_store_gregset): Likewise.  Handle the
11677         restart register instead of $0.
11678
11679 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
11680             Markus Deuling  <deuling@de.ibm.com>
11681
11682         * remote-utils.c (decode_xfer_write): New function.
11683         * server.h (decode_xfer_write): Add prototype.
11684         * server.c (handle_query): Add PACKET_LEN argument.  Support
11685         qXfer:spu:read and qXfer:spu:write packets.
11686         (main): Pass packet_len to handle_query.
11687         * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11688         * target.h (target_ops): Add qxfer_spu.
11689
11690 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
11691
11692         * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11693         accessing non-seekable spufs files.
11694
11695 2007-05-16  Markus Deuling  <deuling@de.ibm.com>
11696
11697         * server.c (handle_query): Add reply for qC packet.
11698
11699 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
11700             Leo Zayas  <lerele@champenstudios@com>
11701
11702         * server.h (check_remote_input_interrupt_request): New function.
11703         * remote_utils.c (INVALID_DESCRIPTOR): New define.
11704         (remote_desc): Initialize with INVALID_DESCRIPTOR.
11705         (input_interrupt): Expose on USE_WIN32API too.  Fix whitespace.
11706         (check_remote_input_interrupt_request): New function.
11707         * server.h (check_remote_input_interrupt_request): Declare.
11708         * win32-low.c (winapi_DebugBreakProcess,
11709         winapi_GenerateConsoleCtrlEvent): New typedefs.
11710         (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11711         to 250 ms.
11712         (win32_wait): Check for remote interrupt request
11713         with check_remote_input_interrupt_request.
11714         (win32_request_interrupt): New function.
11715         (win32_target_op): Set request_interrupt to win32_request_interrupt.
11716
11717 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
11718
11719         * win32-low.c (debug_registers_changed,
11720         debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11721         CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11722         CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11723         (thread_rec): Get context using the low target.
11724         (child_add_thread): Call thread_added on the low target,
11725         which does the same thing.
11726         (regptr): Delete.
11727         (do_initial_child_stuff): Remove debug registers references.
11728         Set context using the low target.  Resume threads after
11729         setting the contexts.
11730         (child_continue): Remove dead variable.  Remove debug
11731         registers references.
11732         (child_fetch_inferior_registers): Go through the low target.
11733         (do_child_store_inferior_registers): Remove.
11734         (child_store_inferior_registers): Go through the low target.
11735         (win32_resume): Remove debug registers references.
11736         Set context using the low target.
11737         (handle_exception): Change return type to void.  Don't record
11738         context here.  Set status to TARGET_WAITKIND_SPURIOUS on a
11739         first chance exception.
11740         (get_child_debug_event): Change return type to void.  Remove
11741         goto loop.  Always return after waiting for debug event.
11742         (win32_wait): Convert to switch statement.  Handle spurious
11743         events.
11744
11745         * win32-i386-low.c (debug_registers_changed,
11746         debug_registers_used): New.
11747         (initial_stuff): Rename to ...
11748         (i386_initial_stuff): ... this.  Clear debug registers
11749         state variables.
11750         (store_debug_registers): Delete.
11751         (i386_get_thread_context): New.
11752         (load_debug_registers): Delete.
11753         (i386_set_thread_context): New.
11754         (i386_thread_added): New.
11755         (single_step): Rename to ...
11756         (i386_single_step): ... this.
11757         (do_fetch_inferior_registers): Rename to ...
11758         (i386_fetch_inferior_register): ... this.
11759         (i386_store_inferior_register): New.
11760         (the_low_target): Adapt to new interface.
11761
11762         * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11763         (arm_get_thread_context): New.
11764         (arm_set_thread_context): New.
11765         (regptr): New.
11766         (do_fetch_inferior_registers): Rename to ...
11767         (arm_fetch_inferior_register): ... this.
11768         (arm_store_inferior_register): New.
11769         (arm_wince_breakpoint): Reimplement as unsigned long.
11770         (arm_wince_breakpoint_len): Define.
11771         (the_low_target): Adapt to new interface.
11772
11773         * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11774         load_debug_registers.  Add get_thread_context, set_thread_context,
11775         thread_added and store_inferior_register.  Rename
11776         fetch_inferior_registers to fetch_inferior_register.
11777         (regptr): Remove declaration.
11778
11779 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
11780
11781         * linux-low.c (linux_detach): Change return type to int.  Return 0.
11782         * spu-low.c (spu_detach): Likewise.
11783
11784 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
11785
11786         * target.h (target_ops): Change return type of detach to int.
11787         Add join.
11788         (join_inferior): New.
11789         * server.c (main): Don't skip detach support on mingw32.
11790         If the inferior doesn't support detaching return error.
11791         Call join_inferior instead of using waitpid.
11792         * linux-low.c (linux_join): New.
11793         (linux_target_op): Add linux_join.
11794         * spu-low.c (spu_join): New.
11795         (spu_target_ops): Add spu_join.
11796         * win32-low.c (win32_detach): Adapt to new interface.
11797         Reopen current_process_handle before detaching.  Issue a child
11798         resume before detaching.
11799         (win32_join): New.
11800         (win32_target_op): Add win32_join.
11801
11802 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
11803
11804         * win32-low.c (win32-attach): Fix return value.
11805         * target.h (target_ops): Describe ATTACH return values.
11806
11807 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
11808
11809         * win32-low.c (GETPROCADDRESS): Define.
11810         (winapi_DebugActiveProcessStop): Add WINAPI.  typedef as pointer.
11811         (winapi_DebugSetProcessKillOnExit): Likewise.
11812         (win32_create_inferior): Force usage of ansi CreateProcessA.
11813         (win32_attach): Use GETPROCADDRESS.
11814         (win32_detach): Likewise.
11815
11816 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
11817
11818         * win32-low.c (win32_wait): Don't use WSTOPSIG.
11819
11820 2007-03-30  Pedro Alves  <pedro_alves@portugalmail.pt>
11821
11822         * win32-low.c: Commit leftover changes from 2007-03-29.
11823
11824 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
11825
11826         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11827         fields short instead of int.  Add explicit padding.
11828         (i387_cache_to_fsave): Remove unnecessary casts.
11829         (i387_fsave_to_cache): Doc fix.
11830         (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11831
11832 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
11833
11834         * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11835         (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11836
11837 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
11838
11839         * configure.srv (arm*-*-mingw32ce*): Move near the other
11840         arm targets.
11841
11842 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
11843
11844         * configure.ac: Add errno checking.
11845         (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11846         sys/file.h and malloc.h.
11847         (AC_CHECK_DECLS): Add perror.
11848         (srv_mingwce): Handle.
11849         * configure.srv (i[34567]86-*-cygwin*): Add
11850         win32-i386-low.o to srv_tgtobj.
11851         (i[34567]86-*-mingw*): Likewise.
11852         (arm*-*-mingw32ce*): Add case.
11853         * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11854         HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11855         [__MINGW32CE__] (strerror): New function.
11856         [__MINGW32CE__] (errno): Define to GetLastError.
11857         [__MINGW32CE__] (COUNTOF): New macro.
11858         (remote_open): Remove extra close call.
11859         * mem-break.c (delete_breakpoint_at): New function.
11860         * mem-break.h (delete_breakpoint_at): Declare.
11861         * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11862         HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11863         [USE_WIN32API] (read, write): Add char* casts.
11864         * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11865         * server.h: Include wincecompat.h on Windows CE.
11866         [HAVE_ERRNO_H]: Check.
11867         (perror): Declare if not declared.
11868         * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11869         (perror_with_name): Remove errno declaration.
11870         * wincecompat.h: New.
11871         * wincecompat.c: New.
11872         * win32-low.h: New.
11873         * win32-arm-low.c: New.
11874         * win32-i386-low.c: New.
11875         (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11876         (OUTMSG2): Make it safe.
11877         (_T): New macro.
11878         (COUNTOF): New macro.
11879         (NUM_REGS): Get it from the low target.
11880         (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11881         CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11882         (thread_rec): Let low target handle debug registers.
11883         (child_add_thread): Likewise.
11884         (child_init_thread_list): Likewise.
11885         (continue_one_thread): Likewise.
11886         (regptr): New.
11887         (do_child_fetch_inferior_registers): Move to ...
11888         * win32-i386-low.c: ... here, and rename to ...
11889         (do_fetch_inferior_registers): ... this.
11890         * win32-low.c (child_fetch_inferior_registers):
11891         Go through the low target.
11892         (do_child_store_inferior_registers): Use regptr.
11893         (strwinerror): New function.
11894         (win32_create_inferior): Handle Windows CE.
11895         Use strwinerror instead of strerror on Windows error
11896         codes.  Add program to the error output.
11897         Don't close the main thread handle on Windows CE.
11898         (win32_attach): Use coredll.dll on Windows CE.
11899         (win32_kill): Close current process and current
11900         thread handles.
11901         (win32_detach): Use coredll.dll on Windows CE.
11902         (win32_resume): Let low target handle debug registers, and
11903         step request.
11904         (handle_exception): Add/Remove initial breakpoint.  Avoid
11905         non-existant WSTOPSIG on Windows CE.
11906         (win32_read_inferior_memory): Cast to remove warning.
11907         (win32_arch_string): Go through the low target.
11908         (initialize_low): Call set_breakpoint_data with the low
11909         target's breakpoint.
11910         * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11911         FOP_REGNUM, mappings): Move to ...
11912         * win32-i386-low.c: ... here.
11913         * win32-low.c (win32_thread_info): Move to ...
11914         * win32-low.h: ... here.
11915         * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11916         win32-arm-low.c and wincecompat.c.
11917         (all:): Add $EXEEXT.
11918         (install-only:): Likewise.
11919         (gdbserver:): Likewise.
11920         (gdbreplay:): Likewise.
11921         * config.in: Regenerate.
11922         * configure: Regenerate.
11923
11924 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
11925
11926         * win32-low.c: Rename typedef thread_info to
11927         win32_thread_info throughout.
11928
11929 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
11930
11931         * win32-i386-low.c: Rename to ...
11932         * win32-low.c: ... this.
11933         * configure.srv: Replace win32-i386-low.o with win32-low.o.
11934         * Makefile.in: Likewise.
11935
11936 2007-03-27  Pedro Alves  <pedro_alves@portugalmail.pt>
11937
11938         * remote-utils.c (monitor_output): Constify msg parameter.
11939         * server.h (monitor_output): Likewise.
11940         * win32-i386-low.c (handle_output_debug_string): New.
11941         (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11942         handle_output_debug_string.
11943         (get_child_debug_event): Likewise.
11944
11945 2007-03-27  Mat Hostetter  <mat@lcs.mit.edu>
11946
11947         * server.c (main): Correct strtoul check.
11948
11949 2007-03-27  Jon Ringle  <jon@ringle.org>
11950
11951         * linux-low.c: Check __ARCH_HAS_MMU__ also.
11952
11953 2007-03-27  Brooks Moses  <brooks.moses@codesourcery.com>
11954
11955         * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11956
11957 2007-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
11958
11959         * terminal.h: Check HAVE_SGTTY_H.
11960
11961 2007-02-27  Mat Hostetter  <mat@lcs.mit.edu>
11962
11963         * remote-utils.c (remote_open): Print out the assigned port number.
11964
11965 2007-02-26  Daniel Jacobowitz  <dan@codesourcery.com>
11966
11967         * remote-utils.c (monitor_output): New function.
11968         * server.c (debug_threads): Define here.
11969         (monitor_show_help): New function.
11970         (handle_query): Handle qRcmd.
11971         (main): Do not handle 'd' packet.
11972         * server.h (debug_threads, remote_debug, monitor_output): Declare.
11973         * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11974         of debug_threads.
11975
11976 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
11977
11978         * Makefile.in (EXEEXT): New.
11979         (clean): Use $(EXEEXT).
11980
11981 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
11982
11983         * target.h (target_ops): Rename send_signal to request_interrupt,
11984         and remove enum target_signal parameter.
11985         * linux-low.c (linux_request_interrupt): Rename from
11986         linux_send_signal, and always send SIGINT.
11987         * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11988         and always send SIGINT.
11989         * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11990         of send_signal.
11991         (input_interrupt): Likewise.
11992
11993 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
11994
11995         * server.c (get_features_xml): Check if target implemented
11996         arch_string.
11997         * win32-i386-low.c (win32_arch_string): New.
11998         (win32_target_ops): Add win32_arch_string as arch_string member.
11999
12000 2007-02-22  Markus Deuling  <deuling@de.ibm.com>
12001
12002         * spu-low.c (spu_arch_string): New.
12003         (spu_target_ops): Add spu_arch_string.
12004
12005 2007-02-16  Daniel Jacobowitz  <dan@codesourcery.com>
12006
12007         * remote-utils.c: Remove HAVE_TERMINAL_H check.
12008         * configure.ac: Do not check for terminal.h.
12009         * configure, config.in: Regenerated.
12010
12011 2007-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
12012
12013         * Makefile.in (OBS): Add $(XML_BUILTIN).
12014         (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
12015         (clean): Update.
12016         (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
12017         (arm-with-iwmmxt.c): New.
12018         * config.in, configure: Regenerate.
12019         * configure.ac: Check for iWMMXt.  Handle srv_xmltarget,
12020         srv_xmlbuiltin, and srv_xmlfiles.  Define USE_XML.
12021         * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
12022         (arm*-*-linux*): Add iWMMXt and regset support.
12023         * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
12024         (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
12025         (arm_store_wmmxregset, target_regsets): New.
12026         * server.c (get_features_xml): Take annex argument.  Check builtin
12027         XML documents.
12028         (handle_query): Handle multiple annexes.
12029
12030 2007-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
12031
12032         * remote-utils.c [USE_WIN32API] (read, write): Define.
12033         (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
12034         write.
12035
12036 2007-01-09  Daniel Jacobowitz  <dan@codesourcery.com>
12037
12038         * linux-i386-low.c (the_low_target): Set arch_string.
12039         * linux-x86-64-low.c (the_low_target): Likewise.
12040         * linux-low.c (linux_arch_string): New.
12041         (linux_target_ops): Add it.
12042         * linux-low.h (struct linux_target_ops): Add arch_string.
12043         * server.c (write_qxfer_response): Use const void * for DATA.
12044         (get_features_xml): New.
12045         (handle_query): Handle qXfer:features:read.  Report it for qSupported.
12046         * target.h (struct target_ops): Add arch_string method.
12047
12048 2007-01-03  Denis Pilat  <denis.pilat@st.com>
12049             Daniel Jacobowitz  <dan@codesourcery.com>
12050
12051         * linux-low.c (linux_kill): Handle being called with no threads.
12052         * win32-i386-low.c (win32_kill): Likewise.
12053         (get_child_debug_event): Clear current_process_handle.
12054
12055 2006-12-30  Denis PILAT  <denis.pilat@st.com>
12056             Daniel Jacobowitz  <dan@codesourcery.com>
12057
12058         * remote-utils.c (remote_open): Check the type of specified
12059         serial port devices before opening them.
12060         * server.c (main): Kill the inferior if an error occurs during
12061         the first remote_open.
12062
12063 2006-12-05  Markus Deuling  <deuling@de.ibm.com>
12064
12065         * README: Update supported targets.
12066
12067 2006-11-28  Daniel Jacobowitz  <dan@codesourcery.com>
12068
12069         * Makefile.in (clean): Remove reg-mips64.c.
12070         (reg-mips64.c, reg-mips64.o): New rules.
12071         * configure.srv: Handle mips64.  Include regset support for mips.
12072         * linux-mips-low.c (union mips_register): New.
12073         (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
12074         (mips_breakpoint, mips_breakpoint_at): Use int.
12075         (mips_collect_register, mips_supply_register)
12076         (mips_collect_register_32bit, mips_supply_register_32bit)
12077         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12078         (mips_store_fpregset, target_regsets): New.
12079         * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
12080
12081 2006-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
12082
12083         * configure.srv: Add target "spu*-*-*".
12084         * Makefile.in (clean): Remove reg-spu.c.
12085         (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
12086         * spu-low.c: New file.
12087
12088 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
12089
12090         * configure.ac: Correct td_thr_tls_get_addr test.
12091         * configure: Regenerated.
12092
12093 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
12094
12095         * linux-low.c (linux_wait_for_event): Reformat.  Use the
12096         pass_signals array.
12097         * remote-utils.c (decode_address_to_semicolon): New.
12098         * server.c (pass_signals, handle_general_set): New.
12099         (handle_query): Mention QPassSignals for qSupported.
12100         (main): Call handle_general_set.
12101         * server.h (pass_signals, decode_address_to_semicolon): New.
12102
12103 2006-11-06  Daniel Jacobowitz  <dan@codesourcery.com>
12104
12105         * server.c (handle_query): Correct error handling for read_auxv.
12106
12107 2005-10-19  Ulrich Weigand  <uweigand@de.ibm.com>
12108
12109         * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
12110         and srv_linux_thread_db to yes.
12111         * linux-s390-low.c (s390_fill_gregset): New function.
12112         (target_regsets): Define data structure.
12113
12114 2006-10-17  Daniel Jacobowitz  <dan@codesourcery.com>
12115
12116         * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
12117         * configure.ac: Use it.  Define HAVE_TD_THR_TLS_GET_ADDR.
12118         * config.in, configure: Regenerated.
12119         * inferiors.c (gdb_id_to_thread): New function.
12120         (gdb_id_to_thread_id): Use it.
12121         * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
12122         * linux-low.h (struct process_info): Add th member.
12123         (thread_db_get_tls_address): New prototype.
12124         * remote-utils.c (decode_address): Make non-static.
12125         * server.c (handle_query): Handle qGetTLSAddr.
12126         * server.h (gdb_id_to_thread, decode_address): New prototypes.
12127         * target.h (struct target_ops): Add get_tls_address.
12128         * thread-db.c (maybe_attach_thread): Save the thread handle.
12129         (thread_db_get_tls_address): New.
12130
12131 2006-09-28  Daniel Jacobowitz  <dan@codesourcery.com>
12132
12133         * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
12134         (linux_resume_one_process): Take a siginfo_t *.  Update all
12135         callers.  Queue it if necessary.  Use PTRACE_SETSIGINFO.
12136         (struct pending_signals): Add a siginfo_t.
12137         (linux_wait_for_process): Always set last_status.
12138         (linux_wait_for_event): Use PTRACE_GETSIGINFO.
12139         (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
12140         * linux-low.h (struct process_info): Add last_status.
12141
12142 2006-09-21  Daniel Jacobowitz  <dan@codesourcery.com>
12143
12144         * remote-utils.c (try_rle): New function.
12145         (putpkt_binary): Use it.
12146
12147 2006-08-19  Daniel Jacobowitz  <dan@codesourcery.com>
12148
12149         * Makefile.in (clean): Clean reg-x86-64-linux.c.
12150         (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
12151         * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
12152         * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
12153         (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
12154         point registers.
12155
12156 2006-08-08  Richard Sandiford  <richard@codesourcery.com>
12157
12158         * server.c (terminal_fd): New variable.
12159         (old_foreground_pgrp): Likewise.
12160         (restore_old_foreground_pgrp): New function.
12161         (start_inferior): Record the terminal file descriptor in terminal_fd
12162         and its original foreground group in old_foreground_pgrp.  Register
12163         restore_old_foreground_pgrp with atexit().
12164
12165 2006-07-26  Daniel Jacobowitz  <dan@codesourcery.com>
12166
12167         * server.c (handle_query): Correct qPart to qXfer.
12168
12169 2006-07-22  Daniel Jacobowitz  <dan@codesourcery.com>
12170
12171         * configure.ac: Check for more headers which are missing on
12172         Windows.  Automatically supply -lwsock32 and USE_WIN32API.
12173         * configure.srv: Add Cygwin and mingw32.
12174         * remote-utils.c: Don't include headers unconditionally which
12175         are missing on mingw32.  Include <winsock.h> for mingw32.
12176         (remote_open): Adjust for mingw32 support.  Flush
12177         standard error after writing to it.
12178         (remote_close, putpkt_binary, input_interrupt, block_async_io)
12179         (unblock_async_io, enable_async_io, disable_async_io)
12180         (readchar, getpkt): Update for Winsock support.
12181         (prepare_resume_reply): Expect a protocol signal number.
12182         * server.c: Disable <sys/wait.h> on mingw32.
12183         (start_inferior): Adjust for mingw32 support.  Flush
12184         standard error after writing to it.
12185         (attach_inferior): Likewise.  Use protocol signal
12186         numbers.
12187         (main): Skip 'D' packet on mingw32.  Use protocol signal numbers
12188         and names.
12189         * win32-i386-low.c: New file.
12190         * Makefile.in (XM_CLIBS): Set.
12191         (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
12192         (win32-i386-low.o): New dependency rule.
12193         * linux-low.c (linux_wait): Use target signal numbers.
12194         * target.h (struct target_ops): Doc fix.
12195         * server.h (target_signal_to_name): New prototype.
12196         * gdbreplay.c: Don't include headers unconditionally which
12197         are missing on mingw32.  Include <winsock.h> for mingw32.
12198         (remote_close, remote_open): Adjust for Winsock support.
12199         * configure, config.in: Regenerated.
12200
12201 2006-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
12202
12203         * server.c (decode_xfer_read, write_qxfer_response): New.
12204         (handle_query): Take a packet length argument.  Handle
12205         qXfer:auxv:read instead of qPart:auxv:read.  Mention it in
12206         the qSupported response.
12207         (main): Update call to handle_query.
12208
12209 2006-06-22  Daniel Jacobowitz  <dan@codesourcery.com>
12210
12211         * remote-utils.c (remote_escape_output, remote_unescape_input): New.
12212         (putpkt_binary): Renamed from putpkt and adjusted for binary
12213         data.
12214         (putpkt): New wrapper for putpkt_binary.
12215         (readchar): Don't mask off the high bit.
12216         (decode_X_packet): New function.
12217         * server.c (main): Call putpkt_binary if a handler sets the packet
12218         length.  Save the length of the incoming packet.  Handle 'X'.
12219         * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
12220
12221 2006-06-21  Daniel Jacobowitz  <dan@codesourcery.com>
12222
12223         * server.c (handle_query): Handle qSupported.
12224
12225 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
12226
12227         * remote-utils.c (all_symbols_looked_up): New variable.
12228         (look_up_one_symbol): Check it.
12229         * server.h (look_up_one_symbol): New declaration.
12230         * thread-db.c (thread_db_init): Set all_symbols_looked_up.
12231
12232 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
12233
12234         * Makefile.in (linux-arm-low.o): Update dependencies.
12235         * linux-arm-low.c: Include "gdb_proc_service.h".
12236         (PTRACE_GET_THREAD_AREA): Define.
12237         (ps_get_thread_area): New function.
12238
12239 2006-05-09  Nathan Sidwell  <nathan@codesourcery.com>
12240
12241         * configure.srv (m68k*-*-uclinux*): New target.
12242         * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
12243         (linux_resume_one_process): Remove extraneous cast.
12244         (linux_read_offsets): New.
12245         (linux_target_op): Add linux_read_offsets on mmuless systems.
12246         * server.c (handle_query): Add qOffsets logic.
12247         * target.h (struct target_ops): Add read_offsets.
12248
12249 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
12250
12251         * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
12252         (PTRACE_GET_THREAD_AREA): Define.
12253         (ps_get_thread_area): New function.
12254         * Makefile.in (linux-i386-low.o, linux-mips-low.o)
12255         (linux-x86-64-low.o): Update.
12256
12257 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
12258
12259         * configure.ac: Remove checks for prfpregset_t.
12260         * gdb_proc_service.h: New file.
12261         * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
12262         new "gdb_proc_service.h".
12263         * proc-service.c: Likewise.
12264         (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
12265         (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
12266         * Makefile.in (gdb_proc_service_h): Updated.
12267         * configure, config.in: Regenerated.
12268
12269 2006-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
12270
12271         * remote-utils.c (prepare_resume_reply): Move declaration
12272         of gdb_id_from_wait to the top of the block.
12273
12274 2006-02-15  Daniel Jacobowitz  <dan@codesourcery.com>
12275
12276         * linux-low.c (regsets_store_inferior_registers): Read the regset
12277         from the target before filling it.
12278
12279 2006-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
12280
12281         * server.c (attach_inferior): Return SIGTRAP for a successful
12282         attach.
12283
12284 2006-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
12285
12286         * Makefile.in (OBS): Add version.o.
12287         (STAGESTUFF): Delete.
12288         (version.o): Add dependencies.
12289         (version.c): Replace rule.
12290         (clean): Remove version.c.
12291         * server.c (gdbserver_version): New.
12292         (gdbserver_usage): Use printf.
12293         (main): Handle --version and --help.
12294         * server.h (version, host_name): Add declarations.
12295
12296 2005-12-23  Eli Zaretskii  <eliz@gnu.org>
12297
12298         * linux-arm-low.c:
12299         * linux-arm-low.c:
12300         * inferiors.c:
12301         * i387-fp.h:
12302         * i387-fp.c:
12303         * gdbreplay.c:
12304         * regcache.c:
12305         * proc-service.c:
12306         * mem-break.h:
12307         * mem-break.c:
12308         * linux-x86-64-low.c:
12309         * linux-sh-low.c:
12310         * linux-s390-low.c:
12311         * linux-ppc64-low.c:
12312         * linux-ppc-low.c:
12313         * linux-mips-low.c:
12314         * linux-m68k-low.c:
12315         * linux-m32r-low.c:
12316         * linux-low.h:
12317         * linux-low.c:
12318         * linux-ia64-low.c:
12319         * linux-i386-low.c:
12320         * linux-crisv32-low.c:
12321         * thread-db.c:
12322         * terminal.h:
12323         * target.h:
12324         * target.c:
12325         * server.h:
12326         * server.c:
12327         * remote-utils.c:
12328         * regcache.h:
12329         * utils.c:
12330         * Makefile.in:
12331         * configure.ac:
12332         * gdbserver.1: Add (C) after Copyright.  Update the FSF
12333         address.
12334
12335 2005-11-13  Daniel Jacobowitz  <dan@codesourcery.com>
12336
12337         * linux-arm-low.c (arm_eabi_breakpoint): New variable.
12338         (arm_breakpoint_at): Recognize both breakpoints.
12339         (the_low_target): Use the correct breakpoint instruction.
12340
12341 2005-11-02  Daniel Jacobowitz  <dan@codesourcery.com>
12342
12343         * configure.srv (x86_64-*-linux*): Turn on thread_db support.
12344         * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
12345         (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
12346         (the_low_target): Update.
12347
12348 2005-10-25  Andreas Schwab  <schwab@suse.de>
12349
12350         * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
12351
12352         * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
12353         (ia64_num_regs): Reduce to 462.
12354
12355 2005-09-17  Daniel Jacobowitz  <dan@codesourcery.com>
12356
12357         * acinclude.m4: Correct quoting.
12358         * aclocal.m4: Regenerated.
12359
12360         Suggested by SZOKOVACS Robert <szo@ies.hu>:
12361         * thread-db.c (thread_db_err_str): Handle TD_VERSION.
12362         (thread_db_init): Call thread_db_err_str.
12363         * configure.ac: Check for TD_VERSION.
12364         * config.in, configure: Regenerated.
12365
12366 2005-07-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12367
12368         * server.h (error, fatal, warning): Add ATTR_FORMAT.
12369
12370 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
12371
12372         * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
12373         is not available.  Define HAVE_PTRACE_GETREGS if it is.
12374         * config.in, configure: Regenerated.
12375         * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
12376         * linux-i386-low.c, linux-m68k-low.c: Update to use
12377         HAVE_PTRACE_GETREGS.
12378         * linux-low.c (regsets_fetch_inferior_registers)
12379         (regsets_store_inferior_registers): Only return 0 if we processed
12380         GENERAL_REGS.
12381         * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
12382         * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
12383
12384 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
12385
12386         * inferiors.c (struct thread_info): Add gdb_id.
12387         (add_thread): Add gdb_id argument.
12388         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
12389         * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
12390         calls to add_thread.
12391         * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
12392         * server.c (handle_query): Use thread_to_gdb_id.
12393         (handle_v_cont, main): Use gdb_id_to_thread_id.
12394         * server.h (add_thread): Update prototype.
12395         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
12396         prototypes.
12397
12398 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
12399
12400         * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
12401         left-padded registers.
12402         * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
12403         * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
12404
12405 2005-07-01  Steve Ellcey  <sje@cup.hp.com>
12406
12407         * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
12408         * configure: Regenerate.
12409         * config.in: Regenerate.
12410         * server.h (NEED_DECLARATION_STRERROR):
12411         Replace with !HAVE_DECL_STRERROR.
12412
12413 2005-06-16  Daniel Jacobowitz  <dan@codesourcery.com>
12414
12415         * linux-low.c (linux_wait, linux_send_signal): Don't test
12416         an unsigned long variable for > 0 if it could be MAX_ULONG.
12417         * server.c (myresume): Likewise.
12418         * target.c (set_desired_inferior): Likewise.
12419
12420 2005-06-13  Mark Kettenis  <kettenis@gnu.org>
12421
12422         * configure.ac: Simplify and improve check for socklen_t.
12423         * configure, config.in: Regenerate.
12424
12425 2005-06-12  Daniel Jacobowitz  <dan@codesourcery.com>
12426
12427         * acconfig.h: Remove.
12428         * configure.ac: Add a test for socklen_t.  Use three-argument
12429         AC_DEFINE throughout.
12430         * config.in: Regenerated using autoheader 2.59.
12431         * configure: Regenerated.
12432
12433         * gdbreplay.c (socklen_t): Provide a default.
12434         (remote_open): Use socklen_t.
12435         * remote-utils.c (socklen_t): Provide a default.
12436         (remote_open): Use socklen_t.
12437         (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
12438         unsigned char.
12439
12440         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
12441         char for buffers.
12442         * linux-low.c (linux_read_memory, linux_write_memory)
12443         (linux_read_auxv): Likewise.
12444         * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
12445         (check_mem_write): Likewise.
12446         * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
12447         Likewise.
12448         * regcache.c (struct inferior_rgcache_data, registers_to_string)
12449         (registers_from_string, register_data): Likewise.
12450         * server.c (handle_query, main): Likewise.
12451         * server.h (convert_ascii_to_int, convert_int_to_ascii)
12452         (decode_M_packet): Likewise.
12453         * target.c (read_inferior_memory, write_inferior_memory): Likewise.
12454         * target.h (struct target_ops): Update read_memory, write_memory,
12455         and read_auxv.
12456         (read_inferior_memory, write_inferior_memory): Update.
12457         * linux-low.h (struct linux_target_ops): Change type of breakpoint
12458         to unsigned char *.
12459         * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
12460         linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
12461         linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
12462         linux-s390-low.c, linux-sh-low.c: Update for changes in
12463         read_inferior_memory and the_low_target->breakpoint.
12464
12465 2005-05-28  Daniel Jacobowitz  <dan@codesourcery.com>
12466
12467         * Makefile.in (SFILES): Add linux-ppc64-low.c.
12468         (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
12469         * configure.srv: Add powerpc64-*-linux*.
12470         * linux-ppc64-low.c: New file.
12471
12472 2005-05-23  Orjan Friberg  <orjanf@axis.com>
12473
12474         * linux-cris-low.c: New file with support for CRIS.
12475         * linux-crisv32-low.c: Ditto for CRISv32.
12476         * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
12477         (clean): Add reg-cris.c and reg-crisv32.c.
12478         Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
12479         reg-crisv32.o, and reg-crisv32.c to make rules.
12480         * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
12481         recognized targets.
12482
12483 2005-05-16  Ulrich Weigand  <uweigand@de.ibm.com>
12484
12485         * linux-low.c (fetch_register): Ensure buffer size is a multiple
12486         of sizeof (PTRACE_XFER_TYPE).
12487         (usr_store_inferior_registers): Likewise.  Zero out excess bytes.
12488
12489 2005-05-12  Orjan Friberg  <orjanf@axis.com>
12490
12491         * target.h (struct target_ops): Add insert_watchpoint,
12492         remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
12493         pointers for hardware watchpoint support.
12494         * linux-low.h (struct linux_target_ops): Ditto.
12495         * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
12496         (linux_stopped_by_watchpoint, linux_stopped_data_address): New.  Add
12497         to linux_target_ops.
12498         * remote-utils.c (prepare_resume_reply): Add watchpoint information to
12499         reply packet.
12500         * server.c (main): Recognize 'Z' and 'z' packets.
12501
12502 2005-05-10  Ulrich Weigand  <uweigand@de.ibm.com>
12503
12504         * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
12505         (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
12506         (the_low_target): Add new members.
12507
12508 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
12509
12510         * proc-service.c (ps_lgetregs): Search all_processes instead of
12511         all_threads.
12512
12513 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
12514
12515         * server.c (start_inferior): Change return type to int.
12516         (attach_inferior): Change sigptr to int *.
12517         (handle_v_cont, handle_v_requests): Change signal to int *.
12518         (main): Change signal to int.
12519
12520 2005-04-15  Kei Sakamoto  <sakamoto.kei@renesas.com>
12521
12522         * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
12523         * configure.srv: Add m32r*-*-linux*.
12524         * linux-m32r-low.c: New file.
12525
12526 2005-03-04  Daniel Jacobowitz  <dan@codesourcery.com>
12527
12528         * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
12529
12530 2005-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
12531
12532         * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
12533         Take unsigned long arguments for PIDs.
12534         * linux-low.c (add_process, linux_attach_lwp, linux_attach)
12535         (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
12536         (wait_for_sigstop, linux_resume_one_process)
12537         (regsets_fetch_inferior_registers, linux_send_signal)
12538         (linux_read_auxv): Likewise.  Update the types of variables holding
12539         PIDs.  Update format string specifiers.
12540         * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
12541         * remote-utils.c (prepare_resume_reply): Likewise.
12542         * server.c (cont_thread, general_thread, step_thread)
12543         (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
12544         unsigned long.
12545         (handle_query): Update format specifiers.
12546         (handle_v_cont, main): Use strtoul for thread IDs.
12547         * server.h (struct inferior_list_entry): Use unsigned long for ID.
12548         (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12549         (general_thread, step_thread, thread_from_wait)
12550         (old_thread_from_wait): Update.
12551         * target.h (struct thread_resume): Use unsigned long for THREAD.
12552         (struct target_ops): Use unsigned long for arguments to attach and
12553         thread_alive.
12554
12555 2005-02-24  Daniel Jacobowitz  <dan@codesourcery.com>
12556
12557         * acinclude.m4: Include bfd/bfd.m4 directly.
12558         * configure.ac: Use AC_ARG_PROGRAM.  Suggested by Aron Griffis
12559         <agriffis@toolchain.org>.
12560         * aclocal.m4, configure: Regenerated.
12561
12562 2005-01-07  Andrew Cagney  <cagney@gnu.org>
12563
12564         * configure.ac: Rename configure.in, require autoconf 2.59.
12565         * configure: Re-generate.
12566
12567 2004-12-08  Daniel Jacobowitz  <dan@debian.org>
12568
12569         * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area.  Reset
12570         LIBS when finished.
12571         * aclocal.m4: Regenerated.
12572         * configure: Regenerated.
12573
12574 2004-11-21  Andreas Schwab  <schwab@suse.de>
12575
12576         * linux-m68k-low.c (m68k_num_gregs): Define.
12577         (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12578         (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12579         (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12580         (m68k_breakpoint_at): New.  Add to the_low_target.
12581
12582         * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12583         srv_linux_thread_db to yes.
12584
12585 2004-10-20  Joel Brobecker  <brobecker@gnat.com>
12586
12587         * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12588         (ARCH_SET_FS): Likewise.
12589         (ARCH_GET_FS): Likewise.
12590         (ARCH_GET_GS): Likewise.
12591
12592 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
12593
12594         * linux-i386-low.c (ps_get_thread_area): New.
12595         * linux-x86-64-low.c (ps_get_thread_area): New.
12596         * linux-low.c: Include <sys/syscall.h>.
12597         (linux_kill_one_process): Don't kill the first thread here.
12598         (linux_kill): Kill the first thread here.
12599         (kill_lwp): New function.
12600         (send_sigstop, linux_send_signal): Use it.
12601         * proc-service.c: Clean up #ifdefs.
12602         (fpregset_info): Delete.
12603         (ps_lgetregs): Update and enable implementation.
12604         (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12605         implementations.
12606         * remote-utils.c (struct sym_cache, symbol_cache): New.
12607         (input_interrupt): Print a clearer message.
12608         (async_io_enabled): New variable.
12609         (enable_async_io, disable_async_io): Use it.  Update comments.
12610         (look_up_one_symbol): Use the symbol cache.
12611         * thread-db.c (thread_db_look_up_symbols): New function.
12612         (thread_db_init): Update comments.  Call thread_db_look_up_symbols.
12613
12614 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
12615
12616         * configure.in: Test for -rdynamic.
12617         * configure: Regenerated.
12618         * Makefile (INTERNAL_LDFLAGS): New.
12619         (gdbserver, gdbreplay): Use it.
12620
12621 2004-09-02  Andrew Cagney  <cagney@gnu.org>
12622
12623         * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12624
12625 2004-03-23  Daniel Jacobowitz  <drow@mvista.com>
12626
12627         * linux-low.c (linux_wait): Clear all_processes list also.
12628
12629 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
12630
12631         * linux-low.c: Include <errno.h>.  Remove extern declaration of
12632         errno.
12633
12634 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
12635
12636         * gdbreplay.c, server.h, utils.c: Update copyright years.
12637
12638 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
12639
12640         * server.c (main): Print child status or termination signal from
12641         variable 'signal', not 'sig'.
12642
12643 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
12644
12645         * linux-low.c (linux_read_memory): Change return type to
12646         int.  Check for and return error from ptrace().
12647         * target.c (read_inferior_memory): Change return type to int.  Pass
12648         back return status from the_target->read_memory().
12649         * target.h (struct target_ops): Adapt *read_memory() prototype.
12650         Update comment.
12651         (read_inferior_memory): Adapt prototype.
12652         * server.c (main): Return an error packet if
12653         read_inferior_memory() returns an error.
12654
12655 2004-03-04  Daniel Jacobowitz  <drow@mvista.com>
12656
12657         * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12658         Unify with other clean targets.
12659
12660 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
12661
12662         * server.c (handle_v_cont): Call set_desired_inferior.
12663
12664 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
12665
12666         * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12667
12668 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
12669
12670         * linux-low.c (linux_wait): Unblock async I/O.
12671         (linux_resume): Block and enable async I/O.
12672         * remote-utils.c (block_async_io, unblock_async_io): New functions.
12673         * server.h (block_async_io, unblock_async_io): Add prototypes.
12674
12675 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
12676
12677         * remote-utils.c (remote_open): Print a status notice after
12678         opening a TCP port.
12679         * server.c (attach_inferior): Print a status notice after
12680         attaching.
12681
12682 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
12683
12684         * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12685
12686 2004-02-26  Daniel Jacobowitz  <drow@mvista.com>
12687
12688         * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12689         error packet.
12690         * server.c, target.h: Update copyright years.
12691
12692 2004-02-25  Roland McGrath  <roland@redhat.com>
12693
12694         * target.h (struct target_ops): New member `read_auxv'.
12695         * server.c (handle_query): Handle qPart:auxv:read: query using that.
12696         * linux-low.c (linux_read_auxv): New function.
12697         (linux_target_ops): Initialize `read_auxv' member to that.
12698
12699 2004-02-17  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12700
12701         Committed by Jim Blandy  <jimb@redhat.com>.
12702
12703         * linux-s390-low.c (s390_num_regs): Update.
12704         (s390_regmap): Remove control registers.  Use __s390x__ predefine
12705         instead of GPR_SIZE to distiguish s390 and s390x targets.
12706
12707 2004-01-31  Daniel Jacobowitz  <drow@mvista.com>
12708
12709         * linux-low.c: Update copyright year.
12710         (check_removed_breakpoint): Clear pending_is_breakpoint.
12711         (linux_set_resume_request, linux_queue_one_thread)
12712         (resume_status_pending_p): New functions.
12713         (linux_continue_one_thread): Use process->resume.
12714         (linux_resume): Only resume threads if there are no pending events.
12715         * linux-low.h (struct process_info): Add resume request
12716         pointer.
12717
12718 2004-01-30  Daniel Jacobowitz  <drow@mvista.com>
12719
12720         * regcache.c (new_register_cache): Clear the allocated register
12721         buffer.  Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12722
12723 2003-10-13  Daniel Jacobowitz  <drow@mvista.com>
12724
12725         * linux-low.c (linux_resume): Take a struct thread_resume *
12726         argument.
12727         (linux_wait): Update call.
12728         (resume_ptr): New static variable.
12729         (linux_continue_one_thread): Renamed from
12730         linux_continue_one_process.  Use resume_ptr.
12731         (linux_resume): Use linux_continue_one_thread.
12732         * server.c (handle_v_cont, handle_v_requests): New functions.
12733         (myresume): New function.
12734         (main): Handle 'v' case.
12735         * target.h (struct thread_resume): New type.
12736         (struct target_ops): Change argument of "resume" to struct
12737         thread_resume *.
12738         (myresume): Delete macro.
12739
12740 2003-08-08  H.J. Lu  <hongjiu.lu@intel.com>
12741
12742         * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12743         (uninstall): Support DESTDIR.
12744
12745 Mon Jul 21 20:09:34 UTC 2003  Brendan Conoboy  <blc@redhat.com>
12746
12747         * configure.srv: Add xscale*linux copy of arm*linux entry.
12748
12749 2003-07-24  Daniel Jacobowitz  <drow@mvista.com>
12750
12751         * linux-arm-low.c (arm_reinsert_addr): New function.
12752         (the_low_target): Add arm_reinsert_addr.
12753
12754 2003-07-08  Mark Kettenis  <kettenis@gnu.org>
12755
12756         * mem-break.c: Remove whitespace at end of file.
12757
12758 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
12759
12760         * configure.in: Check whether we need to prototype strerror.
12761         * server.h: Optionally prototype strerror.
12762         * gdbreplay.c (perror_with_name): Use strerror.
12763         * linux-low.c (linux_attach_lwp): Use strerror.
12764         * utils.c (perror_with_name): Use strerror.
12765         * config.in, configure: Regenerated.
12766
12767 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
12768
12769         * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12770         SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12771
12772 2003-06-20  Daniel Jacobowitz  <drow@mvista.com>
12773
12774         * Makefile.in (SFILES): Update.
12775         * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12776         low-sun3.c: Remove files.
12777
12778 2003-06-17  Daniel Jacobowitz  <drow@mvista.com>
12779
12780         * linux-low.c: Move comment to linux_thread_alive where it belonged.
12781         (linux_detach_one_process, linux_detach): New functions.
12782         (linux_target_ops): Add linux_detach.
12783         * server.c (main): Handle 'D' packet.
12784         * target.h (struct target_ops): Add "detach" member.
12785         (detach_inferior): Define.
12786
12787 2003-06-13  Mark Kettenis  <kettenis@gnu.org>
12788
12789         From Kelley Cook  <kelleycook@wideopenwest.com>:
12790         * configure.srv: Accept i[34567]86 variants.
12791
12792 2003-06-05  Daniel Jacobowitz  <drow@mvista.com>
12793
12794         * linux-low.c (linux_wait_for_event): Correct comment typos.
12795         (linux_resume_one_process): Call check_removed_breakpoint.
12796         (linux_send_signal): New function.
12797         (linux_target_ops): Add linux_send_signal.
12798         * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12799         of kill.
12800         * target.h (struct target_ops): Add send_signal.
12801
12802 2003-05-29  Jim Blandy  <jimb@redhat.com>
12803
12804         * linux-low.c (usr_store_inferior_registers): Transfer buf in
12805         PTRACE_XFER_TYPE-sized chunks, not int-sized chunks.  Otherwise,
12806         if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12807         away part of the register's value.
12808
12809 2003-03-26  Daniel Jacobowitz  <drow@mvista.com>
12810
12811         * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12812         (linux_wait_for_event, linux_init_signals): Likewise.
12813
12814 2003-03-17  Daniel Jacobowitz  <drow@mvista.com>
12815
12816         * configure.in: Check for stdlib.h.
12817         * configure: Regenerated.
12818         * config.in: Regenerated.
12819
12820 2003-01-04  Andreas Schwab  <schwab@suse.de>
12821
12822         * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12823
12824 2003-01-02  Andrew Cagney  <ac131313@redhat.com>
12825
12826         * Makefile.in: Remove obsolete code.
12827
12828 2002-11-20  Daniel Jacobowitz  <drow@mvista.com>
12829
12830         * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12831         defined(PT_FPR0_HI).
12832
12833 2002-11-17  Stuart Hughes  <seh@zee2.com>
12834
12835         * linux-arm-low.c (arm_num_regs): Increase.
12836         (arm_regmap): Include status register.
12837
12838 2002-11-17  Daniel Jacobowitz  <drow@mvista.com>
12839
12840         * linux-low.c (register_addr): Remove incorrect -1 check.
12841
12842 2002-08-29  Daniel Jacobowitz  <drow@mvista.com>
12843
12844         * linux-low.c (linux_create_inferior): Call setpgid.  Return
12845         the new PID.
12846         (unstopped_p, linux_signal_pid): Remove.
12847         (linux_target_ops): Remove linux_signal_pid.
12848         * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12849         global instead of target method.
12850         * target.h (struct target_ops): Remove signal_pid.  Update comment
12851         for create_inferior.
12852         * server.c (signal_pid): New variable.
12853         (create_inferior): Set signal_pid.  Block SIGTTOU and SIGTTIN in
12854         gdbserver.  Set the child to be the foreground process group.
12855         (attach_inferior): Set signal_pid.
12856
12857 2002-08-23  Daniel Jacobowitz  <drow@mvista.com>
12858
12859         * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12860
12861 2002-08-20  Jim Blandy  <jimb@redhat.com>
12862
12863         * Makefile.in (LDFLAGS): Allow the configure script to establish a
12864         default for this.
12865
12866 2002-08-01  Andrew Cagney  <cagney@redhat.com>
12867
12868         * Makefile.in: Make chill references obsolete.
12869
12870 2002-07-24  Kevin Buettner  <kevinb@redhat.com>
12871
12872         * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12873         * configure: Regenerate.
12874         * config.in: Regenerate.
12875
12876 2002-07-09  David O'Brien  <obrien@FreeBSD.org>
12877
12878         * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12879         (perror_with_name, remote_close, remote_open, expect, play): Static.
12880
12881 2002-07-04  Michal Ludvig  <mludvig@suse.cz>
12882
12883         * linux-x86-64-low.c (x86_64_regmap): Make it an array of
12884         byte offsets instead of an array of indexes.
12885         (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12886
12887 2002-06-13  Daniel Jacobowitz  <drow@mvista.com>
12888
12889         * regcache.c: Add comment.
12890
12891 2002-06-11  Daniel Jacobowitz  <drow@mvista.com>
12892
12893         * thread-db.c: New file.
12894         * proc-service.c: New file.
12895         * acinclude.m4: New file.
12896         * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12897         proc-service.o, and thread-db.o.
12898         (linux-low.o): Add USE_THREAD_DB.
12899         * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12900         HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12901         * aclocal.m4: Regenerated.
12902         * config.in: Regenerated.
12903         * configure: Regenerated.
12904         * configure.in: Check for proc_service.h, sys/procfs.h,
12905         thread_db.h, and linux/elf.h headrs.
12906         Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12907         PRFPREGSET_T_BROKEN.  Introduce srv_thread_depfiles and USE_THREAD_DB.
12908         Check for -lthread_db and thread support.
12909         * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12910         PowerPC, and SuperH.
12911         * i387-fp.c: Constify arguments.
12912         * i387-fp.h: Likewise.
12913         * inferiors.c: (struct thread_info): Renamed from
12914         `struct inferior_info'.  Remove PID member.  Use generic inferior
12915         list header.  All uses updated.
12916         (inferiors, signal_pid): Removed.
12917         (all_threads): New variable.
12918         (get_thread): Define.
12919         (add_inferior_to_list): New function.
12920         (for_each_inferior): New function.
12921         (change_inferior_id): New function.
12922         (add_inferior): Removed.
12923         (remove_inferior): New function.
12924         (add_thread): New function.
12925         (free_one_thread): New function.
12926         (remove_thread): New function.
12927         (clear_inferiors): Use for_each_inferior and free_one_thread.
12928         (find_inferior): New function.
12929         (find_inferior_id): New function.
12930         (inferior_target_data): Update argument type.
12931         (set_inferior_target_data): Likewise.
12932         (inferior_regcache_data): Likewise.
12933         (set_inferior_regcache_data): Likewise.
12934         * linux-low.c (linux_bp_reinsert): Remove.
12935         (all_processes, stopping_threads, using_thrads)
12936         (struct pending_signals, debug_threads, pid_of): New.
12937         (inferior_pid): Replace with macro.
12938         (struct inferior_linux_data): Remove.
12939         (get_stop_pc, add_process): New functions.
12940         (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12941         Use add_process and add_thread.
12942         (linux_attach_lwp): New function, based on old linux_attach.  Use
12943         add_process and add_thread.  Set stop_expected for new threads.
12944         (linux_attach): New function.
12945         (linux_kill_one_process): New function.
12946         (linux_kill): Kill all LWPs.
12947         (linux_thread_alive): Use find_inferior_id.
12948         (check_removed_breakpoints, status_pending_p): New functions.
12949         (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12950         Update.  Use WNOHANG.  Wait for cloned processes also.  Update process
12951         struct for the found process.
12952         (linux_wait_for_event): New function.
12953         (linux_wait): Use it.  Support LWPs.
12954         (send_sigstop, wait_for_sigstop, stop_all_processes)
12955         (linux_resume_one_process, linux_continue_one_process): New functions.
12956         (linux_resume): Support LWPs.
12957         (REGISTER_RAW_SIZE): Remove.
12958         (fetch_register): Use register_size instead.  Call supply_register.
12959         (usr_store_inferior_registers): Likewise.  Call collect_register.
12960         Fix recursive case.
12961         (regsets_fetch_inferior_registers): Improve error message.
12962         (regsets_store_inferior_registers): Add debugging.
12963         (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12964         (unstopped_p, linux_signal_pid): New functions.
12965         (linux_target_ops): Add linux_signal_pid.
12966         (linux_init_signals): New function.
12967         (initialize_low): Call it.  Initialize using_threads.
12968         * regcache.c (inferior_regcache_data): Add valid
12969         flag.
12970         (get_regcache): Fetch registers lazily.  Add fetch argument
12971         and update all callers.
12972         (regcache_invalidate_one, regcache_invalidate): New
12973         functions.
12974         (new_register_cache): Renamed from create_register_cache.
12975         Return the new regcache.
12976         (free_register_cache): Change argument to a void *.
12977         (registers_to_string, registers_from_string): Call get_regcache
12978         with fetch flag set.
12979         (register_data): Make static.  Pass fetch flag to get_regcache.
12980         (supply_register): Call get_regcache with fetch flag clear.
12981         (collect_register): Call get_regcache with fetch flag set.
12982         (collect_register_as_string): New function.
12983         * regcache.h: Update.
12984         * remote-utils.c (putpkt): Flush after debug output and use
12985         stderr.
12986         Handle input interrupts while waiting for an ACK.
12987         (input_interrupt): Use signal_pid method.
12988         (getpkt): Flush after debug output and use stderr.
12989         (outreg): Use collect_register_as_string.
12990         (new_thread_notify, dead_thread_notify): New functions.
12991         (prepare_resume_reply): Check using_threads.  Set thread_from_wait
12992         and general_thread.
12993         (look_up_one_symbol): Flush after debug output.
12994         * server.c (step_thread, server_waiting): New variables.
12995         (start_inferior): Don't use signal_pid.  Update call to mywait.
12996         (attach_inferior): Update call to mywait.
12997         (handle_query): Handle qfThreadInfo and qsThreadInfo.
12998         (main): Don't fetch/store registers explicitly.  Use
12999         set_desired_inferior.  Support proposed ``Hs'' packet.  Update
13000         calls to mywait.
13001         * server.h: Update.
13002         (struct inferior_list, struct_inferior_list_entry): New.
13003         * target.c (set_desired_inferior): New.
13004         (write_inferior_memory): Constify.
13005         (mywait): New function.
13006         * target.h: Update.
13007         (struct target_ops): New signal_pid method.
13008         (mywait): Removed macro, added prototype.
13009
13010         * linux-low.h (regset_func): Removed.
13011         (regset_fill_func, regset_store_func): New.
13012         (enum regset_type): New.
13013         (struct regset_info): Add type field.  Use new operation types.
13014         (struct linux_target_ops): stop_pc renamed to get_pc.
13015         Add decr_pc_after_break and breakpoint_at.
13016         (get_process, get_thread_proess, get_process_thread)
13017         (strut process_info, all_processes, linux_attach_lwp)
13018         (thread_db_init): New.
13019
13020         * linux-arm-low.c (arm_get_pc, arm_set_pc,
13021         arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
13022         (the_low_target): Add new members.
13023         * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
13024         (i386_store_fpxregset): Constify.
13025         (target_regsets): Add new kind identifier.
13026         (i386_get_pc): Renamed from i386_stop_pc.  Simplify.
13027         (i386_set_pc): Add debugging.
13028         (i386_breakpoint_at): New function.
13029         (the_low_target): Add new members.
13030         * linux-mips-low.c (mips_get_pc, mips_set_pc)
13031         (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
13032         (mips_breakpoint_at): New.
13033         (the_low_target): Add new members.
13034         * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
13035         (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
13036         (the_low_target): Add new members.
13037         * linux-sh-low.c (sh_get_pc, sh_set_pc)
13038         (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
13039         (the_low_target): Add new members.
13040         * linux-x86-64-low.c (target_regsets): Add new kind
13041         identifier.
13042
13043 2002-05-15  Daniel Jacobowitz  <drow@mvista.com>
13044
13045         From Martin Pool <mbp@samba.org>:
13046         * server.c (gdbserver_usage): New function.
13047         (main): Call it.
13048
13049 2002-05-14  Daniel Jacobowitz  <drow@mvista.com>
13050
13051         * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
13052         stop_at -> stop_pc.
13053
13054 2002-05-04  Andrew Cagney  <ac131313@redhat.com>
13055
13056         * Makefile.in: Remove obsolete code.
13057
13058 2002-04-24  Michal Ludvig  <mludvig@suse.cz>
13059
13060         * linux-low.c (regsets_fetch_inferior_registers),
13061         (regsets_store_inferior_registers): Removed cast to int from
13062         ptrace() calls.
13063         * regcache.h: Added declaration of struct inferior_info.
13064
13065 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
13066
13067         * inferiors.c (struct inferior_info): Add regcache_data.
13068         (add_inferior): Call create_register_cache.
13069         (clear_inferiors): Call free_register_cache.
13070         (inferior_regcache_data, set_inferior_regcache_data): New functions.
13071         * regcache.c (struct inferior_regcache_data): New.
13072         (registers): Remove.
13073         (get_regcache): New function.
13074         (create_register_cache, free_register_cache): New functions.
13075         (set_register_cache): Don't initialize the register cache here.
13076         (registers_to_string, registers_from_string, register_data): Call
13077         get_regcache.
13078         * regcache.h: Add prototypes.
13079         * server.h: Likewise.
13080
13081 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
13082
13083         * mem-break.c: New file.
13084         * mem-break.h: New file.
13085         * Makefile.in: Add mem-break.o rule; update server.h
13086         dependencies.
13087         * inferiors.c (struct inferior_info): Add target_data
13088         member.
13089         (clear_inferiors): Free target_data member if set.
13090         (inferior_target_data, set_inferior_target_data): New functions.
13091         * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
13092         (i386_stop_pc, i386_set_pc): New.  Add to the_low_target.
13093         * linux-low.c (linux_bp_reinsert): New variable.
13094         (struct inferior_linux_data): New.
13095         (linux_create_inferior): Use set_inferior_target_data.
13096         (linux_attach): Likewise.  Call add_inferior.
13097         (linux_wait_for_one_inferior): New function.
13098         (linux_wait): Call it.
13099         (linux_write_memory): Add const.
13100         (initialize_low): Call set_breakpoint_data.
13101         * linux-low.h (struct linux_target_ops): Add breakpoint
13102         handling members.
13103         * server.c (attach_inferior): Remove extra add_inferior
13104         call.
13105         * server.h: Include mem-break.h.  Update inferior.c
13106         prototypes.
13107         * target.c (read_inferior_memory)
13108         (write_inferior_memory): New functions.
13109         * target.h (read_inferior_memory)
13110         (write_inferior_memory): Change macros to prototypes.
13111         (struct target_ops): Update comments.  Add const to write_memory
13112         definition.
13113
13114 2002-04-11  Daniel Jacobowitz  <drow@mvista.com>
13115
13116         * linux-low.c (usr_store_inferior_registers): Support
13117         registers which are allowed to fail to store.
13118         * linux-low.h (linux_target_ops): Likewise.
13119         * linux-ppc-low.c (ppc_regmap): Support FPSCR.
13120         (ppc_cannot_store_register): FPSCR may not be storable.
13121
13122 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13123
13124         * server.h: Include <string.h> if HAVE_STRING_H.
13125         * ChangeLog: Correct paths in last ChangeLog entry.
13126
13127 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13128
13129         * linux-low.h: Remove obsolete prototypes.
13130         (struct linux_target_ops): New.
13131         (extern the_low_target): New.
13132         * linux-low.c (num_regs, regmap): Remove declarations.
13133         (register_addr): Use the_low_target explicitly.
13134         (fetch_register): Likewise.
13135         (usr_fetch_inferior_registers): Likewise.
13136         (usr_store_inferior_registers): Likewise.
13137         * linux-arm-low.c (num_regs): Remove.
13138         (arm_num_regs): Define.
13139         (arm_regmap): Renamed from regmap, made static.
13140         (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
13141         made static.
13142         (arm_cannot_store_register): Renamed from cannot_store_register,
13143         made static.
13144         (the_low_target): New.
13145         * linux-i386-low.c (num_regs): Remove.
13146         (i386_num_regs): Define.
13147         (i386_regmap): Renamed from regmap, made static.
13148         (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
13149         made static.
13150         (i386_cannot_store_register): Renamed from cannot_store_register,
13151         made static.
13152         (the_low_target): New.
13153         * linux-ia64-low.c (num_regs): Remove.
13154         (ia64_num_regs): Define.
13155         (ia64_regmap): Renamed from regmap, made static.
13156         (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
13157         made static.
13158         (ia64_cannot_store_register): Renamed from cannot_store_register,
13159         made static.
13160         (the_low_target): New.
13161         * linux-m68k-low.c (num_regs): Remove.
13162         (m68k_num_regs): Define.
13163         (m68k_regmap): Renamed from regmap, made static.
13164         (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
13165         made static.
13166         (m68k_cannot_store_register): Renamed from cannot_store_register,
13167         made static.
13168         (the_low_target): New.
13169         * linux-mips-low.c (num_regs): Remove.
13170         (mips_num_regs): Define.
13171         (mips_regmap): Renamed from regmap, made static.
13172         (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
13173         made static.
13174         (mips_cannot_store_register): Renamed from cannot_store_register,
13175         made static.
13176         (the_low_target): New.
13177         * linux-ppc-low.c (num_regs): Remove.
13178         (ppc_num_regs): Define.
13179         (ppc_regmap): Renamed from regmap, made static.
13180         (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
13181         made static.
13182         (ppc_cannot_store_register): Renamed from cannot_store_register,
13183         made static.
13184         (the_low_target): New.
13185         * linux-s390-low.c (num_regs): Remove.
13186         (s390_num_regs): Define.
13187         (s390_regmap): Renamed from regmap, made static.
13188         (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
13189         made static.
13190         (s390_cannot_store_register): Renamed from cannot_store_register,
13191         made static.
13192         (the_low_target): New.
13193         * linux-sh-low.c (num_regs): Remove.
13194         (sh_num_regs): Define.
13195         (sh_regmap): Renamed from regmap, made static.
13196         (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
13197         made static.
13198         (sh_cannot_store_register): Renamed from cannot_store_register,
13199         made static.
13200         (the_low_target): New.
13201         * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
13202         (the_low_target): New.
13203
13204 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13205
13206         * Makefile.in: Add stamp-h target.
13207         * configure.in: Create stamp-h.
13208         * configure: Regenerated.
13209
13210 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13211
13212         * inferiors.c: New file.
13213         * target.c: New file.
13214         * target.h: New file.
13215         * Makefile.in:  Add target.o and inferiors.o.  Update
13216         dependencies.
13217         * linux-low.c (inferior_pid): New static variable,
13218         moved from server.c.
13219         (linux_create_inferior): Renamed from create_inferior.
13220         Call add_inferior.  Return 0 on success instead of a PID.
13221         (linux_attach): Renamed from myattach.
13222         (linux_kill): Renamed from kill_inferior.  Call clear_inferiors ().
13223         (linux_thread_alive): Renamed from mythread_alive.
13224         (linux_wait): Renamed from mywait.  Call clear_inferiors () if the
13225         child dies.
13226         (linux_resume): Renamed from myresume.  Add missing ``return 0''.
13227         (regsets_store_inferior_registers): Correct error message.
13228         Add missing ``return 0''.
13229         (linux_fetch_registers): Renamed from fetch_inferior_registers.
13230         (linux_store_registers): Renamed from store_inferior_registers.
13231         (linux_read_memory): Renamed from read_inferior_memory.
13232         (linux_write_memory): Renamed from write_inferior_memory.
13233         (linux_target_ops): New structure.
13234         (initialize_low): Call set_target_ops ().
13235         * remote-utils.c (unhexify): New function.
13236         (hexify): New function.
13237         (input_interrupt): Send signals to ``signal_pid''.
13238         * server.c (inferior_pid): Remove.
13239         (start_inferior): Update create_inferior call.
13240         (attach_inferior): Call add_inferior.
13241         (handle_query): New function.
13242         (main): Call handle_query for `q' packets.
13243         * server.h: Include "target.h".  Remove obsolete prototypes.
13244         Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
13245
13246 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13247
13248         * Makefile.in: Add WARN_CFLAGS.  Update configury
13249         dependencies.
13250         * configure.in: Check for <string.h>
13251         * configure: Regenerate.
13252         * config.in: Regenerate.
13253         * gdbreplay.c: Include needed system headers.
13254         (remote_open): Remove strchr prototype.
13255         * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
13256         * regcache.c (supply_register): Change buf argument to const void *.
13257         (supply_register_by_name): Likewise.
13258         (collect_register): Change buf argument to void *.
13259         (collect_register_by_name): Likewise.
13260         * regcache.h: Add missing prototypes.
13261         * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
13262         * server.c (handle_query): New function.
13263         (attached): New static variable, moved out of main.
13264         (main): Quiet longjmp clobber warnings.
13265         * server.h: Add ATTR_NORETURN and ATTR_FORMAT.  Update prototypes.
13266         * utils.c (error): Remove NORETURN.
13267         (fatal): Likewise.