gdbserver: fix various warnings
[external/binutils.git] / gdb / gdbserver / ChangeLog
1 2016-01-12  Mike Frysinger  <vapier@gentoo.org>
2
3         * ax.c (is_goto_target): Mark static.
4         * linux-low.c (register_addr): Likewise.
5         (linux_fetch_registers, linux_store_registers): Likewise.
6         * mem-break.c (any_persistent_commands): Fix old prototype.
7         (add_commands_to_breakpoint): Mark static.
8         * regcache.c (find_register_by_name): Delete unused func.
9         * remote-utils.c (hex_or_minus_one): Mark static.
10         * server.c (monitor_show_help): Mark static.
11         (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
12         handle_v_requests): Likewise.
13
14 2016-01-12  Pedro Alves  <palves@redhat.com>
15
16         Remove use of the registered trademark symbol throughout.
17
18 2016-01-08  Yao Qi  <yao.qi@linaro.org>
19
20         * remote-utils.c (getpkt): If c is '\003', call target hook
21         request_interrupt.
22
23 2016-01-06  Yao Qi  <yao.qi@linaro.org>
24
25         * linux-aarch32-low.h (arm_abi_breakpoint): Move to
26         linux-aarch32-low.c.
27         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
28         (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
29         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
30         (thumb2_breakpoint): Declare.
31         * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
32         linux-aarch32-low.h.
33         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
34         (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
35         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
36
37 2016-01-01  Joel Brobecker  <brobecker@adacore.com>
38
39         * gdbreplay.c (gdbreplay_version): Change copyright year in
40         version message.
41         * server.c (gdbserver_version): Likewise.
42
43 2015-12-28  Patrick Palka  <patrick@parcs.ath.cx>
44
45         * server.c (crc32_table): Delete.
46         (crc32): Use libiberty's xcrc32 function.
47
48 2015-12-22  Joel Brobecker  <brobecker@adacore.com>
49
50         * lynx-low.c (lynx_delete_thread_callback): New function.
51         (lynx_mourn): Properly delete our process and all of its
52         threads.  Remove call to clear_inferiors.
53
54 2015-12-22  Joel Brobecker  <brobecker@adacore.com>
55
56         * target.c (thread_search_callback): Add check that
57         the thread_stopped target callback is not NULL before
58         calling it.
59
60 2015-12-21  Yao Qi  <yao.qi@linaro.org>
61
62         * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
63         arm breakpoint.
64
65 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
66
67         * server.c (handle_query): Call target_supports_software_single_step.
68
69 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
70
71         * linux-low.c (single_step): New function.
72         (linux_resume_one_lwp_throw): Call single_step.
73         (start_step_over): Likewise.
74
75 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
76
77         * Makefile.in (SFILES): Append arch/arm-linux.c,
78         arch/arm-get-next-pcs.c.
79         (arm-linux.o): New rule.
80         (arm-get-next-pcs.o): New rule.
81         * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
82         arm-linux.o.
83         * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro.  Moved
84         to linux-aarch32-low.c.
85         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
86         (arm_breakpoint_len, thumb_breakpoint): Likewise.
87         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
88         (thumb2_breakpoint_len): Likewise.
89         (arm_is_thumb_mode): Make non-static.
90         * linux-aarch32-low.h (arm_abi_breakpoint): New macro.  Moved
91         from linux-aarch32-low.c.
92         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
93         (arm_breakpoint_len, thumb_breakpoint): Likewise.
94         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
95         (thumb2_breakpoint_len): Likewise.
96         (arm_is_thumb_mode): New declaration.
97         * linux-arm-low.c: Include arch/arm-linux.h
98         aarch/arm-get-next-pcs.h, sys/syscall.h.
99         (get_next_pcs_ops): New struct.
100         (get_next_pcs_addr_bits_remove): New function.
101         (get_next_pcs_is_thumb): New function.
102         (get_next_pcs_read_memory_unsigned_integer): Likewise.
103         (arm_sigreturn_next_pc): Likewise.
104         (get_next_pcs_syscall_next_pc): Likewise.
105         (arm_gdbserver_get_next_pcs): Likewise.
106         (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
107         Initialize.
108         * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
109         * server.h: Include gdb_vecs.h.
110
111 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
112
113         * Makefile.in (SFILES): Append common/common-regcache.c.
114         (OBS): Append common-regcache.o.
115         (common-regcache.o): New rule.
116         * regcache.c (init_register_cache): Initialize cache to
117         REG_UNAVAILABLE.
118         (regcache_raw_read_unsigned): New function.
119         * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
120         register_status enum.
121
122 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
123
124         * linux-aarch64-low.c (the_low_targets): Rename
125         breakpoint_reinsert_addr to get_next_pcs.
126         * linux-arm-low.c (the_low_targets): Likewise.
127         * linux-bfin-low.c (the_low_targets): Likewise.
128         * linux-cris-low.c (the_low_targets): Likewise.
129         * linux-crisv32-low.c (the_low_targets): Likewise.
130         * linux-low.c (can_software_single_step): Likewise.
131         (install_software_single_step_breakpoints): New function.
132         (start_step_over): Use install_software_single_step_breakpoints.
133         * linux-low.h: New CORE_ADDR vector.
134         (struct linux_target_ops) Rename breakpoint_reinsert_addr to
135         get_next_pcs.
136         * linux-mips-low.c (the_low_targets): Likewise.
137         * linux-nios2-low.c (the_low_targets): Likewise.
138         * linux-sparc-low.c (the_low_targets): Likewise.
139
140 2015-12-17  Pedro Alves  <palves@redhat.com>
141
142         * linux-low.c (linux_kill_one_lwp): Remove references to
143         LinuxThreads.
144         (kill_lwp): Remove HAVE_TKILL_SYSCALL check.  No longer fall back
145         to 'kill'.
146         (linux_init_signals): Delete.
147         (initialize_low): Adjust.
148         * thread-db.c (thread_db_init): Remove LinuxThreads reference.
149
150 2015-12-16  Pedro Alves  <palves@redhat.com>
151
152         * configure.ac (compiler warning flags): When testing a
153         -Wno-foo option, check whether -Wfoo works instead.
154         * configure: Regenerate.
155
156 2015-12-11  Don Breazeal  <donb@codesourcery.com>
157
158         * server.c (process_serial_event): Don't exit from gdbserver
159         in remote mode if there are still active inferiors.
160
161 2015-12-11  Yao Qi  <yao.qi@linaro.org>
162
163         * linux-aarch64-low.c (aarch64_breakpoint_at): Call
164         arm_breakpoint_at if the process is 32-bit.
165
166 2015-12-11  Yao Qi  <yao.qi@linaro.org>
167
168         * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
169         arm breakpoint.
170
171 2015-12-07  Yao Qi  <yao.qi@linaro.org>
172
173         * configure.srv: Append arm.o to srv_tgtobj for
174         aarch64*-*-linux* target.
175         * linux-aarch32-low.c (arm_abi_breakpoint): New macro.  Moved
176         from linux-arm-low.c.
177         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
178         (arm_breakpoint_len, thumb_breakpoint): Likewise.
179         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
180         (thumb2_breakpoint_len): Likewise.
181         (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
182         (arm_breakpoint_kinds): Likewise.
183         (arm_breakpoint_kind_from_pc): Likewise.
184         (arm_sw_breakpoint_from_kind): Likewise.
185         (arm_breakpoint_kind_from_current_state): Likewise.
186         * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
187         (arm_sw_breakpoint_from_kind): Declare.
188         (arm_breakpoint_kind_from_current_state): Declare.
189         (arm_breakpoint_at): Declare.
190         * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
191         arm_sw_breakpoint_from_kind if process is 32-bit.
192         (aarch64_breakpoint_kind_from_pc): New function.
193         (aarch64_breakpoint_kind_from_current_state): New function.
194         (the_low_target): Initialize fields breakpoint_kind_from_pc
195         and breakpoint_kind_from_current_state.
196         * linux-arm-low.c (arm_breakpoint_kinds): Move to
197         linux-aarch32-low.c.
198         (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
199         (arm_breakpoint, arm_breakpoint_len): Likewise.
200         (thumb_breakpoint, thumb_breakpoint_len): Likewise.
201         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
202         (arm_is_thumb_mode): Likewise.
203         (arm_breakpoint_at): Likewise.
204         (arm_breakpoint_kind_from_pc): Likewise.
205         (arm_sw_breakpoint_from_kind): Likewise.
206         (arm_breakpoint_kind_from_current_state): Likewise.
207
208         Revert:
209         2015-08-04  Yao Qi  <yao.qi@linaro.org>
210
211         * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
212         0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
213         * server.c (extended_protocol): Remove "static".
214         * server.h (extended_protocol): Declare it.
215
216 2015-12-04  Josh Stone  <jistone@redhat.com>
217
218         * target.h (struct target_ops) <arch_setup>: Rename to ...
219         (struct target_ops) <post_create_inferior>: ... this.
220         (target_arch_setup): Rename to ...
221         (target_post_create_inferior): ... this, calling post_create_inferior.
222         * server.c (start_inferior): Update target_arch_setup calls to
223         target_post_create_inferior.
224         * linux-low.c (linux_low_ptrace_options): Forward declare.
225         (linux_arch_setup): Update its comment for general use.
226         (linux_post_create_inferior): New, run arch_setup and setup ptrace.
227         (struct linux_target_ops): Use linux_post_create_inferior.
228         * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
229         to post_create_inferior.
230         * nto-low.c (struct nto_target_ops): Likewise.
231         * spu-low.c (struct spu_target_ops): Likewise.
232         * win32-low.c (struct win32_target_ops): Likewise.
233
234 2015-12-03  Antoine Tremblay  <antoine.tremblay@ericsson.com>
235
236         * linux-arm-low.c: Remove duplicate arch/arm.h include.
237
238 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
239
240         * linux-arm-low.c (arm_reinsert_addr): Remove function.
241         (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
242         * linux-cris-low.c (cris_reinsert_addr> Remove function.
243         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
244         * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
245         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
246         * linux-mips-low.c (mips_reinsert_addr): Remove function.
247         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
248         * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
249         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
250         * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
251         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
252
253 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
254
255         * linux-low.c (linux_look_up_symbols): Don't call
256         linux_supports_traceclone.
257         * linux-low.h (thread_db_init): Remove use_events argument.
258         * thread-db.c (thread_db_use_event): Remove global variable.
259         (struct thread_db) <td_thr_event_enable_p>: Remove field.
260         (struct thread_db) <td_create_bp>: Remove field.
261         (thread_db_create_event): Remove function.
262         (thread_db_enable_reporting): Likewise.
263         (find_one_thread): Don't check for thread_db_use_events.
264         (attach_thread): Likewise.
265         (thread_db_load_search): Remove td_thr_event_enable_p initialization.
266         (try_thread_db_load_1): Don't check for thread_db_use_events.
267         (thread_db_init): Remove use_events argument and thread events
268         handling.
269         (remove_thread_event_breakpoints): Remove function.
270         (thread_db_detach): Remove call to remove_thred_event_breakpoints.
271
272 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
273
274         * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
275         New function.
276         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
277         * linux-arm-low.c (arm_supports_hardware_single_step): New function.
278         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
279         * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
280         (struct linux_target_ops) <bfin_supports_hardware_single_step>:
281         Initialize.
282         * linux-crisv32-low.c (cris_supports_hardware_single_step):
283         New function.
284         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
285         * linux-low.c (can_hardware_single_step): Use
286         supports_hardware_single_step.
287         (can_software_single_step): New function.
288         (start_step_over): Call can_software_single_step.
289         (linux_supports_hardware_single_step): New function.
290         (struct target_ops) <supports_software_single_step>: Initialize.
291         * linux-low.h (struct linux_target_ops)
292         <supports_hardware_single_step>: Initialize.
293         * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
294         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
295         * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
296         (struct linux_target_ops) <supports_hardware_single_step> Initialize.
297         * linux-s390-low.c (s390_supports_hardware_single_step): New function.
298         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
299         * linux-sh-low.c (sh_supports_hardware_single_step): New function.
300         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
301         * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
302         (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
303         Initialize.
304         * linux-tile-low.c (tile_supports_hardware_single_step): New function.
305         (struct linux_target_ops) <tile_supports_hardware_single_step>:
306         Initialize.
307         * linux-x86-low.c (x86_supports_hardware_single_step) New function.
308         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
309         * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
310         New function.
311         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
312         * target.h (struct target_ops): <supports_software_single_step>:
313         New field.
314         (target_supports_software_single_step): New macro.
315
316 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
317
318         * linux-low.c (linux_wait_1): Fix pc advance condition.
319         * mem-break.c (reinsert_breakpoint_inserted_here): New function.
320         * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
321
322 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
323
324         * linux-arm-low.c (arm_is_thumb_mode): New function.
325         (arm_breakpoint_at): Use arm_is_thumb_mode.
326         (arm_breakpoint_kind_from_current_state): New function.
327         (struct linux_target_ops) <breakpoint_kind_from_current_state>:
328         Initialize.
329         * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
330         (linux_breakpoint_kind_from_current_state): New function.
331         (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
332         * linux-low.h (struct linux_target_ops)
333         <breakpoint_kind_from_current_state>: New field.
334         * target.h (struct target_ops): Likewise.
335         (target_breakpoint_kind_from_current_state): New macro.
336
337 2015-11-30  Pedro Alves  <palves@redhat.com>
338
339         * linux-low.c (linux_resume): Wake up the event loop before
340         returning.
341
342 2015-11-30  Pedro Alves  <palves@redhat.com>
343
344         * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
345         check.
346         (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
347         to -1.
348         * target.c (struct thread_search): New structure.
349         (thread_search_callback): New function.
350         (prev_general_thread): New global.
351         (prepare_to_access_memory, done_accessing_memory): New functions.
352         * target.h (prepare_to_access_memory, done_accessing_memory):
353         Replace macros with function declarations.
354
355 2015-11-30  Pedro Alves  <palves@redhat.com>
356
357         PR 14618
358         * linux-low.c (linux_wait_1): If the last resumed thread is gone,
359         report TARGET_WAITKIND_NO_RESUMED.
360         * remote-utils.c (prepare_resume_reply): Handle
361         TARGET_WAITKIND_NO_RESUMED.
362         * server.c (report_no_resumed): New global.
363         (handle_query) <qSupported>: Handle "no-resumed+".  Report
364         "no-resumed+" support.
365         (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
366         return error if the client doesn't support no-resumed events.
367         (push_stop_notification): New function.
368         (handle_target_event): Use it.  Report TARGET_WAITKIND_NO_RESUMED
369         events if the client supports them.
370
371 2015-11-30  Pedro Alves  <palves@redhat.com>
372
373         * linux-low.c (thread_still_has_status_pending_p): Don't check
374         vCont;t here.
375         (lwp_resumed): New function.
376         (status_pending_p_callback): Return early if the LWP is not
377         supposed to be resumed.
378
379 2015-11-30  Pedro Alves  <palves@redhat.com>
380
381         * linux-low.c (handle_extended_wait): Assert that the LWP's
382         waitstatus is TARGET_WAITKIND_IGNORE.  If GDB wants to hear about
383         thread create events, leave the new child's status pending.
384         (linux_low_filter_event): If GDB wants to hear about thread exit
385         events, leave the LWP marked dead and don't delete it.
386         (linux_wait_for_event_filtered): Don't check for thread exit.
387         (filter_exit_event): New function.
388         (linux_wait_1): Use it, when returning an exit event.
389         (linux_resume_one_lwp_throw): Assert that the LWP's
390         waitstatus is TARGET_WAITKIND_IGNORE.
391         * remote-utils.c (prepare_resume_reply): Handle
392         TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
393         * server.c (report_thread_events): New global.
394         (handle_general_set): Handle QThreadEvents.
395         (handle_query) <qSupported>: Handle and report QThreadEvents+;
396         (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
397         TARGET_WAITKIND_THREAD_EXITED.
398         * server.h (report_thread_events): Declare.
399
400 2015-11-30  Pedro Alves  <palves@redhat.com>
401
402         * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
403         the thread's last_resume_kind was resume_stop.
404
405 2015-11-30  Pedro Alves  <palves@redhat.com>
406
407         * linux-low.c (linux_attach): In non-stop mode, wait for one stop
408         before returning.
409
410 2015-11-30  Pedro Alves  <palves@redhat.com>
411
412         * server.c (handle_v_requests): Handle vCtrlC.
413
414 2015-11-30  Pedro Alves  <palves@redhat.com>
415
416         * gdbthread.h (find_any_thread_of_pid): Declare.
417         * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
418         functions.
419         * server.c (handle_query): If current_thread is NULL, look for
420         another thread of the selected process.
421
422 2015-11-26  Daniel Colascione  <dancol@dancol.org>
423             Simon Marchi  <simon.marchi@ericsson.com>
424
425         * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
426         * server.c (handle_qxfer_threads_worker): Refactor to include thread
427         name in reply.
428         * target.h (struct target_ops) <thread_name>: New field.
429         (target_thread_name): New macro.
430
431 2015-11-23  Joel Brobecker  <brobecker@adacore.com>
432
433         * regcache.h (regcache_invalidate_pid): Add declaration.
434         * regcache.c (regcache_invalidate_pid): New function, extracted
435         from regcache_invalidate.
436         (regcache_invalidate): Reimplement using regcache_invalidate_pid.
437         Add trivial documentation comment.
438         * lynx-low.c: Use regcache_invalidate_pid instead of
439         regcache_invalidate.
440
441 2015-11-23  Joel Brobecker  <brobecker@adacore.com>
442
443         * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
444         and Elf64_auxv_t if the target is Android.
445
446 2015-11-22  Doug Evans  <xdje42@gmail.com>
447
448         * target.h: #include <sys/types.h>.
449
450 2015-11-19  Pedro Alves  <palves@redhat.com>
451
452         * linux-low.c (linux_process_qsupported): Change prototype.
453         Adjust.
454         * linux-low.h (struct linux_target_ops) <process_qsupported>:
455         Change prototype.
456         * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
457         and adjust to loop over all features.
458         * server.c (handle_query) <qSupported>: Adjust to call
459         target_process_qsupported once, passing it a vector of unprocessed
460         features.
461         * target.h (struct target_ops) <process_qsupported>: Change
462         prototype.
463         (target_process_qsupported): Adjust.
464
465 2015-11-19  Pedro Alves  <palves@redhat.com>
466
467         * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
468         mode.
469         * configure: Regenerate.
470
471 2015-11-19  Pedro Alves  <palves@redhat.com>
472
473         * configure: Regenerate.
474
475 2015-11-19  Yao Qi  <yao.qi@linaro.org>
476
477         * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
478         type to uint32_t.
479
480 2015-11-19  Yao Qi  <yao.qi@linaro.org>
481
482         * linux-aarch64-low.c (enum aarch64_operand_type): New.
483         (struct aarch64_operand): Move enum out.
484
485 2015-11-19  Yao Qi  <yao.qi@linaro.org>
486
487         * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
488         struct user_fpsimd_state *.
489         (aarch64_store_fpregset): Likewise.
490
491 2015-11-19  Yao Qi  <yao.qi@linaro.org>
492
493         * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
494         struct user_pt_regs *.
495         (aarch64_store_gregset): Likewise.
496
497 2015-11-18  Pedro Alves  <palves@redhat.com>
498
499         * Makefile.in (all_object_files): Add $IPA_OBJS.
500
501 2015-11-17  Pedro Alves  <palves@redhat.com>
502
503         * win32-low.c (win32_resume): Use gdb_signal_from_host,
504         GDB_SIGNAL_0 and gdb_signal_to_string.
505
506 2015-11-17  Pedro Alves  <palves@redhat.com>
507
508         * win32-low.c (handle_output_debug_string): Remove parameter.
509         (win32_kill): Remove our_status local and adjust call to
510         handle_output_debug_string.
511         (get_child_debug_event): Adjust call to
512         handle_output_debug_string.
513
514 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
515
516         * linux-mips-low.c (mips_fill_gregset): Add cast.
517         (mips_store_gregset): Likewise.
518         (mips_fill_fpregset): Likewise.
519         (mips_store_fpregset): Likewise.
520
521 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
522
523         * linux-mips-low.c (mips_add_watchpoint): Rename private to
524         priv.
525
526 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
527
528         * linux-mips-low.c (mips_linux_new_thread): Change type of
529         watch_type to enum target_hw_bp_type.
530
531 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
532
533                 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
534                 Change return type to arm_hwbp_type.
535
536 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
537
538         * linux-aarch32-low.c (arm_fill_gregset): Add cast.
539         (arm_store_gregset): Likewise.
540         * linux-arm-low.c (arm_get_hwcap): Likewise.
541         (arm_read_description): Likewise.
542
543 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
544
545         * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
546
547 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
548
549         * linux-ppc-low.c (ppc_get_hwcap): Add cast.
550         (ppc_fill_vsxregset): Likewise.
551         (ppc_store_vsxregset): Likewise.
552         (ppc_fill_vrregset): Likewise.
553         (ppc_store_vrregset): Likewise.
554         (ppc_fill_evrregset): Likewise.
555         (ppc_store_evrregset): Likewise.
556
557 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
558
559         * linux-ppc-low.c (ppc_usrregs_info): Remove
560         forward-declaration.
561         (ppc_arch_setup): Move lower in file.
562
563 2015-10-30  Simon Marchi  <simon.marchi@ericsson.com>
564
565         * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
566         (ps_pdwrite): Likewise.
567
568 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
569
570         * linux-arm-low.c (arm_new_thread): Move pointer dereference
571         to after assert checks.
572
573 2015-10-29  Simon Marchi  <simon.marchi@ericsson.com>
574
575         * proc-service.c (ps_pdread): Add/adjust casts.
576         (ps_pdwrite): Add/adjust casts.
577
578 2015-10-29  Simon Marchi  <simon.marchi@polymtl.ca>
579
580         * server.c (handle_search_memory_1): Cast return value of
581         memmem.
582
583 2015-10-29  Simon Marchi  <simon.marchi@polymtl.ca>
584
585         * server.c (write_qxfer_response): Change type of data to
586         gdb_byte *.
587
588 2015-10-29  Pedro Alves  <palves@redhat.com>
589
590         * mem-break.c (Z_packet_to_bkpt_type): Add cast.
591
592 2015-10-29  Pedro Alves  <palves@redhat.com>
593
594         * tracepoint.c (clear_installed_tracepoints): Add casts.
595
596 2015-10-29  Pedro Alves  <palves@redhat.com>
597
598         * server.c (handle_v_cont, process_serial_event): Add enum
599         gdb_signal casts to signal parsing code.
600
601 2015-10-29  Pedro Alves  <palves@redhat.com>
602
603         * linux-low.h (NULL_REGSET): Define.
604         * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
605         * linux-arm-low.c (arm_regsets): Likewise.
606         * linux-crisv32-low.c (cris_regsets): Likewise.
607         * linux-m68k-low.c (m68k_regsets): Likewise.
608         * linux-mips-low.c (mips_regsets): Likewise.
609         * linux-nios2-low.c (nios2_regsets): Likewise.
610         * linux-ppc-low.c (ppc_regsets): Likewise.
611         * linux-s390-low.c (s390_regsets): Likewise.
612         * linux-sh-low.c (sh_regsets): Likewise.
613         * linux-sparc-low.c (sparc_regsets): Likewise.
614         * linux-tic6x-low.c (tic6x_regsets): Likewise.
615         * linux-tile-low.c (tile_regsets): Likewise.
616         * linux-x86-low.c (x86_regsets): Likewise.
617         * linux-xtensa-low.c (xtensa_regsets): Likewise.
618
619 2015-10-29  Pedro Alves  <palves@redhat.com>
620
621         * linux-low.h (NULL_REGSET): Define.
622         * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
623         * linux-arm-low.c (arm_regsets): Likewise.
624         * linux-crisv32-low.c (cris_regsets): Likewise.
625         * linux-m68k-low.c (m68k_regsets): Likewise.
626         * linux-mips-low.c (mips_regsets): Likewise.
627         * linux-nios2-low.c (nios2_regsets): Likewise.
628         * linux-ppc-low.c (ppc_regsets): Likewise.
629         * linux-s390-low.c (s390_regsets): Likewise.
630         * linux-sh-low.c (sh_regsets): Likewise.
631         * linux-sparc-low.c (sparc_regsets): Likewise.
632         * linux-tic6x-low.c (tic6x_regsets): Likewise.
633         * linux-tile-low.c (tile_regsets): Likewise.
634         * linux-x86-low.c (x86_regsets): Likewise.
635         * linux-xtensa-low.c (xtensa_regsets): Likewise.
636
637 2015-10-26  Doug Evans  <dje@google.com>
638
639         * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
640
641 2015-10-26  Doug Evans  <dje@google.com>
642
643         * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
644
645 2015-10-26  Doug Evans  <dje@google.com>
646
647         * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
648         for debug_printf.
649         (attach_thread, find_new_threads_callback): Ditto.
650
651 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
652
653         * mem-break.h (set_breakpoint_data): Remove.
654
655 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
656
657         * nto-low.c (nto_sw_breakpoint_from_kind): New function.
658         (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
659         (initialize_low): Remove set_breakpoint_data call.
660         * spu-low.c (spu_sw_breakpoint_from_kind): New function.
661         (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
662         (initialize_low): Remove set_breakpoint_data call.
663         * win32-low.c (win32_sw_breakpoint_from_kind): New function.
664         (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
665         (initialize_low): Remove set_breakpoint_data call.
666
667 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
668
669         * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
670         * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
671         * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
672         * target.h (target_breakpoint_kind_from_pc): New macro.
673
674 2015-10-22  Antoine Tremblay  <antoine.tremblay@ericsson.com>
675
676         * linux-low.c (default_breakpoint_kind_from_pc): New function.
677         (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
678         the default breakpoint kind.
679
680 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
681
682         * linux-arm-low.c (arm_supports_z_point_type): Add software
683         breakpoint support.
684
685 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
686
687         * linux-arm-low.c: Refactor breakpoint definitions.
688         (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
689         (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
690
691 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
692
693         * Makefile.in: Add arm.c/o.
694         * configure.srv: Likewise.
695         * linux-arm-low.c (arm_breakpoint_kinds): New enum.
696         (arm_breakpoint_kind_from_pc): New function.
697         (arm_sw_breakpoint_from_kind): Return proper kind.
698         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
699
700 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
701
702         * linux-low.c (initialize_low): Ajdust for breakpoint global variables
703         removal.
704         * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
705         (struct raw_breakpoint) <size>: Remove.
706         (struct raw_breakpoint) <kind>: Add.
707         (bp_size): New function.
708         (bp_opcode): Likewise.
709         (find_raw_breakpoint_at): Adjust for kind.
710         (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
711         (remove_memory_breakpoint): Adjust for kind call bp_size.
712         (set_raw_breakpoint_at): Adjust for kind.
713         (set_breakpoint): Likewise.
714         (set_breakpoint_at): Call breakpoint_kind_from_pc.
715         (delete_raw_breakpoint): Adjust for kind.
716         (delete_breakpoint): Likewise.
717         (find_gdb_breakpoint): Likewise.
718         (set_gdb_breakpoint_1): Likewise.
719         (set_gdb_breakpoint): Likewise.
720         (delete_gdb_breakpoint_1): Likewise.
721         (delete_gdb_breakpoint): Likewise.
722         (uninsert_raw_breakpoint): Likewise.
723         (reinsert_raw_breakpoint): Likewise.
724         (set_breakpoint_data): Remove.
725         (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
726         (check_mem_read): Adjust for kind call bp_size.
727         (check_mem_write): Adjust for kind call bp_size,bp_opcode.
728         (clone_one_breakpoint): Adjust for kind.
729         * mem-break.h (set_gdb_breakpoint): Likewise.
730         (delete_gdb_breakpoint): Likewise.
731         * server.c (process_serial_event): Likewise.
732
733 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
734
735         * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
736         (struct linux_target_ops) <breakpoint>: Remove.
737         (struct linux_target_ops) <breakpoint_len>: Remove.
738         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
739         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
740         * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
741         (arm_sw_breakpoint_from_kind): New function.
742         * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
743         (struct linux_target_ops) <breakpoint>: Remove.
744         (struct linux_target_ops) <breakpoint_len>: Remove.
745         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
746         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
747         * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
748         (struct linux_target_ops) <breakpoint>: Remove.
749         (struct linux_target_ops) <breakpoint_len>: Remove.
750         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
751         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
752         * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
753         (struct linux_target_ops) <breakpoint>: Remove.
754         (struct linux_target_ops) <breakpoint_len>: Remove.
755         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
756         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
757         * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
758         and sw_breakpoint_from_kind to increment the pc.
759         (linux_breakpoint_kind_from_pc): New function.
760         (linux_sw_breakpoint_from_kind): New function.
761         (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
762         (initialize_low): Call breakpoint_kind_from_pc and
763         sw_breakpoint_from_kind to replace breakpoint_data/len.
764         * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
765         New field.
766         (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
767         * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
768         (struct linux_target_ops) <breakpoint>: Remove.
769         (struct linux_target_ops) <breakpoint_len>: Remove.
770         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
771         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
772         * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
773         (struct linux_target_ops) <breakpoint>: Remove.
774         (struct linux_target_ops) <breakpoint_len>: Remove.
775         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
776         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
777         * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
778         (struct linux_target_ops) <breakpoint>: Remove.
779         (struct linux_target_ops) <breakpoint_len>: Remove.
780         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
781         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
782         * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
783         (struct linux_target_ops) <breakpoint>: Remove.
784         (struct linux_target_ops) <breakpoint_len>: Remove.
785         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
786         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
787         * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
788         (struct linux_target_ops) <breakpoint>: Remove.
789         (struct linux_target_ops) <breakpoint_len>: Remove.
790         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
791         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
792         * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
793         (struct linux_target_ops) <breakpoint>: Remove.
794         (struct linux_target_ops) <breakpoint_len>: Remove.
795         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
796         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
797         * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
798         (struct linux_target_ops) <breakpoint>: Remove.
799         (struct linux_target_ops) <breakpoint_len>: Remove.
800         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
801         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
802         * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
803         (struct linux_target_ops) <breakpoint>: Remove.
804         (struct linux_target_ops) <breakpoint_len>: Remove.
805         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
806         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
807         * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
808         (struct linux_target_ops) <breakpoint>: Remove.
809         (struct linux_target_ops) <breakpoint_len>: Remove.
810         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
811         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
812         * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
813         * linux-x86-low.c (x86_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-xtensa-low.c (xtensa_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
824 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
825
826         * linux-cris-low.c (cris_get_pc): Remove void arg.
827
828 2015-10-16  Aleksandar Ristovski  <aristovski@qnx.com>
829
830         * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
831         variable name.
832
833 2015-10-16  Aleksandar Ristovski  <aristovski@qnx.com>
834
835         * inferiors.c (thread_pid_matches_callback): New function.
836         (find_thread_process): New function.
837         (remove_thread): Reset current_thread.
838         (remove_process): Assert threads have been removed first.
839
840 2015-10-15  Yao Qi  <yao.qi@linaro.org>
841
842         * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
843         if it is 3.
844         (aarch64_remove_point): Likewise.
845         * regcache.c (regcache_register_size): New function.
846
847 2015-10-12  Yao Qi  <yao.qi@linaro.org>
848
849         * linux-aarch64-low.c: Update all callers as emit_load_store
850         is renamed to aarch64_emit_load_store.
851
852 2015-10-12  Yao Qi  <yao.qi@linaro.org>
853
854         * linux-aarch64-low.c: Update all callers of function renaming
855         from emit_insn to aarch64_emit_insn.
856
857 2015-10-12  Yao Qi  <yao.qi@linaro.org>
858
859         * linux-aarch64-low.c (enum aarch64_opcodes): Move to
860         arch/aarch64-insn.h.
861         (struct aarch64_memory_operand): Likewise.
862         (ENCODE): Likewise.
863         (emit_insn): Move to arch/aarch64-insn.c.
864         (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
865         (emit_load_store): Move to arch/aarch64-insn.c.
866         (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
867         (can_encode_int32): Remove.
868
869 2015-10-12  Yao Qi  <yao.qi@linaro.org>
870
871         * linux-aarch64-low.c (extract_signed_bitfield): Remove.
872         (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
873         (aarch64_relocate_instruction): Likewise.
874         (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
875         (struct aarch64_insn_visitor): Likewise.
876
877 2015-10-12  Yao Qi  <yao.qi@linaro.org>
878
879         * linux-aarch64-low.c (struct aarch64_insn_data): New.
880         (struct aarch64_insn_visitor): New.
881         (struct aarch64_insn_relocation_data): New.
882         (aarch64_ftrace_insn_reloc_b): New function.
883         (aarch64_ftrace_insn_reloc_b_cond): Likewise.
884         (aarch64_ftrace_insn_reloc_cb): Likewise.
885         (aarch64_ftrace_insn_reloc_tb): Likewise.
886         (aarch64_ftrace_insn_reloc_adr): Likewise.
887         (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
888         (aarch64_ftrace_insn_reloc_others): Likewise.
889         (visitor): New.
890         (aarch64_relocate_instruction): Use visitor.
891
892 2015-10-12  Yao Qi  <yao.qi@linaro.org>
893
894         * linux-aarch64-low.c (aarch64_relocate_instruction): Return
895         int.  Add argument buf.
896         (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
897         aarch64_relocate_instruction.
898
899 2015-10-12  Yao Qi  <yao.qi@linaro.org>
900
901         * linux-aarch64-low.c (aarch64_relocate_instruction): Add
902         argument insn.  Remove local variable insn.  Don't call
903         target_read_uint32.
904         (aarch64_install_fast_tracepoint_jump_pad): Call
905         target_read_uint32.
906
907 2015-09-30  Yao Qi  <yao.qi@linaro.org>
908
909         * linux-aarch64-low.c (emit_movk): Shorten a long line.
910         (emit_load_store_pair): Likewise.
911
912 2015-09-25  Simon Marchi  <simon.marchi@ericsson.com>
913
914         * dll.c (match_dll): Add cast(s).
915         (unloaded_dll): Likewise.
916         * linux-low.c (second_thread_of_pid_p): Likewise.
917         (delete_lwp_callback): Likewise.
918         (count_events_callback): Likewise.
919         (select_event_lwp_callback): Likewise.
920         (linux_set_resume_request): Likewise.
921         * server.c (accumulate_file_name_length): Likewise.
922         (emit_dll_description): Likewise.
923         (handle_qxfer_threads_worker): Likewise.
924         (visit_actioned_threads): Likewise.
925         * thread-db.c (any_thread_of): Likewise.
926         * tracepoint.c (same_process_p): Likewise.
927         (match_blocktype): Likewise.
928         (build_traceframe_info_xml): Likewise.
929
930 2015-09-25  Simon Marchi  <simon.marchi@ericsson.com>
931
932         * ax.c (gdb_parse_agent_expr): Add cast to allocation result
933         assignment.
934         (gdb_unparse_agent_expr): Likewise.
935         * hostio.c (require_data): Likewise.
936         (handle_pread): Likewise.
937         * linux-low.c (disable_regset): Likewise.
938         (fetch_register): Likewise.
939         (store_register): Likewise.
940         (get_dynamic): Likewise.
941         (linux_qxfer_libraries_svr4): Likewise.
942         * mem-break.c (delete_fast_tracepoint_jump): Likewise.
943         (set_fast_tracepoint_jump): Likewise.
944         (uninsert_fast_tracepoint_jumps_at): Likewise.
945         (reinsert_fast_tracepoint_jumps_at): Likewise.
946         (validate_inserted_breakpoint): Likewise.
947         (clone_agent_expr): Likewise.
948         * regcache.c (init_register_cache): Likewise.
949         * remote-utils.c (putpkt_binary_1): Likewise.
950         (decode_M_packet): Likewise.
951         (decode_X_packet): Likewise.
952         (look_up_one_symbol): Likewise.
953         (relocate_instruction): Likewise.
954         (monitor_output): Likewise.
955         * server.c (handle_search_memory): Likewise.
956         (handle_qxfer_exec_file): Likewise.
957         (handle_qxfer_libraries): Likewise.
958         (handle_qxfer): Likewise.
959         (handle_query): Likewise.
960         (handle_v_cont): Likewise.
961         (handle_v_run): Likewise.
962         (captured_main): Likewise.
963         * target.c (write_inferior_memory): Likewise.
964         * thread-db.c (try_thread_db_load_from_dir): Likewise.
965         * tracepoint.c (init_trace_buffer): Likewise.
966         (add_tracepoint_action): Likewise.
967         (add_traceframe): Likewise.
968         (add_traceframe_block): Likewise.
969         (cmd_qtdpsrc): Likewise.
970         (cmd_qtdv): Likewise.
971         (cmd_qtstatus): Likewise.
972         (response_source): Likewise.
973         (response_tsv): Likewise.
974         (cmd_qtnotes): Likewise.
975         (gdb_collect): Likewise.
976         (initialize_tracepoint): Likewise.
977
978 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
979
980         * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
981         (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
982         <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
983         <NOP>: New.
984         (enum aarch64_condition_codes): New enum.
985         (w0): New static global.
986         (fp): Likewise.
987         (lr): Likewise.
988         (struct aarch64_memory_operand) <type>: New
989         MEMORY_OPERAND_POSTINDEX type.
990         (postindex_memory_operand): New helper function.
991         (emit_ret): New function.
992         (emit_load_store_pair): New function, factored out of emit_stp
993         with support for MEMORY_OPERAND_POSTINDEX.
994         (emit_stp): Rewrite using emit_load_store_pair.
995         (emit_ldp): New function.
996         (emit_load_store): Likewise.
997         (emit_ldr): Mention post-index instruction in comment.
998         (emit_ldrh): New function.
999         (emit_ldrb): New function.
1000         (emit_ldrsw): Mention post-index instruction in comment.
1001         (emit_str): Likewise.
1002         (emit_subs): New function.
1003         (emit_cmp): Likewise.
1004         (emit_and): Likewise.
1005         (emit_orr): Likewise.
1006         (emit_orn): Likewise.
1007         (emit_eor): Likewise.
1008         (emit_mvn): Likewise.
1009         (emit_lslv): Likewise.
1010         (emit_lsrv): Likewise.
1011         (emit_asrv): Likewise.
1012         (emit_mul): Likewise.
1013         (emit_sbfm): Likewise.
1014         (emit_sbfx): Likewise.
1015         (emit_ubfm): Likewise.
1016         (emit_ubfx): Likewise.
1017         (emit_csinc): Likewise.
1018         (emit_cset): Likewise.
1019         (emit_nop): Likewise.
1020         (emit_ops_insns): New helper function.
1021         (emit_pop): Likewise.
1022         (emit_push): Likewise.
1023         (aarch64_emit_prologue): New function.
1024         (aarch64_emit_epilogue): Likewise.
1025         (aarch64_emit_add): Likewise.
1026         (aarch64_emit_sub): Likewise.
1027         (aarch64_emit_mul): Likewise.
1028         (aarch64_emit_lsh): Likewise.
1029         (aarch64_emit_rsh_signed): Likewise.
1030         (aarch64_emit_rsh_unsigned): Likewise.
1031         (aarch64_emit_ext): Likewise.
1032         (aarch64_emit_log_not): Likewise.
1033         (aarch64_emit_bit_and): Likewise.
1034         (aarch64_emit_bit_or): Likewise.
1035         (aarch64_emit_bit_xor): Likewise.
1036         (aarch64_emit_bit_not): Likewise.
1037         (aarch64_emit_equal): Likewise.
1038         (aarch64_emit_less_signed): Likewise.
1039         (aarch64_emit_less_unsigned): Likewise.
1040         (aarch64_emit_ref): Likewise.
1041         (aarch64_emit_if_goto): Likewise.
1042         (aarch64_emit_goto): Likewise.
1043         (aarch64_write_goto_address): Likewise.
1044         (aarch64_emit_const): Likewise.
1045         (aarch64_emit_call): Likewise.
1046         (aarch64_emit_reg): Likewise.
1047         (aarch64_emit_pop): Likewise.
1048         (aarch64_emit_stack_flush): Likewise.
1049         (aarch64_emit_zero_ext): Likewise.
1050         (aarch64_emit_swap): Likewise.
1051         (aarch64_emit_stack_adjust): Likewise.
1052         (aarch64_emit_int_call_1): Likewise.
1053         (aarch64_emit_void_call_2): Likewise.
1054         (aarch64_emit_eq_goto): Likewise.
1055         (aarch64_emit_ne_goto): Likewise.
1056         (aarch64_emit_lt_goto): Likewise.
1057         (aarch64_emit_le_goto): Likewise.
1058         (aarch64_emit_gt_goto): Likewise.
1059         (aarch64_emit_ge_got): Likewise.
1060         (aarch64_emit_ops_impl): New static global variable.
1061         (aarch64_emit_ops): New target function, return
1062         &aarch64_emit_ops_impl.
1063         (struct linux_target_ops): Install it.
1064
1065 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
1066
1067         * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
1068         * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
1069         aarch64-ipa.o.
1070         * linux-aarch64-ipa.c: New file.
1071         * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
1072         and endian.h.
1073         (aarch64_get_thread_area): New target method.
1074         (extract_signed_bitfield): New helper function.
1075         (aarch64_decode_ldr_literal): New function.
1076         (enum aarch64_opcodes): New enum.
1077         (struct aarch64_register): New struct.
1078         (struct aarch64_operand): New struct.
1079         (x0): New static global.
1080         (x1): Likewise.
1081         (x2): Likewise.
1082         (x3): Likewise.
1083         (x4): Likewise.
1084         (w2): Likewise.
1085         (ip0): Likewise.
1086         (sp): Likewise.
1087         (xzr): Likewise.
1088         (aarch64_register): New helper function.
1089         (register_operand): Likewise.
1090         (immediate_operand): Likewise.
1091         (struct aarch64_memory_operand): New struct.
1092         (offset_memory_operand): New helper function.
1093         (preindex_memory_operand): Likewise.
1094         (enum aarch64_system_control_registers): New enum.
1095         (ENCODE): New macro.
1096         (emit_insn): New helper function.
1097         (emit_b): New function.
1098         (emit_bcond): Likewise.
1099         (emit_cb): Likewise.
1100         (emit_tb): Likewise.
1101         (emit_blr): Likewise.
1102         (emit_stp): Likewise.
1103         (emit_ldp_q_offset): Likewise.
1104         (emit_stp_q_offset): Likewise.
1105         (emit_load_store): Likewise.
1106         (emit_ldr): Likewise.
1107         (emit_ldrsw): Likewise.
1108         (emit_str): Likewise.
1109         (emit_ldaxr): Likewise.
1110         (emit_stxr): Likewise.
1111         (emit_stlr): Likewise.
1112         (emit_data_processing_reg): Likewise.
1113         (emit_data_processing): Likewise.
1114         (emit_add): Likewise.
1115         (emit_sub): Likewise.
1116         (emit_mov): Likewise.
1117         (emit_movk): Likewise.
1118         (emit_mov_addr): Likewise.
1119         (emit_mrs): Likewise.
1120         (emit_msr): Likewise.
1121         (emit_sevl): Likewise.
1122         (emit_wfe): Likewise.
1123         (append_insns): Likewise.
1124         (can_encode_int32_in): New helper function.
1125         (aarch64_relocate_instruction): New function.
1126         (aarch64_install_fast_tracepoint_jump_pad): Likewise.
1127         (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
1128         (struct linux_target_ops): Install aarch64_get_thread_area,
1129         aarch64_install_fast_tracepoint_jump_pad and
1130         aarch64_get_min_fast_tracepoint_insn_len.
1131
1132 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
1133
1134         * Makefile.in (aarch64-insn.o): New rule.
1135         * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
1136
1137 2015-09-21  Yao Qi  <yao.qi@linaro.org>
1138
1139         * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
1140
1141 2015-09-21  Yao Qi  <yao.qi@linaro.org>
1142
1143         * tracepoint.c (max_jump_pad_size): Remove.
1144
1145 2015-09-18  Yao Qi  <yao.qi@linaro.org>
1146
1147         * linux-aarch64-low.c: Don't include sys/uio.h.
1148         (ps_get_thread_area): Call aarch64_ps_get_thread_area.
1149
1150 2015-09-16  Wei-cheng Wang  <cole945@gmail.com>
1151
1152         * tracepoint.c (eval_result_type): Change prototype.
1153         (condition_true_at_tracepoint): Fix argument to compiled_cond.
1154
1155 2015-09-15  Pedro Alves  <palves@redhat.com>
1156
1157         * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
1158         Check whether to report exec events instead of checking whether
1159         multiprocess is enabled.
1160
1161 2015-09-15  Pedro Alves  <palves@redhat.com>
1162
1163         PR remote/18965
1164         * remote-utils.c (prepare_resume_reply): Merge
1165         TARGET_WAITKIND_VFORK_DONE switch case with the
1166         TARGET_WAITKIND_FORKED case.
1167
1168 2015-09-15  Yao Qi  <yao.qi@linaro.org>
1169
1170         * server.c (handle_query): Check string comparison using
1171         "else if" instead of "if".
1172
1173 2015-09-15  Yao Qi  <yao.qi@linaro.org>
1174
1175         * server.c (vCont_supported): New global variable.
1176         (handle_query): Set vCont_supported to 1 if "vContSupported+"
1177         matches.  Append ";vContSupported+" to own_buf.
1178         (handle_v_requests): Append ";s;S" to own_buf if target supports
1179         hardware single step or vCont_supported is false.
1180         (capture_main): Set vCont_supported to zero.
1181
1182 2015-09-15  Yao Qi  <yao.qi@linaro.org>
1183
1184         * linux-low.c (linux_supports_conditional_breakpoints): Rename
1185         it to ...
1186         (linux_supports_hardware_single_step): ... New function.
1187         (linux_target_ops): Update.
1188         * lynx-low.c (lynx_target_ops): Set field
1189         supports_hardware_single_step to target_can_do_hardware_single_step.
1190         * nto-low.c (nto_target_ops): Likewise.
1191         * spu-low.c (spu_target_ops): Likewise.
1192         * win32-low.c (win32_target_ops): Likewise.
1193         * target.c (target_can_do_hardware_single_step): New function.
1194         * target.h (struct target_ops) <supports_conditional_breakpoints>:
1195         Remove.  <supports_hardware_single_step>: New field.
1196         (target_supports_conditional_breakpoints): Remove.
1197         (target_supports_hardware_single_step): New macro.
1198         (target_can_do_hardware_single_step): Declare.
1199         * server.c (handle_query): Use target_supports_hardware_single_step
1200         instead of target_supports_conditional_breakpoints.
1201
1202 2015-09-15  Yao Qi  <yao.qi@linaro.org>
1203
1204         * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
1205         function.
1206         (struct linux_target_ops the_low_target): Install
1207         aarch64_linux_siginfo_fixup.
1208
1209 2015-09-11  Don Breazeal  <donb@codesourcery.com>
1210             Luis Machado  <lgustavo@codesourcery.com>
1211
1212         * linux-low.c (linux_mourn): Static declaration.
1213         (linux_arch_setup): Move in front of
1214         handle_extended_wait.
1215         (linux_arch_setup_thread): New function.
1216         (handle_extended_wait): Handle exec events.  Call
1217         linux_arch_setup_thread.  Make event_lwp argument a
1218         pointer-to-a-pointer.
1219         (check_zombie_leaders): Do not check stopped threads.
1220         (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
1221         (linux_low_filter_event): Add lwp and thread for exec'ing
1222         non-leader thread if leader thread has been deleted.
1223         Refactor code into linux_arch_setup_thread and call it.
1224         Pass child lwp pointer by reference to handle_extended_wait.
1225         (linux_wait_for_event_filtered): Update comment.
1226         (linux_wait_1): Prevent clobbering exec event status.
1227         (linux_supports_exec_events): New function.
1228         (linux_target_ops) <supports_exec_events>: Initialize new member.
1229         * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
1230         new member.
1231         * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
1232         * server.c (report_exec_events): New global variable.
1233         (handle_query): Handle qSupported query for exec-events feature.
1234         (captured_main): Initialize report_exec_events.
1235         * server.h (report_exec_events): Declare new global variable.
1236         * target.h (struct target_ops) <supports_exec_events>: New
1237         member.
1238         (target_supports_exec_events): New macro.
1239         * win32-low.c (win32_target_ops) <supports_exec_events>:
1240         Initialize new member.
1241
1242 2015-09-09  Markus Metzger  <markus.t.metzger@intel.com>
1243
1244         * linux-low.c (linux_low_enable_btrace): Remove.
1245         (linux_target_ops): Replace linux_low_enable_btrace with
1246         linux_enable_btrace.
1247
1248 2015-09-03  Yao Qi  <yao.qi@linaro.org>
1249
1250         * linux-aarch64-low.c (aarch64_insert_point): Call
1251         aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
1252         returns true.
1253
1254 2015-08-27  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1255
1256         * linux-low.c (check_stopped_by_breakpoint): Use
1257         GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
1258
1259 2015-08-27  Pedro Alves  <palves@redhat.com>
1260
1261         * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
1262
1263 2015-08-26  Simon Marchi  <simon.marchi@ericsson.com>
1264
1265         * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
1266         the XNEW-family equivalent.
1267         (compile_bytecodes): Likewise.
1268         * dll.c (loaded_dll): Likewise.
1269         * event-loop.c (append_callback_event): Likewise.
1270         (create_file_handler): Likewise.
1271         (create_file_event): Likewise.
1272         * hostio.c (handle_open): Likewise.
1273         * inferiors.c (add_thread): Likewise.
1274         (add_process): Likewise.
1275         * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
1276         * linux-arm-low.c (arm_new_process): Likewise.
1277         (arm_new_thread): Likewise.
1278         * linux-low.c (add_to_pid_list): Likewise.
1279         (linux_add_process): Likewise.
1280         (handle_extended_wait): Likewise.
1281         (add_lwp): Likewise.
1282         (enqueue_one_deferred_signal): Likewise.
1283         (enqueue_pending_signal): Likewise.
1284         (linux_resume_one_lwp_throw): Likewise.
1285         (linux_resume_one_thread): Likewise.
1286         (linux_read_memory): Likewise.
1287         (linux_write_memory): Likewise.
1288         * linux-mips-low.c (mips_linux_new_process): Likewise.
1289         (mips_linux_new_thread): Likewise.
1290         (mips_add_watchpoint): Likewise.
1291         * linux-x86-low.c (initialize_low_arch): Likewise.
1292         * lynx-low.c (lynx_add_process): Likewise.
1293         * mem-break.c (set_raw_breakpoint_at): Likewise.
1294         (set_breakpoint): Likewise.
1295         (add_condition_to_breakpoint): Likewise.
1296         (add_commands_to_breakpoint): Likewise.
1297         (clone_agent_expr): Likewise.
1298         (clone_one_breakpoint): Likewise.
1299         * regcache.c (new_register_cache): Likewise.
1300         * remote-utils.c (look_up_one_symbol): Likewise.
1301         * server.c (queue_stop_reply): Likewise.
1302         (start_inferior): Likewise.
1303         (queue_stop_reply_callback): Likewise.
1304         (handle_target_event): Likewise.
1305         * spu-low.c (fetch_ppc_memory): Likewise.
1306         (store_ppc_memory): Likewise.
1307         * target.c (set_target_ops): Likewise.
1308         * thread-db.c (thread_db_load_search): Likewise.
1309         (try_thread_db_load_1): Likewise.
1310         * tracepoint.c (add_tracepoint): Likewise.
1311         (add_tracepoint_action): Likewise.
1312         (create_trace_state_variable): Likewise.
1313         (cmd_qtdpsrc): Likewise.
1314         (cmd_qtro): Likewise.
1315         (add_while_stepping_state): Likewise.
1316         * win32-low.c (child_add_thread): Likewise.
1317         (get_image_name): Likewise.
1318
1319 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1320
1321         * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
1322
1323 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1324
1325         * Makefile.in (aarch64-linux.o): New rule.
1326         * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
1327         srv_tgtobj.
1328         * linux-aarch64-low.c: Include nat/aarch64-linux.h.
1329         (aarch64_init_debug_reg_state): Make it extern.
1330         (aarch64_linux_prepare_to_resume): Remove.
1331
1332 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1333
1334         * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
1335         lwp_arch_private_info and ptid_of_lwp.
1336
1337 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1338
1339         * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
1340         Find proc_info by find_process_pid.  All callers updated.
1341
1342 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1343
1344         * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
1345         Remove.
1346         (debug_reg_change_callback): Remove.
1347         (aarch64_notify_debug_reg_change): Remove.
1348
1349 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1350
1351         * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
1352         Call current_lwp_ptid.
1353
1354 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1355
1356         * linux-aarch64-low.c (debug_reg_change_callback): Use
1357         debug_printf.
1358
1359 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1360
1361         * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
1362
1363 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1364
1365         * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
1366
1367 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1368
1369         * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
1370         the code.
1371
1372 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1373
1374         * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
1375         Remove.
1376         (debug_reg_change_callback): Remove argument entry and add argument
1377         lwp.  Remove local variable thread.  Don't print thread id in the
1378         debugging output.  Don't check whether pid of thread equals to pid.
1379         (aarch64_notify_debug_reg_change): Don't set param.pid.  Call
1380         iterate_over_lwps instead find_inferior.
1381
1382 2015-08-24  Pedro Alves  <palves@redhat.com>
1383
1384         * inferiors.c (get_first_process): New function.
1385         * inferiors.h (get_first_process): New declaration.
1386         * remote-utils.c (read_ptid): Default to the first process in the
1387         list, instead of to the current thread's process.
1388
1389 2015-08-24  Pedro Alves  <palves@redhat.com>
1390
1391         * debug.c: Include gdb_sys_time.h instead of sys/time.h.
1392         * event-loop.c: Likewise.
1393         * remote-utils.c: Likewise.
1394         * tracepoint.c: Likewise.
1395
1396 2015-08-24  Pedro Alves  <palves@redhat.com>
1397
1398         * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
1399         ptid_get_lwp.
1400
1401 2015-08-21  Pedro Alves  <palves@redhat.com>
1402
1403         * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
1404         instead of literal 1.
1405
1406 2015-08-21  Pedro Alves  <palves@redhat.com>
1407
1408         * tdesc.c (default_description): Explicitly zero-initialize.
1409
1410 2015-08-21  Pedro Alves  <palves@redhat.com>
1411
1412         PR gdb/18749
1413         * inferiors.c (remove_thread): Discard any pending stop reply for
1414         this thread.
1415         * server.c (remove_all_on_match_pid): Rename to ...
1416         (remove_all_on_match_ptid): ... this.  Work with a filter ptid
1417         instead of a pid.
1418         (discard_queued_stop_replies): Change parameter to a ptid.  Now
1419         extern.
1420         (handle_v_kill, kill_inferior_callback, captured_main)
1421         (process_serial_event): Adjust.
1422         * server.h (discard_queued_stop_replies): Declare.
1423
1424 2015-08-21  Pedro Alves  <palves@redhat.com>
1425
1426         * linux-low.c (wait_for_sigstop): Always switch to no thread
1427         selected if the previously current thread dies.
1428         * lynx-low.c (lynx_request_interrupt): Use the first thread's
1429         process instead of the current thread's.
1430         * remote-utils.c (input_interrupt): Don't check if there's no
1431         current thread.
1432         * server.c (gdb_read_memory, gdb_write_memory): If setting the
1433         current thread to the general thread fails, error out.
1434         (handle_qxfer_auxv, handle_qxfer_libraries)
1435         (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
1436         (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
1437         (handle_query): Check if there's a thread selected instead of
1438         checking whether there's any thread in the thread list.
1439         (handle_qxfer_threads, handle_qxfer_btrace)
1440         (handle_qxfer_btrace_conf): Don't error out early if there's no
1441         thread in the thread list.
1442         (handle_v_cont, myresume): Don't set the current thread to the
1443         continue thread.
1444         (process_serial_event) <Hg handling>: Also set thread_id if the
1445         previous general thread is still alive.
1446         (process_serial_event) <g/G handling>: If setting the current
1447         thread to the general thread fails, error out.
1448         * spu-low.c (spu_resume, spu_request_interrupt): Use the first
1449         thread's lwp instead of the current thread's.
1450         * target.c (set_desired_thread): If the desired thread was not
1451         found, leave the current thread pointing to NULL.  Return an int
1452         (boolean) indicating success.
1453         * target.h (set_desired_thread): Change return type to int.
1454
1455 2015-08-20  Max Filippov  <jcmvbkbc@gmail.com>
1456
1457         * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
1458         * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
1459         #includes.
1460         (ps_get_thread_area): New function.
1461
1462 2015-08-19  Gary Benson  <gbenson@redhat.com>
1463
1464         * hostio.c (handle_pread): Do not attempt to read more data
1465         than hostio_reply_with_data can fit in a packet.
1466
1467 2015-08-18  Joel Brobecker  <brobecker@adacore.com>
1468
1469         * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
1470
1471 2015-08-14  Matthew Fortune  <matthew.fortune@imgtec.com>
1472
1473         * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
1474
1475 2015-08-06  Pedro Alves  <palves@redhat.com>
1476
1477         * tracepoint.c (expr_eval_result): Now an int.
1478
1479 2015-08-06  Pedro Alves  <palves@redhat.com>
1480
1481         * gdbthread.h (struct regcache): Forward declare.
1482         (struct thread_info) <regcache_data>: Now a struct regcache
1483         pointer.
1484         * inferiors.c (inferior_regcache_data)
1485         (set_inferior_regcache_data): Now work with struct regcache
1486         pointers.
1487         * inferiors.h (struct regcache): Forward declare.
1488         (inferior_regcache_data, set_inferior_regcache_data): Now work
1489         with struct regcache pointers.
1490         * regcache.c (get_thread_regcache, regcache_invalidate_thread)
1491         (free_register_cache_thread): Remove struct regcache pointer
1492         casts.
1493
1494 2015-08-06  Pedro Alves  <palves@redhat.com>
1495
1496         * server.c (captured_main): On error, print the exception message
1497         to stderr, and if run_once is set, throw a quit.
1498
1499 2015-08-06  Pedro Alves  <palves@redhat.com>
1500
1501         * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
1502         the current thread.
1503
1504 2015-08-06  Pedro Alves  <palves@redhat.com>
1505
1506         * linux-low.c (linux_write_memory): Rewrite debug output to avoid
1507         reading beyond the passed in buffer length.
1508
1509 2015-08-06  Pierre Langlois  <pierre.langlois@arm.com>
1510
1511         * tracepoint.c (symbol_list) <required>: Remove.
1512
1513 2015-08-06  Pedro Alves  <palves@redhat.com>
1514
1515         * linux-low.c (handle_extended_wait): Set the fork child's suspend
1516         count if stopping and suspending threads.
1517         (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1518         stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1519         (linux_detach): Complete an ongoing step-over.
1520         (lwp_suspended_inc, lwp_suspended_decr): New functions.  Use
1521         throughout.
1522         (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1523         (linux_wait_1): If passing a signal to the inferior after
1524         finishing a step-over, unsuspend and re-resume all lwps.  If we
1525         see a single-step event but the thread should be continuing, don't
1526         pass the trap to gdb.
1527         (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1528         internal_error instead of gdb_assert.
1529         (enqueue_pending_signal): New function.
1530         (check_ptrace_stopped_lwp_gone): Add debug output.
1531         (start_step_over): Use internal_error instead of gdb_assert.
1532         (complete_ongoing_step_over): New function.
1533         (linux_resume_one_thread): Don't resume a suspended thread.
1534         (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1535         it stepping.
1536
1537 2015-08-06  Pedro Alves  <palves@redhat.com>
1538
1539         * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1540         (linux_thread_alive): Use lwp_is_marked_dead.
1541         (extended_event_reported): Delete.
1542         (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1543         instead of extended_event_reported.
1544         (mark_lwp_dead): Don't set the 'dead' flag.  Store the waitstatus
1545         as well.
1546         (lwp_is_marked_dead): New function.
1547         (lwp_running): Use lwp_is_marked_dead.
1548         * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1549         comment.
1550
1551 2015-08-06  Pedro Alves  <palves@redhat.com>
1552
1553         * linux-low.c (linux_wait_1): Move fork event output out of the
1554         !report_to_gdb check.  Pass event_child->waitstatus to
1555         target_waitstatus_to_string instead of ourstatus.
1556
1557 2015-08-04  Yao Qi  <yao.qi@linaro.org>
1558
1559         * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1560         if current_thread is 32 bit.
1561
1562 2015-08-04  Yao Qi  <yao.qi@linaro.org>
1563
1564         * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1565         0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1566         * server.c (extended_protocol): Remove "static".
1567         * server.h (extended_protocol): Declare it.
1568
1569 2015-08-04  Yao Qi  <yao.qi@linaro.org>
1570
1571         * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1572         both aarch64 and aarch32.
1573         (aarch64_set_pc): Likewise.
1574
1575 2015-08-04  Yao Qi  <yao.qi@linaro.org>
1576
1577         * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1578         to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1579         arm-with-neon.xml to srv_xmlfiles.
1580         * linux-aarch64-low.c: Include linux-aarch32-low.h.
1581         (is_64bit_tdesc): New function.
1582         (aarch64_linux_read_description): New function.
1583         (aarch64_arch_setup): Call aarch64_linux_read_description.
1584         (regs_info): Rename to regs_info_aarch64.
1585         (aarch64_regs_info): Return right regs_info.
1586         (initialize_low_arch): Call initialize_low_arch_aarch32.
1587
1588 2015-08-04  Yao Qi  <yao.qi@linaro.org>
1589
1590         * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1591         * linux-aarch32-low.c: New file.
1592         * linux-aarch32-low.h: New file.
1593         * linux-arm-low.c (arm_fill_gregset): Move it to
1594         linux-aarch32-low.c.
1595         (arm_store_gregset): Likewise.
1596         (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1597         (arm_store_vfpregset): Call arm_store_vfpregset_num.
1598         (arm_arch_setup): Check if PTRACE_GETREGSET works.
1599         (regs_info): Rename to regs_info_arm.
1600         (arm_regs_info): Return regs_info_aarch32 if
1601         have_ptrace_getregset is 1 and target description is
1602         arm_with_neon or arm_with_vfpv3.
1603         (initialize_low_arch): Don't call init_registers_arm_with_neon.
1604         Call initialize_low_arch_aarch32 instead.
1605
1606 2015-08-04  Yao Qi  <yao.qi@linaro.org>
1607
1608         * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1609         * linux-low.c: ... here.
1610         * linux-low.h (have_ptrace_getregset): Declare it.
1611
1612 2015-08-04  Pedro Alves  <palves@redhat.com>
1613
1614         * thread-db.c (struct thread_db): Use new typedefs.
1615         (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1616         CHK calls.
1617         (disable_thread_event_reporting): Cast result of dlsym to
1618         destination function pointer type.
1619         (thread_db_mourn): Use td_ta_delete_ftype.
1620
1621 2015-08-03  Sandra Loosemore  <sandra@codesourcery.com>
1622
1623         * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1624         arch variant.
1625         (CDX_BREAKPOINT): Define for R2.
1626         (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1627         (the_low_target): Add comments.
1628
1629 2015-07-30  Yao Qi  <yao.qi@linaro.org>
1630
1631         * linux-arm-low.c (arm_hwcap): Remove it.
1632         (arm_read_description): New local variable arm_hwcap.  Don't
1633         set arm_hwcap to zero.
1634
1635 2015-07-30  Yao Qi  <yao.qi@linaro.org>
1636
1637         * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1638         Use regcache->tdesc instead.
1639         (arm_store_wmmxregset): Likewise.
1640         (arm_fill_vfpregset): Likewise.
1641         (arm_store_vfpregset): Likewise.
1642
1643 2015-07-30  Yao Qi  <yao.qi@linaro.org>
1644
1645         * linux-arm-low.c: Include arch/arm.h.
1646         (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1647         (arm_store_gregset): Likewise.
1648
1649 2015-07-29  Simon Marchi  <simon.marchi@ericsson.com>
1650
1651         * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1652         ptrace's 4th parameter.
1653
1654 2015-07-27  Yao Qi  <yao.qi@linaro.org>
1655
1656         * configure.srv (case aarch64*-*-linux*): Don't set
1657         srv_linux_usrregs.
1658
1659 2015-07-24  Pedro Alves  <palves@redhat.c: Likewise.om>
1660
1661         * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1662         sys/ptrace.h.
1663         * linux-arm-low.c: Likewise.
1664         * linux-cris-low.c: Likewise.
1665         * linux-crisv32-low.c: Likewise.
1666         * linux-low.c: Likewise.
1667         * linux-m68k-low.c: Likewise.
1668         * linux-mips-low.c: Likewise.
1669         * linux-nios2-low.c: Likewise.
1670         * linux-s390-low.c: Likewise.
1671         * linux-sparc-low.c: Likewise.
1672         * linux-tic6x-low.c: Likewise.
1673         * linux-tile-low.c: Likewise.
1674         * linux-x86-low.c: Likewise.
1675
1676 2015-07-24  Pedro Alves  <palves@redhat.com>
1677
1678         * config.in: Regenerate.
1679         * configure: Regenerate.
1680
1681 2015-07-24  Pedro Alves  <palves@redhat.com>
1682
1683         * acinclude.m4: Include ../ptrace.m4.
1684         * configure.ac: Call GDB_AC_PTRACE.
1685         * config.in, configure: Regenerate.
1686
1687 2015-07-24  Yao Qi  <yao.qi@linaro.org>
1688
1689         * linux-low.c (linux_create_inferior): Remove setting to
1690         proc->priv->new_inferior.
1691         (linux_attach): Likewise.
1692         (linux_low_filter_event): Likewise.
1693         * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1694
1695 2015-07-24  Yao Qi  <yao.qi@linaro.org>
1696
1697         * linux-low.c (linux_arch_setup): New function.
1698         (linux_low_filter_event): If proc->tdesc is NULL and
1699         proc->attached is true, call the_low_target.arch_setup.
1700         Otherwise, keep status pending, and return.
1701         (linux_resume_one_lwp_throw): Don't call get_pc if
1702         thread->while_stepping isn't NULL.  Don't call
1703         get_thread_regcache if proc->tdesc is NULL.
1704         (need_step_over_p): Return 0 if proc->tdesc is NULL.
1705         (linux_target_ops): Install arch_setup.
1706         * server.c (start_inferior): Call the_target->arch_setup.
1707         * target.h (struct target_ops) <arch_setup>: New field.
1708         (target_arch_setup): New marco.
1709         * lynx-low.c (lynx_target_ops): Update.
1710         * nto-low.c (nto_target_ops): Update.
1711         * spu-low.c (spu_target_ops): Update.
1712         * win32-low.c (win32_target_ops): Update.
1713
1714 2015-07-24  Yao Qi  <yao.qi@linaro.org>
1715
1716         * linux-low.c (linux_add_process): Don't set
1717         proc->priv->new_inferior.
1718         (linux_create_inferior): Set proc->priv->new_inferior to 1.
1719         (linux_attach): Likewise.
1720
1721 2015-07-24  Yao Qi  <yao.qi@linaro.org>
1722
1723         * server.c (start_inferior): Code refactor.
1724
1725 2015-07-24  Yao Qi  <yao.qi@linaro.org>
1726
1727         * server.c (process_serial_event): Set general_thread.
1728
1729 2015-07-21  Yao Qi  <yao.qi@linaro.org>
1730
1731         * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1732         aarch64_linux_get_debug_reg_capacity.
1733
1734 2015-07-17  Yao Qi  <yao.qi@linaro.org>
1735
1736         * Makefile.in (aarch64-linux-hw-point.o): New rule.
1737         * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1738         * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1739         (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1740         (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1741         (AARCH64_HWP_ALIGNMENT): Likewise.
1742         (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1743         (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1744         (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1745         (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1746         (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1747         (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1748         (struct aarch64_debug_reg_state): Likewise.
1749         (struct arch_lwp_info): Likewise.
1750         (aarch64_align_watchpoint): Likewise.
1751         (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1752         (aarch64_watchpoint_length): Likewise.
1753         (aarch64_point_encode_ctrl_reg): Likewise
1754         (aarch64_point_is_aligned): Likewise.
1755         (aarch64_align_watchpoint): Likewise.
1756         (aarch64_linux_set_debug_regs):
1757         (aarch64_dr_state_insert_one_point): Likewise.
1758         (aarch64_dr_state_remove_one_point): Likewise.
1759         (aarch64_handle_breakpoint): Likewise.
1760         (aarch64_handle_aligned_watchpoint): Likewise.
1761         (aarch64_handle_unaligned_watchpoint): Likewise.
1762         (aarch64_handle_watchpoint): Likewise.
1763
1764 2015-07-17  Yao Qi  <yao.qi@linaro.org>
1765
1766         * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1767         and don't aarch64_get_debug_reg_state.  All callers update.
1768         (aarch64_handle_aligned_watchpoint): Likewise.
1769         (aarch64_handle_unaligned_watchpoint): Likewise.
1770         (aarch64_handle_watchpoint): Likewise.
1771         (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1772         (aarch64_remove_point): Likewise.
1773
1774 2015-07-17  Yao Qi  <yao.qi@linaro.org>
1775
1776         * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1777         debug_printf.
1778         (aarch64_handle_unaligned_watchpoint): Likewise.
1779
1780 2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
1781
1782         Revert the previous 3 commits:
1783         Move gdb_regex* to common/
1784         Move linux_find_memory_regions_full & co.
1785         gdbserver build-id attribute generator
1786
1787 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
1788             Jan Kratochvil  <jan.kratochvil@redhat.com>
1789
1790         gdbserver build-id attribute generator.
1791         * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1792         (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1793         (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1794         (find_phdr): New.
1795         (get_dynamic): Use find_pdhr to traverse program headers.
1796         (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1797         (compare_mapping_entry_range, struct find_memory_region_callback_data)
1798         (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1799         (get_hex_build_id): New.
1800         (linux_qxfer_libraries_svr4): Add optional build-id attribute
1801         to reply XML document.
1802
1803 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
1804             Jan Kratochvil  <jan.kratochvil@redhat.com>
1805
1806         * target.c: Include target/target-utils.h and fcntl.h.
1807         (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1808         (target_fileio_read_stralloc): New functions.
1809
1810 2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
1811
1812         * Makefile.in (OBS): Add gdb_regex.o.
1813         (gdb_regex.o): New.
1814         * config.in: Rebuilt.
1815         * configure: Rebuilt.
1816
1817 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
1818             Jan Kratochvil  <jan.kratochvil@redhat.com>
1819
1820         Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1821         * Makefile.in (OBS): Add target-utils.o.
1822         (linux-maps.o, target-utils.o): New.
1823         * configure.srv (srv_linux_obj): Add linux-maps.o.
1824
1825 2015-07-15  Pierre Langlois  <pierre.langlois@arm.com>
1826
1827         * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1828         function, return 1.
1829         (the_low_target): Install it.
1830
1831 2015-07-14  Pedro Alves  <palves@redhat.com>
1832
1833         * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1834         Instead, ignore ECHILD, and throw an error for other errnos.
1835
1836 2015-07-10  Pedro Alves  <palves@redhat.com>
1837
1838         * event-loop.c (struct callback_event) <data>: Change type to
1839         gdb_client_data instance instead of gdb_client_data pointer.
1840         (append_callback_event): Adjust.
1841
1842 2015-07-10  Pierre Langlois  <pierre.langlois@arm.com>
1843
1844         * linux-aarch64-low.c: Add comments for each linux_target_ops
1845         method.  Remove comments already covered in target_ops and
1846         linux_target_ops definitions.
1847         (the_low_target): Add comments for each unimplemented method.
1848
1849 2015-07-09  Yao Qi  <yao.qi@linaro.org>
1850
1851         * linux-aarch64-low.c (aarch64_regmap): Remove.
1852         (aarch64_usrregs_info): Remove.
1853         (regs_info): Set field usrregs to NULL.
1854
1855 2015-07-02  Markus Metzger  <markus.t.metzger@intel.com>
1856
1857         * linux-low.c: Include "rsp-low.h"
1858         (linux_low_encode_pt_config, linux_low_encode_raw): New.
1859         (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1860         (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1861         (handle_btrace_enable_pt): New.
1862         (handle_btrace_general_set): Support "pt".
1863         (handle_btrace_conf_general_set): Support "pt:size".
1864
1865 2015-06-29  Pierre Langlois  <pierre.langlois@arm.com>
1866
1867         * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1868         Z_PACKET_SW_BP.
1869
1870 2015-06-29  Pierre Langlois  <pierre.langlois@arm.com>
1871
1872         * linux-aarch64-low.c: Remove comment about endianness.
1873         (aarch64_breakpoint): Change type to gdb_byte[].  Set to "brk #0".
1874         (aarch64_breakpoint_at): Change type of insn to gdb_byte[].  Use
1875         memcmp.
1876
1877 2015-06-24  Gary Benson  <gbenson@redhat.com>
1878
1879         * linux-i386-ipa.c (stdint.h): Do not include.
1880         * lynx-i386-low.c (stdint.h): Likewise.
1881         * lynx-ppc-low.c (stdint.h): Likewise.
1882         * mem-break.c (stdint.h): Likewise.
1883         * thread-db.c (stdint.h): Likewise.
1884         * tracepoint.c (stdint.h): Likewise.
1885         * win32-low.c (stdint.h): Likewise.
1886
1887 2015-06-18  Simon Marchi  <simon.marchi@ericsson.com>
1888
1889         * server.c (write_qxfer_response): Update call to
1890         remote_escape_output.
1891
1892 2015-06-15  Aleksandar Ristovski  <aristovski@qnx.com
1893             Jan Kratochvil  <jan.kratochvil@redhat.com>
1894
1895         Merge multiple hex conversions.
1896         * gdbreplay.c (tohex): Rename to 'fromhex'.
1897         (logchar): Use fromhex.
1898
1899 2015-06-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
1900
1901         * server.c (handle_qxfer_libraries): Set `version' attribute for
1902         <library-list>.
1903
1904 2015-06-10  Gary Benson  <gbenson@redhat.com>
1905
1906         * target.h (struct target_ops) <multifs_open>: New field.
1907         <multifs_unlink>: Likewise.
1908         <multifs_readlink>: Likewise.
1909         * linux-low.c (nat/linux-namespaces.h): New include.
1910         (linux_target_ops): Initialize the_target->multifs_open,
1911         the_target->multifs_unlink and the_target->multifs_readlink.
1912         * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1913         * hostio.c (hostio_fs_pid): New static variable.
1914         (hostio_handle_new_gdb_connection): New function.
1915         (handle_setfs): Likewise.
1916         (handle_open): Use the_target->multifs_open as appropriate.
1917         (handle_unlink): Use the_target->multifs_unlink as appropriate.
1918         (handle_readlink): Use the_target->multifs_readlink as
1919         appropriate.
1920         (handle_vFile): Handle vFile:setfs packets.
1921         * server.c (handle_query): Call hostio_handle_new_gdb_connection
1922         after target_handle_new_gdb_connection.
1923
1924 2015-06-10  Gary Benson  <gbenson@redhat.com>
1925
1926         * configure.ac (AC_CHECK_FUNCS): Add setns.
1927         * config.in: Regenerate.
1928         * configure: Likewise.
1929         * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1930         (linux-namespaces.o): New rule.
1931         * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1932
1933 2015-06-09  Gary Benson <gbenson@redhat.com>
1934
1935         * hostio.c (handle_open): Process mode argument with
1936         fileio_to_host_mode.
1937
1938 2015-06-01  Yao Qi  <yao.qi@linaro.org>
1939
1940         * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1941         * linux-x86-low.c: Likewise.
1942
1943 2015-05-28  Don Breazeal  <donb@codesourcery.com>
1944
1945         * linux-low.c (handle_extended_wait): Initialize
1946         thread_info.last_resume_kind for new fork children.
1947
1948 2015-05-15  Pedro Alves  <palves@redhat.com>
1949
1950         * target.h (target_handle_new_gdb_connection): Rewrite using if
1951         wrapped in do/while.
1952
1953 2015-05-14  Joel Brobecker  <brobecker@adacore.com>
1954
1955         * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1956         * configure, config.in: Regenerate.
1957         * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1958         Declare typedef.
1959
1960 2015-05-12  Don Breazeal  <donb@codesourcery.com>
1961
1962         * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1963         PTRACE_EVENT_VFORK_DONE.
1964         (linux_low_ptrace_options, extended_event_reported): Add vfork
1965         events.
1966         * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1967         and "vforkdone" for RSP 'T' Stop Reply Packet.
1968         * server.h (report_vfork_events): Declare
1969         global variable.
1970
1971 2015-05-12  Don Breazeal  <donb@codesourcery.com>
1972
1973         * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1974         (the_low_target) <new_fork>: Initialize new member.
1975         * linux-arm-low.c (arm_new_fork): New function.
1976         (the_low_target) <new_fork>: Initialize new member.
1977         * linux-low.c (handle_extended_wait): Call new target function
1978         new_fork.
1979         * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1980         * linux-mips-low.c (mips_add_watchpoint): New function
1981         extracted from mips_insert_point.
1982         (the_low_target) <new_fork>: Initialize new member.
1983         (mips_linux_new_fork): New function.
1984         (mips_insert_point): Call mips_add_watchpoint.
1985         * linux-x86-low.c (x86_linux_new_fork): New function.
1986         (the_low_target) <new_fork>: Initialize new member.
1987
1988 2015-05-12  Don Breazeal  <donb@codesourcery.com>
1989
1990         * linux-low.c (handle_extended_wait): Implement return value,
1991         rename argument 'event_child' to 'event_lwp', handle
1992         PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1993         (linux_low_ptrace_options): New function.
1994         (linux_low_filter_event): Call linux_low_ptrace_options,
1995         use different argument fo linux_enable_event_reporting,
1996         use return value from handle_extended_wait.
1997         (extended_event_reported): New function.
1998         (linux_wait_1): Call extended_event_reported and set
1999         status to report fork events.
2000         (linux_write_memory): Add pid to debug message.
2001         (reset_lwp_ptrace_options_callback): New function.
2002         (linux_handle_new_gdb_connection): New function.
2003         (linux_target_ops): Initialize new structure member.
2004         * linux-low.h (struct lwp_info) <waitstatus>: New member.
2005         * lynx-low.c: Initialize new structure member.
2006         * remote-utils.c (prepare_resume_reply): Implement stop reason
2007         "fork" for "T" stop message.
2008         * server.c (handle_query): Call handle_new_gdb_connection.
2009         * server.h (report_fork_events): Declare global flag.
2010         * target.h (struct target_ops) <handle_new_gdb_connection>:
2011         New member.
2012         (target_handle_new_gdb_connection): New macro.
2013         * win32-low.c: Initialize new structure member.
2014
2015 2015-05-12  Don Breazeal  <donb@codesourcery.com>
2016
2017         * mem-break.c (APPEND_TO_LIST): Define macro.
2018         (clone_agent_expr): New function.
2019         (clone_one_breakpoint): New function.
2020         (clone_all_breakpoints): New function.
2021         * mem-break.h: Declare new functions.
2022
2023 2015-05-12  Don Breazeal  <donb@codesourcery.com>
2024
2025         * linux-low.c (linux_supports_fork_events): New function.
2026         (linux_supports_vfork_events): New function.
2027         (linux_target_ops): Initialize new structure members.
2028         (initialize_low): Call linux_check_ptrace_features.
2029         * lynx-low.c (lynx_target_ops): Initialize new structure
2030         members.
2031         * server.c (report_fork_events, report_vfork_events):
2032         New global flags.
2033         (handle_query): Add new features to qSupported packet and
2034         response.
2035         (captured_main): Initialize new global variables.
2036         * target.h (struct target_ops) <supports_fork_events>:
2037         New member.
2038         <supports_vfork_events>: New member.
2039         (target_supports_fork_events): New macro.
2040         (target_supports_vfork_events): New macro.
2041         * win32-low.c (win32_target_ops): Initialize new structure
2042         members.
2043
2044 2015-05-12  Gary Benson <gbenson@redhat.com>
2045
2046         * server.c (handle_qxfer_exec_file): Use current process
2047         if annex is empty.
2048
2049 2015-05-08  Sandra Loosemore  <sandra@codesourcery.com>
2050
2051         * linux-nios2-low.c: Include elf/common.h.  Adjust comments.
2052         Remove HAVE_PTRACE_GETREGS conditionals.
2053         (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
2054         instead of PTRACE_GETREGS and PTRACE_SETREGS.
2055
2056 2015-05-08  Yao Qi  <yao.qi@linaro.org>
2057
2058         * linux-low.c (linux_supports_conditional_breakpoints): New
2059         function.
2060         (linux_target_ops): Install new target method.
2061         * lynx-low.c (lynx_target_ops): Install NULL hook for
2062         supports_conditional_breakpoints.
2063         * nto-low.c (nto_target_ops): Likewise.
2064         * spu-low.c (spu_target_ops): Likewise.
2065         * win32-low.c (win32_target_ops): Likewise.
2066         * server.c (handle_query): Check
2067         target_supports_conditional_breakpoints.
2068         * target.h (struct target_ops) <supports_conditional_breakpoints>:
2069         New field.
2070         (target_supports_conditional_breakpoints): New macro.
2071
2072 2015-05-06  Pedro Alves  <palves@redhat.com>
2073
2074         PR server/18081
2075         * server.c (start_inferior): If the process exits, mourn it.
2076
2077 2015-04-21  Gary Benson <gbenson@redhat.com>
2078
2079         * hostio.c (fileio_open_flags_to_host): Factored out to
2080         fileio_to_host_openflags in common/fileio.c.  Single use
2081         updated.
2082
2083 2015-04-17  Max Filippov  <jcmvbkbc@gmail.com>
2084
2085         * linux-xtensa-low.c (xtensa_fill_gregset)
2086         (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
2087         XCHAL_HAVE_LOOP.
2088
2089 2015-04-17  Max Filippov  <jcmvbkbc@gmail.com>
2090
2091         * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
2092         (regs_info): Replace usrregs pointer with NULL.
2093
2094 2015-04-17  Gary Benson  <gbenson@redhat.com>
2095
2096         * target.h (struct target_ops) <pid_to_exec_file>: New field.
2097         * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
2098         * server.c (handle_qxfer_exec_file): New function.
2099         (qxfer_packets): Add exec-file entry.
2100         (handle_query): Report qXfer:exec-file:read as supported packet.
2101
2102 2015-04-14  Romain Naour <romain.naour@openwide.fr>  (tiny change)
2103
2104         * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
2105
2106 2015-04-09  Gary Benson <gbenson@redhat.com>
2107
2108         * hostio-errno.c (errno_to_fileio_error): Remove function.
2109         Update caller to use remote_fileio_to_fio_error.
2110
2111 2015-04-09  Yao Qi  <yao.qi@linaro.org>
2112
2113         * linux-low.c (linux_insert_point): Call
2114         insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
2115         (linux_remove_point): Call remove_memory_breakpoint if type is
2116         raw_bkpt_type_sw.
2117         * linux-x86-low.c (x86_insert_point): Don't call
2118         insert_memory_breakpoint.
2119         (x86_remove_point): Don't call remove_memory_breakpoint.
2120
2121 2015-04-01  Pedro Alves  <palves@redhat.com>
2122             Cleber Rosa  <crosa@redhat.com>
2123
2124         * server.c (gdbserver_usage): Reorganize and extend the usage
2125         message.
2126
2127 2015-03-24  Pedro Alves  <palves@redhat.com>
2128
2129         * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
2130         output.  Also dump TRAP_TRACE.
2131         (linux_low_filter_event): In debug output, distinguish a
2132         resume_stop SIGSTOP from a delayed SIGSTOP.
2133
2134 2015-03-24  Gary Benson  <gbenson@redhat.com>
2135
2136         * linux-x86-low.c (x86_linux_new_thread): Moved to
2137         nat/x86-linux.c.
2138         (x86_linux_prepare_to_resume): Likewise.
2139
2140 2015-03-24  Gary Benson  <gbenson@redhat.com>
2141
2142         * Makefile.in (x86-linux-dregs.o): New rule.
2143         * configure.srv: Add x86-linux-dregs.o to relevant targets.
2144         * linux-x86-low.c: Include nat/x86-linux-dregs.h.
2145         (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
2146         (x86_linux_dr_get): Likewise.
2147         (x86_linux_dr_set): Likewise.
2148         (update_debug_registers_callback): Likewise.
2149         (x86_linux_dr_set_addr): Likewise.
2150         (x86_linux_dr_get_addr): Likewise.
2151         (x86_linux_dr_set_control): Likewise.
2152         (x86_linux_dr_get_control): Likewise.
2153         (x86_linux_dr_get_status): Likewise.
2154         (x86_linux_update_debug_registers): Likewise.
2155
2156 2015-03-24  Gary Benson  <gbenson@redhat.com>
2157
2158         * linux-x86-low.c (x86_linux_update_debug_registers):
2159         New function, factored out from...
2160         (x86_linux_prepare_to_resume): ...this.
2161
2162 2015-03-24  Gary Benson  <gbenson@redhat.com>
2163
2164         * linux-x86-low.c (x86_linux_dr_get): Update comments.
2165         (x86_linux_dr_set): Likewise.
2166         (update_debug_registers_callback): Likewise.
2167         (x86_linux_dr_set_addr): Likewise.
2168         (x86_linux_dr_get_addr): Likewise.
2169         (x86_linux_dr_set_control): Likewise.
2170         (x86_linux_dr_get_control): Likewise.
2171         (x86_linux_dr_get_status): Likewise.
2172         (x86_linux_prepare_to_resume): Likewise.
2173
2174 2015-03-24  Gary Benson  <gbenson@redhat.com>
2175
2176         * linux-x86-low.c (x86_linux_dr_get): Add assertion.
2177         Use perror_with_name.  Pass string through gettext.
2178         (x86_linux_dr_set): Likewise.
2179
2180 2015-03-24  Gary Benson  <gbenson@redhat.com>
2181
2182         * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
2183         (x86_linux_dr_set_addr): ...this.
2184         (x86_dr_low_get_addr): Rename to...
2185         (x86_linux_dr_get_addr): ...this.
2186         (x86_dr_low_set_control): Rename to...
2187         (x86_linux_dr_set_control): ...this.
2188         (x86_dr_low_get_control): Rename to...
2189         (x86_linux_dr_get_control): ...this.
2190         (x86_dr_low_get_status): Rename to...
2191         (x86_linux_dr_get_status): ...this.
2192         (x86_dr_low): Update with new function names.
2193
2194 2015-03-24  Gary Benson  <gbenson@redhat.com>
2195
2196         * Makefile.in (x86-linux.o): New rule.
2197         * configure.srv: Add x86-linux.o to relevant targets.
2198         * linux-low.c (lwp_set_arch_private_info): New function.
2199         (lwp_arch_private_info): Likewise.
2200         * linux-x86-low.c: Include nat/x86-linux.h.
2201         (arch_lwp_info): Removed structure.
2202         (update_debug_registers_callback):
2203         Use lwp_set_debug_registers_changed.
2204         (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
2205         and lwp_set_debug_registers_changed.
2206         (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
2207
2208 2015-03-24  Gary Benson  <gbenson@redhat.com>
2209
2210         * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
2211         * linux-arm-low.c (arm_new_thread): Likewise.
2212         * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
2213         * linux-mips-low.c (mips_linux_new_thread): Likewise.
2214         * linux-x86-low.c (x86_linux_new_thread): Likewise.
2215         * linux-low.c (add_lwp): Update the_low_target.new_thread call.
2216
2217 2015-03-24  Gary Benson  <gbenson@redhat.com>
2218
2219         * linux-low.c (ptid_of_lwp): New function.
2220         (lwp_is_stopped): Likewise.
2221         (lwp_stop_reason): Likewise.
2222         * linux-x86-low.c (update_debug_registers_callback):
2223         Use lwp_is_stopped.
2224         (x86_linux_prepare_to_resume): Use ptid_of_lwp and
2225         lwp_stop_reason.
2226
2227 2015-03-24  Gary Benson  <gbenson@redhat.com>
2228
2229         * linux-low.h (linux_stop_lwp): Remove declaration.
2230
2231 2015-03-24  Gary Benson  <gbenson@redhat.com>
2232
2233         * linux-low.h: Include nat/linux-nat.h.
2234         * linux-low.c (iterate_over_lwps_args): New structure.
2235         (iterate_over_lwps_filter): New function.
2236         (iterate_over_lwps): Likewise.
2237         * linux-x86-low.c (update_debug_registers_callback):
2238         Update signature to what iterate_over_lwps expects.
2239         Remove PID check that iterate_over_lwps now performs.
2240         (x86_dr_low_set_addr): Use iterate_over_lwps.
2241         (x86_dr_low_set_control): Likewise.
2242
2243 2015-03-24  Gary Benson  <gbenson@redhat.com>
2244
2245         * linux-x86-low.c (x86_debug_reg_state): New function.
2246         (x86_linux_prepare_to_resume): Use the above.
2247
2248 2015-03-24  Gary Benson  <gbenson@redhat.com>
2249
2250         * linux-low.c (current_lwp_ptid): New function.
2251         * linux-x86-low.c: Include nat/linux-nat.h.
2252         (x86_dr_low_get_addr): Use current_lwp_ptid.
2253         (x86_dr_low_get_control): Likewise.
2254         (x86_dr_low_get_status): Likewise.
2255
2256 2015-03-20  Pedro Alves  <palves@redhat.com>
2257
2258         * tracepoint.c (cmd_qtstatus): Make "str" const.
2259
2260 2015-03-20  Pedro Alves  <palves@redhat.com>
2261
2262         * server.c (handle_general_set): Make "req_str" const.
2263
2264 2015-03-19  Pedro Alves  <palves@redhat.com>
2265
2266         * linux-low.c (linux_resume_one_lwp): Rename to ...
2267         (linux_resume_one_lwp_throw): ... this.  Don't handle ESRCH here,
2268         instead call perror_with_name.
2269         (check_ptrace_stopped_lwp_gone): New function.
2270         (linux_resume_one_lwp): Reimplement as wrapper around
2271         linux_resume_one_lwp_throw that swallows errors if the LWP is
2272         gone.
2273
2274 2015-03-19  Pedro Alves  <palves@redhat.com>
2275
2276         * linux-low.c (count_events_callback, select_event_lwp_callback):
2277         No longer check whether the thread has resume_stop as last resume
2278         kind.
2279
2280 2015-03-19 Pedro Alves  <palves@redhat.com>
2281
2282         * linux-low.c (count_events_callback, select_event_lwp_callback):
2283         Use the lwp's status_pending_p field, not the thread's.
2284
2285 2015-03-19  Pedro Alves  <palves@redhat.com>
2286
2287         * linux-low.c (select_event_lwp_callback): Update comments to
2288         no longer mention SIGTRAP.
2289
2290 2015-03-18  Gary Benson  <gbenson@redhat.com>
2291
2292         * server.c (handle_query): Do not report vFile:fstat as supported.
2293
2294 2015-03-11  Gary Benson  <gbenson@redhat.com>
2295
2296         * hostio.c (sys/types.h): New include.
2297         (sys/stat.h): Likewise.
2298         (common-remote-fileio.h): Likewise.
2299         (handle_fstat): New function.
2300         (handle_vFile): Handle vFile:fstat packets.
2301
2302 2015-03-11  Gary Benson  <gbenson@redhat.com>
2303
2304         * configure.ac (AC_CHECK_MEMBERS): Add checks for
2305         struct stat.st_blocks and struct stat.st_blksize.
2306         * configure: Regenerate.
2307         * config.in: Likewise.
2308         * Makefile.in (SFILES): Add common/common-remote-fileio.c.
2309         (OBS): Add common-remote-fileio.o.
2310         (common-remote-fileio.o): New rule.
2311
2312 2015-03-09  Pedro Alves  <palves@redhat.com>
2313
2314         * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
2315         'struct sockaddr' pointer in 'accept' call.
2316
2317 2015-03-09  Pedro Alves  <palves@redhat.com>
2318
2319         Revert:
2320         2015-03-07  Pedro Alves  <palves@redhat.com>
2321         * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2322         or <winsock2.h> here.  Instead include "gdb_socket.h".
2323         (remote_open): Use union gdb_sockaddr_u.
2324         * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2325         or <winsock2.h> here.  Instead include "gdb_socket.h".
2326         (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2327         * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2328         or <sys/un.h>.
2329         (init_named_socket, gdb_agent_helper_thread): Use union
2330         gdb_sockaddr_u.
2331
2332 2015-03-07  Pedro Alves  <palves@redhat.com>
2333
2334         * configure.ac (build_warnings): Move
2335         -Wdeclaration-after-statement to the C-specific set.
2336         * configure: Regenerate.
2337
2338 2015-03-07  Pedro Alves  <palves@redhat.com>
2339
2340         * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2341         or <winsock2.h> here.  Instead include "gdb_socket.h".
2342         (remote_open): Use union gdb_sockaddr_u.
2343         * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2344         or <winsock2.h> here.  Instead include "gdb_socket.h".
2345         (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2346         * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2347         or <sys/un.h>.
2348         (init_named_socket, gdb_agent_helper_thread): Use union
2349         gdb_sockaddr_u.
2350
2351 2015-03-07  Pedro Alves  <palves@redhat.com>
2352
2353         Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
2354         instead.
2355
2356 2015-03-06  Yao Qi  <yao.qi@linaro.org>
2357
2358         * linux-aarch64-low.c (aarch64_insert_point): Use
2359         show_debug_regs as a boolean.
2360         (aarch64_remove_point): Likewise.
2361
2362 2015-03-05  Pedro Alves  <palves@redhat.com>
2363
2364         * lynx-low.c (lynx_target_ops): Install NULL hooks for
2365         stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2366         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
2367         * nto-low.c (nto_target_ops): Likewise.
2368         * spu-low.c (spu_target_ops): Likewise.
2369         * win32-low.c (win32_target_ops): Likewise.
2370
2371 2015-03-04  Pedro Alves  <palves@redhat.com>
2372
2373         * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
2374         Decide whether a breakpoint triggered based on the SIGTRAP's
2375         siginfo.si_code.
2376         (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
2377         breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
2378         (linux_low_filter_event): Check for breakpoints before checking
2379         watchpoints.
2380         (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
2381         siginfo.si_code.
2382         (linux_stopped_by_sw_breakpoint)
2383         (linux_supports_stopped_by_sw_breakpoint)
2384         (linux_stopped_by_hw_breakpoint)
2385         (linux_supports_stopped_by_hw_breakpoint): New functions.
2386         (linux_target_ops): Install new target methods.
2387
2388 2015-03-04  Pedro Alves  <palves@redhat.com>
2389
2390         * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
2391         * server.c (swbreak_feature, hwbreak_feature): New globals.
2392         (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
2393         (captured_main): Clear swbreak_feature and hwbreak_feature.
2394         * server.h (swbreak_feature, hwbreak_feature): Declare.
2395         * target.h (struct target_ops) <stopped_by_sw_breakpoint,
2396         supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
2397         supports_stopped_by_hw_breakpoint>: New fields.
2398         (target_supports_stopped_by_sw_breakpoint)
2399         (target_stopped_by_sw_breakpoint)
2400         (target_supports_stopped_by_hw_breakpoint)
2401         (target_stopped_by_hw_breakpoint): Declare.
2402
2403 2015-03-04  Pedro Alves  <palves@redhat.com>
2404
2405         enum lwp_stop_reason -> enum target_stop_reason
2406         * linux-low.c (check_stopped_by_breakpoint): Adjust.
2407         (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
2408         (linux_wait_1, stuck_in_jump_pad_callback)
2409         (move_out_of_jump_pad_callback, linux_resume_one_lwp)
2410         (linux_stopped_by_watchpoint):
2411         * linux-low.h (enum lwp_stop_reason): Delete.
2412         (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
2413         * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2414
2415 2015-03-04  Yao Qi  <yao.qi@linaro.org>
2416
2417         * Makefile.in (SFILES): Add linux-aarch64-low.c.
2418
2419 2015-03-03  Gary Benson  <gbenson@redhat.com>
2420
2421         * hostio.c (handle_vFile): Fix prefix lengths.
2422
2423 2015-03-03  Markus Metzger  <markus.t.metzger@intel.com>
2424
2425         * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
2426         ptr_bits.
2427
2428 2015-03-02  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2429
2430         * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
2431         (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
2432         (clean): Add "rm -f" for above C files.
2433         * configure.srv (srv_regobj): Add s390-vx-linux64.o,
2434         s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
2435         (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
2436         s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
2437         * linux-s390-low.c (HWCAP_S390_VX): New macro.
2438         (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
2439         (init_registers_s390x_vx_linux64)
2440         (init_registers_s390x_tevx_linux64)
2441         (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
2442         (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
2443         declarations.
2444         (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
2445         (s390_store_vxrs_high): New functions.
2446         (s390_regsets): Add entries for NT_S390_VXRS_LOW and
2447         NT_S390_VXRS_HIGH.
2448         (s390_arch_setup): Add logic for selecting one of the new target
2449         descriptions.  Activate the new vector regsets if applicable.
2450         (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
2451         init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
2452         and init_registers_s390x_tevx_linux64.
2453
2454 2015-03-01  Pedro Alves  <palves@redhat.com>
2455
2456         * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
2457         parameter.
2458
2459 2015-02-27  Pedro Alves  <palves@redhat.com>
2460
2461         * linux-x86-low.c (u_debugreg_offset): New function.
2462         (x86_linux_dr_get, x86_linux_dr_set): Use it.
2463
2464 2015-02-27  Pedro Alves  <palves@redhat.com>
2465
2466         * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
2467         [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
2468         [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
2469         ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2470         (ps_lsetfpregs, ps_getpid)
2471         (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
2472         (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
2473         (ps_lsetxregs, ps_plog): Declare.
2474
2475 2015-02-27  Pedro Alves  <palves@redhat.com>
2476
2477         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
2478         IP_AGENT_EXPORT_FUNC.
2479         * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
2480         IP_AGENT_EXPORT_FUNC.
2481         * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
2482         (IP_AGENT_EXPORT): Delete.
2483         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2484         (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2485         (gdb_trampoline_buffer_error, collecting, gdb_collect)
2486         (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
2487         (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
2488         (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
2489         (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
2490         (traceframe_read_count, traceframe_write_count)
2491         (traceframes_created, trace_state_variables, get_raw_reg)
2492         (get_trace_state_variable_value, set_trace_state_variable_value)
2493         (ust_loaded, helper_thread_id, cmd_buf): Use
2494         IPA_SYM_EXPORTED_NAME.
2495         (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
2496         (tracepoints) Use IP_AGENT_EXPORT_VAR.
2497         (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
2498         IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2499         (last_tracepoint): Move into !IN_PROCESS_AGENT block.
2500         (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
2501         EXTERN_C_PUSH/EXTERN_C_POP.
2502         (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
2503         (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
2504         wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2505         (trace_buffer_ctrl, trace_buffer_ctrl_curr)
2506         (traceframe_write_count, traceframe_read_count)
2507         (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
2508         (about_to_request_buffer_space, get_trace_state_variable_value)
2509         (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
2510         (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
2511         EXTERN_C_PUSH/EXTERN_C_POP.
2512         (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2513         (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2514         (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2515         and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2516         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2517         (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2518         (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2519         * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2520         Define.
2521         (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2522         (IP_AGENT_EXPORT_VAR_DECL): Define.
2523         (tracing): Declare.
2524         (gdb_agent_get_raw_reg): Declare.
2525
2526 2015-02-27  Tom Tromey  <tromey@redhat.com>
2527             Pedro Alves  <palves@redhat.com>
2528
2529         Rename symbols whose names are reserved C++ keywords throughout.
2530
2531 2015-02-27  Pedro Alves  <palves@redhat.com>
2532
2533         * Makefile.in (COMPILER): New, get it from autoconf.
2534         (CXX): Get from autoconf instead.
2535         (COMPILE.pre): Use COMPILER.
2536         (CC-LD): Rename to ...
2537         (CC_LD): ... this.  Use COMPILER.
2538         (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2539         (CXX_FOR_TARGET): Default to g++ instead of gcc.
2540         * acinclude.m4: Include build-with-cxx.m4.
2541         * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2542         Disable -Werror by default if building in C++ mode.
2543         (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2544         -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2545         the C++ compiler.  Save/restore CXXFLAGS too.
2546         * configure: Regenerate.
2547
2548 2015-02-27  Pedro Alves  <palves@redhat.com>
2549
2550         * acinclude.m4: Include libiberty.m4.
2551         * configure.ac: Call libiberty_INIT.
2552         * config.in, configure: Regenerate.
2553
2554 2015-02-26  Pedro Alves  <palves@redhat.com>
2555
2556         * linux-low.c (linux_wait_1): When incrementing the PC past a
2557         program breakpoint always use the_low_target.breakpoint_len as
2558         increment, rather than the maximum between that and
2559         the_low_target.decr_pc_after_break.
2560
2561 2015-02-23  Pedro Alves  <palves@redhat.com>
2562
2563         * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2564         thread was doing a step-over; always adjust the PC if
2565         we stepped over a permanent breakpoint.
2566         (linux_wait_1): If we stepped over breakpoint that was on top of a
2567         permanent breakpoint, manually advance the PC past it.
2568
2569 2015-02-23  Pedro Alves  <palves@redhat.com>
2570
2571         * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2572         modes.
2573         (x86_fill_gregset, x86_store_gregset): Use it when handling
2574         $orig_eax.
2575
2576 2015-02-20  Pedro Alves  <palves@redhat.com>
2577
2578         * thread-db.c: Include "nat/linux-procfs.h".
2579         (thread_db_init): Skip listing new threads if the kernel supports
2580         PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2581
2582 2015-02-20  Pedro Alves  <palves@redhat.com>
2583
2584         * linux-low.c (status_pending_p_callback): Use ptid_match.
2585
2586 2015-02-19  Antoine Tremblay  <antoine.tremblay@ericsson.com>
2587
2588         PR breakpoints/16812
2589         * linux-low.c (wstatus_maybe_breakpoint): Remove.
2590         (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2591         (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2592
2593 2015-02-10  Antoine Tremblay <antoine.tremblay@ericsson.com>
2594
2595         PR breakpoints/15956
2596         * tracepoint.c (cmd_qtinit): Add check for current_thread.
2597
2598 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
2599
2600         * linux-low.c (linux_low_btrace_conf): Print size.
2601         * server.c (handle_btrace_conf_general_set): New.
2602         (hanle_general_set): Call handle_btrace_conf_general_set.
2603         (handle_query): Report Qbtrace-conf:bts:size as supported.
2604
2605 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
2606
2607         * linux-low.c (linux_low_enable_btrace): Update parameters.
2608         (linux_low_btrace_conf): New.
2609         (linux_target_ops)<to_btrace_conf>: Initialize.
2610         * server.c (current_btrace_conf): New.
2611         (handle_btrace_enable): Rename to ...
2612         (handle_btrace_enable_bts): ... this.  Pass &current_btrace_conf
2613         to target_enable_btrace.  Update comment.  Update users.
2614         (handle_qxfer_btrace_conf): New.
2615         (qxfer_packets): Add btrace-conf entry.
2616         (handle_query): Report qXfer:btrace-conf:read as supported packet.
2617         * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2618         (target_ops)<read_btrace_conf>: New.
2619         (target_enable_btrace): Update parameters.
2620         (target_read_btrace_conf): New.
2621
2622 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
2623
2624         * server.c (handle_btrace_general_set): Remove call to
2625         target_supports_btrace.
2626         (supported_btrace_packets): New.
2627         (handle_query): Call supported_btrace_packets.
2628         * target.h: include btrace-common.h.
2629         (btrace_target_info): Removed.
2630         (supports_btrace, target_supports_btrace): Update parameters.
2631
2632 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
2633
2634         * Makefile.in (SFILES): Add common/btrace-common.c.
2635         (OBS): Add common/btrace-common.o.
2636         (btrace-common.o): Add build rules.
2637         * linux-low: Include btrace-common.h.
2638         (linux_low_read_btrace): Use struct btrace_data.  Call
2639         btrace_data_init and btrace_data_fini.
2640
2641 2015-02-06  Pedro Alves  <palves@redhat.com>
2642
2643         * thread-db.c (find_new_threads_callback): Add debug output.
2644
2645 2015-02-04  Pedro Alves  <palves@redhat.com>
2646
2647         * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2648         (resume_stopped_resumed_lwps): New function.
2649         (linux_wait_for_event_filtered): Use it.
2650
2651 2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
2652
2653         * Makefile.in (SFILES): Add linux-personality.c.
2654         (linux-personality.o): New rule.
2655         * configure.srv (srv_linux_obj): Add linux-personality.o to the
2656         list of objects to be built.
2657         * linux-low.c: Include nat/linux-personality.h.
2658         (linux_create_inferior): Remove code to disable address space
2659         randomization (moved to ../nat/linux-personality.c).  Create
2660         cleanup to disable address space randomization.
2661
2662 2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
2663
2664         * Makefile.in (posix-strerror.o): New rule.
2665         (mingw-strerror.o): Likewise.
2666         * configure: Regenerated.
2667         * configure.ac: Source file ../common/common.host.  Initialize new
2668         variable srv_host_obs.  Add srv_host_obs to GDBSERVER_DEPFILES.
2669
2670 2015-01-14  Yao Qi  <yao@codesourcery.com>
2671
2672         * Makefile.in (SFILES): Add nat/ppc-linux.c.
2673         (ppc-linux.o): New rule.
2674         * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2675         * configure.ac: AC_CHECK_FUNCS(getauxval).
2676         * config.in: Re-generated.
2677         * configure: Re-generated.
2678         * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2679         ppc64_64bit_inferior_p
2680
2681 2015-01-14  Yao Qi  <yao@codesourcery.com>
2682
2683         * linux-ppc-low.c: Include "nat/ppc-linux.h".
2684          (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2685         (PPC_FEATURE_HAS_ALTIVEC,  PPC_FEATURE_HAS_SPE): Likewise.
2686         (PT_ORIG_R3, PT_TRAP): Likewise.
2687         (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2688         (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2689         (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2690
2691 2015-01-10  Joel Brobecker  <brobecker@adacore.com>
2692
2693         * i387-fp.c (i387_cache_to_xsave): In look over
2694         num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2695         zmmh_low_space field by use of zmmh_high_space.
2696
2697 2015-01-09  Pedro Alves  <palves@redhat.com>
2698
2699         * linux-low.c (step_over_bkpt): Move higher up in the file.
2700         (handle_extended_wait): Don't store the stop_pc here.
2701         (get_stop_pc): Adjust comments and rename to ...
2702         (check_stopped_by_breakpoint): ... this.  Record whether the LWP
2703         stopped for a software breakpoint or hardware breakpoint.
2704         (thread_still_has_status_pending_p): New function.
2705         (status_pending_p_callback): Use
2706         thread_still_has_status_pending_p.  If the event is no longer
2707         interesting, resume the LWP.
2708         (handle_tracepoints): Add assert.
2709         (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2710         (wstatus_maybe_breakpoint): New function.
2711         (cancel_breakpoint): Delete function.
2712         (check_stopped_by_watchpoint): New function, factored out from
2713         linux_low_filter_event.
2714         (lp_status_maybe_breakpoint): Delete function.
2715         (linux_low_filter_event): Remove filter_ptid argument.
2716         Leave thread group exits pending here.  Store the LWP's stop PC.
2717         Always leave events pending.
2718         (linux_wait_for_event_filtered): Pull all events out of the
2719         kernel, and leave them all pending.
2720         (count_events_callback, select_event_lwp_callback): Consider all
2721         events.
2722         (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2723         (select_event_lwp): Only give preference to the stepping LWP in
2724         all-stop mode.  Adjust comments.
2725         (ignore_event): New function.
2726         (linux_wait_1): Delete 'retry' label.  Use ignore_event.  Remove
2727         references to cancel_breakpoints.  Adjust to renames.  Also give
2728         equal priority to all LWPs that have had events in non-stop mode.
2729         If reporting a software breakpoint event, unadjust the LWP's PC.
2730         (linux_wait): If linux_wait_1 returned an ignored event, retry.
2731         (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2732         Adjust.
2733         (linux_resume_one_lwp): Store the LWP's PC.  Adjust.
2734         (resume_status_pending_p): Use thread_still_has_status_pending_p.
2735         (linux_stopped_by_watchpoint): Adjust.
2736         (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2737         * linux-low.h (enum lwp_stop_reason): New.
2738         (struct lwp_info) <stop_pc>: Adjust comment.
2739         <stopped_by_watchpoint>: Delete field.
2740         <stop_reason>: New field.
2741         * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2742         * mem-break.c (software_breakpoint_inserted_here)
2743         (hardware_breakpoint_inserted_here): New function.
2744         * mem-break.h (software_breakpoint_inserted_here)
2745         (hardware_breakpoint_inserted_here): Declare.
2746         * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2747         (cancel_breakpoints): Delete.
2748         * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2749         (upload_fast_traceframes): Remove references to
2750         cancel_breakpoints.
2751
2752 2015-01-09  Pedro Alves  <palves@redhat.com>
2753
2754         * thread-db.c (find_new_threads_callback): Ignore thread if the
2755         kernel thread ID is -1.
2756
2757 2015-01-09  Pedro Alves  <palves@redhat.com>
2758
2759         * linux-low.c (linux_attach_fail_reason_string): Move to
2760         nat/linux-ptrace.c, and rename.
2761         (linux_attach_lwp): Update comment.
2762         (attach_proc_task_lwp_callback): New function.
2763         (linux_attach): Adjust to rename and use
2764         linux_proc_attach_tgid_threads.
2765         (linux_attach_fail_reason_string): Delete declaration.
2766
2767 2015-01-01  Joel Brobecker  <brobecker@adacore.com>
2768
2769         * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2770         * server.c (gdbserver_version): Likewise.
2771
2772 2014-12-29  Sergio Durigan Junior  <sergiodj@redhat.com>
2773
2774         * remote-utils.c: Include ctype.h.
2775         (input_interrupt): Explicitly handle the case when the char
2776         received is the NUL byte.  Improve the printing of non-ASCII
2777         characters.
2778
2779 2014-12-16  Joel Brobecker  <brobecker@adacore.com>
2780
2781         * linux-low.c (linux_low_filter_event): Update call to
2782         linux_enable_event_reporting following the addition of
2783         a new parameter to that function.
2784
2785 2014-12-16  Catalin Udma  <catalin.udma@freescale.com>
2786
2787         PR server/17457
2788         * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2789         (AARCH64_FPCR_REGNO): Likewise.
2790         (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2791         (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2792         (aarch64_store_fpregset): Likewise.
2793
2794 2014-12-15  Joel Brobecker  <brobecker@adacore.com>
2795
2796         * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2797         Remove FIXME comment about assumption about N.
2798
2799 2014-12-13  Joel Brobecker  <brobecker@adacore.com>
2800
2801         * configure.ac: If large-file support is disabled in GDBserver,
2802         pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2803         * configure: Regenerate.
2804
2805 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2806
2807         * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2808         warning upon ENODATA from ptrace.
2809         * linux-s390-low.c (s390_store_tdb): New.
2810         (s390_regsets): Add regset for NT_S390_TDB.
2811
2812 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2813
2814         * linux-low.c (regsets_store_inferior_registers): Skip regsets
2815         without a fill_function.
2816         * linux-s390-low.c (s390_fill_last_break): Remove.
2817         (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2818         (s390_arch_setup): Use regset's size instead of fill_function for
2819         loop end condition.
2820
2821 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2822
2823         * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2824         the regset's store function when ptrace returned an error.
2825         * regcache.c (get_thread_regcache): Invalidate register cache
2826         before fetching inferior's registers.
2827
2828 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2829
2830         * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2831         while-loop as for-loop.
2832         (regsets_store_inferior_registers): Likewise.
2833
2834 2014-11-28  Yao Qi  <yao@codesourcery.com>
2835
2836         * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2837         * config.in, configure: Re-generate.
2838         * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2839         is defined.
2840
2841 2014-11-21  Yao Qi  <yao@codesourcery.com>
2842
2843         * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2844         (AC_CHECK_HEADERS): Remove malloc.h.
2845         * configure: Re-generated.
2846         * config.in: Re-generated.
2847         * server.h: Don't include alloca.h and malloc.h.
2848         * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2849         Don't include malloc.h.
2850
2851 2014-11-17  Joel Brobecker  <brobecker@adacore.com>
2852
2853         * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2854         corresponding ERRNO check in same block.
2855
2856 2014-11-12  Pedro Alves  <palves@redhat.com>
2857
2858         * server.c (cont_thread): Update comment.
2859         (start_inferior, attach_inferior): No longer clear cont_thread.
2860         (handle_v_cont): No longer set cont_thread.
2861         (captured_main): Clear cont_thread each time a GDB connects.
2862
2863 2014-11-12  Pedro Alves  <palves@redhat.com>
2864
2865         * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2866         thread, and don't resume all threads if the Hc thread has exited.
2867
2868 2014-11-12  Pedro Alves  <palves@redhat.com>
2869
2870         * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2871         the process group instead of to a specific LWP.
2872
2873 2014-10-15  Pedro Alves  <palves@redhat.com>
2874
2875         PR server/17487
2876         * win32-arm-low.c (arm_set_thread_context): Remove current_event
2877         parameter.
2878         (arm_set_thread_context): Delete.
2879         (the_low_target): Adjust.
2880         * win32-i386-low.c (debug_registers_changed)
2881         (debug_registers_used): Delete.
2882         (update_debug_registers_callback): New function.
2883         (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2884         needing to update their debug registers.
2885         (win32_get_current_dr): New function.
2886         (x86_dr_low_get_addr, x86_dr_low_get_control)
2887         (x86_dr_low_get_status): Fetch the debug register from the thread
2888         record's context.
2889         (i386_initial_stuff): Adjust.
2890         (i386_get_thread_context): Remove current_event parameter.  Don't
2891         clear debug_registers_changed nor copy DR values to
2892         debug_reg_state.
2893         (i386_set_thread_context): Delete.
2894         (i386_prepare_to_resume): New function.
2895         (i386_thread_added): Mark the thread as needing to update irs
2896         debug registers.
2897         (the_low_target): Remove i386_set_thread_context and install
2898         i386_prepare_to_resume.
2899         * win32-low.c (win32_get_thread_context): Adjust.
2900         (win32_set_thread_context): Use SetThreadContext
2901         directly.
2902         (win32_prepare_to_resume): New function.
2903         (win32_require_context): New function, factored out from ...
2904         (thread_rec): ... this.
2905         (continue_one_thread): Call win32_prepare_to_resume on each thread
2906         we're about to continue.
2907         (win32_resume): Call win32_prepare_to_resume on the event thread.
2908         * win32-low.h (struct win32_thread_info)
2909         <debug_registers_changed>: New field.
2910         (struct win32_target_ops): Change prototype of set_thread_context,
2911         delete set_thread_context and add prepare_to_resume.
2912         (win32_require_context): New declaration.
2913
2914 2014-10-08  Gary Benson  <gbenson@redhat.com>
2915
2916         * server.h: Do not include common-exceptions.h.
2917
2918 2014-10-08  Gary Benson  <gbenson@redhat.com>
2919
2920         * server.h: Do not include cleanups.h.
2921
2922 2014-09-30  James Hogan  <james.hogan@imgtec.com>
2923
2924         * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2925         mips64-dsp-linux.c.
2926
2927 2014-09-23  Yao Qi  <yao@codesourcery.com>
2928
2929         * linux-low.c (lp_status_maybe_breakpoint): New function.
2930         (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2931         (count_events_callback): Likewise.
2932         (select_event_lwp_callback): Likewise.
2933         (cancel_breakpoints_callback): Likewise.
2934
2935 2014-09-19  Don Breazeal  <donb@codesourcery.com>
2936
2937         * linux-low.c (handle_extended_wait): Call
2938         linux_ptrace_get_extended_event.
2939         (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2940         linux_is_extended_waitstatus.
2941
2942 2014-09-16  Joel Brobecker  <brobecker@adacore.com>
2943
2944         * Makefile.in (CPPFLAGS): Define.
2945         (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2946         (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2947
2948 2014-09-16  Gary Benson  <gbenson@redhat.com>
2949
2950         * inferiors.h (current_inferior): Renamed as...
2951         (current_thread): New variable.  All uses updated.
2952         * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2953         (maybe_move_out_of_jump_pad): Likewise.
2954         (cancel_breakpoint): Likewise.
2955         (linux_low_filter_event): Likewise.
2956         (wait_for_sigstop): Likewise.
2957         (linux_resume_one_lwp): Likewise.
2958         (need_step_over_p): Likewise.
2959         (start_step_over): Likewise.
2960         (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2961         * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2962         * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2963         and save_inferior as saved_thread.
2964         * regcache.c (get_thread_regcache): Renamed saved_inferior as
2965         saved_thread.
2966         (regcache_invalidate_thread): Likewise.
2967         * remote-utils.c (prepare_resume_reply): Likewise.
2968         * thread-db.c (thread_db_get_tls_address): Likewise.
2969         (disable_thread_event_reporting): Likewise.
2970         (remove_thread_event_breakpoints): Likewise.
2971         * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2972         as saved_thread.
2973         * target.h (set_desired_inferior): Renamed as...
2974         (set_desired_thread): New declaration.  All uses updated.
2975         * server.c (myresume): Updated comment to reference thread instead
2976         of inferior.
2977         (handle_serial_event): Likewise.
2978         (handle_target_event): Likewise.
2979
2980 2014-09-12  Tom Tromey  <tromey@redhat.com>
2981             Gary Benson  <gbenson@redhat.com>
2982
2983         * regcache.h: Include common-regcache.h.
2984         (regcache_read_pc): Don't declare.
2985         * regcache.c (get_thread_regcache_for_ptid): New function.
2986
2987 2014-09-11  Tom Tromey  <tromey@redhat.com>
2988             Gary Benson  <gbenson@redhat.com>
2989
2990         * symbol.c: New file.
2991         * Makefile.in (SFILES): Add symbol.c.
2992         (OBS): Add symbol.o.
2993
2994 2014-09-11  Gary Benson  <gbenson@redhat.com>
2995
2996         * target.c (target_stop_ptid, target_continue_ptid): New
2997         functions.
2998
2999 2014-09-11  Tom Tromey  <tromey@redhat.com>
3000             Gary Benson  <gbenson@redhat.com>
3001
3002         * target.h: Include target/target.h.
3003         * target.c (target_read_memory, target_read_uint32)
3004         (target_write_memory): New functions.
3005
3006 2014-09-11  Gary Benson  <gbenson@redhat.com>
3007
3008         * server.h (debug_hw_points): Don't declare.
3009         * server.c (debug_hw_points): Don't define.  Replace all uses
3010         with show_debug_regs.
3011         * linux-aarch64-low.c (debug_hw_points): Don't define.  Replace
3012         all uses with show_debug_regs.
3013
3014 2014-09-08  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
3015
3016         * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
3017         endianness into account.
3018         (ppc_supply_ptrace_register): Likewise.
3019
3020 2014-09-03  James Hogan  <james.hogan@imgtec.com>
3021
3022         * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
3023         to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
3024
3025 2014-09-03  Gary Benson  <gbenson@redhat.com>
3026
3027         * linux-x86-low.c (x86_linux_prepare_to_resume): Use
3028         ALL_DEBUG_ADDRESS_REGISTERS.
3029
3030 2014-09-02  Gary Benson  <gbenson@redhat.com>
3031
3032         * i386-low.h: Renamed as...
3033         * x86-low.h: New file.  All type, function and variable name
3034         prefixes changed from "i386_" to "x86_".  All references updated.
3035         * i386-low.c: Renamed as...
3036         * x86-low.c: New file.  All type, function and variable name
3037         prefixes changed from "i386_" to "x86_".  All references updated.
3038
3039 2014-09-02  Gary Benson  <gbenson@redhat.com>
3040
3041         * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
3042         (x86_linux_new_thread): Likewise.
3043
3044 2014-08-29  Gary Benson  <gbenson@redhat.com>
3045
3046         * server.h (setjmp.h): Do not include.
3047         (toplevel): Do not declare.
3048         (common-exceptions.h): Include.
3049         (cleanups.h): Likewise.
3050         * server.c (toplevel): Do not define.
3051         (exit_code): New static global.
3052         (detach_or_kill_for_exit_cleanup): New function.
3053         (main): New function.  Original main renamed to...
3054         (captured_main): New function.
3055         * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
3056
3057 2014-08-29  Gary Benson  <gbenson@redhat.com>
3058
3059         * Makefile.in (SFILES): Add common/common-exceptions.c.
3060         (OBS): Add common-exceptions.o.
3061         (common-exceptions.o): New rule.
3062         * utils.c (prepare_to_throw_exception): New function.
3063
3064 2014-08-29  Gary Benson  <gbenson@redhat.com>
3065
3066         * config.in: Regenerate.
3067         * configure: Likewise.
3068
3069 2014-08-29  Gary Benson  <gbenson@redhat.com>
3070
3071         * Makefile.in (SFILES): Add common/cleanups.c.
3072         (OBS): cleanups.o.
3073         (cleanups.o): New rule.
3074
3075 2014-08-29  Gary Benson  <gbenson@redhat.com>
3076
3077         * utils.c (internal_vwarning): New function.
3078
3079 2014-08-28  Gary Benson  <gbenson@redhat.com>
3080
3081         * utils.h (fatal): Remove declaration.
3082         * utils.c (fatal): Remove function.
3083
3084 2014-08-28  Gary Benson  <gbenson@redhat.com>
3085
3086         * tracepoint.c (gdb_agent_init): Replace fatal with
3087         perror_with_name.
3088         (initialize_tracepoint): Likewise.
3089
3090 2014-08-28  Gary Benson  <gbenson@redhat.com>
3091
3092         * remote-utils.c (remote_prepare): Replace fatal with error.
3093
3094 2014-08-28  Gary Benson  <gbenson@redhat.com>
3095
3096         * linux-low.c (linux_async): Replace fatal with warning.
3097         Tidy up and return.
3098         (linux_start_non_stop): Return -1 if linux_async failed.
3099
3100 2014-08-28  Gary Benson  <gbenson@redhat.com>
3101
3102         * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
3103         gdb_assert.
3104         (i386_dr_low_get_addr): Remove vague comment.
3105         * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
3106         gdb_assert.
3107
3108 2014-08-28  Gary Benson  <gbenson@redhat.com>
3109
3110         * inferiors.c (get_thread_process): Replace check with gdb_assert.
3111         * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
3112         internal_error.
3113         (linux_resume_one_lwp): Likewise.
3114         * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
3115         gdb_assert.
3116         * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
3117         with internal_error.
3118         * regcache.c (get_thread_regcache): Replace check with gdb_assert.
3119         (init_register_cache): Replace fatal with gdb_assert_not_reached.
3120         (find_register_by_name): Replace fatal with internal_error.
3121         (find_regno): Likewise.
3122         * tdesc.c (init_target_desc): Replace check with gdb_assert.
3123         * thread-db.c (thread_db_create_event): Likewise.
3124         (thread_db_load_search): Likewise.
3125         (try_thread_db_load_1): Likewise.
3126         * tracepoint.c (get_jump_space_head): Replace fatal with
3127         internal_error.
3128         (claim_trampoline_space): Likewise.
3129         (have_fast_tracepoint_trampoline_buffer): Likewise.
3130         (cmd_qtstart): Likewise.
3131         (stop_tracing): Likewise.
3132         (fast_tracepoint_collecting): Likewise.
3133         (target_malloc): Likewise.
3134         (download_tracepoint): Likewise.
3135         (download_trace_state_variables): Replace check with gdb_assert.
3136         (upload_fast_traceframes): Replace fatal with internal_error.
3137
3138 2014-08-19  Tom Tromey  <tromey@redhat.com>
3139             Gary Benson  <gbenson@redhat.com>
3140
3141         * Makefile.in (SFILES): Add common/common-debug.c.
3142         (OBS): Add common-debug.o.
3143         (common-debug.o): New rule.
3144         * debug.h (debug_printf): Don't declare.
3145         * debug.c (debug_printf): Renamed and rewritten as...
3146         (debug_vprintf): New function.
3147
3148 2014-08-19  Gary Benson  <gbenson@redhat.com>
3149
3150         * utils.h: Do not include print-utils.h.
3151
3152 2014-08-19  Tom Tromey  <tromey@redhat.com>
3153             Gary Benson  <gbenson@redhat.com>
3154
3155         * server.h: Add static assertion.
3156         (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
3157
3158 2014-08-19  Tom Tromey  <tromey@redhat.com>
3159             Gary Benson  <gbenson@redhat.com>
3160
3161         * Makefile.in (SFILES): Add common/errors.c.
3162         (OBS): Add errors.o.
3163         (IPA_OBS): Add errors-ipa.o.
3164         (errors.o): New rule.
3165         (errors-ipa.o): Likewise.
3166         * utils.h (perror_with_name, error, warning): Don't declare.
3167         * utils.c (warning): Renamed and rewritten as...
3168         (vwarning): New function.
3169         (error): Renamed and rewritten as...
3170         (verror): New function.
3171         (internal_error): Renamed and rewritten as...
3172         (internal_verror): New function.
3173
3174 2014-08-07  Gary Benson  <gbenson@redhat.com>
3175
3176         * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
3177         * configure: Regenerate.
3178         * config.in: Likewise.
3179         * server.h: Do not include errno.h.
3180         * event-loop.c: Likewise.
3181         * hostio-errno.c: Likewise.
3182         * linux-low.c: Likewise.
3183         * remote-utils.c: Likewise.
3184         * spu-low.c: Likewise.
3185         * utils.c: Likewise.
3186         * gdbreplay.c: Unconditionally include errno.h.
3187
3188 2014-08-07  Gary Benson  <gbenson@redhat.com>
3189
3190         * server.h: Do not include string.h.
3191         * event-loop.c: Likewise.
3192         * linux-low.c: Likewise.
3193         * regcache.c: Likewise.
3194         * remote-utils.c: Likewise.
3195         * spu-low.c: Likewise.
3196         * utils.c: Likewise.
3197
3198 2014-08-07  Gary Benson  <gbenson@redhat.com>
3199
3200         * server.h: Do not include gdb_assert.h.
3201
3202 2014-08-07  Gary Benson  <gbenson@redhat.com>
3203
3204         * server.h: Do not include common-utils.h.
3205
3206 2014-08-07  Gary Benson  <gbenson@redhat.com>
3207
3208         * server.h: Do not include ptid.h.
3209         * notif.h: Likewise.
3210
3211 2014-08-07  Gary Benson  <gbenson@redhat.com>
3212
3213         * server.h: Do not include gdb_locale.h.
3214
3215 2014-08-07  Gary Benson  <gbenson@redhat.com>
3216
3217         * server.h: Do not include gdb/signals.h.
3218         * win32-low.c: Likewise.
3219
3220 2014-08-07  Gary Benson  <gbenson@redhat.com>
3221
3222         * server.h: Do not include pathmax.h.
3223
3224 2014-08-07  Gary Benson  <gbenson@redhat.com>
3225
3226         * server.h: Do not include libiberty.h.
3227         * linux-bfin-low.c: Likewise.
3228
3229 2014-08-07  Gary Benson  <gbenson@redhat.com>
3230
3231         * server.h: Do not include ansidecl.h.
3232
3233 2014-08-07  Gary Benson  <gbenson@redhat.com>
3234
3235         * linux-x86-low.c: Do not include stddef.h.
3236         * lynx-ppc-low.c: Likewise.
3237         * tracepoint.c: Likewise.
3238
3239 2014-08-07  Gary Benson  <gbenson@redhat.com>
3240
3241         * server.h: Do not include stdarg.h.
3242         * nto-low.c: Likewise.
3243
3244 2014-08-07  Gary Benson  <gbenson@redhat.com>
3245
3246         * server.h: Do not include stdlib.h.
3247         * inferiors.c: Likewise.
3248         * linux-low.c: Likewise.
3249         * regcache.c: Likewise.
3250         * spu-low.c: Likewise.
3251         * tracepoint.c: Likewise.
3252         * utils.c: Likewise.
3253
3254 2014-08-07  Gary Benson  <gbenson@redhat.com>
3255
3256         * server.h: Do not include stdio.h.
3257         * linux-low.c: Likewise.
3258         * remote-utils.c: Likewise.
3259         * spu-low.c: Likewise.
3260         * utils.c: Likewise.
3261         * wincecompat.c: Likewise.
3262
3263 2014-08-06  Gary Benson  <gbenson@redhat.com>
3264
3265         * regcache.c (init_register_cache): Move conditionals inside if.
3266
3267 2014-08-06  Gary Benson  <gbenson@redhat.com>
3268
3269         * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
3270
3271 2014-07-31  Gary Benson  <gbenson@redhat.com>
3272
3273         * ax.h: Do not include server.h.
3274         * gdbthread.h: Likewise.
3275         * lynx-low.h: Likewise.
3276         * notif.h: Likewise.
3277
3278 2014-07-30  Gary Benson  <gbenson@redhat.com>
3279
3280         * server.h: Include common-defs.h.
3281         Do not include config.h or build-gnulib-gdbserver/config.h.
3282
3283 2014-07-30  Gary Benson  <gbenson@redhat.com>
3284
3285         * hostio-errno.c: Move server.h to top of includes list.
3286         * inferiors.c: Likewise.
3287         * linux-x86-low.c: Likewise.
3288         * notif.c: Include server.h.
3289
3290 2014-07-24  Tom Tromey  <tromey@redhat.com>
3291             Gary Benson  <gbenson@redhat.com>
3292
3293         * server.h (CORE_ADDR): Now unsigned.
3294
3295 2014-07-16  Pedro Alves  <palves@redhat.com>
3296
3297         * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
3298
3299 2014-07-15  Pedro Alves  <palves@redhat.com>
3300
3301         * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
3302         copy.
3303
3304 2014-07-11  Pedro Alves  <palves@redhat.com>
3305
3306         * linux-low.c (kill_wait_lwp): New function, based on
3307         kill_one_lwp_callback, but use my_waitpid directly.
3308         (kill_one_lwp_callback, linux_kill): Use it.
3309
3310 2014-06-23  Pedro Alves  <palves@redhat.com>
3311
3312         * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
3313         before setting DR0..DR3.
3314
3315 2014-06-20  Gary Benson  <gbenson@redhat.com>
3316
3317         * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
3318         * configure: Regenerated.
3319         * config.in: Likewise.
3320
3321 2014-06-20  Gary Benson  <gbenson@redhat.com>
3322
3323         * Makefile.in (SFILES): Update locations for files moved
3324         from common to nat.
3325         (object file files): Reordered.
3326
3327 2014-06-20  Gary Benson  <gbenson@redhat.com>
3328
3329         * i386-low.h (i386_dr_low_can_set_addr): Removed.
3330         (i386_dr_low_set_addr): Likewise.
3331         (i386_dr_low_get_addr): Likewise.
3332         (i386_dr_low_can_set_control): Likewise.
3333         (i386_dr_low_set_control): Likewise.
3334         (i386_dr_low_get_control): Likewise.
3335         (i386_dr_low_get_status): Likewise.
3336         (i386_get_debug_register_length): Likewise.
3337         * linux-x86-low.c (i386_dr_low_set_addr):
3338         Changed signature.  Made static.
3339         (i386_dr_low_get_addr): Likewise.
3340         (i386_dr_low_set_control): Likewise.
3341         (i386_dr_low_get_control): Likewise.
3342         (i386_dr_low_get_status): Likewise.
3343         (i386_dr_low): New global variable.
3344         * win32-i386-low.c (i386_dr_low_set_addr):
3345         Changed signature.  Made static.
3346         (i386_dr_low_get_addr): Likewise.
3347         (i386_dr_low_set_control): Likewise.
3348         (i386_dr_low_get_control): Likewise.
3349         (i386_dr_low_get_status): Likewise.
3350         (i386_dr_low): New global variable.
3351
3352 2014-06-20  Marcus Shawcroft  <marcus.shawcroft@arm.com>
3353
3354         * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
3355         * Makefile.in (AR, AR_FLAGS): Define.
3356         * configure: Regenerate.
3357
3358 2014-06-19  Gary Benson  <gbenson@redhat.com>
3359
3360         * Makefile.in (i386-dregs.o): New rule.
3361         * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
3362         * i386-low.c (target.h): Remove include.
3363         (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
3364         (DR_CONTROL_SHIFT): Likewise.
3365         (DR_CONTROL_SIZE): Likewise.
3366         (DR_RW_EXECUTE): Likewise.
3367         (DR_RW_WRITE): Likewise.
3368         (DR_RW_READ): Likewise.
3369         (DR_RW_IORW): Likewise.
3370         (DR_LEN_1): Likewise.
3371         (DR_LEN_2): Likewise.
3372         (DR_LEN_4): Likewise.
3373         (DR_LEN_8): Likewise.
3374         (DR_LOCAL_ENABLE_SHIFT): Likewise.
3375         (DR_GLOBAL_ENABLE_SHIFT): Likewise.
3376         (DR_ENABLE_SIZE): Likewise.
3377         (DR_LOCAL_SLOWDOWN): Likewise.
3378         (DR_GLOBAL_SLOWDOWN): Likewise.
3379         (DR_CONTROL_RESERVED): Likewise.
3380         (I386_DR_CONTROL_MASK): Likewise.
3381         (I386_DR_VACANT): Likewise.
3382         (I386_DR_LOCAL_ENABLE): Likewise.
3383         (I386_DR_GLOBAL_ENABLE): Likewise.
3384         (I386_DR_DISABLE): Likewise.
3385         (I386_DR_SET_RW_LEN): Likewise.
3386         (I386_DR_GET_RW_LEN): Likewise.
3387         (I386_DR_WATCH_HIT): Likewise.
3388         (i386_wp_op_t): Likewise.
3389         (i386_show_dr): Likewise.
3390         (i386_length_and_rw_bits): Likewise.
3391         (i386_insert_aligned_watchpoint): Likewise.
3392         (i386_remove_aligned_watchpoint): Likewise.
3393         (i386_handle_nonaligned_watchpoint): Likewise.
3394         i386_update_inferior_debug_regs(): Likewise.
3395         (i386_dr_insert_watchpoint): Likewise.
3396         (i386_dr_remove_watchpoint): Likewise.
3397         (i386_dr_region_ok_for_watchpoint): Likewise.
3398         (i386_dr_stopped_data_address): Likewise.
3399         (i386_dr_stopped_by_watchpoint): Likewise.
3400
3401 2014-06-19  Gary Benson  <gbenson@redhat.com>
3402
3403         * i386-low.c (i386_dr_show): Renamed to
3404         i386_show_dr and made static.  All uses updated.
3405         (i386_dr_length_and_rw_bits): Renamed to
3406         i386_length_and_rw_bits and made static.
3407         All uses updated.
3408         (i386_dr_insert_aligned_watchpoint): Renamed to
3409         i386_insert_aligned_watchpoint and made static.
3410         All uses updated.
3411         (i386_dr_remove_aligned_watchpoint): Renamed to
3412         i386_remove_aligned_watchpoint and made static.
3413         All uses updated.
3414         (i386_dr_update_inferior_debug_regs): Renamed to
3415         i386_update_inferior_debug_regs and made static.
3416         All uses updated.
3417
3418 2014-06-18  Gary Benson  <gbenson@redhat.com>
3419
3420         * i386-low.h (i386_dr_low_can_set_addr): New macro.
3421         (i386_dr_low_can_set_control): Likewise.
3422         (i386_get_debug_register_length): Likewise.
3423         * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
3424         (i386_dr_low_can_set_control): Likewise.
3425         (i386_get_debug_register_length): Likewise.
3426
3427 2014-06-17  Gary Benson  <gbenson@redhat.com>
3428
3429         * i386-low.h (i386-dregs.h): New include.
3430         (DR_FIRSTADDR): Now in i386-dregs.h.
3431         (DR_LASTADDR): Likewise.
3432         (DR_NADDR): Likewise.
3433         (DR_STATUS): Likewise.
3434         (DR_CONTROL): Likewise.
3435         (i386_debug_reg_state): Likewise.
3436         (i386_dr_insert_watchpoint): Likewise.
3437         (i386_dr_remove_watchpoint): Likewise.
3438         (i386_dr_region_ok_for_watchpoint): Likewise.
3439         (i386_dr_stopped_data_address): Likewise.
3440         (i386_dr_stopped_by_watchpoint): Likewise.
3441         * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
3442
3443 2014-06-18  Gary Benson  <gbenson@redhat.com>
3444
3445         * i386-low.h (i386_low_insert_watchpoint): Renamed to
3446         i386_dr_insert_watchpoint.
3447         (i386_low_remove_watchpoint): Renamed to
3448         i386_dr_remove_watchpoint.
3449         (i386_low_region_ok_for_watchpoint): Renamed to
3450         i386_dr_region_ok_for_watchpoint.
3451         (i386_low_stopped_data_address): Renamed to
3452         i386_dr_stopped_data_address.
3453         (i386_low_stopped_by_watchpoint): Renamed to
3454         i386_dr_stopped_by_watchpoint.
3455         * i386-low.c (i386_show_dr): Renamed to
3456         i386_dr_show and made nonstatic.  All uses updated.
3457         (i386_length_and_rw_bits): Renamed to
3458         i386_dr_length_and_rw_bits and made nonstatic.
3459         All uses updated.
3460         (i386_insert_aligned_watchpoint): Renamed to
3461         i386_dr_insert_aligned_watchpoint and made nonstatic.
3462         All uses updated.
3463         (i386_remove_aligned_watchpoint): Renamed to
3464         i386_dr_remove_aligned_watchpoint and made nonstatic.
3465         All uses updated.
3466         (i386_update_inferior_debug_regs): Renamed to
3467         i386_dr_update_inferior_debug_regs and made nonstatic.
3468         All uses updated.
3469         (i386_low_insert_watchpoint): Renamed to
3470         i386_dr_insert_watchpoint.  All uses updated.
3471         (i386_low_remove_watchpoint): Renamed to
3472         i386_dr_remove_watchpoint.  All uses updated.
3473         (i386_low_region_ok_for_watchpoint): Renamed to
3474         i386_dr_region_ok_for_watchpoint.  All uses updated.
3475         (i386_low_stopped_data_address): Renamed to
3476         i386_dr_stopped_data_address.  All uses updated.
3477         (i386_low_stopped_by_watchpoint): Renamed to
3478         i386_dr_stopped_by_watchpoint.  All uses updated.
3479
3480 2014-06-18  Gary Benson  <gbenson@redhat.com>
3481
3482         * i386-low.c (i386_dr_low_can_set_addr): New macro.
3483         (i386_dr_low_can_set_control): Likewise.
3484         (i386_insert_aligned_watchpoint): New check.
3485
3486 2014-06-18  Gary Benson  <gbenson@redhat.com>
3487
3488         * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
3489         Renamed to state.
3490
3491 2014-06-18  Gary Benson  <gbenson@redhat.com>
3492
3493         * i386-low.c (i386_length_and_rw_bits): Use internal_error
3494         instead of fatal and error.
3495         (i386_handle_nonaligned_watchpoint): Likewise.
3496
3497 2014-06-18  Gary Benson  <gbenson@redhat.com>
3498
3499         * i386-low.c (i386_get_debug_register_length): New macro.
3500         (TARGET_HAS_DR_LEN_8): Remove conditional.  Use above macro.
3501         (i386_show_dr): Use debug_printf instead of fprintf.  Use
3502         phex to format values.
3503
3504 2014-06-18  Gary Benson  <gbenson@redhat.com>
3505
3506         * i386-low.h: Comment changes.
3507         * i386-low.c: Likewise.
3508
3509 2014-06-18  Gary Benson  <gbenson@redhat.com>
3510
3511         * i386-low.c: Whitespace changes.
3512
3513 2014-06-12  Tom Tromey  <tromey@redhat.com>
3514
3515         * utils.c (freeargv): Remove.
3516
3517 2014-06-12  Tom Tromey  <tromey@redhat.com>
3518
3519         * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3520         * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3521         (parse_debug_format_options): Likewise.
3522         (gdbserver_usage): Likewise.
3523         * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3524         (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3525         (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3526         against libiberty.
3527         ($(LIBGNU)): Depend on libiberty.
3528         (all-lib): Recurse into all subdirs.
3529         (install-only): Invoke "install" target in subdirs.
3530         (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3531         targets.
3532         * configure: Rebuild.
3533         * configure.ac: Add ACX_CONFIGURE_DIR for libiberty.  Don't check
3534         for vasprintf, vsnprintf, or gettimeofday.
3535         * configure.srv: Don't add safe-ctype.o or lbasename.o to
3536         srv_tgtobj.
3537
3538 2014-06-05  Joel Brobecker  <brobecker@adacore.com>
3539
3540         * development.sh: Delete.
3541         * Makefile.in (config.status): Adjust dependency on development.sh.
3542         * configure.ac: Adjust development.sh source call.
3543         * configure: Regenerate.
3544
3545 2014-06-02  Pedro Alves  <palves@redhat.com>
3546
3547         * ax.c (gdb_free_agent_expr): New function.
3548         * ax.h (gdb_free_agent_expr): New declaration.
3549         * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3550         list.
3551         (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3552         static.
3553         (clear_breakpoint_conditions_and_commands): New function.
3554         * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3555         (clear_breakpoint_conditions_and_commands): New declaration.
3556
3557 2014-05-23  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
3558
3559         * linux-aarch64-low.c (asm/ptrace.h): Include.
3560
3561 2014-05-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
3562
3563         Fix TLS access for -static -pthread.
3564         * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3565         (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3566         (thread_db_load_search, try_thread_db_load_1): Initialize it.
3567
3568 2014-05-20  Pedro Alves  <palves@redhat.com>
3569
3570         * linux-aarch64-low.c (aarch64_insert_point)
3571         (aarch64_remove_point): No longer check whether the type is
3572         supported here.  Adjust to new interface.
3573         (the_low_target): Install aarch64_supports_z_point_type as
3574         supports_z_point_type method.
3575         * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3576         (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3577         instead of a Z packet char.  Adjust.
3578         (arm_supports_z_point_type): New function.
3579         (arm_insert_point, arm_remove_point): Adjust to new interface.
3580         (the_low_target): Install arm_supports_z_point_type.
3581         * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3582         (cris_insert_point, cris_remove_point): Adjust to new interface.
3583         Don't check whether the type is supported here.
3584         (the_low_target): Install cris_supports_z_point_type.
3585         * linux-low.c (linux_supports_z_point_type): New function.
3586         (linux_insert_point, linux_remove_point): Adjust to new interface.
3587         * linux-low.h (struct linux_target_ops) <insert_point,
3588         remove_point>: Take an enum raw_bkpt_type instead of a char.  Add
3589         raw_breakpoint pointer parameter.
3590         <supports_z_point_type>: New method.
3591         * linux-mips-low.c (mips_supports_z_point_type): New function.
3592         (mips_insert_point, mips_remove_point): Adjust to new interface.
3593         Use mips_supports_z_point_type.
3594         (the_low_target): Install mips_supports_z_point_type.
3595         * linux-ppc-low.c (the_low_target): Install NULL as
3596         supports_z_point_type method.
3597         * linux-s390-low.c (the_low_target): Install NULL as
3598         supports_z_point_type method.
3599         * linux-sparc-low.c (the_low_target): Install NULL as
3600         supports_z_point_type method.
3601         * linux-x86-low.c (x86_supports_z_point_type): New function.
3602         (x86_insert_point): Adjust to new insert_point interface.  Use
3603         insert_memory_breakpoint.  Adjust to new
3604         i386_low_insert_watchpoint interface.
3605         (x86_remove_point): Adjust to remove_point interface.  Use
3606         remove_memory_breakpoint.  Adjust to new
3607         i386_low_remove_watchpoint interface.
3608         (the_low_target): Install x86_supports_z_point_type.
3609         * lynx-low.c (lynx_target_ops): Install NULL as
3610         supports_z_point_type callback.
3611         * nto-low.c (nto_supports_z_point_type): New.
3612         (nto_insert_point, nto_remove_point): Adjust to new interface.
3613         (nto_target_ops): Install nto_supports_z_point_type.
3614         * mem-break.c: Adjust intro comment.
3615         (struct raw_breakpoint) <raw_type, size>: New fields.
3616         <inserted>: Update comment.
3617         <shlib_disabled>: Delete field.
3618         (enum bkpt_type) <gdb_breakpoint>: Delete value.
3619         <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3620         gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3621         (raw_bkpt_type_to_target_hw_bp_type): New function.
3622         (find_enabled_raw_code_breakpoint_at): New function.
3623         (find_raw_breakpoint_at): New type and size parameters.  Use them.
3624         (insert_memory_breakpoint): New function, based off
3625         set_raw_breakpoint_at.
3626         (remove_memory_breakpoint): New function.
3627         (set_raw_breakpoint_at): Reimplement.
3628         (set_breakpoint): New, based on set_breakpoint_at.
3629         (set_breakpoint_at): Reimplement.
3630         (delete_raw_breakpoint): Go through the_target->remove_point
3631         instead of assuming memory breakpoints.
3632         (find_gdb_breakpoint_at): Delete.
3633         (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3634         (find_gdb_breakpoint): New function.
3635         (set_gdb_breakpoint_at): Delete.
3636         (z_type_supported): New function.
3637         (set_gdb_breakpoint_1): New function, loosely based off
3638         set_gdb_breakpoint_at.
3639         (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3640         (delete_gdb_breakpoint_at): Delete.
3641         (delete_gdb_breakpoint_1): New function, loosely based off
3642         delete_gdb_breakpoint_at.
3643         (delete_gdb_breakpoint): New function.
3644         (clear_gdb_breakpoint_conditions): Rename to ...
3645         (clear_breakpoint_conditions): ... this.  Don't handle a NULL
3646         breakpoint.
3647         (add_condition_to_breakpoint): Make static.
3648         (add_breakpoint_condition): Take a struct breakpoint pointer
3649         instead of an address.  Adjust.
3650         (gdb_condition_true_at_breakpoint): Rename to ...
3651         (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3652         z_type parameter.
3653         (gdb_condition_true_at_breakpoint): Reimplement.
3654         (add_breakpoint_commands): Take a struct breakpoint pointer
3655         instead of an address.  Adjust.
3656         (gdb_no_commands_at_breakpoint): Rename to ...
3657         (gdb_no_commands_at_breakpoint_z_type): ... this.  Add z_type
3658         parameter.  Return true if no breakpoint was found.  Change debug
3659         output.
3660         (gdb_no_commands_at_breakpoint): Reimplement.
3661         (run_breakpoint_commands): Rename to ...
3662         (run_breakpoint_commands_z_type): ... this.  Add z_type parameter,
3663         and change return type to boolean.
3664         (run_breakpoint_commands): New function.
3665         (gdb_breakpoint_here): Also check for Z1 breakpoints.
3666         (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3667         breakpoint.  Go through the_target->remove_point instead of
3668         assuming memory breakpoint.
3669         (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3670         software and hardware breakpoints.
3671         (reinsert_raw_breakpoint): Go through the_target->insert_point
3672         instead of assuming memory breakpoint.
3673         (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3674         software and hardware breakpoints.
3675         (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3676         Check both software and hardware breakpoints.
3677         (validate_inserted_breakpoint): Assert the breakpoint is a
3678         software breakpoint.  Set the inserted flag to -1 instead of
3679         setting shlib_disabled.
3680         (delete_disabled_breakpoints): Adjust.
3681         (validate_breakpoints): Only validate software breakpoints.
3682         Adjust to inserted flag change.
3683         (check_mem_read, check_mem_write): Skip breakpoint types other
3684         than software breakpoints.  Adjust to inserted flag change.
3685         * mem-break.h (enum raw_bkpt_type): New enum.
3686         (raw_breakpoint, struct process_info): Forward declare.
3687         (Z_packet_to_target_hw_bp_type): Delete declaration.
3688         (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3689         (set_gdb_breakpoint, delete_gdb_breakpoint)
3690         (clear_breakpoint_conditions): New declarations.
3691         (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3692         (breakpoint_inserted_here): Update comment.
3693         (add_breakpoint_condition, add_breakpoint_commands): Replace
3694         address parameter with a breakpoint pointer parameter.
3695         (gdb_breakpoint_here): Update comment.
3696         (delete_gdb_breakpoint_at): Delete.
3697         (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3698         * server.c (process_point_options): Take a struct breakpoint
3699         pointer instead of an address.  Adjust.
3700         (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3701         delete_gdb_breakpoint.
3702         * spu-low.c (spu_target_ops): Install NULL as
3703         supports_z_point_type method.
3704         * target.h: Include mem-break.h.
3705         (struct target_ops) <prepare_to_access_memory>: Update comment.
3706         <supports_z_point_type>: New field.
3707         <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3708         instead of a char.  Also take a raw breakpoint pointer.
3709         * win32-arm-low.c (the_low_target): Install NULL as
3710         supports_z_point_type.
3711         * win32-i386-low.c (i386_supports_z_point_type): New function.
3712         (i386_insert_point, i386_remove_point): Adjust to new interface.
3713         (the_low_target): Install i386_supports_z_point_type.
3714         * win32-low.c (win32_supports_z_point_type): New function.
3715         (win32_insert_point, win32_remove_point): Adjust to new interface.
3716         (win32_target_ops): Install win32_supports_z_point_type.
3717         * win32-low.h (struct win32_target_ops):
3718         <supports_z_point_type>: New method.
3719         <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3720         instead of a char.  Also take a raw breakpoint pointer.
3721
3722 2014-05-20  Pedro Alves  <palves@redhat.com>
3723
3724         * mem-break.h: Include break-common.h.
3725         (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3726         (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3727         (Z_packet_to_target_hw_bp_type): New declaration.
3728         * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3729         * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3730         (Z_PACKET_ACCESS_WP): Delete macros.
3731         (Z_packet_to_hw_type): Delete function.
3732         * i386-low.h: Don't include break-common.h here.
3733         (Z_packet_to_hw_type): Delete declaration.
3734         * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3735         Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3736         * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3737         Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3738         * linux-aarch64-low.c: Don't include break-common.h here.
3739         (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3740         (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3741         (Z_packet_to_target_hw_bp_type): Delete function.
3742         * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3743         function.
3744         (mips_insert_point, mips_remove_point): Use
3745         Z_packet_to_target_hw_bp_type.
3746
3747 2014-05-20  Pedro Alves  <palves@redhat.com>
3748
3749         * linux-aarch64-low.c: Include break-common.h.
3750         (enum target_point_type): Delete.
3751         (Z_packet_to_point_type): Rename to ...
3752         (Z_packet_to_target_hw_bp_type): ... this, and return a
3753         target_hw_bp_type instead.
3754         (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3755         instead of an enum target_point_type.
3756         (aarch64_point_encode_ctrl_reg): Likewise.  Compute type mask from
3757         breakpoint type.
3758         (aarch64_dr_state_insert_one_point)
3759         (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3760         (aarch64_handle_aligned_watchpoint)
3761         (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3762         Take an enum target_hw_bp_type instead of an enum
3763         target_point_type.
3764         (aarch64_supports_z_point_type): New function.
3765         (aarch64_insert_point, aarch64_remove_point): Use it.  Adjust to
3766         use Z_packet_to_target_hw_bp_type.
3767
3768 2014-05-20  Joel Brobecker  <brobecker@adacore.com>
3769
3770         * configure.ac: Only use -Werror by default when DEVELOPMENT
3771         is true.
3772         * configure: Regenerate.
3773
3774 2014-05-19  Jan Kratochvil  <jan.kratochvil@redhat.com>
3775
3776         Fix gdbserver qGetTLSAddr for x86_64 -m32.
3777         * linux-x86-low.c (X86_64_USER_REGS): New.
3778         (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3779
3780 2014-04-28  Yao Qi  <yao@codesourcery.com>
3781
3782         * Makefile.in (i386-avx512.c): Fix the typo of generated file
3783         name.
3784
3785 2014-04-25  Pedro Alves  <palves@redhat.com>
3786
3787         PR server/16255
3788         * linux-low.c (linux_attach_fail_reason_string): New function.
3789         (linux_attach_lwp): Delete.
3790         (linux_attach_lwp_1): Rename to ...
3791         (linux_attach_lwp): ... this.  Take a ptid instead of a pid as
3792         argument.  Remove "initial" parameter.  Return int instead of
3793         void.  Don't error or warn here.
3794         (linux_attach): Adjust to call linux_attach_lwp.  Call error on
3795         failure to attach to the tgid.  Call warning when failing to
3796         attach to an lwp.
3797         * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3798         argument.  Remove "initial" parameter.  Return int instead of
3799         void.  Don't error or warn here.
3800         (linux_attach_fail_reason_string): New declaration.
3801         * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3802         interface change.  Use linux_attach_fail_reason_string.
3803
3804 2014-04-24  Michael Sturm  <michael.sturm@mintel.com>
3805             Walfred Tedeschi  <walfred.tedeschi@intel.com>
3806
3807         * Makefile.in: Added rules to handle new files
3808         i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3809         amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3810         * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3811         (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3812         (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3813         (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3814         x32-avx512-linux.o.
3815         (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3816         (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3817         (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3818         i386/x32-avx512.xml.
3819         (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3820         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3821         i386/x32-avx512-linux.xml.
3822         * i387-fp.c (num_avx512_k_registers): New constant for number
3823         of K registers.
3824         (num_avx512_zmmh_low_registers): New constant for number of
3825         lower ZMM registers (0-15).
3826         (num_avx512_zmmh_high_registers): New constant for number of
3827         higher ZMM registers (16-31).
3828         (num_avx512_ymmh_registers): New contant for number of higher
3829         YMM registers (ymm16-31 added by avx521 on x86_64).
3830         (num_avx512_xmm_registers): New constant for number of higher
3831         XMM registers (xmm16-31 added by AVX512 on x86_64).
3832         (struct i387_xsave): Add space for AVX512 registers.
3833         (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3834         Add code to handle AVX512 registers.
3835         (i387_xsave_to_cache): Add code to handle AVX512 registers.
3836         * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3837         prototypei from generated file.
3838         (tdesc_amd64_avx512_linux): Likewise.
3839         (init_registers_x32_avx512_linux): Likewise.
3840         (tdesc_x32_avx512_linux): Likewise.
3841         (init_registers_i386_avx512_linux): Likewise.
3842         (tdesc_i386_avx512_linux): Likewise.
3843         (x86_64_regmap): Add AVX512 registers.
3844         (x86_linux_read_description): Add code to handle AVX512 XSTATE
3845         mask.
3846         (initialize_low_arch): Add code to initialize AVX512 registers.
3847
3848 2014-04-23  Pedro Alves  <palves@redhat.com>
3849
3850         * mem-break.c (find_gdb_breakpoint_at): Make static.
3851         * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3852
3853 2014-04-23  Pedro Alves  <palves@redhat.com>
3854
3855         * i386-low.c: Don't include break-common.h here.
3856         (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3857         prototype to take target_hw_bp_type as argument instead of a Z
3858         packet char.
3859         * i386-low.h: Include break-common.h here.
3860         (Z_packet_to_hw_type): Declare.
3861         (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3862         prototypes.
3863         * linux-x86-low.c (x86_insert_point): Convert the packet number to
3864         a target_hw_bp_type before calling i386_low_insert_watchpoint.
3865         (x86_remove_point): Convert the packet number to a
3866         target_hw_bp_type before calling i386_low_remove_watchpoint.
3867         * win32-i386-low.c (i386_insert_point): Convert the packet number
3868         to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3869         (i386_remove_point): Convert the packet number to a
3870         target_hw_bp_type before calling i386_low_remove_watchpoint.
3871
3872 2014-04-23  Pedro Alves  <palves@redhat.com>
3873
3874         * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3875
3876 2014-04-10  Pedro Alves  <palves@redhat.com>
3877
3878         * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3879         Check if the condition or command is NULL before checking if the
3880         breakpoint is known.  On success, return true.
3881         * mem-break.h (add_breakpoint_condition): Document return.
3882         (add_breakpoint_commands): Add describing comment.
3883         * server.c (skip_to_semicolon): New function.
3884         (process_point_options): Use it.
3885
3886 2014-04-09  Pedro Alves  <palves@redhat.com>
3887
3888         * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3889         to lwpid_of.
3890
3891 2014-02-27  Pedro Alves  <palves@redhat.com>
3892
3893         PR 12702
3894         * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3895         macros.
3896         * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3897         output.
3898         (last_thread_of_process_p): Take a PID argument instead of a
3899         thread pointer.
3900         (linux_wait_for_lwp): Delete.
3901         (num_lwps, check_zombie_leaders, not_stopped_callback): New
3902         functions.
3903         (linux_low_filter_event): New function, party factored out from
3904         linux_wait_for_event.
3905         (linux_wait_for_event): Rename to ...
3906         (linux_wait_for_event_filtered): ... this.  Add new filter ptid
3907         argument.  Partly rewrite.  Always use waitpid(-1, WNOHANG) and
3908         sigsuspend.  Check for zombie leaders.
3909         (linux_wait_for_event): Reimplement as wrapper around
3910         linux_wait_for_event_filtered.
3911         (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED.  Assume that if
3912         a normal or signal exit is seen, it's the whole process exiting.
3913         (wait_for_sigstop): No longer a for_each_inferior callback.
3914         Rewrite on top of linux_wait_for_event_filtered.
3915         (stop_all_lwps): Call wait_for_sigstop directly.
3916         * server.c (resume, handle_target_event): Handle
3917         TARGET_WAITKIND_NO_RESUMED.
3918
3919 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
3920
3921         * win32-low.c (psapi_get_dll_name,
3922         * win32_CreateToolhelp32Snapshot): Delete.
3923         (win32_CreateToolhelp32Snapshot, win32_Module32First)
3924         (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3925         Delete.
3926         (handle_load_dll): Add function description.
3927         Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3928
3929 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
3930
3931         * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3932         Add comment.
3933         (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3934         base address when calling win32_add_one_solib.
3935         (handle_load_dll): Delete local variable load_addr.
3936         Remove 0x1000 offset applied to DLL base address when calling
3937         win32_add_one_solib.
3938         (handle_unload_dll): Add comment.
3939
3940 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
3941
3942         * win32-low.c (win32_add_all_dlls): Renames
3943         win32_ensure_ntdll_loaded.  Rewrite function documentation.
3944         Adjust implementation to always load all DLLs.
3945         Add 0x1000 offset to DLL base address when calling
3946         win32_add_one_solib.
3947         (child_initialization_done): New static global.
3948         (do_initial_child_stuff): Set child_initialization_done to
3949         zero during child initialization, and 1 after.  Replace call
3950         to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3951         Add comment.
3952         (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3953         (handle_unload_dll): Add function documentation.
3954         (get_child_debug_event): Ignore load and unload DLL events
3955         during child initialization.
3956
3957 2014-02-20  Doug Evans  <dje@google.com>
3958
3959         Remove global all_lwps.
3960         * inferiors.h (ptid_of): Move here from linux-low.h.
3961         (pid_of, lwpid_of): Ditto.
3962         * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3963         parameter is a struct thread_info * now.
3964         (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3965         directly.  Pass &all_threads to find_inferior instead of &all_lwps.
3966         (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3967         directly.
3968         (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3969         (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3970         * linux-arm-low.c (update_registers_callback): Update, "entry"
3971         parameter is a struct thread_info * now.
3972         Fetch lwpid from current_inferior directly.
3973         (arm_insert_point): Pass &all_threads to find_inferior instead of
3974         &all_lwps.
3975         (arm_remove_point): Ditto.
3976         (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3977         (arm_prepare_to_resume): Fetch pid from thread.
3978         (arm_read_description): Fetch lwpid from current_inferior directly.
3979         * linux-low.c (all_lwps): Delete.
3980         (delete_lwp): Delete call to remove_inferior.
3981         (handle_extended_wait): Fetch lwpid from thread.
3982         (add_lwp): Don't set lwp->entry.id.  Remove call to
3983         add_inferior_to_list.
3984         (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3985         (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3986         (kill_one_lwp_callback): Ditto.
3987         (linux_kill): Don't dereference NULL pointer.
3988         Fetch ptid,lwpid from thread.
3989         (get_detach_signal): Fetch ptid from thread.
3990         (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3991         Simplify call to regcache_invalidate_thread.
3992         (delete_lwp_callback): Update, "entry" parameter is a
3993         struct thread_info * now.  Fetch pid from thread.
3994         (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3995         (status_pending_p_callback): Update, "entry" parameter is a
3996         struct thread_info * now.  Fetch ptid from thread.
3997         (find_lwp_pid): Update, "entry" parameter is a
3998         struct thread_info * now.
3999         (linux_wait_for_lwp): Fetch pid from thread.
4000         (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
4001         (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
4002         (enqueue_one_deferred_signal): Fetch lwpid from thread.
4003         (dequeue_one_deferred_signal): Ditto.
4004         (cancel_breakpoint): Fetch ptid from current_inferior.
4005         (linux_wait_for_event): Pass &all_threads to find_inferior,
4006         not &all_lwps.  Fetch ptid, lwpid from thread.
4007         (count_events_callback): Update, "entry" parameter is a
4008         struct thread_info * now.
4009         (select_singlestep_lwp_callback): Ditto.
4010         (select_event_lwp_callback): Ditto.
4011         (cancel_breakpoints_callback): Ditto.
4012         (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
4013         not &all_lwps.
4014         (select_event_lwp): Ditto.  Fetch ptid from event_thread.
4015         (unsuspend_one_lwp): Update, "entry" parameter is a
4016         struct thread_info * now.
4017         (unsuspend_all_lwps): Pass &all_threads to find_inferior,
4018         not &all_lwps.
4019         (linux_stabilize_threads): Ditto.  And for for_each_inferior.
4020         Fetch lwpid from thread, not lwp.
4021         (linux_wait_1): Fetch ptid, lwpid from current_inferior.
4022         Pass &all_threads to find_inferior, not &all_lwps.
4023         (send_sigstop): Fetch lwpid from thread, not lwp.
4024         (send_sigstop_callback): Update, "entry" parameter is a
4025         struct thread_info * now.
4026         (suspend_and_send_sigstop_callback): Ditto.
4027         (wait_for_sigstop): Ditto.  Fetch ptid, lwpid from thread, lwp.
4028         (stuck_in_jump_pad_callback): Update, "entry" parameter is a
4029         struct thread_info * now.
4030         (move_out_of_jump_pad_callback): Ditto.  Fetch ptid, lwpid
4031         from thread, lwp.
4032         (lwp_running): Update, "entry" parameter is a
4033         struct thread_info * now.
4034         (stop_all_lwps): Fetch ptid from thread.
4035         Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
4036         (linux_resume_one_lwp): Fetch lwpid from thread.
4037         (linux_set_resume_request): Update, "entry" parameter is a
4038         struct thread_info * now.  Fetch pid, lwpid from thread.
4039         (resume_status_pending_p): Update, "entry" parameter is a
4040         struct thread_info * now.
4041         (need_step_over_p): Ditto.  Fetch lwpid from thread.
4042         (start_step_over): Fetch lwpid from thread.
4043         (linux_resume_one_thread): Update, "entry" parameter is a
4044         struct thread_info * now.  Fetch lwpid from thread.
4045         (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
4046         (proceed_one_lwp): Update, "entry" parameter is a
4047         struct thread_info * now.  Fetch lwpid from thread.
4048         (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
4049         struct thread_info * now.
4050         (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
4051         (unstop_all_lwps): Ditto.  Fetch lwpid from thread.
4052         (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
4053         directly.
4054         (regsets_store_inferior_registers): Ditto.
4055         (fetch_register, store_register): Ditto.
4056         (linux_read_memory, linux_write_memory): Ditto.
4057         (linux_request_interrupt): Ditto.
4058         (linux_read_auxv): Ditto.
4059         (linux_xfer_siginfo): Ditto.
4060         (linux_qxfer_spu): Ditto.
4061         (linux_qxfer_libraries_svr4): Ditto.
4062         * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
4063         moved to inferiors.h.
4064         (get_lwp): Delete.
4065         (get_thread_lwp): Update.
4066         (struct lwp_info): Delete member "entry".  Simplify comment for
4067         member "thread".
4068         (all_lwps): Delete.
4069         * linux-mips-low.c (mips_read_description): Fetch lwpid from
4070         current_inferior directly.
4071         (update_watch_registers_callback): Update, "entry" parameter is a
4072         struct thread_info * now.  Fetch pid from thread.
4073         (mips_linux_prepare_to_resume): Fetch ptid from thread.
4074         (mips_insert_point): Fetch lwpid from current_inferior.
4075         Pass &all_threads to find_inferior, not &all_lwps.
4076         (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
4077         (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
4078         directly.
4079         (mips_stopped_data_address): Ditto.
4080         * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
4081         directly.
4082         * linux-tile-low.c (tile_arch_setup): Ditto.
4083         * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
4084         (update_debug_registers_callback): Update, "entry" parameter is a
4085         struct thread_info * now.  Fetch pid from thread.
4086         (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
4087         Pass &all_threads to find_inferior, not &all_lwps.
4088         (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
4089         (i386_dr_low_set_control): Fetch pid from current_inferior directly.
4090         Pass &all_threads to find_inferior, not &all_lwps.
4091         (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
4092         (i386_dr_low_get_status): Ditto.
4093         (x86_linux_prepare_to_resume): Fetch ptid from thread.
4094         (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
4095         (x86_linux_read_description): Ditto.
4096         * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
4097
4098 2014-02-20  Doug Evans  <dje@google.com>
4099
4100         * inferiors.c (get_first_inferior): Fix buglet.
4101
4102 2014-02-19  Doug Evans  <dje@google.com>
4103
4104         * gdbthread.h (add_thread): Change result type to struct thread_info *.
4105         * inferiors.c (add_thread): Change result type to struct thread_info *.
4106         All callers updated.
4107         (add_lwp): Call add_thread here instead of in callers.
4108         All callers updated.
4109         * linux-low.h (get_lwp_thread): Rewrite.
4110         (struct lwp_info): New member "thread".
4111
4112 2014-02-19  Doug Evans  <dje@google.com>
4113
4114         * linux-low.c (add_lwp): Change result to struct lwp_info *.
4115         All callers updated.
4116
4117 2014-02-19  Doug Evans  <dje@google.com>
4118
4119         * inferiors.c (add_thread): Fix whitespace.
4120
4121 2014-02-19  Doug Evans  <dje@google.com>
4122
4123         * dll.c (clear_dlls): Replace accessing list implemention details
4124         with API function.
4125         * gdbthread.h (get_first_thread): Declare.
4126         * inferiors.c (for_each_inferior_with_data): New function.
4127         (get_first_thread): New function.
4128         (find_thread_ptid): Simplify.
4129         (get_first_inferior): New function.
4130         (clear_list): Delete.
4131         (one_inferior_p): New function.
4132         (clear_inferior_list): New function.
4133         (clear_inferiors): Update.
4134         * inferiors.h (for_each_inferior_with_data): Declare.
4135         (clear_inferior_list): Declare.
4136         (one_inferior_p): Declare.
4137         (get_first_inferior): Declare.
4138         * linux-low.c (linux_wait_for_event): Replace accessing list
4139         implemention details with API function.
4140         * server.c (target_running): Ditto.
4141         (accumulate_file_name_length): New function.
4142         (emit_dll_description): New function.
4143         (handle_qxfer_libraries): Replace accessing list implemention
4144         details with API function.
4145         (handle_qxfer_threads_worker): New function.
4146         (handle_qxfer_threads_proper): Replace accessing list implemention
4147         details with API function.
4148         (handle_query): Ditto.
4149         (visit_actioned_threads_callback_ftype): New typedef.
4150         (visit_actioned_threads_data): New struct.
4151         (visit_actioned_threads): Rewrite to be find_inferior callback.
4152         (resume): Call find_inferior.
4153         (handle_status): Replace accessing list implemention
4154         details with API function.
4155         (process_serial_event): Replace accessing list implemention details
4156         with API function.
4157         * target.c (set_desired_inferior): Replace accessing list implemention
4158         details with API function.
4159         * tracepoint.c (same_process_p): New function.
4160         (gdb_agent_about_to_close): Replace accessing list implemention
4161         details with API function.
4162         * win32-low.c (child_delete_thread): Replace accessing list
4163         implemention details with API function.
4164         (match_dll_by_basename): New function.
4165         (dll_is_loaded_by_basename): New function.
4166         (win32_ensure_ntdll_loaded): Replace accessing list implemention
4167         details call to dll_is_loaded_by_basename.
4168
4169 2014-02-19  Doug Evans  <dje@google.com>
4170
4171         * dll.h (struct dll_info): Add comment.
4172         * gdbthread.h (struct thread_info): Add comment.
4173         (current_ptid): Simplify.
4174         * inferiors.c (add_process): Update.
4175         (remove_process): Update.
4176         * inferiors.h (struct process_info): Rename member "head" to "entry".
4177         * linux-low.c (delete_lwp): Update.
4178         (add_lwp): Update.
4179         (last_thread_of_process_p): Update.
4180         (kill_one_lwp_callback, linux_kill): Update.
4181         (status_pending_p_callback): Update.
4182         (wait_for_sigstop): Update.  Simplify read of ptid.
4183         (start_step_over): Update.
4184         * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
4185         (get_lwp_thread): Update.
4186         (struct lwp_info): Rename member "head" to "entry".
4187         * regcache.h (inferior_list_entry): Delete.
4188         * server.c (kill_inferior_callback): Update.
4189         (detach_or_kill_inferior_callback): Update.
4190         (print_started_pid): Update.
4191         (print_attached_pid): Update.
4192         (process_serial_event): Simplify read of ptid.
4193         * thread-db.c (thread_db_create_event): Update.
4194         (thread_db_get_tls_address): Update.
4195         * win32-low.c (current_inferior_ptid): Simplify.
4196
4197 2014-02-19  Tom Tromey  <tromey@redhat.com>
4198
4199         * target.h (struct target_ops) <supports_btrace>: Add target_ops
4200         argument.
4201         (target_supports_btrace): Update.
4202
4203 2014-02-14  Yao Qi  <yao@codesourcery.com>
4204
4205         * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
4206         (rsp-low-ipa.o): New target.
4207
4208 2014-02-12  Tom Tromey  <tromey@redhat.com>
4209
4210         * ax.c (gdb_parse_agent_expr): Use hex2bin, not
4211         convert_ascii_to_int.
4212         * regcache.c (registers_to_string): Likewise.
4213         * remote-utils.c (decode_M_packet): Likewise.
4214         * server.c (process_serial_event): Likewise.
4215
4216 2014-02-12  Tom Tromey  <tromey@redhat.com>
4217
4218         * server.c (handle_query, handle_v_run): Use hex2bin, not
4219         unhexify.
4220         * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
4221
4222 2014-02-12  Tom Tromey  <tromey@redhat.com>
4223
4224         * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
4225         convert_int_to_ascii.
4226         * regcache.c (registers_to_string, collect_register_as_string):
4227         Likewise.
4228         * remote-utils.c (look_up_one_symbol, relocate_instruction):
4229         Likewise.
4230         * server.c (process_serial_event): Likewise.
4231         * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
4232         (cmd_qtbuffer, cstr_to_hexstr): Likewise.
4233
4234 2014-02-12  Tom Tromey  <tromey@redhat.com>
4235
4236         * remote-utils.c (look_up_one_symbol, monitor_output): Use
4237         bin2hex, not hexify.
4238         * tracepoint.c (cmd_qtstatus): Likewise.
4239
4240 2014-02-12  Tom Tromey  <tromey@redhat.com>
4241
4242         * remote-utils.c (monitor_output): Pass explicit length to
4243         hexify.
4244
4245 2014-02-12  Tom Tromey  <tromey@redhat.com>
4246
4247         * tracepoint.c: Include rsp-low.h.
4248         * server.c: Include rsp-low.h.
4249         * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
4250         (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
4251         declare.
4252         * remote-utils.c: Include rsp-low.h.
4253         (fromhex, hexchars, ishex, unhexify, tohex, hexify)
4254         (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
4255         (convert_int_to_ascii, convert_ascii_to_int): Move to
4256         common/rsp-low.c.
4257         * regcache.c: Include rsp-low.h.
4258         * ax.c: Include rsp-low.h.
4259         * Makefile.in (SFILES): Add common/rsp-low.c.
4260         (OBS): Add rsp-low.o.
4261         (rsp-low.o): New target.
4262
4263 2014-02-12  Tom Tromey  <tromey@redhat.com>
4264
4265         * utils.h (pulongest, plongest, phex_nz): Don't declare.
4266         Include print-utils.h.
4267         * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
4268         (plongest, thirty_two, phex_nz): Remove.
4269         * Makefile.in (SFILES): Add common/print-utils.c.
4270         (OBS): Add print-utils.o.
4271         (print-utils-ipa.o): New target.
4272         (print-utils.o): New target.
4273         (IPA_OBJS): Add print-utils-ipa.o.
4274
4275 2014-02-06  Tom Tromey  <tromey@redhat.com>
4276
4277         * Makefile.in (SFILES): Fix indentation.
4278
4279 2014-02-05  Doug Evans  <dje@google.com>
4280
4281         * linux-low.c (linux_wait_for_event): Improve comment.
4282         (linux_wait_1): Keep current_inferior in sync with event_child.
4283
4284 2014-01-22  Doug Evans  <dje@google.com>
4285
4286         * gdbthread.h (gdb_id_to_thread): Delete, unused.
4287
4288 2014-01-22  Doug Evans  <dje@google.com>
4289
4290         * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
4291         * configure: Regenerate.
4292         * config.in: Regenerate.
4293         * Makefile.in (SFILES): Add debug.c.
4294         (OBS): Add debug.o.
4295         * debug.c: New file.
4296         * debug.h: New file.
4297         * linux-aarch64-low.c (*): Update all debugging printfs to use
4298         debug_printf instead of fprintf.
4299         * linux-arm-low.c (*): Ditto.
4300         * linux-cris-low.c (*): Ditto.
4301         * linux-crisv32-low.c (*): Ditto.
4302         * linux-m32r-low.c (*): Ditto.
4303         * linux-sparc-low.c (*): Ditto.
4304         * linux-x86.c (*): Ditto.
4305         * linux-low.c (*): Ditto.
4306         (linux_wait_1): Add calls to debug_enter, debug_exit.
4307         (linux_wait): Remove redundant debugging printf.
4308         (stop_all_lwps): Add calls to debug_enter, debug_exit.
4309         (linux_resume, unstop_all_lwps): Ditto.
4310         * mem-break.c (*): Update all debugging printfs to use
4311         debug_printf instead of fprintf.
4312         * remote-utils.c (*): Ditto.
4313         * thread-db.c (*): Ditto.
4314         * server.c #include <ctype.h>, "gdb_vecs.h".
4315         (debug_threads): Moved to debug.c.
4316         (*): Update all debugging printfs to use debug_printf instead of
4317         fprintf.
4318         (start_inferior): Replace call to fflush with call to debug_flush.
4319         (monitor_show_help): Mention set debug-format.
4320         (parse_debug_format_options): New function.
4321         (handle_monitor_command): Handle "monitor set debug-format".
4322         (gdbserver_usage): Mention --debug-format.
4323         (main): Parse --debug-format.
4324         * server.h (debug_threads): Declaration moved to debug.h.
4325         #include "debug.h".
4326         * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
4327         trace_debug_1 that uses debug_printf.
4328         (tracepoint_look_up_symbols): Update all debugging printfs to use
4329         debug_printf instead of fprintf.
4330
4331 2014-01-20  Baruch Siach  <baruch@tkos.co.il>
4332
4333         * linux-xtensa-low.c: Include asm/ptrace.h instead of
4334         sys/ptrace.h.
4335
4336 2014-01-17  Pedro Alves  <palves@redhat.com>
4337
4338         PR build/16445
4339         * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
4340         defined after including gdb_proc_service.h.
4341
4342 2014-01-16  Doug Evans  <dje@google.com>
4343
4344         * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
4345         (match_dll): Use it.
4346
4347 2014-01-16  Markus Metzger  <markus.t.metzger@intel.com>
4348
4349         * target.h (target_ops) <read_btrace>: Change parameters and
4350         return type to allow error reporting.
4351         * server.c (handle_qxfer_btrace): Support delta reads.  Pass
4352         trace reading errors on.
4353         * linux-low.c (linux_low_read_btrace): Pass trace reading
4354         errors on.
4355         (linux_low_disable_btrace): New.
4356
4357 2014-01-15  Doug Evans  <dje@google.com>
4358
4359         * inferiors.c (thread_id_to_gdb_id): Delete.
4360         * inferiors.h (thread_id_to_gdb_id): Delete.
4361
4362 2014-01-13  Eli Zaretskii  <eliz@gnu.org>
4363
4364         * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
4365         "-I$(srcdir)/../".  Fixes MinGW compilation errors with old GCC
4366         versions.
4367
4368 2014-01-08  Pedro Alves  <palves@redhat.com>
4369
4370         * server.c (handle_status): Don't discard previous queued stop
4371         replies or thread's pending status here.
4372         (main) <disconnection>: Do it here instead.
4373
4374 2014-01-08  Pedro Alves  <palves@redhat.com>
4375
4376         * gdbthread.h (struct thread_info) <status_pending_p>: New field.
4377         * server.c (visit_actioned_threads, handle_pending_status): New
4378         function.
4379         (handle_v_cont): Factor out parts to ...
4380         (resume): ... this new function.  If in all-stop, and a thread
4381         being resumed has a pending status, report it without actually
4382         resuming.
4383         (myresume): Adjust to use the new 'resume' function.
4384         (clear_pending_status_callback, set_pending_status_callback)
4385         (find_status_pending_thread_callback): New functions.
4386         (handle_status): Handle the case of multiple threads having
4387         interesting statuses to report.  Report threads' real last signal
4388         instead of always reporting GDB_SIGNAL_TRAP.  Look for a thread
4389         with an interesting thread to report the status for, instead of
4390         always reporting the status of the first thread.
4391
4392 2014-01-01  Joel Brobecker  <brobecker@adacore.com>
4393
4394         * gdbserver.c (gdbserver_version): Set copyright year to 2014.
4395         * gdbreplay.c (gdbreplay_version): Likewise.
4396
4397 2013-12-18  Yufeng Zhang  <yufeng.zhang@arm.com>
4398
4399         * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
4400         iov.iov_len with the real length in use.
4401
4402 2013-12-13  Joel Brobecker  <brobecker@adacore.com>
4403
4404         * Makefile.in (safe-ctype.o, lbasename.o): New rules.
4405         * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
4406         for all targets that use win32-low.c.
4407         * win32-low.c (win32_ensure_ntdll_loaded): New function.
4408         (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
4409
4410 2013-12-13  Pedro Alves  <palves@redhat.com>
4411
4412         * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
4413         if equal to TARGET_WAITKIND_LOADED.
4414         * win32-low.c (cached_status): New static global.
4415         (win32_wait): Add declaration.
4416         (do_initial_child_stuff): Flush all initial pending debug events
4417         up to the initial breakpoint.
4418         (win32_wait): If CACHED_STATUS was set, return that instead
4419         of doing a real wait.  Remove the code resuming the execution
4420         of the inferior after receiving a TARGET_WAITKIND_LOADED event
4421         during the initial phase.  Also remove the code changing
4422         OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
4423         TARGET_WAITKIND_STOPPED.
4424
4425 2013-12-11  Yao Qi  <yao@codesourcery.com>
4426
4427         * notif.c (handle_notif_ack): Return 0 if no notification
4428         matches.
4429
4430 2013-11-20  Doug Evans  <dje@google.com>
4431
4432         * linux-low.c (linux_set_resume_request): Fix comment.
4433
4434 2013-11-20  Doug Evans  <dje@google.com>
4435
4436         * linux-low.c (resume_status_pending_p): Tweak comment.
4437
4438 2013-11-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4439
4440         * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
4441         amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
4442         * configure.srv (srv_i386_regobj): Add i386-mpx.o.
4443         (srv_i386_linux_regobj): Add i386-mpx-linux.o.
4444         (srv_amd64_regobj): Add amd64-mpx.o.
4445         (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
4446         (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
4447         (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
4448         * i387-fp.c (num_pl_bnd_register) Added constant.
4449         (num_pl_bnd_cfg_registers) Added constant.
4450         (struct i387_xsave) Added reserved area and MPX fields.
4451         (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
4452         * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
4453         function.
4454         (tdesc_i386_mpx_linux): Add MPX amd64 target.
4455         (init_registers_amd64_mpx_linux): Declare new function.
4456         (tdesc_amd64_mpx_linux): Add MPX amd64 target.
4457         (x86_64_regmap): Add MPX registers.
4458         (x86_linux_read_description): Add MPX case.
4459         (initialize_low_arch): Initialize MPX targets.
4460
4461 2013-11-18  Tom Tromey  <tromey@redhat.com>
4462
4463         * configure: Rebuild.
4464         * configure.ac: Don't check for stdlib.h.
4465         * gdbreplay.c: Unconditionally include stdlib.h.
4466
4467 2013-11-18  Tom Tromey  <tromey@redhat.com>
4468
4469         * config.in: Rebuild.
4470         * configure: Rebuild.
4471         * configure.ac: Don't use AC_HEADER_DIRENT.
4472
4473 2013-11-18  Tom Tromey  <tromey@redhat.com>
4474
4475         * server.h: Don't check HAVE_STRING_H.
4476         * gdbreplay.c: Don't check HAVE_STRING_H.
4477         * configure: Rebuild.
4478
4479 2013-11-18  Tom Tromey  <tromey@redhat.com>
4480
4481         * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
4482         LIBGNU.
4483
4484 2013-11-08  Tom Tromey  <tromey@redhat.com>
4485
4486         * configure, config.in: Rebuild.
4487         * configure.ac: Remove unused configury.
4488
4489 2013-11-08  Tom Tromey  <tromey@redhat.com>
4490
4491         * acinclude.m4: Include common.m4, codeset.m4.
4492         * configure, config.in: Rebuild.
4493         * configure.ac: Use GDB_AC_COMMON.
4494
4495 2013-11-06  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4496
4497         * linux-s390-low.c (HWCAP_S390_TE): New define.
4498         (s390_arch_setup): Consider the TE field in the HWCAP for
4499         determining 'have_regset_tdb'.
4500
4501 2013-10-16  Sergio Durigan Junior  <sergiodj@redhat.com>
4502
4503         PR gdb/16014
4504         * tracepoint.c (download_tracepoint_1): Remove unnecessary double
4505         call to sizeof.
4506
4507 2013-10-02  Pedro Alves  <palves@redhat.com>
4508
4509         * server.c (process_serial_event): Don't output "GDBserver
4510         exiting" if GDB is connected through stdio.
4511         * target.c (mywait): Likewise, be silent if GDB is connected
4512         through stdio.
4513
4514 2013-10-01  Joel Brobecker  <brobecker@adacore.com>
4515
4516         * lynx-low.c (lynx_add_threads_after_attach): New function.
4517         (lynx_attach): Remove call to add_thread.  Add call to
4518         lynx_add_threads_after_attach instead.
4519
4520 2013-09-28  Mike Frysinger  <vapier@gentoo.org>
4521
4522         * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4523         * config.in, configure: Regenerated.
4524
4525 2013-09-18  Yao Qi  <yao@codesourcery.com>
4526
4527         PR server/15959
4528         * server.c (start_inferior): Clear 'resume_info'.
4529
4530 2013-09-16  Jiong Wang  <jiwang@tilera.com>
4531
4532         * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4533         for each register.
4534
4535 2013-09-16  Jiong Wang  <jiwang@tilera.com>
4536
4537         * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4538         linux-tile-low.o to srv_tgtobj.
4539
4540 2013-09-16  Will Newton  <will.newton@linaro.org>
4541
4542         * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4543         out regs.
4544
4545 2013-09-06  Pedro Alves  <palves@redhat.com>
4546
4547         * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4548         (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4549         (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4550         (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4551         (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4552         (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4553
4554 2013-09-06  Pedro Alves  <palves@redhat.com>
4555
4556         * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4557         explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4558
4559 2013-09-06  Pedro Alves  <palves@redhat.com>
4560
4561         * linux-amd64-ipa.c: Include tracepoint.h.
4562         * linux-i386-ipa.c: Include tracepoint.h.
4563
4564 2013-09-06  Ricard Wanderlof  <ricardw@axis.com>
4565
4566         * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4567         (ps_get_thread_area): New function.
4568
4569 2013-09-06  Ricard Wanderlof  <ricardw@axis.com>
4570
4571         * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4572         (initialize_low_arch): Call init_registers_crisv32 rather than
4573         init_register_crisv32.
4574
4575 2013-09-05  Pedro Alves  <palves@redhat.com>
4576
4577         * server.h (handle_vFile, hostio_last_error_from_errno): Move
4578         to ...
4579         * hostio.h: ... this new file.
4580         * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4581         win32-low.c: Include hostio.h.
4582
4583 2013-09-05  Pedro Alves  <palves@redhat.com>
4584
4585         * server.h (gdb_client_data, handler_func, callback_handler_func)
4586         (delete_file_handler, add_file_handler, append_callback_event)
4587         (delete_callback_event, start_event_loop, initialize_event_loop):
4588         Move to event-loop.h and include it.
4589         * event-loop.h: New file.
4590
4591 2013-09-05  Pedro Alves  <palves@redhat.com>
4592
4593         * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4594         * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4595         (loaded_dll, unloaded_dll): Move to ...
4596         * dll.h: ... this new file.
4597         * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4598
4599 2013-09-05  Pedro Alves  <palves@redhat.com>
4600
4601         * server.h (current_process, get_thread_process, all_processes)
4602         (add_inferior_to_list, for_each_inferior, current_inferior)
4603         (remove_inferior, add_process, remove_process, find_process_pid)
4604         (have_started_inferiors_p, have_attached_inferiors_p)
4605         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4606         (clear_inferiors, find_inferior, find_inferior_id)
4607         (inferior_target_data, set_inferior_target_data)
4608         (inferior_regcache_data, set_inferior_regcache_data): Move to
4609         inferiors.h, and include it.
4610         * inferiors.h: New file.
4611
4612 2013-09-05  Pedro Alves  <palves@redhat.com>
4613
4614         * server.h (struct emit_ops, current_insn_ptr, emit_error):
4615         Move ...
4616         * ax.h: ... here.
4617
4618 2013-09-05  Pedro Alves  <palves@redhat.com>
4619
4620         * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4621         tracepoint.h.
4622         * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4623         (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4624         (handle_tracepoint_general_set, handle_tracepoint_query)
4625         (tracepoint_finished_step, tracepoint_was_hit)
4626         (release_while_stepping_state_list, current_traceframe)
4627         (in_readonly_region, traceframe_read_mem)
4628         (fetch_traceframe_registers, traceframe_read_sdata)
4629         (traceframe_read_info, struct fast_tpoint_collect_status)
4630         (fast_tracepoint_collecting, force_unlock_trace_buffer)
4631         (handle_tracepoit_bkpts, initialize_low_tracepoint)
4632         (supply_fast_tracepoint_registers)
4633         (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4634         (ipa_tdesc, claim_trampoline_space)
4635         (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4636         (agent_mem_read, agent_get_trace_state_variable_value)
4637         (agent_set_trace_state_variable_value, agent_tsv_read)
4638         (agent_mem_read_string, get_raw_reg_func_addr)
4639         (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4640         * tracepoint.h: ... this new file.
4641
4642 2013-09-05  Pedro Alves  <palves@redhat.com>
4643
4644         * server.h (perror_with_name, error, fatal, warning, paddress)
4645         (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4646         include it.
4647         * utils.h: New file.
4648
4649 2013-09-05  Pedro Alves  <palves@redhat.com>
4650
4651         * server.h (remote_debug, noack_mode, transport_is_reliable)
4652         (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4653         (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4654         (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4655         (write_enn, initialize_async_io, enable_async_io)
4656         (disable_async_io, check_remote_input_interrupt_request)
4657         (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4658         (dead_thread_notify, prepare_resume_reply)
4659         (decode_address_to_semicolon, decode_address, decode_m_packet)
4660         (decode_M_packet, decode_X_packet, decode_xfer_write)
4661         (decode_search_memory_packet, unhexify, hexify)
4662         (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4663         (look_up_one_symbol, relocate_instruction)
4664         (monitor_output): Move to remote-utils.h, and include it.
4665         * remote-utils.h: New file.
4666
4667 2013-09-05  Pedro Alves  <palves@redhat.com>
4668
4669         * server.h (_): Delete.
4670
4671 2013-09-02  Pedro Alves  <palves@redhat.com>
4672
4673         * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4674         (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4675         allocated.
4676         (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4677
4678 2013-09-02  Pierre Muller  <muller@sourceware.org>
4679
4680         * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4681         or WriteProcessMemory complete successfully and handle
4682         ERROR_PARTIAL_COPY error.
4683
4684 2013-09-02  Pedro Alves  <palves@redhat.com>
4685
4686         * server.c (gdb_read_memory): Return -1 on traceframe memory read
4687         error instead of EIO.
4688
4689 2013-08-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
4690
4691         PR server/15604
4692         * linux-low.c: Include filestuff.h.
4693         (linux_create_inferior) <pid == 0>: Call close_most_fds.
4694         * lynx-low.c: Include filestuff.h.
4695         (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4696         * server.c: Include filestuff.h.
4697         (main): Call notice_open_fds.
4698         * spu-low.c: Include filestuff.h.
4699         (spu_create_inferior) <pid == 0>: Call close_most_fds.
4700
4701 2013-08-22  Luis Machado  <lgustavo@codesourcery.com>
4702
4703         * Makefile.in: Explain why ../target and ../nat are not
4704         listed as include file search paths.
4705         (linux-waitpid.o): New object file rule.
4706         * configure.srv (srv_native_linux_obj): New variable.
4707         Replace all occurrences of linux native object files with
4708         $srv_native_linux_obj.
4709         * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4710         (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4711         (linux_enable_event_reporting): Remove declaration.
4712         (my_waitpid): Moved to common/linux-waitpid.c.
4713         (linux_wait_for_event): Pass ptid when calling
4714         linux_enable_event_reporting.
4715         (linux_supports_tracefork_flag): Remove.
4716         (linux_enable_event_reporting): Likewise.
4717         (linux_tracefork_grandchild): Remove.
4718         (STACK_SIZE): Moved to common/linux-ptrace.c.
4719         (linux_tracefork_child): Remove.
4720         (linux_test_for_tracefork): Remove.
4721         (linux_look_up_symbols): Call linux_supports_traceclone.
4722         (initialize_low): Remove call to linux_test_for_tracefork.
4723         * linux-low.h (PTRACE_TYPE_ARG3): Move to
4724         common/linux-ptrace.h.
4725         (PTRACE_TYPE_ARG4): Likewise.
4726         Include linux-ptrace.h.
4727
4728 2013-08-21  Pedro Alves  <palves@redhat.com>
4729
4730         * config.in: Renegerate.
4731
4732 2013-08-19  Luis Machado  <lgustavo@codesourcery.com>
4733
4734         * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4735         (SFILES): Remove $(srcdir)/common/target-common.c and
4736         add $(srcdir)/target/waitstatus.c.
4737         (OBS): Remove target-common.o and add waitstatus.o.
4738         (server_h): Remove $(srcdir)/../common/target-common.h and
4739         add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4740         and $(srcdir)/../target/waitstatus.h.
4741         (target-common.o): Remove.
4742         (waitstatus.o): New target object file.
4743         * target.h: Do not include target-common.h and
4744         include target/resume.h, target/wait.h and
4745         target/waitstatus.h.
4746
4747 2013-08-13  Luis Machado  <lgustavo@codesourcery.com>
4748
4749         * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4750         to PTRACE_TYPE_ARG3.
4751         * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4752         to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4753         PTRACE_TYPE_ARG4.
4754         * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4755         (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4756
4757 2013-07-27  Jie Zhang  <jie@codesourcery.com>
4758             Daniel Jacobowitz  <dan@codesourcery.com>
4759             Yao Qi  <yao@codesourcery.com>
4760
4761         * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4762         (mips-linux-watch.o): New rule.
4763         (mips_linux_watch_h): New variable.
4764         * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4765         srv_tgtobj.
4766         * linux-mips-low.c: Include mips-linux-watch.h.
4767         (struct arch_process_info, struct arch_lwp_info): New.
4768         (update_watch_registers_callback): New function.
4769         (mips_linux_new_process, mips_linux_new_thread) New functions.
4770         (mips_linux_prepare_to_resume, mips_insert_point): New
4771         functions.
4772         (mips_remove_point, mips_stopped_by_watchpoint): New
4773         functions.
4774         (rsp_bp_type_to_target_hw_bp_type): New function.
4775         (mips_stopped_data_address): New function.
4776         (the_low_target): Add watchpoint support functions.
4777
4778 2013-07-27  Yao Qi  <yao@codesourcery.com>
4779
4780         * i386-low.c: Include break-common.h.
4781         (enum target_hw_bp_type): Remove.
4782
4783 2013-07-24  Luis Machado  <lgustavo@codesourcery.com>
4784
4785         * Makefile.in (SFILES): /common/target-common.c.
4786         (OBS): Add target-common.o.
4787         (server_h): Add $(srcdir)/../common/target-common.h.
4788         (target-common.o): New target.
4789         * server.c (queue_stop_reply_callback): Free
4790         status string after use.
4791         * target.c (target_waitstatus_to_string): Remove.
4792         * target.h: Include target-common.h.
4793         (resume_kind): Likewise.
4794         (target_waitkind): Likewise.
4795         (target_waitstatus): Likewise.
4796         (TARGET_WNOHANG): Likewise.
4797
4798 2013-07-04  Yao Qi  <yao@codesourcery.com>
4799
4800         * Makefile.in (host_alias): Use @host_noncanonical@.
4801         (target_alias): Use @target_noncanonical@.
4802         * configure.ac: Use ACX_NONCANONICAL_TARGET and
4803         ACX_NONCANONICAL_HOST.
4804         * configure: Regenerated.
4805
4806         Revert:
4807         2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>
4808
4809         * configure.ac (version_host, version_target): Set and AC_SUBST them.
4810         * configure: Rebuild.
4811         * Makefile.in (version_host, version_target): Get from configure.
4812         (version.c): Use $(version_host) and $(version_target).
4813
4814 2013-07-03  Pedro Alves  <palves@redhat.com>
4815
4816         * Makefile.in (config.status): Depend on development.sh.
4817         * acinclude.m4: Include libmcheck.m4.
4818         * configure: Regenerate.
4819
4820 2013-07-02  Mircea Gherzan  <mircea.gherzan@intel.com>
4821
4822         * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4823         attribute inside the parentheses.
4824         (winapi_DebugSetProcessKillOnExit): Ditto.
4825         (winapi_DebugBreakProcess): Ditto.
4826         (winapi_GenerateConsoleCtrlEvent): Ditto.
4827
4828 2013-07-02  Mircea Gherzan  <mircea.gherzan@intel.com>
4829
4830         * notif.h (notif_event): Add a dummy member to avoid compiler
4831         errors.
4832
4833 2013-07-01  Pedro Alves  <palves@redhat.com>
4834
4835         * hostio.c (HOSTIO_PATH_MAX): Define.
4836         (require_filename, handle_open, handle_unlink, handle_readlink):
4837         Use it.
4838
4839 2013-07-01  Pedro Alves  <palves@redhat.com>
4840
4841         * server.h: Include "pathmax.h".
4842         * linux-low.c: Don't include sys/param.h.
4843         (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4844         MAXPATHLEN.
4845         * win32-low.c: Don't include sys/param.h.
4846         (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4847
4848 2013-07-01  Pedro Alves  <palves@redhat.com>
4849
4850         * event-loop.c: Don't check HAVE_UNISTD_H before including
4851         <unistd.h>.
4852         * gdbreplay.c: Likewise.
4853         * remote-utils.c: Likewise.
4854         * server.c: Likewise.
4855         * configure.ac: Don't check for unistd.h.
4856         * configure: Regenerate.
4857
4858 2013-06-28  Tom Tromey  <tromey@redhat.com>
4859
4860         * Makefile.in (version.c): Use version.in, not
4861         common/version.in.
4862
4863 2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>
4864
4865         * configure.ac (version_host, version_target): Set and AC_SUBST them.
4866         * configure: Rebuild.
4867         * Makefile.in (version_host, version_target): Get from configure.
4868         (version.c): Use $(version_host) and $(version_target).
4869
4870 2013-06-10  Dmitry Kozlov <ddk@codesourcery.com>
4871
4872         Fix trace-status to output user name without trailing colon.
4873         * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4874
4875 2013-06-10  Dmitry Kozlov <ddk@codesourcery.com>
4876
4877         Fix trace-status to output proper start-time and stop-time.
4878         * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4879         output start time and stop time in hex as gdb expects.
4880
4881 2013-06-26  Pedro Alves  <pedro@codesourcery.com>
4882
4883         * tracepoint.c (build_traceframe_info_xml): Output trace state
4884         variables present in the trace buffer.
4885
4886 2013-06-24  Tom Tromey  <tromey@redhat.com>
4887
4888         * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4889         create-version.sh.
4890         (version.o): Remove.
4891         * gdbreplay.c: Include version.h.
4892         (version, host_name): Don't declare.
4893         * server.h: Include version.h.
4894         (version, host_name): Don't declare.
4895
4896 2013-06-12  Pedro Alves  <palves@redhat.com>
4897
4898         * linux-x86-low.c (linux_is_elf64): Delete global.
4899         (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4900         with local linux_pid_exe_is_elf_64_file use.
4901
4902 2013-06-11  Pedro Alves  <palves@redhat.com>
4903
4904         * linux-low.c (regset_disabled, disable_regset): New functions.
4905         (regsets_fetch_inferior_registers)
4906         (regsets_store_inferior_registers): Use them.
4907         (initialize_regsets_info); Don't allocate the disabled_regsets
4908         array here.
4909         * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4910         comment.
4911
4912 2013-06-11  Pedro Alves  <palves@redhat.com>
4913
4914         * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4915         xmalloc.
4916
4917 2013-06-11  Pedro Alves  <palves@redhat.com>
4918
4919         * linux-x86-low.c (initialize_low_arch): Call
4920         init_registers_x32_avx_linux.
4921
4922 2013-06-09  Jan Kratochvil  <jan.kratochvil@redhat.com>
4923
4924         Fix compatibility with Android Bionic.
4925         * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4926         it is not empty.
4927
4928 2013-06-07  Pedro Alves  <palves@redhat.com>
4929
4930         PR server/14823
4931         * Makefile.in (OBS): Add tdesc.o.
4932         (IPA_OBJS): Add tdesc-ipa.o.
4933         (tdesc-ipa.o): New rule.
4934         * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4935         interface.
4936         * linux-low.c (new_inferior): Delete.
4937         (disabled_regsets, num_regsets): Delete.
4938         (linux_add_process): Adjust to set the new per-process
4939         new_inferior flag.
4940         (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4941         (linux_wait_for_lwp): Adjust.  Only call arch_setup if the event
4942         was a stop.  When calling arch_setup, switch the current inferior
4943         to the thread that got an event.
4944         (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4945         (regsets_fetch_inferior_registers)
4946         (regsets_store_inferior_registers): New regsets_info parameter.
4947         Adjust to use it.
4948         (linux_register_in_regsets): New regs_info parameter.  Adjust to
4949         use it.
4950         (register_addr, fetch_register, store_register): New usrregs_info
4951         parameter.  Adjust to use it.
4952         (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4953         parameter regs_info.  Adjust to use it.
4954         (linux_fetch_registers): Get the current inferior's regs_info, and
4955         adjust to use it.
4956         (linux_store_registers): Ditto.
4957         [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4958         (initialize_low): Don't initialize the target_regsets here.  Call
4959         initialize_low_arch.
4960         * linux-low.h (target_regsets): Delete declaration.
4961         (struct regsets_info): New.
4962         (struct usrregs_info): New.
4963         (struct regs_info): New.
4964         (struct process_info_private) <new_inferior>: New field.
4965         (struct linux_target_ops): Delete the num_regs, regmap, and
4966         regset_bitmap fields.  New field regs_info.
4967         [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4968         * i387-fp.c (num_xmm_registers): Delete.
4969         (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4970         calls to new interface.
4971         (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4972         (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4973         Infer the number of xmm registers from the regcache's target
4974         description.
4975         * i387-fp.h (num_xmm_registers): Delete.
4976         * inferiors.c (add_thread): Don't install the thread's regcache
4977         here.
4978         * proc-service.c (gregset_info): Fetch the current inferior's
4979         regs_info.  Adjust to use it.
4980         * regcache.c: Include tdesc.h.
4981         (register_bytes, reg_defs, num_registers)
4982         (gdbserver_expedite_regs): Delete.
4983         (get_thread_regcache): If the thread doesn't have a regcache yet,
4984         create one, instead of aborting gdbserver.
4985         (regcache_invalidate_one): Rename to ...
4986         (regcache_invalidate_thread): ... this.
4987         (regcache_invalidate_one): New.
4988         (regcache_invalidate): Only invalidate registers of the current
4989         process.
4990         (init_register_cache): Add target_desc parameter, and use it.
4991         (new_register_cache): Ditto.  Assert the target description has a
4992         non zero registers_size.
4993         (regcache_cpy): Add assertions.  Adjust.
4994         (realloc_register_cache, set_register_cache): Delete.
4995         (registers_to_string, registers_from_string): Adjust.
4996         (find_register_by_name, find_regno, find_register_by_number)
4997         (register_cache_size): Add target_desc parameter, and use it.
4998         (free_register_cache_thread, free_register_cache_thread_one)
4999         (regcache_release, register_cache_size): New.
5000         (register_size): Add target_desc parameter, and use it.
5001         (register_data, supply_register, supply_register_zeroed)
5002         (supply_regblock, supply_register_by_name, collect_register)
5003         (collect_register_as_string, collect_register_by_name): Adjust.
5004         * regcache.h (struct target_desc): Forward declare.
5005         (struct regcache) <tdesc>: New field.
5006         (init_register_cache, new_register_cache): Add target_desc
5007         parameter.
5008         (regcache_invalidate_thread): Declare.
5009         (regcache_invalidate_one): Delete declaration.
5010         (regcache_release): Declare.
5011         (find_register_by_number, register_cache_size, register_size)
5012         (find_regno): Add target_desc parameter.
5013         (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
5014         declarations.
5015         * remote-utils.c: Include tdesc.h.
5016         (outreg, prepare_resume_reply): Adjust.
5017         * server.c: Include tdesc.h.
5018         (gdbserver_xmltarget): Delete declaration.
5019         (get_features_xml, process_serial_event): Adjust.
5020         * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
5021         declare.
5022         (struct process_info) <tdesc>: New field.
5023         (ipa_tdesc): Declare.
5024         * tdesc.c: New file.
5025         * tdesc.h: New file.
5026         * tracepoint.c: Include tdesc.h.
5027         [IN_PROCESS_AGENT] (ipa_tdesc): Define.
5028         (get_context_regcache): Adjust to pass ipa_tdesc down.
5029         (do_action_at_tracepoint): Adjust to get the register cache size
5030         from the context regcache's description.
5031         (traceframe_walk_blocks): Adjust to get the register cache size
5032         from the current trace frame's description.
5033         (traceframe_get_pc): Adjust to get current trace frame's
5034         description and pass it down.
5035         (gdb_collect): Adjust to get the register cache size from the
5036         IPA's description.
5037         * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
5038         (gdbserver_xmltarget): Delete.
5039         (initialize_low_tracepoint): Set the ipa's target description.
5040         * linux-i386-ipa.c (tdesc_i386_linux): Declare.
5041         (initialize_low_tracepoint): Set the ipa's target description.
5042         * linux-x86-low.c: Include tdesc.h.
5043         [__x86_64__] (is_64bit_tdesc): New.
5044         (ps_get_thread_area, x86_get_thread_area): Use it.
5045         (i386_cannot_store_register): Rename to ...
5046         (x86_cannot_store_register): ... this.  Use is_64bit_tdesc.
5047         (i386_cannot_fetch_register): Rename to ...
5048         (x86_cannot_fetch_register): ... this.  Use is_64bit_tdesc.
5049         (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
5050         to new interface.
5051         (target_regsets): Rename to ...
5052         (x86_regsets): ... this.
5053         (x86_get_pc, x86_set_pc): Adjust register_size calls to new
5054         interface.
5055         (x86_siginfo_fixup): Use is_64bit_tdesc.
5056         [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
5057         (tdesc_x32_avx_linux, tdesc_x32_linux)
5058         (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
5059         Declare.
5060         (x86_linux_update_xmltarget): Delete.
5061         (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
5062         (have_ptrace_getfpxregs, have_ptrace_getregset): New.
5063         (AMD64_LINUX_USER64_CS): New.
5064         (x86_linux_read_description): New, based on
5065         x86_linux_update_xmltarget.
5066         (same_process_callback): New.
5067         (x86_arch_setup_process_callback): New.
5068         (x86_linux_update_xmltarget): New.
5069         (x86_regsets_info): New.
5070         (amd64_linux_regs_info): New.
5071         (i386_linux_usrregs_info): New.
5072         (i386_linux_regs_info): New.
5073         (x86_linux_regs_info): New.
5074         (x86_arch_setup): Reimplement.
5075         (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
5076         (x86_emit_ops): Ditto.
5077         (the_low_target): Adjust.  Install x86_linux_regs_info,
5078         x86_cannot_fetch_register, and x86_cannot_store_register.
5079         (initialize_low_arch): New.
5080         * linux-ia64-low.c (tdesc_ia64): Declare.
5081         (ia64_fetch_register): Adjust.
5082         (ia64_usrregs_info, regs_info): New globals.
5083         (ia64_regs_info): New function.
5084         (the_low_target): Adjust.
5085         (initialize_low_arch): New function.
5086         * linux-sparc-low.c (tdesc_sparc64): Declare.
5087         (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
5088         Adjust.
5089         (sparc_arch_setup): New function.
5090         (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
5091         (the_low_target): Adjust.
5092         (initialize_low_arch): New function.
5093         * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
5094         (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
5095         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
5096         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
5097         (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
5098         (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
5099         (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
5100         (tdesc_powerpc_isa205_vsx64l): Declare.
5101         (ppc_cannot_store_register, ppc_collect_ptrace_register)
5102         (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
5103         (ppc_set_pc, ppc_get_hwcap): Adjust.
5104         (ppc_usrregs_info): Forward declare.
5105         (!__powerpc64__) ppc_regmap_adjusted: New global.
5106         (ppc_arch_setup): Adjust to the current process'es target
5107         description.
5108         (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
5109         (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
5110         (ppc_store_evrregset): Adjust.
5111         (target_regsets): Rename to ...
5112         (ppc_regsets): ... this, and make static.
5113         (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
5114         (ppc_regs_info): New function.
5115         (the_low_target): Adjust.
5116         (initialize_low_arch): New function.
5117         * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
5118         (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
5119         (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
5120         (tdesc_s390x_linux64v2): Declare.
5121         (s390_collect_ptrace_register, s390_supply_ptrace_register)
5122         (s390_fill_gregset, s390_store_last_break): Adjust.
5123         (target_regsets): Rename to ...
5124         (s390_regsets): ... this, and make static.
5125         (s390_get_pc, s390_set_pc): Adjust.
5126         (s390_get_hwcap): New target_desc parameter, and use it.
5127         [__s390x__] (have_hwcap_s390_high_gprs): New global.
5128         (s390_arch_setup): Adjust to set the current process'es target
5129         description.  Don't adjust the regmap.
5130         (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
5131         [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
5132         (regs_info_3264): New globals.
5133         (s390_regs_info): New function.
5134         (the_low_target): Adjust.
5135         (initialize_low_arch): New function.
5136         * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
5137         (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
5138         [__mips64] (init_registers_mips_linux)
5139         (init_registers_mips_dsp_linux): Delete defines.
5140         [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
5141         (have_dsp): New global.
5142         (mips_read_description): New, based on mips_arch_setup.
5143         (mips_arch_setup): Reimplement.
5144         (get_usrregs_info): New function.
5145         (mips_cannot_fetch_register, mips_cannot_store_register)
5146         (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
5147         (mips_fill_fpregset, mips_store_fpregset): Adjust.
5148         (target_regsets): Rename to ...
5149         (mips_regsets): ... this, and make static.
5150         (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
5151         (dsp_regs_info, regs_info): New globals.
5152         (mips_regs_info): New function.
5153         (the_low_target): Adjust.
5154         (initialize_low_arch): New function.
5155         * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
5156         (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
5157         Declare.
5158         (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
5159         (arm_read_description): New, with bits factored from
5160         arm_arch_setup.
5161         (arm_arch_setup): Reimplement.
5162         (target_regsets): Rename to ...
5163         (arm_regsets): ... this, and make static.
5164         (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
5165         (arm_regs_info): New function.
5166         (the_low_target): Adjust.
5167         (initialize_low_arch): New function.
5168         * linux-m68k-low.c (tdesc_m68k): Declare.
5169         (target_regsets): Rename to ...
5170         (m68k_regsets): ... this, and make static.
5171         (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
5172         (m68k_regs_info): New function.
5173         (m68k_arch_setup): New function.
5174         (the_low_target): Adjust.
5175         (initialize_low_arch): New function.
5176         * linux-sh-low.c (tdesc_sharch): Declare.
5177         (target_regsets): Rename to ...
5178         (sh_regsets): ... this, and make static.
5179         (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
5180         (sh_regs_info, sh_arch_setup): New functions.
5181         (the_low_target): Adjust.
5182         (initialize_low_arch): New function.
5183         * linux-bfin-low.c (tdesc_bfin): Declare.
5184         (bfin_arch_setup): New function.
5185         (bfin_usrregs_info, regs_info): New globals.
5186         (bfin_regs_info): New function.
5187         (the_low_target): Adjust.
5188         (initialize_low_arch): New function.
5189         * linux-cris-low.c (tdesc_cris): Declare.
5190         (cris_arch_setup): New function.
5191         (cris_usrregs_info, regs_info): New globals.
5192         (cris_regs_info): New function.
5193         (the_low_target): Adjust.
5194         (initialize_low_arch): New function.
5195         * linux-cris-low.c (tdesc_crisv32): Declare.
5196         (cris_arch_setup): New function.
5197         (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
5198         (cris_regs_info): New function.
5199         (the_low_target): Adjust.
5200         (initialize_low_arch): New function.
5201         * linux-m32r-low.c (tdesc_m32r): Declare.
5202         (m32r_arch_setup): New function.
5203         (m32r_usrregs_info, regs_info): New globals.
5204         (m32r_regs_info): Adjust.
5205         (initialize_low_arch): New function.
5206         * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
5207         (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
5208         (tic6x_usrregs_info): Forward declare.
5209         (tic6x_read_description): New function, based on ...
5210         (tic6x_arch_setup): ... this.  Reimplement.
5211         (target_regsets): Rename to ...
5212         (tic6x_regsets): ... this, and make static.
5213         (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
5214         (tic6x_regs_info): New function.
5215         (the_low_target): Adjust.
5216         (initialize_low_arch): New function.
5217         * linux-xtensa-low.c (tdesc_xtensa): Declare.
5218         (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
5219         (target_regsets): Rename to ...
5220         (xtensa_regsets): ... this, and make static.
5221         (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
5222         globals.
5223         (xtensa_arch_setup, xtensa_regs_info): New functions.
5224         (the_low_target): Adjust.
5225         (initialize_low_arch): New function.
5226         * linux-nios2-low.c (tdesc_nios2_linux): Declare.
5227         (nios2_arch_setup): Set the current process'es tdesc.
5228         (target_regsets): Rename to ...
5229         (nios2_regsets): ... this.
5230         (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
5231         (nios2_regs_info): New function.
5232         (the_low_target): Adjust.
5233         (initialize_low_arch): New function.
5234         * linux-aarch64-low.c (tdesc_aarch64): Declare.
5235         (aarch64_arch_setup): Set the current process'es tdesc.
5236         (target_regsets): Rename to ...
5237         (aarch64_regsets): ... this.
5238         (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
5239         (aarch64_regs_info): New function.
5240         (the_low_target): Adjust.
5241         (initialize_low_arch): New function.
5242         * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
5243         globals.
5244         (target_regsets): Rename to ...
5245         (tile_regsets): ... this.
5246         (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
5247         (tile_regs_info): New function.
5248         (tile_arch_setup): Set the current process'es tdesc.
5249         (the_low_target): Adjust.
5250         (initialize_low_arch): New function.
5251         * spu-low.c (tdesc_spu): Declare.
5252         (spu_create_inferior, spu_attach): Set the new process'es tdesc.
5253         * win32-arm-low.c (tdesc_arm): Declare.
5254         (arm_arch_setup): New function.
5255         (the_low_target): Install arm_arch_setup instead of
5256         init_registers_arm.
5257         * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
5258         (init_windows_x86): Rename to ...
5259         (i386_arch_setup): ... this.  Set `win32_tdesc'.
5260         (the_low_target): Adjust.
5261         * win32-low.c (win32_tdesc): New global.
5262         (child_add_thread): Don't create the thread cache here.
5263         (do_initial_child_stuff): Set the new process'es tdesc.
5264         * win32-low.h (struct target_desc): Forward declare.
5265         (win32_tdesc): Declare.
5266         * lynx-i386-low.c (tdesc_i386): Declare global.
5267         (lynx_i386_arch_setup): Set `lynx_tdesc'.
5268         * lynx-low.c (lynx_tdesc): New global.
5269         (lynx_add_process): Set the new process'es tdesc.
5270         * lynx-low.h (struct target_desc): Forward declare.
5271         (lynx_tdesc): Declare global.
5272         * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
5273         (lynx_ppc_arch_setup): Set `lynx_tdesc'.
5274         * nto-low.c (nto_tdesc): New global.
5275         (do_attach): Set the new process'es tdesc.
5276         * nto-low.h (struct target_desc): Forward declare.
5277         (nto_tdesc): Declare.
5278         * nto-x86-low.c (tdesc_i386): Declare.
5279         (nto_x86_arch_setup): Set `nto_tdesc'.
5280
5281 2013-06-04  Gary Benson  <gbenson@redhat.com>
5282
5283         * server.c (handle_query): Add "augmented-libraries-svr4-read+"
5284         to qSupported response when appropriate.
5285         (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
5286         with nonzero-length annex.
5287         * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
5288         arguments supplied in annex.
5289
5290 2013-05-31  Doug Evans  <dje@google.com>
5291
5292         PR server/15594
5293         * linux-x86-low.c (ps_get_thread_area): Properly extend address to
5294         64 bits in 64-cross-32 environment.
5295
5296 2013-05-28  Pedro Alves  <palves@redhat.com>
5297
5298         * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
5299         (aarch64-without-fpu.c): Delete rule.
5300         * configure.srv (aarch64*-*-linux*): Remove references to
5301         aarch64-without-fpu.o and aarch64-without-fpu.xml.
5302         * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
5303         declaration.
5304
5305 2013-05-24  Pedro Alves  <palves@redhat.com>
5306
5307         * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
5308         instead of strchr/decode_address.  Error if the range isn't split
5309         with a ','.  Don't assume there's be a ':' in the action.
5310
5311 2013-05-23  Yao Qi  <yao@codesourcery.com>
5312             Pedro Alves  <palves@redhat.com>
5313
5314         * linux-low.c (lwp_in_step_range): New function.
5315         (linux_wait_1): If the thread was range stepping and stopped
5316         outside the stepping range, report the stop to GDB.  Otherwise,
5317         continue stepping.  Add range stepping debug output.
5318         (linux_set_resume_request): Copy the step range from the resume
5319         request to the lwp.
5320         (linux_supports_range_stepping): New.
5321         (linux_target_ops) <supports_range_stepping>: Set to
5322         linux_supports_range_stepping.
5323         * linux-low.h (struct linux_target_ops)
5324         <supports_range_stepping>: New field.
5325         (struct lwp_info) <step_range_start, step_range_end>: New fields.
5326         * linux-x86-low.c (x86_supports_range_stepping): New.
5327         (the_low_target) <supports_range_stepping>: Set to
5328         x86_supports_range_stepping.
5329         * server.c (handle_v_cont): Handle 'r' action.
5330         (handle_v_requests): Append ";r" if the target supports range
5331         stepping.
5332         * target.h (struct thread_resume) <step_range_start,
5333         step_range_end>: New fields.
5334         (struct target_ops) <supports_range_stepping>:
5335         New field.
5336         (target_supports_range_stepping): New macro.
5337
5338 2013-05-17  Joel Brobecker  <brobecker@adacore.com>
5339
5340         * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
5341         confusion in comment.
5342
5343 2013-05-17  Joel Brobecker  <brobecker@adacore.com>
5344
5345         * lynx-low.c (struct process_info_private): New type.
5346         (lynx_add_process): New function.
5347         (lynx_create_inferior, lynx_attach): Replace calls to
5348         add_process by calls to lynx_add_process.
5349         (lynx_resume): If PTID is null, then try using
5350         current_process()->private->last_wait_event_ptid.
5351         Add comments.
5352         (lynx_clear_inferiors): Delete.  The contents of that function
5353         has been inlined in lynx_mourn;
5354         (lynx_wait_1): Save the ptid in the process's private data.
5355         (lynx_mourn): Free the process' private data.  Replace call
5356         to lynx_clear_inferiors by call to clear_inferiors.
5357
5358 2013-05-17  Yao Qi  <yao@codesourcery.com>
5359
5360         * i386-low.c (i386_length_and_rw_bits): Move the comment to
5361         the right place.
5362
5363 2013-05-16  Luis Machado  <lgustavo@codesourcery.com>
5364
5365         * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
5366         PT_DATA_ADDR and PT_TEXT_END_ADDR.  Update comments.
5367         (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
5368         PT_TEXT_END_ADDR guards.  Update comments.
5369         (linux_target_op) <read_offsets>: Conditionally define to
5370         linux_read_offsets if the target is UCLIBC and if it defines
5371         PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
5372
5373 2013-05-06  Sandra Loosemore  <sandra@codesourcery.com>
5374             Andrew Jenner  <andrew@codesourcery.com>
5375
5376         * Makefile.in (SFILES): Add linux-nios2-low.c.
5377         (clean): Add action to delete nios2-linux.c.
5378         (nios2-linux.c): New rule.
5379         * configure.srv: Add nios2*-*-linux*.
5380         * linux-nios2-low.c: New.
5381
5382 2013-05-03  Hafiz Abid Qadeer  <abidh@codesourcery.com>
5383
5384         * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
5385
5386 2013-04-25  Hui Zhu  <hui@codesourcery.com>
5387
5388         PR gdb/15186
5389         * ax.c (ax_printf): Add fflush.
5390
5391 2013-04-22  Tom Tromey  <tromey@redhat.com>
5392
5393         * Makefile.in (SFILES): Add filestuff.c.
5394         (OBS): Add filestuff.o.
5395         (filestuff.o): New target.
5396         * config.in, configure: Rebuild.
5397         * configure.ac: Check for fdwalk, pipe2.
5398
5399 2013-04-17  Pedro Alves  <palves@redhat.com>
5400
5401         * configure.ac (USE_THREAD_DB): Delete variable.
5402         (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
5403         Don't AC_SUBST USE_THREAD_DB.
5404         * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
5405         * config.in, configure: Regenerate.
5406
5407 2013-04-16  Pedro Alves  <palves@redhat.com>
5408
5409         * linux-low.h (struct lwp_info) <thread_known>: Move under
5410         the USE_THREAD_DB #ifdef.
5411
5412 2013-04-16  Pedro Alves  <palves@redhat.com>
5413
5414         * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
5415         (linux-low.o): Delete rule.
5416         * linux-low.h: Always include "gdb_thread_db.h" instead of
5417         conditionally including thread_db.h.
5418         (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
5419         HAVE_THREAD_DB_H.
5420
5421 2013-04-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
5422
5423         * Makefile.in (install-only): Fix make install regression.
5424
5425 2013-04-05  Jan Kratochvil  <jan.kratochvil@redhat.com>
5426
5427         Convert man pages to texinfo, new gdbinit.5 texinfo page.
5428         * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
5429         installation.
5430         * gdbserver.1: Remove.
5431
5432 2013-03-22  Pedro Alves  <palves@redhat.com>
5433
5434         * linux-low.c (handle_extended_wait): Don't call
5435         linux_enable_event_reporting.
5436
5437 2013-03-15  Tony Theodore  <tonyt@logyst.com>
5438
5439         PR build/9098:
5440         * Makefile.in (SHELL): Use @SHELL@.
5441
5442 2013-03-14  Sergio Durigan Junior  <sergiodj@redhat.com>
5443
5444         * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
5445         compiler warning.
5446
5447 2013-03-13  Joel Brobecker  <brobecker@adacore.com>
5448
5449         * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
5450         Remove extraneous NULL element.
5451
5452 2013-03-13  Yao Qi  <yao@codesourcery.com>
5453
5454         * tracepoint.c (traceframe_read_tsv): Look for the last matched
5455         'V' block in trace frame.
5456
5457 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
5458
5459         * target.h (struct target_ops): Add btrace ops.
5460         (target_supports_btrace): New macro.
5461         (target_enable_btrace): New macro.
5462         (target_disable_btrace): New macro.
5463         (target_read_btrace): New macro.
5464         * gdbthread.h (struct thread_info): Add btrace field.
5465         * server.c: Include btrace-common.h.
5466         (handle_btrace_general_set): New function.
5467         (handle_btrace_enable): New function.
5468         (handle_btrace_disable): New function.
5469         (handle_general_set): Call handle_btrace_general_set.
5470         (handle_qxfer_btrace): New function.
5471         (struct qxfer qxfer_packets[]): Add btrace entry.
5472         * inferiors.c (remove_thread): Disable btrace.
5473         * linux-low: Include linux-btrace.h.
5474         (linux_low_enable_btrace): New function.
5475         (linux_low_read_btrace): New function.
5476         (linux_target_ops): Add btrace ops.
5477         * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
5478         Add srv_linux_btrace=yes.
5479         (x86_64-*-linux*): Add linux-btrace.o.
5480         Add srv_linux_btrace=yes.
5481         * configure.ac: Define HAVE_LINUX_BTRACE.
5482         * config.in: Regenerated.
5483         * configure: Regenerated.
5484
5485 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
5486
5487         * server.c (handle_qxfer): Preserve error message if -3 is
5488         returned.
5489         (qxfer): Document the -3 return value.
5490
5491 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
5492
5493         * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
5494         (linux_btrace_h): New variable.
5495         (linux-btrace.o): New rule.
5496
5497 2013-03-08  Stan Shebs  <stan@codesourcery.com>
5498             Hafiz Abid Qadeer  <abidh@codesourcery.com>
5499
5500         * tracepoint.c (trace_buffer_size): New global.
5501         (DEFAULT_TRACE_BUFFER_SIZE): New define.
5502         (init_trace_buffer): Change to one-argument function. Allocate
5503         trace buffer memory.
5504         (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
5505         handle QTBuffer:size packet.
5506         (cmd_bigqtbuffer_size): New function.
5507         (initialize_tracepoint): Call init_trace_buffer with
5508         DEFAULT_TRACE_BUFFER_SIZE.
5509         * server.c (handle_query): Add QTBuffer:size in the
5510         supported packets.
5511
5512 2013-03-07  Yao Qi  <yao@codesourcery.com>
5513
5514         * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5515         (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5516         of -1.
5517         (cmd_qtsp): Adjust condition.  Do post increment.
5518         Set cur_action and cur_step_action back to 0.
5519
5520 2013-03-07  Jeremy Bennett  <jeremy.bennett@embecosm.com>
5521
5522         PR server/15236
5523         * linux-low.c (linux_write_memory): Return early success if LEN is
5524         zero.
5525
5526 2013-03-05  Corinna Vinschen  <vinschen@redhat.de>
5527
5528         * configure.srv: Add x86_64-*-cygwin* as target.
5529
5530 2013-02-28  Tom Tromey  <tromey@redhat.com>
5531
5532         * configure.ac: Invoke AC_SYS_LARGEFILE.
5533         * configure, config.in: Rebuild.
5534
5535 2013-02-28  Corinna Vinschen  <vinschen@redhat.com>
5536
5537         * win32-low.c: Throughout, fix format strings and casts of
5538         printf-like functions to avoid type related warnings on all
5539         platforms.
5540         (get_child_debug_event): Print dwDebugEventCode as hex since
5541         that's how it's usually documented.
5542
5543 2013-02-28  Yao Qi  <yao@codesourcery.com>
5544
5545         * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5546         pulongest.
5547
5548 2013-02-27  Jiong Wang  <jiwang@tilera.com>
5549
5550         * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5551         (reg-tilegx32.c): New rule.
5552         * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5553         * linux-tile-low.c (tile_arch_setup): New function.  Invoke
5554         different register info initializer according to elf class.
5555         (init_registers_tilgx32): New function.  The tilegx32 register info
5556         initializer.
5557         (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5558         (tile_store_gregset): Likewise.
5559
5560 2013-02-27  Yao Qi  <yao@codesourcery.com>
5561
5562         * server.c (process_point_options): Print debug message when
5563         debug_threads is true.
5564
5565 2013-02-26  Yao Qi  <yao@codesourcery.com>
5566
5567         * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5568
5569 2013-02-19  Pedro Alves  <palves@redhat.com>
5570             Kai Tietz <ktietz@redhat.com>
5571
5572         PR gdb/15161
5573
5574         * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5575         instead of strtoul to extract address from packet.
5576         (process_serial_event) <'z'>: Likewise.
5577
5578 2013-02-18  Yao Qi  <yao@codesourcery.com>
5579
5580         * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5581
5582 2013-02-14  Pedro Alves  <palves@redhat.com>
5583
5584         Plug memory leak.
5585
5586         * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5587         TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5588
5589 2013-02-14  Pedro Alves  <palves@redhat.com>
5590
5591         * tracepoint.c (cmd_qtdpsrc): Use savestring.
5592
5593 2013-02-14  Pedro Alves  <palves@redhat.com>
5594
5595         * tracepoint.c (save_string): Delete.
5596         (add_tracepoint_action): Use savestring instead of save_string.
5597
5598 2013-02-12  Pedro Alves  <palves@redhat.com>
5599
5600         * linux-xtensa-low.c: Ditto.
5601         * xtensa-xtregs.c: Ditto.
5602
5603 2013-02-12  Sanimir Agovic  <sanimir.agovic@intel.com>
5604
5605         * thread-db.c (thread_db_get_tls_address): NULL pointer check
5606         thread_db.
5607
5608 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
5609
5610         * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5611         aarch64_num_wp_regs and aarch64_num_bp_regs to
5612         AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5613
5614 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
5615
5616         * linux-aarch64-low.c (ps_get_thread_area): Replace
5617         PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5618
5619 2013-02-04  Jim MacArthur  <jim.macarthur@arm.com>
5620             Marcus Shawcroft  <marcus.shawcroft@arm.com>
5621             Nigel Stephens  <nigel.stephens@arm.com>
5622             Yufeng Zhang  <yufeng.zhang@arm.com>
5623
5624         * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5625         (aarch64.c, aarch64-without-fpu.c): New targets.
5626         * configure.srv (aarch64*-*-linux*): New.
5627         * linux-aarch64-low.c: New file.
5628
5629 2013-02-04  Marcus Shawcroft  <marcus.shawcroft@arm.com>
5630
5631         * linux-low.c (handle_extended_wait, linux_create_inferior)
5632         (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5633         (dequeue_one_deferred_signal, linux_resume_one_thread)
5634         (fetch_register, linux_write_memory, linux_enable_event_reporting)
5635         (linux_tracefork_grandchild, linux_test_for_tracefork)
5636         (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5637         PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5638         where the argument is 0.
5639
5640 2013-01-25  Yao Qi  <yao@codesourcery.com>
5641
5642         * event-loop.c: Include "queue.h".
5643         (gdb_event_p): New typedef.
5644         (struct gdb_event) <next_event>: Remove.
5645         (event_queue): Change to QUEUE(gdb_event_p).
5646         (async_queue_event): Remove.
5647         (gdb_event_xfree): New.
5648         (initialize_event_loop): New.
5649         (process_event): Use API from QUEUE.
5650         (wait_for_event): Likewise.
5651         * server.c (main): Call initialize_event_loop.
5652         * server.h (initialize_event_loop): Declare.
5653
5654 2013-01-18  Yao Qi  <yao@codesourcery.com>
5655
5656         * ax.h (struct eval_agent_expr_context): New.
5657         (gdb_eval_agent_expr): Update declaration.
5658         * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5659         TFRAME.  Add new argument CTX.
5660         * server.h (struct eval_agent_expr_context): Declare.
5661         (agent_mem_read, agent_tsv_read): Update declaration.
5662         (agent_mem_read_string): Likewise.
5663         * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5664         (add_traceframe_block): Add new argument TPOINT.
5665         Increase TPOINT->traceframe_usage.
5666         (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5667         eval_tracepoint_agent_expr.
5668         (condition_true_at_tracepoint): Likewise.
5669         (agent_mem_read): Remove argument TFRAME.  Add argument CTX.
5670         (agent_mem_read_string, agent_tsv_read): Likewise.
5671
5672 2013-01-16  Yao Qi  <yao@codesourcery.com>
5673
5674         * linux-low.c (linux_resume_one_lwp): Don't check
5675         'lwp->bp_reinsert != 0'.
5676
5677 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
5678             Pedro Alves  <palves@redhat.com>
5679
5680         * lynx-low.c (ptrace_request_to_str): Define a temporary
5681         macro and use it to simplify this function's implementation.
5682
5683 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
5684
5685         * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5686         sets errno.
5687
5688 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
5689
5690         * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5691
5692 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
5693
5694         * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5695
5696 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
5697
5698         * lynx-low.c (lynx_resume): Use the resume_info parameter
5699         to determine the ptid for the lynx_ptrace call, unless
5700         it is equal to minus_one_ptid, in which case we use the
5701         ptid of the current_inferior.
5702         (lynx_wait_1): After having received a thread create/exit
5703         event, resume the inferior's execution using the signaling
5704         thread's ptid, rather than the old ptid.
5705
5706 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
5707
5708         * lynx-low.c (lynx_resume): Delete variable ret.
5709
5710 2013-01-01  Joel Brobecker  <brobecker@adacore.com>
5711
5712         * gdbreplay.c (gdbreplay_version): Update copyright year.
5713         * server.c (gdbserver_version): Likewise.
5714
5715 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
5716
5717         * lynx-low.c (lynx_wait_1): Add debug trace before adding
5718         new thread.
5719
5720 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
5721
5722         * lynx-low.c (ptrace_request_to_str): Add handling for
5723         PTRACE_GETTRACESIG.
5724
5725 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
5726
5727         * lynx-low.c (lynx_attach): Delete variable new_process.
5728
5729 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
5730
5731         * lynx-low.c (lynx_create_inferior): Delete variable
5732         new_process.
5733
5734 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
5735
5736         * lynx-low.c (ptrace_request_to_str): Do not handle
5737         PTRACE_GETTHREADLIST if this macro does not exist.
5738
5739 2012-12-15  Yao Qi  <yao@codesourcery.com>
5740
5741         * Makefile.in (OBS): Add notif.o.
5742         * notif.c, notif.h: New.
5743         * server.c: Include "notif.h".
5744         (struct vstop_notif) <next>: Remove.
5745         <base>: New field.
5746         (queue_stop_reply): Update.
5747         (push_event, send_next_stop_reply): Remove.
5748         (discard_queued_stop_replies): Update.
5749         (notif_stop): New variable.
5750         (handle_v_stopped): Remove.
5751         (handle_v_requests): Don't call handle_v_stopped.  Call
5752         handle_ack_notif instead.
5753         (queue_stop_reply_callback): Call notif_event_enque instead
5754         of queue_stop_reply.
5755         (handle_status): Don't call send_next_stop_reply, call
5756         notif_write_event instead.
5757         (kill_inferior_callback): Likewise.
5758         (detach_or_kill_inferior_callback): Likewise.
5759         (main): Call initialize_notif.
5760         (process_serial_event): Call QUEUE_is_empty.
5761         (handle_target_event): Call notif_push instead of push event.
5762         * server.h (push_event): Remove declaration.
5763
5764 2012-12-10  Tom Tromey  <tromey@redhat.com>
5765
5766         * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5767         (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5768         macros.
5769         (.c.o): Rewrite.
5770         (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5771         (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5772         (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5773         (amd64-linux-ipa.o, ax.o): Rewrite.
5774         (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5775         (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5776         (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5777         (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5778         (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5779         (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5780         (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5781         (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5782         (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5783         (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5784         (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5785         (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5786         (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5787         (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5788         (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5789         (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5790         (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5791         (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5792         (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5793         (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5794         (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5795         (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5796         (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5797         (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5798         (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5799         (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5800         (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5801         (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5802         (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5803         (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5804         (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5805         (reg-tilegx.o): Remove.
5806         (all_object_files): New macro.
5807         Include .deps files.
5808         * aclocal.m4, configure: Rebuild.
5809         * acinclude.m4: Include depstand.m4, lead-dot.m4.
5810         * configure.ac: Invoke ZW_CREATE_DEPDIR,
5811         ZW_PROG_COMPILER_DEPENDENCIES.  Compute GMAKE condition.
5812
5813 2012-12-05  Tom Tromey  <tromey@redhat.com>
5814
5815         PR gdb/14917:
5816         * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5817
5818 2012-11-28  Markus Metzger  <markus.t.metzger@intel.com>
5819
5820         * configure.ac: Check for linux/perf_event.h.
5821         * config.in: Regenerated.
5822         * configure: Regenerated.
5823
5824 2012-11-26  Maxime Villard  <rustyBSD@gmx.fr>
5825
5826         * hostio.c (handle_readlink): Decrease buffer size
5827         parameter passed to readlink by one byte.
5828
5829 2012-11-26  Yao Qi  <yao@codesourcery.com>
5830
5831         * configure.ac (build_warnings): Append '-Wempty-body'.
5832         * configure: Regenerated.
5833         * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5834         body.
5835
5836 2012-11-15  Pierre Muller  <muller@sourceware.org>
5837
5838         * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5839         * config.in: Regenerate.
5840         * configure: Regenerate.
5841         * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5842         Use "gdb_wait.h" header instead of <sys/wait.h> header.
5843         * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5844         * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5845         header.
5846         * server.c: Remove HAVE_WAIT_H conditional.  Use "gdb_wait.h" header
5847         instead of <sys/wait.h> header.
5848         * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5849
5850 2012-11-13 Markus Metzger  <markus.t.metzger@intel.com>
5851
5852         * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5853         (various make rules): Remove -DGDBSERVER
5854
5855 2012-11-09  Yao Qi  <yao@codesourcery.com>
5856
5857         * spu-low.c (current_ptid): Move it to ..
5858         * gdbthread.h: ... here.  New.
5859         * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5860         * server.c (myresume, process_serial_event): Likewise.
5861         * thread-db.c (thread_db_find_new_threads): Likewise.
5862         * tracepoint.c (run_inferior_command): Likewise.
5863
5864 2012-10-01  Andrew Burgess  <aburgess@broadcom.com>
5865
5866         * server.c (handle_search_memory_1): Include access length in
5867         warning message.
5868
5869 2012-09-05  Michael Brandt  <michael.brandt@axis.com>
5870
5871         * linux-crisv32-low.c: Fix compile errors.
5872
5873 2012-09-04  Yao Qi  <yao@codesourcery.com>
5874
5875         * tracepoint.c (cmd_qtsv): Adjust debug message.
5876         Don't check CUR_TPOINT.
5877
5878 2012-08-28  Yao Qi  <yao@codesourcery.com>
5879
5880         * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5881         * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5882         (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5883         Remove declarations of xmalloc, xreallloc, xstrdup and
5884         freeargv.
5885         * Makefile.in (libiberty_h): New.
5886         (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5887         (linux-bfin-low.o): Append dependency 'libiberty.h'.
5888
5889 2012-08-23  Yao Qi  <yao@codesourcery.com>
5890
5891         * server.h: Remove declaration of 'xsnprintf'.
5892
5893 2012-08-22  Keith Seitz  <keiths@redhat.com>
5894
5895         * server.h: Include build-gnulib-gbserver/config.h.
5896         * gdbreplay.c: Likewise.
5897
5898 2012-08-08  Doug Evans  <dje@google.com>
5899
5900         * Makefile.in (SFILES): Add gdb_vecs.c.
5901         (OBS): Add gdb_vecs.o.
5902         (gdb_vecs_h, host_defs_h): New variables.
5903         (thread-db.o): Add $(gdb_vecs_h) dependency.
5904         (gdb_vecs.o): New rule.
5905         * thread-db.c: #include "gdb_vecs.h".
5906         (thread_db_load_search): Use a vector to iterate over path elements.
5907         Handle text appearing after "$pdir".
5908
5909         * configure.ac: Add check for strstr.
5910         * config.in: Regenerate.
5911         * configure: Regenerate.
5912
5913 2012-08-02  Ulrich Weigand  <ulrich.weigand@linaro.org>
5914
5915         * hostio.c (handle_pread): If pread fails, fall back to attempting
5916         lseek/read.
5917         (handle_pwrite): Likewise for pwrite.
5918
5919 2012-08-01  Ulrich Weigand  <ulrich.weigand@linaro.org>
5920
5921         * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5922         between unsupported TYPE and unimplementable ADDR/LEN combination.
5923         (arm_insert_point): Act on new return value.
5924
5925 2012-07-31  Pedro Alves  <palves@redhat.com>
5926
5927         * server.c (process_point_options): Only skip tokens if we find
5928         one that is unrecognized.  Don't treat 'X' specially while
5929         skipping unrecognized tokens.
5930
5931 2012-07-30  Ulrich Weigand  <ulrich.weigand@linaro.org>
5932
5933         * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5934         to 4-byte-align HW breakpoint addresses for Thumb.
5935
5936 2012-07-27  Yao Qi  <yao@codesourcery.com>
5937
5938         PR remote/14161.
5939
5940         * server.h: Declare gdb_agent_about_to_close.
5941         * target.c (kill_inferior): Include "agent.h".
5942         New.  Send command 'kill'.
5943         * target.h (kill_inferior): Removed macro.
5944         * tracepoint.c (gdb_agent_about_to_close): New.
5945         (gdb_agent_helper_thread): Handle command 'close'.
5946         Wait endlessly until the inferior stops.
5947         Install gdb_agent_remove_socket to atexit hook.
5948         (agent_socket_name): New static variable.
5949         (gdb_agent_socket_init): Replace local variable 'name' with
5950         'agent_socket_name'.
5951         (gdb_agent_remove_socket): New.
5952
5953 2012-07-27  Yao Qi  <yao@codesourcery.com>
5954
5955         * server.c (process_point_options): Stop at 'X' when parsing.
5956
5957 2012-07-19  Michael Eager  <eager@eagercon.com>
5958
5959         * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
5960         to hw_execute.
5961         * linux-x86-low.c (x86_insert_point, x86_remove_point):
5962         Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5963         hardware breakpoint.
5964
5965 2012-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
5966
5967         * gdbserver/linux-low.c (initialize_low): Call
5968         linux_ptrace_init_warnings.
5969
5970 2012-07-02  Doug Evans  <dje@google.com>
5971
5972         * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5973         pointer to int.
5974
5975 2012-07-02  Stan Shebs  <stan@codesourcery.com>
5976
5977         * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5978         (ax.o): Add it to build rule.
5979         (ax-ipa.o): Ditto.
5980         (OBS): Add format.o.
5981         (IPA_OBS): Add format.o.
5982         * server.c (handle_query): Claim support for breakpoint commands.
5983         (process_point_options): Add command case.
5984         (process_serial_event): Leave running if there are printfs in
5985         effect.
5986         * mem-break.h (any_persistent_commands): Declare.
5987         (add_breakpoint_commands): Declare.
5988         (gdb_no_commands_at_breakpoint): Declare.
5989         (run_breakpoint_commands): Declare.
5990         * mem-break.c (struct point_command_list): New struct.
5991         (struct breakpoint): New field command_list.
5992         (any_persistent_commands): New function.
5993         (add_commands_to_breakpoint): New function.
5994         (add_breakpoint_commands): New function.
5995         (gdb_no_commands_at_breakpoint): New function.
5996         (run_breakpoint_commands): New function.
5997         * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5998         locally.
5999         * ax.c: Include format.h.
6000         (ax_printf): New function.
6001         (gdb_eval_agent_expr): Add printf opcode.
6002
6003 2012-06-13  Yao Qi  <yao@codesourcery.com>
6004
6005         * server.c (start_inferior): Remove duplicated writes to fields
6006         'last_resume_kind' and 'last_status' of 'current_inferior'.
6007
6008 2012-06-12  Yao Qi  <yao@codesourcery.com>
6009             Pedro Alves  <palves@redhat.com>
6010
6011         * linux-low.c (linux_set_resume_request): Simplify predicate.  Add
6012         comment.
6013         * server.c (handle_v_cont): Extend comment.
6014
6015 2012-06-11  Yao Qi  <yao@codesourcery.com>
6016
6017         * linux-low.c (linux_attach): Add 'static'.
6018
6019 2012-06-06  Yao Qi  <yao@codesourcery.com>
6020
6021         * ax.c (gdb_eval_agent_expr): Print `top' in hex.
6022
6023 2012-06-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
6024
6025         Fix gcc -flto compilation warning.
6026         * server.c (main): Make variable multi_mode and attach volatile.
6027
6028 2012-05-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
6029
6030         * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
6031         if the platform doesn't know about it.
6032
6033 2012-05-30  Jeff Kenton  <jkenton@tilera.com>
6034
6035         * Makefile.in (SFILES): Add linux-tile-low.c.
6036         (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
6037         * configure.srv: Handle tilegx-*-linux*.
6038         * linux-tile-low.c: New file.
6039
6040 2012-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
6041
6042         * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
6043
6044 2012-05-24  Pedro Alves  <palves@redhat.com>
6045
6046         PR gdb/7205
6047
6048         Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
6049
6050 2012-05-24  Pedro Alves  <palves@redhat.com>
6051
6052         PR gdb/7205
6053
6054         Replace target_signal with gdb_signal throughout.
6055
6056 2012-05-22  Maciej W. Rozycki  <macro@codesourcery.com>
6057
6058         * linux-low.c (linux_store_registers): Avoid the copying sequence
6059         when no data has been retrieved by ptrace.
6060
6061 2012-05-22  Will Deacon  <will.deacon@arm.com>
6062
6063         * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
6064         Include asm/ptrace.h.
6065         (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
6066         already defined.
6067
6068 2012-05-21  Maciej W. Rozycki  <macro@codesourcery.com>
6069
6070         * linux-low.c (linux_store_registers): Don't re-retrieve data
6071         with ptrace that has already been obtained from /proc.  Always
6072         copy any data retrieved with ptrace to the buffer supplied.
6073
6074 2012-05-11  Yao Qi  <yao@codesourcery.com>
6075             Pedro Alves  <palves@redhat.com>
6076
6077         * linux-low.c (enum stopping_threads_kind): New.
6078         (stopping_threads): Change type to `enum stopping_threads_kind'.
6079         (handle_extended_wait): If stopping and suspending threads, leave
6080         the new_lwp suspended too.
6081         (linux_wait_for_event): Adjust.
6082         (stop_all_lwps): Set `stopping_threads' to
6083         STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
6084         whether we're suspending threads or just stopping them.  Assert no
6085         recursion happens.
6086
6087 2012-04-29  Yao Qi  <yao@codesourcery.com>
6088
6089         * server.h: Move some code to ...
6090         * gdbthread.h: ... here.  New.
6091         * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
6092         (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
6093         (nto-low.o, win32-low.o): Likewise.
6094         * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
6095         * regcache.c, remote-utils.c, server.c: Likewise.
6096         * target.c, tracepoint.c, win32-low.c: Likewise.
6097
6098 2012-04-24  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
6099
6100         * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
6101         (PTRACE_ARG4_TYPE): Likewise.
6102         (PTRACE_XFER_TYPE): Likewise.
6103         * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
6104         ptrace to PTRACE_ARG3_TYPE.
6105         * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
6106         (PTRACE_ARG4_TYPE): Likewise.
6107         (PTRACE_XFER_TYPE): Likewise.
6108         (linux_detach_one_lwp): Cast fourth argument of
6109         ptrace to long then PTRACE_ARG4_TYPE.
6110         (regsets_fetch_inferior_registers): Cast third argument of
6111         ptrace to long then PTRACE_ARG3_TYPE.
6112         (regsets_store_inferior_registers): Likewise.
6113
6114 2012-04-20  Pedro Alves  <palves@redhat.com>
6115
6116         * configure: Regenerate.
6117
6118 2012-04-19  Pedro Alves  <palves@redhat.com>
6119
6120         * Makefile.in (GNULIB_BUILDDIR): New.
6121         (LIBGNU, INCGNU, GNULIB_H): Adjust.
6122         (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
6123         (all, install-only, uninstall, clean-info, all-lib, clean): No
6124         longer pass GNULIB_FLAGS_TO_PASS.  Use subdir_do.
6125         (maintainer-clean realclean distclean): Use subdir_do.
6126         (subdir_do): New.
6127         (gnulib/import/Makefile): Adjust.  Replace gnulib/import with
6128         $(GNULIB_BUILDDIR).  Don't pass argument to config.status.
6129         * acinclude.m4: Include acx_configure_dir.m4.
6130         * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
6131         calls.  Call AC_PROG_RANLIB.  Configure gnulib using
6132         ACX_CONFIGURE_DIR.
6133         (GNULIB): New.
6134         (GNULIB_STDINT_H): Adjust.
6135         (AC_OUTPUT): Don't output gnulib/Makefile anymore.
6136         * gdbreplay.c: Include build-gnulib/config.h.
6137         * server.h: Likewise.
6138         * aclocal.m4: Regenerate.
6139         * config.in: Regenerate.
6140         * configure: Regenerate.
6141
6142 2012-04-19  Pedro Alves  <palves@redhat.com>
6143
6144         * Makefile.in (LIBGNU, INCGNU): Adjust.
6145         (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
6146         (all, install-only, uninstall, clean-info, all-lib, clean)
6147         (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
6148         * configure.ac: Adjust AC_OUTPUT output.
6149         * aclocal.m4: Regenerate.
6150         * configure: Regenerate.
6151
6152 2012-04-19  Pedro Alves  <palves@redhat.com>
6153
6154         * Makefile.in (generated_files): New.
6155         (server_h): Remove the explicit dependency on config.h, and depend
6156         on $generated_files.
6157
6158 2012-04-19  Pedro Alves  <palves@redhat.com>
6159
6160         * Makefile.in (INCGNU): Add -Ignulib.
6161
6162 2012-04-19  Pedro Alves  <palves@redhat.com>
6163
6164         * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
6165         (INCGNU): ... this, and spell out -I here.
6166         (GNULIB_LIB): Rename to ...
6167         (LIBGNU): ... this.
6168         (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
6169
6170 2012-04-19  Pedro Alves  <palves@redhat.com>
6171
6172         * config.in: Regenerate.
6173
6174 2012-04-19  Pedro Alves  <palves@redhat.com>
6175
6176         * configure.ac: Remove AC_CHECK_DECLS check for memmem.
6177         * server.h (memmem): Remove declaration.
6178         * config.in: Regenerate.
6179         * configure: Regenerate.
6180
6181 2012-04-19  Yao Qi  <yao@codesourcery.com>
6182
6183         * Makefile.in (SFILES): Add common/vec.c.
6184         (OBS): Add vec.o.
6185         (vec.o): New rule.
6186
6187 2012-04-19  Yao Qi  <yao@codesourcery.com>
6188
6189         * remote-utils.c (prepare_resume_reply): Replace with macro
6190         target_core_of_thread.
6191         * server.c (handle_qxfer_threads_proper): Likewise.
6192         * target.h (traget_core_of_thread): New macro.
6193
6194 2012-04-18  Pedro Alves  <palves@redhat.com>
6195
6196         * aclocal.m4: Regenerate.
6197         * configure: Regenerate.
6198
6199 2012-04-16  Yao Qi  <yao@codesourcery.com>
6200
6201         * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
6202         duplicated on address.
6203
6204 2012-04-16  Yao Qi  <yao@codesourcery.com>
6205
6206         * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
6207         (struct tracepoint_action_ops) <send>: New field.
6208         (m_tracepoint_action_send, r_tracepoint_action_send): New.
6209         (agent_expr_send, x_tracepoint_action_send): New.
6210         (l_tracepoint_action_send): New.
6211         (cmd_qtdp): Download and install tracepoint
6212         according to `use_agent'.
6213         (run_inferior_command): Add one more parameter `len'.
6214         Update callers.
6215         (tracepoint_send_agent): New.
6216         (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
6217
6218 2012-04-16  Yao Qi  <yao@codesourcery.com>
6219
6220         * tracepoint.c (download_tracepoints): Moved to ...
6221         (cmd_qtstart): ... here.
6222
6223 2012-04-14  Yao Qi  <yao@codesourcery.com>
6224
6225         * tracepoint.c: Include inttypes.h.
6226         (struct collect_memory_action): Use sized types.
6227         (struct tracepoint): Likewise.
6228         (cmd_qtdp, stop_tracing): Update print specifiers.
6229         (cmd_qtp, response_tracepoint): Likewise.
6230         (collect_data_at_tracepoint): Likewise.
6231         (collect_data_at_step): Likewise.
6232
6233 2012-04-14  Yao Qi  <yao@codesourcery.com>
6234
6235         Import gnulib module inttypes.
6236         * aclocal.m4, config.in, configure: Regenerated.
6237
6238 2012-04-14  Yao Qi  <yao@codesourcery.com>
6239
6240         * Makefile.in (maintainer-clean, realclean, distclean): Remove
6241         Makefile and config.status at last.
6242
6243 2012-04-13  Yao Qi  <yao@codesourcery.com>
6244
6245         * tracepoint.c: Include stdint.h unconditionally.
6246
6247 2012-04-13  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
6248
6249         * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
6250         on BFD_HAVE_SYS_PROCFS_TYPE.
6251         * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
6252         * configure: Regenerate.
6253         * config.in: Likewise.
6254
6255 2012-04-13  H.J. Lu  <hongjiu.lu@intel.com>
6256
6257         * Makefile.in (clean): Also remove x32.c x32-linux.c
6258         x32-avx.c x32-avx-linux.c.
6259         (x32.o): New target.
6260         (x32.c): Likewise.
6261         (x32-linux.o): Likewise.
6262         (x32-linux.c): Likewise.
6263         (x32-avx.o): Likewise.
6264         (x32-avx.c): Likewise.
6265         (x32-avx-linux.o): Likewise.
6266         (x32-avx-linux.c): Likewise.
6267
6268         * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
6269         (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
6270         (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
6271         (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
6272         (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
6273         i386/x32-avx-linux.xml.
6274
6275         * linux-x86-low.c (init_registers_x32_linux): New prototype.
6276         (init_registers_x32_avx_linux): Likwise.
6277         (x86_linux_update_xmltarget): Call init_registers_x32_linux
6278         or init_registers_x32_avx_linux if linux_is_elf64 is false.
6279
6280 2012-04-13  Pedro Alves  <palves@redhat.com>
6281
6282         * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
6283         (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
6284         (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
6285         (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
6286         the sub-make.
6287
6288 2012-04-12  H.J. Lu  <hongjiu.lu@intel.com>
6289
6290         * linux-x86-low.c (compat_x32_clock_t): New.
6291         (compat_x32_siginfo_t): Likewise.
6292         (compat_x32_siginfo_from_siginfo): Likewise.
6293         (siginfo_from_compat_x32_siginfo): Likewise.
6294         (linux_is_elf64): Likewise.
6295         (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
6296         and siginfo_from_compat_x32_siginfo for x32.
6297         (x86_arch_setup): Set linux_is_elf64.
6298
6299 2012-04-12  H.J. Lu  <hongjiu.lu@intel.com>
6300
6301         PR gdb/13969
6302         * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
6303         e_machine field.
6304         (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
6305         * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
6306         * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
6307         compatible with process.
6308
6309 2012-04-12  Yao Qi  <yao@codesourcery.com>
6310
6311         * Makefile.in: Define abs_top_srcdir and abs_srcdir.
6312         (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
6313         (install-only, install-info, clean): Handle sub dir gnulib.
6314         (all-lib, am--refresh): New targets.
6315         (memmem.o): Remove target.
6316         * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
6317         Invoke gl_EARLY.  Invoke AC_CHECK_PROGS for make.
6318         (AC_REPLACE_FUNCS): Remove memmem.
6319         Invoke gl_INIT and AM_INIT_AUTOMAKE.
6320         (AC_OUTPUT): Generate Makefile in gnulib/.
6321         * aclocal.m4, config.in, configure: Regenerated.
6322
6323 2012-04-10  Maciej W. Rozycki  <macro@codesourcery.com>
6324
6325         * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
6326
6327 2012-04-05  Pedro Alves  <palves@redhat.com>
6328
6329         -Werror=strict-aliasing
6330
6331         * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
6332         pointer.
6333
6334 2012-04-04  Pedro Alves  <palves@redhat.com>
6335
6336         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6337         (sparc_store_gregset_from_stack, sparc_store_gregset)
6338         (sparc_breakpoint_at): Fix formatting.
6339
6340 2012-03-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
6341
6342         * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
6343         are available.
6344         * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
6345         [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
6346         * config.in: Regenerate.
6347         * configure: Likewise.
6348
6349 2012-03-29  Pedro Alves  <palves@redhat.com>
6350
6351         * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
6352         Correct ptrace arguments.
6353
6354 2012-03-28  Pedro Alves  <palves@redhat.com>
6355
6356         * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
6357         (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
6358         (IA64_FR1_REGNUM): New defines.
6359         (ia64_fetch_register): New.
6360         (the_low_target): Install it.
6361         * linux-low.h (struct linux_target_ops) <fetch_register>: New
6362         field.
6363         * linux-low.c (linux_fetch_registers): Try the
6364         the_low_target.fetch_register hook first.
6365
6366         * linux-arm-low.c (the_low_target): Adjust.
6367         * linux-bfin-low.c (the_low_target): Adjust.
6368         * linux-cris-low.c (the_low_target): Adjust.
6369         * linux-crisv32-low.c (the_low_target): Adjust.
6370         * linux-m32r-low.c (the_low_target): Adjust.
6371         * linux-m68k-low.c (the_low_target): Adjust.
6372         * linux-mips-low.c (the_low_target): Adjust.
6373         * linux-ppc-low.c (the_low_target): Adjust.
6374         * linux-s390-low.c (the_low_target): Adjust.
6375         * linux-sh-low.c (the_low_target): Adjust.
6376         * linux-sparc-low.c (the_low_target): Adjust.
6377         * linux-tic6x-low.c (the_low_target): Adjust.
6378         * linux-x86-low.c (the_low_target): Adjust.
6379         * linux-xtensa-low.c (the_low_target): Adjust.
6380
6381 2012-03-26  Pedro Alves  <palves@redhat.com>
6382
6383         * server.c (handle_qxfer_libraries): Don't bail early if
6384         the_target->qxfer_libraries_svr4 is not NULL.
6385
6386 2012-03-26  Pedro Alves  <palves@redhat.com>
6387
6388         * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
6389
6390 2012-03-23  Pedro Alves  <palves@redhat.com>
6391
6392         * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
6393         "library-list-svr4" element's start tag when the the DSO list is
6394         empty.
6395
6396 2012-03-23  Pedro Alves  <palves@redhat.com>
6397
6398         * linux-low.c (read_one_ptr): Read the inferior's pointer through
6399         a variable whose type size is the same as the inferior's pointer
6400         size.
6401
6402 2012-03-21  Thomas Schwinge  <thomas@codesourcery.com>
6403
6404         * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
6405         struct siginfo.
6406         * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
6407         * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6408         * linux-low.h: Include <signal.h>.
6409         (struct siginfo): Remove forward declaration.
6410         (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
6411         struct siginfo.
6412
6413 2012-03-21  Mike Frysinger  <vapier@gentoo.org>
6414
6415         * .gitignore: Ignore more files.
6416
6417 2012-03-19  Pedro Alves  <palves@redhat.com>
6418             Jan Kratochvil  <jan.kratochvil@redhat.com>
6419
6420         * server.c (cont_thread, general_thread): Add describing comments.
6421         (start_inferior): Clear `cont_thread'.
6422         (handle_v_cont): Don't set `cont_thread' if resuming all threads
6423         of a process.
6424
6425 2012-03-15  Yao Qi  <yao@codesourcery.com>
6426
6427         * tracepoint.c (install_tracepoint): Move duplicated tracepoint
6428         handling to ...
6429         (cmd_qtdp): ... here.
6430
6431 2012-03-15  Yao Qi  <yao@codesourcery.com>
6432
6433         * tracepoint.c (struct tracepoint_action_ops): New.
6434         (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
6435         (m_tracepoint_action_download): New.
6436         (r_tracepoint_action_download): New.
6437         (x_tracepoint_action_download): New.
6438         (l_tracepoint_action_download): New.
6439         (add_tracepoint_action): Install `action->ops' according type.
6440         (download_tracepoint_1): Move code `download' function pointer
6441         of various tracepoint_action_ops.
6442
6443 2012-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
6444
6445         * linux-low.c (linux_attach_lwp_1): New variable buffer.  Call
6446         linux_ptrace_attach_warnings.
6447
6448 2012-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
6449
6450         * Makefile.in (linux-ptrace.o): New.
6451         * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
6452         (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
6453         (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
6454         (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
6455         (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
6456         of these targets.
6457         * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
6458
6459 2012-03-08  Yao Qi  <yao@codesourcery.com>
6460             Pedro Alves  <palves@redhat.com>
6461
6462         Fix PR server/13392.
6463         * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
6464         offset of JMP insn.
6465         * tracepoint.c (remove_tracepoint): New.
6466         (cmd_qtdp): Call remove_tracepoint when failed to install.
6467
6468 2012-03-07  Pedro Alves  <palves@redhat.com>
6469
6470         * linux-low.c (get_detach_signal): New.
6471         (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
6472         Pass on pending signals to PTRACE_DETACH.  Check the result of the
6473         ptrace call.
6474         * server.c (program_signals, program_signals_p): New.
6475         (handle_general_set): Handle QProgramSignals.
6476         * server.h (program_signals, program_signals_p): Declare.
6477
6478 2012-03-05  Pedro Alves  <palves@redhat.com>
6479             Jan Kratochvil  <jan.kratochvil@redhat.com>
6480
6481         * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
6482         New comment why.
6483
6484 2012-03-03  Yao Qi  <yao@codesourcery.com>
6485
6486         * tracepoint.c (tracepoint_look_up_symbols): Update call to
6487         agent_look_up_symbols.
6488
6489 2012-03-03  Yao Qi  <yao@codesourcery.com>
6490
6491         * Makefile.in (linux-low.o): Keep dependence on agent.h.
6492         (linux-x86-low.o): Likewise.
6493         * server.h: Remove in_process_agent_loaded.
6494         * tracepoint.c (in_process_agent_loaded): Removed.  Moved it
6495         common/agent.c.
6496         Update callers.
6497
6498 2012-03-03  Yao Qi  <yao@codesourcery.com>
6499
6500         * tracepoint.c (gdb_agent_capability): New global.
6501         (in_process_agent_loaded_ust): Renamed to
6502         `in_process_agent_supports_ust'.
6503         Update callers.
6504         (in_process_agent_supports_ust): Call agent_capability_check.
6505         (clear_installed_tracepoints): Assert that agent supports
6506         agent.
6507
6508 2012-03-03  Yao Qi  <yao@codesourcery.com>
6509
6510         * linux-low.c (linux_supports_agent): New.
6511         (linux_target_ops): Initialize field `supports_agent' with
6512         linux_supports_agent.
6513         * target.h (struct target_ops) <supports_agent>: New.
6514         (target_supports_agent): New macro.
6515         * server.c (handle_general_set): Handle packet 'QAgent'.
6516         (handle_query): Send `QAgent+'.
6517         * Makefile.in (server.o): Depends on agent.h.
6518
6519 2012-03-03  Yao Qi  <yao@codesourcery.com>
6520
6521         * Makefile.in (OBS): Add agent.o.
6522         Add new rule for agent.o.
6523         Track dependence of tracepoint.c on agent.h.
6524         * tracepoint.c (run_inferior_command_1):
6525         (run_inferior_command): Call agent_run_command.
6526         (gdb_ust_connect_sync_socket): Deleted.  Move it to
6527         common/agent.c.
6528         (resume_thread, stop_thread): Likewise.
6529         (gdb_ust_socket_init): Renamed to ...
6530         (gdb_agent_socket_init): ... New.
6531         (gdb_ust_thread): Renamed to ...
6532         (gdb_agent_helper_thread): ... New.
6533         (gdb_ust_init): Move some code to ...
6534         (gdb_agent_init): ... here.  New.
6535         [HAVE_UST]: Call gdb_ust_init.
6536         (initialize_tracepoint_ftlib):  Call gdb_agent_init.
6537         * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6538         * config.in, configure: Regenerated.
6539
6540 2012-03-02  Pedro Alves  <palves@redhat.com>
6541
6542         * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6543         * linux-low.c (struct simple_pid_list): New.
6544         (stopped_pids): New a struct simple_pid_list pointer.
6545         (add_to_pid_list, pull_pid_from_list): New.
6546         (handle_extended_wait): Don't assume the first signal new children
6547         report is SIGSTOP.  Adjust call to pull_pid_from_list.
6548         (linux_wait_for_lwp): Adjust.
6549
6550 2012-03-02  Yao Qi  <yao@codesourcery.com>
6551
6552         * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6553         debug log.
6554
6555 2012-03-02  Yao Qi  <yao@codesourcery.com>
6556
6557         * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6558         `stop_pc' and `tpoint'.  Update caller.
6559
6560 2012-03-01  Maciej W. Rozycki  <macro@codesourcery.com>
6561
6562         * linux-low.h (linux_target_ops): Add regset_bitmap member.
6563         * linux-low.c (use_linux_regsets): New macro.
6564         [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6565         [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6566         (linux_register_in_regsets): New function.
6567         (usr_fetch_inferior_registers): Skip registers covered by
6568         regsets.
6569         (usr_store_inferior_registers): Likewise.
6570         (usr_fetch_inferior_registers): New macro.
6571         (usr_store_inferior_registers): Likewise.
6572         (linux_fetch_registers): Handle mixed regset/non-regset targets.
6573         (linux_store_registers): Likewise.
6574         * linux-mips-low.c (init_registers_mips_dsp_linux): New
6575         prototype.
6576         (init_registers_mips64_dsp_linux): Likewise.
6577         (init_registers_mips_linux): New macro.
6578         (init_registers_mips_dsp_linux): Likewise.
6579         (mips_dsp_num_regs): Likewise.
6580         (DSP_BASE, DSP_CONTROL): New fallback macros.
6581         (mips_base_regs): New macro.
6582         (mips_regmap): Use it.  Fix the size.
6583         (mips_dsp_regmap): New variable.
6584         (mips_dsp_regset_bitmap): Likewise.
6585         (mips_arch_setup): New function.
6586         (mips_cannot_fetch_register): Use the_low_target.regmap rather
6587         than mips_regmap.
6588         (mips_cannot_store_register): Likewise.
6589         (the_low_target): Update .arch_setup, .num_regs and .regmap
6590         initializers.  Add .regset_bitmap initializer.
6591         * linux-arm-low.c (the_low_target): Add .regset_bitmap
6592         initializer.
6593         * linux-bfin-low.c (the_low_target): Likewise.
6594         * linux-cris-low.c (the_low_target): Likewise.
6595         * linux-crisv32-low.c (the_low_target): Likewise.
6596         * linux-ia64-low.c (the_low_target): Likewise.
6597         * linux-m32r-low.c (the_low_target): Likewise.
6598         * linux-m68k-low.c (the_low_target): Likewise.
6599         * linux-ppc-low.c (the_low_target): Likewise.
6600         * linux-s390-low.c (the_low_target): Likewise.
6601         * linux-sh-low.c (the_low_target): Likewise.
6602         * linux-sparc-low.c (the_low_target): Likewise.
6603         * linux-tic6x-low.c (the_low_target): Likewise.
6604         * linux-x86-low.c (the_low_target): Likewise.
6605         * linux-xtensa-low.c (the_low_target): Likewise.
6606         * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6607         mips64-dsp-linux.o to srv_regobj.  Add mips-dsp-linux.xml,
6608         mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6609         srv_xmlfiles.
6610         * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6611         (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6612
6613 2012-02-29  Yao Qi  <yao@codesourcery.com>
6614             Pedro Alves  <palves@redhat.com>
6615
6616         * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6617         `step_over_finished' is true.
6618
6619 2012-02-27  Pedro Alves  <palves@redhat.com>
6620
6621         * linux-low.c (pid_is_stopped): Delete, moved to common/.
6622         (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6623
6624 2012-02-27  Pedro Alves  <palves@redhat.com>
6625
6626         PR server/9684
6627         * linux-low.c (pid_is_stopped): New.
6628         (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6629
6630 2012-02-25  Luis Machado  <lgustavo@codesourcery.com>
6631
6632         * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6633         of conditions.
6634
6635 2012-02-24  Maciej W. Rozycki  <macro@codesourcery.com>
6636
6637         * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6638
6639 2012-02-24  Luis Machado  <lgustavo@codesourcery>
6640
6641         * server.c (handle_query): Advertise support for target-side
6642         breakpoint condition evaluation.
6643         (process_point_options): New function.
6644         (process_serial_event): When inserting a breakpoint, check for
6645         a target-side condition that should be evaluated.
6646
6647         * mem-break.c: Include regcache.h and ax.h.
6648         (point_cond_list_t): New data structure.
6649         (breakpoint) <cond_list>: New field.
6650         (find_gdb_breakpoint_at): Make non-static.
6651         (delete_gdb_breakpoint_at): Clear any target-side
6652         conditions.
6653         (clear_gdb_breakpoint_conditions): New function.
6654         (add_condition_to_breakpoint): Likewise.
6655         (add_breakpoint_condition): Likewise.
6656         (gdb_condition_true_at_breakpoint): Likewise.
6657         (gdb_breakpoint_here): Return result directly instead
6658         of going through a local variable.
6659
6660         * mem-break.h (find_gdb_breakpoint_at): New prototype.
6661         (clear_gdb_breakpoint_conditions): Likewise.
6662         (add_breakpoint_condition): Likewise.
6663         (gdb_condition_true_at_breakpoint): Likewise.
6664
6665         * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6666         (need_step_over_p): Take target-side breakpoint condition into
6667         consideration.
6668
6669 2012-02-24  Luis Machado  <lgustavo@codesourcery>
6670
6671         * server.h: Include tracepoint.h.
6672         (agent_mem_read, agent_get_trace_state_variable_value,
6673         agent_set_trace_state_variable_value,
6674         agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6675         get_set_tsv_func_addr): New prototypes.
6676
6677         * ax.h: New include file.
6678         * ax.c: New source file.
6679
6680         * tracepoint.c: Include ax.h.
6681         (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6682         agent_expr, eval_result_type): Move to ax.h.
6683         (parse_agent_expr): Rename to ...
6684         (gdb_parse_agent_expr): ... this, make it non-static and move
6685         to ax.h.
6686         (unparse_agent_expr) Rename to ...
6687         (gdb_unparse_agent_expr): ... this, make it non-static and move
6688         to ax.h.
6689         (eval_agent_expr): Rename to ...
6690         (eval_tracepoint_agent_expr): ... this.
6691         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6692         forward declarations.
6693         (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6694         (agent_get_trace_state_variable_value): New function.
6695         (agent_set_trace_state_variable_value): New function.
6696         (cmd_qtdp): Call gdb_parse_agent_expr (...).
6697         (response_tracepoint): Call gdb_unparse_agent_expr (...).
6698         (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6699         (condition_true_at_tracepoint): Likewise.
6700         (parse_agent_expr): Rename to ...
6701         (gdb_parse_agent_expr): ... this and move to ax.c.
6702         (unparse_agent_expr): Rename to ...
6703         (gdb_unparse_agent_expr): ... this and move to ax.c.
6704         (gdb_agent_op_name): Move to ax.c.
6705         (eval_agent_expr): Rename to ...
6706         (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6707         and move to ax.c.
6708         (eval_tracepoint_agent_expr): New function.
6709         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
6710         non-static.
6711         (current_insn_ptr, emit_error, struct bytecode_address): Move to
6712         ax.c.
6713         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6714         emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6715         emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6716         emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6717         emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6718         emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6719         emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6720         emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6721         (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6722         (compile_bytecodes): Remove forward declaration.
6723         (is_goto_target): Move to ax.c.
6724         (compile_bytecodes): Move to ax.c and call
6725         agent_get_trace_state_variable_value (...) and
6726         agent_set_trace_state_variable_value (...).
6727
6728         * Makefile.in: Update ax.c and IPA dependencies.
6729
6730 2012-02-24  Pedro Alves  <palves@redhat.com>
6731
6732         * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6733         (cmd_bigqtbuffer_circular): ... this.  Only handle
6734         'QTBuffer:circular:'.
6735         (handle_tracepoint_general_set): Adjust.
6736
6737 2012-02-16  Yao Qi  <yao@codesourcery.com>
6738
6739         * inferiors.c: Move code to ...
6740         * dll.c: .... here.  New.
6741         * server.h: Declare clear_dlls.
6742         * Makefile.in (SFILES): Add dll.c.
6743         (OBS): Add dll.o
6744         (dll.o): New rule.
6745
6746 2012-02-11  Yao Qi  <yao@codesourcery.com>
6747
6748         * server.c: (handle_monitor_command): Add a new parameter
6749         `own_buf'.
6750         (handle_query): Update caller.
6751
6752 2012-02-09  Joel Brobecker  <brobecker@adacore.com>
6753
6754         * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6755         * configure, config.in: Regenerate.
6756         * hostio.c: Provide an alternate implementation if HAVE_READLINK
6757         is not defined.
6758
6759 2012-02-02  Pedro Alves  <palves@redhat.com>
6760
6761         Try SIGKILL first, then PTRACE_KILL.
6762         * linux-low.c (linux_kill_one_lwp): New.
6763         (linux_kill_one_lwp): Rename to ...
6764         (kill_one_lwp_callback): ... this.  Use the new
6765         linux_kill_one_lwp.
6766
6767 2012-02-02  Pedro Alves  <palves@redhat.com>
6768
6769         * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6770         inferior.
6771
6772 2012-01-27  Pedro Alves  <palves@redhat.com>
6773
6774         * linux-low.c (linux_child_pid_to_exec_file): Delete.
6775         (elf_64_file_p): Make static.
6776         (linux_pid_exe_is_elf_64_file): New.
6777         * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6778         Delete declarations.
6779         (linux_pid_exe_is_elf_64_file): Declare.
6780         * linux-x86-low.c (x86_arch_setup): Use
6781         linux_pid_exe_is_elf_64_file.
6782
6783 2012-01-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
6784
6785         * linux-low.c (linux_wait_for_event_1): Rename to ...
6786         (linux_wait_for_event): ... here and merge it with former
6787         linux_wait_for_event - new variable wait_ptid, use it.
6788         (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6789
6790 2012-01-23  Pedro Alves  <palves@redhat.com>
6791
6792         * server.c (main): Avoid yet another case of infinite loop while
6793         detaching/killing after a longjmp.
6794
6795 2012-01-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
6796
6797         Code cleanup.
6798         * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6799
6800 2012-01-20  Ulrich Weigand  <ulrich.weigand@linaro.org>
6801
6802         * hostio.c (handle_readlink): New function.
6803         (handle_vFile): Call it to handle "vFile:readlink" packets.
6804
6805 2012-01-20  Pedro Alves  <palves@redhat.com>
6806             Ulrich Weigand  <ulrich.weigand@linaro.org>
6807
6808         * server.c (handle_v_requests): Only support vAttach and vRun to
6809         start multiple processes when in extended protocol mode.
6810
6811 2012-01-17  Pedro Alves  <palves@redhat.com>
6812
6813         * tracepoint.c (initialize_tracepoint): Use mmap instead of
6814         memalign plus mprotect to allocate the scratch buffer.
6815
6816 2012-01-13  Pedro Alves  <palves@redhat.com>
6817
6818         * server.c (attach_inferior): Clear `cont_thread'.
6819
6820 2012-01-13  Pedro Alves  <palves@redhat.com>
6821
6822         * server.c (main): Avoid infinite loop while detaching/killing
6823         after a longjmp.
6824
6825 2012-01-09  Doug Evans  <dje@google.com>
6826
6827         * server.c (start_inferior): Set last_ptid in --wrapper case.
6828
6829 2012-01-06  Yao Qi  <yao@codesourcery.com>
6830
6831         * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6832         defined.
6833         [IN_PROCESS_AGENT] (debug_agent): New global variable.
6834
6835 2012-01-04  Yao Qi  <yao@codesourcery.com>
6836
6837         * tracepoint.c (cmd_qtdp): Print debug message
6838         for static tracepoint.
6839
6840 2012-01-04  Yao Qi  <yao@codesourcery.com>
6841
6842         * tracepoint.c (trace_vdebug): Differentiate debug message
6843         between gdbserver and IPA.
6844
6845 2012-01-03  Yao Qi  <yao@codesourcery.com>
6846
6847         * tracepoint.c (tracepoint_was_hit): Don't collect for
6848         static tracepoint.
6849
6850 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
6851
6852         * terminal.h: Reformat copyright header.
6853
6854 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
6855
6856         * server.c (gdbserver_version): Update copyright year.
6857         * gdbreplay.c (gdbreplay_version): Likewise.
6858
6859 2011-12-18  Jan Kratochvil  <jan.kratochvil@redhat.com>
6860
6861         * linux-low.c (linux_create_inferior): Put empty if clause for write.
6862
6863         Revert:
6864         2011-12-18  Hui Zhu  <teawater@gmail.com>
6865         * linux-low.c (linux_create_inferior): Save return value to ret.
6866
6867 2011-12-18  Hui Zhu  <teawater@gmail.com>
6868
6869         * linux-low.c (linux_create_inferior): Save return value to ret.
6870
6871 2011-12-16  Doug Evans  <dje@google.com>
6872
6873         * linux-low.c (linux_create_inferior): If stdio connection,
6874         redirect stdin from /dev/null, stdout to stderr.
6875         * remote-utils.c (remote_is_stdio): New static global.
6876         (remote_connection_is_stdio): New function.
6877         (remote_prepare): Handle stdio connection.
6878         (remote_open): Ditto.
6879         (remote_close): Don't close stdin for stdio connections.
6880         (read_prim,write_prim): New functions.  Replace all calls to
6881         read/write to these.
6882         * server.c (main): Watch for "-" argument.  Move call to
6883         remote_prepare before start_inferior.
6884         * server.h (STDIO_CONNECTION_NAME): New macro.
6885         (remote_connection_is_stdio): Declare.
6886
6887         * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6888         in debugging output.
6889
6890 2011-12-15  Yao Qi  <yao@codesourcery.com>
6891
6892         * tracepoint.c: Include sys/syscall.h.
6893         (gdb_ust_thread): Remove preprocessor conditional.
6894
6895 2011-12-14  Pedro Alves  <pedro@codesourcery.com>
6896
6897         * linux-low.c (linux_detach_one_lwp): Call
6898         the_low_target.prepare_to_resume before detaching.
6899
6900 2011-12-14  Yao Qi  <yao@codesourcery.com>
6901
6902         * tracepoint.c (gdb_ust_thread): Don't ignore return value
6903         of write.
6904
6905 2011-12-14  Yao Qi  <yao@codesourcery.com>
6906
6907         * i386-low.c (i386_low_stopped_data_address): Initialize local
6908         variable `control'.
6909
6910 2011-12-13  Pedro Alves  <pedro@codesourcery.com>
6911
6912         PR remote/13492
6913
6914         * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6915         DR_CONTROL unless necessary.  Extend comments.
6916         * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6917         DR0-3 if not used.  If any watchpoint was set, clear DR_STATUS.
6918
6919 2011-12-13  Yao Qi  <yao@codesourcery.com>
6920
6921         * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6922         macros.
6923         (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6924
6925 2011-12-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
6926
6927         * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6928         Print new debug message for such case.
6929
6930 2011-12-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
6931
6932         Fix overlapping memcpy.
6933         * mem-break.c (set_raw_breakpoint_at): New variable buf.  Use it for
6934         the read_inferior_memory transfer.
6935         (delete_fast_tracepoint_jump): New variable buf.  Use it for the
6936         write_inferior_memory transfer.
6937         (set_fast_tracepoint_jump): New variable buf.  Use it for the
6938         read_inferior_memory and write_inferior_memory transfers.
6939         (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6940         (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6941         Use it for the write_inferior_memory transfer.
6942         (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6943         buffers.
6944
6945 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
6946
6947         * linux-low.c (fetch_register, store_register): Make code
6948         consistent, fix formatting.
6949
6950 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
6951
6952         * linux-low.c (usr_store_inferior_registers): Factor out code
6953         to handle individual registers into...
6954         (store_register): ... this new function.
6955
6956 2011-12-06  Ulrich Weigand  <uweigand@de.ibm.com>
6957
6958         * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6959         (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6960         (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6961         (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6962         (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6963         (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6964         * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6965         (srv_xmlfiles): Add new XML files.
6966
6967         * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6968         and <sys/uio.h>.
6969         (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6970         (init_registers_s390_linux32v1): Add prototype.
6971         (init_registers_s390_linux32v2): Likewise.
6972         (init_registers_s390_linux64v1): Likewise.
6973         (init_registers_s390_linux64v2): Likewise.
6974         (init_registers_s390x_linux64v1): Likewise.
6975         (init_registers_s390x_linux64v2): Likewise.
6976         (s390_num_regs): Increment to 52.
6977         (s390_regmap): Add orig_r2 register.
6978         (s390_num_regs_3264): Increment to 68.
6979         (s390_regmap_3264): Add orig_r2 register.
6980         (s390_collect_ptrace_register): Handle orig_r2 register.
6981         (s390_supply_ptrace_register): Likewise.
6982         (s390_fill_last_break): New function.
6983         (s390_store_last_break): Likewise.
6984         (s390_fill_system_call): New function.
6985         (s390_store_system_call): Likewise.
6986         (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6987         register sets.
6988         (s390_check_regset): New function.
6989         (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6990         NT_S390_SYSTEM_CALL regsets and use appropriate description.
6991         Update target_regsets for available register sets.
6992
6993 2011-12-02  Paul Pluzhnikov  <ppluzhnikov@google.com>
6994             Jan Kratochvil  <jan.kratochvil@redhat.com>
6995
6996         * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6997         (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6998         New.
6999         (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
7000         * linux-low.h (struct process_info_private): New member r_debug.
7001         * server.c (handle_qxfer_libraries): Call
7002         the_target->qxfer_libraries_svr4.
7003         (handle_qxfer_libraries_svr4): New function.
7004         (qxfer_packets): New entry "libraries-svr4".
7005         (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
7006         * target.h (struct target_ops): New member qxfer_libraries_svr4.
7007         * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
7008         PACKET_qXfer_libraries_svr4.
7009
7010 2011-11-30  Ulrich Weigand  <uweigand@de.ibm.com>
7011
7012         * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
7013         PSW address/mask between 8-byte and 16-byte formats.
7014         (s390_supply_ptrace_register): Likewise.
7015         (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
7016         basic addressing mode bit.
7017
7018 2011-11-24  Stan Shebs  <stan@codesourcery.com>
7019
7020         * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
7021
7022 2011-11-17  Stan Shebs  <stan@codesourcery.com>
7023
7024         * tracepoint.c (struct tracepoint): New field traceframe_usage.
7025         (tracing_start_time): New global.
7026         (tracing_stop_time): New global.
7027         (tracing_user_name): New global.
7028         (tracing_notes): New global.
7029         (tracing_stop_note): New global.
7030         (cmd_qtstart): Set traceframe_usage, start_time.
7031         (stop_tracing): Set stop_time.
7032         (cmd_qtstatus): Report additional status.
7033         (cmd_qtp): New function.
7034         (handle_tracepoint_query): Call it.
7035         (cmd_qtnotes): New function.
7036         (handle_tracepoint_general_set): Call it.
7037         (get_timestamp): Rename from tsv_get_timestamp.
7038
7039 2011-11-14  Stan Shebs  <stan@codesourcery.com>
7040             Kwok Cheung Yeung  <kcy@codesourcery.com>
7041
7042         * linux-x86-low.c (small_jump_insn): New.
7043         (i386_install_fast_tracepoint_jump_pad): Add arguments for
7044         trampoline and error message, build a trampoline and issue a small
7045         jump instruction to it.
7046         (x86_install_fast_tracepoint_jump_pad): Add arguments for
7047         trampoline and error message.
7048         (x86_get_min_fast_tracepoint_insn_len): New.
7049         (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
7050         * linux-low.h (struct linux_target_ops): Add arguments to
7051         install_fast_tracepoint_jump_pad operation, add new operation.
7052         * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
7053         arguments.
7054         (linux_get_min_fast_tracepoint_insn_len): New function.
7055         (linux_target_op): Add new operation.
7056         * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
7057         (gdb_trampoline_buffer_end): Ditto.
7058         (gdb_trampoline_buffer_error): Ditto.
7059         (struct ipa_sym_addresses): Add fields for new IPA variables.
7060         (symbol_list): Add entries for new IPA variables.
7061         (struct tracepoint): Add fields to hold the address range of the
7062         trampoline used by the tracepoint.
7063         (trampoline_buffer_head): New static variable.
7064         (trampoline_buffer_tail): Ditto.
7065         (claim_trampoline_space): New function.
7066         (have_fast_tracepoint_trampoline_buffer): New function.
7067         (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
7068         structure.
7069         (install_fast_tracepoint): Ditto, also add error buffer argument.
7070         (cmd_qtminftpilen): New function.
7071         (handle_tracepoint_query): Add response to qTMinFTPILen packet.
7072         (fast_tracepoint_from_trampoline_address): New function.
7073         (fast_tracepoint_collecting): Handle trampoline as part of jump
7074         pad space.
7075         (set_trampoline_buffer_space): New function.
7076         (initialize_tracepoint): Initialize new IPA variables.
7077         * target.h (struct target_ops): Add arguments to
7078         install_fast_tracepoint_jump_pad operation, add new
7079         get_min_fast_tracepoint_insn_len operation.
7080         (target_get_min_fast_tracepoint_insn_len): New.
7081         (install_fast_tracepoint_jump_pad): Add arguments.
7082         * server.h (IPA_BUFSIZ): Define.
7083         * linux-i386-ipa.c: Include extra header files.
7084         (initialize_fast_tracepoint_trampoline_buffer): New function.
7085         (initialize_low_tracepoint): Call it.
7086         * server.h (set_trampoline_buffer_space): Declare.
7087         (claim_trampoline_space): Ditto.
7088         (have_fast_tracepoint_trampoline_buffer): Ditto.
7089
7090 2011-11-14  Yao Qi  <yao@codesourcery.com>
7091
7092         * server.c (handle_query): Handle InstallInTrace for qSupported.
7093         * tracepoint.c (add_tracepoint): Sort list.
7094         (install_tracepoint, download_tracepoint): New.
7095         (cmd_qtdp): Call them to install and download tracepoints.
7096         (sort_tracepoints): Removed.
7097         (cmd_qtstart): Update.
7098
7099 2011-11-14  Yao Qi  <yao@codesourcery.com>
7100
7101         * mem-break.c (inc_ref_fast_tracepoint_jump): New.
7102         * mem-break.h: Declare.
7103         * tracepoint.c (cmd_qtstart): Move some code to ...
7104         (clone_fast_tracepoint, install_fast_tracepoint): ... here.
7105         New.
7106         (download_tracepoints): Move some code to ...
7107         (download_tracepoint_1): ... here.  New.
7108
7109 2011-11-08  Yao Qi  <yao@codesourcery.com>
7110
7111         * remote-utils.c (relocate_instruction): A comment fix.
7112
7113 2011-11-07  Joel Brobecker  <brobecker@adacore.com>
7114
7115         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
7116         (i386_dr_low_get_control, i386_dr_low_get_status): Use
7117         dr_status_mirror and dr_control_mirror from debug_reg_state.
7118         (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
7119         (i386_initial_stuff): Remove use of deleted globals.
7120         (i386_get_thread_context, i386_set_thread_context,
7121         i386_thread_added): Use dr_status_mirror and dr_control_mirror
7122         from debug_reg_state.
7123
7124 2011-11-05  Yao Qi  <yao@codesourcery.com>
7125
7126         * tracepoint.c (gdb_collect): Loop over tracepoints of same
7127         address as TPOINT's.
7128
7129 2011-11-02  Stan Shebs  <stan@codesourcery.com>
7130
7131         * tracepoint.c (agent_mem_read_string): New function.
7132         (eval_agent_expr): Call it for tracenz.
7133         * server.c (handle_query): Report support for tracenz.
7134
7135 2011-11-02  Yao Qi  <yao@codesourcery.com>
7136
7137         * tracepoint.c (cmd_qtstart): Remove unused local variables.
7138
7139 2011-11-02  Yao Qi  <yao@codesourcery.com>
7140
7141         * target.h: Fix a typo in comment.
7142
7143 2011-10-31  Pedro Alves  <pedro@codesourcery.com>
7144
7145         * mem-break.c (check_mem_write): Add `myaddr' parameter.  Don't
7146         clobber the breakpoints' shadows with fast tracepoint jumps.
7147         * mem-break.h (check_mem_write): Add `myaddr' parameter.
7148         * target.c (write_inferior_memory): Also pass MYADDR down to
7149         check_mem_write.
7150
7151 2011-10-07  Ulrich Weigand  <ulrich.weigand@linaro.org>
7152
7153         * configure.ac: Check support for personality routine.
7154         * configure: Regenerate.
7155         * config.in: Likewise.
7156         * linux-low.c: Include <sys/personality.h>.
7157         Define ADDR_NO_RANDOMIZE if necessary.
7158         (linux_create_inferior): Disable address space randomization when
7159         forking inferior, if requested.
7160         (linux_supports_disable_randomization): New function.
7161         (linux_target_ops): Install it.
7162         * server.h (disable_randomization): Declare.
7163         * server.c (disable_randomization): New global variable.
7164         (handle_general_set): Handle QDisableRandomization.
7165         (handle_query): Likewise for qSupported.
7166         (main): Support --disable-randomization and --no-disable-randomization
7167         command line arguments.
7168         * target.h (struct target_ops): Add supports_disable_randomization.
7169         (target_supports_disable_randomization): New macro.
7170
7171 2011-09-29  Mike Frysinger  <vapier@gentoo.org>
7172
7173         * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
7174         ifdef check.
7175         [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
7176         [!PT_GETDSBT] (target_loadmap): New definition.
7177         (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
7178         (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
7179         LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
7180         and PT_GETDSBT to LINUX_LOADMAP.
7181         [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
7182         (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
7183
7184 2011-09-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
7185
7186         * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
7187         (arm_linux_hwbp_cap): New static variable.
7188         (arm_linux_get_hwbp_cap): Replace by ...
7189         (arm_linux_init_hwbp_cap): ... this new function.
7190         (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
7191         (arm_linux_get_hw_watchpoint_count): Likewise.
7192         (arm_linux_get_hw_watchpoint_max_length): Likewise.
7193         (arm_arch_setup): Call arm_linux_init_hwbp_cap.
7194         (arm_prepare_to_resume): Use perror_with_name instead of error.
7195
7196 2011-09-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
7197
7198         * linux-arm-low.c: Include <signal.h>.
7199         (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
7200         (struct arm_linux_hwbp_cap): New data type.
7201         (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
7202         (struct arm_linux_hw_breakpoint): New data type.
7203         (MAX_BPTS, MAX_WPTS): Define.
7204         (struct arch_process_info, struct arch_lwp_info): New data types.
7205         (arm_linux_get_hwbp_cap): New function.
7206         (arm_linux_get_hw_breakpoint_count): Likewise.
7207         (arm_linux_get_hw_watchpoint_count): Likewise.
7208         (arm_linux_get_hw_watchpoint_max_length): Likewise.
7209         (arm_hwbp_control_initialize): Likewise.
7210         (arm_hwbp_control_is_enabled): Likewise.
7211         (arm_hwbp_control_is_initialized): Likewise.
7212         (arm_hwbp_control_disable): Likewise.
7213         (arm_linux_hw_breakpoint_equal): Likewise.
7214         (arm_linux_hw_point_initialize): Likewise.
7215         (struct update_registers_data): New data structure.
7216         (update_registers_callback: New function.
7217         (arm_insert_point): Likewise.
7218         (arm_remove_point): Likewise.
7219         (arm_stopped_by_watchpoint): Likewise.
7220         (arm_stopped_data_address): Likewise.
7221         (arm_new_process): Likewise.
7222         (arm_new_thread): Likewise.
7223         (arm_prepare_to_resume): Likewise.
7224         (the_low_target): Register arm_insert_point, arm_remove_point,
7225         arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
7226         arm_new_thread, and arm_prepare_to_resume.
7227
7228 2011-09-15  Stan Shebs  <stan@codesourcery.com>
7229
7230         * server.h (struct emit_ops): Add compare-goto fields.
7231         * tracepoint.c (gdb_agent_op_sizes): New table.
7232         (emit_eq_goto): New function.
7233         (emit_ne_goto): New function.
7234         (emit_lt_goto): New function.
7235         (emit_le_goto): New function.
7236         (emit_gt_goto): New function.
7237         (emit_ge_goto): New function.
7238         (is_goto_target): New function.
7239         (compile_bytecodes): Recognize special cases of compare-goto
7240         combinations and call specialized emitters for them.
7241         * linux-x86-low.c (amd64_emit_eq_goto): New function.
7242         (amd64_emit_ne_goto): New function.
7243         (amd64_emit_lt_goto): New function.
7244         (amd64_emit_le_goto): New function.
7245         (amd64_emit_gt_goto): New function.
7246         (amd64_emit_ge_goto): New function.
7247         (amd64_emit_ops): Add the new functions.
7248         (i386_emit_eq_goto): New function.
7249         (i386_emit_ne_goto): New function.
7250         (i386_emit_lt_goto): New function.
7251         (i386_emit_le_goto): New function.
7252         (i386_emit_gt_goto): New function.
7253         (i386_emit_ge_goto): New function.
7254         (i386_emit_ops): Add the new functions.
7255
7256 2011-09-08  Stan Shebs  <stan@codesourcery.com>
7257
7258         * linux-x86-low.c (i386_emit_prologue): Save %ebx.
7259         (i386_emit_epilogue): Restore %ebx.
7260
7261 2011-08-31  Jie Zhang  <jzhang918@gmail.com>
7262
7263         * server.c (step_thread): Remove definition.
7264         (process_serial_event): Don't handle Hs.
7265         * server.h (step_thread): Remove declaration.
7266         * target.c (set_desired_inferior): Remove use of step_thread.
7267
7268 2011-08-24  Luis Machado  <lgustavo@codesourcery.com>
7269
7270         * linux-low.c: Include linux-procfs.h.
7271         (linux_attach_lwp_1): Update comments.
7272         (linux_attach): Scan for existing threads when attaching to a
7273         process that is the tgid.
7274         * Makefile.in: Update dependencies.
7275
7276 2011-08-24  Luis Machado  <lgustavo@codesourcery.com>
7277
7278         * configure.srv: Add linux-procfs.o dependencies.
7279
7280 2011-08-14  Yao Qi  <yao@codesourcery.com>
7281
7282         * target.h (struct target_ops): Fix indent.
7283         * win32-low.c (win32_target_ops): Fix comment.
7284
7285 2011-08-14  Andrew Jenner  <andrew@codesourcery.com>
7286             Yao Qi  <yao@codesourcery.com>
7287
7288         * Makefile.in (clean): Remove tic6x-*.c files.
7289         (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
7290         (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
7291         (tic6x-c64xp-linux.c): Likewise.
7292         * configure.srv: Add support for tic6x-*-uclinux.
7293         * linux-tic6x-low.c: New.
7294         * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
7295
7296 2011-08-14  Andrew Stubbs <ams@codesourcery.com>
7297             Yao Qi  <yao@codesourcery.com>
7298
7299         * target.h (struct target_ops): Add read_loadmap.
7300         * linux-low.c (struct target_loadseg): New type.
7301         (struct target_loadmap): New type.
7302         (linux_read_loadmap): New function.
7303         (linux_target_ops): Add linux_read_loadmap.
7304         * server.c (handle_query): Support qXfer:fdpic:read packet.
7305         * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
7306         to NULL.
7307
7308 2011-08-05  Eli Zaretskii  <eliz@gnu.org>
7309
7310         * win32-low.c: Include <stdint.h>.
7311
7312 2011-07-22  Pedro Alves  <pedro@codesourcery.com>
7313
7314         * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
7315         to the inferior here.
7316         (i386_remove_aligned_watchpoint): Ditto.
7317         (i386_handle_nonaligned_watchpoint): Return immediate on fail to
7318         fit part of the watchpoint in the debug registers.
7319         (i386_update_inferior_debug_regs): New.
7320         (i386_low_insert_watchpoint): Work on a local mirror of the debug
7321         registers, and only update the inferior on success.
7322         (i386_low_remove_watchpoint): Ditto.
7323
7324 2011-07-22  Kwok Cheung Yeung  <kcy@codesourcery.com>
7325
7326         * linux-low.c (compare_ints, unique, list_threads, show_process,
7327         linux_core_of_thread): Delete.
7328         (linux_target_ops): Change linux_core_of_thread to
7329         linux_common_core_of_thread.
7330         (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
7331         * utils.c (malloc_failure): Change type of argument.
7332         (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
7333         * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
7334         common/linux-osdata.c, common/ptid.c and common/buffer.c.
7335         (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
7336         (IPA_OBJS): Add common-utils-ipa.o.
7337         (ptid_h, linux_osdata_h): New macros.
7338         (server_h): Add common/common-utils.h, common/xml-utils.h,
7339         common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
7340         common/ptid.h.
7341         (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
7342         ptid.o, buffer.o): New rules.
7343         (linux-low.o): Add common/linux-osdata.h as a dependency.
7344         * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
7345         * configure.ac: Add AC_HEADER_DIRENT check.
7346         * config.in: Regenerate.
7347         * configure: Regenerate.
7348         * remote-utils.c (xml_escape_text): Delete.
7349         (buffer_grow, buffer_free, buffer_init, buffer_finish,
7350         buffer_xml_printf): Move to common/buffer.c.
7351         * server.c (main): Remove call to initialize_inferiors.
7352         * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
7353         ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
7354         ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
7355         internal_error, gdb_assert, gdb_assert_fail): Delete.
7356         (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
7357         buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
7358         common/buffer.h.
7359         * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
7360         ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
7361         initialize_inferiors): Delete.
7362
7363 2011-07-20  Pedro Alves  <pedro@codesourcery.com>
7364
7365         * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
7366         symbol error.
7367
7368 2011-05-31  Pedro Alves  <pedro@codesourcery.com>
7369
7370         * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
7371         assertion.
7372         * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
7373
7374 2011-05-26  Yao Qi  <yao@codesourcery.com>
7375
7376         * Makefile.in (thread-db.o): Track dependence to
7377         common/gdb_thread_db.h.
7378         * thread-db.c: include gdb_thread_db.h from right place.
7379
7380 2011-05-16  Adrian Cornish  <gnu@bluedreamer.com>
7381
7382         * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
7383         __FILE__ and __LINE__ to internal_error.
7384
7385 2011-05-13  Doug Evans  <dje@google.com>
7386
7387         * thread-db.c (try_thread_db_load_from_sdir): New function.
7388         (try_thread_db_load_from_dir): New function.
7389         (thread_db_load_search): Handle $sdir, ignore $pdir.
7390         Remove trying of system directories if search of
7391         libthread-db-search-path fails, that is now done via $sdir.
7392
7393 2011-05-12  Kwok Cheung Yeung  <kcy@codesourcery.com>
7394
7395         * server.c (handle_query): Add EnableDisableTracepoints to the list
7396         of supported features.
7397         * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
7398         tracepoints.
7399         (cmd_qtenable_disable): New.
7400         (cmd_qtstart): Install tracepoints even if disabled.
7401         (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
7402         receiving a QTEnable or QTDisable packet.
7403         (gdb_collect): Skip data collection if fast tracepoint is disabled.
7404         (ust_marker_to_static_tracepoint): Do not ignore disabled static
7405         tracepoints.
7406         (gdb_probe): Skip data collection if static tracepoint is disabled.
7407
7408 2011-05-10  Doug Evans  <dje@google.com>
7409
7410         * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
7411
7412 2011-05-04  Doug Evans  <dje@google.com>
7413
7414         * linux-low.c (linux_join): Skip process lookup.
7415         * spu-low.c (spu_join): Ditto.
7416         * server.c (join_inferiors_callback): Delete.
7417         (process_serial_event): For 'D' packet (detach) call join_inferior
7418         directly.
7419
7420 2011-05-04  Joseph Myers  <joseph@codesourcery.com>
7421
7422         * README: Don't mention xscale*-*-linux*.
7423         * configure.srv (xscale*-*-linux*): Don't handle target.
7424
7425 2011-04-27  Nathan Froyd  <froydnj@codesourcery.com>
7426
7427         * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
7428         casting pointers.
7429         (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
7430         (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
7431         (i386_emit_void_call_2): Likewise.
7432
7433 2011-04-26  Yao Qi  <yao@codesourcery.com>
7434
7435         * linux-low.c: Move common macros to linux-ptrace.h.
7436         Include linux-ptrace.h.
7437         * Makefile.in (linux_ptrace_h): New.
7438         (linux-low.o): Depends on linux-ptrace.h.
7439
7440 2011-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
7441
7442         * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
7443         RUN_ONCE.  Comment for the LISTEN_DESC delete_file_handler call.
7444         (remote_prepare): New function with most of the TCP code from ...
7445         (remote_open): ... here.  Detect PORT here unconditionally.  Move also
7446         setting transport_is_reliable.
7447         * server.c (run_once): New variable.
7448         (gdbserver_usage): Document it.
7449         (main): Set run_once for `--once'.  Call remote_prepare.  Exit after
7450         the first run if RUN_ONCE.
7451         * server.h (run_once, remote_prepare): New declarations.
7452
7453 2011-04-19  Tom Tromey  <tromey@redhat.com>
7454
7455         * win32-low.c (handle_load_dll): Remove duplicate "the".
7456
7457 2011-04-07  Pierre Muller  <muller@ics.u-strasbg.fr>
7458
7459         Remove support for old Cygwin 1.5 versions.
7460         * win32-low.c (win32_create_inferior): Use new cygwin_path_list
7461         function to avoid warning.
7462         (win32_add_one_solib): Use cygwin_conv_path function to avoid
7463         warning.
7464
7465 2011-03-18  Pierre Muller  <muller@ics.u-strasbg.fr>
7466
7467         * gdbserver/server.h (Macro _): Define it if not available.
7468
7469 2011-03-14  Michael Snyder  <msnyder@vmware.com>
7470
7471         * hostio.c (handle_close): Remove unnecessary null test.
7472
7473 2011-03-10  Joel Brobecker  <brobecker@adacore.com>
7474
7475         * Makefile.in (maintainer-clean realclean distclean): Remove
7476         "make ...  subdir_do" command.
7477
7478 2011-03-10  Michael Snyder  <msnyder@vmware.com>
7479
7480         * tracepoint.c (tracepoint_finish_step): Fix loop variable.
7481
7482         * server.c (handle_v_run): Free alloced buffer on early return.
7483
7484 2011-03-09  Yao Qi  <yao@codesourcery.com>
7485
7486         Revert:
7487         2011-03-04  Yao Qi  <yao@codesourcery.com>
7488
7489         * Makefile.in: Remove GNU make feature --directory.
7490
7491         2011-03-05  Yao Qi  <yao@codesourcery.com>
7492
7493         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7494         (subdir_do): New make target.  Copied from gdb/Makefile.
7495         (maintainer-clean, realclean, distclean, clean): Call corresponding
7496         make targets in common/Makefile.
7497
7498         2011-02-11  Yao Qi  <yao@codesourcery.com>
7499
7500         * configure.ac: Call AC_PROG_RANLIB.
7501         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
7502         * configure: Regenerate.
7503
7504 2011-03-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
7505
7506         * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
7507
7508 2011-03-06  Yao Qi  <yao@codesourcery.com>
7509
7510         * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
7511
7512 2011-03-05  Yao Qi  <yao@codesourcery.com>
7513
7514         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7515         (subdir_do): New make target.  Copied from gdb/Makefile.
7516         (maintainer-clean, realclean, distclean, clean): Call corresponding
7517         make targets in common/Makefile.
7518
7519 2011-03-04  Yao Qi  <yao@codesourcery.com>
7520
7521         * Makefile.in: Remove GNU make feature --directory.
7522
7523 2011-03-04  Michael Snyder  <msnyder@vmware.com>
7524
7525         * server.c (queue_stop_reply): Call xmalloc not malloc.
7526
7527 2011-03-02  Michael Snyder  <msnyder@vmware.com>
7528
7529         * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7530
7531 2011-02-28  Michael Snyder  <msnyder@vmware.com>
7532
7533         * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7534         (cmd_qtframe): Ditto.
7535         (cmd_qtbuffer): Ditto.
7536         (cmd_bigqtbuffer): Ditto.
7537
7538         * utils.c (decimal2str): Initialize 'width' to nine, then
7539         don't mess with it.
7540
7541 2011-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
7542
7543         * hostio.c (require_data): Free *data, not data.
7544
7545 2011-02-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
7546
7547         * hostio.c (require_data): Use free, not xfree.
7548
7549 2011-02-27  Michael Snyder  <msnyder@vmware.com>
7550
7551         * server.c (handle_query): Discard unused value.
7552
7553         * hostio.c (require_data): Free malloc memory before returning
7554         error.
7555
7556 2011-02-26  Michael Snyder  <msnyder@vmware.com>
7557
7558         * linux-low.c (list_threads): Call closedir for dirent.
7559
7560 2011-02-27  Michael Snyder  <msnyder@vmware.com>
7561
7562         * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7563         a case statement falls through.
7564
7565         * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7566
7567         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7568         in comparison.
7569
7570 2011-02-26  Michael Snyder  <msnyder@vmware.com>
7571
7572         * utils.c (decimal2str): Eliminate dead code and dead param.
7573         (pulongest): Drop dead param from call to decimal2str.
7574         (plongest): Ditto.
7575
7576 2011-02-24  Joel Brobecker  <brobecker@adacore.com>
7577
7578         Revert the following patch (not approved yet):
7579         2011-02-21  Hui Zhu  <teawater@gmail.com>
7580         * tracepoint.c (tp_printf): New function.
7581         (eval_agent_expr): Handle gdb_agent_op_printf.
7582
7583 2011-02-21  Hui Zhu  <teawater@gmail.com>
7584
7585         * tracepoint.c (tp_printf): New function.
7586         (eval_agent_expr): Handle gdb_agent_op_printf.
7587
7588 2011-02-18  Tom Tromey  <tromey@redhat.com>
7589
7590         * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7591         (tracepoint.o): Likewise.
7592         * tracepoint.c (enum gdb_agent_op): Use ax.def.
7593         (gdb_agent_op_names): Likewise.
7594
7595 2011-02-18  Tom Tromey  <tromey@redhat.com>
7596
7597         * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7598         gdb_agent_op_rot>: New constants.
7599         (gdb_agent_op_names): Add pick and roll.
7600         (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7601         cases.
7602
7603 2011-02-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
7604
7605         * aclocal.m4: Regenerated with aclocal-1.11.1.
7606
7607 2011-02-14  Pedro Alves  <pedro@codesourcery.com>
7608
7609         * server.c (handle_qxfer_traceframe_info): New.
7610         (qxfer_packets): Register "traceframe-info".
7611         (handle_query): Report support for qXfer:traceframe-info:read+.
7612         * tracepoint.c (match_blocktype): New.
7613         (traceframe_find_block_type): Rename to ...
7614         (traceframe_walk_blocks): ... this.  Add callback filter argument,
7615         and use it.
7616         (traceframe_find_block_type): New, reimplemented on top of
7617         traceframe_walk_blocks.
7618         (build_traceframe_info_xml): New.
7619         (traceframe_read_info): New.
7620         * server.h (traceframe_read_info): Declare.
7621
7622 2011-02-11  Yao Qi  <yao@codesourcery.com>
7623
7624         * configure.ac: Call AC_PROG_RANLIB.
7625         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
7626         * configure: Regenerate.
7627
7628 2011-02-07  Pedro Alves  <pedro@codesourcery.com>
7629
7630         * server.c (gdb_read_memory): Change return semantics to allow
7631         partial transfers.
7632         (handle_search_memory_1): Adjust.
7633         (process_serial_event) <'m' packet>: Handle partial transfers.
7634         * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7635
7636 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
7637
7638         * regcache.c (init_register_cache): Initialize
7639         regcache->register_status.
7640         (free_register_cache): Release regcache->register_status.
7641         (regcache_cpy): Copy register_status.
7642         (registers_to_string): Print 'x's for unavailable registers.
7643         (supply_register): Mark the register's status valid or
7644         unavailable, depending on whether a buffer was passed in or not.
7645         (supply_register_zeroed): New.
7646         (supply_regblock): Mark the registers' status valid or
7647         unavailable, depending on whether a buffer was passed in or not.
7648         * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7649         (struct regcache): New `register_status' field.
7650         (supply_register_zeroed): Declare.
7651         * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7652         supply_register_zeroed, rather than passing a NULL buffer to
7653         supply_register.
7654         * tracepoint.c (fetch_traceframe_registers): Update comment.
7655
7656 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
7657
7658         * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7659         buffer explicit.
7660
7661 2011-01-25  Pedro Alves  <pedro@codesourcery.com>
7662
7663         * server.h (decode_xfer_write): Change prototype.
7664         * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7665         and don't extract the annex here.
7666         * server.c (decode_xfer_read): Remove `annex' parameter,
7667         and don't extract the annex here.
7668         (decode_xfer): New.
7669         (struct qxfer): New.
7670         (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7671         (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7672         (handle_qxfer_statictrace): New functions, abstracted out from
7673         handle_query, and made to use the struct qxfer interface.
7674         (handle_threads_qxfer_proper): Rename to ...
7675         (handle_qxfer_threads_proper): ... this.
7676         (handle_threads_qxfer): Rename to ...
7677         (handle_qxfer_threads): ... this.  Adjust.
7678         (qxfer_packets): New array.
7679         (handle_qxfer): New function.
7680         (handle_query): Use handle_qxfer.
7681
7682 2011-01-05  Michael Snyder  <msnyder@msnyder-server.eng.vmware.com>
7683
7684         * gdbreplay.c: Shorten lines of >= 80 columns.
7685         * linux-low.c: Ditto.
7686         * linux-ppc-low.c: Ditto.
7687         * linux-s390-low.c: Ditto.
7688         * linux-sparc-low.c: Ditto.
7689         * linux-x86-low.c: Ditto.
7690         * linux-xtensa-low.c: Ditto.
7691         * mem-break.c: Ditto.
7692         * nto-low.c: Ditto.
7693         * regcache.h: Ditto.
7694         * remote-utils.c: Ditto.
7695         * server.c: Ditto.
7696         * server.h: Ditto.
7697         * thread-db.c: Ditto.
7698         * tracepoint.c: Ditto.
7699         * utils.c: Ditto.
7700         * win32-low.h: Ditto.
7701
7702 2011-01-05  Joel Brobecker  <brobecker@adacore.com>
7703
7704         * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7705         update.
7706
7707 2011-01-01  Joel Brobecker  <brobecker@adacore.com>
7708
7709         * server.c (gdbserver_version): Update copyright year in version
7710         output.
7711         * gdbreplay.c (gdbreplay_version): Ditto.
7712
7713 2010-12-29  Jie Zhang  <jie.zhang@analog.com>
7714
7715         * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7716         * linux-bfin-low.c: New file.
7717         * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7718         PT_DATA_ADDR for BFIN targets.
7719         * Makefile.in (SFILES): Add linux-bfin-low.c.
7720         (clean): Remove reg-bfin.c.
7721         (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7722         * README: Mention supported Blackfin targets.
7723
7724 2010-12-23  Mike Frysinger  <vapier@gentoo.org>
7725
7726         * .gitignore: New file.
7727
7728 2010-11-16  Mike Frysinger  <vapier@gentoo.org>
7729
7730         * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7731
7732 2010-10-22  Jie Zhang  <jie@codesourcery.com>
7733
7734         * Makefile.in: Add FLAGS_TO_PASS variable.
7735         (install): Remove dependency of install-only and recursively
7736         invoke make for install-only.
7737
7738 2010-10-04  Doug Evans  <dje@google.com>
7739
7740         * Makefile.in (uninstall): Use $(DESTDIR).
7741
7742 2010-09-24  Pedro Alves  <pedro@codesourcery.com>
7743
7744         PR gdb/11842
7745
7746         * linux-x86-low.c (compat_siginfo_from_siginfo)
7747         (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7748         si_code is < 0.  Check for si_code == SI_TIMER before checking for
7749         si_code < 0.
7750
7751 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
7752
7753         * lynx-i386-low.c: New file.
7754         * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7755
7756 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
7757
7758         * lynx-low.c (ptrace_request_to_str): Remove handling for
7759         request values that have been removed in LynxOS 5.x.
7760
7761 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
7762
7763         * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7764         <ptrace.h>
7765
7766 2010-09-09  Nathan Sidwell  <nathan@codesourcery.com>
7767
7768         * configure.ac: Add --enable-inprocess-agent option.
7769         * configure: Rebuilt.
7770
7771 2010-09-06  Yao Qi  <yao@codesourcery.com>
7772
7773         * linux-low.c (linux_kill): Remove unused variable.
7774         (linux_stabilize_threads): Likewise.
7775         * server.c (start_inferior): Likewise.
7776         (queue_stop_reply_callback): Likewise.
7777         * tracepoint.c (do_action_at_tracepoint): Likewise.
7778
7779 2010-09-06  Yao Qi  <yao@codesourcery.com>
7780
7781         * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7782         on return.
7783
7784 2010-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
7785
7786         * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7787
7788 2010-09-06  Pedro Alves  <pedro@codesourcery.com>
7789
7790         * Makefile.in (install-only): Replace $IPA_DEPFILES with
7791         "$(IPA_DEPFILES)".
7792
7793 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
7794
7795         * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7796         gdbserver/lynx-ppc-low.c: New files.
7797         * Makefile.in (lynx_low_h): New variable.
7798         (lynx-low.o, lynx-ppc-low.o): New rules.
7799         * configure.ac: On LynxOS, link with -lnetinet.
7800         * configure.srv: Add handling of powerpc-*-lynxos* targets.
7801         * configure: regenerate.
7802
7803 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
7804
7805         * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7806         * configure.ac: Add check for vasprintf and vsnprintf.
7807         * configure, config.in: Regenerate.
7808         * server.h (vasprintf, vsnprintf): Add conditional declarations.
7809
7810 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
7811
7812         * gdbreplay.c: Move include of alloca.h up, next to include of
7813         malloc.h.
7814         * server.h: Add include of malloc.h.
7815         * mem-break.c: Remove include of malloc.h.
7816         * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7817
7818 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
7819
7820         * Makefile.in (memmem.o): Build with -Wno-error.
7821
7822 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
7823
7824         * utils.c (xsnprintf): Make non-static.
7825         * server.h: Add xsnprintf declaration.
7826         * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7827         replace calls to snprintf by calls to xsnprintf throughout.
7828
7829 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
7830
7831         * configure.ac: Add configure check for alloca.
7832         * configure, config.in: Regenerate.
7833         * server.h: Include alloca.h if it exists.
7834         * gdbreplay.c: Include alloca.h if it exists.
7835
7836 2010-08-28  Pedro Alves  <pedro@codesourcery.com>
7837
7838         * linux-low.c (__SIGRTMIN): Define if not already defined.
7839         (linux_create_inferior): Check for __ANDROID__ rather than
7840         __SIGRTMIN.
7841         (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7842         are already deferred.
7843         (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7844         (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7845         stopped and already has a pending signal to report.
7846         (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7847         a pending signal to report or is moving out of a jump pad.
7848         (linux_init_signals): Check for __ANDROID__ rather than
7849         __SIGRTMIN.
7850
7851 2010-08-28  Pedro Alves  <pedro@codesourcery.com>
7852
7853         * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7854         debug_threads check.  Avoid a linear search when not doing debug
7855         output.
7856
7857 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
7858
7859         * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7860         (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7861         (struct file_handler) <fd>: Change type to gdb_fildes_t.
7862         (process_event): Change local fd's type to gdb_fildes_t.
7863         (create_file_handler): Adjust prototype.
7864         (delete_file_handler): Adjust prototype.
7865         (handle_file_event): Adjust prototype.  Use pfildes.
7866         (create_file_event): Adjsut prototype.
7867         * remote-utils.c (remote_desc, listen_desc): Change type to
7868         gdb_fildes_t.
7869         * server.h: New gdb_fildes_t typedef.
7870         [USE_WIN32API]: Include winsock2.h.
7871         (delete_file_handler, add_file_handler): Adjust prototypes.
7872         (pfildes): Declare.
7873         * utils.c (pfildes): New.
7874
7875 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
7876
7877         * configure.ac (build_warnings): Add -Wno-char-subscripts.
7878         * configure: Regenerate.
7879
7880 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
7881
7882         * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7883         (linux_done_accessing_memory): ... this.
7884         (linux_target_ops): Adjust.
7885         * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7886         * nto-low.c (nto_target_ops): Adjust comment.
7887         * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7888         * spu-low.c (spu_target_ops): Adjust comment.
7889         * target.h (target_ops): Rename unprepare_to_access_memory field
7890         to done_accessing_memory.
7891         (unprepare_to_access_memory): Rename to ...
7892         (done_accessing_memory): ... this.
7893
7894 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
7895
7896         * linux-low.c (linux_prepare_to_access_memory): New.
7897         (linux_unprepare_to_access_memory): New.
7898         (linux_target_ops): Install them.
7899         * server.c (read_memory): Rename to ...
7900         (gdb_read_memory): ... this.  Use
7901         prepare_to_access_memory/prepare_to_access_memory.
7902         (write_memory): Rename to ...
7903         (gdb_write_memory): ... this.  Use
7904         prepare_to_access_memory/prepare_to_access_memory.
7905         (handle_search_memory_1): Adjust.
7906         (process_serial_event): Adjust.
7907         * target.h (struct target_ops): New fields
7908         prepare_to_access_memory and unprepare_to_access_memory.
7909         (prepare_to_access_memory, unprepare_to_access_memory): New.
7910         * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7911         prepare_to_access_memory/prepare_to_access_memory.
7912         * nto-low.c (nto_target_ops): Adjust.
7913         * spu-low.c (spu_target_ops): Adjust.
7914         * win32-low.c (win32_target_ops): Adjust.
7915
7916 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
7917
7918         * Makefile.in (WARN_CFLAGS): Get it from configure.
7919         (WERROR_CFLAGS): New.
7920         (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7921         * configure.ac: Introduce --enable-werror, which adds -Werror to
7922         the compiler command line.  Enabled by default.  Disable with
7923         --disable-werror.  Add -Wdeclaration-after-statement
7924         Wpointer-arith and -Wformat-nonliteral to warning flags.
7925         * configure: Regenerate.
7926
7927 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
7928
7929         * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7930
7931 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
7932
7933         * gdbreplay.c (remote_error): New.
7934         (gdbchar): New.
7935         (expect): Use gdbchar.  Check for error reading from GDB.
7936         Clarify sync error output.
7937         (play): Check for errors writing to GDB.
7938         * linux-low.c (sigchld_handler): Really ignore `write' errors.
7939         * remote-utils.c (getpkt): Check for errors writing to the remote
7940         descriptor.
7941
7942 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
7943
7944         * linux-low.c (linux_wait_1): Move non-debugging code out of
7945         `debug_threads' control.
7946
7947 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
7948
7949         * linux-low.c (linux_wait_1): Don't set last_status here.
7950         * server.c (push_event, queue_stop_reply_callback): Assert we're
7951         not pushing a TARGET_WAITKIND_IGNORE event.
7952         (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7953         (myresume, handle_target_event): Set the thread's last_resume_kind
7954         and last_status from the target returned status.
7955
7956 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
7957
7958         PR threads/10729
7959
7960         * linux-x86-low.c (update_debug_registers_callback): New.
7961         (i386_dr_low_set_addr): Use it.
7962         (i386_dr_low_get_addr): New.
7963         (i386_dr_low_set_control): Use update_debug_registers_callback.
7964         (i386_dr_low_get_control): New.
7965         (i386_dr_low_get_status): Adjust.
7966         * linux-low.c (linux_stop_lwp): New.
7967         * linux-low.h (linux_stop_lwp): Declare.
7968
7969         * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7970         argument instead of a i386_debug_reg_state.
7971         (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7972         a i386_debug_reg_state.
7973         (i386_insert_aligned_watchpoint): Adjust.
7974         (i386_remove_aligned_watchpoint): Adjust.
7975         (i386_low_stopped_data_address): Read the debug registers from the
7976         inferior instead of from the mirrors.
7977         * i386-low.h (struct i386_debug_reg_state): Extend comment.
7978         (i386_dr_low_get_addr): Declare.
7979         (i386_dr_low_get_control): Declare.
7980         (i386_dr_low_get_status): Change prototype.
7981
7982         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7983         (i386_dr_low_get_addr): New.
7984         (i386_dr_low_get_control): New.
7985         (i386_dr_low_get_status): Adjust prototype.  Return
7986         dr_status_mirror.
7987         (i386_initial_stuff): Clear dr_status_mirror and
7988         dr_control_mirror.
7989         (i386_get_thread_context): Adjust.
7990         (i386_set_thread_context): Adjust.
7991         (i386_thread_added): Adjust.
7992
7993 2010-08-24  Pedro Alves  <pedro@codesourcery.com>
7994
7995         * linux-low.h (linux_thread_area): Delete declaration.
7996
7997 2010-08-11  Thomas Schwinge  <thomas@codesourcery.com>
7998
7999         * linux-low.c (linux_wait_1): Correctly return the ptid of the child
8000         after its termination.
8001
8002 2010-08-09  Pedro Alves  <pedro@codesourcery.com>
8003
8004         * linux-low.c (gdb_wants_lwp_stopped): Delete.
8005         (gdb_wants_all_stopped): Delete.
8006         (linux_wait_1): Don't call them.
8007         * server.c (handle_v_cont): Tag all threads as want-stopped.
8008         (gdb_wants_thread_stopped): Fix comments.  Tag the thread that
8009         stopped as "client-wants-stopped".
8010
8011 2010-07-31  Pedro Alves  <pedro@codesourcery.com>
8012
8013         * Makefile.in (signals_h): New.
8014         (server_h): Depend on it.
8015         (server.o): Don't depend on $(signals_def).
8016         (signals.o): Depend on $(signals_def).
8017
8018 2010-07-31  Jan Kratochvil  <jan.kratochvil@redhat.com>
8019
8020         * Makefile.in (signals_def): New.
8021         (server_h): Append include/gdb/signals.h and signals_def.
8022         (server.o): Append signals_def.
8023
8024 2010-07-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
8025
8026         * server.c (handle_target_event): Use target_signal_to_host for
8027         resume_info.sig initialization.
8028         * target.h (struct thread_resume) <sig>: New comment.
8029
8030 2010-07-20  Ozkan Sezer  <sezeroz@gmail.com>
8031
8032         * server.c (handle_query): strcpy() the returned string from paddress()
8033         instead of sprintf().
8034         * utils.c (paddress): Return phex_nz().
8035
8036 2010-07-07  Joel Brobecker  <brobecker@adacore.com>
8037
8038         * server.c (handle_v_cont): Call mourn_inferior if process
8039         just exited.
8040         (myresume): Likewise.
8041
8042 2010-07-01  Pedro Alves  <pedro@codesourcery.com>
8043
8044         Static tracepoints, and integration with UST.
8045
8046         * configure.ac: Handle --with-ust.  substitute ustlibs and ustinc.
8047         * mem-break.c (uninsert_all_breakpoints)
8048         (reinsert_all_breakpoints): New.
8049         * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
8050         * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
8051         (gdb_agent_ust_loaded, helper_thread_id)
8052         (gdb_agent_helper_thread_id): New macros.
8053         (struct ipa_sym_addresses): Add addr_ust_loaded,
8054         addr_helper_thread_id, addr_cmd_buf.
8055         (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
8056         (in_process_agent_loaded_ust): New.
8057         (write_e_ust_not_loaded): New.
8058         (maybe_write_ipa_ust_not_loaded): New.
8059         (struct collect_static_trace_data_action): New.
8060         (enum tracepoint_type) <static_tracepoint>: New.
8061         (struct tracepoint) <handle>: Mention static tracepoints.
8062         (struct static_tracepoint_ctx): New.
8063         (CMD_BUF_SIZE): New.
8064         (add_tracepoint_action): Handle static tracepoint actions.
8065         (unprobe_marker_at): New.
8066         (clear_installed_tracepoints): Handle static tracepoints.
8067         (cmd_qtdp): Handle static tracepoints.
8068         (probe_marker_at): New.
8069         (cmd_qtstart): Handle static tracepoints.
8070         (response_tracepoint): Handle static tracepoints.
8071         (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
8072         (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
8073         (get_context_regcache): Handle static tracepoints.
8074         (do_action_at_tracepoint): Handle static tracepoint actions.
8075         (traceframe_find_block_type): Handle static trace data blocks.
8076         (traceframe_read_sdata): New.
8077         (download_tracepoints): Download static tracepoint actions.
8078         [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
8079         (GDB_PROBE_NAME): New.
8080         (ust_ops): New.
8081         (GET_UST_SYM): New.
8082         (USTF): New.
8083         (dlsym_ust): New.
8084         (ust_marker_to_static_tracepoint): New.
8085         (gdb_probe): New.
8086         (collect_ust_data_at_tracepoint): New.
8087         (gdb_ust_probe): New.
8088         (UNIX_PATH_MAX, SOCK_DIR): New.
8089         (gdb_ust_connect_sync_socket): New.
8090         (resume_thread, stop_thread): New.
8091         (run_inferior_command): New.
8092         (init_named_socket): New.
8093         (gdb_ust_socket_init): New.
8094         (cstr_to_hexstr): New.
8095         (next_st): New.
8096         (first_marker, next_marker): New.
8097         (response_ust_marker): New.
8098         (cmd_qtfstm, cmd_qtsstm): New.
8099         (unprobe_marker_at, probe_marker_at): New.
8100         (cmd_qtstmat, gdb_ust_thread): New.
8101         (gdb_ust_init): New.
8102         (initialize_tracepoint_ftlib): Call gdb_ust_init.
8103         * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
8104         (ST_REGENTRY): New.
8105         (x86_64_st_collect_regmap): New.
8106         (X86_64_NUM_ST_COLLECT_GREGS): New.
8107         (AMD64_RIP_REGNUM): New.
8108         (supply_static_tracepoint_registers): New.
8109         * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
8110         (ST_REGENTRY): New.
8111         (i386_st_collect_regmap): New.
8112         (i386_NUM_ST_COLLECT_GREGS): New.
8113         (supply_static_tracepoint_registers): New.
8114         * server.c (handle_query): Handle qXfer:statictrace:read.
8115         <qSupported>: Report support for StaticTracepoints, and
8116         qXfer:statictrace:read features.
8117         * server.h (traceframe_read_sdata)
8118         (supply_static_tracepoint_registers): Declare.
8119         * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
8120         (unpack_varlen_hex): Include in IPA build.
8121         * Makefile.in (ustlibs, ustinc): New.
8122         (IPA_OBJS): Add remote-utils-ipa.o.
8123         ($(IPA_LIB)): Link -ldl and -lpthread.
8124         (UST_CFLAGS): New.
8125         (IPAGENT_CFLAGS): Add UST_CFLAGS.
8126         * config.in, configure: Regenerate.
8127
8128 2010-06-20  Ian Lance Taylor  <iant@google.com>
8129             Pedro Alves  <pedro@codesourcery.com>
8130
8131         * linux-x86-low.c (always_true): Delete.
8132         (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
8133         trying to fool the compiler with always_true.
8134
8135 2010-06-20  Pedro Alves  <pedro@codesourcery.com>
8136
8137         * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
8138         conditions in gdbserver.
8139
8140 2010-06-19  Ulrich Weigand  <uweigand@de.ibm.com>
8141
8142         * spu-low.c (spu_read_memory): Wrap around local store limit.
8143         (spu_write_memory): Likewise.
8144
8145 2010-06-15  Pedro Alves  <pedro@codesourcery.com>
8146
8147         * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
8148         (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
8149         LONGEST uses.
8150         * server.h (struct emit_ops): Replace int64_t uses with LONGEST
8151         uses.
8152         * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
8153         uses with LONGEST uses.
8154
8155 2010-06-14  Stan Shebs  <stan@codesourcery.com>
8156             Pedro Alves  <pedro@codesourcery.com>
8157
8158         Bytecode compiler.
8159
8160         * linux-x86-low.c: Include limits.h.
8161         (add_insns): New.
8162         (always_true): New.
8163         (EMIT_ASM): New.
8164         (EMIT_ASM32): New.
8165         (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
8166         (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
8167         (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
8168         (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
8169         (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
8170         (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
8171         (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
8172         (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
8173         (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
8174         (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
8175         (amd64_emit_void_call_2): New.
8176         (amd64_emit_ops): New.
8177         (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
8178         (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
8179         (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
8180         (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
8181         (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
8182         (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
8183         (i386_emit_goto, i386_write_goto_address, i386_emit_const)
8184         (i386_emit_call, i386_emit_reg, i386_emit_pop)
8185         (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
8186         (i386_emit_stack_adjust, i386_emit_int_call_1)
8187         (i386_emit_void_call_2): New.
8188         (i386_emit_ops): New.
8189         (x86_emit_ops): New.
8190         (the_low_target): Install x86_emit_ops.
8191         * server.h (struct emit_ops): New.
8192         (get_raw_reg_func_addr): Declare.
8193         (current_insn_ptr, emit_error): Declare.
8194         * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
8195         (set_trace_state_variable_value): New defines.
8196         (struct ipa_sym_addresses): New fields addr_get_raw_reg,
8197         addr_get_trace_state_variable_value and
8198         addr_set_trace_state_variable_value.
8199         (symbol_list): New fields for get_raw_reg,
8200         get_trace_state_variable_value and set_trace_state_variable_value.
8201         (condfn): New typedef.
8202         (struct tracepoint): New field `compiled_cond'.
8203         (do_action_at_tracepoint): Clear compiled_cond.
8204         (get_trace_state_variable_value, set_trace_state_variable_value):
8205         Export in the IPA.
8206         (condition_true_at_tracepoint): If there's a compiled condition,
8207         run that.
8208         (current_insn_ptr, emit_error): New globals.
8209         (struct bytecode_address): New.
8210         (get_raw_reg_func_addr): New.
8211         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
8212         (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
8213         (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
8214         (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
8215         (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
8216         (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
8217         (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
8218         (compile_tracepoint_condition, compile_bytecodes): New.
8219         * target.h (emit_ops): Forward declare.
8220         (struct target_ops): New field emit_ops.
8221         (target_emit_ops): New.
8222         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
8223         * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
8224         * linux-low.c (linux_emit_ops): New.
8225         (linux_target_ops): Install it.
8226         * linux-low.h (struct linux_target_ops): New field emit_ops.
8227
8228 2010-06-14  Ulrich Weigand  <uweigand@de.ibm.com>
8229
8230         * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
8231         * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
8232
8233 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
8234             Stan Shebs  <stan@codesourcery.com>
8235
8236         * Makefile.in (IPA_DEPFILES, extra_libraries): New.
8237         (all): Depend on $(extra_libraries).
8238         (install-only): Install the IPA.
8239         (IPA_OBJS, IPA_LIB): New.
8240         (clean): Remove the IPA lib.
8241         (IPAGENT_CFLAGS): New.
8242         (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
8243         (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
8244         (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
8245         * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
8246         * configure.ac: Check for atomic builtins support in the compiler.
8247         (IPA_DEPFILES, extra_libraries): Define.
8248         * configure.srv (ipa_obj): Add description.
8249         (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
8250         (i[34567]86-*-linux*): Set ipa_obj.
8251         (x86_64-*-linux*): Set ipa_obj.
8252         * linux-low.c (stabilizing_threads): New.
8253         (supports_fast_tracepoints): New.
8254         (linux_detach): Stabilize threads before detaching.
8255         (handle_tracepoints): Handle internal tracing breakpoints.  Assert
8256         the lwp is either not stabilizing, or is moving out of a jump pad.
8257         (linux_fast_tracepoint_collecting): New.
8258         (maybe_move_out_of_jump_pad): New.
8259         (enqueue_one_deferred_signal): New.
8260         (dequeue_one_deferred_signal): New.
8261         (linux_wait_for_event_1): If moving out of a jump pad, defer
8262         pending signals to later.
8263         (linux_stabilize_threads): New.
8264         (linux_wait_1): Check if threads need moving out of jump pads, and
8265         do it if so.
8266         (stuck_in_jump_pad_callback): New.
8267         (move_out_of_jump_pad_callback): New.
8268         (lwp_running): New.
8269         (linux_resume_one_lwp): Handle moving out of jump pads.
8270         (linux_set_resume_request): Dequeue deferred signals.
8271         (need_step_over_p): Also step over fast tracepoint jumps.
8272         (start_step_over): Also uninsert fast tracepoint jumps.
8273         (finish_step_over): Also reinsert fast tracepoint jumps.
8274         (linux_install_fast_tracepoint_jump): New.
8275         (linux_target_ops): Install linux_stabilize_threads and
8276         linux_install_fast_tracepoint_jump_pad.
8277         * linux-low.h (linux_target_ops) <get_thread_area,
8278         install_fast_tracepoint_jump_pad>: New fields.
8279         (struct lwp_info) <collecting_fast_tracepoint,
8280         pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
8281         (linux_get_thread_area): Declare.
8282         * linux-x86-low.c (jump_insn): New.
8283         (x86_get_thread_area): New.
8284         (append_insns): New.
8285         (push_opcode): New.
8286         (amd64_install_fast_tracepoint_jump_pad): New.
8287         (i386_install_fast_tracepoint_jump_pad): New.
8288         (x86_install_fast_tracepoint_jump_pad): New.
8289         (the_low_target): Install x86_get_thread_area and
8290         x86_install_fast_tracepoint_jump_pad.
8291         * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
8292         (struct fast_tracepoint_jump): New.
8293         (fast_tracepoint_jump_insn): New.
8294         (fast_tracepoint_jump_shadow): New.
8295         (find_fast_tracepoint_jump_at): New.
8296         (fast_tracepoint_jump_here): New.
8297         (delete_fast_tracepoint_jump): New.
8298         (set_fast_tracepoint_jump): New.
8299         (uninsert_fast_tracepoint_jumps_at): New.
8300         (reinsert_fast_tracepoint_jumps_at): New.
8301         (set_breakpoint_at): Use write_inferior_memory.
8302         (uninsert_raw_breakpoint): Use write_inferior_memory.
8303         (check_mem_read): Mask out fast tracepoint jumps.
8304         (check_mem_write): Mask out fast tracepoint jumps.
8305         * mem-break.h (struct fast_tracepoint_jump): Forward declare.
8306         (set_fast_tracepoint_jump): Declare.
8307         (delete_fast_tracepoint_jump)
8308         (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
8309         (reinsert_fast_tracepoint_jumps_at): Declare.
8310         * regcache.c: Don't compile many functions when building the
8311         in-process agent library.
8312         (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
8313         the register buffer in the heap.
8314         (free_register_cache): If the register buffer isn't owned by the
8315         regcache, don't free it.
8316         (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
8317         pre-existing register caches.
8318         * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
8319         type.
8320         (convert_ascii_to_int): : Constify `from' parameter type.
8321         (decode_M_packet, decode_X_packet): Replace the `to' parameter by
8322         a `to_p' pointer to pointer parameter.  If TO_P is NULL, malloc
8323         the needed buffer in-place.
8324         (relocate_instruction): New.
8325         * server.c (handle_query) <qSymbols>: If the target supports
8326         tracepoints, give it a chance of looking up symbols.  Report
8327         support for fast tracepoints.
8328         (handle_status): Stabilize threads.
8329         (process_serial_event): Adjust.
8330         * server.h (struct fast_tracepoint_jump): Forward declare.
8331         (struct process_info) <fast_tracepoint_jumps>: New field.
8332         (convert_ascii_to_int, convert_int_to_ascii): Adjust.
8333         (decode_X_packet, decode_M_packet): Adjust.
8334         (relocate_instruction): Declare.
8335         (in_process_agent_loaded): Declare.
8336         (tracepoint_look_up_symbols): Declare.
8337         (struct fast_tpoint_collect_status): Declare.
8338         (fast_tracepoint_collecting): Declare.
8339         (force_unlock_trace_buffer): Declare.
8340         (handle_tracepoint_bkpts): Declare.
8341         (initialize_low_tracepoint)
8342         (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
8343         * target.h (struct target_ops) <stabilize_threads,
8344         install_fast_tracepoint_jump_pad>: New fields.
8345         (stabilize_threads, install_fast_tracepoint_jump_pad): New.
8346         * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
8347         [HAVE_STDINT_H]: Include stdint.h.
8348         (trace_debug_1): Rename to ...
8349         (trace_vdebug): ... this.
8350         (trace_debug): Rename to ...
8351         (trace_debug_1): ... this.  Add `level' parameter.
8352         (trace_debug): New.
8353         (ATTR_USED, ATTR_NOINLINE): New.
8354         (IP_AGENT_EXPORT): New.
8355         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8356         (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
8357         (about_to_request_buffer_space, trace_buffer_is_full)
8358         (stopping_tracepoint, expr_eval_result, error_tracepoint)
8359         (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
8360         (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
8361         (traceframe_write_count, traceframes_created)
8362         (trace_state_variables)
8363         New renaming defines.
8364         (struct ipa_sym_addresses): New.
8365         (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
8366         (symbol_list): New.
8367         (ipa_sym_addrs): New.
8368         (all_tracepoint_symbols_looked_up): New.
8369         (in_process_agent_loaded): New.
8370         (write_e_ipa_not_loaded): New.
8371         (maybe_write_ipa_not_loaded): New.
8372         (tracepoint_look_up_symbols): New.
8373         (debug_threads) [IN_PROCESS_AGENT]: New.
8374         (read_inferior_memory) [IN_PROCESS_AGENT]: New.
8375         (UNKNOWN_SIDE_EFFECTS): New.
8376         (stop_tracing): New.
8377         (flush_trace_buffer): New.
8378         (stop_tracing_bkpt): New.
8379         (flush_trace_buffer_bkpt): New.
8380         (read_inferior_integer): New.
8381         (read_inferior_uinteger): New.
8382         (read_inferior_data_pointer): New.
8383         (write_inferior_data_pointer): New.
8384         (write_inferior_integer): New.
8385         (write_inferior_uinteger): New.
8386         (struct collect_static_trace_data_action): Delete.
8387         (enum tracepoint_type): New.
8388         (struct tracepoint) <type>: New field `type'.
8389         <actions_str, step_actions, step_actions_str>: Only include in
8390         GDBserver.
8391         <orig_size, obj_addr_on_target, adjusted_insn_addr>
8392         <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
8393         (tracepoints): Use IP_AGENT_EXPORT.
8394         (last_tracepoint): Don't include in the IPA.
8395         (stopping_tracepoint): Use IP_AGENT_EXPORT.
8396         (trace_buffer_is_full): Use IP_AGENT_EXPORT.
8397         (alloced_trace_state_variables): New.
8398         (trace_state_variables): Use IP_AGENT_EXPORT.
8399         (traceframe_t): Delete unused variable.
8400         (circular_trace_buffer): Don't include in the IPA.
8401         (trace_buffer_start): Delete.
8402         (struct trace_buffer_control): New.
8403         (trace_buffer_free): Delete.
8404         (struct ipa_trace_buffer_control): New.
8405         (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
8406         (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
8407         New.
8408         (trace_buffer_ctrl): New.
8409         (TRACE_BUFFER_CTRL_CURR): New.
8410         (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
8411         Reimplement as macros.
8412         (trace_buffer_wrap): Delete.
8413         (traceframe_write_count, traceframe_read_count)
8414         (traceframes_created, tracing): Use IP_AGENT_EXPORT.
8415         (struct tracepoint_hit_ctx) <type>: New field.
8416         (struct fast_tracepoint_ctx): New.
8417         (memory_barrier): New.
8418         (cmpxchg): New.
8419         (record_tracepoint_error): Update atomically in the IPA.
8420         (clear_inferior_trace_buffer): New.
8421         (about_to_request_buffer_space): New.
8422         (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
8423         updating the same buffer.
8424         (add_tracepoint): Default the tracepoint's type to trap
8425         tracepoint, and orig_size to -1.
8426         (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
8427         internal variables.
8428         (create_trace_state_variable): New parameter `gdb'.  Handle it.
8429         (clear_installed_tracepoints): Clear fast tracepoint jumps.
8430         (cmd_qtdp): Handle fast tracepoints.
8431         (cmd_qtdv): Adjust.
8432         (max_jump_pad_size): New.
8433         (gdb_jump_pad_head): New.
8434         (get_jump_space_head): New.
8435         (claim_jump_space): New.
8436         (sort_tracepoints): New.
8437         (MAX_JUMP_SIZE): New.
8438         (cmd_qtstart): Handle fast tracepoints.  Sync tracepoints with the
8439         IPA.
8440         (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
8441         support.  Upload fast traceframes, and delete internal IPA
8442         breakpoints.
8443         (stop_tracing_handler): New.
8444         (flush_trace_buffer_handler): New.
8445         (cmd_qtstop): Upload fast tracepoints.
8446         (response_tracepoint): Handle fast tracepoints.
8447         (tracepoint_finished_step): Upload fast traceframes.  Set the
8448         tracepoint hit context's tracepoint type.
8449         (handle_tracepoint_bkpts): New.
8450         (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
8451         type.  Add comment about fast tracepoints.
8452         (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
8453         non-existing action_str field.
8454         (get_context_regcache): Handle fast tracepoints.
8455         (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
8456         to the regcache.
8457         (fast_tracepoint_from_jump_pad_address): New.
8458         (fast_tracepoint_from_ipa_tpoint_address): New.
8459         (collecting_t): New.
8460         (force_unlock_trace_buffer): New.
8461         (fast_tracepoint_collecting): New.
8462         (collecting): New.
8463         (gdb_collect): New.
8464         (write_inferior_data_ptr): New.
8465         (target_tp_heap): New.
8466         (target_malloc): New.
8467         (download_agent_expr): New.
8468         (UALIGN): New.
8469         (download_tracepoints): New.
8470         (download_trace_state_variables): New.
8471         (upload_fast_traceframes): New.
8472         (IPA_FIRST_TRACEFRAME): New.
8473         (IPA_NEXT_TRACEFRAME_1): New.
8474         (IPA_NEXT_TRACEFRAME): New.
8475         [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
8476         [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
8477         (gdb_jump_pad_buffer_end): New.
8478         [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
8479         (initialize_tracepoint): Adjust.
8480         [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
8481         buffer.  Initialize the low module.
8482         * utils.c (PREFIX, TOOLNAME): New.
8483         (malloc_failure): Use PREFIX.
8484         (error): In the IPA, an error causes an exit.
8485         (fatal, warning): Use PREFIX.
8486         (internal_error): Use TOOLNAME.
8487         (NUMCELLS): Increase to 10.
8488         * configure, config.in: Regenerate.
8489
8490 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
8491
8492         * server.c (handle_query) <qSupported>: Do two passes over the
8493         qSupported string to avoid nesting strtok.
8494
8495 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
8496
8497         * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
8498         (CDEPS): New.
8499         * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping.  Test also
8500         -Wl,--dynamic-list.
8501         * configure: Regenerate.
8502         * proc-service.list: New.
8503
8504 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
8505
8506         * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
8507         New comment.
8508
8509 2010-05-26  Ozkan Sezer  <sezeroz@gmail.com>
8510
8511         * gdbreplay.c (remote_open): Check error return from socket() call by
8512         its equality to -1 not by it being negative.
8513         * remote-utils.c (remote_open): Likewise.
8514
8515 2010-05-23  Pedro Alves  <pedro@codesourcery.com>
8516
8517         * config.h: Regenerate.
8518
8519 2010-05-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
8520
8521         * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8522         doesn't provide PTRACE_GET_THREAD_AREA.
8523
8524 2010-05-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
8525
8526         * linux-m68k-low.c: Include <asm/ptrace.h>
8527         (ps_get_thread_area): Implement.
8528
8529 2010-05-03  Doug Evans  <dje@google.com>
8530
8531         * event-loop.c (struct callback_event): New struct.
8532         (callback_list): New global.
8533         (append_callback_event, delete_callback_event): New functions.
8534         (process_callback): New function.
8535         (start_event_loop): Call it.
8536         * remote-utils.c (NOT_SCHEDULED): Define.
8537         (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8538         moved out of readchar.
8539         (readchar): Rewrite.  Call reschedule before returning.
8540         (reset_readchar): New function.
8541         (remote_close): Call it.
8542         (process_remaining, reschedule): New functions.
8543         * server.h (callback_handler_func): New typedef.
8544         (append_callback_event, delete_callback_event): Declare.
8545
8546 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
8547
8548         * proc-service.c (ps_pglobal_lookup): Use
8549         thread_db_look_up_one_symbol.
8550         * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8551         parameter.  Use it instead of all_symbols_looked_up.
8552         * server.h (struct process_info) <all_symbols_looked_up>: Delete
8553         field.
8554         (all_symbols_looked_up): Don't declare.
8555         (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8556         * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8557         field.
8558         (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8559         Set all_symbols_looked_up here.
8560         (thread_db_look_up_one_symbol): New.
8561         (thread_db_get_tls_address): Adjust.
8562         (thread_db_load_search, try_thread_db_load_1): Always allocate the
8563         thread_db object on the heap, and tentatively set it in the
8564         process structure.
8565         (thread_db_init): Don't set all_symbols_looked_up here.
8566         * linux-low.h (thread_db_look_up_one_symbol): Declare.
8567
8568 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
8569
8570         * linux-low.c (linux_kill, linux_detach): Adjust.
8571         (status_pending_p_callback): Remove redundant statement.  Check
8572         for !TARGET_WAITIKIND_IGNORE, instead of
8573         TARGET_WAITKIND_STOPPED.
8574         (handle_tracepoints): Make sure LWP is locked.  Adjust.
8575         (linux_wait_for_event_1): Adjust.
8576         (linux_cancel_breakpoints): New.
8577         (unsuspend_one_lwp): New.
8578         (unsuspend_all_lwps): New.
8579         (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8580         (send_sigstop_callback): Change return type to int, add new
8581         `except' parameter and handle it.
8582         (suspend_and_send_sigstop_callback): New.
8583         (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8584         pass them down.  If SUSPEND, also increment the lwp's suspend
8585         count.
8586         (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8587         (need_step_over_p): Don't consider suspended LWPs.
8588         (start_step_over): Adjust.
8589         (proceed_one_lwp): Change return type to int, add new `except'
8590         parameter and handle it.
8591         (unsuspend_and_proceed_one_lwp): New.
8592         (proceed_all_lwps): Use find_inferior instead of
8593         for_each_inferior.
8594         (unstop_all_lwps): Add `unsuspend' parameter.  If UNSUSPEND, them
8595         also decrement the suspend count of LWPs.  Pass `except' down,
8596         instead of hacking its suspend count.
8597         (linux_pause_all): Add `freeze' parameter.  Adjust.
8598         (linux_unpause_all): New.
8599         (linux_target_ops): Install linux_unpause_all.
8600         * server.c (handle_status): Adjust.
8601         * target.h (struct target_ops): New fields `unpause_all' and
8602         `cancel_breakpoints'.  Add new parameter to `pause_all'.
8603         (pause_all): Add new `freeze' parameter.
8604         (unpause_all): New.
8605         (cancel_breakpoints): New.
8606         * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8607         cancel breakpoints.
8608         (cmd_qtstart): Pause threads.
8609         (stop_tracing): Pause threads, and cancel breakpoints.
8610         * win32-low.c (win32_target_ops): Adjust.
8611
8612 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
8613
8614         * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8615         the inferior right away from here...
8616         (linux_wait_1): ... to here, and adjust to check the thread's
8617         last_resume_kind instead of the lwp's step or stop_expected flags.
8618
8619 2010-05-02  Pedro Alves  <pedro@codesourcery.com>
8620
8621         * README: Use consistent `GDB' and `GDBserver' spellings.
8622
8623 2010-05-02  Pedro Alves  <pedro@codesourcery.com>
8624
8625         * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8626         (linux_kill): Stop all lwps here.  Don't delete the main lwp here.
8627         (linux_detach_one_lwp): Assume the lwp is stopped.
8628         (any_thread_of): Delete.
8629         (linux_detach): Stop all lwps here.  Don't blindly delete all
8630         breakpoints.
8631         (delete_lwp_callback): New.
8632         (linux_mourn): Delete all lwps of the process that is gone.
8633         (linux_wait_1): Don't delete the last lwp of the process here.
8634         * mem-break.h (mark_breakpoints_out): Declare.
8635         * mem-break.c (mark_breakpoints_out): New.
8636         (free_all_breakpoints): Use it.
8637         * server.c (handle_target_event): If the process is gone, mark
8638         breakpoints out.
8639         * thread-db.c (struct thread_db) <create_bp>: New field.
8640         (thread_db_enable_reporting): Fix prototype.  Store a thread event
8641         breakpoint reference in the thread_db struct.
8642         (thread_db_load_search): Clear the thread_db object.
8643         (try_thread_db_load_1): Ditto.
8644         (switch_to_process): New.
8645         (disable_thread_event_reporting): Use it.
8646         (remove_thread_event_breakpoints): New.
8647         (thread_db_detach, thread_db_mourn): Use it.
8648
8649 2010-05-01  Pedro Alves  <pedro@codesourcery.com>
8650
8651         * linux-low.c (linux_enable_event_reporting): New.
8652         (linux_wait_for_event_1, handle_extended_wait): Use it.
8653
8654 2010-04-30  Pedro Alves  <pedro@codesourcery.com>
8655
8656         * linux-low.c (linux_kill_one_lwp, linux_kill)
8657         (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8658         (send_sigstop): Take an lwp_info as parameter instead.  Queue a
8659         SIGSTOP even if the LWP is stopped.
8660         (send_sigstop_callback): New.
8661         (stop_all_lwps): Use send_sigstop_callback instead.
8662         (linux_resume_one_thread): Adjust.
8663         (proceed_one_lwp): Still proceed an LWP that the client has
8664         requested to stop, if we haven't reported it as stopped yet.  Make
8665         sure that LWPs the client want stopped, have a pending SIGSTOP.
8666
8667 2010-04-26  Doug Evans  <dje@google.com>
8668
8669         * server.c (handle_general_set): Make static.
8670
8671         * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8672         Print received char after testing for error/eof instead of before.
8673         (input_interrupt): Tweak comment.
8674
8675 2010-04-23  Doug Evans  <dje@google.com>
8676
8677         * server.c (start_inferior): Print inferior argv if --debug.
8678
8679 2010-04-21  Aleksandar Ristovski  <aristovski@qnx.com>
8680
8681         * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8682         * nto-x86-low.c: Include server.h
8683
8684 2010-04-20  Pierre Muller  <muller@ics.u-strasbg.fr>
8685
8686         * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8687         be consistent with other sources of this directory.
8688         (init_registers_amd64): Correct name of source file of this function
8689         in the comment.
8690
8691 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
8692
8693         * configure.srv (x86_64-*-mingw*): New configuration for Windows
8694         64-bit executables.
8695
8696 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
8697
8698         * win32-i386-low.c: Add 64-bit support.
8699         (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8700         (init_registers_amd64): Declare.
8701         (mappings): Add 64-bit version of array.
8702         (init_windows_x86): New function.
8703         (the_low_target): Change init_arch field to init_windows_x86.
8704
8705 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
8706
8707         * win32-low.c: Adapt to support also 64-bit architecture.
8708         (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8709         (get_image_name): Use SIZE_T type for local variable `done'.
8710         (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8711         (toolhelp_get_dll_name): Idem.
8712         (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8713         Use uintptr_t typecast to avoid warning.
8714         (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8715         (handle_exception): Use phex_nz to avoid warning.
8716         (win32_wait): Remove unused local variable `process'.
8717
8718 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
8719
8720         * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8721         `amd64-avx.o'.
8722
8723 2010-04-17  Pierre Muller  <muller@ics.u-strasbg.fr>
8724
8725         * configure.ac: Use `ws2_32' library for srv_mingw.
8726         * configure: Regenerate.
8727         * gdbreplay.c: Include winsock2.h instead of winsock.h.
8728         * remote-utils.c: Likewise.
8729
8730 2010-04-17  H.J. Lu  <hongjiu.lu@intel.com>
8731
8732         * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8733         if __x86_64__ is defined.
8734
8735 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
8736
8737         * configure: Regenerate.
8738
8739 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
8740
8741         * server.c (handle_query): Handle 'qGetTIBAddr' query.
8742         * target.h (target_ops): New get_tib_address field.
8743         * win32-low.h (win32_thread_info): Add thread_local_base field.
8744         * win32-low.c (child_add_thread): Add tlb argument.
8745         Set thread_local_base field to TLB.
8746         (get_child_debug_event): Adapt to child_add_thread change.
8747         (win32_get_tib_address): New function.
8748         (win32_target_ops): Set get_tib_address field to
8749         win32_get_tib_address.
8750         * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8751
8752 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
8753
8754         * linux-low.c (linux_mourn): Also remove the process.
8755         * server.c (handle_target_event): Don't remove the process here.
8756         * nto-low.c (nto_mourn): New.
8757         (nto_target_ops): Install it.
8758         * spu-low.c (spu_mourn): New.
8759         (spu_target_ops): Install it.
8760         * win32-low.c (win32_mourn): New.
8761         (win32_target_ops): Install it.
8762
8763 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
8764
8765         * server.h (buffer_xml_printf): Remove redundant `;'.
8766
8767 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
8768
8769         * regcache.c (set_register_cache): Invalidate regcaches before
8770         changing the register cache layout.
8771         (regcache_invalidate_one): Allow a NULL regcache.
8772         * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8773         regcaches before changing the register cache layout or the target
8774         regsets.
8775
8776 2010-04-12  H.J. Lu  <hongjiu.lu@intel.com>
8777
8778         * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8779         variable warning on Linux/x86-64.
8780
8781 2010-04-11  Pedro Alves  <pedro@codesourcery.com>
8782
8783         GDBserver disconnected tracing support.
8784
8785         * linux-low.c (linux_remove_process): Delete.
8786         (add_lwp): Don't set last_resume_kind here.
8787         (linux_kill): Use `mourn'.
8788         (linux_detach): Use `thread_db_detach', and `mourn'.
8789         (linux_mourn): New.
8790         (linux_attach_lwp_1): Adjust comment.
8791         (linux_attach): last_resume_kind moved the thread_info; adjust.
8792         (status_pending_p_callback): Adjust.
8793         (linux_wait_for_event_1): Adjust.
8794         (count_events_callback, select_singlestep_lwp_callback)
8795         (select_event_lwp_callback, cancel_breakpoints_callback)
8796         (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8797         (proceed_one_lwp): Adjust.
8798         (linux_async): Add debug output.
8799         (linux_thread_stopped): New.
8800         (linux_pause_all): New.
8801         (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8802         linux_pause_all.
8803         * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8804         (thread_db_free): Delete declaration.
8805         (thread_db_detach, thread_db_mourn): Declare.
8806         * thread-db.c (thread_db_init): Use thread_db_mourn.
8807         (thread_db_free): Delete, split in two.
8808         (disable_thread_event_reporting): New.
8809         (thread_db_detach): New.
8810         (thread_db_mourn): New.
8811
8812         * server.h (struct thread_info) <last_resume_kind>: New field.
8813         <attached>: Add comment.
8814         <gdb_detached>: New field.
8815         (handler_func): Change return type to int.
8816         (handle_serial_event, handle_target_event): Ditto.
8817         (gdb_connected): Declare.
8818         (tracing): Delete.
8819         (disconnected_tracing): Declare.
8820         (stop_tracing): Declare.
8821
8822         * server.c (handle_query) <qSupported>: Report support for
8823         disconnected tracing.
8824         (queue_stop_reply_callback): Account for running threads.
8825         (gdb_wants_thread_stopped): New.
8826         (gdb_wants_all_threads_stopped): New.
8827         (gdb_reattached_process): New.
8828         (handle_status): Clear the `gdb_detached' flag of all processes.
8829         In all-stop, stop all threads.
8830         (main): Be sure to leave tfind mode.  Handle disconnected tracing.
8831         (process_serial_event): If the remote connection breaks, or if an
8832         exit was forced with "monitor exit", force an event loop exit.
8833         Handle disconnected tracing on detach.
8834         (handle_serial_event): Adjust.
8835         (handle_target_event): If GDB isn't connected, forward events back
8836         to the inferior, unless the last process exited, in which case,
8837         exit gdbserver.  Adjust interface.
8838
8839         * remote-utils.c (remote_open): Don't block in accept.  Instead
8840         register an event loop source on the listen socket file
8841         descriptor.  Refactor bits into ...
8842         (listen_desc): ... this new global.
8843         (gdb_connected): ... this new function.
8844         (enable_async_notification): ... this new function.
8845         (handle_accept_event): ... this new function.
8846         (remote_close): Clear remote_desc.
8847
8848         * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8849
8850         * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8851         New fields.
8852         (mourn_inferior): Define.
8853         (target_process_qsupported): Avoid the dangling else problem.
8854         (thread_stopped): Define.
8855         (pause_all): Define.
8856         (target_waitstatus_to_string): Declare.
8857         * target.c (target_waitstatus_to_string): New.
8858
8859         * tracepoint.c (tracing): Make extern.
8860         (disconnected_tracing): New.
8861         (stop_tracing): Make extern.  Handle tracing stops due to GDB
8862         disconnecting.
8863         (cmd_qtdisconnected): New.
8864         (cmd_qtstatus): Report disconnected tracing status in trace reply.
8865         (handle_tracepoint_general_set): Handle QTDisconnected.
8866
8867         * event-loop.c (event_handler_func): Change return type to int.
8868         (process_event): Bail out if the event handler wants the event
8869         loop to stop.
8870         (handle_file_event): Ditto.
8871         (start_event_loop): Bail out if the event handler wants the event
8872         loop to stop.
8873
8874         * nto-low.c (nto_target_ops): Adjust.
8875         * spu-low.c (spu_wait): Don't remove the process here.
8876         (spu_target_ops): Adjust.
8877         * win32-low.c (win32_wait): Don't remove the process here.
8878         (win32_target_ops): Adjust.
8879
8880 2010-04-11  Pedro Alves  <pedro@codesourcery.com>
8881
8882         * regcache.c (realloc_register_cache): Invalidate inferior's
8883         regcache before recreating it.
8884
8885 2010-04-09  Pedro Alves  <pedro@codesourcery.com>
8886
8887         * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8888
8889 2010-04-09  Stan Shebs  <stan@codesourcery.com>
8890             Pedro Alves  <pedro@codesourcery.com>
8891
8892         * server.h (LONGEST): New.
8893         (struct thread_info) <while_stepping>: New field.
8894         (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8895         Declare.
8896         (initialize_tracepoint, handle_tracepoint_general_set)
8897         (handle_tracepoint_query, tracepoint_finished_step)
8898         (tracepoint_was_hit, release_while_stepping_state_list):
8899         (current_traceframe): Declare.
8900         * server.c (handle_general_set): Handle tracepoint packets.
8901         (read_memory): New.
8902         (write_memory): New.
8903         (handle_search_memory_1): Use read_memory.
8904         (handle_query): Report support for conditional tracepoints, trace
8905         state variables, and tracepoint sources.  Handle tracepoint
8906         queries.
8907         (main): Initialize the tracepoints module.
8908         (process_serial_event): Handle traceframe reads/writes.
8909
8910         * linux-low.c (handle_tracepoints): New.
8911         (linux_wait_1): Call it.
8912         (linux_resume_one_lwp): Handle while-stepping.
8913         (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8914         (linux_target_ops): Install them.
8915         * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8916         New field.
8917         * linux-x86-low.c (x86_supports_tracepoints): New.
8918         (the_low_target). Install it.
8919
8920         * mem-break.h (delete_breakpoint): Declare.
8921         * mem-break.c (delete_breakpoint): Make external.
8922
8923         * target.h (struct target_ops): Add `supports_tracepoints',
8924         `read_pc', and `write_pc' fields.
8925         (target_supports_tracepoints): Define.
8926         * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8927         (phex_nz): New.
8928
8929         * regcache.h (struct regcache) <registers_owned>: New field.
8930         (init_register_cache, regcache_cpy): Declare.
8931         (regcache_read_pc, regcache_write_pc): Declare.
8932         (register_cache_size): Declare.
8933         (supply_regblock): Declare.
8934         * regcache.c (init_register_cache): New.
8935         (new_register_cache): Use it.
8936         (regcache_cpy): New.
8937         (register_cache_size): New.
8938         (supply_regblock): New.
8939         (regcache_read_pc, regcache_write_pc): New.
8940
8941         * tracepoint.c: New.
8942
8943         * Makefile.in (OBS): Add tracepoint.o.
8944         (tracepoint.o): New rule.
8945
8946 2010-04-08  H.J. Lu  <hongjiu.lu@intel.com>
8947
8948         * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8949         (i386-mmx.o): New.
8950         (i386-mmx.c): Likewise.
8951         (i386-mmx-linux.o): Likewise.
8952         (i386-mmx-linux.c): Likewise.
8953
8954         * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8955         (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8956         (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8957         (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8958
8959         * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8960         (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8961         and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8962
8963 2010-04-07  H.J. Lu  <hongjiu.lu@intel.com>
8964
8965         * Makefile.in (clean): Updated.
8966         (i386-avx.o): New.
8967         (i386-avx.c): Likewise.
8968         (i386-avx-linux.o): Likewise.
8969         (i386-avx-linux.c): Likewise.
8970         (amd64-avx.o): Likewise.
8971         (amd64-avx.c): Likewise.
8972         (amd64-avx-linux.o): Likewise.
8973         (amd64-avx-linux.c): Likewise.
8974
8975         * configure.srv (srv_i386_regobj): Add i386-avx.o.
8976         (srv_i386_linux_regobj): Add i386-avx-linux.o.
8977         (srv_amd64_regobj): Add amd64-avx.o.
8978         (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8979         (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8980         (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8981         (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8982         (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8983         (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8984         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8985
8986         * i387-fp.c: Include "i386-xstate.h".
8987         (i387_xsave): New.
8988         (i387_cache_to_xsave): Likewise.
8989         (i387_xsave_to_cache): Likewise.
8990         (x86_xcr0): Likewise.
8991
8992         * i387-fp.h (i387_cache_to_xsave): Likewise.
8993         (i387_xsave_to_cache): Likewise.
8994         (x86_xcr0): Likewise.
8995
8996         * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8997         * linux-crisv32-low.c (target_regsets): Likewise.
8998         * linux-m68k-low.c (target_regsets): Likewise.
8999         * linux-mips-low.c (target_regsets): Likewise.
9000         * linux-ppc-low.c (target_regsets): Likewise.
9001         * linux-s390-low.c (target_regsets): Likewise.
9002         * linux-sh-low.c (target_regsets): Likewise.
9003         * linux-sparc-low.c (target_regsets): Likewise.
9004         * linux-xtensa-low.c (target_regsets): Likewise.
9005
9006         * linux-low.c: Include <sys/uio.h>.
9007         (regsets_fetch_inferior_registers): Support nt_type.
9008         (regsets_store_inferior_registers): Likewise.
9009         (linux_process_qsupported): New.
9010         (linux_target_ops): Add linux_process_qsupported.
9011
9012         * linux-low.h (regset_info): Add nt_type.
9013         (linux_target_ops): Add process_qsupported.
9014
9015         * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
9016         and <sys/uio.h>.
9017         (init_registers_i386_avx_linux): New.
9018         (init_registers_amd64_avx_linux): Likewise.
9019         (xmltarget_i386_linux_no_xml): Likewise.
9020         (xmltarget_amd64_linux_no_xml): Likewise.
9021         (PTRACE_GETREGSET): Likewise.
9022         (PTRACE_SETREGSET): Likewise.
9023         (x86_fill_xstateregset): Likewise.
9024         (x86_store_xstateregset): Likewise.
9025         (use_xml): Likewise.
9026         (x86_linux_update_xmltarget): Likewise.
9027         (x86_linux_process_qsupported): Likewise.
9028         (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
9029         (x86_arch_setup): Don't call init_registers_amd64_linux nor
9030         init_registers_i386_linux here.  Call
9031         x86_linux_update_xmltarget.
9032         (the_low_target): Add x86_linux_process_qsupported.
9033
9034         * server.c (handle_query): Call target_process_qsupported.
9035
9036         * target.h (target_ops): Add process_qsupported.
9037         (target_process_qsupported): New.
9038
9039 2010-04-03  Pedro Alves  <pedro@codesourcery.com>
9040
9041         * inferiors.c (add_thread): Set last_status kind to
9042         TARGET_WAITKIND_IGNORE.
9043         * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
9044         fetch.  Use ptid_of.  Avoid unnecessary get_lwp_thread calls.
9045         (linux_wait_1): Move `thread' local definition to block that uses
9046         it.  Don't NULL initialize `event_child'.
9047         (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
9048         Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
9049         * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
9050
9051 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
9052
9053         * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
9054         an extended waitstatus, or by a watchpoint.
9055         (cancel_breakpoints_callback): Don't cancel a breakpoint if the
9056         thread was stepping or has been stopped by a watchpoint.
9057
9058 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
9059
9060         * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
9061         (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
9062         of another, then delete the previous, and validate all
9063         breakpoints.
9064         (validate_inserted_breakpoint): New.
9065         (delete_disabled_breakpoints): New.
9066         (validate_breakpoints): New.
9067         (check_mem_read): Validate breakpoints before trusting their
9068         shadow.  Delete disabled breakpoints.
9069         (check_mem_write): Validate breakpoints before trusting they
9070         should be inserted.  Delete disabled breakpoints.
9071         * mem-break.h (validate_breakpoints):
9072         * server.c (handle_query): Validate breakpoints when we see a
9073         qSymbol query.
9074
9075 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
9076
9077         * linux-low.c (linux_wait_1): Avoid setting need_step_over is
9078         there's a GDB breakpoint at stop_pc.  Always report a trap to GDB
9079         if we could tell there's a GDB breakpoint at stop_pc.
9080         (need_step_over_p): Don't do a step over if we find a GDB
9081         breakpoint at the resume PC.
9082
9083         * mem-break.c (struct raw_breakpoint): New.
9084         (enum bkpt_type): New type `gdb_breakpoint'.
9085         (struct breakpoint): Delete the `PC', `old_data' and `inserted'
9086         fields.  New field `raw'.
9087         (find_raw_breakpoint_at): New.
9088         (set_raw_breakpoint_at): Handle refcounting.  Create a raw
9089         breakpoint instead.
9090         (set_breakpoint_at): Adjust.
9091         (delete_raw_breakpoint): New.
9092         (release_breakpoint): New.
9093         (delete_breakpoint): Rename to...
9094         (delete_breakpoint_1): ... this.  Add proc parameter.  Use
9095         release_breakpoint.  Return ENOENT.
9096         (delete_breakpoint): Reimplement.
9097         (find_breakpoint_at): Delete.
9098         (find_gdb_breakpoint_at): New.
9099         (delete_breakpoint_at): Delete.
9100         (set_gdb_breakpoint_at): New.
9101         (delete_gdb_breakpoint_at): New.
9102         (gdb_breakpoint_here): New.
9103         (set_reinsert_breakpoint): Use release_breakpoint.
9104         (uninsert_breakpoint): Rename to ...
9105         (uninsert_raw_breakpoint): ... this.
9106         (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
9107         (reinsert_raw_breakpoint): Change parameter type to
9108         raw_breakpoint.
9109         (reinsert_breakpoints_at): Adjust to handle raw breakpoints
9110         instead.
9111         (check_breakpoints): Adjust.  Use release_breakpoint.
9112         (breakpoint_here): Rewrite using find_raw_breakpoint_at.
9113         (breakpoint_inserted_here): Ditto.
9114         (check_mem_read): Adjust to iterate over raw breakpoints instead.
9115         Don't trust the breakpoint's shadow if it is not inserted.
9116         (check_mem_write): Adjust to iterate over raw breakpoints instead.
9117         (delete_all_breakpoints): Adjust.
9118         (free_all_breakpoints): Mark all breakpoints as uninserted, and
9119         use delete_breakpoint_1.
9120
9121         * mem-break.h (breakpoints_supported): Delete declaration.
9122         (set_gdb_breakpoint_at): Declare.
9123         (gdb_breakpoint_here): Declare.
9124         (delete_breakpoint_at): Delete.
9125         (delete_gdb_breakpoint_at): Declare.
9126
9127         * server.h (struct raw_breakpoint): Forward declare.
9128         (struct process_info): New field `raw_breakpoints'.
9129
9130         * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
9131         breakpoints.
9132
9133 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
9134
9135         * linux-low.c (status_pending_p_callback): Fix comment.
9136         (linux_wait_for_event_1): Move most of the internal breakpoint
9137         handling from here...
9138         (linux_wait_1): ... to here.
9139         (count_events_callback): New.
9140         (select_singlestep_lwp_callback): New.
9141         (select_event_lwp_callback): New.
9142         (cancel_breakpoints_callback): New.
9143         (select_event_lwp): New.
9144         (linux_wait_1): Simplify internal breakpoint handling.  Give equal
9145         priority to all LWPs that have had events that should be reported
9146         to the client.  Cancel breakpoints when about to reporting the
9147         event to the client, not while stopping lwps.  No longer cancel
9148         finished single-steps here.
9149         (cancel_finished_single_step): Delete.
9150         (cancel_finished_single_steps): Delete.
9151
9152 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
9153
9154         * mem-break.c (enum bkpt_type): New.
9155         (struct breakpoint): New field `type'.
9156         (set_breakpoint_at): Change return type to struct breakpoint
9157         pointer.  Set type to `other_breakpoint' by default.
9158         (delete_breakpoint): Rewrite, supporting more than one breakpoint
9159         in the breakpoint list.
9160         (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
9161         (reinsert_breakpoint): Rename to ...
9162         (reinsert_raw_breakpoint): ... this.
9163         (reinsert_breakpoints_at): Adjust.
9164         * mem-break.h (struct breakpoint): Declare.
9165         (set_breakpoint_at): Change return type to struct breakpoint
9166         pointer.
9167
9168 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
9169
9170         * server.c (handle_query): Assign, not compare.
9171
9172 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
9173
9174         Teach linux gdbserver to step-over-breakpoints.
9175
9176         * linux-low.c (can_hardware_single_step): New.
9177         (supports_breakpoints): New.
9178         (handle_extended_wait): If stopping threads, read the stop pc of
9179         the new cloned LWP.
9180         (get_pc): New.
9181         (get_stop_pc): Add `lwp' parameter.  Handle it.  Bail out if the
9182         low target doesn't support retrieving the PC.
9183         (add_lwp): Set last_resume_kind to resume_continue.
9184         (linux_attach_lwp_1): Adjust comments.  Always set stop_expected.
9185         (linux_attach): Don't clear stop_expected.  Set the lwp's
9186         last_resume_kind to resume_stop.
9187         (linux_detach_one_lwp): Don't check for removed breakpoints.
9188         (check_removed_breakpoint): Delete.
9189         (status_pending_p): Rename to ...
9190         (status_pending_p_callback): ... this.  Don't check for removed
9191         breakpoints.  Don't consider threads that are stopped from GDB's
9192         perspective.
9193         (linux_wait_for_lwp): Always read the stop_pc here.
9194         (cancel_breakpoint): New.
9195         (step_over_bkpt): New global.
9196         (linux_wait_for_event_1): Implement stepping over breakpoints.
9197         (gdb_wants_lwp_stopped): New.
9198         (gdb_wants_all_stopped): New.
9199         (linux_wait_1): Tag threads as gdb-wants-stopped.  Cancel finished
9200         single-step traps here.  Store the thread's last reported target
9201         wait status.
9202         (send_sigstop): Don't clear stop_expected.  Always set it,
9203         instead.
9204         (mark_lwp_dead): Remove reference to pending_is_breakpoint.
9205         (cancel_finished_single_step): New.
9206         (cancel_finished_single_steps): New.
9207         (wait_for_sigstop): Don't cancel finished single-step traps here.
9208         (linux_resume_one_lwp): Don't check for removed breakpoints.
9209         Don't set `step' on non-hardware step archs.
9210         (linux_set_resume_request): Ignore resume_stop requests if already
9211         stopping or stopped.  Set the lwp's last_resume_kind.
9212         (resume_status_pending_p): Don't check for removed breakpoints.
9213         (need_step_over_p): New.
9214         (start_step_over): New.
9215         (finish_step_over): New.
9216         (linux_resume_one_thread): Always queue a sigstop for resume_stop
9217         requests.  Clear the thread's last reported target waitstatus.
9218         Don't use the `suspended' flag.  Don't consider pending breakpoints.
9219         (linux_resume): Start a step-over if necessary.
9220         (proceed_one_lwp): New.
9221         (proceed_all_lwps): New.
9222         (unstop_all_lwps): New.
9223         * linux-low.h (struct lwp_info): Rewrite comment for the
9224         `suspended' flag.  Add the `stop_pc' field.  Delete the
9225         `pending_stop_pc' field.  Tweak the `stepping' flag's comment.
9226         Add `'last_resume_kind' and `need_step_over' fields.
9227         * inferiors.c (struct thread_info): Delete, moved elsewhere.
9228         * mem-break.c (struct breakpoint): Delete `reinserting' flag.
9229         Delete `breakpoint_to_reinsert' field.  New flag `inserted'.
9230         (set_raw_breakpoint_at): New.
9231         (set_breakpoint_at): Rewrite to use it.
9232         (reinsert_breakpoint_handler): Delete.
9233         (set_reinsert_breakpoint): New.
9234         (reinsert_breakpoint_by_bp): Delete.
9235         (delete_reinsert_breakpoints): New.
9236         (uninsert_breakpoint): Rewrite.
9237         (uninsert_breakpoints_at): New.
9238         (reinsert_breakpoint): Rewrite.
9239         (reinsert_breakpoints_at): New.
9240         (check_breakpoints): Rewrite.
9241         (breakpoint_here): New.
9242         (breakpoint_inserted_here): New.
9243         (check_mem_read): Adjust.
9244         * mem-break.h (breakpoints_supported, breakpoint_here)
9245         (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
9246         (reinsert_breakpoint_by_bp): Delete declaration.
9247         (delete_reinsert_breakpoints): Declare.
9248         (reinsert_breakpoint): Delete declaration.
9249         (reinsert_breakpoints_at): Declare.
9250         (uninsert_breakpoint): Delete declaration.
9251         (uninsert_breakpoints_at): Declare.
9252         (check_breakpoints): Adjust prototype.
9253         * server.h: Adjust include order.
9254         (struct thread_info): Declare here.  Add a `last_status' field.
9255
9256 2010-03-23  Michael Snyder  <msnyder@vmware.com>
9257
9258         * server.c (crc32): New function.
9259         (handle_query): Add handling for 'qCRC:' request.
9260
9261 2010-03-23  Pedro Alves  <pedro@codesourcery.com>
9262
9263         * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
9264         lwp had been stopped by a watchpoint.
9265
9266 2010-03-16  Pedro Alves  <pedro@codesourcery.com>
9267
9268         * server.h (internal_error): Declare.
9269         (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
9270         * utils.c (internal_error): New function.
9271
9272 2010-03-15  Andreas Schwab  <schwab@redhat.com>
9273
9274         * configure.srv: Fix typo setting srv_regobj.
9275
9276 2010-03-15  Pedro Alves  <pedro@codesourcery.com>
9277
9278         * linux-low.c (fetch_register): Avoid passing a non string literal
9279         format to `error'.
9280         (usr_store_inferior_registers): Ditto.
9281
9282 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
9283
9284         * linux-low.c (linux_write_memory): Bail out early if peeking
9285         memory failed.
9286
9287 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
9288
9289         * linux-low.h (struct lwp_info): New fields
9290         `stopped_by_watchpoint' and `stopped_data_address'.
9291         * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
9292         here, and cache them in the lwp object.
9293         (wait_for_sigstop): Check stopped_by_watchpoint lwp field
9294         directly.
9295         (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
9296         field.
9297         (linux_stopped_by_watchpoint): Rewrite.
9298         (linux_stopped_data_address): Rewrite.
9299
9300 2010-03-06  Simo Melenius  <simo.melenius@iki.fi>
9301
9302         * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
9303         switching the current inferior, not before.
9304
9305 2010-03-01  H.J. Lu  <hongjiu.lu@intel.com>
9306
9307         * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
9308         reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
9309         i386-linux.c and amd64-linux.c.
9310         (reg-i386.o): Removed.
9311         (reg-i386.c): Likewise.
9312         (reg-i386-linux.o): Likewise.
9313         (reg-i386-linux.c): Likewise.
9314         (reg-x86-64.o): Likewise.
9315         (reg-x86-64.c): Likewise.
9316         (reg-x86-64-linux.o): Likewise.
9317         (reg-x86-64-linux.c): Likewise.
9318         (i386.o): New.
9319         (i386.c): Likewise.
9320         (i386-linux.o): Likewise.
9321         (i386-linux.c): Likewise.
9322         (amd64.o): Likewise.
9323         (amd64.c): Likewise.
9324         (amd64-linux.o): Likewise.
9325         (amd64-linux.c): Likewise.
9326
9327         * configure.srv (srv_i386_regobj): New.
9328         (srv_i386_linux_regobj): Likewise.
9329         (srv_amd64_regobj): Likewise.
9330         (srv_amd64_linux_regobj): Likewise.
9331         (srv_i386_32bit_xmlfiles): Likewise.
9332         (srv_i386_64bit_xmlfiles): Likewise.
9333         (srv_i386_xmlfiles): Likewise.
9334         (srv_amd64_xmlfiles): Likewise.
9335         (srv_i386_linux_xmlfiles): Likewise.
9336         (srv_amd64_linux_xmlfiles): Likewise.
9337         (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj.  Set
9338         srv_xmlfiles to $srv_i386_xmlfiles.
9339         (i[34567]86-*-mingw32ce*): Likewise.
9340         (i[34567]86-*-mingw*): Likewise.
9341         (i[34567]86-*-nto*): Likewise.
9342         (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
9343         and $srv_amd64_linux_regobj.  Set srv_xmlfiles to
9344         $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
9345         (x86_64-*-linux*): Likewise.
9346
9347         * linux-x86-low.c (init_registers_x86_64_linux): Removed.
9348         (init_registers_amd64_linux): New.
9349         (x86_arch_setup): Replace init_registers_x86_64_linux with
9350         init_registers_amd64_linux.
9351
9352 2010-02-23  Maxim Kuvyrkov  <maxim@codesourcery.com>
9353
9354         * configure.ac: Check for libdl.  If it is not available link against
9355         static libthread_db.
9356         * configure: Regenerate.
9357
9358 2010-02-22  Pedro Alves  <pedro@codesourcery.com>
9359
9360         PR9605
9361
9362         * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
9363         handing a read watchpoint.
9364         (i386_low_insert_watchpoint): Read watchpoints aren't supported.
9365
9366 2010-02-12  Doug Evans  <dje@google.com>
9367
9368         * linux-low.c (linux_supports_tracefork_flag): Document.
9369         (linux_look_up_symbols): Add comment.
9370
9371 2010-02-03  H.J. Lu  <hongjiu.lu@intel.com>
9372
9373         * regcache.c (supply_register): Clear regcache if buf is NULL.
9374
9375 2010-02-02  Nicolas Roche  <roche@sourceware.org>
9376             Joel Brobecker  <brobecker@adacore.com>
9377
9378         * inferiors.c (find_inferior): Add function documentation.
9379         (unloaded_dll): Handle the case where the unloaded dll has not
9380         been previously registered in the dll list.
9381
9382 2010-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
9383
9384         * linux-arm-low.c (thumb_breakpoint_len): Delete.
9385         (thumb2_breakpoint): New.
9386         (arm_breakpoint_at): Check for Thumb-2 breakpoints.
9387
9388 2010-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
9389
9390         * linux-low.c (get_stop_pc): Check for SIGTRAP.
9391         (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
9392         breakpoints.
9393
9394 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
9395
9396         * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
9397
9398 2010-01-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
9399
9400         * linux-s390-low.c (s390_collect_ptrace_register)
9401         (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
9402
9403 2010-01-21  Doug Evans  <dje@google.com>
9404
9405         * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
9406         (PTRACE_ARG4_TYPE): New macro.
9407         (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
9408         (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
9409         (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
9410         (usr_store_inferior_registers): Ditto.
9411         (linux_read_memory, linux_write_memory): Ditto.
9412         (linux_test_for_tracefork): Ditto.
9413
9414         * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
9415         Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
9416
9417 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
9418
9419         * proc-service.c (ps_lgetregs): Don't refetch registers from the
9420         target.
9421
9422 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
9423
9424         * spu-low.c (spu_fetch_registers, spu_store_registers): Change
9425         prototype to take a regcache.  Adjust.
9426
9427 2010-01-20  Pedro Alves  <pedro@codesourcery.com>
9428
9429         * regcache.h (struct thread_info): Forward declare.
9430         (struct regcache): New.
9431         (new_register_cache): Adjust prototype.
9432         (get_thread_regcache): Declare.
9433         (free_register_cache): Adjust prototype.
9434         (registers_to_string, registers_from_string): Ditto.
9435         (supply_register, supply_register_by_name, collect_register)
9436         (collect_register_as_string, collect_register_by_name): Ditto.
9437         * regcache.c (struct inferior_regcache_data): Delete.
9438         (get_regcache): Rename to ...
9439         (get_thread_regcache): ... this.  Adjust.  Switch inferior before
9440         fetching registers.
9441         (regcache_invalidate_one): Adjust.
9442         (regcache_invalidate): Fix prototype.
9443         (new_register_cache): Return the new register cache.
9444         (free_register_cache): Change prototype.
9445         (realloc_register_cache): Adjust.
9446         (registers_to_string): Change prototype to take a regcache.  Adjust.
9447         (registers_from_string): Ditto.
9448         (register_data): Ditto.
9449         (supply_register): Ditto.
9450         (supply_register_by_name): Ditto.
9451         (collect_register): Ditto.
9452         (collect_register_as_string): Ditto.
9453         (collect_register_by_name): Ditto.
9454         * server.c (process_serial_event): Adjust.
9455         * linux-low.h (regset_fill_func, regset_store_func): Change
9456         prototype.
9457         (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
9458         Change prototype.
9459         * linux-low.c (get_stop_pc): Adjust.
9460         (check_removed_breakpoint): Adjust.
9461         (linux_wait_for_event): Adjust.
9462         (linux_resume_one_lwp): Adjust.
9463         (fetch_register): Add regcache parameter.  Adjust.
9464         (usr_store_inferior_registers): Ditto.
9465         (regsets_fetch_inferior_registers): Ditto.
9466         (regsets_store_inferior_registers): Ditto.
9467         (linux_fetch_registers, linux_store_registers): Ditto.
9468         * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
9469         regcache.  Adjust.
9470         (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
9471         Ditto.
9472         * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
9473         prototype to take a regcache.
9474         (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
9475         * remote-utils.c (convert_ascii_to_int, outreg)
9476         (prepare_resume_reply): Change prototype to take a regcache.
9477         Adjust.
9478         * target.h (struct target_ops) <fetch_registers, store_registers>:
9479         Change prototype to take a regcache.
9480         (fetch_inferior_registers, store_inferior_registers): Change
9481         prototype to take a regcache.  Adjust.
9482         * proc-service.c (ps_lgetregs): Adjust.
9483         * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
9484         (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
9485         (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
9486         take a regcache.  Adjust.
9487         * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
9488         (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
9489         (arm_store_vfpregset, arm_get_pc, arm_set_pc):
9490         (arm_breakpoint_at): Change prototype to take a regcache.  Adjust.
9491         * linux-cris-low.c (cris_get_pc, cris_set_pc)
9492         (cris_cannot_fetch_register):
9493         (cris_breakpoint_at): Change prototype to take a regcache.
9494         Adjust.
9495         * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
9496         cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
9497         to take a regcache.  Adjust.
9498         (cris_breakpoint_at, cris_insert_point, cris_remove_point):
9499         Adjust.
9500         * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
9501         take a regcache.  Adjust.
9502         * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
9503         (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
9504         (m68k_set_pc): Change prototype to take a regcache.  Adjust.
9505         * linux-mips-low.c (mips_get_pc):
9506         (mips_set_pc): Change prototype to take a regcache.  Adjust.
9507         (mips_reinsert_addr): Adjust.
9508         (mips_collect_register): Change prototype to take a regcache.
9509         Adjust.
9510         (mips_supply_register):
9511         (mips_collect_register_32bit, mips_supply_register_32bit)
9512         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9513         (mips_store_fpregset): Ditto.
9514         * linux-ppc-low.c (ppc_supply_ptrace_register)
9515         (ppc_supply_ptrace_register): Ditto.
9516         (parse_spufs_run): Adjust.
9517         (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9518         (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9519         (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9520         take a regcache.  Adjust.
9521         * linux-s390-low.c (s390_collect_ptrace_register)
9522         (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9523         (s390_set_pc): Change prototype to take a regcache.  Adjust.
9524         (s390_arch_setup): Adjust.
9525         * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9526         (sh_fill_gregset): Change prototype to take a regcache.  Adjust.
9527         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9528         (sparc_fill_gregset, sparc_store_gregset_from_stack)
9529         (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9530         regcache.  Adjust.
9531         (sparc_breakpoint_at): Adjust.
9532         * linux-xtensa-low.c (xtensa_fill_gregset):
9533         (xtensa_store_gregset):
9534         (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9535         (xtensa_set_pc): Change prototype to take a regcache.  Adjust.
9536         * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9537         prototype to take a regcache.  Adjust.
9538         * win32-arm-low.c (arm_fetch_inferior_register)
9539         (arm_store_inferior_register): Change prototype to take a
9540         regcache.  Adjust.
9541         * win32-i386-low.c (i386_fetch_inferior_register)
9542         (i386_store_inferior_register): Change prototype to take a
9543         regcache.  Adjust.
9544         * win32-low.c (child_fetch_inferior_registers)
9545         (child_store_inferior_registers): Change prototype to take a
9546         regcache.  Adjust.
9547         (win32_wait): Adjust.
9548         (win32_fetch_inferior_registers): Change prototype to take a
9549         regcache.  Adjust.
9550         (win32_store_inferior_registers): Adjust.
9551         * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9552         store_inferior_register>: Change prototype to take a regcache.
9553
9554 2010-01-20  Doug Evans  <dje@google.com>
9555
9556         * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9557         #ifdef.
9558         (linux_wait_for_event1, linux_init_signals): Ditto.
9559         (W_STOPCODE): Provide definition if missing.
9560
9561 2010-01-13  Vladimir Prus  <vladimir@codesourcery.com>
9562
9563         * linux-low.c (linux_core_of_thread): New.
9564         (compare_ints, show_process, list_threads): New.
9565         (linux_qxfer_osdata): Report threads and cores.
9566         (linux_target_op): Register linux_core_of_thread.
9567         * remote-utils.c (prepare_resume_reply): Report the core.
9568         (buffer_xml_printf): Support %d specifier.
9569         * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9570         New.
9571         (handle_query): Handle qXfer:threads.  Announce availability
9572         thereof.
9573         * target.h (struct target_ops): New field core_of_thread.
9574
9575 2010-01-04  Ulrich Weigand  <uweigand@de.ibm.com>
9576
9577         * Makefile.in (clean): Remove new generated files.
9578         (reg-s390.o, reg-s390.c): Remove rules.
9579         (reg-s390x.o, reg-s390x.c): Likewise.
9580         (s390-linux32.o, s390-linux32.c): Add rules.
9581         (s390-linux64.o, s390-linux64.c): Likewise.
9582         (s390x-linux64.o, s390x-linux64.c): Likewise.
9583         * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9584         * linux-s390-low.c: Include <elf.h>.
9585         (HWCAP_S390_HIGH_GPRS): Define if undefined.
9586         (init_registers_s390): Remove prototype.
9587         (init_registers_s390x): Likewise.
9588         (init_registers_s390_linux32): Add prototype.
9589         (init_registers_s390_linux64): Likewise.
9590         (init_registers_s390x_linux64): Likewise.
9591         (s390_num_regs_3264): New define.
9592         (s390_regmap_3264): New global variable.
9593         (s390_cannot_fetch_register): Remove obsolete check.
9594         (s390_cannot_store_register): Likewise.
9595         (s390_collect_ptrace_register): Handle upper/lower register halves.
9596         (s390_supply_ptrace_register): Likewise.
9597         (s390_fill_gregset): Update to register number changes.
9598         (s390_get_hwcap): New routine.
9599         (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9600         Install appropriate regmap and register set.
9601
9602 2010-01-01  Joel Brobecker  <brobecker@adacore.com>
9603
9604         * server.c (gdbserver_version): Update copyright year to 2010.
9605         * gdbreplay.c (gdbreplay_version): Likewise.
9606
9607 2009-12-28  Doug Evans  <dje@google.com>
9608
9609         * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9610         elf/external.h.  Include <elf.h> instead but only if necessary.
9611
9612 2009-12-28  Pedro Alves  <pedro@codesourcery.com>
9613
9614         * linux-low.c (linux_remove_process): Remove `detaching'
9615         parameter.  Don't release/detach from thread_db here.
9616         (linux_kill): Release/detach from thread_db here, ...
9617         (linux_detach): ... and here, before actually detaching.
9618         (linux_wait_1): ... and here, when a process exits.
9619         * thread-db.c (any_thread_of): New.
9620         (thread_db_free): Switch the current inferior to a thread of the
9621         passed in process.
9622
9623 2009-12-21  Doug Evans  <dje@google.com>
9624
9625         * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9626
9627         * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9628         Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9629         warning ifndef __NR_tkill.  Move setting of errno there too.
9630         Delete unnecessary resetting of errno after syscall.
9631         Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9632
9633         * configure.ac: Check for dladdr.
9634         * config.in: Regenerate.
9635         * configure: Regenerate.
9636         * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9637         (try_thread_db_load): Update.
9638
9639         * linux-low.c (my_waitpid): Delete unnecessary prototype.
9640
9641 2009-12-18  Doug Evans  <dje@google.com>
9642
9643         * event-loop.c: Include unistd.h if it exists.
9644
9645         * linux-low.c (my_waitpid): Move definition away from being in
9646         between linux_tracefork_child/linux_test_for_tracefork.
9647
9648         * gdb_proc_service.h (psaddr_t): Fix type.
9649         * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9650         signature to match glibc.
9651
9652 2009-12-16  Doug Evans  <dje@google.com>
9653
9654         * linux-low.c (linux_read_memory): Fix argument to read.
9655
9656 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
9657
9658         * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9659         events, don't leave current_inferior pointing at null.
9660
9661 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
9662
9663         * win32-low.c (LOG): Delete.
9664         (OUTMSG): Output to stderr.
9665         (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9666         on compile time LOG macro.
9667         (win32_wait): Fix debug output.
9668
9669 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
9670
9671         * win32-low.c (win32_add_one_solib): If the dll name is
9672         "ntdll.dll", prepend the system directory to the dll path.
9673
9674 2009-11-17  Daniel Jacobowitz  <dan@codesourcery.com>
9675
9676         * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9677
9678 2009-11-17  Nathan Sidwell  <nathan@codesourcery.com>
9679             Vladimir Prus  <vladimir@codesourcery.com>
9680
9681         * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9682         * configure.ac: Check for __mcoldfire__ and set
9683         gdb_cv_m68k_is_coldfire.
9684         * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9685         reg-cf.o and reg-m68k.o.
9686         * configure: Regenerated.
9687
9688 2009-11-16  Pedro Alves  <pedro@codesourcery.com>
9689
9690         * linux-low.c (linux_remove_process): Add `detaching' parameter.
9691         Pass it to thread_db_free.
9692         (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9693         proper `detaching' argument to linux_remove_process.
9694         * linux-low.h (thread_db_free): Add `detaching' parameter.
9695         * thread-db.c (thread_db_init): Pass false as `detaching' argument
9696         to thread_db_free.
9697         (thread_db_free): Add `detaching' parameter.  Only
9698         call td_ta_clear_event if detaching from process.
9699
9700 2009-11-12  Maxim Kuvyrkov  <maxim@codesourcery.com>
9701
9702         * thread-db.c (thread_db_free): Fix typo.
9703
9704 2009-11-11  Paul Pluzhnikov  <ppluzhnikov@google.com>
9705
9706         PR gdb/10838
9707         * thread-db.c (thread_db_free): Call td_ta_clear_event.
9708
9709 2009-11-03  Nathan Sidwell  <nathan@codesourcery.com>
9710
9711         * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9712         with an i686 compiler.
9713         * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9714         needed.
9715         * configure: Rebuilt.
9716
9717 2009-10-29  Sandra Loosemore  <sandra@codesourcery.com>
9718
9719         PR gdb/10783
9720
9721         * server.c (handle_search_memory_1): Correct read_addr initialization
9722         in loop for searching subsequent chunks.
9723
9724 2009-10-29  Paul Pluzhnikov  <ppluzhnikov@google.com>
9725
9726         * configure.ac: New --with-libthread-db option.
9727         * thread-db.c: Allow direct dependence on libthread_db.
9728         (thread_db_free): Adjust.
9729         * config.in: Regenerate.
9730         * configure: Likewise.
9731
9732 2009-10-28  Paul Pluzhnikov  <ppluzhnikov@google.com>
9733
9734         PR gdb/10757
9735         * thread-db.c (attach_thread): New function.
9736         (maybe_attach_thread): Return success/failure.
9737         (find_new_threads_callback): Adjust.
9738         (thread_db_find_new_threads): Loop until no new threads.
9739
9740 2009-10-13  Pedro Alves  <pedro@codesourcery.com>
9741
9742         * proc-service.c (ps_lgetregs): Formatting.
9743
9744 2009-10-08  Paul Pluzhnikov  <ppluzhnikov@google.com>
9745
9746         * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9747         * configure.ac: Adjust.
9748         * linux-low.h (struct process_info_private): Move members to struct
9749         thread_db.
9750         (thread_db_free, thread_db_handle_monitor_command): New prototype.
9751         * linux-low.c (linux_remove_process): Adjust.
9752         (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9753         * server.c (handle_query): Move code ...
9754         (handle_monitor_command): ... here. New function.
9755         * target.h (struct target_ops): New member.
9756         * thread-db.c (struct thread_db): New.
9757         (libthread_db_search_path): New variable.
9758         (thread_db_create_event, thread_db_enable_reporting)
9759         (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9760         (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9761         (try_thread_db_load_1, dladdr_to_soname): New functions.
9762         (try_thread_db_load, thread_db_load_search): New functions.
9763         (thread_db_init): Search for libthread_db.
9764         (thread_db_free): New function.
9765         (thread_db_handle_monitor_command): Likewise.
9766         * config.in: Regenerate.
9767         * configure: Regenerate.
9768
9769 2009-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
9770
9771         * spu-low.c (spu_kill): Wait for inferior to terminate.
9772         Call clear_inferiors.
9773         (spu_detach): Call clear_inferiors.
9774
9775 2009-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9776
9777         * aclocal.m4: Regenerate.
9778         * config.in: Likewise.
9779         * configure: Likewise.
9780
9781 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
9782
9783         * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9784         (parse_spufs_run): New function.
9785         (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9786         (ppc_breakpoint_at): Handle SPU breakpoints.
9787
9788 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
9789
9790         * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9791         (SPUFS_MAGIC): Define.
9792         (spu_enumerate_spu_ids): New function.
9793         (linux_qxfer_spu): New function.
9794         (linux_target_ops): Install linux_qxfer_spu.
9795
9796 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
9797
9798         * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9799         and powerpc-cell64l.o to srv_regobj.  Add rs6000/powerpc-cell32l.xml
9800         and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9801         * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9802         (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9803         (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9804         * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9805         (init_registers_powerpc_cell32l): Add prototype.
9806         (init_registers_powerpc_cell64l): Likewise.
9807         (ppc_arch_setup): Detect Cell/B.E. architecture.
9808
9809 2009-07-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9810
9811         * Makefile.in (datarootdir): New variable.
9812
9813 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
9814
9815         * linux-low.c (linux_write_memory): Update debugging output.
9816         * Makefile.in (clean): Add new descriptions.
9817         (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9818         (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9819         * configure.srv: Add new files for arm*-*-linux*.
9820         * linux-arm-low.c: Add new declarations.
9821         (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9822         (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9823         (HWCAP_VFPv3D16): New.
9824         (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9825         instead of __IWMMXT__.
9826         (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9827         (arm_arch_setup): New.
9828         (target_regsets): Remove #ifdef.  Add VFP regset.
9829         (the_low_target): Use arm_arch_setup.
9830
9831 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
9832
9833         * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9834         the main thread again.
9835
9836 2009-07-06  Aleksandar Ristovski  <aristovski@qnx.com>
9837
9838         Adding Neutrino gdbserver.
9839         * configure: Regenerated.
9840         * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9841         * configure.srv (i[34567]86-*-nto*): New target.
9842         * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9843         * remote-utils.c [__QNX__]: Include sys/iomgr.h
9844         (nto_comctrl) [__QNX__]: New function.
9845         (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9846
9847 2009-07-05  Danny Backx  <dannybackx@users.sourceforge.net>
9848
9849         * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9850         srv_tgtobj.
9851
9852 2009-07-04  Danny Backx  <dannybackx@users.sourceforge.net>
9853             Pedro Alves  <pedro@codesourcery.com>
9854
9855         * win32-i386-low.c (i386_get_thread_context): Handle systems that
9856         don't support CONTEXT_EXTENDED_REGISTERS.
9857         (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9858         (the_low_target): Install them.
9859         * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9860         failing with ERROR_PIPE_NOT_CONNECTED.
9861
9862 2009-06-30  Doug Evans  <dje@google.com>
9863             Pierre Muller  <muller@ics.u-strasbg.fr>
9864
9865         Add h/w watchpoint support to x86-linux, win32-i386.
9866         * Makefile.in (SFILES): Add i386-low.c
9867         (i386_low_h): Define.
9868         (i386-low.o): Add dependencies.
9869         (linux-x86-low.o): Add i386-low.h dependency.
9870         (win32-i386-low.o): Ditto.
9871         * i386-low.c: New file.
9872         * i386-low.h: New file.
9873         * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9874         (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9875         * linux-low.c (linux_add_process): Initialize arch_private.
9876         (linux_remove_process): Free arch_private.
9877         (add_lwp): Initialize arch_private.
9878         (delete_lwp): Free arch_private.
9879         (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9880         provided.
9881         * linux-low.h (process_info_private): New member arch_private.
9882         (lwp_info): New member arch_private.
9883         (linux_target_ops): New members new_process, new_thread,
9884         prepare_to_resume.
9885         (ptid_of): New macro.
9886         * linux-x86-low.c: Include stddef.h, i386-low.h.
9887         (arch_process_info): New struct.
9888         (arch_lwp_info): New struct.
9889         (x86_linux_dr_get, x86_linux_dr_set): New functions.
9890         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9891         (i386_dr_low_get_status): New function.
9892         (x86_insert_point, x86_remove_point): New functions.
9893         (x86_stopped_by_watchpoint): New function.
9894         (x86_stopped_data_address): New function.
9895         (x86_linux_new_process, x86_linux_new_thread): New functions.
9896         (x86_linux_prepare_to_resume): New function.
9897         (the_low_target): Add entries for insert_point, remove_point,
9898         stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9899         prepare_to_resume.
9900         * server.c (debug_hw_points): New global.
9901         (monitor_show_help): Document set debug-hw-points.
9902         (handle_query): Process "set debug-hw-points".
9903         * server.h (debug_hw_points): Declare.
9904         (paddress): Declare.
9905         * utils.c (NUMCELLS, CELLSIZE): New macros.
9906         (get_sell, xsnprintf, paddress): New functions.
9907         * win32-arm-low.c (the_low_target): Add entries for insert_point,
9908         remove_point, stopped_by_watchpoint, stopped_data_address.
9909         * win32-i386-low.c: Include i386-low.h.
9910         (debug_reg_state): Replaces dr.
9911         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9912         (i386_dr_low_get_status): New function.
9913         (i386_insert_point, i386_remove_point): New functions.
9914         (i386_stopped_by_watchpoint): New function.
9915         (i386_stopped_data_address): New function.
9916         (i386_initial_stuff): Update.
9917         (get_thread_context,set_thread_context,i386_thread_added): Update.
9918         (the_low_target): Add entries for insert_point,
9919         remove_point, stopped_by_watchpoint, stopped_data_address.
9920         * win32-low.c (win32_insert_watchpoint): New function.
9921         (win32_remove_watchpoint): New function.
9922         (win32_stopped_by_watchpoint): New function.
9923         (win32_stopped_data_address): New function.
9924         (win32_target_ops): Add entries for insert_watchpoint,
9925         remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9926         * win32-low.h (win32_target_ops): New members insert_point,
9927         remove_point, stopped_by_watchpoint, stopped_data_address.
9928
9929 2009-06-25  Pedro Alves  <pedro@codesourcery.com>
9930
9931         * server.c (process_serial_event): Re-return unsupported, not
9932         error, if the type isn't recognized.  Re-allow supporting only
9933         insert or remove packets.  Also call require_running for
9934         breakpoints.  Add missing break statement to default case.  Tidy.
9935         * target.h (struct target_ops): Rename insert_watchpoint to
9936         insert_point, and remove_watchpoint to remove_point.
9937
9938         * linux-low.h (struct linux_target_ops): Likewise.
9939         * linux-low.c (linux_insert_watchpoint): Rename to ...
9940         (linux_insert_point): ... this.  Adjust.
9941         (linux_remove_watchpoint): Rename to ...
9942         (linux_remove_point): ... this.  Adjust.
9943         (linux_target_ops): Adjust.
9944         * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9945         (cris_insert_point): ... this.
9946         (cris_remove_watchpoint): Rename to ...
9947         (cris_remove_point): ... this.
9948         (the_low_target): Adjust.
9949
9950 2009-06-24  Pierre Muller  <muller@ics.u-strasbg.fr>
9951
9952         * server.c (handle_v_kill): Pass signal_pid to
9953         kill_inferior if multi_process is zero.
9954
9955 2009-06-23  Aleksandar Ristovski  <aristovski@qnx.com>
9956
9957         * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9958         * target.h (target_ops): Comment for *_watchpoint to make it clear
9959         the functions can get types '0' and '1'.
9960
9961 2009-06-22  Aleksandar Ristovski  <aristovski@qnx.com>
9962
9963         * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9964         * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9965         * regcache.c (get_regcache): Likewise.
9966         * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9967         * win32-low.c (child_fetch_inferior_registers): Remove check for
9968         regno 0.
9969
9970 2009-06-19  Aleksandar Ristovski  <aristovski@qnx.com>
9971             Pedro Alves <pedro@codesourcery.com>
9972
9973         * target.h (struct target_ops) <supports_multi_process>: New
9974         callback.
9975         (target_supports_multi_process): New.
9976         * server.c (handle_query): Even if GDB reports support, only
9977         enable multi-process if the target also supports it.  Report
9978         multi-process support only if the target backend supports it.
9979         * linux-low.c (linux_supports_multi_process): New function.
9980         (linux_target_ops): Install it as target_supports_multi_process
9981         callback.
9982
9983 2009-05-24  Doug Evans  <dje@google.com>
9984
9985         Global renaming of find_thread_pid to find_thread_ptid.
9986         * server.h (find_thread_ptid): Renamed from find_thread_pid.
9987         * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9988         All callers updated.
9989
9990         * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9991         to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9992         directly.
9993
9994         * linux-low.c (get_stop_pc): Print pc if debug_threads.
9995         (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9996         (linux_resume_one_lwp): Ditto.
9997
9998 2009-05-23  Doug Evans  <dje@google.com>
9999
10000         * linux-low.c (linux_resume_one_lwp): Change type of first arg
10001         from struct inferior_list_entry * to struct lwp_info *.
10002         All callers updated.
10003
10004 2009-05-13  Doug Evans  <dje@google.com>
10005
10006         * linux-x86-low.c: Don't include assert.h.
10007         (x86_siginfo_fixup): Use fatal, not assert.
10008         (x86_arch_setup): Fix comment.
10009
10010 2009-05-12  Doug Evans  <dje@google.com>
10011
10012         Biarch support for i386/amd64 gdbserver.
10013         * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
10014         Add linux-x86-low.c.
10015         (linux-i386-low.o, linux-x86-64-low.o): Delete.
10016         (linux-x86-low.o): Add.
10017         * linux-x86-64-low.c: Delete.
10018         * linux-i386-low.c: Delete.
10019         * linux-x86-low.c: New file.
10020         * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
10021         linux-x86-low.o.
10022         (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
10023         linux-x86-low.o.
10024         (x86_64-linux srv_regobj): Add reg-i386-linux.o.
10025         * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
10026         (linux_child_pid_to_exec_file): New function.
10027         (elf_64_header_p, elf_64_file_p): New functions.
10028         (siginfo_fixup): New function.
10029         (linux_xfer_siginfo): New local inf_siginfo.  Call siginfo_fixup to
10030         give target a chance to convert layout.
10031         * linux-low.h (linux_target_ops): New member siginfo_fixup.
10032         (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
10033
10034 2009-05-07  Doug Evans  <dje@google.com>
10035
10036         * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
10037         (regsets_store_inferior_registers): Ditto.
10038
10039 2009-05-06  Pedro Alves  <pedro@codesourcery.com>
10040
10041         PR server/10048
10042
10043         * linux-low.c (must_set_ptrace_flags): Delete.
10044         (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
10045         of the global.
10046         (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here.  Set
10047         `lwp->must_set_ptrace_flags' instead.
10048         (linux_wait_for_event_1): Set ptrace options here.
10049         (linux_wait_1): ... not here.
10050
10051 2009-04-30  Doug Evans  <dje@google.com>
10052
10053         * inferiors.c (started_inferior_callback): New function.
10054         (attached_inferior_callback): New function.
10055         (have_started_inferiors_p, have_attached_inferiors_p): New functions.
10056         * server.c (print_started_pid, print_attached_pid): New functions.
10057         (detach_or_kill_for_exit): New function.
10058         (main): Call it instead of for_each_inferior (kill_inferior_callback).
10059         * server.h (have_started_inferiors_p): Declare.
10060         (have_attached_inferiors_p): Declare.
10061
10062         * inferiors.c (remove_process): Fix memory leak, free process.
10063         * linux-low.c (linux_remove_process): New function.
10064         (linux_kill): Call it instead of remove_process.
10065         (linux_detach, linux_wait_1): Ditto.
10066
10067 2009-04-19  Danny Backx  <dannybackx@users.sourceforge.net>
10068
10069         * configure.srv: Add x86 Windows CE target.
10070
10071 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
10072
10073         * inferiors.c (get_thread_process): Make global.
10074         * server.h (get_thread_process): Add prototype.
10075         * thread-db.c (find_one_thread): Use get_thread_process
10076         instead of current_process.
10077         (thread_db_get_tls_address): Do not crash if called when
10078         thread layer is not yet initialized.
10079
10080 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
10081
10082         * remote-utils.c (prepare_resume_reply): Null-terminate packet.
10083         * spu-low.c (current_tid): Rename to ...
10084         (current_ptid): ... this.
10085         (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
10086         spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
10087         ptid_get_lwp (current_ptid) instead of current_tid.
10088         (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
10089         instead of current_tid.  Use find_process_pid to verify pid
10090         argument is valid.  Pass proper argument to remove_process.
10091         (spu_thread_alive): Compare current_ptid instead of current_tid.
10092         (spu_resume): Likewise.
10093
10094 2009-04-02  Pedro Alves  <pedro@codesourcery.com>
10095
10096         * linux-low.c (usr_store_inferior_registers): Declare local `pid'
10097         variable.
10098
10099 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
10100
10101         Implement the multiprocess extensions, and add linux multiprocess
10102         support.
10103
10104         * server.h (ULONGEST): Declare.
10105         (struct ptid, ptid_t): New.
10106         (minus_one_ptid, null_ptid): Declare.
10107         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10108         (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
10109         (struct inferior_list_entry): Change `id' type from unsigned from
10110         to ptid_t.
10111         (struct sym_cache, struct breakpoint, struct
10112         process_info_private): Forward declare.
10113         (struct process_info): Declare.
10114         (current_process): Declare.
10115         (all_processes): Declare.
10116         (initialize_inferiors): Declare.
10117         (add_thread): Adjust to use ptid_t.
10118         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
10119         (add_process, remove_process, find_thread_pid): Declare.
10120         (find_inferior_id): Adjust to use ptid_t.
10121         (cont_thread, general_thread, step_thread): Change type to ptid_t.
10122         (multi_process): Declare.
10123         (push_event): Adjust to use ptid_t.
10124         (read_ptid, write_ptid): Declare.
10125         (prepare_resume_reply): Adjust to use ptid_t.
10126         (clear_symbol_cache): Declare.
10127         * inferiors.c (all_processes): New.
10128         (null_ptid, minus_one_ptid): New.
10129         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10130         (ptid_get_tid, ptid_equal, ptid_is_pid): New.
10131         (add_thread): Change unsigned long to ptid.  Remove gdb_id
10132         parameter.  Adjust.
10133         (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
10134         (gdb_id_to_thread): Rename to ...
10135         (find_thread_pid): ... this.  Change unsigned long to ptid.
10136         (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
10137         (loaded_dll, pull_pid_from_list): Adjust.
10138         (add_process, remove_process, find_process_pid)
10139         (get_thread_process, current_process, initialize_inferiors): New.
10140         * target.h (struct thread_resume) <thread>: Change type to ptid_t.
10141         (struct target_waitstatus) <related_pid>: Ditto.
10142         (struct target_ops) <kill, detach>: Add `pid' argument.  Change
10143         return type to int.
10144         (struct target_ops) <join>: Add `pid' argument.
10145         (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
10146         (struct target_ops) <wait>: Add `ptid' field.  Change return type
10147         to ptid.
10148         (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
10149         (mywait): Add `ptid' argument.  Change return type to ptid_t.
10150         (target_pid_to_str): Declare.
10151         * target.c (set_desired_inferior): Adjust to use ptids.
10152         (mywait): Add new `ptid' argument.  Adjust.
10153         (target_pid_to_str): New.
10154         * mem-break.h (free_all_breakpoints): Declare.
10155         * mem-break.c (breakpoints): Delelete.
10156         (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
10157         (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
10158         to use per-process breakpoint list.
10159         (free_all_breakpoints): New.
10160         * remote-utils.c (struct sym_cache) <name>: Drop `const'.
10161         (symbol_cache, all_symbols_looked_up): Delete.
10162         (hexchars): New.
10163         (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
10164         read_ptid): New.
10165         (prepare_resume_reply): Change ptid argument's type from unsigned
10166         long to ptid_t.  Adjust.  Implement W;process and X;process.
10167         (free_sym_cache, clear_symbol_cache): New.
10168         (look_up_one_symbol): Adjust to per-process symbol cache.  *
10169         * server.c (cont_thread, general_thread, step_thread): Change type
10170         to ptid_t.
10171         (attached): Delete.
10172         (multi_process): New.
10173         (last_ptid): Change type to ptid_t.
10174         (struct vstop_notif) <ptid>: Change type to ptid_t.
10175         (queue_stop_reply, push_event): Change `ptid' argument's type to
10176         ptid_t.
10177         (discard_queued_stop_replies): Add `pid' argument.
10178         (start_inferior): Adjust to use ptids.  Adjust to mywait interface
10179         changes.  Don't reference the `attached' global.
10180         (attach_inferior): Adjust to mywait interface changes.
10181         (handle_query): Adjust to use ptids.  Parse GDB's qSupported
10182         features.  Handle and report "multiprocess+".  Handle
10183         "qAttached:PID".
10184         (handle_v_cont): Adjust to use ptids.  Adjust to mywait interface
10185         changes.
10186         (handle_v_kill): New.
10187         (handle_v_stopped): Adjust to use target_pid_to_str.
10188         (handle_v_requests): Allow multiple attaches and runs when
10189         multiprocess extensions are in effect.  Handle "vKill".
10190         (myresume): Adjust to use ptids.
10191         (queue_stop_reply_callback): Add `arg' parameter.  Handle it.
10192         (handle_status): Adjust to discard_queued_stop_replies interface
10193         change.
10194         (first_thread_of, kill_inferior_callback)
10195         (detach_or_kill_inferior_callback, join_inferiors_callback): New.
10196         (main): Call initialize_inferiors.  Adjust to use ptids, killing
10197         and detaching from all inferiors.  Handle multiprocess packet
10198         variants.
10199         * linux-low.h: Include gdb_proc_service.h.
10200         (struct process_info_private): New.
10201         (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
10202         <lwpid_of>: Use ptid_get_lwp.
10203         (get_lwp_thread): Adjust.
10204         (struct lwp_info): Add `dead' member.
10205         (find_lwp_pid): Declare.
10206         * linux-low.c (thread_db_active): Delete.
10207         (new_inferior): Adjust comment.
10208         (inferior_pid): Delete.
10209         (linux_add_process): New.
10210         (handle_extended_wait): Adjust.
10211         (add_lwp): Change unsigned long to ptid.
10212         (linux_create_inferior): Add process to processes table.  Adjust
10213         to use ptids.  Don't set new_inferior here.
10214         (linux_attach_lwp): Rename to ...
10215         (linux_attach_lwp_1): ... this.  Add `initial' argument.  Handle
10216         it.  Adjust to use ptids.
10217         (linux_attach_lwp): New.
10218         (linux_attach): Add process to processes table.  Don't set
10219         new_inferior here.
10220         (struct counter): New.
10221         (second_thread_of_pid_p, last_thread_of_process_p): New.
10222         (linux_kill_one_lwp): Add `args' parameter.  Handle it.  Adjust to
10223         multiple processes.
10224         (linux_kill): Add `pid' argument.  Handle it.  Adjust to multiple
10225         processes.  Remove process from process table.
10226         (linux_detach_one_lwp): Add `args' parameter.  Handle it.  Adjust
10227         to multiple processes.
10228         (any_thread_of): New.
10229         (linux_detach): Add `pid' argument, and handle it.  Remove process
10230         from processes table.
10231         (linux_join): Add `pid' argument.  Handle it.
10232         (linux_thread_alive): Change unsighed long argument to ptid_t.
10233         Consider dead lwps as not being alive.
10234         (status_pending_p): Rename `dummy' argument to `arg'.  Filter out
10235         threads we're not interested in.
10236         (same_lwp, find_lwp_pid): New.
10237         (linux_wait_for_lwp): Change `pid' argument's type from int to
10238         ptid_t.  Adjust.
10239         (linux_wait_for_event): Rename to ...
10240         (linux_wait_for_event_1): ... this.  Change `pid' argument's type
10241         from int to ptid_t.  Adjust.
10242         (linux_wait_for_event): New.
10243         (linux_wait_1): Add `ptid' argument.  Change return type to
10244         ptid_t.  Adjust.  Use last_thread_of_process_p.  Remove processes
10245         that exit from the process table.
10246         (linux_wait): Add `ptid' argument.  Change return type to ptid_t.
10247         Adjust.
10248         (mark_lwp_dead): New.
10249         (wait_for_sigstop): Adjust to use ptids.  If a process exits while
10250         stopping all threads, mark its main lwp as dead.
10251         (linux_set_resume_request, linux_resume_one_thread): Adjust to use
10252         ptids.
10253         (fetch_register, usr_store_inferior_registers)
10254         (regsets_fetch_inferior_registers)
10255         (regsets_store_inferior_registers, linux_read_memory)
10256         (linux_write_memory): Inline `inferior_pid'.
10257         (linux_look_up_symbols): Adjust to use per-process
10258         `thread_db_active'.
10259         (linux_request_interrupt): Adjust to use ptids.
10260         (linux_read_auxv): Inline `inferior_pid'.
10261         (initialize_low): Don't reference thread_db_active.
10262         * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
10263         * proc-service.c (ps_lgetregs): Use find_lwp_pid.
10264         (ps_getpid): Return the pid of the current inferior.
10265         * thread-db.c (proc_handle, thread_agent): Delete.
10266         (thread_db_create_event, thread_db_enable_reporting): Adjust to
10267         per-process data.
10268         (find_one_thread): Change argument type to ptid_t.  Adjust to
10269         per-process data.
10270         (maybe_attach_thread): Adjust to per-process data and ptids.
10271         (thread_db_find_new_threads): Ditto.
10272         (thread_db_init): Ditto.
10273         * spu-low.c (spu_create_inferior, spu_attach): Add process to
10274         processes table.  Adjust to use ptids.
10275         (spu_kill, spu_detach): Adjust interface.  Remove process from
10276         processes table.
10277         (spu_join, spu_thread_alive): Adjust interface.
10278         (spu_wait): Adjust interface.  Remove process from processes
10279         table.  Adjust to use ptids.
10280         * win32-low.c (current_inferior_tid): Delete.
10281         (current_inferior_ptid): New.
10282         (debug_event_ptid): New.
10283         (thread_rec): Take a ptid.  Adjust.
10284         (child_add_thread): Add `pid' argument.  Adjust to use ptids.
10285         (child_delete_thread): Ditto.
10286         (do_initial_child_stuff): Add `attached' argument.  Add process to
10287         processes table.
10288         (child_fetch_inferior_registers, child_store_inferior_registers):
10289         Adjust.
10290         (win32_create_inferior): Pass 0 to do_initial_child_stuff.
10291         (win32_attach): Pass 1 to do_initial_child_stuff.
10292         (win32_kill): Adjust interface.  Remove process from processes
10293         table.
10294         (win32_detach): Ditto.
10295         (win32_join): Adjust interface.
10296         (win32_thread_alive): Take a ptid.
10297         (win32_resume): Adjust to use ptids.
10298         (get_child_debug_event): Ditto.
10299         (win32_wait): Adjust interface.  Remove exiting process from
10300         processes table.
10301
10302 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
10303
10304         Non-stop mode support.
10305
10306         * server.h (non_stop): Declare.
10307         (gdb_client_data, handler_func): Declare.
10308         (delete_file_handler, add_file_handler, start_event_loop):
10309         Declare.
10310         (handle_serial_event, handle_target_event, push_event)
10311         (putpkt_notif): Declare.
10312         * target.h (enum resume_kind): New.
10313         (struct thread_resume): Replace `step' field by `kind' field.
10314         (TARGET_WNOHANG): Define.
10315         (struct target_ops) <wait>: Add `options' argument.
10316         <supports_non_stop, async, start_non_stop>: New fields.
10317         (target_supports_non_stop, target_async): New.
10318         (start_non_stop): Declare.
10319         (mywait): Add `options' argument.
10320         * target.c (mywait): Add `options' argument.  Print child exit
10321         notifications here.
10322         (start_non_stop): New.
10323         * server.c (non_stop, own_buf, mem_buf): New globals.
10324         (struct vstop_notif): New.
10325         (notif_queue): New global.
10326         (queue_stop_reply, push_event, discard_queued_stop_replies)
10327         (send_next_stop_reply): New.
10328         (start_inferior): Adjust to use resume_kind.  Adjust to mywait
10329         interface changes.
10330         (attach_inferior): In non-stop mode, don't wait for the target
10331         here.
10332         (handle_general_set): Handle QNonStop.
10333         (handle_query): When handling qC, return the current general
10334         thread, instead of the first thread of the list.
10335         (handle_query): If the backend supports non-stop mode, include
10336         QNonStop+ in the qSupported query response.
10337         (handle_v_cont): Adjust to use resume_kind.  Handle resume_stop
10338         and non-stop mode.
10339         (handle_v_attach, handle_v_run): Handle non-stop mode.
10340         (handle_v_stopped): New.
10341         (handle_v_requests): Report support for vCont;t.  Handle vStopped.
10342         (myresume): Adjust to use resume_kind.  Handle non-stop.
10343         (queue_stop_reply_callback): New.
10344         (handle_status): Handle non-stop mode.
10345         (main): Clear non_stop flag on reconnection.  Use the event-loop.
10346         Refactor serial protocol handling from here ...
10347         (process_serial_event): ... to this new function.  When GDB
10348         selects any thread, select one here.  In non-stop mode, wait until
10349         GDB acks all pending events before exiting.
10350         (handle_serial_event, handle_target_event): New.
10351         * remote-utils.c (remote_open): Install remote_desc in the event
10352         loop.
10353         (remote_close): Remove remote_desc from the event loop.
10354         (putpkt_binary): Rename to...
10355         (putpkt_binary_1): ... this.  Add `is_notic' argument.  Handle it.
10356         (putpkt_binary): New as wrapper around putpkt_binary_1.
10357         (putpkt_notif): New.
10358         (prepare_resume_reply): In non-stop mode, don't change the
10359         general_thread.
10360         * event-loop.c: New.
10361         * Makefile.in (OBJ): Add event-loop.o.
10362         (event-loop.o): New rule.
10363
10364         * linux-low.h (pid_of): Moved here.
10365         (lwpid_of): New.
10366         (get_lwp_thread): Use lwpid_of.
10367         (struct lwp_info): Delete `lwpid' field.  Add `suspended' field.
10368         * linux-low.c (pid_of): Delete.
10369         (inferior_pid): Use lwpid_of.
10370         (linux_event_pipe): New.
10371         (target_is_async_p): New.
10372         (delete_lwp): New.
10373         (handle_extended_wait): Use lwpid_of.
10374         (add_lwp): Don't set lwpid field.
10375         (linux_attach_lwp): Adjust debug output.  Use lwpid_of.
10376         (linux_kill_one_lwp): If killing a running lwp, stop it first.
10377         Use lwpid_of.  Adjust to linux_wait_for_event interface changes.
10378         (linux_detach_one_lwp): If detaching from a running lwp, stop it
10379         first.  Adjust to linux_wait_for_event interface changes.  Use
10380         lwpid_of.
10381         (linux_detach): Don't delete the main lwp here.
10382         (linux_join): Use my_waitpid.  Avoid signal_pid.  Use lwpid_of.
10383         (status_pending_p): Don't consider explicitly suspended lwps.
10384         (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
10385         pointer.  Add OPTIONS argument.  Change return type to int.  Use
10386         my_waitpid instead of sleeping.  Handle WNOHANG.  Use lwpid_of.
10387         (linux_wait_for_event): Take an integer pid instead of a lwp_info
10388         pointer.  Add status pointer argument.  Return a pid instead of a
10389         status.  Use lwpid_of.  Adjust to linux_wait_for_lwp interface
10390         changes.  In non-stop mode, don't switch to a random thread.
10391         (linux_wait): Rename to...
10392         (linux_wait_1): ... this.  Add target_options argument, and handle
10393         it.  Adjust to use resume_kind.  Use lwpid_of.  In non-stop mode,
10394         don't handle the continue thread.  Handle TARGET_WNOHANG.  Merge
10395         clean exit and signal exit code.  Don't stop all threads in
10396         non-stop mode.  In all-stop mode, only stop all threads when
10397         reporting a stop to GDB.  Handle explicit thread stop requests.
10398         (async_file_flush, async_file_mark): New.
10399         (linux_wait): New.
10400         (send_sigstop): Use lwpid_of.
10401         (wait_for_sigstop): Use lwpid_of.  Adjust to linux_wait_for_event
10402         interface changes.  In non-stop mode, don't switch to a random
10403         thread.
10404         (linux_resume_one_lwp): Use lwpid_of.
10405         (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
10406         (linux_resume_one_thread): ... this.  Handle resume_stop.  In
10407         non-stop mode, don't look for pending flag in all threads.
10408         (resume_status_pending_p): Don't consider explicitly suspended
10409         threads.
10410         (my_waitpid): Reimplement.  Emulate __WALL.
10411         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10412         Use lwpid_of.
10413         (sigchld_handler, linux_supports_non_stop, linux_async)
10414         (linux_start_non_stop): New.
10415         (linux_target_ops): Register linux_supports_non_stop, linux_async
10416         and linux_start_non_stop.
10417         (initialize_low): Install SIGCHLD handler.
10418         * thread-db.c (thread_db_create_event, find_one_thread)
10419         (thread_db_get_tls_address): Use lwpid_of.
10420         * win32-low.c (win32_detach): Adjust to use resume_kind.
10421         (win32_wait): Add `options' argument.
10422         * spu-low.c (spu_resume): Adjust to use resume_kind.
10423         (spu_wait): Add `options' argument.
10424
10425 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
10426
10427         Decouple target code from remote protocol.
10428
10429         * target.h (enum target_waitkind): New.
10430         (struct target_waitstatus): New.
10431         (struct target_ops) <wait>: Return an unsigned long.  Take a
10432         target_waitstatus pointer instead of a char pointer.
10433         (mywait): Likewise.
10434         * target.c (mywait): Change prototype to return an unsigned long.
10435         Take a target_waitstatus pointer instead of a char pointer.  Adjust.
10436         * server.h (thread_from_wait, old_thread_from_wait): Delete
10437         declarations.
10438         (prepare_resume_reply): Change prototype to take a
10439         target_waitstatus.
10440         * server.c (thread_from_wait, old_thread_from_wait): Delete.
10441         (last_status, last_ptid): New.
10442         (start_inferior): Remove "statusptr" argument.  Adjust.  Return a
10443         pid instead of a signal.
10444         (attach_inferior): Remove "status" and "signal" parameters.
10445         Adjust.
10446         (handle_query): For qGetTLSAddr, parse the thread id with strtol,
10447         not as an address.
10448         (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
10449         (handle_v_requests, myresume): Remove "status" and "signal"
10450         parameters.  Adjust.
10451         (handle_status): New.
10452         (main): Delete local `status'.  Adjust.
10453         * remote-utils.c: Include target.h.
10454         (prepare_resume_reply): Change prototype to take a
10455         target_waitstatus.  Adjust.
10456
10457         * linux-low.c (linux_wait): Adjust to new target_ops->wait
10458         interface.
10459         * spu-low.c (spu_wait): Adjust.
10460         * win32-low.c (enum target_waitkind, struct target_waitstatus):
10461         Delete.
10462         (win32_wait): Adjust.
10463
10464 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
10465
10466         * target.h (struct thread_resume): Delete leave_stopped member.
10467         (struct target_ops): Add a `n' argument to the `resume' callback.
10468         * server.c (start_inferior): Adjust.
10469         (handle_v_cont, myresume): Adjust.
10470         * linux-low.c (check_removed_breakpoint): Adjust to resume
10471         interface change, and to removed leave_stopped field.
10472         (resume_ptr): Delete.
10473         (struct thread_resume_array): New.
10474         (linux_set_resume_request): Add new `arg' parameter.  Adjust to
10475         resume interface change.
10476         (linux_continue_one_thread, linux_queue_one_thread)
10477         (resume_status_pending_p): Check if the resume field is NULL
10478         instead of checking the leave_stopped member.
10479         (linux_resume): Adjust to the target resume interface change.
10480         * spu-low.c (spu_resume): Adjust to the target resume interface
10481         change.
10482         * win32-low.c (win32_detach, win32_resume): Ditto.
10483
10484 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
10485
10486         * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
10487         flag.
10488         (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
10489         pending.
10490         (linux_continue_one_thread): Only preserve the stepping flag if
10491         there's a pending breakpoint.
10492
10493 2009-03-31  Pedro Alves  <pedro@codesourcery.com>
10494
10495         * server.c (main): After the inferior having exited, call
10496         remote_close before exiting gdbserver.
10497
10498 2009-03-25  Thiago Jung Bauermann  <bauerman@br.ibm.com>
10499
10500         Fix size of FPSCR in Power 7 processors.
10501         * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
10502         (PPC_FEATURE_HAS_DFP): New #define.
10503         (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
10504         size of the FPSCR.
10505
10506 2009-03-23  Pedro Alves  <pedro@codesourcery.com>
10507
10508         * server.c (handle_query) Whitespace and formatting.
10509
10510 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
10511
10512         * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10513         linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10514         linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10515         linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10516         regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10517         thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10518         Makefile.in, configure.ac: Fix whitespace throughout.
10519         * configure: Regenerate.
10520
10521 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
10522
10523         * inferiors.c (find_inferior): Make it safe for the callback
10524         function to delete the currently iterated inferior.
10525
10526 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
10527
10528         * Makefile.in (linuw_low_h): Move higher.
10529         (thread-db.o): Depend on $(linux_low_h).
10530
10531 2009-03-17  Pedro Alves  <pedro@codesourcery.com>
10532
10533         Rename "process" to "lwp" throughout.
10534
10535         * linux-low.c (all_processes): Rename to...
10536         (all_lwps): ... this.
10537         (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10538         (add_process): Rename to ...
10539         (add_lwp): ... this.  Adjust.
10540         (linux_create_inferior): Adjust.
10541         (linux_attach_lwp): Adjust.
10542         (linux_attach): Adjust.
10543         (linux_kill_one_process): Rename to ...
10544         (linux_kill_one_lwp): ... this.  Adjust.
10545         (linux_kill): Adjust.
10546         (linux_detach_one_process): Rename to ...
10547         (linux_detach_one_lwp): ... this.  Adjust.
10548         (linux_detach): Adjust.
10549         (check_removed_breakpoint): Adjust.
10550         (status_pending_p): Adjust.
10551         (linux_wait_for_process): Rename to ...
10552         (linux_wait_for_lwp): ... this.  Adjust.
10553         (linux_wait_for_event): Adjust.
10554         (send_sigstop): Adjust.
10555         (wait_for_sigstop): Adjust.
10556         (stop_all_processes): Rename to ...
10557         (stop_all_lwps): ... this.
10558         (linux_resume_one_process): Rename to ...
10559         (linux_resume_one_lwp): ... this.  Adjust.
10560         (linux_set_resume_request, linux_continue_one_thread)
10561         (linux_queue_one_thread, resume_status_pending_p)
10562         (usr_store_inferior_registers, regsets_store_inferior_registers)
10563         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10564         Adjust.
10565         * linux-low.h (get_process): Rename to ...
10566         (get_lwp): ... this.  Adjust.
10567         (get_thread_process): Rename to ...
10568         (get_thread_lwp): ... this.  Adjust.
10569         (get_process_thread): Rename to ...
10570         (get_lwp_thread): ... this.  Adjust.
10571         (struct process_info): Rename to ...
10572         (struct lwp_info): ... this.
10573         (all_processes): Rename to ...
10574         (all_lwps): ... this.
10575         * proc-service.c (ps_lgetregs): Adjust.
10576         * thread-db.c (thread_db_create_event, find_one_thread)
10577         (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10578
10579 2009-03-14  Pedro Alves  <pedro@codesourcery.com>
10580
10581         * server.c (handle_query): Handle "qAttached".
10582
10583 2009-03-13  Nathan Sidwell  <nathan@codesourcery.com>
10584
10585         * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10586         GPLv3, update license URL.
10587
10588 2009-03-01  Doug Evans  <dje@google.com>
10589
10590         * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
10591         (server_h): Add gdb_signals.h.
10592         (signals.o): Update.
10593         * server.h (target_signal_from_host,target_signal_to_host_p)
10594         (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10595
10596 2009-02-14  Pierre Muller  <muller@ics.u-strasbg.fr>
10597
10598         * remote-utils.c (getpkt): Also generate remote-debug
10599         information if noack_mode is set.
10600
10601 2009-02-06  Pedro Alves  <pedro@codesourcery.com>
10602
10603         * server.c (handle_query): Report qXfer:siginfo:read and
10604         qXfer:siginfo:write as supported and handle them.
10605         * target.h (struct target_ops) <qxfer_siginfo>: New field.
10606         * linux-low.c (linux_xfer_siginfo): New.
10607         (linux_target_ops): Set it.
10608
10609 2009-01-26  Pedro Alves  <pedro@codesourcery.com>
10610
10611         * server.c (gdbserver_usage): Mention --remote-debug.
10612         (main): Accept '--remote-debug' switch.
10613
10614 2009-01-18  Doug Evans  <dje@google.com>
10615
10616         * regcache.c (new_register_cache): No need to check result of xcalloc.
10617         * server.c (handle_search_memory): Back out calls to xmalloc,
10618         result is checked and error is returned to user upon failure.
10619         (handle_query): Ditto.  Add more checks for result of malloc.
10620         (handle_v_cont): Check result of malloc, report error back to
10621         user upon failure.
10622         (handle_v_run): Ditto.  Call freeargv.
10623         * server.h (freeargv): Declare.
10624         * utils.c (freeargv): New fn.
10625
10626 2009-01-15  Doug Evans  <dje@google.com>
10627
10628         * gdbreplay.c (perror_with_name): Make arg const char *.
10629         * server.h (target_signal_to_name): Make return type const char *.
10630         * thread-db.c (thread_db_err_str): Make return type const char *.
10631         * utils.c (perror_with_name): Make arg const char *.
10632
10633 2009-01-14  Pedro Alves  <pedro@codesourcery.com>
10634
10635         * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10636         when handling a EXIT_PROCESS_DEBUG_EVENT.
10637
10638 2009-01-06  Joel Brobecker  <brobecker@adacore.com>
10639
10640         * gdbreplay.c (gdbreplay_version): Update copyright year.
10641         * server.c (gdbserver_version): Likewise.
10642
10643 2009-01-05  Doug Evans  <dje@google.com>
10644
10645         * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
10646         (handle_extended_wait): Improve comment.
10647
10648 2008-12-13  Doug Evans  <dje@google.com>
10649
10650         * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10651         * server.h (ATTR_MALLOC): New macro.
10652         (xmalloc,xcalloc,xstrdup): Declare.
10653         * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10654         * inferiors.c: Ditto.
10655         * linux-low.c: Ditto.
10656         * mem-break.c: Ditto.
10657         * regcache.c: Ditto.
10658         * remote-utils.c: Ditto.
10659         * server.c: Ditto.
10660         * target.c: Ditto.
10661         * win32-low.c: Ditto.
10662
10663 2008-12-12  Doug Evans  <dje@google.com>
10664
10665         * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10666         in debugging printf.
10667
10668         * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10669
10670 2008-12-09  Doug Evans  <dje@google.com>
10671
10672         * linux-low.h (struct process_info): Delete member tid, unused.
10673         * thread-db.c (find_one_thread): Update.
10674         (maybe_attach_thread): Update.
10675
10676 2008-12-02  Pedro Alves  <pedro@codesourcery.com>
10677
10678         * target.h (struct target_ops): Add qxfer_osdata member.
10679         * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10680         and dirent.h.
10681         (linux_qxfer_osdata): New functions.
10682         (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10683         callback.
10684         * server.c (handle_query): Handle "qXfer:osdata:read:".
10685         * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10686         (buffer_xml_printf): New functions.
10687         * server.h (struct buffer): New.
10688         (buffer_grow_str, buffer_grow_str0): New macros.
10689         (buffer_grow, buffer_free, buffer_init, buffer_finish)
10690         (buffer_xml_printf): Declare.
10691
10692 2008-11-24  Doug Evans  <dje@google.com>
10693
10694         * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10695
10696 2008-11-24  Daniel Jacobowitz  <dan@codesourcery.com>
10697
10698         * server.c (handle_v_run): Always use the supplied argument list.
10699
10700 2008-11-19  Bob Wilson  <bob.wilson@acm.org>
10701
10702         * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10703         (xtensa_regmap_table): Add entry for scompare1.
10704
10705 2008-11-18  Thiago Jung Bauermann  <bauerman@br.ibm.com>
10706
10707         * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10708         powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10709         powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10710         powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10711         powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10712         powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10713         * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10714         XML target descriptions.
10715         * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10716         when inferior is running on an ISA 2.05 or later processor.  Add
10717         special case to return offset for full 64-bit slot of FPSCR when
10718         in 32-bits.
10719
10720 2008-11-14  Daniel Gutson  <dgutson@codesourcery.com>
10721
10722         * Makefile.in (SFILES, clean): Added sparc64 files.
10723         (reg-sparc64.o, reg-sparc64.c): New.
10724         * configure.srv (sparc*-*-linux*): New configuration.
10725         * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10726         syscall arguments for SPARC.
10727         (regsets_store_inferior_registers): Likewise.
10728         * linux-sparc-low.c: New file.
10729
10730 2008-10-21  Doug Evans  <dje@google.com>
10731
10732         * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10733         (READLINE_DIR,READLINE_DEP): Delete.
10734         (INTERNAL_CFLAGS): Update.
10735         (LINTFLAGS): Update.
10736
10737 2008-10-10  Pedro Alves  <pedro@codesourcery.com>
10738
10739         * server.c (handle_v_run): If GDB didn't specify an argv, use the
10740         whole argv from the last run, not just argv[0].
10741
10742 2008-09-08  Pedro Alves  <pedro@codesourcery.com>
10743
10744         * regcache.c (new_register_cache): Return NULL if the register
10745         cache size isn't known yet.
10746         (free_register_cache): Avoid dereferencing a NULL regcache.
10747
10748 2008-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
10749
10750         * configure.srv: Merge MIPS and MIPS64.
10751
10752 2008-08-24  Maciej W. Rozycki  <macro@linux-mips.org>
10753
10754         * Makefile.in (uninstall): Apply $(EXEEXT) too.
10755
10756 2008-08-18  Luis Machado  <luisgpm@br.ibm.com>
10757
10758         * Makefile.in: Add required vsx dependencies.
10759
10760         * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10761         Declare init_registers_powerpc_vsx32l.
10762         Declare init_registers_powerpc_vsx64l.
10763         Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10764         (ppc_arch_setup): Check for VSX in hwcap.
10765         (ppc_fill_vsxregset): New function.
10766         (ppc_store_vsxregset): New function.
10767         Add new VSX entry in regset_info target_regsets.
10768
10769         * configure.srv: Add new VSX dependencies.
10770
10771 2008-08-12  Pedro Alves  <pedro@codesourcery.com>
10772
10773         * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10774         (remote_open): Set or clear transport_is_reliable.
10775         (putpkt_binary): Don't expect acks in noack mode.
10776         (getpkt): Don't send ack/nac in noack mode.
10777         * server.c (handle_general_set): Handle QStartNoAckMode.
10778         (handle_query): If connected by tcp pass QStartNoAckMode+ in
10779         qSupported.
10780         (main): Reset noack_mode on every connection.
10781         * server.h (noack_mode): Declare.
10782
10783 2008-08-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10784
10785         * Makefile.in (GDBREPLAY_OBS): New variable.
10786         (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10787
10788 2008-08-05  Ulrich Weigand  <uweigand@de.ibm.com>
10789             Daniel Jacobowitz  <dan@codesourcery.com>
10790
10791         * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10792         (usr_store_inferior_registers): Likewise.
10793         (regsets_store_inferior_registers): Likewise.
10794
10795 2008-07-31  Rolf Jansen  <rj@surtec.com>
10796             Pedro Alves  <pedro@codesourcery.com>
10797
10798         * configure.ac: Check for memmem declaration.
10799         * server.c [HAVE_MALLOC_H]: Include malloc.h.
10800         (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10801         (disable_packet_qfThreadInfo): Unconditionally compile.
10802         * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10803         * configure, config.in: Regenerate.
10804
10805 2008-07-28  Doug Kwan  <dougkwan@google.com>
10806
10807         * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10808         (linux_write_memory): Remove declaration of errno.
10809
10810 2008-07-12  Ulrich Weigand  <uweigand@de.ibm.com>
10811
10812         * linux-low.c (handle_extended_wait): Do not use "status"
10813         variable uninitialized.
10814
10815 2008-07-07  Pedro Alves  <pedro@codesourcery.com>
10816
10817         * server.c (handle_v_attach): Inhibit reporting dll changes.
10818
10819 2008-06-27  Pedro Alves  <pedro@codesourcery.com>
10820
10821         * remote-utils.c (prepare_resume_reply): If requested, don't
10822         output "thread:TID" in the T stop reply.
10823
10824         * server.c (disable_packet_vCont, disable_packet_Tthread)
10825         (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10826         (handle_query): If requested, disable support for qC, qfThreadInfo
10827         and qsThreadInfo.
10828         (handle_v_requests): If requested, disable support for vCont.
10829         (gdbserver_show_disableable): New.
10830         (main): Handle --disable-packet and --disable-packet=LIST.
10831
10832         * server.h (disable_packet_vCont, disable_packet_Tthread)
10833         (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10834
10835 2008-06-20  Carlos O'Donell  <carlos@codesourcery.com>
10836
10837         * server.c (gdbserver_usage): Mention --version.
10838
10839 2008-06-06  Daniel Jacobowitz  <dan@codesourcery.com>
10840
10841         * Makefile.in (gdbreplay.o): New rule.
10842
10843 2008-06-06  Joseph Myers  <joseph@codesourcery.com>
10844
10845         * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10846         message, not gdbserver.
10847
10848 2008-06-05  Vladimir Prus  <vladimir@codesourcery.com>
10849             Nathan Sidwell  <nathan@codesourcery.com>
10850             Joseph Myers  <joseph@codesourcery.com>
10851
10852         * acinclude.m4: Include ../../config/acx.m4.
10853         * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10854         * configure, config.in: Regenerate.
10855         * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10856         * server.c (gdbserver_version): Print PKGVERSION.
10857         (gdbsrever_usage): Add stream parameter.  Print REPORT_BUGS_TO.
10858         (main): Adjust gdbserver_usage calls.
10859         * gdbreplay.c (version, host_name): Add declarations.
10860         (gdbreplay_version, gdbreplay_usage): New.
10861         (main): Accept --version and --help options.
10862
10863 2008-06-04  Daniel Jacobowitz  <dan@codesourcery.com>
10864
10865         * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10866         (arm_breakpoint_at): Handle Thumb.
10867         (the_low_target): Add comment.
10868
10869 2008-05-29  Ulrich Weigand  <uweigand@de.ibm.com>
10870
10871         * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10872
10873 2008-05-09  Doug Evans  <dje@google.com>
10874
10875         * server.h (decode_search_memory_packet): Declare.
10876         * remote-utils.c (decode_search_memory_packet): New fn.
10877         * server.c (handle_search_memory_1): New fn.
10878         (handle_search_memory): New fn.
10879         (handle_query): Process qSearch:memory packets.
10880
10881 2008-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
10882
10883         * regcache.c (registers_length): Remove.
10884         (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10885         full register packet.
10886         * regcache.h (registers_length): Remove prototype.
10887         * server.h (PBUFSIZ): Define to 16384.
10888
10889 2008-05-03  Ulrich Weigand  <uweigand@de.ibm.com>
10890
10891         * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10892         powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10893         powerpc-64l.o, and powerpc-altivec64l.o.
10894         Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10895         rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10896         rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10897         rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10898         rs6000/power-linux.xml, and rs6000/power64-linux.xml
10899         to srv_xmlfiles.
10900
10901         * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10902         (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10903         (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10904         (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10905         (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10906         (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10907         (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10908         (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10909         (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10910         (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10911         (clean): Update.
10912
10913         * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10914         (init_registers_powerpc_32l): ... this new prototype.
10915         (init_registers_powerpc_32): Remove, replace by ...
10916         (init_registers_powerpc_altivec32l): ... this new prototype.
10917         (init_registers_powerpc_e500): Remove, replace by ...
10918         (init_registers_powerpc_e500l): ... this new prototype.
10919         (init_registers_ppc64): Remove, replace by ...
10920         (init_registers_powerpc_64l): ... this new prototype.
10921         (init_registers_powerpc_64): Remove, replace by ...
10922         (init_registers_powerpc_altivec64l): ... this new prototype.
10923         (ppc_num_regs): Set to 73.
10924         (PT_ORIG_R3, PT_TRAP): Define if necessary.
10925         (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10926         (ppc_cannot_store_register): Handle orig_r3 and trap.
10927         (ppc_arch_setup): Update init_registers_... calls.
10928         (ppc_fill_gregset): Handle orig_r3 and trap.
10929
10930         * inferiors.c (clear_inferiors): Reset current_inferior.
10931
10932 2008-04-23  Paolo Bonzini  <bonzini@gnu.org>
10933
10934         * acinclude.m4: Add override.m4.
10935         * configure: Regenerate.
10936
10937 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
10938
10939         * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10940         initial call to init_register_ppc64.
10941
10942 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
10943
10944         * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10945         single powerpc*-*-linux* case.
10946         (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10947
10948 2008-04-17  Ulrich Weigand  <uweigand@de.ibm.com>
10949
10950         * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
10951         srv_regobj.  Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
10952         from reg_xmlfiles.
10953         * linux-ppc-low.c: Include <elf.h>.
10954         (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10955         (ppc_hwcap): New global variable.
10956         (ppc_regmap): Remove __SPE__ #ifdef sections.
10957         (ppc_regmap_e500): New global variable.
10958         (ppc_cannot_store_register): Update __SPE__ special case.
10959         (ppc_get_hwcap): New function.
10960         (ppc_arch_setup): Use it to determine whether inferior supports
10961         AltiVec or SPE registers.  Set the_low_target.regmap if appropriate.
10962         (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10963         Do not access registers if target does not support AltiVec.
10964         (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10965         Do not access registers if target does not support SPE.
10966         (target_regsets): Unconditionally include AltiVec and SPE regsets.
10967
10968 2008-04-17  Daniel Jacobowitz  <dan@codesourcery.com>
10969
10970         * linux-low.c (disabled_regsets, num_regsets): New.
10971         (use_regsets_p): Delete.
10972         (linux_wait_for_process): Clear disabled_regsets.
10973         (regsets_fetch_inferior_registers): Check and set it.
10974         (regsets_store_inferior_registers): Likewise.
10975         (linux_fetch_registers, linux_store_registers): Do not use
10976         use_regsets_p.
10977         (initialize_low): Allocate disabled_regsets.
10978
10979 2008-04-14  Daniel Jacobowitz  <dan@codesourcery.com>
10980
10981         * Makefile.in (LIBOBJS): New.
10982         (OBS): Use LIBOBJS.
10983         (memmem.o): New rule.
10984         * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10985         * configure: Regenerated.
10986
10987 2008-04-04  Ulrich Weigand  <uweigand@de.ibm.com>
10988
10989         * server.c (handle_query): Never return "unsupported" for
10990         qXfer:features:read queries.
10991
10992 2008-03-27  Ulrich Weigand  <uweigand@de.ibm.com>
10993
10994         * server.c (get_features_xml): Fix inverted condition.
10995         (handle_query): Always support qXfer:feature:read.
10996
10997 2008-03-10  Daniel Jacobowitz  <dan@codesourcery.com>
10998
10999         * server.c (wrapper_argv): New.
11000         (start_inferior): Handle wrapper_argv.  If set, expect an extra
11001         trap.
11002         (gdbserver_usage): Document --wrapper.
11003         (main): Parse --wrapper.
11004
11005 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
11006
11007         * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
11008         powerpc-*-linux* to srv_regobj and reg_xmlfiles.
11009         * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
11010         (ppc_set_pc): Likewise.
11011         (ppc_arch_setup): New function.
11012         (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
11013         of collect_register.
11014         (the_low_target): Use ppc_arch_setup as arch_setup initializer.
11015
11016 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
11017
11018         * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
11019         instead of linux-ppc64-low.o.
11020         * linux-ppc64-low.c: Remove file.
11021         * Makefile.in (SFILES): Remove linux-ppc64-low.c.
11022         (linux-ppc64-low.o): Remove rule.
11023
11024         * linux-ppc-low.c (init_registers_ppc64): Add prototype.
11025         (init_registers_powerpc_64): Likewise.
11026         (ppc_regmap): Conditionally define depending on __powerpc64__.
11027         (ppc_cannot_store_register): Do not special-case "fpscr" when
11028         compiled on __powerpc64__.
11029         (ppc_collect_ptrace_register): New function.
11030         (ppc_supply_ptrace_register): New function.
11031         (ppc_breakpoint): Change type to "unsigned int".
11032         (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
11033         (the_low_target): Conditionally provide initializers for the
11034         arch_setup member depending on __powerpc64__.  Install
11035         collect_ptrace_register and supply_ptrace_register members.
11036
11037 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
11038
11039         * regcache.h (gdbserver_xmltarget): Add extern declaration.
11040         * server.c (gdbserver_xmltarget): Define.
11041         (get_features_xml): Use it to replace "target.xml" and arch_string.
11042
11043         * configure.srv: Remove srv_xmltarget.  Add XML files that were
11044         mentioned there to srv_xmlfiles instead.  Remove conditional tests
11045         on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
11046         srv_xmlfiles and srv_regobj to include all possible choices.
11047         * configure.ac (srv_xmltarget): Remove.
11048         (srv_xmlfiles): Do not add "target.xml".
11049         (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
11050         checks for supplementary target information.
11051         * configure: Regenerate.
11052         * Makefile.in (XML_TARGET): Remove.
11053         (target.xml): Remove rule.
11054         (clean): Do not clean up target.xml.
11055         (.PRECIOUS): Do not mention target.xml.
11056
11057         * target.h (struct target_ops): Remove arch_string member.
11058         * linux-low.c (linux_arch_string): Remove.
11059         (linux_target_ops): Remove arch_string initializer.
11060         * linux-low.h (struct linux_target_ops): Remove arch_string member.
11061         * linux-i386-low.c (the_low_target): Remove arch_string initializer.
11062         * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
11063         * spu-low.c (spu_arch_string): Remove.
11064         (spu_target_ops): Remove arch_string initializer.
11065         * win32-low.c (win32_arch_string): Remove.
11066         (win32_target_ops): Remove arch_string initializer.
11067         * win32-low.h (struct win32_target_ops): Remove arch_string member.
11068         * win32-arm-low.c (the_low_target): Remove arch_string initializer.
11069         * win32-i368-low.c (the_low_target): Remove arch_string initializer.
11070
11071 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
11072
11073         * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
11074         by collect_ptrace_register and supply_ptrace_register hooks.
11075         * linux-low.c (fetch_register): Use supply_ptrace_register callback
11076         instead of checking for the_low_target.left_pad_xfer.
11077         (usr_store_inferior_registers): Use collect_ptrace_register callback
11078         instead of checking for the_low_target.left_pad_xfer.
11079
11080         * linux-s390-low.c (s390_collect_ptrace_register): New function.
11081         (s390_supply_ptrace_register): Likewise.
11082         (s390_fill_gregset): Call s390_collect_ptrace_register.
11083         (the_low_target): Update.
11084
11085         * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
11086         (ppc_supply_ptrace_register): Likewise.
11087         (the_low_target): Update.
11088
11089         * linux-i386-low.c (the_low_target): Update.
11090         * linux-x86-64-low.c (the_low_target): Update.
11091
11092 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
11093
11094         * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
11095         reg-s390.o and reg-s390x.o.
11096
11097         * linux-low.c (new_inferior): New global variable.
11098         (linux_create_inferior, linux_attach): Set it.
11099         (linux_wait_for_process): Call the_low_target.arch_setup after the
11100         target has stopped for the first time.
11101         (initialize_low): Do not call the_low_target.arch_setup.
11102
11103         * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
11104         (s390_set_pc): Likewise.
11105         (s390_arch_setup): New function.
11106         (the_low_target): Use s390_arch_setup as arch_setup routine.
11107
11108         * regcache.c (realloc_register_cache): New function.
11109         (set_register_cache): Call it for each existing regcache.
11110
11111 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
11112
11113         * server.h (init_registers): Remove prototype.
11114
11115         * linux-low.h (struct linux_target_ops): Add arch_setup field.
11116         * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
11117         instead of init_registers ().
11118         * linux-arm-low.c (init_registers_arm): Add prototype.
11119         (init_registers_arm_with_iwmmxt): Likewise.
11120         (the_low_target): Add initializer for arch_setup field.
11121         * linux-cris-low.c (init_registers_cris): Add prototype.
11122         (the_low_target): Add initializer for arch_setup field.
11123         * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
11124         (the_low_target): Add initializer for arch_setup field.
11125         * linux-i386-low.c (init_registers_i386_linux): Add prototype.
11126         (the_low_target): Add initializer for arch_setup field.
11127         * linux-ia64-low.c (init_registers_ia64): Add prototype.
11128         (the_low_target): Add initializer for arch_setup field.
11129         * linux-m32r-low.c (init_registers_m32r): Add prototype.
11130         (the_low_target): Add initializer for arch_setup field.
11131         * linux-m68k-low.c (init_registers_m68k): Add prototype.
11132         (the_low_target): Add initializer for arch_setup field.
11133         * linux-mips-low.c (init_registers_mips_linux): Add prototype.
11134         (init_registers_mips64_linux): Likewise.
11135         (the_low_target): Add initializer for arch_setup field.
11136         * linux-ppc-low.c (init_registers_ppc): Add prototype.
11137         (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
11138         (the_low_target): Add initializer for arch_setup field.
11139         * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
11140         (init_registers_powerpc_64): Likewise.
11141         (the_low_target): Add initializer for arch_setup field.
11142         * linux-s390-low.c (init_registers_s390): Add prototype.
11143         (init_registers_s390x): Likewise.
11144         (the_low_target): Add initializer for arch_setup field.
11145         * linux-sh-low.c (init_registers_sh): Add prototype.
11146         (the_low_target): Add initializer for arch_setup field.
11147         * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
11148         (the_low_target): Add initializer for arch_setup field.
11149         * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
11150         (the_low_target): Add initializer for arch_setup field.
11151
11152         * win32-low.h (struct win32_target_ops): Add arch_setup field.
11153         * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
11154         instead of init_registers ().
11155         * win32-arm-low.c (init_registers_arm): Add prototype.
11156         (the_low_target): Add initializer for arch_setup field.
11157         * win32-i386-low.c (init_registers_i386): Add prototype.
11158         (the_low_target): Add initializer for arch_setup field.
11159
11160         * spu-low.c (init_registers_spu): Add prototype.
11161         (initialize_low): Call initialie_registers_spu () instead of
11162         initialize_registers ().
11163
11164 2008-02-19  Pedro Alves  <pedro@codesourcery.com>
11165
11166         * server.c (handle_v_requests): When handling the vRun and vAttach
11167         packets, if already debugging a process, don't kill it.  Return an
11168         error instead.
11169
11170 2008-02-17  Daniel Jacobowitz  <dan@codesourcery.com>
11171
11172         * server.c (handle_query): Correct length check.
11173
11174 2008-02-14  Pedro Alves  <pedro_alves@portugalmail.pt>
11175
11176         * win32-low.c (do_initial_child_stuff): Add process handle
11177         parameter.  Set current_process_handle and current_process_id from the
11178         parameters. Clear globals.
11179         (win32_create_inferior): Don't set current_process_handle and
11180         current_process_id here.  Instead pass them on the call to
11181         do_initial_child_stuff.
11182         (win32_attach): Likewise.
11183         (win32_clear_inferiors): New.
11184         (win32_kill): Don't close the current process handle or the
11185         current thread handle here.  Instead call win32_clear_inferiors.
11186         (win32_detach): Don't open a new handle to the process.  Call
11187         win32_clear_inferiors.
11188         (win32_join): Don't rely on current_process_handle; open a new
11189         handle using the process id.
11190         (win32_wait): Call win32_clear_inferiors when the inferior process
11191         has exited.
11192
11193 2008-02-14  Daniel Jacobowitz  <dan@codesourcery.com>
11194
11195         * server.c (monitor_show_help): Add "exit".
11196
11197 2008-02-11  Maxim Grigoriev  <maxim2405@gmail.com>
11198
11199         * Makefile.in (SFILES): Add linux-xtensa-low.c.
11200         (clean): Add reg-xtensa.c.
11201         (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
11202         * configure.srv (xtensa*-*-linux*) New target.
11203         * linux-xtensa-low.c: New.
11204         * xtensa-xtregs.c: New.
11205
11206 2008-02-01  Pedro Alves  <pedro_alves@portugalmail.pt>
11207
11208         * hostio.c: Don't include errno.h.
11209         (errno_to_fileio_errno): Move to hostio-errno.
11210         * hostio.c: (hostio_error): Remove the error parameter.  Defer the
11211         error number outputting to the target->hostio_last_error callback.
11212         (hostio_packet_error): Use FILEIO_EINVAL directly.
11213         (handle_open, handle_pread, hostio_error, handle_unlink): Update
11214         calls to hostio_error.
11215         * hostio-errno.c: New.
11216         * server.h (hostio_last_error_from_errno): Declare.
11217         * target.h (target_ops): Add hostio_last_error member.
11218         * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
11219         as hostio_last_error handler.
11220         * spu-low.c (spu_target_ops): Likewise.
11221         * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
11222         (wince_hostio_last_error): New functions.
11223         (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
11224         as hostio_last_error handler.
11225         (win32_target_ops) [!_WIN32_WCE]: Register
11226         hostio_last_error_from_errno as hostio_last_error handler.
11227         * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
11228         (hostio-errno.o): New rule.
11229         * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
11230         * configure.srv (srv_hostio_err_objs): New variable.  Default to
11231         hostio-errno.o.
11232         (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
11233         * configure: Regenerate.
11234
11235 2008-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
11236
11237         * linux-low.c (linux_attach_lwp): Do not _exit after errors.
11238         (linux_kill, linux_detach): Clean up the process list.
11239         * remote-utils.c (remote_open): Improve port number parsing.
11240         (putpkt_binary, input_interrupt): Only send interrupts if the target
11241         is running.
11242         * server.c (extended_protocol): Make static.
11243         (attached): Define earlier.
11244         (exit_requested, response_needed, program_argv): New variables.
11245         (target_running): New.
11246         (start_inferior): Clear attached here.
11247         (attach_inferior): Set attached here.
11248         (require_running): Define.
11249         (handle_query): Use require_running and target_running.  Implement
11250         "monitor exit".
11251         (handle_v_attach, handle_v_run): New.
11252         (handle_v_requests): Use require_running.  Handle vAttach and vRun.
11253         (gdbserver_usage): Update.
11254         (main): Redo argument parsing.  Handle --debug and --multi.  Handle
11255         --attach along with other options or after the port.  Save
11256         program_argv.  Support no initial program.  Resynchronize
11257         communication with GDB after an error.  Handle "monitor exit".
11258         Use require_running and target_running.  Always allow the extended
11259         protocol.  Do not error out for Hc0 or Hc-1.  Do not automatically
11260         restart in extended mode.
11261         * README: Refer to the GDB manual.  Update --attach usage.
11262
11263 2007-12-20  Andreas Schwab  <schwab@suse.de>
11264
11265         * linux-low.c (STACK_SIZE): Define.
11266         (linux_tracefork_child): Use it.  Use __clone2 on ia64.
11267         (linux_test_for_tracefork): Likewise.
11268
11269 2007-12-18  Daniel Jacobowitz  <dan@codesourcery.com>
11270
11271         * linux-low.c (linux_wait_for_event): Update messages.  Do not
11272         reinsert auto-delete breakpoints.
11273         * mem-break.c (struct breakpoint): Change return type of handler to
11274         int.
11275         (set_breakpoint_at): Update handler type.
11276         (reinsert_breakpoint_handler): Return 1 instead of calling
11277         delete_breakpoint.
11278         (reinsert_breakpoint_by_bp): Check for the original breakpoint before
11279         setting a new one.
11280         (check_breakpoints): Delete auto-delete breakpoints and return 2.
11281         * mem-break.h (set_breakpoint_at): Update handler type.
11282         * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
11283         * win32-low.c (auto_delete_breakpoint): New.
11284         (get_child_debug_event): Use it.
11285
11286 2007-12-16  Daniel Jacobowitz  <dan@codesourcery.com>
11287
11288         * configure.ac: Check for pread and pwrite.
11289         * hostio.c (handle_pread): Fall back to lseek and read.
11290         (handle_pwrite): Fall back to lseek and write.
11291         * config.in, configure: Regenerated.
11292
11293 2007-12-07  Daniel Jacobowitz  <dan@codesourcery.com>
11294
11295         * server.c (myresume): Add own_buf argument.
11296         (main): Update calls.
11297
11298 2007-12-06  Daniel Jacobowitz  <dan@codesourcery.com>
11299
11300         * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
11301         * remote-utils.c (remote_open): Do not call disable_async_io.
11302         (block_async_io): Delete.
11303         (unblock_async_io): Make static.
11304         (initialize_async_io): New.
11305         * server.c (handle_v_cont): Handle async I/O here.
11306         (myresume): Likewise.  Move other common resume tasks here...
11307         (main): ... from here.  Call initialize_async_io.  Disable async
11308         I/O before the main loop.
11309         * server.h (initialize_async_io): Declare.
11310         (block_async_io, unblock_async_io): Delete prototypes.
11311         * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
11312
11313 2007-12-06  Mick Davis  <mickd@goanna.iinet.net.au>
11314
11315         * remote-utils.c (readchar): Allow binary data in received messages.
11316
11317 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11318
11319         * win32-low.c (attaching): New global.
11320         (win32_create_inferior): Clear the `attaching' global.
11321         (win32_attach): Set the `attaching' global.
11322         (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
11323         attaching.  Only set a breakpoint at the entry point if not
11324         attaching.
11325
11326 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11327
11328         * server.c (main): Don't report dll events on the initial
11329         connection on attaches.
11330
11331 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11332
11333         * server.c (main): Relax numerical bases supported for the pid of
11334         the --attach command line argument.
11335
11336 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11337
11338         * win32-low.c (win32_attach): Call OpenProcess before
11339         DebugActiveProcess, not after.  Add last error output to error
11340         call.
11341
11342 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11343
11344         * win32-low.c (win32_get_thread_context)
11345         (win32_set_thread_context): New functions.
11346         (thread_rec): Use win32_get_thread_context.
11347         (continue_one_thread, win32_resume): Use win32_set_thread_context.
11348         * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
11349         field.
11350
11351 2007-12-03  Leo Zayas
11352             Pedro Alves  <pedro_alves@portugalmail.pt>
11353
11354         * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
11355         global variables.
11356         (child_add_thread): Minor cleanup.
11357         (child_continue): Resume artificially suspended threads before
11358         calling ContinueDebugEvent.
11359         (suspend_one_thread): New.
11360         (fake_breakpoint_event): New.
11361         (get_child_debug_event): Change return type to int.  Check here if
11362         gdb sent an interrupt request.  If a soft interrupt was requested,
11363         fake a breakpoint event.  Return 0 if there is no event to handle,
11364         and 1 otherwise.
11365         (win32_wait): Don't check here if gdb sent an interrupt request.
11366         Ensure there is a valid event to handle.
11367         (win32_request_interrupt): Add soft interruption method as last
11368         resort.
11369
11370 2007-12-03  Leo Zayas
11371             Pedro Alves  <pedro_alves@portugalmail.pt>
11372
11373         * win32-low.h (win32_thread_info): Add descriptions to the
11374         structure members.  Replace `suspend_count' counter by a
11375         `suspended' flag.
11376         * win32-low.c (thread_rec): Update condition of when to get the
11377         context from the inferior.  Rely on ContextFlags being set if it
11378         has already been retrieved.  Only suspend the inferior thread if
11379         we haven't already.  Warn if that fails.
11380         (continue_one_thread): s/suspend_count/suspended/.  Only call
11381         ResumeThread once.  Warn if that fails.
11382
11383 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
11384
11385         * win32-low.c (win32_wait): Don't read from the inferior when it
11386         has already exited.
11387
11388 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
11389
11390         * Makefile.in (win32_low_h): New variable.
11391         (win32-low.o): Add dependency on $(win32_low_h).
11392         (win32-arm-low.o, win32-i386-low.o): New rules.
11393
11394 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
11395
11396         * hostio.c: Correct copyright year.
11397
11398 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
11399
11400         * Makefile.in (OBS): Add hostio.o.
11401         (hostio.o): New rule.
11402         * server.h (handle_vFile): Declare.
11403         * hostio.c: New file.
11404         * server.c (handle_v_requests): Take packet_len and new_packet_len
11405         for binary packets.  Call handle_vFile.
11406         (main): Update call to handle_v_requests.
11407
11408 2007-11-05  Daniel Jacobowitz  <dan@codesourcery.com>
11409
11410         * linux-low.c: Include <sched.h>.
11411
11412 2007-11-01  Daniel Jacobowitz  <dan@codesourcery.com>
11413
11414         * linux-low.c (linux_tracefork_grandchild): New.
11415         (linux_tracefork_child): Use clone.
11416         (linux_test_for_tracefork): Use clone; allocate and free a stack.
11417
11418 2007-10-31  Joel Brobecker  <brobecker@adacore.com>
11419
11420         * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
11421
11422 2007-10-24  Daniel Jacobowitz  <dan@codesourcery.com>
11423
11424         * linux-low.c (handle_extended_wait): Handle unexpected signals.
11425
11426 2007-10-23  Daniel Jacobowitz  <dan@codesourcery.com>
11427
11428         * inferiors.c (change_inferior_id): Delete.
11429         (add_pid_to_list, pull_pid_from_list): New.
11430         * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
11431         (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
11432         (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
11433         (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
11434         (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
11435         (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
11436         (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
11437         (using_threads): Always set to 1.
11438         (handle_extended_wait): New.
11439         (add_process): Do not set TID.
11440         (linux_create_inferior): Set must_set_ptrace_flags.
11441         (linux_attach_lwp): Remove TID argument.  Do not check using_threads.
11442         Use PTRACE_SETOPTIONS.  Call new_thread_notify.  Update all callers.
11443         (linux_thread_alive): Rename TID argument to LWPID.
11444         (linux_wait_for_process): Handle unknown processes.  Do not use TID.
11445         (linux_wait_for_event): Do not use TID or check using_threads.  Update
11446         call to dead_thread_notify.  Call handle_extended_wait.
11447         (linux_create_inferior): Use PTRACE_SETOPTIONS.
11448         (send_sigstop): Delete sigstop_sent.
11449         (wait_for_sigstop): Avoid TID.
11450         (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
11451         (linux_test_for_tracefork): New.
11452         (linux_lookup_signals): Use thread_db_active and
11453         linux_supports_tracefork_flag.
11454         (initialize_low): Use thread_db_active and linux_test_for_tracefork.
11455         * linux-low.h (get_process_thread): Avoid TID.
11456         (struct process_ifo): Move thread_known and tid to the end.  Remove
11457         sigstop_sent.
11458         (linux_attach_lwp, thread_db_init): Update prototypes.
11459         * server.h (change_inferior_id): Delete prototype.
11460         (add_pid_to_list, pull_pid_from_list): New prototypes.
11461         * thread-db.c (thread_db_use_events): New.
11462         (find_first_thread): Rename to...
11463         (find_one_thread): ...this.  Update callers and messages.  Do not
11464         call fatal.  Check thread_db_use_events.  Do not call
11465         change_inferior_id or new_thread_notify.
11466         (maybe_attach_thread): Update.  Do not call new_thread_notify.
11467         (thread_db_init): Set thread_db_use_events.  Check use_events.
11468         * utils.c (fatal, warning): Correct message prefix.
11469
11470 2007-10-15  Daniel Jacobowitz  <dan@codesourcery.com>
11471
11472         * Makefile.in (clean): Remove new files.
11473         (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
11474         (powerpc-64.o, powerpc-64.c): New rules.
11475         * configure.srv: Use alternate register sets for powerpc64-*-linux*
11476         with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
11477         with SPE.
11478         * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
11479         SPE targets.
11480         (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
11481         (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
11482         (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
11483         (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
11484         (target_regsets): Add AltiVec and SPE register sets.
11485         * configure.ac: Check for AltiVec and SPE.
11486         * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
11487         (ppc_fill_vrregset, ppc_store_vrregset): New.
11488         (target_regsets): Add AltiVec register set.
11489         * configure: Regenerated.
11490
11491 2007-09-19  Daniel Jacobowitz  <dan@codesourcery.com>
11492
11493         * linux-low.c (O_LARGEFILE): Define.
11494         (linux_read_memory): Use /proc/PID/mem.
11495         * configure.ac: Use AC_GNU_SOURCE.  Check for pread64.
11496         * configure, config.in: Regenerated.
11497
11498 2007-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
11499
11500         * linux-low.c (linux_wait_for_event): Do not pass signals while
11501         single-stepping.
11502
11503 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11504
11505         * win32-low.c (create_process): New.
11506         (win32_create_inferior): Use create_process instead of
11507         CreateProcess.  If create_process failed retry appending an ".exe"
11508         suffix.  Store the GetLastError result immediatelly after
11509         create_process calls and use it on the call to error.
11510
11511 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11512
11513         * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11514
11515 2007-08-23  Joel Brobecker  <brobecker@adacore.com>
11516
11517         * configure.ac: Switch license to GPLv3.
11518
11519 2007-08-01  Michael Snyder  <msnyder@access-company.com>
11520
11521         * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11522
11523 2007-07-31  Pedro Alves  <pedro_alves@portugalmail.pt>
11524
11525         * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11526         typedef.
11527         (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11528         (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL.  Get
11529         CloseToolhelp32Snapshot.
11530         (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11531         CloseToolhelp32Snapshot.
11532
11533 2007-07-27  Michael Snyder  <michael.snyder@access-company.com>
11534
11535         * server.c (main): Check for inferior exit before main loop.
11536
11537 2007-07-18  Pedro Alves  <pedro_alves@portugalmail.pt>
11538
11539         * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11540         instead of on tmp_desc.
11541
11542 2007-07-17  Pedro Alves  <pedro_alves@portugalmail.pt>
11543             Daniel Jacobowitz  <dan@codesourcery.com>
11544
11545         * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11546         (add_thread): Minor cleanups.
11547         (clear_inferiors): Move lower in the file.  Clear the DLL
11548         list.
11549         (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11550         * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11551         (xml_escape_text): New.
11552         * server.c (handle_query): Handle qXfer:libraries:read.  Report it
11553         for qSupported.
11554         (handle_v_cont): Report errors.
11555         (gdbserver_version): Update.
11556         (main): Correct size of own_buf.  Do not report initial DLL events.
11557         * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11558         (unloaded_dll, xml_escape_text): New.
11559         * win32-low.c (enum target_waitkind): Update comments.
11560         (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11561         (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11562         (win32_EnumProcessModules, win32_GetModuleInformation)
11563         (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11564         (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11565         (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11566         (win32_Module32First, win32_Module32Next, load_toolhelp)
11567         (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11568         (get_child_debug_event): Handle DLL events.
11569         (win32_wait): Likewise.
11570
11571 2007-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
11572
11573         * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11574         * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11575
11576 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
11577
11578         * win32-low.c (handle_output_debug_string): Ignore event if not
11579         waiting.
11580
11581 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
11582
11583         * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11584
11585 2007-07-03  Daniel Jacobowitz  <dan@codesourcery.com>
11586
11587         * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11588
11589 2007-07-02  Daniel Jacobowitz  <dan@codesourcery.com>
11590
11591         * inferiors.c (change_inferior_id): Add comment.
11592         * linux-low.c (check_removed_breakpoint): Add an early
11593         prototype.  Improve debug output.
11594         (linux_attach): Doc update.
11595         (linux_detach_one_process, linux_detach): Clean up before releasing
11596         each process.
11597         (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11598         * linux-low.h (struct process_info): Doc improvement.
11599         * mem-break.c (delete_all_breakpoints): New.
11600         * mem-break.h (delete_all_breakpoints): New prototype.
11601         * thread-db.c (find_first_thread): New.
11602         (thread_db_create_event): Call it instead of
11603         thread_db_find_new_threads.  Clean up unused variables.
11604         (maybe_attach_thread): Remove first thread handling.
11605         (thread_db_find_new_threads): Use find_first_thread.
11606         (thread_db_get_tls_address): Likewise.
11607
11608 2007-06-27  Daniel Jacobowitz  <dan@codesourcery.com>
11609
11610         * thread-db.c (thread_db_find_new_threads): Add prototype.
11611         (thread_db_create_event): Check for the main thread before adding
11612         a new thread.
11613         (maybe_attach_thread): Only enable event reporting if TID == 0.
11614         (thread_db_get_tls_address): Check for new threads.
11615
11616 2007-06-20  Daniel Jacobowitz  <dan@codesourcery.com>
11617
11618         * linux-low.c (linux_create_inferior): Try execv before execvp.
11619         * spu-low.c (spu_create_inferior): Likewise.
11620
11621 2007-06-13  Mike Frysinger  <vapier@gentoo.org>
11622
11623         * linux-low.c (linux_create_inferior): Change execv to execvp.
11624         * spu-low.c (spu_create_inferior): Likewies.
11625
11626 2007-06-13  Daniel Jacobowitz  <dan@codesourcery.com>
11627
11628         * Makefile.in (clean): Clean new files instead of deleted ones.
11629         (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11630         (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11631         rules.
11632         * configure.srv: Specify XML files and new regformats for MIPS and
11633         MIPS64 GNU/Linux.
11634         * linux-mips-low.c (mips_num_regs): Set to only used registers.
11635         (mips_regmap): Do not fetch $0.  Remove unused registers.  Add
11636         an entry for the restart register.
11637         (mips_cannot_fetch_register, mips_cannot_store_register)
11638         (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11639         register names to match the XML descriptions.
11640         (mips_fill_gregset, mips_store_gregset): Likewise.  Handle the
11641         restart register instead of $0.
11642
11643 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
11644             Markus Deuling  <deuling@de.ibm.com>
11645
11646         * remote-utils.c (decode_xfer_write): New function.
11647         * server.h (decode_xfer_write): Add prototype.
11648         * server.c (handle_query): Add PACKET_LEN argument.  Support
11649         qXfer:spu:read and qXfer:spu:write packets.
11650         (main): Pass packet_len to handle_query.
11651         * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11652         * target.h (target_ops): Add qxfer_spu.
11653
11654 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
11655
11656         * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11657         accessing non-seekable spufs files.
11658
11659 2007-05-16  Markus Deuling  <deuling@de.ibm.com>
11660
11661         * server.c (handle_query): Add reply for qC packet.
11662
11663 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
11664             Leo Zayas  <lerele@champenstudios@com>
11665
11666         * server.h (check_remote_input_interrupt_request): New function.
11667         * remote_utils.c (INVALID_DESCRIPTOR): New define.
11668         (remote_desc): Initialize with INVALID_DESCRIPTOR.
11669         (input_interrupt): Expose on USE_WIN32API too.  Fix whitespace.
11670         (check_remote_input_interrupt_request): New function.
11671         * server.h (check_remote_input_interrupt_request): Declare.
11672         * win32-low.c (winapi_DebugBreakProcess,
11673         winapi_GenerateConsoleCtrlEvent): New typedefs.
11674         (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11675         to 250 ms.
11676         (win32_wait): Check for remote interrupt request
11677         with check_remote_input_interrupt_request.
11678         (win32_request_interrupt): New function.
11679         (win32_target_op): Set request_interrupt to win32_request_interrupt.
11680
11681 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
11682
11683         * win32-low.c (debug_registers_changed,
11684         debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11685         CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11686         CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11687         (thread_rec): Get context using the low target.
11688         (child_add_thread): Call thread_added on the low target,
11689         which does the same thing.
11690         (regptr): Delete.
11691         (do_initial_child_stuff): Remove debug registers references.
11692         Set context using the low target.  Resume threads after
11693         setting the contexts.
11694         (child_continue): Remove dead variable.  Remove debug
11695         registers references.
11696         (child_fetch_inferior_registers): Go through the low target.
11697         (do_child_store_inferior_registers): Remove.
11698         (child_store_inferior_registers): Go through the low target.
11699         (win32_resume): Remove debug registers references.
11700         Set context using the low target.
11701         (handle_exception): Change return type to void.  Don't record
11702         context here.  Set status to TARGET_WAITKIND_SPURIOUS on a
11703         first chance exception.
11704         (get_child_debug_event): Change return type to void.  Remove
11705         goto loop.  Always return after waiting for debug event.
11706         (win32_wait): Convert to switch statement.  Handle spurious
11707         events.
11708
11709         * win32-i386-low.c (debug_registers_changed,
11710         debug_registers_used): New.
11711         (initial_stuff): Rename to ...
11712         (i386_initial_stuff): ... this.  Clear debug registers
11713         state variables.
11714         (store_debug_registers): Delete.
11715         (i386_get_thread_context): New.
11716         (load_debug_registers): Delete.
11717         (i386_set_thread_context): New.
11718         (i386_thread_added): New.
11719         (single_step): Rename to ...
11720         (i386_single_step): ... this.
11721         (do_fetch_inferior_registers): Rename to ...
11722         (i386_fetch_inferior_register): ... this.
11723         (i386_store_inferior_register): New.
11724         (the_low_target): Adapt to new interface.
11725
11726         * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11727         (arm_get_thread_context): New.
11728         (arm_set_thread_context): New.
11729         (regptr): New.
11730         (do_fetch_inferior_registers): Rename to ...
11731         (arm_fetch_inferior_register): ... this.
11732         (arm_store_inferior_register): New.
11733         (arm_wince_breakpoint): Reimplement as unsigned long.
11734         (arm_wince_breakpoint_len): Define.
11735         (the_low_target): Adapt to new interface.
11736
11737         * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11738         load_debug_registers.  Add get_thread_context, set_thread_context,
11739         thread_added and store_inferior_register.  Rename
11740         fetch_inferior_registers to fetch_inferior_register.
11741         (regptr): Remove declaration.
11742
11743 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
11744
11745         * linux-low.c (linux_detach): Change return type to int.  Return 0.
11746         * spu-low.c (spu_detach): Likewise.
11747
11748 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
11749
11750         * target.h (target_ops): Change return type of detach to int.
11751         Add join.
11752         (join_inferior): New.
11753         * server.c (main): Don't skip detach support on mingw32.
11754         If the inferior doesn't support detaching return error.
11755         Call join_inferior instead of using waitpid.
11756         * linux-low.c (linux_join): New.
11757         (linux_target_op): Add linux_join.
11758         * spu-low.c (spu_join): New.
11759         (spu_target_ops): Add spu_join.
11760         * win32-low.c (win32_detach): Adapt to new interface.
11761         Reopen current_process_handle before detaching.  Issue a child
11762         resume before detaching.
11763         (win32_join): New.
11764         (win32_target_op): Add win32_join.
11765
11766 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
11767
11768         * win32-low.c (win32-attach): Fix return value.
11769         * target.h (target_ops): Describe ATTACH return values.
11770
11771 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
11772
11773         * win32-low.c (GETPROCADDRESS): Define.
11774         (winapi_DebugActiveProcessStop): Add WINAPI.  typedef as pointer.
11775         (winapi_DebugSetProcessKillOnExit): Likewise.
11776         (win32_create_inferior): Force usage of ansi CreateProcessA.
11777         (win32_attach): Use GETPROCADDRESS.
11778         (win32_detach): Likewise.
11779
11780 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
11781
11782         * win32-low.c (win32_wait): Don't use WSTOPSIG.
11783
11784 2007-03-30  Pedro Alves  <pedro_alves@portugalmail.pt>
11785
11786         * win32-low.c: Commit leftover changes from 2007-03-29.
11787
11788 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
11789
11790         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11791         fields short instead of int.  Add explicit padding.
11792         (i387_cache_to_fsave): Remove unnecessary casts.
11793         (i387_fsave_to_cache): Doc fix.
11794         (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11795
11796 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
11797
11798         * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11799         (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11800
11801 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
11802
11803         * configure.srv (arm*-*-mingw32ce*): Move near the other
11804         arm targets.
11805
11806 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
11807
11808         * configure.ac: Add errno checking.
11809         (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11810         sys/file.h and malloc.h.
11811         (AC_CHECK_DECLS): Add perror.
11812         (srv_mingwce): Handle.
11813         * configure.srv (i[34567]86-*-cygwin*): Add
11814         win32-i386-low.o to srv_tgtobj.
11815         (i[34567]86-*-mingw*): Likewise.
11816         (arm*-*-mingw32ce*): Add case.
11817         * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11818         HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11819         [__MINGW32CE__] (strerror): New function.
11820         [__MINGW32CE__] (errno): Define to GetLastError.
11821         [__MINGW32CE__] (COUNTOF): New macro.
11822         (remote_open): Remove extra close call.
11823         * mem-break.c (delete_breakpoint_at): New function.
11824         * mem-break.h (delete_breakpoint_at): Declare.
11825         * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11826         HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11827         [USE_WIN32API] (read, write): Add char* casts.
11828         * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11829         * server.h: Include wincecompat.h on Windows CE.
11830         [HAVE_ERRNO_H]: Check.
11831         (perror): Declare if not declared.
11832         * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11833         (perror_with_name): Remove errno declaration.
11834         * wincecompat.h: New.
11835         * wincecompat.c: New.
11836         * win32-low.h: New.
11837         * win32-arm-low.c: New.
11838         * win32-i386-low.c: New.
11839         (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11840         (OUTMSG2): Make it safe.
11841         (_T): New macro.
11842         (COUNTOF): New macro.
11843         (NUM_REGS): Get it from the low target.
11844         (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11845         CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11846         (thread_rec): Let low target handle debug registers.
11847         (child_add_thread): Likewise.
11848         (child_init_thread_list): Likewise.
11849         (continue_one_thread): Likewise.
11850         (regptr): New.
11851         (do_child_fetch_inferior_registers): Move to ...
11852         * win32-i386-low.c: ... here, and rename to ...
11853         (do_fetch_inferior_registers): ... this.
11854         * win32-low.c (child_fetch_inferior_registers):
11855         Go through the low target.
11856         (do_child_store_inferior_registers): Use regptr.
11857         (strwinerror): New function.
11858         (win32_create_inferior): Handle Windows CE.
11859         Use strwinerror instead of strerror on Windows error
11860         codes.  Add program to the error output.
11861         Don't close the main thread handle on Windows CE.
11862         (win32_attach): Use coredll.dll on Windows CE.
11863         (win32_kill): Close current process and current
11864         thread handles.
11865         (win32_detach): Use coredll.dll on Windows CE.
11866         (win32_resume): Let low target handle debug registers, and
11867         step request.
11868         (handle_exception): Add/Remove initial breakpoint.  Avoid
11869         non-existant WSTOPSIG on Windows CE.
11870         (win32_read_inferior_memory): Cast to remove warning.
11871         (win32_arch_string): Go through the low target.
11872         (initialize_low): Call set_breakpoint_data with the low
11873         target's breakpoint.
11874         * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11875         FOP_REGNUM, mappings): Move to ...
11876         * win32-i386-low.c: ... here.
11877         * win32-low.c (win32_thread_info): Move to ...
11878         * win32-low.h: ... here.
11879         * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11880         win32-arm-low.c and wincecompat.c.
11881         (all:): Add $EXEEXT.
11882         (install-only:): Likewise.
11883         (gdbserver:): Likewise.
11884         (gdbreplay:): Likewise.
11885         * config.in: Regenerate.
11886         * configure: Regenerate.
11887
11888 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
11889
11890         * win32-low.c: Rename typedef thread_info to
11891         win32_thread_info throughout.
11892
11893 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
11894
11895         * win32-i386-low.c: Rename to ...
11896         * win32-low.c: ... this.
11897         * configure.srv: Replace win32-i386-low.o with win32-low.o.
11898         * Makefile.in: Likewise.
11899
11900 2007-03-27  Pedro Alves  <pedro_alves@portugalmail.pt>
11901
11902         * remote-utils.c (monitor_output): Constify msg parameter.
11903         * server.h (monitor_output): Likewise.
11904         * win32-i386-low.c (handle_output_debug_string): New.
11905         (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11906         handle_output_debug_string.
11907         (get_child_debug_event): Likewise.
11908
11909 2007-03-27  Mat Hostetter  <mat@lcs.mit.edu>
11910
11911         * server.c (main): Correct strtoul check.
11912
11913 2007-03-27  Jon Ringle  <jon@ringle.org>
11914
11915         * linux-low.c: Check __ARCH_HAS_MMU__ also.
11916
11917 2007-03-27  Brooks Moses  <brooks.moses@codesourcery.com>
11918
11919         * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11920
11921 2007-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
11922
11923         * terminal.h: Check HAVE_SGTTY_H.
11924
11925 2007-02-27  Mat Hostetter  <mat@lcs.mit.edu>
11926
11927         * remote-utils.c (remote_open): Print out the assigned port number.
11928
11929 2007-02-26  Daniel Jacobowitz  <dan@codesourcery.com>
11930
11931         * remote-utils.c (monitor_output): New function.
11932         * server.c (debug_threads): Define here.
11933         (monitor_show_help): New function.
11934         (handle_query): Handle qRcmd.
11935         (main): Do not handle 'd' packet.
11936         * server.h (debug_threads, remote_debug, monitor_output): Declare.
11937         * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11938         of debug_threads.
11939
11940 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
11941
11942         * Makefile.in (EXEEXT): New.
11943         (clean): Use $(EXEEXT).
11944
11945 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
11946
11947         * target.h (target_ops): Rename send_signal to request_interrupt,
11948         and remove enum target_signal parameter.
11949         * linux-low.c (linux_request_interrupt): Rename from
11950         linux_send_signal, and always send SIGINT.
11951         * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11952         and always send SIGINT.
11953         * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11954         of send_signal.
11955         (input_interrupt): Likewise.
11956
11957 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
11958
11959         * server.c (get_features_xml): Check if target implemented
11960         arch_string.
11961         * win32-i386-low.c (win32_arch_string): New.
11962         (win32_target_ops): Add win32_arch_string as arch_string member.
11963
11964 2007-02-22  Markus Deuling  <deuling@de.ibm.com>
11965
11966         * spu-low.c (spu_arch_string): New.
11967         (spu_target_ops): Add spu_arch_string.
11968
11969 2007-02-16  Daniel Jacobowitz  <dan@codesourcery.com>
11970
11971         * remote-utils.c: Remove HAVE_TERMINAL_H check.
11972         * configure.ac: Do not check for terminal.h.
11973         * configure, config.in: Regenerated.
11974
11975 2007-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
11976
11977         * Makefile.in (OBS): Add $(XML_BUILTIN).
11978         (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11979         (clean): Update.
11980         (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11981         (arm-with-iwmmxt.c): New.
11982         * config.in, configure: Regenerate.
11983         * configure.ac: Check for iWMMXt.  Handle srv_xmltarget,
11984         srv_xmlbuiltin, and srv_xmlfiles.  Define USE_XML.
11985         * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11986         (arm*-*-linux*): Add iWMMXt and regset support.
11987         * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11988         (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11989         (arm_store_wmmxregset, target_regsets): New.
11990         * server.c (get_features_xml): Take annex argument.  Check builtin
11991         XML documents.
11992         (handle_query): Handle multiple annexes.
11993
11994 2007-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
11995
11996         * remote-utils.c [USE_WIN32API] (read, write): Define.
11997         (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11998         write.
11999
12000 2007-01-09  Daniel Jacobowitz  <dan@codesourcery.com>
12001
12002         * linux-i386-low.c (the_low_target): Set arch_string.
12003         * linux-x86-64-low.c (the_low_target): Likewise.
12004         * linux-low.c (linux_arch_string): New.
12005         (linux_target_ops): Add it.
12006         * linux-low.h (struct linux_target_ops): Add arch_string.
12007         * server.c (write_qxfer_response): Use const void * for DATA.
12008         (get_features_xml): New.
12009         (handle_query): Handle qXfer:features:read.  Report it for qSupported.
12010         * target.h (struct target_ops): Add arch_string method.
12011
12012 2007-01-03  Denis Pilat  <denis.pilat@st.com>
12013             Daniel Jacobowitz  <dan@codesourcery.com>
12014
12015         * linux-low.c (linux_kill): Handle being called with no threads.
12016         * win32-i386-low.c (win32_kill): Likewise.
12017         (get_child_debug_event): Clear current_process_handle.
12018
12019 2006-12-30  Denis PILAT  <denis.pilat@st.com>
12020             Daniel Jacobowitz  <dan@codesourcery.com>
12021
12022         * remote-utils.c (remote_open): Check the type of specified
12023         serial port devices before opening them.
12024         * server.c (main): Kill the inferior if an error occurs during
12025         the first remote_open.
12026
12027 2006-12-05  Markus Deuling  <deuling@de.ibm.com>
12028
12029         * README: Update supported targets.
12030
12031 2006-11-28  Daniel Jacobowitz  <dan@codesourcery.com>
12032
12033         * Makefile.in (clean): Remove reg-mips64.c.
12034         (reg-mips64.c, reg-mips64.o): New rules.
12035         * configure.srv: Handle mips64.  Include regset support for mips.
12036         * linux-mips-low.c (union mips_register): New.
12037         (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
12038         (mips_breakpoint, mips_breakpoint_at): Use int.
12039         (mips_collect_register, mips_supply_register)
12040         (mips_collect_register_32bit, mips_supply_register_32bit)
12041         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12042         (mips_store_fpregset, target_regsets): New.
12043         * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
12044
12045 2006-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
12046
12047         * configure.srv: Add target "spu*-*-*".
12048         * Makefile.in (clean): Remove reg-spu.c.
12049         (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
12050         * spu-low.c: New file.
12051
12052 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
12053
12054         * configure.ac: Correct td_thr_tls_get_addr test.
12055         * configure: Regenerated.
12056
12057 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
12058
12059         * linux-low.c (linux_wait_for_event): Reformat.  Use the
12060         pass_signals array.
12061         * remote-utils.c (decode_address_to_semicolon): New.
12062         * server.c (pass_signals, handle_general_set): New.
12063         (handle_query): Mention QPassSignals for qSupported.
12064         (main): Call handle_general_set.
12065         * server.h (pass_signals, decode_address_to_semicolon): New.
12066
12067 2006-11-06  Daniel Jacobowitz  <dan@codesourcery.com>
12068
12069         * server.c (handle_query): Correct error handling for read_auxv.
12070
12071 2005-10-19  Ulrich Weigand  <uweigand@de.ibm.com>
12072
12073         * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
12074         and srv_linux_thread_db to yes.
12075         * linux-s390-low.c (s390_fill_gregset): New function.
12076         (target_regsets): Define data structure.
12077
12078 2006-10-17  Daniel Jacobowitz  <dan@codesourcery.com>
12079
12080         * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
12081         * configure.ac: Use it.  Define HAVE_TD_THR_TLS_GET_ADDR.
12082         * config.in, configure: Regenerated.
12083         * inferiors.c (gdb_id_to_thread): New function.
12084         (gdb_id_to_thread_id): Use it.
12085         * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
12086         * linux-low.h (struct process_info): Add th member.
12087         (thread_db_get_tls_address): New prototype.
12088         * remote-utils.c (decode_address): Make non-static.
12089         * server.c (handle_query): Handle qGetTLSAddr.
12090         * server.h (gdb_id_to_thread, decode_address): New prototypes.
12091         * target.h (struct target_ops): Add get_tls_address.
12092         * thread-db.c (maybe_attach_thread): Save the thread handle.
12093         (thread_db_get_tls_address): New.
12094
12095 2006-09-28  Daniel Jacobowitz  <dan@codesourcery.com>
12096
12097         * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
12098         (linux_resume_one_process): Take a siginfo_t *.  Update all
12099         callers.  Queue it if necessary.  Use PTRACE_SETSIGINFO.
12100         (struct pending_signals): Add a siginfo_t.
12101         (linux_wait_for_process): Always set last_status.
12102         (linux_wait_for_event): Use PTRACE_GETSIGINFO.
12103         (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
12104         * linux-low.h (struct process_info): Add last_status.
12105
12106 2006-09-21  Daniel Jacobowitz  <dan@codesourcery.com>
12107
12108         * remote-utils.c (try_rle): New function.
12109         (putpkt_binary): Use it.
12110
12111 2006-08-19  Daniel Jacobowitz  <dan@codesourcery.com>
12112
12113         * Makefile.in (clean): Clean reg-x86-64-linux.c.
12114         (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
12115         * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
12116         * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
12117         (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
12118         point registers.
12119
12120 2006-08-08  Richard Sandiford  <richard@codesourcery.com>
12121
12122         * server.c (terminal_fd): New variable.
12123         (old_foreground_pgrp): Likewise.
12124         (restore_old_foreground_pgrp): New function.
12125         (start_inferior): Record the terminal file descriptor in terminal_fd
12126         and its original foreground group in old_foreground_pgrp.  Register
12127         restore_old_foreground_pgrp with atexit().
12128
12129 2006-07-26  Daniel Jacobowitz  <dan@codesourcery.com>
12130
12131         * server.c (handle_query): Correct qPart to qXfer.
12132
12133 2006-07-22  Daniel Jacobowitz  <dan@codesourcery.com>
12134
12135         * configure.ac: Check for more headers which are missing on
12136         Windows.  Automatically supply -lwsock32 and USE_WIN32API.
12137         * configure.srv: Add Cygwin and mingw32.
12138         * remote-utils.c: Don't include headers unconditionally which
12139         are missing on mingw32.  Include <winsock.h> for mingw32.
12140         (remote_open): Adjust for mingw32 support.  Flush
12141         standard error after writing to it.
12142         (remote_close, putpkt_binary, input_interrupt, block_async_io)
12143         (unblock_async_io, enable_async_io, disable_async_io)
12144         (readchar, getpkt): Update for Winsock support.
12145         (prepare_resume_reply): Expect a protocol signal number.
12146         * server.c: Disable <sys/wait.h> on mingw32.
12147         (start_inferior): Adjust for mingw32 support.  Flush
12148         standard error after writing to it.
12149         (attach_inferior): Likewise.  Use protocol signal
12150         numbers.
12151         (main): Skip 'D' packet on mingw32.  Use protocol signal numbers
12152         and names.
12153         * win32-i386-low.c: New file.
12154         * Makefile.in (XM_CLIBS): Set.
12155         (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
12156         (win32-i386-low.o): New dependency rule.
12157         * linux-low.c (linux_wait): Use target signal numbers.
12158         * target.h (struct target_ops): Doc fix.
12159         * server.h (target_signal_to_name): New prototype.
12160         * gdbreplay.c: Don't include headers unconditionally which
12161         are missing on mingw32.  Include <winsock.h> for mingw32.
12162         (remote_close, remote_open): Adjust for Winsock support.
12163         * configure, config.in: Regenerated.
12164
12165 2006-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
12166
12167         * server.c (decode_xfer_read, write_qxfer_response): New.
12168         (handle_query): Take a packet length argument.  Handle
12169         qXfer:auxv:read instead of qPart:auxv:read.  Mention it in
12170         the qSupported response.
12171         (main): Update call to handle_query.
12172
12173 2006-06-22  Daniel Jacobowitz  <dan@codesourcery.com>
12174
12175         * remote-utils.c (remote_escape_output, remote_unescape_input): New.
12176         (putpkt_binary): Renamed from putpkt and adjusted for binary
12177         data.
12178         (putpkt): New wrapper for putpkt_binary.
12179         (readchar): Don't mask off the high bit.
12180         (decode_X_packet): New function.
12181         * server.c (main): Call putpkt_binary if a handler sets the packet
12182         length.  Save the length of the incoming packet.  Handle 'X'.
12183         * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
12184
12185 2006-06-21  Daniel Jacobowitz  <dan@codesourcery.com>
12186
12187         * server.c (handle_query): Handle qSupported.
12188
12189 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
12190
12191         * remote-utils.c (all_symbols_looked_up): New variable.
12192         (look_up_one_symbol): Check it.
12193         * server.h (look_up_one_symbol): New declaration.
12194         * thread-db.c (thread_db_init): Set all_symbols_looked_up.
12195
12196 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
12197
12198         * Makefile.in (linux-arm-low.o): Update dependencies.
12199         * linux-arm-low.c: Include "gdb_proc_service.h".
12200         (PTRACE_GET_THREAD_AREA): Define.
12201         (ps_get_thread_area): New function.
12202
12203 2006-05-09  Nathan Sidwell  <nathan@codesourcery.com>
12204
12205         * configure.srv (m68k*-*-uclinux*): New target.
12206         * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
12207         (linux_resume_one_process): Remove extraneous cast.
12208         (linux_read_offsets): New.
12209         (linux_target_op): Add linux_read_offsets on mmuless systems.
12210         * server.c (handle_query): Add qOffsets logic.
12211         * target.h (struct target_ops): Add read_offsets.
12212
12213 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
12214
12215         * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
12216         (PTRACE_GET_THREAD_AREA): Define.
12217         (ps_get_thread_area): New function.
12218         * Makefile.in (linux-i386-low.o, linux-mips-low.o)
12219         (linux-x86-64-low.o): Update.
12220
12221 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
12222
12223         * configure.ac: Remove checks for prfpregset_t.
12224         * gdb_proc_service.h: New file.
12225         * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
12226         new "gdb_proc_service.h".
12227         * proc-service.c: Likewise.
12228         (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
12229         (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
12230         * Makefile.in (gdb_proc_service_h): Updated.
12231         * configure, config.in: Regenerated.
12232
12233 2006-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
12234
12235         * remote-utils.c (prepare_resume_reply): Move declaration
12236         of gdb_id_from_wait to the top of the block.
12237
12238 2006-02-15  Daniel Jacobowitz  <dan@codesourcery.com>
12239
12240         * linux-low.c (regsets_store_inferior_registers): Read the regset
12241         from the target before filling it.
12242
12243 2006-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
12244
12245         * server.c (attach_inferior): Return SIGTRAP for a successful
12246         attach.
12247
12248 2006-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
12249
12250         * Makefile.in (OBS): Add version.o.
12251         (STAGESTUFF): Delete.
12252         (version.o): Add dependencies.
12253         (version.c): Replace rule.
12254         (clean): Remove version.c.
12255         * server.c (gdbserver_version): New.
12256         (gdbserver_usage): Use printf.
12257         (main): Handle --version and --help.
12258         * server.h (version, host_name): Add declarations.
12259
12260 2005-12-23  Eli Zaretskii  <eliz@gnu.org>
12261
12262         * linux-arm-low.c:
12263         * linux-arm-low.c:
12264         * inferiors.c:
12265         * i387-fp.h:
12266         * i387-fp.c:
12267         * gdbreplay.c:
12268         * regcache.c:
12269         * proc-service.c:
12270         * mem-break.h:
12271         * mem-break.c:
12272         * linux-x86-64-low.c:
12273         * linux-sh-low.c:
12274         * linux-s390-low.c:
12275         * linux-ppc64-low.c:
12276         * linux-ppc-low.c:
12277         * linux-mips-low.c:
12278         * linux-m68k-low.c:
12279         * linux-m32r-low.c:
12280         * linux-low.h:
12281         * linux-low.c:
12282         * linux-ia64-low.c:
12283         * linux-i386-low.c:
12284         * linux-crisv32-low.c:
12285         * thread-db.c:
12286         * terminal.h:
12287         * target.h:
12288         * target.c:
12289         * server.h:
12290         * server.c:
12291         * remote-utils.c:
12292         * regcache.h:
12293         * utils.c:
12294         * Makefile.in:
12295         * configure.ac:
12296         * gdbserver.1: Add (C) after Copyright.  Update the FSF
12297         address.
12298
12299 2005-11-13  Daniel Jacobowitz  <dan@codesourcery.com>
12300
12301         * linux-arm-low.c (arm_eabi_breakpoint): New variable.
12302         (arm_breakpoint_at): Recognize both breakpoints.
12303         (the_low_target): Use the correct breakpoint instruction.
12304
12305 2005-11-02  Daniel Jacobowitz  <dan@codesourcery.com>
12306
12307         * configure.srv (x86_64-*-linux*): Turn on thread_db support.
12308         * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
12309         (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
12310         (the_low_target): Update.
12311
12312 2005-10-25  Andreas Schwab  <schwab@suse.de>
12313
12314         * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
12315
12316         * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
12317         (ia64_num_regs): Reduce to 462.
12318
12319 2005-09-17  Daniel Jacobowitz  <dan@codesourcery.com>
12320
12321         * acinclude.m4: Correct quoting.
12322         * aclocal.m4: Regenerated.
12323
12324         Suggested by SZOKOVACS Robert <szo@ies.hu>:
12325         * thread-db.c (thread_db_err_str): Handle TD_VERSION.
12326         (thread_db_init): Call thread_db_err_str.
12327         * configure.ac: Check for TD_VERSION.
12328         * config.in, configure: Regenerated.
12329
12330 2005-07-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12331
12332         * server.h (error, fatal, warning): Add ATTR_FORMAT.
12333
12334 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
12335
12336         * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
12337         is not available.  Define HAVE_PTRACE_GETREGS if it is.
12338         * config.in, configure: Regenerated.
12339         * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
12340         * linux-i386-low.c, linux-m68k-low.c: Update to use
12341         HAVE_PTRACE_GETREGS.
12342         * linux-low.c (regsets_fetch_inferior_registers)
12343         (regsets_store_inferior_registers): Only return 0 if we processed
12344         GENERAL_REGS.
12345         * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
12346         * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
12347
12348 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
12349
12350         * inferiors.c (struct thread_info): Add gdb_id.
12351         (add_thread): Add gdb_id argument.
12352         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
12353         * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
12354         calls to add_thread.
12355         * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
12356         * server.c (handle_query): Use thread_to_gdb_id.
12357         (handle_v_cont, main): Use gdb_id_to_thread_id.
12358         * server.h (add_thread): Update prototype.
12359         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
12360         prototypes.
12361
12362 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
12363
12364         * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
12365         left-padded registers.
12366         * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
12367         * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
12368
12369 2005-07-01  Steve Ellcey  <sje@cup.hp.com>
12370
12371         * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
12372         * configure: Regenerate.
12373         * config.in: Regenerate.
12374         * server.h (NEED_DECLARATION_STRERROR):
12375         Replace with !HAVE_DECL_STRERROR.
12376
12377 2005-06-16  Daniel Jacobowitz  <dan@codesourcery.com>
12378
12379         * linux-low.c (linux_wait, linux_send_signal): Don't test
12380         an unsigned long variable for > 0 if it could be MAX_ULONG.
12381         * server.c (myresume): Likewise.
12382         * target.c (set_desired_inferior): Likewise.
12383
12384 2005-06-13  Mark Kettenis  <kettenis@gnu.org>
12385
12386         * configure.ac: Simplify and improve check for socklen_t.
12387         * configure, config.in: Regenerate.
12388
12389 2005-06-12  Daniel Jacobowitz  <dan@codesourcery.com>
12390
12391         * acconfig.h: Remove.
12392         * configure.ac: Add a test for socklen_t.  Use three-argument
12393         AC_DEFINE throughout.
12394         * config.in: Regenerated using autoheader 2.59.
12395         * configure: Regenerated.
12396
12397         * gdbreplay.c (socklen_t): Provide a default.
12398         (remote_open): Use socklen_t.
12399         * remote-utils.c (socklen_t): Provide a default.
12400         (remote_open): Use socklen_t.
12401         (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
12402         unsigned char.
12403
12404         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
12405         char for buffers.
12406         * linux-low.c (linux_read_memory, linux_write_memory)
12407         (linux_read_auxv): Likewise.
12408         * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
12409         (check_mem_write): Likewise.
12410         * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
12411         Likewise.
12412         * regcache.c (struct inferior_rgcache_data, registers_to_string)
12413         (registers_from_string, register_data): Likewise.
12414         * server.c (handle_query, main): Likewise.
12415         * server.h (convert_ascii_to_int, convert_int_to_ascii)
12416         (decode_M_packet): Likewise.
12417         * target.c (read_inferior_memory, write_inferior_memory): Likewise.
12418         * target.h (struct target_ops): Update read_memory, write_memory,
12419         and read_auxv.
12420         (read_inferior_memory, write_inferior_memory): Update.
12421         * linux-low.h (struct linux_target_ops): Change type of breakpoint
12422         to unsigned char *.
12423         * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
12424         linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
12425         linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
12426         linux-s390-low.c, linux-sh-low.c: Update for changes in
12427         read_inferior_memory and the_low_target->breakpoint.
12428
12429 2005-05-28  Daniel Jacobowitz  <dan@codesourcery.com>
12430
12431         * Makefile.in (SFILES): Add linux-ppc64-low.c.
12432         (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
12433         * configure.srv: Add powerpc64-*-linux*.
12434         * linux-ppc64-low.c: New file.
12435
12436 2005-05-23  Orjan Friberg  <orjanf@axis.com>
12437
12438         * linux-cris-low.c: New file with support for CRIS.
12439         * linux-crisv32-low.c: Ditto for CRISv32.
12440         * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
12441         (clean): Add reg-cris.c and reg-crisv32.c.
12442         Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
12443         reg-crisv32.o, and reg-crisv32.c to make rules.
12444         * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
12445         recognized targets.
12446
12447 2005-05-16  Ulrich Weigand  <uweigand@de.ibm.com>
12448
12449         * linux-low.c (fetch_register): Ensure buffer size is a multiple
12450         of sizeof (PTRACE_XFER_TYPE).
12451         (usr_store_inferior_registers): Likewise.  Zero out excess bytes.
12452
12453 2005-05-12  Orjan Friberg  <orjanf@axis.com>
12454
12455         * target.h (struct target_ops): Add insert_watchpoint,
12456         remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
12457         pointers for hardware watchpoint support.
12458         * linux-low.h (struct linux_target_ops): Ditto.
12459         * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
12460         (linux_stopped_by_watchpoint, linux_stopped_data_address): New.  Add
12461         to linux_target_ops.
12462         * remote-utils.c (prepare_resume_reply): Add watchpoint information to
12463         reply packet.
12464         * server.c (main): Recognize 'Z' and 'z' packets.
12465
12466 2005-05-10  Ulrich Weigand  <uweigand@de.ibm.com>
12467
12468         * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
12469         (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
12470         (the_low_target): Add new members.
12471
12472 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
12473
12474         * proc-service.c (ps_lgetregs): Search all_processes instead of
12475         all_threads.
12476
12477 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
12478
12479         * server.c (start_inferior): Change return type to int.
12480         (attach_inferior): Change sigptr to int *.
12481         (handle_v_cont, handle_v_requests): Change signal to int *.
12482         (main): Change signal to int.
12483
12484 2005-04-15  Kei Sakamoto  <sakamoto.kei@renesas.com>
12485
12486         * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
12487         * configure.srv: Add m32r*-*-linux*.
12488         * linux-m32r-low.c: New file.
12489
12490 2005-03-04  Daniel Jacobowitz  <dan@codesourcery.com>
12491
12492         * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
12493
12494 2005-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
12495
12496         * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
12497         Take unsigned long arguments for PIDs.
12498         * linux-low.c (add_process, linux_attach_lwp, linux_attach)
12499         (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
12500         (wait_for_sigstop, linux_resume_one_process)
12501         (regsets_fetch_inferior_registers, linux_send_signal)
12502         (linux_read_auxv): Likewise.  Update the types of variables holding
12503         PIDs.  Update format string specifiers.
12504         * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
12505         * remote-utils.c (prepare_resume_reply): Likewise.
12506         * server.c (cont_thread, general_thread, step_thread)
12507         (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
12508         unsigned long.
12509         (handle_query): Update format specifiers.
12510         (handle_v_cont, main): Use strtoul for thread IDs.
12511         * server.h (struct inferior_list_entry): Use unsigned long for ID.
12512         (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12513         (general_thread, step_thread, thread_from_wait)
12514         (old_thread_from_wait): Update.
12515         * target.h (struct thread_resume): Use unsigned long for THREAD.
12516         (struct target_ops): Use unsigned long for arguments to attach and
12517         thread_alive.
12518
12519 2005-02-24  Daniel Jacobowitz  <dan@codesourcery.com>
12520
12521         * acinclude.m4: Include bfd/bfd.m4 directly.
12522         * configure.ac: Use AC_ARG_PROGRAM.  Suggested by Aron Griffis
12523         <agriffis@toolchain.org>.
12524         * aclocal.m4, configure: Regenerated.
12525
12526 2005-01-07  Andrew Cagney  <cagney@gnu.org>
12527
12528         * configure.ac: Rename configure.in, require autoconf 2.59.
12529         * configure: Re-generate.
12530
12531 2004-12-08  Daniel Jacobowitz  <dan@debian.org>
12532
12533         * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area.  Reset
12534         LIBS when finished.
12535         * aclocal.m4: Regenerated.
12536         * configure: Regenerated.
12537
12538 2004-11-21  Andreas Schwab  <schwab@suse.de>
12539
12540         * linux-m68k-low.c (m68k_num_gregs): Define.
12541         (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12542         (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12543         (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12544         (m68k_breakpoint_at): New.  Add to the_low_target.
12545
12546         * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12547         srv_linux_thread_db to yes.
12548
12549 2004-10-20  Joel Brobecker  <brobecker@gnat.com>
12550
12551         * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12552         (ARCH_SET_FS): Likewise.
12553         (ARCH_GET_FS): Likewise.
12554         (ARCH_GET_GS): Likewise.
12555
12556 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
12557
12558         * linux-i386-low.c (ps_get_thread_area): New.
12559         * linux-x86-64-low.c (ps_get_thread_area): New.
12560         * linux-low.c: Include <sys/syscall.h>.
12561         (linux_kill_one_process): Don't kill the first thread here.
12562         (linux_kill): Kill the first thread here.
12563         (kill_lwp): New function.
12564         (send_sigstop, linux_send_signal): Use it.
12565         * proc-service.c: Clean up #ifdefs.
12566         (fpregset_info): Delete.
12567         (ps_lgetregs): Update and enable implementation.
12568         (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12569         implementations.
12570         * remote-utils.c (struct sym_cache, symbol_cache): New.
12571         (input_interrupt): Print a clearer message.
12572         (async_io_enabled): New variable.
12573         (enable_async_io, disable_async_io): Use it.  Update comments.
12574         (look_up_one_symbol): Use the symbol cache.
12575         * thread-db.c (thread_db_look_up_symbols): New function.
12576         (thread_db_init): Update comments.  Call thread_db_look_up_symbols.
12577
12578 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
12579
12580         * configure.in: Test for -rdynamic.
12581         * configure: Regenerated.
12582         * Makefile (INTERNAL_LDFLAGS): New.
12583         (gdbserver, gdbreplay): Use it.
12584
12585 2004-09-02  Andrew Cagney  <cagney@gnu.org>
12586
12587         * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12588
12589 2004-03-23  Daniel Jacobowitz  <drow@mvista.com>
12590
12591         * linux-low.c (linux_wait): Clear all_processes list also.
12592
12593 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
12594
12595         * linux-low.c: Include <errno.h>.  Remove extern declaration of
12596         errno.
12597
12598 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
12599
12600         * gdbreplay.c, server.h, utils.c: Update copyright years.
12601
12602 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
12603
12604         * server.c (main): Print child status or termination signal from
12605         variable 'signal', not 'sig'.
12606
12607 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
12608
12609         * linux-low.c (linux_read_memory): Change return type to
12610         int.  Check for and return error from ptrace().
12611         * target.c (read_inferior_memory): Change return type to int.  Pass
12612         back return status from the_target->read_memory().
12613         * target.h (struct target_ops): Adapt *read_memory() prototype.
12614         Update comment.
12615         (read_inferior_memory): Adapt prototype.
12616         * server.c (main): Return an error packet if
12617         read_inferior_memory() returns an error.
12618
12619 2004-03-04  Daniel Jacobowitz  <drow@mvista.com>
12620
12621         * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12622         Unify with other clean targets.
12623
12624 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
12625
12626         * server.c (handle_v_cont): Call set_desired_inferior.
12627
12628 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
12629
12630         * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12631
12632 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
12633
12634         * linux-low.c (linux_wait): Unblock async I/O.
12635         (linux_resume): Block and enable async I/O.
12636         * remote-utils.c (block_async_io, unblock_async_io): New functions.
12637         * server.h (block_async_io, unblock_async_io): Add prototypes.
12638
12639 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
12640
12641         * remote-utils.c (remote_open): Print a status notice after
12642         opening a TCP port.
12643         * server.c (attach_inferior): Print a status notice after
12644         attaching.
12645
12646 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
12647
12648         * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12649
12650 2004-02-26  Daniel Jacobowitz  <drow@mvista.com>
12651
12652         * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12653         error packet.
12654         * server.c, target.h: Update copyright years.
12655
12656 2004-02-25  Roland McGrath  <roland@redhat.com>
12657
12658         * target.h (struct target_ops): New member `read_auxv'.
12659         * server.c (handle_query): Handle qPart:auxv:read: query using that.
12660         * linux-low.c (linux_read_auxv): New function.
12661         (linux_target_ops): Initialize `read_auxv' member to that.
12662
12663 2004-02-17  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12664
12665         Committed by Jim Blandy  <jimb@redhat.com>.
12666
12667         * linux-s390-low.c (s390_num_regs): Update.
12668         (s390_regmap): Remove control registers.  Use __s390x__ predefine
12669         instead of GPR_SIZE to distiguish s390 and s390x targets.
12670
12671 2004-01-31  Daniel Jacobowitz  <drow@mvista.com>
12672
12673         * linux-low.c: Update copyright year.
12674         (check_removed_breakpoint): Clear pending_is_breakpoint.
12675         (linux_set_resume_request, linux_queue_one_thread)
12676         (resume_status_pending_p): New functions.
12677         (linux_continue_one_thread): Use process->resume.
12678         (linux_resume): Only resume threads if there are no pending events.
12679         * linux-low.h (struct process_info): Add resume request
12680         pointer.
12681
12682 2004-01-30  Daniel Jacobowitz  <drow@mvista.com>
12683
12684         * regcache.c (new_register_cache): Clear the allocated register
12685         buffer.  Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12686
12687 2003-10-13  Daniel Jacobowitz  <drow@mvista.com>
12688
12689         * linux-low.c (linux_resume): Take a struct thread_resume *
12690         argument.
12691         (linux_wait): Update call.
12692         (resume_ptr): New static variable.
12693         (linux_continue_one_thread): Renamed from
12694         linux_continue_one_process.  Use resume_ptr.
12695         (linux_resume): Use linux_continue_one_thread.
12696         * server.c (handle_v_cont, handle_v_requests): New functions.
12697         (myresume): New function.
12698         (main): Handle 'v' case.
12699         * target.h (struct thread_resume): New type.
12700         (struct target_ops): Change argument of "resume" to struct
12701         thread_resume *.
12702         (myresume): Delete macro.
12703
12704 2003-08-08  H.J. Lu  <hongjiu.lu@intel.com>
12705
12706         * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12707         (uninstall): Support DESTDIR.
12708
12709 Mon Jul 21 20:09:34 UTC 2003  Brendan Conoboy  <blc@redhat.com>
12710
12711         * configure.srv: Add xscale*linux copy of arm*linux entry.
12712
12713 2003-07-24  Daniel Jacobowitz  <drow@mvista.com>
12714
12715         * linux-arm-low.c (arm_reinsert_addr): New function.
12716         (the_low_target): Add arm_reinsert_addr.
12717
12718 2003-07-08  Mark Kettenis  <kettenis@gnu.org>
12719
12720         * mem-break.c: Remove whitespace at end of file.
12721
12722 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
12723
12724         * configure.in: Check whether we need to prototype strerror.
12725         * server.h: Optionally prototype strerror.
12726         * gdbreplay.c (perror_with_name): Use strerror.
12727         * linux-low.c (linux_attach_lwp): Use strerror.
12728         * utils.c (perror_with_name): Use strerror.
12729         * config.in, configure: Regenerated.
12730
12731 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
12732
12733         * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12734         SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12735
12736 2003-06-20  Daniel Jacobowitz  <drow@mvista.com>
12737
12738         * Makefile.in (SFILES): Update.
12739         * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12740         low-sun3.c: Remove files.
12741
12742 2003-06-17  Daniel Jacobowitz  <drow@mvista.com>
12743
12744         * linux-low.c: Move comment to linux_thread_alive where it belonged.
12745         (linux_detach_one_process, linux_detach): New functions.
12746         (linux_target_ops): Add linux_detach.
12747         * server.c (main): Handle 'D' packet.
12748         * target.h (struct target_ops): Add "detach" member.
12749         (detach_inferior): Define.
12750
12751 2003-06-13  Mark Kettenis  <kettenis@gnu.org>
12752
12753         From Kelley Cook  <kelleycook@wideopenwest.com>:
12754         * configure.srv: Accept i[34567]86 variants.
12755
12756 2003-06-05  Daniel Jacobowitz  <drow@mvista.com>
12757
12758         * linux-low.c (linux_wait_for_event): Correct comment typos.
12759         (linux_resume_one_process): Call check_removed_breakpoint.
12760         (linux_send_signal): New function.
12761         (linux_target_ops): Add linux_send_signal.
12762         * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12763         of kill.
12764         * target.h (struct target_ops): Add send_signal.
12765
12766 2003-05-29  Jim Blandy  <jimb@redhat.com>
12767
12768         * linux-low.c (usr_store_inferior_registers): Transfer buf in
12769         PTRACE_XFER_TYPE-sized chunks, not int-sized chunks.  Otherwise,
12770         if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12771         away part of the register's value.
12772
12773 2003-03-26  Daniel Jacobowitz  <drow@mvista.com>
12774
12775         * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12776         (linux_wait_for_event, linux_init_signals): Likewise.
12777
12778 2003-03-17  Daniel Jacobowitz  <drow@mvista.com>
12779
12780         * configure.in: Check for stdlib.h.
12781         * configure: Regenerated.
12782         * config.in: Regenerated.
12783
12784 2003-01-04  Andreas Schwab  <schwab@suse.de>
12785
12786         * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12787
12788 2003-01-02  Andrew Cagney  <ac131313@redhat.com>
12789
12790         * Makefile.in: Remove obsolete code.
12791
12792 2002-11-20  Daniel Jacobowitz  <drow@mvista.com>
12793
12794         * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12795         defined(PT_FPR0_HI).
12796
12797 2002-11-17  Stuart Hughes  <seh@zee2.com>
12798
12799         * linux-arm-low.c (arm_num_regs): Increase.
12800         (arm_regmap): Include status register.
12801
12802 2002-11-17  Daniel Jacobowitz  <drow@mvista.com>
12803
12804         * linux-low.c (register_addr): Remove incorrect -1 check.
12805
12806 2002-08-29  Daniel Jacobowitz  <drow@mvista.com>
12807
12808         * linux-low.c (linux_create_inferior): Call setpgid.  Return
12809         the new PID.
12810         (unstopped_p, linux_signal_pid): Remove.
12811         (linux_target_ops): Remove linux_signal_pid.
12812         * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12813         global instead of target method.
12814         * target.h (struct target_ops): Remove signal_pid.  Update comment
12815         for create_inferior.
12816         * server.c (signal_pid): New variable.
12817         (create_inferior): Set signal_pid.  Block SIGTTOU and SIGTTIN in
12818         gdbserver.  Set the child to be the foreground process group.
12819         (attach_inferior): Set signal_pid.
12820
12821 2002-08-23  Daniel Jacobowitz  <drow@mvista.com>
12822
12823         * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12824
12825 2002-08-20  Jim Blandy  <jimb@redhat.com>
12826
12827         * Makefile.in (LDFLAGS): Allow the configure script to establish a
12828         default for this.
12829
12830 2002-08-01  Andrew Cagney  <cagney@redhat.com>
12831
12832         * Makefile.in: Make chill references obsolete.
12833
12834 2002-07-24  Kevin Buettner  <kevinb@redhat.com>
12835
12836         * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12837         * configure: Regenerate.
12838         * config.in: Regenerate.
12839
12840 2002-07-09  David O'Brien  <obrien@FreeBSD.org>
12841
12842         * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12843         (perror_with_name, remote_close, remote_open, expect, play): Static.
12844
12845 2002-07-04  Michal Ludvig  <mludvig@suse.cz>
12846
12847         * linux-x86-64-low.c (x86_64_regmap): Make it an array of
12848         byte offsets instead of an array of indexes.
12849         (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12850
12851 2002-06-13  Daniel Jacobowitz  <drow@mvista.com>
12852
12853         * regcache.c: Add comment.
12854
12855 2002-06-11  Daniel Jacobowitz  <drow@mvista.com>
12856
12857         * thread-db.c: New file.
12858         * proc-service.c: New file.
12859         * acinclude.m4: New file.
12860         * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12861         proc-service.o, and thread-db.o.
12862         (linux-low.o): Add USE_THREAD_DB.
12863         * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12864         HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12865         * aclocal.m4: Regenerated.
12866         * config.in: Regenerated.
12867         * configure: Regenerated.
12868         * configure.in: Check for proc_service.h, sys/procfs.h,
12869         thread_db.h, and linux/elf.h headrs.
12870         Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12871         PRFPREGSET_T_BROKEN.  Introduce srv_thread_depfiles and USE_THREAD_DB.
12872         Check for -lthread_db and thread support.
12873         * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12874         PowerPC, and SuperH.
12875         * i387-fp.c: Constify arguments.
12876         * i387-fp.h: Likewise.
12877         * inferiors.c: (struct thread_info): Renamed from
12878         `struct inferior_info'.  Remove PID member.  Use generic inferior
12879         list header.  All uses updated.
12880         (inferiors, signal_pid): Removed.
12881         (all_threads): New variable.
12882         (get_thread): Define.
12883         (add_inferior_to_list): New function.
12884         (for_each_inferior): New function.
12885         (change_inferior_id): New function.
12886         (add_inferior): Removed.
12887         (remove_inferior): New function.
12888         (add_thread): New function.
12889         (free_one_thread): New function.
12890         (remove_thread): New function.
12891         (clear_inferiors): Use for_each_inferior and free_one_thread.
12892         (find_inferior): New function.
12893         (find_inferior_id): New function.
12894         (inferior_target_data): Update argument type.
12895         (set_inferior_target_data): Likewise.
12896         (inferior_regcache_data): Likewise.
12897         (set_inferior_regcache_data): Likewise.
12898         * linux-low.c (linux_bp_reinsert): Remove.
12899         (all_processes, stopping_threads, using_thrads)
12900         (struct pending_signals, debug_threads, pid_of): New.
12901         (inferior_pid): Replace with macro.
12902         (struct inferior_linux_data): Remove.
12903         (get_stop_pc, add_process): New functions.
12904         (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12905         Use add_process and add_thread.
12906         (linux_attach_lwp): New function, based on old linux_attach.  Use
12907         add_process and add_thread.  Set stop_expected for new threads.
12908         (linux_attach): New function.
12909         (linux_kill_one_process): New function.
12910         (linux_kill): Kill all LWPs.
12911         (linux_thread_alive): Use find_inferior_id.
12912         (check_removed_breakpoints, status_pending_p): New functions.
12913         (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12914         Update.  Use WNOHANG.  Wait for cloned processes also.  Update process
12915         struct for the found process.
12916         (linux_wait_for_event): New function.
12917         (linux_wait): Use it.  Support LWPs.
12918         (send_sigstop, wait_for_sigstop, stop_all_processes)
12919         (linux_resume_one_process, linux_continue_one_process): New functions.
12920         (linux_resume): Support LWPs.
12921         (REGISTER_RAW_SIZE): Remove.
12922         (fetch_register): Use register_size instead.  Call supply_register.
12923         (usr_store_inferior_registers): Likewise.  Call collect_register.
12924         Fix recursive case.
12925         (regsets_fetch_inferior_registers): Improve error message.
12926         (regsets_store_inferior_registers): Add debugging.
12927         (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12928         (unstopped_p, linux_signal_pid): New functions.
12929         (linux_target_ops): Add linux_signal_pid.
12930         (linux_init_signals): New function.
12931         (initialize_low): Call it.  Initialize using_threads.
12932         * regcache.c (inferior_regcache_data): Add valid
12933         flag.
12934         (get_regcache): Fetch registers lazily.  Add fetch argument
12935         and update all callers.
12936         (regcache_invalidate_one, regcache_invalidate): New
12937         functions.
12938         (new_register_cache): Renamed from create_register_cache.
12939         Return the new regcache.
12940         (free_register_cache): Change argument to a void *.
12941         (registers_to_string, registers_from_string): Call get_regcache
12942         with fetch flag set.
12943         (register_data): Make static.  Pass fetch flag to get_regcache.
12944         (supply_register): Call get_regcache with fetch flag clear.
12945         (collect_register): Call get_regcache with fetch flag set.
12946         (collect_register_as_string): New function.
12947         * regcache.h: Update.
12948         * remote-utils.c (putpkt): Flush after debug output and use
12949         stderr.
12950         Handle input interrupts while waiting for an ACK.
12951         (input_interrupt): Use signal_pid method.
12952         (getpkt): Flush after debug output and use stderr.
12953         (outreg): Use collect_register_as_string.
12954         (new_thread_notify, dead_thread_notify): New functions.
12955         (prepare_resume_reply): Check using_threads.  Set thread_from_wait
12956         and general_thread.
12957         (look_up_one_symbol): Flush after debug output.
12958         * server.c (step_thread, server_waiting): New variables.
12959         (start_inferior): Don't use signal_pid.  Update call to mywait.
12960         (attach_inferior): Update call to mywait.
12961         (handle_query): Handle qfThreadInfo and qsThreadInfo.
12962         (main): Don't fetch/store registers explicitly.  Use
12963         set_desired_inferior.  Support proposed ``Hs'' packet.  Update
12964         calls to mywait.
12965         * server.h: Update.
12966         (struct inferior_list, struct_inferior_list_entry): New.
12967         * target.c (set_desired_inferior): New.
12968         (write_inferior_memory): Constify.
12969         (mywait): New function.
12970         * target.h: Update.
12971         (struct target_ops): New signal_pid method.
12972         (mywait): Removed macro, added prototype.
12973
12974         * linux-low.h (regset_func): Removed.
12975         (regset_fill_func, regset_store_func): New.
12976         (enum regset_type): New.
12977         (struct regset_info): Add type field.  Use new operation types.
12978         (struct linux_target_ops): stop_pc renamed to get_pc.
12979         Add decr_pc_after_break and breakpoint_at.
12980         (get_process, get_thread_proess, get_process_thread)
12981         (strut process_info, all_processes, linux_attach_lwp)
12982         (thread_db_init): New.
12983
12984         * linux-arm-low.c (arm_get_pc, arm_set_pc,
12985         arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12986         (the_low_target): Add new members.
12987         * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12988         (i386_store_fpxregset): Constify.
12989         (target_regsets): Add new kind identifier.
12990         (i386_get_pc): Renamed from i386_stop_pc.  Simplify.
12991         (i386_set_pc): Add debugging.
12992         (i386_breakpoint_at): New function.
12993         (the_low_target): Add new members.
12994         * linux-mips-low.c (mips_get_pc, mips_set_pc)
12995         (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12996         (mips_breakpoint_at): New.
12997         (the_low_target): Add new members.
12998         * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12999         (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
13000         (the_low_target): Add new members.
13001         * linux-sh-low.c (sh_get_pc, sh_set_pc)
13002         (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
13003         (the_low_target): Add new members.
13004         * linux-x86-64-low.c (target_regsets): Add new kind
13005         identifier.
13006
13007 2002-05-15  Daniel Jacobowitz  <drow@mvista.com>
13008
13009         From Martin Pool <mbp@samba.org>:
13010         * server.c (gdbserver_usage): New function.
13011         (main): Call it.
13012
13013 2002-05-14  Daniel Jacobowitz  <drow@mvista.com>
13014
13015         * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
13016         stop_at -> stop_pc.
13017
13018 2002-05-04  Andrew Cagney  <ac131313@redhat.com>
13019
13020         * Makefile.in: Remove obsolete code.
13021
13022 2002-04-24  Michal Ludvig  <mludvig@suse.cz>
13023
13024         * linux-low.c (regsets_fetch_inferior_registers),
13025         (regsets_store_inferior_registers): Removed cast to int from
13026         ptrace() calls.
13027         * regcache.h: Added declaration of struct inferior_info.
13028
13029 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
13030
13031         * inferiors.c (struct inferior_info): Add regcache_data.
13032         (add_inferior): Call create_register_cache.
13033         (clear_inferiors): Call free_register_cache.
13034         (inferior_regcache_data, set_inferior_regcache_data): New functions.
13035         * regcache.c (struct inferior_regcache_data): New.
13036         (registers): Remove.
13037         (get_regcache): New function.
13038         (create_register_cache, free_register_cache): New functions.
13039         (set_register_cache): Don't initialize the register cache here.
13040         (registers_to_string, registers_from_string, register_data): Call
13041         get_regcache.
13042         * regcache.h: Add prototypes.
13043         * server.h: Likewise.
13044
13045 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
13046
13047         * mem-break.c: New file.
13048         * mem-break.h: New file.
13049         * Makefile.in: Add mem-break.o rule; update server.h
13050         dependencies.
13051         * inferiors.c (struct inferior_info): Add target_data
13052         member.
13053         (clear_inferiors): Free target_data member if set.
13054         (inferior_target_data, set_inferior_target_data): New functions.
13055         * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
13056         (i386_stop_pc, i386_set_pc): New.  Add to the_low_target.
13057         * linux-low.c (linux_bp_reinsert): New variable.
13058         (struct inferior_linux_data): New.
13059         (linux_create_inferior): Use set_inferior_target_data.
13060         (linux_attach): Likewise.  Call add_inferior.
13061         (linux_wait_for_one_inferior): New function.
13062         (linux_wait): Call it.
13063         (linux_write_memory): Add const.
13064         (initialize_low): Call set_breakpoint_data.
13065         * linux-low.h (struct linux_target_ops): Add breakpoint
13066         handling members.
13067         * server.c (attach_inferior): Remove extra add_inferior
13068         call.
13069         * server.h: Include mem-break.h.  Update inferior.c
13070         prototypes.
13071         * target.c (read_inferior_memory)
13072         (write_inferior_memory): New functions.
13073         * target.h (read_inferior_memory)
13074         (write_inferior_memory): Change macros to prototypes.
13075         (struct target_ops): Update comments.  Add const to write_memory
13076         definition.
13077
13078 2002-04-11  Daniel Jacobowitz  <drow@mvista.com>
13079
13080         * linux-low.c (usr_store_inferior_registers): Support
13081         registers which are allowed to fail to store.
13082         * linux-low.h (linux_target_ops): Likewise.
13083         * linux-ppc-low.c (ppc_regmap): Support FPSCR.
13084         (ppc_cannot_store_register): FPSCR may not be storable.
13085
13086 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13087
13088         * server.h: Include <string.h> if HAVE_STRING_H.
13089         * ChangeLog: Correct paths in last ChangeLog entry.
13090
13091 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13092
13093         * linux-low.h: Remove obsolete prototypes.
13094         (struct linux_target_ops): New.
13095         (extern the_low_target): New.
13096         * linux-low.c (num_regs, regmap): Remove declarations.
13097         (register_addr): Use the_low_target explicitly.
13098         (fetch_register): Likewise.
13099         (usr_fetch_inferior_registers): Likewise.
13100         (usr_store_inferior_registers): Likewise.
13101         * linux-arm-low.c (num_regs): Remove.
13102         (arm_num_regs): Define.
13103         (arm_regmap): Renamed from regmap, made static.
13104         (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
13105         made static.
13106         (arm_cannot_store_register): Renamed from cannot_store_register,
13107         made static.
13108         (the_low_target): New.
13109         * linux-i386-low.c (num_regs): Remove.
13110         (i386_num_regs): Define.
13111         (i386_regmap): Renamed from regmap, made static.
13112         (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
13113         made static.
13114         (i386_cannot_store_register): Renamed from cannot_store_register,
13115         made static.
13116         (the_low_target): New.
13117         * linux-ia64-low.c (num_regs): Remove.
13118         (ia64_num_regs): Define.
13119         (ia64_regmap): Renamed from regmap, made static.
13120         (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
13121         made static.
13122         (ia64_cannot_store_register): Renamed from cannot_store_register,
13123         made static.
13124         (the_low_target): New.
13125         * linux-m68k-low.c (num_regs): Remove.
13126         (m68k_num_regs): Define.
13127         (m68k_regmap): Renamed from regmap, made static.
13128         (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
13129         made static.
13130         (m68k_cannot_store_register): Renamed from cannot_store_register,
13131         made static.
13132         (the_low_target): New.
13133         * linux-mips-low.c (num_regs): Remove.
13134         (mips_num_regs): Define.
13135         (mips_regmap): Renamed from regmap, made static.
13136         (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
13137         made static.
13138         (mips_cannot_store_register): Renamed from cannot_store_register,
13139         made static.
13140         (the_low_target): New.
13141         * linux-ppc-low.c (num_regs): Remove.
13142         (ppc_num_regs): Define.
13143         (ppc_regmap): Renamed from regmap, made static.
13144         (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
13145         made static.
13146         (ppc_cannot_store_register): Renamed from cannot_store_register,
13147         made static.
13148         (the_low_target): New.
13149         * linux-s390-low.c (num_regs): Remove.
13150         (s390_num_regs): Define.
13151         (s390_regmap): Renamed from regmap, made static.
13152         (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
13153         made static.
13154         (s390_cannot_store_register): Renamed from cannot_store_register,
13155         made static.
13156         (the_low_target): New.
13157         * linux-sh-low.c (num_regs): Remove.
13158         (sh_num_regs): Define.
13159         (sh_regmap): Renamed from regmap, made static.
13160         (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
13161         made static.
13162         (sh_cannot_store_register): Renamed from cannot_store_register,
13163         made static.
13164         (the_low_target): New.
13165         * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
13166         (the_low_target): New.
13167
13168 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13169
13170         * Makefile.in: Add stamp-h target.
13171         * configure.in: Create stamp-h.
13172         * configure: Regenerated.
13173
13174 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13175
13176         * inferiors.c: New file.
13177         * target.c: New file.
13178         * target.h: New file.
13179         * Makefile.in:  Add target.o and inferiors.o.  Update
13180         dependencies.
13181         * linux-low.c (inferior_pid): New static variable,
13182         moved from server.c.
13183         (linux_create_inferior): Renamed from create_inferior.
13184         Call add_inferior.  Return 0 on success instead of a PID.
13185         (linux_attach): Renamed from myattach.
13186         (linux_kill): Renamed from kill_inferior.  Call clear_inferiors ().
13187         (linux_thread_alive): Renamed from mythread_alive.
13188         (linux_wait): Renamed from mywait.  Call clear_inferiors () if the
13189         child dies.
13190         (linux_resume): Renamed from myresume.  Add missing ``return 0''.
13191         (regsets_store_inferior_registers): Correct error message.
13192         Add missing ``return 0''.
13193         (linux_fetch_registers): Renamed from fetch_inferior_registers.
13194         (linux_store_registers): Renamed from store_inferior_registers.
13195         (linux_read_memory): Renamed from read_inferior_memory.
13196         (linux_write_memory): Renamed from write_inferior_memory.
13197         (linux_target_ops): New structure.
13198         (initialize_low): Call set_target_ops ().
13199         * remote-utils.c (unhexify): New function.
13200         (hexify): New function.
13201         (input_interrupt): Send signals to ``signal_pid''.
13202         * server.c (inferior_pid): Remove.
13203         (start_inferior): Update create_inferior call.
13204         (attach_inferior): Call add_inferior.
13205         (handle_query): New function.
13206         (main): Call handle_query for `q' packets.
13207         * server.h: Include "target.h".  Remove obsolete prototypes.
13208         Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
13209
13210 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13211
13212         * Makefile.in: Add WARN_CFLAGS.  Update configury
13213         dependencies.
13214         * configure.in: Check for <string.h>
13215         * configure: Regenerate.
13216         * config.in: Regenerate.
13217         * gdbreplay.c: Include needed system headers.
13218         (remote_open): Remove strchr prototype.
13219         * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
13220         * regcache.c (supply_register): Change buf argument to const void *.
13221         (supply_register_by_name): Likewise.
13222         (collect_register): Change buf argument to void *.
13223         (collect_register_by_name): Likewise.
13224         * regcache.h: Add missing prototypes.
13225         * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
13226         * server.c (handle_query): New function.
13227         (attached): New static variable, moved out of main.
13228         (main): Quiet longjmp clobber warnings.
13229         * server.h: Add ATTR_NORETURN and ATTR_FORMAT.  Update prototypes.
13230         * utils.c (error): Remove NORETURN.
13231         (fatal): Likewise.