[ARM] Make thumb2_breakpoint static again
[external/binutils.git] / gdb / gdbserver / ChangeLog
1 2016-01-14  Yao Qi  <yao.qi@linaro.org>
2
3         * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4         * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
5         * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
6         arm_get_next_pcs_ctor.
7
8 2016-01-12  Josh Stone  <jistone@redhat.com>
9             Philippe Waroquiers  <philippe.waroquiers@skynet.be>
10
11         * inferiors.h: Include "gdb_vecs.h".
12         (struct process_info): Add syscalls_to_catch.
13         * inferiors.c (remove_process): Free syscalls_to_catch.
14         * remote-utils.c (prepare_resume_reply): Report syscall_entry and
15         syscall_return stops.
16         * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
17         * server.c (handle_general_set): Handle QCatchSyscalls.
18         (handle_query): Report support for QCatchSyscalls.
19         * target.h (struct target_ops): Add supports_catch_syscall.
20         (target_supports_catch_syscall): New macro.
21         * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
22         (struct lwp_info): Add syscall_state.
23         * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
24         Maintain syscall_state and syscalls_to_catch across exec.
25         (get_syscall_trapinfo): New function, proxy to the_low_target.
26         (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
27         (linux_low_filter_event): Toggle syscall_state entry/return for
28         syscall traps, and set it ignored for all others.
29         (gdb_catching_syscalls_p): New function.
30         (gdb_catch_this_syscall_p): New function.
31         (linux_wait_1): Handle SYSCALL_SIGTRAP.
32         (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
33         (linux_supports_catch_syscall): New function.
34         (linux_target_ops): Install it.
35         * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
36         (the_low_target): Install it.
37
38 2016-01-12  Mike Frysinger  <vapier@gentoo.org>
39
40         * acinclude.m4: Include new ../warning.m4 file.
41         * configure: Regenerated.
42         * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
43
44 2016-01-12  Mike Frysinger  <vapier@gentoo.org>
45
46         * ax.c (is_goto_target): Mark static.
47         * linux-low.c (register_addr): Likewise.
48         (linux_fetch_registers, linux_store_registers): Likewise.
49         * mem-break.c (any_persistent_commands): Fix old prototype.
50         (add_commands_to_breakpoint): Mark static.
51         * regcache.c (find_register_by_name): Delete unused func.
52         * remote-utils.c (hex_or_minus_one): Mark static.
53         * server.c (monitor_show_help): Mark static.
54         (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
55         handle_v_requests): Likewise.
56
57 2016-01-12  Pedro Alves  <palves@redhat.com>
58
59         Remove use of the registered trademark symbol throughout.
60
61 2016-01-08  Yao Qi  <yao.qi@linaro.org>
62
63         * remote-utils.c (getpkt): If c is '\003', call target hook
64         request_interrupt.
65
66 2016-01-06  Yao Qi  <yao.qi@linaro.org>
67
68         * linux-aarch32-low.h (arm_abi_breakpoint): Move to
69         linux-aarch32-low.c.
70         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
71         (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
72         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
73         (thumb2_breakpoint): Declare.
74         * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
75         linux-aarch32-low.h.
76         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
77         (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
78         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
79
80 2016-01-01  Joel Brobecker  <brobecker@adacore.com>
81
82         * gdbreplay.c (gdbreplay_version): Change copyright year in
83         version message.
84         * server.c (gdbserver_version): Likewise.
85
86 2015-12-28  Patrick Palka  <patrick@parcs.ath.cx>
87
88         * server.c (crc32_table): Delete.
89         (crc32): Use libiberty's xcrc32 function.
90
91 2015-12-22  Joel Brobecker  <brobecker@adacore.com>
92
93         * lynx-low.c (lynx_delete_thread_callback): New function.
94         (lynx_mourn): Properly delete our process and all of its
95         threads.  Remove call to clear_inferiors.
96
97 2015-12-22  Joel Brobecker  <brobecker@adacore.com>
98
99         * target.c (thread_search_callback): Add check that
100         the thread_stopped target callback is not NULL before
101         calling it.
102
103 2015-12-21  Yao Qi  <yao.qi@linaro.org>
104
105         * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
106         arm breakpoint.
107
108 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
109
110         * server.c (handle_query): Call target_supports_software_single_step.
111
112 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
113
114         * linux-low.c (single_step): New function.
115         (linux_resume_one_lwp_throw): Call single_step.
116         (start_step_over): Likewise.
117
118 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
119
120         * Makefile.in (SFILES): Append arch/arm-linux.c,
121         arch/arm-get-next-pcs.c.
122         (arm-linux.o): New rule.
123         (arm-get-next-pcs.o): New rule.
124         * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
125         arm-linux.o.
126         * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro.  Moved
127         to linux-aarch32-low.c.
128         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
129         (arm_breakpoint_len, thumb_breakpoint): Likewise.
130         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
131         (thumb2_breakpoint_len): Likewise.
132         (arm_is_thumb_mode): Make non-static.
133         * linux-aarch32-low.h (arm_abi_breakpoint): New macro.  Moved
134         from linux-aarch32-low.c.
135         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
136         (arm_breakpoint_len, thumb_breakpoint): Likewise.
137         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
138         (thumb2_breakpoint_len): Likewise.
139         (arm_is_thumb_mode): New declaration.
140         * linux-arm-low.c: Include arch/arm-linux.h
141         aarch/arm-get-next-pcs.h, sys/syscall.h.
142         (get_next_pcs_ops): New struct.
143         (get_next_pcs_addr_bits_remove): New function.
144         (get_next_pcs_is_thumb): New function.
145         (get_next_pcs_read_memory_unsigned_integer): Likewise.
146         (arm_sigreturn_next_pc): Likewise.
147         (get_next_pcs_syscall_next_pc): Likewise.
148         (arm_gdbserver_get_next_pcs): Likewise.
149         (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
150         Initialize.
151         * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
152         * server.h: Include gdb_vecs.h.
153
154 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
155
156         * Makefile.in (SFILES): Append common/common-regcache.c.
157         (OBS): Append common-regcache.o.
158         (common-regcache.o): New rule.
159         * regcache.c (init_register_cache): Initialize cache to
160         REG_UNAVAILABLE.
161         (regcache_raw_read_unsigned): New function.
162         * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
163         register_status enum.
164
165 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
166
167         * linux-aarch64-low.c (the_low_targets): Rename
168         breakpoint_reinsert_addr to get_next_pcs.
169         * linux-arm-low.c (the_low_targets): Likewise.
170         * linux-bfin-low.c (the_low_targets): Likewise.
171         * linux-cris-low.c (the_low_targets): Likewise.
172         * linux-crisv32-low.c (the_low_targets): Likewise.
173         * linux-low.c (can_software_single_step): Likewise.
174         (install_software_single_step_breakpoints): New function.
175         (start_step_over): Use install_software_single_step_breakpoints.
176         * linux-low.h: New CORE_ADDR vector.
177         (struct linux_target_ops) Rename breakpoint_reinsert_addr to
178         get_next_pcs.
179         * linux-mips-low.c (the_low_targets): Likewise.
180         * linux-nios2-low.c (the_low_targets): Likewise.
181         * linux-sparc-low.c (the_low_targets): Likewise.
182
183 2015-12-17  Pedro Alves  <palves@redhat.com>
184
185         * linux-low.c (linux_kill_one_lwp): Remove references to
186         LinuxThreads.
187         (kill_lwp): Remove HAVE_TKILL_SYSCALL check.  No longer fall back
188         to 'kill'.
189         (linux_init_signals): Delete.
190         (initialize_low): Adjust.
191         * thread-db.c (thread_db_init): Remove LinuxThreads reference.
192
193 2015-12-16  Pedro Alves  <palves@redhat.com>
194
195         * configure.ac (compiler warning flags): When testing a
196         -Wno-foo option, check whether -Wfoo works instead.
197         * configure: Regenerate.
198
199 2015-12-11  Don Breazeal  <donb@codesourcery.com>
200
201         * server.c (process_serial_event): Don't exit from gdbserver
202         in remote mode if there are still active inferiors.
203
204 2015-12-11  Yao Qi  <yao.qi@linaro.org>
205
206         * linux-aarch64-low.c (aarch64_breakpoint_at): Call
207         arm_breakpoint_at if the process is 32-bit.
208
209 2015-12-11  Yao Qi  <yao.qi@linaro.org>
210
211         * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
212         arm breakpoint.
213
214 2015-12-07  Yao Qi  <yao.qi@linaro.org>
215
216         * configure.srv: Append arm.o to srv_tgtobj for
217         aarch64*-*-linux* target.
218         * linux-aarch32-low.c (arm_abi_breakpoint): New macro.  Moved
219         from linux-arm-low.c.
220         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
221         (arm_breakpoint_len, thumb_breakpoint): Likewise.
222         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
223         (thumb2_breakpoint_len): Likewise.
224         (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
225         (arm_breakpoint_kinds): Likewise.
226         (arm_breakpoint_kind_from_pc): Likewise.
227         (arm_sw_breakpoint_from_kind): Likewise.
228         (arm_breakpoint_kind_from_current_state): Likewise.
229         * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
230         (arm_sw_breakpoint_from_kind): Declare.
231         (arm_breakpoint_kind_from_current_state): Declare.
232         (arm_breakpoint_at): Declare.
233         * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
234         arm_sw_breakpoint_from_kind if process is 32-bit.
235         (aarch64_breakpoint_kind_from_pc): New function.
236         (aarch64_breakpoint_kind_from_current_state): New function.
237         (the_low_target): Initialize fields breakpoint_kind_from_pc
238         and breakpoint_kind_from_current_state.
239         * linux-arm-low.c (arm_breakpoint_kinds): Move to
240         linux-aarch32-low.c.
241         (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
242         (arm_breakpoint, arm_breakpoint_len): Likewise.
243         (thumb_breakpoint, thumb_breakpoint_len): Likewise.
244         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
245         (arm_is_thumb_mode): Likewise.
246         (arm_breakpoint_at): Likewise.
247         (arm_breakpoint_kind_from_pc): Likewise.
248         (arm_sw_breakpoint_from_kind): Likewise.
249         (arm_breakpoint_kind_from_current_state): Likewise.
250
251         Revert:
252         2015-08-04  Yao Qi  <yao.qi@linaro.org>
253
254         * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
255         0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
256         * server.c (extended_protocol): Remove "static".
257         * server.h (extended_protocol): Declare it.
258
259 2015-12-04  Josh Stone  <jistone@redhat.com>
260
261         * target.h (struct target_ops) <arch_setup>: Rename to ...
262         (struct target_ops) <post_create_inferior>: ... this.
263         (target_arch_setup): Rename to ...
264         (target_post_create_inferior): ... this, calling post_create_inferior.
265         * server.c (start_inferior): Update target_arch_setup calls to
266         target_post_create_inferior.
267         * linux-low.c (linux_low_ptrace_options): Forward declare.
268         (linux_arch_setup): Update its comment for general use.
269         (linux_post_create_inferior): New, run arch_setup and setup ptrace.
270         (struct linux_target_ops): Use linux_post_create_inferior.
271         * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
272         to post_create_inferior.
273         * nto-low.c (struct nto_target_ops): Likewise.
274         * spu-low.c (struct spu_target_ops): Likewise.
275         * win32-low.c (struct win32_target_ops): Likewise.
276
277 2015-12-03  Antoine Tremblay  <antoine.tremblay@ericsson.com>
278
279         * linux-arm-low.c: Remove duplicate arch/arm.h include.
280
281 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
282
283         * linux-arm-low.c (arm_reinsert_addr): Remove function.
284         (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
285         * linux-cris-low.c (cris_reinsert_addr> Remove function.
286         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
287         * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
288         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
289         * linux-mips-low.c (mips_reinsert_addr): Remove function.
290         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
291         * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
292         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
293         * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
294         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
295
296 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
297
298         * linux-low.c (linux_look_up_symbols): Don't call
299         linux_supports_traceclone.
300         * linux-low.h (thread_db_init): Remove use_events argument.
301         * thread-db.c (thread_db_use_event): Remove global variable.
302         (struct thread_db) <td_thr_event_enable_p>: Remove field.
303         (struct thread_db) <td_create_bp>: Remove field.
304         (thread_db_create_event): Remove function.
305         (thread_db_enable_reporting): Likewise.
306         (find_one_thread): Don't check for thread_db_use_events.
307         (attach_thread): Likewise.
308         (thread_db_load_search): Remove td_thr_event_enable_p initialization.
309         (try_thread_db_load_1): Don't check for thread_db_use_events.
310         (thread_db_init): Remove use_events argument and thread events
311         handling.
312         (remove_thread_event_breakpoints): Remove function.
313         (thread_db_detach): Remove call to remove_thred_event_breakpoints.
314
315 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
316
317         * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
318         New function.
319         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
320         * linux-arm-low.c (arm_supports_hardware_single_step): New function.
321         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
322         * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
323         (struct linux_target_ops) <bfin_supports_hardware_single_step>:
324         Initialize.
325         * linux-crisv32-low.c (cris_supports_hardware_single_step):
326         New function.
327         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
328         * linux-low.c (can_hardware_single_step): Use
329         supports_hardware_single_step.
330         (can_software_single_step): New function.
331         (start_step_over): Call can_software_single_step.
332         (linux_supports_hardware_single_step): New function.
333         (struct target_ops) <supports_software_single_step>: Initialize.
334         * linux-low.h (struct linux_target_ops)
335         <supports_hardware_single_step>: Initialize.
336         * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
337         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
338         * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
339         (struct linux_target_ops) <supports_hardware_single_step> Initialize.
340         * linux-s390-low.c (s390_supports_hardware_single_step): New function.
341         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
342         * linux-sh-low.c (sh_supports_hardware_single_step): New function.
343         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
344         * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
345         (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
346         Initialize.
347         * linux-tile-low.c (tile_supports_hardware_single_step): New function.
348         (struct linux_target_ops) <tile_supports_hardware_single_step>:
349         Initialize.
350         * linux-x86-low.c (x86_supports_hardware_single_step) New function.
351         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
352         * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
353         New function.
354         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
355         * target.h (struct target_ops): <supports_software_single_step>:
356         New field.
357         (target_supports_software_single_step): New macro.
358
359 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
360
361         * linux-low.c (linux_wait_1): Fix pc advance condition.
362         * mem-break.c (reinsert_breakpoint_inserted_here): New function.
363         * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
364
365 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
366
367         * linux-arm-low.c (arm_is_thumb_mode): New function.
368         (arm_breakpoint_at): Use arm_is_thumb_mode.
369         (arm_breakpoint_kind_from_current_state): New function.
370         (struct linux_target_ops) <breakpoint_kind_from_current_state>:
371         Initialize.
372         * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
373         (linux_breakpoint_kind_from_current_state): New function.
374         (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
375         * linux-low.h (struct linux_target_ops)
376         <breakpoint_kind_from_current_state>: New field.
377         * target.h (struct target_ops): Likewise.
378         (target_breakpoint_kind_from_current_state): New macro.
379
380 2015-11-30  Pedro Alves  <palves@redhat.com>
381
382         * linux-low.c (linux_resume): Wake up the event loop before
383         returning.
384
385 2015-11-30  Pedro Alves  <palves@redhat.com>
386
387         * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
388         check.
389         (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
390         to -1.
391         * target.c (struct thread_search): New structure.
392         (thread_search_callback): New function.
393         (prev_general_thread): New global.
394         (prepare_to_access_memory, done_accessing_memory): New functions.
395         * target.h (prepare_to_access_memory, done_accessing_memory):
396         Replace macros with function declarations.
397
398 2015-11-30  Pedro Alves  <palves@redhat.com>
399
400         PR 14618
401         * linux-low.c (linux_wait_1): If the last resumed thread is gone,
402         report TARGET_WAITKIND_NO_RESUMED.
403         * remote-utils.c (prepare_resume_reply): Handle
404         TARGET_WAITKIND_NO_RESUMED.
405         * server.c (report_no_resumed): New global.
406         (handle_query) <qSupported>: Handle "no-resumed+".  Report
407         "no-resumed+" support.
408         (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
409         return error if the client doesn't support no-resumed events.
410         (push_stop_notification): New function.
411         (handle_target_event): Use it.  Report TARGET_WAITKIND_NO_RESUMED
412         events if the client supports them.
413
414 2015-11-30  Pedro Alves  <palves@redhat.com>
415
416         * linux-low.c (thread_still_has_status_pending_p): Don't check
417         vCont;t here.
418         (lwp_resumed): New function.
419         (status_pending_p_callback): Return early if the LWP is not
420         supposed to be resumed.
421
422 2015-11-30  Pedro Alves  <palves@redhat.com>
423
424         * linux-low.c (handle_extended_wait): Assert that the LWP's
425         waitstatus is TARGET_WAITKIND_IGNORE.  If GDB wants to hear about
426         thread create events, leave the new child's status pending.
427         (linux_low_filter_event): If GDB wants to hear about thread exit
428         events, leave the LWP marked dead and don't delete it.
429         (linux_wait_for_event_filtered): Don't check for thread exit.
430         (filter_exit_event): New function.
431         (linux_wait_1): Use it, when returning an exit event.
432         (linux_resume_one_lwp_throw): Assert that the LWP's
433         waitstatus is TARGET_WAITKIND_IGNORE.
434         * remote-utils.c (prepare_resume_reply): Handle
435         TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
436         * server.c (report_thread_events): New global.
437         (handle_general_set): Handle QThreadEvents.
438         (handle_query) <qSupported>: Handle and report QThreadEvents+;
439         (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
440         TARGET_WAITKIND_THREAD_EXITED.
441         * server.h (report_thread_events): Declare.
442
443 2015-11-30  Pedro Alves  <palves@redhat.com>
444
445         * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
446         the thread's last_resume_kind was resume_stop.
447
448 2015-11-30  Pedro Alves  <palves@redhat.com>
449
450         * linux-low.c (linux_attach): In non-stop mode, wait for one stop
451         before returning.
452
453 2015-11-30  Pedro Alves  <palves@redhat.com>
454
455         * server.c (handle_v_requests): Handle vCtrlC.
456
457 2015-11-30  Pedro Alves  <palves@redhat.com>
458
459         * gdbthread.h (find_any_thread_of_pid): Declare.
460         * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
461         functions.
462         * server.c (handle_query): If current_thread is NULL, look for
463         another thread of the selected process.
464
465 2015-11-26  Daniel Colascione  <dancol@dancol.org>
466             Simon Marchi  <simon.marchi@ericsson.com>
467
468         * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
469         * server.c (handle_qxfer_threads_worker): Refactor to include thread
470         name in reply.
471         * target.h (struct target_ops) <thread_name>: New field.
472         (target_thread_name): New macro.
473
474 2015-11-23  Joel Brobecker  <brobecker@adacore.com>
475
476         * regcache.h (regcache_invalidate_pid): Add declaration.
477         * regcache.c (regcache_invalidate_pid): New function, extracted
478         from regcache_invalidate.
479         (regcache_invalidate): Reimplement using regcache_invalidate_pid.
480         Add trivial documentation comment.
481         * lynx-low.c: Use regcache_invalidate_pid instead of
482         regcache_invalidate.
483
484 2015-11-23  Joel Brobecker  <brobecker@adacore.com>
485
486         * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
487         and Elf64_auxv_t if the target is Android.
488
489 2015-11-22  Doug Evans  <xdje42@gmail.com>
490
491         * target.h: #include <sys/types.h>.
492
493 2015-11-19  Pedro Alves  <palves@redhat.com>
494
495         * linux-low.c (linux_process_qsupported): Change prototype.
496         Adjust.
497         * linux-low.h (struct linux_target_ops) <process_qsupported>:
498         Change prototype.
499         * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
500         and adjust to loop over all features.
501         * server.c (handle_query) <qSupported>: Adjust to call
502         target_process_qsupported once, passing it a vector of unprocessed
503         features.
504         * target.h (struct target_ops) <process_qsupported>: Change
505         prototype.
506         (target_process_qsupported): Adjust.
507
508 2015-11-19  Pedro Alves  <palves@redhat.com>
509
510         * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
511         mode.
512         * configure: Regenerate.
513
514 2015-11-19  Pedro Alves  <palves@redhat.com>
515
516         * configure: Regenerate.
517
518 2015-11-19  Yao Qi  <yao.qi@linaro.org>
519
520         * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
521         type to uint32_t.
522
523 2015-11-19  Yao Qi  <yao.qi@linaro.org>
524
525         * linux-aarch64-low.c (enum aarch64_operand_type): New.
526         (struct aarch64_operand): Move enum out.
527
528 2015-11-19  Yao Qi  <yao.qi@linaro.org>
529
530         * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
531         struct user_fpsimd_state *.
532         (aarch64_store_fpregset): Likewise.
533
534 2015-11-19  Yao Qi  <yao.qi@linaro.org>
535
536         * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
537         struct user_pt_regs *.
538         (aarch64_store_gregset): Likewise.
539
540 2015-11-18  Pedro Alves  <palves@redhat.com>
541
542         * Makefile.in (all_object_files): Add $IPA_OBJS.
543
544 2015-11-17  Pedro Alves  <palves@redhat.com>
545
546         * win32-low.c (win32_resume): Use gdb_signal_from_host,
547         GDB_SIGNAL_0 and gdb_signal_to_string.
548
549 2015-11-17  Pedro Alves  <palves@redhat.com>
550
551         * win32-low.c (handle_output_debug_string): Remove parameter.
552         (win32_kill): Remove our_status local and adjust call to
553         handle_output_debug_string.
554         (get_child_debug_event): Adjust call to
555         handle_output_debug_string.
556
557 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
558
559         * linux-mips-low.c (mips_fill_gregset): Add cast.
560         (mips_store_gregset): Likewise.
561         (mips_fill_fpregset): Likewise.
562         (mips_store_fpregset): Likewise.
563
564 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
565
566         * linux-mips-low.c (mips_add_watchpoint): Rename private to
567         priv.
568
569 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
570
571         * linux-mips-low.c (mips_linux_new_thread): Change type of
572         watch_type to enum target_hw_bp_type.
573
574 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
575
576                 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
577                 Change return type to arm_hwbp_type.
578
579 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
580
581         * linux-aarch32-low.c (arm_fill_gregset): Add cast.
582         (arm_store_gregset): Likewise.
583         * linux-arm-low.c (arm_get_hwcap): Likewise.
584         (arm_read_description): Likewise.
585
586 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
587
588         * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
589
590 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
591
592         * linux-ppc-low.c (ppc_get_hwcap): Add cast.
593         (ppc_fill_vsxregset): Likewise.
594         (ppc_store_vsxregset): Likewise.
595         (ppc_fill_vrregset): Likewise.
596         (ppc_store_vrregset): Likewise.
597         (ppc_fill_evrregset): Likewise.
598         (ppc_store_evrregset): Likewise.
599
600 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
601
602         * linux-ppc-low.c (ppc_usrregs_info): Remove
603         forward-declaration.
604         (ppc_arch_setup): Move lower in file.
605
606 2015-10-30  Simon Marchi  <simon.marchi@ericsson.com>
607
608         * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
609         (ps_pdwrite): Likewise.
610
611 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
612
613         * linux-arm-low.c (arm_new_thread): Move pointer dereference
614         to after assert checks.
615
616 2015-10-29  Simon Marchi  <simon.marchi@ericsson.com>
617
618         * proc-service.c (ps_pdread): Add/adjust casts.
619         (ps_pdwrite): Add/adjust casts.
620
621 2015-10-29  Simon Marchi  <simon.marchi@polymtl.ca>
622
623         * server.c (handle_search_memory_1): Cast return value of
624         memmem.
625
626 2015-10-29  Simon Marchi  <simon.marchi@polymtl.ca>
627
628         * server.c (write_qxfer_response): Change type of data to
629         gdb_byte *.
630
631 2015-10-29  Pedro Alves  <palves@redhat.com>
632
633         * mem-break.c (Z_packet_to_bkpt_type): Add cast.
634
635 2015-10-29  Pedro Alves  <palves@redhat.com>
636
637         * tracepoint.c (clear_installed_tracepoints): Add casts.
638
639 2015-10-29  Pedro Alves  <palves@redhat.com>
640
641         * server.c (handle_v_cont, process_serial_event): Add enum
642         gdb_signal casts to signal parsing code.
643
644 2015-10-29  Pedro Alves  <palves@redhat.com>
645
646         * linux-low.h (NULL_REGSET): Define.
647         * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
648         * linux-arm-low.c (arm_regsets): Likewise.
649         * linux-crisv32-low.c (cris_regsets): Likewise.
650         * linux-m68k-low.c (m68k_regsets): Likewise.
651         * linux-mips-low.c (mips_regsets): Likewise.
652         * linux-nios2-low.c (nios2_regsets): Likewise.
653         * linux-ppc-low.c (ppc_regsets): Likewise.
654         * linux-s390-low.c (s390_regsets): Likewise.
655         * linux-sh-low.c (sh_regsets): Likewise.
656         * linux-sparc-low.c (sparc_regsets): Likewise.
657         * linux-tic6x-low.c (tic6x_regsets): Likewise.
658         * linux-tile-low.c (tile_regsets): Likewise.
659         * linux-x86-low.c (x86_regsets): Likewise.
660         * linux-xtensa-low.c (xtensa_regsets): Likewise.
661
662 2015-10-29  Pedro Alves  <palves@redhat.com>
663
664         * linux-low.h (NULL_REGSET): Define.
665         * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
666         * linux-arm-low.c (arm_regsets): Likewise.
667         * linux-crisv32-low.c (cris_regsets): Likewise.
668         * linux-m68k-low.c (m68k_regsets): Likewise.
669         * linux-mips-low.c (mips_regsets): Likewise.
670         * linux-nios2-low.c (nios2_regsets): Likewise.
671         * linux-ppc-low.c (ppc_regsets): Likewise.
672         * linux-s390-low.c (s390_regsets): Likewise.
673         * linux-sh-low.c (sh_regsets): Likewise.
674         * linux-sparc-low.c (sparc_regsets): Likewise.
675         * linux-tic6x-low.c (tic6x_regsets): Likewise.
676         * linux-tile-low.c (tile_regsets): Likewise.
677         * linux-x86-low.c (x86_regsets): Likewise.
678         * linux-xtensa-low.c (xtensa_regsets): Likewise.
679
680 2015-10-26  Doug Evans  <dje@google.com>
681
682         * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
683
684 2015-10-26  Doug Evans  <dje@google.com>
685
686         * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
687
688 2015-10-26  Doug Evans  <dje@google.com>
689
690         * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
691         for debug_printf.
692         (attach_thread, find_new_threads_callback): Ditto.
693
694 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
695
696         * mem-break.h (set_breakpoint_data): Remove.
697
698 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
699
700         * nto-low.c (nto_sw_breakpoint_from_kind): New function.
701         (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
702         (initialize_low): Remove set_breakpoint_data call.
703         * spu-low.c (spu_sw_breakpoint_from_kind): New function.
704         (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
705         (initialize_low): Remove set_breakpoint_data call.
706         * win32-low.c (win32_sw_breakpoint_from_kind): New function.
707         (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
708         (initialize_low): Remove set_breakpoint_data call.
709
710 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
711
712         * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
713         * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
714         * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
715         * target.h (target_breakpoint_kind_from_pc): New macro.
716
717 2015-10-22  Antoine Tremblay  <antoine.tremblay@ericsson.com>
718
719         * linux-low.c (default_breakpoint_kind_from_pc): New function.
720         (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
721         the default breakpoint kind.
722
723 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
724
725         * linux-arm-low.c (arm_supports_z_point_type): Add software
726         breakpoint support.
727
728 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
729
730         * linux-arm-low.c: Refactor breakpoint definitions.
731         (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
732         (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
733
734 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
735
736         * Makefile.in: Add arm.c/o.
737         * configure.srv: Likewise.
738         * linux-arm-low.c (arm_breakpoint_kinds): New enum.
739         (arm_breakpoint_kind_from_pc): New function.
740         (arm_sw_breakpoint_from_kind): Return proper kind.
741         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
742
743 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
744
745         * linux-low.c (initialize_low): Ajdust for breakpoint global variables
746         removal.
747         * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
748         (struct raw_breakpoint) <size>: Remove.
749         (struct raw_breakpoint) <kind>: Add.
750         (bp_size): New function.
751         (bp_opcode): Likewise.
752         (find_raw_breakpoint_at): Adjust for kind.
753         (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
754         (remove_memory_breakpoint): Adjust for kind call bp_size.
755         (set_raw_breakpoint_at): Adjust for kind.
756         (set_breakpoint): Likewise.
757         (set_breakpoint_at): Call breakpoint_kind_from_pc.
758         (delete_raw_breakpoint): Adjust for kind.
759         (delete_breakpoint): Likewise.
760         (find_gdb_breakpoint): Likewise.
761         (set_gdb_breakpoint_1): Likewise.
762         (set_gdb_breakpoint): Likewise.
763         (delete_gdb_breakpoint_1): Likewise.
764         (delete_gdb_breakpoint): Likewise.
765         (uninsert_raw_breakpoint): Likewise.
766         (reinsert_raw_breakpoint): Likewise.
767         (set_breakpoint_data): Remove.
768         (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
769         (check_mem_read): Adjust for kind call bp_size.
770         (check_mem_write): Adjust for kind call bp_size,bp_opcode.
771         (clone_one_breakpoint): Adjust for kind.
772         * mem-break.h (set_gdb_breakpoint): Likewise.
773         (delete_gdb_breakpoint): Likewise.
774         * server.c (process_serial_event): Likewise.
775
776 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
777
778         * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
779         (struct linux_target_ops) <breakpoint>: Remove.
780         (struct linux_target_ops) <breakpoint_len>: Remove.
781         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
782         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
783         * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
784         (arm_sw_breakpoint_from_kind): New function.
785         * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
786         (struct linux_target_ops) <breakpoint>: Remove.
787         (struct linux_target_ops) <breakpoint_len>: Remove.
788         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
789         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
790         * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
791         (struct linux_target_ops) <breakpoint>: Remove.
792         (struct linux_target_ops) <breakpoint_len>: Remove.
793         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
794         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
795         * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
796         (struct linux_target_ops) <breakpoint>: Remove.
797         (struct linux_target_ops) <breakpoint_len>: Remove.
798         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
799         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
800         * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
801         and sw_breakpoint_from_kind to increment the pc.
802         (linux_breakpoint_kind_from_pc): New function.
803         (linux_sw_breakpoint_from_kind): New function.
804         (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
805         (initialize_low): Call breakpoint_kind_from_pc and
806         sw_breakpoint_from_kind to replace breakpoint_data/len.
807         * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
808         New field.
809         (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
810         * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
811         (struct linux_target_ops) <breakpoint>: Remove.
812         (struct linux_target_ops) <breakpoint_len>: Remove.
813         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
814         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
815         * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
816         (struct linux_target_ops) <breakpoint>: Remove.
817         (struct linux_target_ops) <breakpoint_len>: Remove.
818         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
819         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
820         * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
821         (struct linux_target_ops) <breakpoint>: Remove.
822         (struct linux_target_ops) <breakpoint_len>: Remove.
823         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
824         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
825         * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
826         (struct linux_target_ops) <breakpoint>: Remove.
827         (struct linux_target_ops) <breakpoint_len>: Remove.
828         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
829         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
830         * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
831         (struct linux_target_ops) <breakpoint>: Remove.
832         (struct linux_target_ops) <breakpoint_len>: Remove.
833         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
834         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
835         * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
836         (struct linux_target_ops) <breakpoint>: Remove.
837         (struct linux_target_ops) <breakpoint_len>: Remove.
838         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
839         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
840         * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
841         (struct linux_target_ops) <breakpoint>: Remove.
842         (struct linux_target_ops) <breakpoint_len>: Remove.
843         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
844         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
845         * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
846         (struct linux_target_ops) <breakpoint>: Remove.
847         (struct linux_target_ops) <breakpoint_len>: Remove.
848         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
849         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
850         * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
851         (struct linux_target_ops) <breakpoint>: Remove.
852         (struct linux_target_ops) <breakpoint_len>: Remove.
853         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
854         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
855         * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
856         * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
857         (struct linux_target_ops) <breakpoint>: Remove.
858         (struct linux_target_ops) <breakpoint_len>: Remove.
859         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
860         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
861         * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
862         (struct linux_target_ops) <breakpoint>: Remove.
863         (struct linux_target_ops) <breakpoint_len>: Remove.
864         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
865         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
866
867 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
868
869         * linux-cris-low.c (cris_get_pc): Remove void arg.
870
871 2015-10-16  Aleksandar Ristovski  <aristovski@qnx.com>
872
873         * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
874         variable name.
875
876 2015-10-16  Aleksandar Ristovski  <aristovski@qnx.com>
877
878         * inferiors.c (thread_pid_matches_callback): New function.
879         (find_thread_process): New function.
880         (remove_thread): Reset current_thread.
881         (remove_process): Assert threads have been removed first.
882
883 2015-10-15  Yao Qi  <yao.qi@linaro.org>
884
885         * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
886         if it is 3.
887         (aarch64_remove_point): Likewise.
888         * regcache.c (regcache_register_size): New function.
889
890 2015-10-12  Yao Qi  <yao.qi@linaro.org>
891
892         * linux-aarch64-low.c: Update all callers as emit_load_store
893         is renamed to aarch64_emit_load_store.
894
895 2015-10-12  Yao Qi  <yao.qi@linaro.org>
896
897         * linux-aarch64-low.c: Update all callers of function renaming
898         from emit_insn to aarch64_emit_insn.
899
900 2015-10-12  Yao Qi  <yao.qi@linaro.org>
901
902         * linux-aarch64-low.c (enum aarch64_opcodes): Move to
903         arch/aarch64-insn.h.
904         (struct aarch64_memory_operand): Likewise.
905         (ENCODE): Likewise.
906         (emit_insn): Move to arch/aarch64-insn.c.
907         (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
908         (emit_load_store): Move to arch/aarch64-insn.c.
909         (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
910         (can_encode_int32): Remove.
911
912 2015-10-12  Yao Qi  <yao.qi@linaro.org>
913
914         * linux-aarch64-low.c (extract_signed_bitfield): Remove.
915         (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
916         (aarch64_relocate_instruction): Likewise.
917         (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
918         (struct aarch64_insn_visitor): Likewise.
919
920 2015-10-12  Yao Qi  <yao.qi@linaro.org>
921
922         * linux-aarch64-low.c (struct aarch64_insn_data): New.
923         (struct aarch64_insn_visitor): New.
924         (struct aarch64_insn_relocation_data): New.
925         (aarch64_ftrace_insn_reloc_b): New function.
926         (aarch64_ftrace_insn_reloc_b_cond): Likewise.
927         (aarch64_ftrace_insn_reloc_cb): Likewise.
928         (aarch64_ftrace_insn_reloc_tb): Likewise.
929         (aarch64_ftrace_insn_reloc_adr): Likewise.
930         (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
931         (aarch64_ftrace_insn_reloc_others): Likewise.
932         (visitor): New.
933         (aarch64_relocate_instruction): Use visitor.
934
935 2015-10-12  Yao Qi  <yao.qi@linaro.org>
936
937         * linux-aarch64-low.c (aarch64_relocate_instruction): Return
938         int.  Add argument buf.
939         (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
940         aarch64_relocate_instruction.
941
942 2015-10-12  Yao Qi  <yao.qi@linaro.org>
943
944         * linux-aarch64-low.c (aarch64_relocate_instruction): Add
945         argument insn.  Remove local variable insn.  Don't call
946         target_read_uint32.
947         (aarch64_install_fast_tracepoint_jump_pad): Call
948         target_read_uint32.
949
950 2015-09-30  Yao Qi  <yao.qi@linaro.org>
951
952         * linux-aarch64-low.c (emit_movk): Shorten a long line.
953         (emit_load_store_pair): Likewise.
954
955 2015-09-25  Simon Marchi  <simon.marchi@ericsson.com>
956
957         * dll.c (match_dll): Add cast(s).
958         (unloaded_dll): Likewise.
959         * linux-low.c (second_thread_of_pid_p): Likewise.
960         (delete_lwp_callback): Likewise.
961         (count_events_callback): Likewise.
962         (select_event_lwp_callback): Likewise.
963         (linux_set_resume_request): Likewise.
964         * server.c (accumulate_file_name_length): Likewise.
965         (emit_dll_description): Likewise.
966         (handle_qxfer_threads_worker): Likewise.
967         (visit_actioned_threads): Likewise.
968         * thread-db.c (any_thread_of): Likewise.
969         * tracepoint.c (same_process_p): Likewise.
970         (match_blocktype): Likewise.
971         (build_traceframe_info_xml): Likewise.
972
973 2015-09-25  Simon Marchi  <simon.marchi@ericsson.com>
974
975         * ax.c (gdb_parse_agent_expr): Add cast to allocation result
976         assignment.
977         (gdb_unparse_agent_expr): Likewise.
978         * hostio.c (require_data): Likewise.
979         (handle_pread): Likewise.
980         * linux-low.c (disable_regset): Likewise.
981         (fetch_register): Likewise.
982         (store_register): Likewise.
983         (get_dynamic): Likewise.
984         (linux_qxfer_libraries_svr4): Likewise.
985         * mem-break.c (delete_fast_tracepoint_jump): Likewise.
986         (set_fast_tracepoint_jump): Likewise.
987         (uninsert_fast_tracepoint_jumps_at): Likewise.
988         (reinsert_fast_tracepoint_jumps_at): Likewise.
989         (validate_inserted_breakpoint): Likewise.
990         (clone_agent_expr): Likewise.
991         * regcache.c (init_register_cache): Likewise.
992         * remote-utils.c (putpkt_binary_1): Likewise.
993         (decode_M_packet): Likewise.
994         (decode_X_packet): Likewise.
995         (look_up_one_symbol): Likewise.
996         (relocate_instruction): Likewise.
997         (monitor_output): Likewise.
998         * server.c (handle_search_memory): Likewise.
999         (handle_qxfer_exec_file): Likewise.
1000         (handle_qxfer_libraries): Likewise.
1001         (handle_qxfer): Likewise.
1002         (handle_query): Likewise.
1003         (handle_v_cont): Likewise.
1004         (handle_v_run): Likewise.
1005         (captured_main): Likewise.
1006         * target.c (write_inferior_memory): Likewise.
1007         * thread-db.c (try_thread_db_load_from_dir): Likewise.
1008         * tracepoint.c (init_trace_buffer): Likewise.
1009         (add_tracepoint_action): Likewise.
1010         (add_traceframe): Likewise.
1011         (add_traceframe_block): Likewise.
1012         (cmd_qtdpsrc): Likewise.
1013         (cmd_qtdv): Likewise.
1014         (cmd_qtstatus): Likewise.
1015         (response_source): Likewise.
1016         (response_tsv): Likewise.
1017         (cmd_qtnotes): Likewise.
1018         (gdb_collect): Likewise.
1019         (initialize_tracepoint): Likewise.
1020
1021 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
1022
1023         * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
1024         (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
1025         <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
1026         <NOP>: New.
1027         (enum aarch64_condition_codes): New enum.
1028         (w0): New static global.
1029         (fp): Likewise.
1030         (lr): Likewise.
1031         (struct aarch64_memory_operand) <type>: New
1032         MEMORY_OPERAND_POSTINDEX type.
1033         (postindex_memory_operand): New helper function.
1034         (emit_ret): New function.
1035         (emit_load_store_pair): New function, factored out of emit_stp
1036         with support for MEMORY_OPERAND_POSTINDEX.
1037         (emit_stp): Rewrite using emit_load_store_pair.
1038         (emit_ldp): New function.
1039         (emit_load_store): Likewise.
1040         (emit_ldr): Mention post-index instruction in comment.
1041         (emit_ldrh): New function.
1042         (emit_ldrb): New function.
1043         (emit_ldrsw): Mention post-index instruction in comment.
1044         (emit_str): Likewise.
1045         (emit_subs): New function.
1046         (emit_cmp): Likewise.
1047         (emit_and): Likewise.
1048         (emit_orr): Likewise.
1049         (emit_orn): Likewise.
1050         (emit_eor): Likewise.
1051         (emit_mvn): Likewise.
1052         (emit_lslv): Likewise.
1053         (emit_lsrv): Likewise.
1054         (emit_asrv): Likewise.
1055         (emit_mul): Likewise.
1056         (emit_sbfm): Likewise.
1057         (emit_sbfx): Likewise.
1058         (emit_ubfm): Likewise.
1059         (emit_ubfx): Likewise.
1060         (emit_csinc): Likewise.
1061         (emit_cset): Likewise.
1062         (emit_nop): Likewise.
1063         (emit_ops_insns): New helper function.
1064         (emit_pop): Likewise.
1065         (emit_push): Likewise.
1066         (aarch64_emit_prologue): New function.
1067         (aarch64_emit_epilogue): Likewise.
1068         (aarch64_emit_add): Likewise.
1069         (aarch64_emit_sub): Likewise.
1070         (aarch64_emit_mul): Likewise.
1071         (aarch64_emit_lsh): Likewise.
1072         (aarch64_emit_rsh_signed): Likewise.
1073         (aarch64_emit_rsh_unsigned): Likewise.
1074         (aarch64_emit_ext): Likewise.
1075         (aarch64_emit_log_not): Likewise.
1076         (aarch64_emit_bit_and): Likewise.
1077         (aarch64_emit_bit_or): Likewise.
1078         (aarch64_emit_bit_xor): Likewise.
1079         (aarch64_emit_bit_not): Likewise.
1080         (aarch64_emit_equal): Likewise.
1081         (aarch64_emit_less_signed): Likewise.
1082         (aarch64_emit_less_unsigned): Likewise.
1083         (aarch64_emit_ref): Likewise.
1084         (aarch64_emit_if_goto): Likewise.
1085         (aarch64_emit_goto): Likewise.
1086         (aarch64_write_goto_address): Likewise.
1087         (aarch64_emit_const): Likewise.
1088         (aarch64_emit_call): Likewise.
1089         (aarch64_emit_reg): Likewise.
1090         (aarch64_emit_pop): Likewise.
1091         (aarch64_emit_stack_flush): Likewise.
1092         (aarch64_emit_zero_ext): Likewise.
1093         (aarch64_emit_swap): Likewise.
1094         (aarch64_emit_stack_adjust): Likewise.
1095         (aarch64_emit_int_call_1): Likewise.
1096         (aarch64_emit_void_call_2): Likewise.
1097         (aarch64_emit_eq_goto): Likewise.
1098         (aarch64_emit_ne_goto): Likewise.
1099         (aarch64_emit_lt_goto): Likewise.
1100         (aarch64_emit_le_goto): Likewise.
1101         (aarch64_emit_gt_goto): Likewise.
1102         (aarch64_emit_ge_got): Likewise.
1103         (aarch64_emit_ops_impl): New static global variable.
1104         (aarch64_emit_ops): New target function, return
1105         &aarch64_emit_ops_impl.
1106         (struct linux_target_ops): Install it.
1107
1108 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
1109
1110         * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
1111         * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
1112         aarch64-ipa.o.
1113         * linux-aarch64-ipa.c: New file.
1114         * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
1115         and endian.h.
1116         (aarch64_get_thread_area): New target method.
1117         (extract_signed_bitfield): New helper function.
1118         (aarch64_decode_ldr_literal): New function.
1119         (enum aarch64_opcodes): New enum.
1120         (struct aarch64_register): New struct.
1121         (struct aarch64_operand): New struct.
1122         (x0): New static global.
1123         (x1): Likewise.
1124         (x2): Likewise.
1125         (x3): Likewise.
1126         (x4): Likewise.
1127         (w2): Likewise.
1128         (ip0): Likewise.
1129         (sp): Likewise.
1130         (xzr): Likewise.
1131         (aarch64_register): New helper function.
1132         (register_operand): Likewise.
1133         (immediate_operand): Likewise.
1134         (struct aarch64_memory_operand): New struct.
1135         (offset_memory_operand): New helper function.
1136         (preindex_memory_operand): Likewise.
1137         (enum aarch64_system_control_registers): New enum.
1138         (ENCODE): New macro.
1139         (emit_insn): New helper function.
1140         (emit_b): New function.
1141         (emit_bcond): Likewise.
1142         (emit_cb): Likewise.
1143         (emit_tb): Likewise.
1144         (emit_blr): Likewise.
1145         (emit_stp): Likewise.
1146         (emit_ldp_q_offset): Likewise.
1147         (emit_stp_q_offset): Likewise.
1148         (emit_load_store): Likewise.
1149         (emit_ldr): Likewise.
1150         (emit_ldrsw): Likewise.
1151         (emit_str): Likewise.
1152         (emit_ldaxr): Likewise.
1153         (emit_stxr): Likewise.
1154         (emit_stlr): Likewise.
1155         (emit_data_processing_reg): Likewise.
1156         (emit_data_processing): Likewise.
1157         (emit_add): Likewise.
1158         (emit_sub): Likewise.
1159         (emit_mov): Likewise.
1160         (emit_movk): Likewise.
1161         (emit_mov_addr): Likewise.
1162         (emit_mrs): Likewise.
1163         (emit_msr): Likewise.
1164         (emit_sevl): Likewise.
1165         (emit_wfe): Likewise.
1166         (append_insns): Likewise.
1167         (can_encode_int32_in): New helper function.
1168         (aarch64_relocate_instruction): New function.
1169         (aarch64_install_fast_tracepoint_jump_pad): Likewise.
1170         (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
1171         (struct linux_target_ops): Install aarch64_get_thread_area,
1172         aarch64_install_fast_tracepoint_jump_pad and
1173         aarch64_get_min_fast_tracepoint_insn_len.
1174
1175 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
1176
1177         * Makefile.in (aarch64-insn.o): New rule.
1178         * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
1179
1180 2015-09-21  Yao Qi  <yao.qi@linaro.org>
1181
1182         * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
1183
1184 2015-09-21  Yao Qi  <yao.qi@linaro.org>
1185
1186         * tracepoint.c (max_jump_pad_size): Remove.
1187
1188 2015-09-18  Yao Qi  <yao.qi@linaro.org>
1189
1190         * linux-aarch64-low.c: Don't include sys/uio.h.
1191         (ps_get_thread_area): Call aarch64_ps_get_thread_area.
1192
1193 2015-09-16  Wei-cheng Wang  <cole945@gmail.com>
1194
1195         * tracepoint.c (eval_result_type): Change prototype.
1196         (condition_true_at_tracepoint): Fix argument to compiled_cond.
1197
1198 2015-09-15  Pedro Alves  <palves@redhat.com>
1199
1200         * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
1201         Check whether to report exec events instead of checking whether
1202         multiprocess is enabled.
1203
1204 2015-09-15  Pedro Alves  <palves@redhat.com>
1205
1206         PR remote/18965
1207         * remote-utils.c (prepare_resume_reply): Merge
1208         TARGET_WAITKIND_VFORK_DONE switch case with the
1209         TARGET_WAITKIND_FORKED case.
1210
1211 2015-09-15  Yao Qi  <yao.qi@linaro.org>
1212
1213         * server.c (handle_query): Check string comparison using
1214         "else if" instead of "if".
1215
1216 2015-09-15  Yao Qi  <yao.qi@linaro.org>
1217
1218         * server.c (vCont_supported): New global variable.
1219         (handle_query): Set vCont_supported to 1 if "vContSupported+"
1220         matches.  Append ";vContSupported+" to own_buf.
1221         (handle_v_requests): Append ";s;S" to own_buf if target supports
1222         hardware single step or vCont_supported is false.
1223         (capture_main): Set vCont_supported to zero.
1224
1225 2015-09-15  Yao Qi  <yao.qi@linaro.org>
1226
1227         * linux-low.c (linux_supports_conditional_breakpoints): Rename
1228         it to ...
1229         (linux_supports_hardware_single_step): ... New function.
1230         (linux_target_ops): Update.
1231         * lynx-low.c (lynx_target_ops): Set field
1232         supports_hardware_single_step to target_can_do_hardware_single_step.
1233         * nto-low.c (nto_target_ops): Likewise.
1234         * spu-low.c (spu_target_ops): Likewise.
1235         * win32-low.c (win32_target_ops): Likewise.
1236         * target.c (target_can_do_hardware_single_step): New function.
1237         * target.h (struct target_ops) <supports_conditional_breakpoints>:
1238         Remove.  <supports_hardware_single_step>: New field.
1239         (target_supports_conditional_breakpoints): Remove.
1240         (target_supports_hardware_single_step): New macro.
1241         (target_can_do_hardware_single_step): Declare.
1242         * server.c (handle_query): Use target_supports_hardware_single_step
1243         instead of target_supports_conditional_breakpoints.
1244
1245 2015-09-15  Yao Qi  <yao.qi@linaro.org>
1246
1247         * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
1248         function.
1249         (struct linux_target_ops the_low_target): Install
1250         aarch64_linux_siginfo_fixup.
1251
1252 2015-09-11  Don Breazeal  <donb@codesourcery.com>
1253             Luis Machado  <lgustavo@codesourcery.com>
1254
1255         * linux-low.c (linux_mourn): Static declaration.
1256         (linux_arch_setup): Move in front of
1257         handle_extended_wait.
1258         (linux_arch_setup_thread): New function.
1259         (handle_extended_wait): Handle exec events.  Call
1260         linux_arch_setup_thread.  Make event_lwp argument a
1261         pointer-to-a-pointer.
1262         (check_zombie_leaders): Do not check stopped threads.
1263         (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
1264         (linux_low_filter_event): Add lwp and thread for exec'ing
1265         non-leader thread if leader thread has been deleted.
1266         Refactor code into linux_arch_setup_thread and call it.
1267         Pass child lwp pointer by reference to handle_extended_wait.
1268         (linux_wait_for_event_filtered): Update comment.
1269         (linux_wait_1): Prevent clobbering exec event status.
1270         (linux_supports_exec_events): New function.
1271         (linux_target_ops) <supports_exec_events>: Initialize new member.
1272         * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
1273         new member.
1274         * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
1275         * server.c (report_exec_events): New global variable.
1276         (handle_query): Handle qSupported query for exec-events feature.
1277         (captured_main): Initialize report_exec_events.
1278         * server.h (report_exec_events): Declare new global variable.
1279         * target.h (struct target_ops) <supports_exec_events>: New
1280         member.
1281         (target_supports_exec_events): New macro.
1282         * win32-low.c (win32_target_ops) <supports_exec_events>:
1283         Initialize new member.
1284
1285 2015-09-09  Markus Metzger  <markus.t.metzger@intel.com>
1286
1287         * linux-low.c (linux_low_enable_btrace): Remove.
1288         (linux_target_ops): Replace linux_low_enable_btrace with
1289         linux_enable_btrace.
1290
1291 2015-09-03  Yao Qi  <yao.qi@linaro.org>
1292
1293         * linux-aarch64-low.c (aarch64_insert_point): Call
1294         aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
1295         returns true.
1296
1297 2015-08-27  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1298
1299         * linux-low.c (check_stopped_by_breakpoint): Use
1300         GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
1301
1302 2015-08-27  Pedro Alves  <palves@redhat.com>
1303
1304         * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
1305
1306 2015-08-26  Simon Marchi  <simon.marchi@ericsson.com>
1307
1308         * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
1309         the XNEW-family equivalent.
1310         (compile_bytecodes): Likewise.
1311         * dll.c (loaded_dll): Likewise.
1312         * event-loop.c (append_callback_event): Likewise.
1313         (create_file_handler): Likewise.
1314         (create_file_event): Likewise.
1315         * hostio.c (handle_open): Likewise.
1316         * inferiors.c (add_thread): Likewise.
1317         (add_process): Likewise.
1318         * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
1319         * linux-arm-low.c (arm_new_process): Likewise.
1320         (arm_new_thread): Likewise.
1321         * linux-low.c (add_to_pid_list): Likewise.
1322         (linux_add_process): Likewise.
1323         (handle_extended_wait): Likewise.
1324         (add_lwp): Likewise.
1325         (enqueue_one_deferred_signal): Likewise.
1326         (enqueue_pending_signal): Likewise.
1327         (linux_resume_one_lwp_throw): Likewise.
1328         (linux_resume_one_thread): Likewise.
1329         (linux_read_memory): Likewise.
1330         (linux_write_memory): Likewise.
1331         * linux-mips-low.c (mips_linux_new_process): Likewise.
1332         (mips_linux_new_thread): Likewise.
1333         (mips_add_watchpoint): Likewise.
1334         * linux-x86-low.c (initialize_low_arch): Likewise.
1335         * lynx-low.c (lynx_add_process): Likewise.
1336         * mem-break.c (set_raw_breakpoint_at): Likewise.
1337         (set_breakpoint): Likewise.
1338         (add_condition_to_breakpoint): Likewise.
1339         (add_commands_to_breakpoint): Likewise.
1340         (clone_agent_expr): Likewise.
1341         (clone_one_breakpoint): Likewise.
1342         * regcache.c (new_register_cache): Likewise.
1343         * remote-utils.c (look_up_one_symbol): Likewise.
1344         * server.c (queue_stop_reply): Likewise.
1345         (start_inferior): Likewise.
1346         (queue_stop_reply_callback): Likewise.
1347         (handle_target_event): Likewise.
1348         * spu-low.c (fetch_ppc_memory): Likewise.
1349         (store_ppc_memory): Likewise.
1350         * target.c (set_target_ops): Likewise.
1351         * thread-db.c (thread_db_load_search): Likewise.
1352         (try_thread_db_load_1): Likewise.
1353         * tracepoint.c (add_tracepoint): Likewise.
1354         (add_tracepoint_action): Likewise.
1355         (create_trace_state_variable): Likewise.
1356         (cmd_qtdpsrc): Likewise.
1357         (cmd_qtro): Likewise.
1358         (add_while_stepping_state): Likewise.
1359         * win32-low.c (child_add_thread): Likewise.
1360         (get_image_name): Likewise.
1361
1362 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1363
1364         * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
1365
1366 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1367
1368         * Makefile.in (aarch64-linux.o): New rule.
1369         * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
1370         srv_tgtobj.
1371         * linux-aarch64-low.c: Include nat/aarch64-linux.h.
1372         (aarch64_init_debug_reg_state): Make it extern.
1373         (aarch64_linux_prepare_to_resume): Remove.
1374
1375 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1376
1377         * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
1378         lwp_arch_private_info and ptid_of_lwp.
1379
1380 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1381
1382         * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
1383         Find proc_info by find_process_pid.  All callers updated.
1384
1385 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1386
1387         * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
1388         Remove.
1389         (debug_reg_change_callback): Remove.
1390         (aarch64_notify_debug_reg_change): Remove.
1391
1392 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1393
1394         * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
1395         Call current_lwp_ptid.
1396
1397 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1398
1399         * linux-aarch64-low.c (debug_reg_change_callback): Use
1400         debug_printf.
1401
1402 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1403
1404         * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
1405
1406 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1407
1408         * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
1409
1410 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1411
1412         * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
1413         the code.
1414
1415 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1416
1417         * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
1418         Remove.
1419         (debug_reg_change_callback): Remove argument entry and add argument
1420         lwp.  Remove local variable thread.  Don't print thread id in the
1421         debugging output.  Don't check whether pid of thread equals to pid.
1422         (aarch64_notify_debug_reg_change): Don't set param.pid.  Call
1423         iterate_over_lwps instead find_inferior.
1424
1425 2015-08-24  Pedro Alves  <palves@redhat.com>
1426
1427         * inferiors.c (get_first_process): New function.
1428         * inferiors.h (get_first_process): New declaration.
1429         * remote-utils.c (read_ptid): Default to the first process in the
1430         list, instead of to the current thread's process.
1431
1432 2015-08-24  Pedro Alves  <palves@redhat.com>
1433
1434         * debug.c: Include gdb_sys_time.h instead of sys/time.h.
1435         * event-loop.c: Likewise.
1436         * remote-utils.c: Likewise.
1437         * tracepoint.c: Likewise.
1438
1439 2015-08-24  Pedro Alves  <palves@redhat.com>
1440
1441         * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
1442         ptid_get_lwp.
1443
1444 2015-08-21  Pedro Alves  <palves@redhat.com>
1445
1446         * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
1447         instead of literal 1.
1448
1449 2015-08-21  Pedro Alves  <palves@redhat.com>
1450
1451         * tdesc.c (default_description): Explicitly zero-initialize.
1452
1453 2015-08-21  Pedro Alves  <palves@redhat.com>
1454
1455         PR gdb/18749
1456         * inferiors.c (remove_thread): Discard any pending stop reply for
1457         this thread.
1458         * server.c (remove_all_on_match_pid): Rename to ...
1459         (remove_all_on_match_ptid): ... this.  Work with a filter ptid
1460         instead of a pid.
1461         (discard_queued_stop_replies): Change parameter to a ptid.  Now
1462         extern.
1463         (handle_v_kill, kill_inferior_callback, captured_main)
1464         (process_serial_event): Adjust.
1465         * server.h (discard_queued_stop_replies): Declare.
1466
1467 2015-08-21  Pedro Alves  <palves@redhat.com>
1468
1469         * linux-low.c (wait_for_sigstop): Always switch to no thread
1470         selected if the previously current thread dies.
1471         * lynx-low.c (lynx_request_interrupt): Use the first thread's
1472         process instead of the current thread's.
1473         * remote-utils.c (input_interrupt): Don't check if there's no
1474         current thread.
1475         * server.c (gdb_read_memory, gdb_write_memory): If setting the
1476         current thread to the general thread fails, error out.
1477         (handle_qxfer_auxv, handle_qxfer_libraries)
1478         (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
1479         (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
1480         (handle_query): Check if there's a thread selected instead of
1481         checking whether there's any thread in the thread list.
1482         (handle_qxfer_threads, handle_qxfer_btrace)
1483         (handle_qxfer_btrace_conf): Don't error out early if there's no
1484         thread in the thread list.
1485         (handle_v_cont, myresume): Don't set the current thread to the
1486         continue thread.
1487         (process_serial_event) <Hg handling>: Also set thread_id if the
1488         previous general thread is still alive.
1489         (process_serial_event) <g/G handling>: If setting the current
1490         thread to the general thread fails, error out.
1491         * spu-low.c (spu_resume, spu_request_interrupt): Use the first
1492         thread's lwp instead of the current thread's.
1493         * target.c (set_desired_thread): If the desired thread was not
1494         found, leave the current thread pointing to NULL.  Return an int
1495         (boolean) indicating success.
1496         * target.h (set_desired_thread): Change return type to int.
1497
1498 2015-08-20  Max Filippov  <jcmvbkbc@gmail.com>
1499
1500         * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
1501         * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
1502         #includes.
1503         (ps_get_thread_area): New function.
1504
1505 2015-08-19  Gary Benson  <gbenson@redhat.com>
1506
1507         * hostio.c (handle_pread): Do not attempt to read more data
1508         than hostio_reply_with_data can fit in a packet.
1509
1510 2015-08-18  Joel Brobecker  <brobecker@adacore.com>
1511
1512         * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
1513
1514 2015-08-14  Matthew Fortune  <matthew.fortune@imgtec.com>
1515
1516         * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
1517
1518 2015-08-06  Pedro Alves  <palves@redhat.com>
1519
1520         * tracepoint.c (expr_eval_result): Now an int.
1521
1522 2015-08-06  Pedro Alves  <palves@redhat.com>
1523
1524         * gdbthread.h (struct regcache): Forward declare.
1525         (struct thread_info) <regcache_data>: Now a struct regcache
1526         pointer.
1527         * inferiors.c (inferior_regcache_data)
1528         (set_inferior_regcache_data): Now work with struct regcache
1529         pointers.
1530         * inferiors.h (struct regcache): Forward declare.
1531         (inferior_regcache_data, set_inferior_regcache_data): Now work
1532         with struct regcache pointers.
1533         * regcache.c (get_thread_regcache, regcache_invalidate_thread)
1534         (free_register_cache_thread): Remove struct regcache pointer
1535         casts.
1536
1537 2015-08-06  Pedro Alves  <palves@redhat.com>
1538
1539         * server.c (captured_main): On error, print the exception message
1540         to stderr, and if run_once is set, throw a quit.
1541
1542 2015-08-06  Pedro Alves  <palves@redhat.com>
1543
1544         * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
1545         the current thread.
1546
1547 2015-08-06  Pedro Alves  <palves@redhat.com>
1548
1549         * linux-low.c (linux_write_memory): Rewrite debug output to avoid
1550         reading beyond the passed in buffer length.
1551
1552 2015-08-06  Pierre Langlois  <pierre.langlois@arm.com>
1553
1554         * tracepoint.c (symbol_list) <required>: Remove.
1555
1556 2015-08-06  Pedro Alves  <palves@redhat.com>
1557
1558         * linux-low.c (handle_extended_wait): Set the fork child's suspend
1559         count if stopping and suspending threads.
1560         (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1561         stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1562         (linux_detach): Complete an ongoing step-over.
1563         (lwp_suspended_inc, lwp_suspended_decr): New functions.  Use
1564         throughout.
1565         (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1566         (linux_wait_1): If passing a signal to the inferior after
1567         finishing a step-over, unsuspend and re-resume all lwps.  If we
1568         see a single-step event but the thread should be continuing, don't
1569         pass the trap to gdb.
1570         (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1571         internal_error instead of gdb_assert.
1572         (enqueue_pending_signal): New function.
1573         (check_ptrace_stopped_lwp_gone): Add debug output.
1574         (start_step_over): Use internal_error instead of gdb_assert.
1575         (complete_ongoing_step_over): New function.
1576         (linux_resume_one_thread): Don't resume a suspended thread.
1577         (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1578         it stepping.
1579
1580 2015-08-06  Pedro Alves  <palves@redhat.com>
1581
1582         * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1583         (linux_thread_alive): Use lwp_is_marked_dead.
1584         (extended_event_reported): Delete.
1585         (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1586         instead of extended_event_reported.
1587         (mark_lwp_dead): Don't set the 'dead' flag.  Store the waitstatus
1588         as well.
1589         (lwp_is_marked_dead): New function.
1590         (lwp_running): Use lwp_is_marked_dead.
1591         * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1592         comment.
1593
1594 2015-08-06  Pedro Alves  <palves@redhat.com>
1595
1596         * linux-low.c (linux_wait_1): Move fork event output out of the
1597         !report_to_gdb check.  Pass event_child->waitstatus to
1598         target_waitstatus_to_string instead of ourstatus.
1599
1600 2015-08-04  Yao Qi  <yao.qi@linaro.org>
1601
1602         * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1603         if current_thread is 32 bit.
1604
1605 2015-08-04  Yao Qi  <yao.qi@linaro.org>
1606
1607         * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1608         0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1609         * server.c (extended_protocol): Remove "static".
1610         * server.h (extended_protocol): Declare it.
1611
1612 2015-08-04  Yao Qi  <yao.qi@linaro.org>
1613
1614         * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1615         both aarch64 and aarch32.
1616         (aarch64_set_pc): Likewise.
1617
1618 2015-08-04  Yao Qi  <yao.qi@linaro.org>
1619
1620         * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1621         to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1622         arm-with-neon.xml to srv_xmlfiles.
1623         * linux-aarch64-low.c: Include linux-aarch32-low.h.
1624         (is_64bit_tdesc): New function.
1625         (aarch64_linux_read_description): New function.
1626         (aarch64_arch_setup): Call aarch64_linux_read_description.
1627         (regs_info): Rename to regs_info_aarch64.
1628         (aarch64_regs_info): Return right regs_info.
1629         (initialize_low_arch): Call initialize_low_arch_aarch32.
1630
1631 2015-08-04  Yao Qi  <yao.qi@linaro.org>
1632
1633         * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1634         * linux-aarch32-low.c: New file.
1635         * linux-aarch32-low.h: New file.
1636         * linux-arm-low.c (arm_fill_gregset): Move it to
1637         linux-aarch32-low.c.
1638         (arm_store_gregset): Likewise.
1639         (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1640         (arm_store_vfpregset): Call arm_store_vfpregset_num.
1641         (arm_arch_setup): Check if PTRACE_GETREGSET works.
1642         (regs_info): Rename to regs_info_arm.
1643         (arm_regs_info): Return regs_info_aarch32 if
1644         have_ptrace_getregset is 1 and target description is
1645         arm_with_neon or arm_with_vfpv3.
1646         (initialize_low_arch): Don't call init_registers_arm_with_neon.
1647         Call initialize_low_arch_aarch32 instead.
1648
1649 2015-08-04  Yao Qi  <yao.qi@linaro.org>
1650
1651         * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1652         * linux-low.c: ... here.
1653         * linux-low.h (have_ptrace_getregset): Declare it.
1654
1655 2015-08-04  Pedro Alves  <palves@redhat.com>
1656
1657         * thread-db.c (struct thread_db): Use new typedefs.
1658         (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1659         CHK calls.
1660         (disable_thread_event_reporting): Cast result of dlsym to
1661         destination function pointer type.
1662         (thread_db_mourn): Use td_ta_delete_ftype.
1663
1664 2015-08-03  Sandra Loosemore  <sandra@codesourcery.com>
1665
1666         * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1667         arch variant.
1668         (CDX_BREAKPOINT): Define for R2.
1669         (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1670         (the_low_target): Add comments.
1671
1672 2015-07-30  Yao Qi  <yao.qi@linaro.org>
1673
1674         * linux-arm-low.c (arm_hwcap): Remove it.
1675         (arm_read_description): New local variable arm_hwcap.  Don't
1676         set arm_hwcap to zero.
1677
1678 2015-07-30  Yao Qi  <yao.qi@linaro.org>
1679
1680         * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1681         Use regcache->tdesc instead.
1682         (arm_store_wmmxregset): Likewise.
1683         (arm_fill_vfpregset): Likewise.
1684         (arm_store_vfpregset): Likewise.
1685
1686 2015-07-30  Yao Qi  <yao.qi@linaro.org>
1687
1688         * linux-arm-low.c: Include arch/arm.h.
1689         (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1690         (arm_store_gregset): Likewise.
1691
1692 2015-07-29  Simon Marchi  <simon.marchi@ericsson.com>
1693
1694         * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1695         ptrace's 4th parameter.
1696
1697 2015-07-27  Yao Qi  <yao.qi@linaro.org>
1698
1699         * configure.srv (case aarch64*-*-linux*): Don't set
1700         srv_linux_usrregs.
1701
1702 2015-07-24  Pedro Alves  <palves@redhat.c: Likewise.om>
1703
1704         * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1705         sys/ptrace.h.
1706         * linux-arm-low.c: Likewise.
1707         * linux-cris-low.c: Likewise.
1708         * linux-crisv32-low.c: Likewise.
1709         * linux-low.c: Likewise.
1710         * linux-m68k-low.c: Likewise.
1711         * linux-mips-low.c: Likewise.
1712         * linux-nios2-low.c: Likewise.
1713         * linux-s390-low.c: Likewise.
1714         * linux-sparc-low.c: Likewise.
1715         * linux-tic6x-low.c: Likewise.
1716         * linux-tile-low.c: Likewise.
1717         * linux-x86-low.c: Likewise.
1718
1719 2015-07-24  Pedro Alves  <palves@redhat.com>
1720
1721         * config.in: Regenerate.
1722         * configure: Regenerate.
1723
1724 2015-07-24  Pedro Alves  <palves@redhat.com>
1725
1726         * acinclude.m4: Include ../ptrace.m4.
1727         * configure.ac: Call GDB_AC_PTRACE.
1728         * config.in, configure: Regenerate.
1729
1730 2015-07-24  Yao Qi  <yao.qi@linaro.org>
1731
1732         * linux-low.c (linux_create_inferior): Remove setting to
1733         proc->priv->new_inferior.
1734         (linux_attach): Likewise.
1735         (linux_low_filter_event): Likewise.
1736         * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1737
1738 2015-07-24  Yao Qi  <yao.qi@linaro.org>
1739
1740         * linux-low.c (linux_arch_setup): New function.
1741         (linux_low_filter_event): If proc->tdesc is NULL and
1742         proc->attached is true, call the_low_target.arch_setup.
1743         Otherwise, keep status pending, and return.
1744         (linux_resume_one_lwp_throw): Don't call get_pc if
1745         thread->while_stepping isn't NULL.  Don't call
1746         get_thread_regcache if proc->tdesc is NULL.
1747         (need_step_over_p): Return 0 if proc->tdesc is NULL.
1748         (linux_target_ops): Install arch_setup.
1749         * server.c (start_inferior): Call the_target->arch_setup.
1750         * target.h (struct target_ops) <arch_setup>: New field.
1751         (target_arch_setup): New marco.
1752         * lynx-low.c (lynx_target_ops): Update.
1753         * nto-low.c (nto_target_ops): Update.
1754         * spu-low.c (spu_target_ops): Update.
1755         * win32-low.c (win32_target_ops): Update.
1756
1757 2015-07-24  Yao Qi  <yao.qi@linaro.org>
1758
1759         * linux-low.c (linux_add_process): Don't set
1760         proc->priv->new_inferior.
1761         (linux_create_inferior): Set proc->priv->new_inferior to 1.
1762         (linux_attach): Likewise.
1763
1764 2015-07-24  Yao Qi  <yao.qi@linaro.org>
1765
1766         * server.c (start_inferior): Code refactor.
1767
1768 2015-07-24  Yao Qi  <yao.qi@linaro.org>
1769
1770         * server.c (process_serial_event): Set general_thread.
1771
1772 2015-07-21  Yao Qi  <yao.qi@linaro.org>
1773
1774         * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1775         aarch64_linux_get_debug_reg_capacity.
1776
1777 2015-07-17  Yao Qi  <yao.qi@linaro.org>
1778
1779         * Makefile.in (aarch64-linux-hw-point.o): New rule.
1780         * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1781         * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1782         (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1783         (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1784         (AARCH64_HWP_ALIGNMENT): Likewise.
1785         (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1786         (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1787         (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1788         (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1789         (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1790         (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1791         (struct aarch64_debug_reg_state): Likewise.
1792         (struct arch_lwp_info): Likewise.
1793         (aarch64_align_watchpoint): Likewise.
1794         (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1795         (aarch64_watchpoint_length): Likewise.
1796         (aarch64_point_encode_ctrl_reg): Likewise
1797         (aarch64_point_is_aligned): Likewise.
1798         (aarch64_align_watchpoint): Likewise.
1799         (aarch64_linux_set_debug_regs):
1800         (aarch64_dr_state_insert_one_point): Likewise.
1801         (aarch64_dr_state_remove_one_point): Likewise.
1802         (aarch64_handle_breakpoint): Likewise.
1803         (aarch64_handle_aligned_watchpoint): Likewise.
1804         (aarch64_handle_unaligned_watchpoint): Likewise.
1805         (aarch64_handle_watchpoint): Likewise.
1806
1807 2015-07-17  Yao Qi  <yao.qi@linaro.org>
1808
1809         * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1810         and don't aarch64_get_debug_reg_state.  All callers update.
1811         (aarch64_handle_aligned_watchpoint): Likewise.
1812         (aarch64_handle_unaligned_watchpoint): Likewise.
1813         (aarch64_handle_watchpoint): Likewise.
1814         (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1815         (aarch64_remove_point): Likewise.
1816
1817 2015-07-17  Yao Qi  <yao.qi@linaro.org>
1818
1819         * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1820         debug_printf.
1821         (aarch64_handle_unaligned_watchpoint): Likewise.
1822
1823 2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
1824
1825         Revert the previous 3 commits:
1826         Move gdb_regex* to common/
1827         Move linux_find_memory_regions_full & co.
1828         gdbserver build-id attribute generator
1829
1830 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
1831             Jan Kratochvil  <jan.kratochvil@redhat.com>
1832
1833         gdbserver build-id attribute generator.
1834         * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1835         (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1836         (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1837         (find_phdr): New.
1838         (get_dynamic): Use find_pdhr to traverse program headers.
1839         (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1840         (compare_mapping_entry_range, struct find_memory_region_callback_data)
1841         (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1842         (get_hex_build_id): New.
1843         (linux_qxfer_libraries_svr4): Add optional build-id attribute
1844         to reply XML document.
1845
1846 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
1847             Jan Kratochvil  <jan.kratochvil@redhat.com>
1848
1849         * target.c: Include target/target-utils.h and fcntl.h.
1850         (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1851         (target_fileio_read_stralloc): New functions.
1852
1853 2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
1854
1855         * Makefile.in (OBS): Add gdb_regex.o.
1856         (gdb_regex.o): New.
1857         * config.in: Rebuilt.
1858         * configure: Rebuilt.
1859
1860 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
1861             Jan Kratochvil  <jan.kratochvil@redhat.com>
1862
1863         Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1864         * Makefile.in (OBS): Add target-utils.o.
1865         (linux-maps.o, target-utils.o): New.
1866         * configure.srv (srv_linux_obj): Add linux-maps.o.
1867
1868 2015-07-15  Pierre Langlois  <pierre.langlois@arm.com>
1869
1870         * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1871         function, return 1.
1872         (the_low_target): Install it.
1873
1874 2015-07-14  Pedro Alves  <palves@redhat.com>
1875
1876         * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1877         Instead, ignore ECHILD, and throw an error for other errnos.
1878
1879 2015-07-10  Pedro Alves  <palves@redhat.com>
1880
1881         * event-loop.c (struct callback_event) <data>: Change type to
1882         gdb_client_data instance instead of gdb_client_data pointer.
1883         (append_callback_event): Adjust.
1884
1885 2015-07-10  Pierre Langlois  <pierre.langlois@arm.com>
1886
1887         * linux-aarch64-low.c: Add comments for each linux_target_ops
1888         method.  Remove comments already covered in target_ops and
1889         linux_target_ops definitions.
1890         (the_low_target): Add comments for each unimplemented method.
1891
1892 2015-07-09  Yao Qi  <yao.qi@linaro.org>
1893
1894         * linux-aarch64-low.c (aarch64_regmap): Remove.
1895         (aarch64_usrregs_info): Remove.
1896         (regs_info): Set field usrregs to NULL.
1897
1898 2015-07-02  Markus Metzger  <markus.t.metzger@intel.com>
1899
1900         * linux-low.c: Include "rsp-low.h"
1901         (linux_low_encode_pt_config, linux_low_encode_raw): New.
1902         (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1903         (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1904         (handle_btrace_enable_pt): New.
1905         (handle_btrace_general_set): Support "pt".
1906         (handle_btrace_conf_general_set): Support "pt:size".
1907
1908 2015-06-29  Pierre Langlois  <pierre.langlois@arm.com>
1909
1910         * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1911         Z_PACKET_SW_BP.
1912
1913 2015-06-29  Pierre Langlois  <pierre.langlois@arm.com>
1914
1915         * linux-aarch64-low.c: Remove comment about endianness.
1916         (aarch64_breakpoint): Change type to gdb_byte[].  Set to "brk #0".
1917         (aarch64_breakpoint_at): Change type of insn to gdb_byte[].  Use
1918         memcmp.
1919
1920 2015-06-24  Gary Benson  <gbenson@redhat.com>
1921
1922         * linux-i386-ipa.c (stdint.h): Do not include.
1923         * lynx-i386-low.c (stdint.h): Likewise.
1924         * lynx-ppc-low.c (stdint.h): Likewise.
1925         * mem-break.c (stdint.h): Likewise.
1926         * thread-db.c (stdint.h): Likewise.
1927         * tracepoint.c (stdint.h): Likewise.
1928         * win32-low.c (stdint.h): Likewise.
1929
1930 2015-06-18  Simon Marchi  <simon.marchi@ericsson.com>
1931
1932         * server.c (write_qxfer_response): Update call to
1933         remote_escape_output.
1934
1935 2015-06-15  Aleksandar Ristovski  <aristovski@qnx.com
1936             Jan Kratochvil  <jan.kratochvil@redhat.com>
1937
1938         Merge multiple hex conversions.
1939         * gdbreplay.c (tohex): Rename to 'fromhex'.
1940         (logchar): Use fromhex.
1941
1942 2015-06-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
1943
1944         * server.c (handle_qxfer_libraries): Set `version' attribute for
1945         <library-list>.
1946
1947 2015-06-10  Gary Benson  <gbenson@redhat.com>
1948
1949         * target.h (struct target_ops) <multifs_open>: New field.
1950         <multifs_unlink>: Likewise.
1951         <multifs_readlink>: Likewise.
1952         * linux-low.c (nat/linux-namespaces.h): New include.
1953         (linux_target_ops): Initialize the_target->multifs_open,
1954         the_target->multifs_unlink and the_target->multifs_readlink.
1955         * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1956         * hostio.c (hostio_fs_pid): New static variable.
1957         (hostio_handle_new_gdb_connection): New function.
1958         (handle_setfs): Likewise.
1959         (handle_open): Use the_target->multifs_open as appropriate.
1960         (handle_unlink): Use the_target->multifs_unlink as appropriate.
1961         (handle_readlink): Use the_target->multifs_readlink as
1962         appropriate.
1963         (handle_vFile): Handle vFile:setfs packets.
1964         * server.c (handle_query): Call hostio_handle_new_gdb_connection
1965         after target_handle_new_gdb_connection.
1966
1967 2015-06-10  Gary Benson  <gbenson@redhat.com>
1968
1969         * configure.ac (AC_CHECK_FUNCS): Add setns.
1970         * config.in: Regenerate.
1971         * configure: Likewise.
1972         * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1973         (linux-namespaces.o): New rule.
1974         * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1975
1976 2015-06-09  Gary Benson <gbenson@redhat.com>
1977
1978         * hostio.c (handle_open): Process mode argument with
1979         fileio_to_host_mode.
1980
1981 2015-06-01  Yao Qi  <yao.qi@linaro.org>
1982
1983         * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1984         * linux-x86-low.c: Likewise.
1985
1986 2015-05-28  Don Breazeal  <donb@codesourcery.com>
1987
1988         * linux-low.c (handle_extended_wait): Initialize
1989         thread_info.last_resume_kind for new fork children.
1990
1991 2015-05-15  Pedro Alves  <palves@redhat.com>
1992
1993         * target.h (target_handle_new_gdb_connection): Rewrite using if
1994         wrapped in do/while.
1995
1996 2015-05-14  Joel Brobecker  <brobecker@adacore.com>
1997
1998         * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1999         * configure, config.in: Regenerate.
2000         * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
2001         Declare typedef.
2002
2003 2015-05-12  Don Breazeal  <donb@codesourcery.com>
2004
2005         * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
2006         PTRACE_EVENT_VFORK_DONE.
2007         (linux_low_ptrace_options, extended_event_reported): Add vfork
2008         events.
2009         * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
2010         and "vforkdone" for RSP 'T' Stop Reply Packet.
2011         * server.h (report_vfork_events): Declare
2012         global variable.
2013
2014 2015-05-12  Don Breazeal  <donb@codesourcery.com>
2015
2016         * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
2017         (the_low_target) <new_fork>: Initialize new member.
2018         * linux-arm-low.c (arm_new_fork): New function.
2019         (the_low_target) <new_fork>: Initialize new member.
2020         * linux-low.c (handle_extended_wait): Call new target function
2021         new_fork.
2022         * linux-low.h (struct linux_target_ops) <new_fork>: New member.
2023         * linux-mips-low.c (mips_add_watchpoint): New function
2024         extracted from mips_insert_point.
2025         (the_low_target) <new_fork>: Initialize new member.
2026         (mips_linux_new_fork): New function.
2027         (mips_insert_point): Call mips_add_watchpoint.
2028         * linux-x86-low.c (x86_linux_new_fork): New function.
2029         (the_low_target) <new_fork>: Initialize new member.
2030
2031 2015-05-12  Don Breazeal  <donb@codesourcery.com>
2032
2033         * linux-low.c (handle_extended_wait): Implement return value,
2034         rename argument 'event_child' to 'event_lwp', handle
2035         PTRACE_EVENT_FORK, call internal_error for unrecognized event.
2036         (linux_low_ptrace_options): New function.
2037         (linux_low_filter_event): Call linux_low_ptrace_options,
2038         use different argument fo linux_enable_event_reporting,
2039         use return value from handle_extended_wait.
2040         (extended_event_reported): New function.
2041         (linux_wait_1): Call extended_event_reported and set
2042         status to report fork events.
2043         (linux_write_memory): Add pid to debug message.
2044         (reset_lwp_ptrace_options_callback): New function.
2045         (linux_handle_new_gdb_connection): New function.
2046         (linux_target_ops): Initialize new structure member.
2047         * linux-low.h (struct lwp_info) <waitstatus>: New member.
2048         * lynx-low.c: Initialize new structure member.
2049         * remote-utils.c (prepare_resume_reply): Implement stop reason
2050         "fork" for "T" stop message.
2051         * server.c (handle_query): Call handle_new_gdb_connection.
2052         * server.h (report_fork_events): Declare global flag.
2053         * target.h (struct target_ops) <handle_new_gdb_connection>:
2054         New member.
2055         (target_handle_new_gdb_connection): New macro.
2056         * win32-low.c: Initialize new structure member.
2057
2058 2015-05-12  Don Breazeal  <donb@codesourcery.com>
2059
2060         * mem-break.c (APPEND_TO_LIST): Define macro.
2061         (clone_agent_expr): New function.
2062         (clone_one_breakpoint): New function.
2063         (clone_all_breakpoints): New function.
2064         * mem-break.h: Declare new functions.
2065
2066 2015-05-12  Don Breazeal  <donb@codesourcery.com>
2067
2068         * linux-low.c (linux_supports_fork_events): New function.
2069         (linux_supports_vfork_events): New function.
2070         (linux_target_ops): Initialize new structure members.
2071         (initialize_low): Call linux_check_ptrace_features.
2072         * lynx-low.c (lynx_target_ops): Initialize new structure
2073         members.
2074         * server.c (report_fork_events, report_vfork_events):
2075         New global flags.
2076         (handle_query): Add new features to qSupported packet and
2077         response.
2078         (captured_main): Initialize new global variables.
2079         * target.h (struct target_ops) <supports_fork_events>:
2080         New member.
2081         <supports_vfork_events>: New member.
2082         (target_supports_fork_events): New macro.
2083         (target_supports_vfork_events): New macro.
2084         * win32-low.c (win32_target_ops): Initialize new structure
2085         members.
2086
2087 2015-05-12  Gary Benson <gbenson@redhat.com>
2088
2089         * server.c (handle_qxfer_exec_file): Use current process
2090         if annex is empty.
2091
2092 2015-05-08  Sandra Loosemore  <sandra@codesourcery.com>
2093
2094         * linux-nios2-low.c: Include elf/common.h.  Adjust comments.
2095         Remove HAVE_PTRACE_GETREGS conditionals.
2096         (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
2097         instead of PTRACE_GETREGS and PTRACE_SETREGS.
2098
2099 2015-05-08  Yao Qi  <yao.qi@linaro.org>
2100
2101         * linux-low.c (linux_supports_conditional_breakpoints): New
2102         function.
2103         (linux_target_ops): Install new target method.
2104         * lynx-low.c (lynx_target_ops): Install NULL hook for
2105         supports_conditional_breakpoints.
2106         * nto-low.c (nto_target_ops): Likewise.
2107         * spu-low.c (spu_target_ops): Likewise.
2108         * win32-low.c (win32_target_ops): Likewise.
2109         * server.c (handle_query): Check
2110         target_supports_conditional_breakpoints.
2111         * target.h (struct target_ops) <supports_conditional_breakpoints>:
2112         New field.
2113         (target_supports_conditional_breakpoints): New macro.
2114
2115 2015-05-06  Pedro Alves  <palves@redhat.com>
2116
2117         PR server/18081
2118         * server.c (start_inferior): If the process exits, mourn it.
2119
2120 2015-04-21  Gary Benson <gbenson@redhat.com>
2121
2122         * hostio.c (fileio_open_flags_to_host): Factored out to
2123         fileio_to_host_openflags in common/fileio.c.  Single use
2124         updated.
2125
2126 2015-04-17  Max Filippov  <jcmvbkbc@gmail.com>
2127
2128         * linux-xtensa-low.c (xtensa_fill_gregset)
2129         (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
2130         XCHAL_HAVE_LOOP.
2131
2132 2015-04-17  Max Filippov  <jcmvbkbc@gmail.com>
2133
2134         * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
2135         (regs_info): Replace usrregs pointer with NULL.
2136
2137 2015-04-17  Gary Benson  <gbenson@redhat.com>
2138
2139         * target.h (struct target_ops) <pid_to_exec_file>: New field.
2140         * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
2141         * server.c (handle_qxfer_exec_file): New function.
2142         (qxfer_packets): Add exec-file entry.
2143         (handle_query): Report qXfer:exec-file:read as supported packet.
2144
2145 2015-04-14  Romain Naour <romain.naour@openwide.fr>  (tiny change)
2146
2147         * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
2148
2149 2015-04-09  Gary Benson <gbenson@redhat.com>
2150
2151         * hostio-errno.c (errno_to_fileio_error): Remove function.
2152         Update caller to use remote_fileio_to_fio_error.
2153
2154 2015-04-09  Yao Qi  <yao.qi@linaro.org>
2155
2156         * linux-low.c (linux_insert_point): Call
2157         insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
2158         (linux_remove_point): Call remove_memory_breakpoint if type is
2159         raw_bkpt_type_sw.
2160         * linux-x86-low.c (x86_insert_point): Don't call
2161         insert_memory_breakpoint.
2162         (x86_remove_point): Don't call remove_memory_breakpoint.
2163
2164 2015-04-01  Pedro Alves  <palves@redhat.com>
2165             Cleber Rosa  <crosa@redhat.com>
2166
2167         * server.c (gdbserver_usage): Reorganize and extend the usage
2168         message.
2169
2170 2015-03-24  Pedro Alves  <palves@redhat.com>
2171
2172         * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
2173         output.  Also dump TRAP_TRACE.
2174         (linux_low_filter_event): In debug output, distinguish a
2175         resume_stop SIGSTOP from a delayed SIGSTOP.
2176
2177 2015-03-24  Gary Benson  <gbenson@redhat.com>
2178
2179         * linux-x86-low.c (x86_linux_new_thread): Moved to
2180         nat/x86-linux.c.
2181         (x86_linux_prepare_to_resume): Likewise.
2182
2183 2015-03-24  Gary Benson  <gbenson@redhat.com>
2184
2185         * Makefile.in (x86-linux-dregs.o): New rule.
2186         * configure.srv: Add x86-linux-dregs.o to relevant targets.
2187         * linux-x86-low.c: Include nat/x86-linux-dregs.h.
2188         (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
2189         (x86_linux_dr_get): Likewise.
2190         (x86_linux_dr_set): Likewise.
2191         (update_debug_registers_callback): Likewise.
2192         (x86_linux_dr_set_addr): Likewise.
2193         (x86_linux_dr_get_addr): Likewise.
2194         (x86_linux_dr_set_control): Likewise.
2195         (x86_linux_dr_get_control): Likewise.
2196         (x86_linux_dr_get_status): Likewise.
2197         (x86_linux_update_debug_registers): Likewise.
2198
2199 2015-03-24  Gary Benson  <gbenson@redhat.com>
2200
2201         * linux-x86-low.c (x86_linux_update_debug_registers):
2202         New function, factored out from...
2203         (x86_linux_prepare_to_resume): ...this.
2204
2205 2015-03-24  Gary Benson  <gbenson@redhat.com>
2206
2207         * linux-x86-low.c (x86_linux_dr_get): Update comments.
2208         (x86_linux_dr_set): Likewise.
2209         (update_debug_registers_callback): Likewise.
2210         (x86_linux_dr_set_addr): Likewise.
2211         (x86_linux_dr_get_addr): Likewise.
2212         (x86_linux_dr_set_control): Likewise.
2213         (x86_linux_dr_get_control): Likewise.
2214         (x86_linux_dr_get_status): Likewise.
2215         (x86_linux_prepare_to_resume): Likewise.
2216
2217 2015-03-24  Gary Benson  <gbenson@redhat.com>
2218
2219         * linux-x86-low.c (x86_linux_dr_get): Add assertion.
2220         Use perror_with_name.  Pass string through gettext.
2221         (x86_linux_dr_set): Likewise.
2222
2223 2015-03-24  Gary Benson  <gbenson@redhat.com>
2224
2225         * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
2226         (x86_linux_dr_set_addr): ...this.
2227         (x86_dr_low_get_addr): Rename to...
2228         (x86_linux_dr_get_addr): ...this.
2229         (x86_dr_low_set_control): Rename to...
2230         (x86_linux_dr_set_control): ...this.
2231         (x86_dr_low_get_control): Rename to...
2232         (x86_linux_dr_get_control): ...this.
2233         (x86_dr_low_get_status): Rename to...
2234         (x86_linux_dr_get_status): ...this.
2235         (x86_dr_low): Update with new function names.
2236
2237 2015-03-24  Gary Benson  <gbenson@redhat.com>
2238
2239         * Makefile.in (x86-linux.o): New rule.
2240         * configure.srv: Add x86-linux.o to relevant targets.
2241         * linux-low.c (lwp_set_arch_private_info): New function.
2242         (lwp_arch_private_info): Likewise.
2243         * linux-x86-low.c: Include nat/x86-linux.h.
2244         (arch_lwp_info): Removed structure.
2245         (update_debug_registers_callback):
2246         Use lwp_set_debug_registers_changed.
2247         (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
2248         and lwp_set_debug_registers_changed.
2249         (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
2250
2251 2015-03-24  Gary Benson  <gbenson@redhat.com>
2252
2253         * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
2254         * linux-arm-low.c (arm_new_thread): Likewise.
2255         * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
2256         * linux-mips-low.c (mips_linux_new_thread): Likewise.
2257         * linux-x86-low.c (x86_linux_new_thread): Likewise.
2258         * linux-low.c (add_lwp): Update the_low_target.new_thread call.
2259
2260 2015-03-24  Gary Benson  <gbenson@redhat.com>
2261
2262         * linux-low.c (ptid_of_lwp): New function.
2263         (lwp_is_stopped): Likewise.
2264         (lwp_stop_reason): Likewise.
2265         * linux-x86-low.c (update_debug_registers_callback):
2266         Use lwp_is_stopped.
2267         (x86_linux_prepare_to_resume): Use ptid_of_lwp and
2268         lwp_stop_reason.
2269
2270 2015-03-24  Gary Benson  <gbenson@redhat.com>
2271
2272         * linux-low.h (linux_stop_lwp): Remove declaration.
2273
2274 2015-03-24  Gary Benson  <gbenson@redhat.com>
2275
2276         * linux-low.h: Include nat/linux-nat.h.
2277         * linux-low.c (iterate_over_lwps_args): New structure.
2278         (iterate_over_lwps_filter): New function.
2279         (iterate_over_lwps): Likewise.
2280         * linux-x86-low.c (update_debug_registers_callback):
2281         Update signature to what iterate_over_lwps expects.
2282         Remove PID check that iterate_over_lwps now performs.
2283         (x86_dr_low_set_addr): Use iterate_over_lwps.
2284         (x86_dr_low_set_control): Likewise.
2285
2286 2015-03-24  Gary Benson  <gbenson@redhat.com>
2287
2288         * linux-x86-low.c (x86_debug_reg_state): New function.
2289         (x86_linux_prepare_to_resume): Use the above.
2290
2291 2015-03-24  Gary Benson  <gbenson@redhat.com>
2292
2293         * linux-low.c (current_lwp_ptid): New function.
2294         * linux-x86-low.c: Include nat/linux-nat.h.
2295         (x86_dr_low_get_addr): Use current_lwp_ptid.
2296         (x86_dr_low_get_control): Likewise.
2297         (x86_dr_low_get_status): Likewise.
2298
2299 2015-03-20  Pedro Alves  <palves@redhat.com>
2300
2301         * tracepoint.c (cmd_qtstatus): Make "str" const.
2302
2303 2015-03-20  Pedro Alves  <palves@redhat.com>
2304
2305         * server.c (handle_general_set): Make "req_str" const.
2306
2307 2015-03-19  Pedro Alves  <palves@redhat.com>
2308
2309         * linux-low.c (linux_resume_one_lwp): Rename to ...
2310         (linux_resume_one_lwp_throw): ... this.  Don't handle ESRCH here,
2311         instead call perror_with_name.
2312         (check_ptrace_stopped_lwp_gone): New function.
2313         (linux_resume_one_lwp): Reimplement as wrapper around
2314         linux_resume_one_lwp_throw that swallows errors if the LWP is
2315         gone.
2316
2317 2015-03-19  Pedro Alves  <palves@redhat.com>
2318
2319         * linux-low.c (count_events_callback, select_event_lwp_callback):
2320         No longer check whether the thread has resume_stop as last resume
2321         kind.
2322
2323 2015-03-19 Pedro Alves  <palves@redhat.com>
2324
2325         * linux-low.c (count_events_callback, select_event_lwp_callback):
2326         Use the lwp's status_pending_p field, not the thread's.
2327
2328 2015-03-19  Pedro Alves  <palves@redhat.com>
2329
2330         * linux-low.c (select_event_lwp_callback): Update comments to
2331         no longer mention SIGTRAP.
2332
2333 2015-03-18  Gary Benson  <gbenson@redhat.com>
2334
2335         * server.c (handle_query): Do not report vFile:fstat as supported.
2336
2337 2015-03-11  Gary Benson  <gbenson@redhat.com>
2338
2339         * hostio.c (sys/types.h): New include.
2340         (sys/stat.h): Likewise.
2341         (common-remote-fileio.h): Likewise.
2342         (handle_fstat): New function.
2343         (handle_vFile): Handle vFile:fstat packets.
2344
2345 2015-03-11  Gary Benson  <gbenson@redhat.com>
2346
2347         * configure.ac (AC_CHECK_MEMBERS): Add checks for
2348         struct stat.st_blocks and struct stat.st_blksize.
2349         * configure: Regenerate.
2350         * config.in: Likewise.
2351         * Makefile.in (SFILES): Add common/common-remote-fileio.c.
2352         (OBS): Add common-remote-fileio.o.
2353         (common-remote-fileio.o): New rule.
2354
2355 2015-03-09  Pedro Alves  <palves@redhat.com>
2356
2357         * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
2358         'struct sockaddr' pointer in 'accept' call.
2359
2360 2015-03-09  Pedro Alves  <palves@redhat.com>
2361
2362         Revert:
2363         2015-03-07  Pedro Alves  <palves@redhat.com>
2364         * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2365         or <winsock2.h> here.  Instead include "gdb_socket.h".
2366         (remote_open): Use union gdb_sockaddr_u.
2367         * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2368         or <winsock2.h> here.  Instead include "gdb_socket.h".
2369         (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2370         * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2371         or <sys/un.h>.
2372         (init_named_socket, gdb_agent_helper_thread): Use union
2373         gdb_sockaddr_u.
2374
2375 2015-03-07  Pedro Alves  <palves@redhat.com>
2376
2377         * configure.ac (build_warnings): Move
2378         -Wdeclaration-after-statement to the C-specific set.
2379         * configure: Regenerate.
2380
2381 2015-03-07  Pedro Alves  <palves@redhat.com>
2382
2383         * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2384         or <winsock2.h> here.  Instead include "gdb_socket.h".
2385         (remote_open): Use union gdb_sockaddr_u.
2386         * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2387         or <winsock2.h> here.  Instead include "gdb_socket.h".
2388         (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2389         * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2390         or <sys/un.h>.
2391         (init_named_socket, gdb_agent_helper_thread): Use union
2392         gdb_sockaddr_u.
2393
2394 2015-03-07  Pedro Alves  <palves@redhat.com>
2395
2396         Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
2397         instead.
2398
2399 2015-03-06  Yao Qi  <yao.qi@linaro.org>
2400
2401         * linux-aarch64-low.c (aarch64_insert_point): Use
2402         show_debug_regs as a boolean.
2403         (aarch64_remove_point): Likewise.
2404
2405 2015-03-05  Pedro Alves  <palves@redhat.com>
2406
2407         * lynx-low.c (lynx_target_ops): Install NULL hooks for
2408         stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2409         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
2410         * nto-low.c (nto_target_ops): Likewise.
2411         * spu-low.c (spu_target_ops): Likewise.
2412         * win32-low.c (win32_target_ops): Likewise.
2413
2414 2015-03-04  Pedro Alves  <palves@redhat.com>
2415
2416         * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
2417         Decide whether a breakpoint triggered based on the SIGTRAP's
2418         siginfo.si_code.
2419         (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
2420         breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
2421         (linux_low_filter_event): Check for breakpoints before checking
2422         watchpoints.
2423         (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
2424         siginfo.si_code.
2425         (linux_stopped_by_sw_breakpoint)
2426         (linux_supports_stopped_by_sw_breakpoint)
2427         (linux_stopped_by_hw_breakpoint)
2428         (linux_supports_stopped_by_hw_breakpoint): New functions.
2429         (linux_target_ops): Install new target methods.
2430
2431 2015-03-04  Pedro Alves  <palves@redhat.com>
2432
2433         * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
2434         * server.c (swbreak_feature, hwbreak_feature): New globals.
2435         (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
2436         (captured_main): Clear swbreak_feature and hwbreak_feature.
2437         * server.h (swbreak_feature, hwbreak_feature): Declare.
2438         * target.h (struct target_ops) <stopped_by_sw_breakpoint,
2439         supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
2440         supports_stopped_by_hw_breakpoint>: New fields.
2441         (target_supports_stopped_by_sw_breakpoint)
2442         (target_stopped_by_sw_breakpoint)
2443         (target_supports_stopped_by_hw_breakpoint)
2444         (target_stopped_by_hw_breakpoint): Declare.
2445
2446 2015-03-04  Pedro Alves  <palves@redhat.com>
2447
2448         enum lwp_stop_reason -> enum target_stop_reason
2449         * linux-low.c (check_stopped_by_breakpoint): Adjust.
2450         (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
2451         (linux_wait_1, stuck_in_jump_pad_callback)
2452         (move_out_of_jump_pad_callback, linux_resume_one_lwp)
2453         (linux_stopped_by_watchpoint):
2454         * linux-low.h (enum lwp_stop_reason): Delete.
2455         (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
2456         * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2457
2458 2015-03-04  Yao Qi  <yao.qi@linaro.org>
2459
2460         * Makefile.in (SFILES): Add linux-aarch64-low.c.
2461
2462 2015-03-03  Gary Benson  <gbenson@redhat.com>
2463
2464         * hostio.c (handle_vFile): Fix prefix lengths.
2465
2466 2015-03-03  Markus Metzger  <markus.t.metzger@intel.com>
2467
2468         * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
2469         ptr_bits.
2470
2471 2015-03-02  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2472
2473         * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
2474         (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
2475         (clean): Add "rm -f" for above C files.
2476         * configure.srv (srv_regobj): Add s390-vx-linux64.o,
2477         s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
2478         (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
2479         s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
2480         * linux-s390-low.c (HWCAP_S390_VX): New macro.
2481         (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
2482         (init_registers_s390x_vx_linux64)
2483         (init_registers_s390x_tevx_linux64)
2484         (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
2485         (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
2486         declarations.
2487         (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
2488         (s390_store_vxrs_high): New functions.
2489         (s390_regsets): Add entries for NT_S390_VXRS_LOW and
2490         NT_S390_VXRS_HIGH.
2491         (s390_arch_setup): Add logic for selecting one of the new target
2492         descriptions.  Activate the new vector regsets if applicable.
2493         (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
2494         init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
2495         and init_registers_s390x_tevx_linux64.
2496
2497 2015-03-01  Pedro Alves  <palves@redhat.com>
2498
2499         * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
2500         parameter.
2501
2502 2015-02-27  Pedro Alves  <palves@redhat.com>
2503
2504         * linux-x86-low.c (u_debugreg_offset): New function.
2505         (x86_linux_dr_get, x86_linux_dr_set): Use it.
2506
2507 2015-02-27  Pedro Alves  <palves@redhat.com>
2508
2509         * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
2510         [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
2511         [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
2512         ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2513         (ps_lsetfpregs, ps_getpid)
2514         (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
2515         (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
2516         (ps_lsetxregs, ps_plog): Declare.
2517
2518 2015-02-27  Pedro Alves  <palves@redhat.com>
2519
2520         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
2521         IP_AGENT_EXPORT_FUNC.
2522         * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
2523         IP_AGENT_EXPORT_FUNC.
2524         * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
2525         (IP_AGENT_EXPORT): Delete.
2526         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2527         (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2528         (gdb_trampoline_buffer_error, collecting, gdb_collect)
2529         (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
2530         (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
2531         (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
2532         (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
2533         (traceframe_read_count, traceframe_write_count)
2534         (traceframes_created, trace_state_variables, get_raw_reg)
2535         (get_trace_state_variable_value, set_trace_state_variable_value)
2536         (ust_loaded, helper_thread_id, cmd_buf): Use
2537         IPA_SYM_EXPORTED_NAME.
2538         (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
2539         (tracepoints) Use IP_AGENT_EXPORT_VAR.
2540         (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
2541         IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2542         (last_tracepoint): Move into !IN_PROCESS_AGENT block.
2543         (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
2544         EXTERN_C_PUSH/EXTERN_C_POP.
2545         (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
2546         (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
2547         wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2548         (trace_buffer_ctrl, trace_buffer_ctrl_curr)
2549         (traceframe_write_count, traceframe_read_count)
2550         (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
2551         (about_to_request_buffer_space, get_trace_state_variable_value)
2552         (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
2553         (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
2554         EXTERN_C_PUSH/EXTERN_C_POP.
2555         (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2556         (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2557         (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2558         and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2559         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2560         (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2561         (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2562         * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2563         Define.
2564         (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2565         (IP_AGENT_EXPORT_VAR_DECL): Define.
2566         (tracing): Declare.
2567         (gdb_agent_get_raw_reg): Declare.
2568
2569 2015-02-27  Tom Tromey  <tromey@redhat.com>
2570             Pedro Alves  <palves@redhat.com>
2571
2572         Rename symbols whose names are reserved C++ keywords throughout.
2573
2574 2015-02-27  Pedro Alves  <palves@redhat.com>
2575
2576         * Makefile.in (COMPILER): New, get it from autoconf.
2577         (CXX): Get from autoconf instead.
2578         (COMPILE.pre): Use COMPILER.
2579         (CC-LD): Rename to ...
2580         (CC_LD): ... this.  Use COMPILER.
2581         (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2582         (CXX_FOR_TARGET): Default to g++ instead of gcc.
2583         * acinclude.m4: Include build-with-cxx.m4.
2584         * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2585         Disable -Werror by default if building in C++ mode.
2586         (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2587         -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2588         the C++ compiler.  Save/restore CXXFLAGS too.
2589         * configure: Regenerate.
2590
2591 2015-02-27  Pedro Alves  <palves@redhat.com>
2592
2593         * acinclude.m4: Include libiberty.m4.
2594         * configure.ac: Call libiberty_INIT.
2595         * config.in, configure: Regenerate.
2596
2597 2015-02-26  Pedro Alves  <palves@redhat.com>
2598
2599         * linux-low.c (linux_wait_1): When incrementing the PC past a
2600         program breakpoint always use the_low_target.breakpoint_len as
2601         increment, rather than the maximum between that and
2602         the_low_target.decr_pc_after_break.
2603
2604 2015-02-23  Pedro Alves  <palves@redhat.com>
2605
2606         * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2607         thread was doing a step-over; always adjust the PC if
2608         we stepped over a permanent breakpoint.
2609         (linux_wait_1): If we stepped over breakpoint that was on top of a
2610         permanent breakpoint, manually advance the PC past it.
2611
2612 2015-02-23  Pedro Alves  <palves@redhat.com>
2613
2614         * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2615         modes.
2616         (x86_fill_gregset, x86_store_gregset): Use it when handling
2617         $orig_eax.
2618
2619 2015-02-20  Pedro Alves  <palves@redhat.com>
2620
2621         * thread-db.c: Include "nat/linux-procfs.h".
2622         (thread_db_init): Skip listing new threads if the kernel supports
2623         PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2624
2625 2015-02-20  Pedro Alves  <palves@redhat.com>
2626
2627         * linux-low.c (status_pending_p_callback): Use ptid_match.
2628
2629 2015-02-19  Antoine Tremblay  <antoine.tremblay@ericsson.com>
2630
2631         PR breakpoints/16812
2632         * linux-low.c (wstatus_maybe_breakpoint): Remove.
2633         (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2634         (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2635
2636 2015-02-10  Antoine Tremblay <antoine.tremblay@ericsson.com>
2637
2638         PR breakpoints/15956
2639         * tracepoint.c (cmd_qtinit): Add check for current_thread.
2640
2641 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
2642
2643         * linux-low.c (linux_low_btrace_conf): Print size.
2644         * server.c (handle_btrace_conf_general_set): New.
2645         (hanle_general_set): Call handle_btrace_conf_general_set.
2646         (handle_query): Report Qbtrace-conf:bts:size as supported.
2647
2648 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
2649
2650         * linux-low.c (linux_low_enable_btrace): Update parameters.
2651         (linux_low_btrace_conf): New.
2652         (linux_target_ops)<to_btrace_conf>: Initialize.
2653         * server.c (current_btrace_conf): New.
2654         (handle_btrace_enable): Rename to ...
2655         (handle_btrace_enable_bts): ... this.  Pass &current_btrace_conf
2656         to target_enable_btrace.  Update comment.  Update users.
2657         (handle_qxfer_btrace_conf): New.
2658         (qxfer_packets): Add btrace-conf entry.
2659         (handle_query): Report qXfer:btrace-conf:read as supported packet.
2660         * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2661         (target_ops)<read_btrace_conf>: New.
2662         (target_enable_btrace): Update parameters.
2663         (target_read_btrace_conf): New.
2664
2665 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
2666
2667         * server.c (handle_btrace_general_set): Remove call to
2668         target_supports_btrace.
2669         (supported_btrace_packets): New.
2670         (handle_query): Call supported_btrace_packets.
2671         * target.h: include btrace-common.h.
2672         (btrace_target_info): Removed.
2673         (supports_btrace, target_supports_btrace): Update parameters.
2674
2675 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
2676
2677         * Makefile.in (SFILES): Add common/btrace-common.c.
2678         (OBS): Add common/btrace-common.o.
2679         (btrace-common.o): Add build rules.
2680         * linux-low: Include btrace-common.h.
2681         (linux_low_read_btrace): Use struct btrace_data.  Call
2682         btrace_data_init and btrace_data_fini.
2683
2684 2015-02-06  Pedro Alves  <palves@redhat.com>
2685
2686         * thread-db.c (find_new_threads_callback): Add debug output.
2687
2688 2015-02-04  Pedro Alves  <palves@redhat.com>
2689
2690         * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2691         (resume_stopped_resumed_lwps): New function.
2692         (linux_wait_for_event_filtered): Use it.
2693
2694 2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
2695
2696         * Makefile.in (SFILES): Add linux-personality.c.
2697         (linux-personality.o): New rule.
2698         * configure.srv (srv_linux_obj): Add linux-personality.o to the
2699         list of objects to be built.
2700         * linux-low.c: Include nat/linux-personality.h.
2701         (linux_create_inferior): Remove code to disable address space
2702         randomization (moved to ../nat/linux-personality.c).  Create
2703         cleanup to disable address space randomization.
2704
2705 2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
2706
2707         * Makefile.in (posix-strerror.o): New rule.
2708         (mingw-strerror.o): Likewise.
2709         * configure: Regenerated.
2710         * configure.ac: Source file ../common/common.host.  Initialize new
2711         variable srv_host_obs.  Add srv_host_obs to GDBSERVER_DEPFILES.
2712
2713 2015-01-14  Yao Qi  <yao@codesourcery.com>
2714
2715         * Makefile.in (SFILES): Add nat/ppc-linux.c.
2716         (ppc-linux.o): New rule.
2717         * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2718         * configure.ac: AC_CHECK_FUNCS(getauxval).
2719         * config.in: Re-generated.
2720         * configure: Re-generated.
2721         * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2722         ppc64_64bit_inferior_p
2723
2724 2015-01-14  Yao Qi  <yao@codesourcery.com>
2725
2726         * linux-ppc-low.c: Include "nat/ppc-linux.h".
2727          (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2728         (PPC_FEATURE_HAS_ALTIVEC,  PPC_FEATURE_HAS_SPE): Likewise.
2729         (PT_ORIG_R3, PT_TRAP): Likewise.
2730         (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2731         (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2732         (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2733
2734 2015-01-10  Joel Brobecker  <brobecker@adacore.com>
2735
2736         * i387-fp.c (i387_cache_to_xsave): In look over
2737         num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2738         zmmh_low_space field by use of zmmh_high_space.
2739
2740 2015-01-09  Pedro Alves  <palves@redhat.com>
2741
2742         * linux-low.c (step_over_bkpt): Move higher up in the file.
2743         (handle_extended_wait): Don't store the stop_pc here.
2744         (get_stop_pc): Adjust comments and rename to ...
2745         (check_stopped_by_breakpoint): ... this.  Record whether the LWP
2746         stopped for a software breakpoint or hardware breakpoint.
2747         (thread_still_has_status_pending_p): New function.
2748         (status_pending_p_callback): Use
2749         thread_still_has_status_pending_p.  If the event is no longer
2750         interesting, resume the LWP.
2751         (handle_tracepoints): Add assert.
2752         (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2753         (wstatus_maybe_breakpoint): New function.
2754         (cancel_breakpoint): Delete function.
2755         (check_stopped_by_watchpoint): New function, factored out from
2756         linux_low_filter_event.
2757         (lp_status_maybe_breakpoint): Delete function.
2758         (linux_low_filter_event): Remove filter_ptid argument.
2759         Leave thread group exits pending here.  Store the LWP's stop PC.
2760         Always leave events pending.
2761         (linux_wait_for_event_filtered): Pull all events out of the
2762         kernel, and leave them all pending.
2763         (count_events_callback, select_event_lwp_callback): Consider all
2764         events.
2765         (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2766         (select_event_lwp): Only give preference to the stepping LWP in
2767         all-stop mode.  Adjust comments.
2768         (ignore_event): New function.
2769         (linux_wait_1): Delete 'retry' label.  Use ignore_event.  Remove
2770         references to cancel_breakpoints.  Adjust to renames.  Also give
2771         equal priority to all LWPs that have had events in non-stop mode.
2772         If reporting a software breakpoint event, unadjust the LWP's PC.
2773         (linux_wait): If linux_wait_1 returned an ignored event, retry.
2774         (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2775         Adjust.
2776         (linux_resume_one_lwp): Store the LWP's PC.  Adjust.
2777         (resume_status_pending_p): Use thread_still_has_status_pending_p.
2778         (linux_stopped_by_watchpoint): Adjust.
2779         (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2780         * linux-low.h (enum lwp_stop_reason): New.
2781         (struct lwp_info) <stop_pc>: Adjust comment.
2782         <stopped_by_watchpoint>: Delete field.
2783         <stop_reason>: New field.
2784         * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2785         * mem-break.c (software_breakpoint_inserted_here)
2786         (hardware_breakpoint_inserted_here): New function.
2787         * mem-break.h (software_breakpoint_inserted_here)
2788         (hardware_breakpoint_inserted_here): Declare.
2789         * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2790         (cancel_breakpoints): Delete.
2791         * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2792         (upload_fast_traceframes): Remove references to
2793         cancel_breakpoints.
2794
2795 2015-01-09  Pedro Alves  <palves@redhat.com>
2796
2797         * thread-db.c (find_new_threads_callback): Ignore thread if the
2798         kernel thread ID is -1.
2799
2800 2015-01-09  Pedro Alves  <palves@redhat.com>
2801
2802         * linux-low.c (linux_attach_fail_reason_string): Move to
2803         nat/linux-ptrace.c, and rename.
2804         (linux_attach_lwp): Update comment.
2805         (attach_proc_task_lwp_callback): New function.
2806         (linux_attach): Adjust to rename and use
2807         linux_proc_attach_tgid_threads.
2808         (linux_attach_fail_reason_string): Delete declaration.
2809
2810 2015-01-01  Joel Brobecker  <brobecker@adacore.com>
2811
2812         * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2813         * server.c (gdbserver_version): Likewise.
2814
2815 2014-12-29  Sergio Durigan Junior  <sergiodj@redhat.com>
2816
2817         * remote-utils.c: Include ctype.h.
2818         (input_interrupt): Explicitly handle the case when the char
2819         received is the NUL byte.  Improve the printing of non-ASCII
2820         characters.
2821
2822 2014-12-16  Joel Brobecker  <brobecker@adacore.com>
2823
2824         * linux-low.c (linux_low_filter_event): Update call to
2825         linux_enable_event_reporting following the addition of
2826         a new parameter to that function.
2827
2828 2014-12-16  Catalin Udma  <catalin.udma@freescale.com>
2829
2830         PR server/17457
2831         * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2832         (AARCH64_FPCR_REGNO): Likewise.
2833         (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2834         (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2835         (aarch64_store_fpregset): Likewise.
2836
2837 2014-12-15  Joel Brobecker  <brobecker@adacore.com>
2838
2839         * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2840         Remove FIXME comment about assumption about N.
2841
2842 2014-12-13  Joel Brobecker  <brobecker@adacore.com>
2843
2844         * configure.ac: If large-file support is disabled in GDBserver,
2845         pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2846         * configure: Regenerate.
2847
2848 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2849
2850         * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2851         warning upon ENODATA from ptrace.
2852         * linux-s390-low.c (s390_store_tdb): New.
2853         (s390_regsets): Add regset for NT_S390_TDB.
2854
2855 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2856
2857         * linux-low.c (regsets_store_inferior_registers): Skip regsets
2858         without a fill_function.
2859         * linux-s390-low.c (s390_fill_last_break): Remove.
2860         (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2861         (s390_arch_setup): Use regset's size instead of fill_function for
2862         loop end condition.
2863
2864 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2865
2866         * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2867         the regset's store function when ptrace returned an error.
2868         * regcache.c (get_thread_regcache): Invalidate register cache
2869         before fetching inferior's registers.
2870
2871 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2872
2873         * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2874         while-loop as for-loop.
2875         (regsets_store_inferior_registers): Likewise.
2876
2877 2014-11-28  Yao Qi  <yao@codesourcery.com>
2878
2879         * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2880         * config.in, configure: Re-generate.
2881         * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2882         is defined.
2883
2884 2014-11-21  Yao Qi  <yao@codesourcery.com>
2885
2886         * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2887         (AC_CHECK_HEADERS): Remove malloc.h.
2888         * configure: Re-generated.
2889         * config.in: Re-generated.
2890         * server.h: Don't include alloca.h and malloc.h.
2891         * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2892         Don't include malloc.h.
2893
2894 2014-11-17  Joel Brobecker  <brobecker@adacore.com>
2895
2896         * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2897         corresponding ERRNO check in same block.
2898
2899 2014-11-12  Pedro Alves  <palves@redhat.com>
2900
2901         * server.c (cont_thread): Update comment.
2902         (start_inferior, attach_inferior): No longer clear cont_thread.
2903         (handle_v_cont): No longer set cont_thread.
2904         (captured_main): Clear cont_thread each time a GDB connects.
2905
2906 2014-11-12  Pedro Alves  <palves@redhat.com>
2907
2908         * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2909         thread, and don't resume all threads if the Hc thread has exited.
2910
2911 2014-11-12  Pedro Alves  <palves@redhat.com>
2912
2913         * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2914         the process group instead of to a specific LWP.
2915
2916 2014-10-15  Pedro Alves  <palves@redhat.com>
2917
2918         PR server/17487
2919         * win32-arm-low.c (arm_set_thread_context): Remove current_event
2920         parameter.
2921         (arm_set_thread_context): Delete.
2922         (the_low_target): Adjust.
2923         * win32-i386-low.c (debug_registers_changed)
2924         (debug_registers_used): Delete.
2925         (update_debug_registers_callback): New function.
2926         (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2927         needing to update their debug registers.
2928         (win32_get_current_dr): New function.
2929         (x86_dr_low_get_addr, x86_dr_low_get_control)
2930         (x86_dr_low_get_status): Fetch the debug register from the thread
2931         record's context.
2932         (i386_initial_stuff): Adjust.
2933         (i386_get_thread_context): Remove current_event parameter.  Don't
2934         clear debug_registers_changed nor copy DR values to
2935         debug_reg_state.
2936         (i386_set_thread_context): Delete.
2937         (i386_prepare_to_resume): New function.
2938         (i386_thread_added): Mark the thread as needing to update irs
2939         debug registers.
2940         (the_low_target): Remove i386_set_thread_context and install
2941         i386_prepare_to_resume.
2942         * win32-low.c (win32_get_thread_context): Adjust.
2943         (win32_set_thread_context): Use SetThreadContext
2944         directly.
2945         (win32_prepare_to_resume): New function.
2946         (win32_require_context): New function, factored out from ...
2947         (thread_rec): ... this.
2948         (continue_one_thread): Call win32_prepare_to_resume on each thread
2949         we're about to continue.
2950         (win32_resume): Call win32_prepare_to_resume on the event thread.
2951         * win32-low.h (struct win32_thread_info)
2952         <debug_registers_changed>: New field.
2953         (struct win32_target_ops): Change prototype of set_thread_context,
2954         delete set_thread_context and add prepare_to_resume.
2955         (win32_require_context): New declaration.
2956
2957 2014-10-08  Gary Benson  <gbenson@redhat.com>
2958
2959         * server.h: Do not include common-exceptions.h.
2960
2961 2014-10-08  Gary Benson  <gbenson@redhat.com>
2962
2963         * server.h: Do not include cleanups.h.
2964
2965 2014-09-30  James Hogan  <james.hogan@imgtec.com>
2966
2967         * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2968         mips64-dsp-linux.c.
2969
2970 2014-09-23  Yao Qi  <yao@codesourcery.com>
2971
2972         * linux-low.c (lp_status_maybe_breakpoint): New function.
2973         (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2974         (count_events_callback): Likewise.
2975         (select_event_lwp_callback): Likewise.
2976         (cancel_breakpoints_callback): Likewise.
2977
2978 2014-09-19  Don Breazeal  <donb@codesourcery.com>
2979
2980         * linux-low.c (handle_extended_wait): Call
2981         linux_ptrace_get_extended_event.
2982         (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2983         linux_is_extended_waitstatus.
2984
2985 2014-09-16  Joel Brobecker  <brobecker@adacore.com>
2986
2987         * Makefile.in (CPPFLAGS): Define.
2988         (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2989         (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2990
2991 2014-09-16  Gary Benson  <gbenson@redhat.com>
2992
2993         * inferiors.h (current_inferior): Renamed as...
2994         (current_thread): New variable.  All uses updated.
2995         * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2996         (maybe_move_out_of_jump_pad): Likewise.
2997         (cancel_breakpoint): Likewise.
2998         (linux_low_filter_event): Likewise.
2999         (wait_for_sigstop): Likewise.
3000         (linux_resume_one_lwp): Likewise.
3001         (need_step_over_p): Likewise.
3002         (start_step_over): Likewise.
3003         (linux_stabilize_threads): Renamed save_inferior as saved_thread.
3004         * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
3005         * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
3006         and save_inferior as saved_thread.
3007         * regcache.c (get_thread_regcache): Renamed saved_inferior as
3008         saved_thread.
3009         (regcache_invalidate_thread): Likewise.
3010         * remote-utils.c (prepare_resume_reply): Likewise.
3011         * thread-db.c (thread_db_get_tls_address): Likewise.
3012         (disable_thread_event_reporting): Likewise.
3013         (remove_thread_event_breakpoints): Likewise.
3014         * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
3015         as saved_thread.
3016         * target.h (set_desired_inferior): Renamed as...
3017         (set_desired_thread): New declaration.  All uses updated.
3018         * server.c (myresume): Updated comment to reference thread instead
3019         of inferior.
3020         (handle_serial_event): Likewise.
3021         (handle_target_event): Likewise.
3022
3023 2014-09-12  Tom Tromey  <tromey@redhat.com>
3024             Gary Benson  <gbenson@redhat.com>
3025
3026         * regcache.h: Include common-regcache.h.
3027         (regcache_read_pc): Don't declare.
3028         * regcache.c (get_thread_regcache_for_ptid): New function.
3029
3030 2014-09-11  Tom Tromey  <tromey@redhat.com>
3031             Gary Benson  <gbenson@redhat.com>
3032
3033         * symbol.c: New file.
3034         * Makefile.in (SFILES): Add symbol.c.
3035         (OBS): Add symbol.o.
3036
3037 2014-09-11  Gary Benson  <gbenson@redhat.com>
3038
3039         * target.c (target_stop_ptid, target_continue_ptid): New
3040         functions.
3041
3042 2014-09-11  Tom Tromey  <tromey@redhat.com>
3043             Gary Benson  <gbenson@redhat.com>
3044
3045         * target.h: Include target/target.h.
3046         * target.c (target_read_memory, target_read_uint32)
3047         (target_write_memory): New functions.
3048
3049 2014-09-11  Gary Benson  <gbenson@redhat.com>
3050
3051         * server.h (debug_hw_points): Don't declare.
3052         * server.c (debug_hw_points): Don't define.  Replace all uses
3053         with show_debug_regs.
3054         * linux-aarch64-low.c (debug_hw_points): Don't define.  Replace
3055         all uses with show_debug_regs.
3056
3057 2014-09-08  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
3058
3059         * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
3060         endianness into account.
3061         (ppc_supply_ptrace_register): Likewise.
3062
3063 2014-09-03  James Hogan  <james.hogan@imgtec.com>
3064
3065         * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
3066         to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
3067
3068 2014-09-03  Gary Benson  <gbenson@redhat.com>
3069
3070         * linux-x86-low.c (x86_linux_prepare_to_resume): Use
3071         ALL_DEBUG_ADDRESS_REGISTERS.
3072
3073 2014-09-02  Gary Benson  <gbenson@redhat.com>
3074
3075         * i386-low.h: Renamed as...
3076         * x86-low.h: New file.  All type, function and variable name
3077         prefixes changed from "i386_" to "x86_".  All references updated.
3078         * i386-low.c: Renamed as...
3079         * x86-low.c: New file.  All type, function and variable name
3080         prefixes changed from "i386_" to "x86_".  All references updated.
3081
3082 2014-09-02  Gary Benson  <gbenson@redhat.com>
3083
3084         * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
3085         (x86_linux_new_thread): Likewise.
3086
3087 2014-08-29  Gary Benson  <gbenson@redhat.com>
3088
3089         * server.h (setjmp.h): Do not include.
3090         (toplevel): Do not declare.
3091         (common-exceptions.h): Include.
3092         (cleanups.h): Likewise.
3093         * server.c (toplevel): Do not define.
3094         (exit_code): New static global.
3095         (detach_or_kill_for_exit_cleanup): New function.
3096         (main): New function.  Original main renamed to...
3097         (captured_main): New function.
3098         * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
3099
3100 2014-08-29  Gary Benson  <gbenson@redhat.com>
3101
3102         * Makefile.in (SFILES): Add common/common-exceptions.c.
3103         (OBS): Add common-exceptions.o.
3104         (common-exceptions.o): New rule.
3105         * utils.c (prepare_to_throw_exception): New function.
3106
3107 2014-08-29  Gary Benson  <gbenson@redhat.com>
3108
3109         * config.in: Regenerate.
3110         * configure: Likewise.
3111
3112 2014-08-29  Gary Benson  <gbenson@redhat.com>
3113
3114         * Makefile.in (SFILES): Add common/cleanups.c.
3115         (OBS): cleanups.o.
3116         (cleanups.o): New rule.
3117
3118 2014-08-29  Gary Benson  <gbenson@redhat.com>
3119
3120         * utils.c (internal_vwarning): New function.
3121
3122 2014-08-28  Gary Benson  <gbenson@redhat.com>
3123
3124         * utils.h (fatal): Remove declaration.
3125         * utils.c (fatal): Remove function.
3126
3127 2014-08-28  Gary Benson  <gbenson@redhat.com>
3128
3129         * tracepoint.c (gdb_agent_init): Replace fatal with
3130         perror_with_name.
3131         (initialize_tracepoint): Likewise.
3132
3133 2014-08-28  Gary Benson  <gbenson@redhat.com>
3134
3135         * remote-utils.c (remote_prepare): Replace fatal with error.
3136
3137 2014-08-28  Gary Benson  <gbenson@redhat.com>
3138
3139         * linux-low.c (linux_async): Replace fatal with warning.
3140         Tidy up and return.
3141         (linux_start_non_stop): Return -1 if linux_async failed.
3142
3143 2014-08-28  Gary Benson  <gbenson@redhat.com>
3144
3145         * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
3146         gdb_assert.
3147         (i386_dr_low_get_addr): Remove vague comment.
3148         * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
3149         gdb_assert.
3150
3151 2014-08-28  Gary Benson  <gbenson@redhat.com>
3152
3153         * inferiors.c (get_thread_process): Replace check with gdb_assert.
3154         * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
3155         internal_error.
3156         (linux_resume_one_lwp): Likewise.
3157         * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
3158         gdb_assert.
3159         * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
3160         with internal_error.
3161         * regcache.c (get_thread_regcache): Replace check with gdb_assert.
3162         (init_register_cache): Replace fatal with gdb_assert_not_reached.
3163         (find_register_by_name): Replace fatal with internal_error.
3164         (find_regno): Likewise.
3165         * tdesc.c (init_target_desc): Replace check with gdb_assert.
3166         * thread-db.c (thread_db_create_event): Likewise.
3167         (thread_db_load_search): Likewise.
3168         (try_thread_db_load_1): Likewise.
3169         * tracepoint.c (get_jump_space_head): Replace fatal with
3170         internal_error.
3171         (claim_trampoline_space): Likewise.
3172         (have_fast_tracepoint_trampoline_buffer): Likewise.
3173         (cmd_qtstart): Likewise.
3174         (stop_tracing): Likewise.
3175         (fast_tracepoint_collecting): Likewise.
3176         (target_malloc): Likewise.
3177         (download_tracepoint): Likewise.
3178         (download_trace_state_variables): Replace check with gdb_assert.
3179         (upload_fast_traceframes): Replace fatal with internal_error.
3180
3181 2014-08-19  Tom Tromey  <tromey@redhat.com>
3182             Gary Benson  <gbenson@redhat.com>
3183
3184         * Makefile.in (SFILES): Add common/common-debug.c.
3185         (OBS): Add common-debug.o.
3186         (common-debug.o): New rule.
3187         * debug.h (debug_printf): Don't declare.
3188         * debug.c (debug_printf): Renamed and rewritten as...
3189         (debug_vprintf): New function.
3190
3191 2014-08-19  Gary Benson  <gbenson@redhat.com>
3192
3193         * utils.h: Do not include print-utils.h.
3194
3195 2014-08-19  Tom Tromey  <tromey@redhat.com>
3196             Gary Benson  <gbenson@redhat.com>
3197
3198         * server.h: Add static assertion.
3199         (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
3200
3201 2014-08-19  Tom Tromey  <tromey@redhat.com>
3202             Gary Benson  <gbenson@redhat.com>
3203
3204         * Makefile.in (SFILES): Add common/errors.c.
3205         (OBS): Add errors.o.
3206         (IPA_OBS): Add errors-ipa.o.
3207         (errors.o): New rule.
3208         (errors-ipa.o): Likewise.
3209         * utils.h (perror_with_name, error, warning): Don't declare.
3210         * utils.c (warning): Renamed and rewritten as...
3211         (vwarning): New function.
3212         (error): Renamed and rewritten as...
3213         (verror): New function.
3214         (internal_error): Renamed and rewritten as...
3215         (internal_verror): New function.
3216
3217 2014-08-07  Gary Benson  <gbenson@redhat.com>
3218
3219         * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
3220         * configure: Regenerate.
3221         * config.in: Likewise.
3222         * server.h: Do not include errno.h.
3223         * event-loop.c: Likewise.
3224         * hostio-errno.c: Likewise.
3225         * linux-low.c: Likewise.
3226         * remote-utils.c: Likewise.
3227         * spu-low.c: Likewise.
3228         * utils.c: Likewise.
3229         * gdbreplay.c: Unconditionally include errno.h.
3230
3231 2014-08-07  Gary Benson  <gbenson@redhat.com>
3232
3233         * server.h: Do not include string.h.
3234         * event-loop.c: Likewise.
3235         * linux-low.c: Likewise.
3236         * regcache.c: Likewise.
3237         * remote-utils.c: Likewise.
3238         * spu-low.c: Likewise.
3239         * utils.c: Likewise.
3240
3241 2014-08-07  Gary Benson  <gbenson@redhat.com>
3242
3243         * server.h: Do not include gdb_assert.h.
3244
3245 2014-08-07  Gary Benson  <gbenson@redhat.com>
3246
3247         * server.h: Do not include common-utils.h.
3248
3249 2014-08-07  Gary Benson  <gbenson@redhat.com>
3250
3251         * server.h: Do not include ptid.h.
3252         * notif.h: Likewise.
3253
3254 2014-08-07  Gary Benson  <gbenson@redhat.com>
3255
3256         * server.h: Do not include gdb_locale.h.
3257
3258 2014-08-07  Gary Benson  <gbenson@redhat.com>
3259
3260         * server.h: Do not include gdb/signals.h.
3261         * win32-low.c: Likewise.
3262
3263 2014-08-07  Gary Benson  <gbenson@redhat.com>
3264
3265         * server.h: Do not include pathmax.h.
3266
3267 2014-08-07  Gary Benson  <gbenson@redhat.com>
3268
3269         * server.h: Do not include libiberty.h.
3270         * linux-bfin-low.c: Likewise.
3271
3272 2014-08-07  Gary Benson  <gbenson@redhat.com>
3273
3274         * server.h: Do not include ansidecl.h.
3275
3276 2014-08-07  Gary Benson  <gbenson@redhat.com>
3277
3278         * linux-x86-low.c: Do not include stddef.h.
3279         * lynx-ppc-low.c: Likewise.
3280         * tracepoint.c: Likewise.
3281
3282 2014-08-07  Gary Benson  <gbenson@redhat.com>
3283
3284         * server.h: Do not include stdarg.h.
3285         * nto-low.c: Likewise.
3286
3287 2014-08-07  Gary Benson  <gbenson@redhat.com>
3288
3289         * server.h: Do not include stdlib.h.
3290         * inferiors.c: Likewise.
3291         * linux-low.c: Likewise.
3292         * regcache.c: Likewise.
3293         * spu-low.c: Likewise.
3294         * tracepoint.c: Likewise.
3295         * utils.c: Likewise.
3296
3297 2014-08-07  Gary Benson  <gbenson@redhat.com>
3298
3299         * server.h: Do not include stdio.h.
3300         * linux-low.c: Likewise.
3301         * remote-utils.c: Likewise.
3302         * spu-low.c: Likewise.
3303         * utils.c: Likewise.
3304         * wincecompat.c: Likewise.
3305
3306 2014-08-06  Gary Benson  <gbenson@redhat.com>
3307
3308         * regcache.c (init_register_cache): Move conditionals inside if.
3309
3310 2014-08-06  Gary Benson  <gbenson@redhat.com>
3311
3312         * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
3313
3314 2014-07-31  Gary Benson  <gbenson@redhat.com>
3315
3316         * ax.h: Do not include server.h.
3317         * gdbthread.h: Likewise.
3318         * lynx-low.h: Likewise.
3319         * notif.h: Likewise.
3320
3321 2014-07-30  Gary Benson  <gbenson@redhat.com>
3322
3323         * server.h: Include common-defs.h.
3324         Do not include config.h or build-gnulib-gdbserver/config.h.
3325
3326 2014-07-30  Gary Benson  <gbenson@redhat.com>
3327
3328         * hostio-errno.c: Move server.h to top of includes list.
3329         * inferiors.c: Likewise.
3330         * linux-x86-low.c: Likewise.
3331         * notif.c: Include server.h.
3332
3333 2014-07-24  Tom Tromey  <tromey@redhat.com>
3334             Gary Benson  <gbenson@redhat.com>
3335
3336         * server.h (CORE_ADDR): Now unsigned.
3337
3338 2014-07-16  Pedro Alves  <palves@redhat.com>
3339
3340         * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
3341
3342 2014-07-15  Pedro Alves  <palves@redhat.com>
3343
3344         * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
3345         copy.
3346
3347 2014-07-11  Pedro Alves  <palves@redhat.com>
3348
3349         * linux-low.c (kill_wait_lwp): New function, based on
3350         kill_one_lwp_callback, but use my_waitpid directly.
3351         (kill_one_lwp_callback, linux_kill): Use it.
3352
3353 2014-06-23  Pedro Alves  <palves@redhat.com>
3354
3355         * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
3356         before setting DR0..DR3.
3357
3358 2014-06-20  Gary Benson  <gbenson@redhat.com>
3359
3360         * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
3361         * configure: Regenerated.
3362         * config.in: Likewise.
3363
3364 2014-06-20  Gary Benson  <gbenson@redhat.com>
3365
3366         * Makefile.in (SFILES): Update locations for files moved
3367         from common to nat.
3368         (object file files): Reordered.
3369
3370 2014-06-20  Gary Benson  <gbenson@redhat.com>
3371
3372         * i386-low.h (i386_dr_low_can_set_addr): Removed.
3373         (i386_dr_low_set_addr): Likewise.
3374         (i386_dr_low_get_addr): Likewise.
3375         (i386_dr_low_can_set_control): Likewise.
3376         (i386_dr_low_set_control): Likewise.
3377         (i386_dr_low_get_control): Likewise.
3378         (i386_dr_low_get_status): Likewise.
3379         (i386_get_debug_register_length): Likewise.
3380         * linux-x86-low.c (i386_dr_low_set_addr):
3381         Changed signature.  Made static.
3382         (i386_dr_low_get_addr): Likewise.
3383         (i386_dr_low_set_control): Likewise.
3384         (i386_dr_low_get_control): Likewise.
3385         (i386_dr_low_get_status): Likewise.
3386         (i386_dr_low): New global variable.
3387         * win32-i386-low.c (i386_dr_low_set_addr):
3388         Changed signature.  Made static.
3389         (i386_dr_low_get_addr): Likewise.
3390         (i386_dr_low_set_control): Likewise.
3391         (i386_dr_low_get_control): Likewise.
3392         (i386_dr_low_get_status): Likewise.
3393         (i386_dr_low): New global variable.
3394
3395 2014-06-20  Marcus Shawcroft  <marcus.shawcroft@arm.com>
3396
3397         * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
3398         * Makefile.in (AR, AR_FLAGS): Define.
3399         * configure: Regenerate.
3400
3401 2014-06-19  Gary Benson  <gbenson@redhat.com>
3402
3403         * Makefile.in (i386-dregs.o): New rule.
3404         * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
3405         * i386-low.c (target.h): Remove include.
3406         (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
3407         (DR_CONTROL_SHIFT): Likewise.
3408         (DR_CONTROL_SIZE): Likewise.
3409         (DR_RW_EXECUTE): Likewise.
3410         (DR_RW_WRITE): Likewise.
3411         (DR_RW_READ): Likewise.
3412         (DR_RW_IORW): Likewise.
3413         (DR_LEN_1): Likewise.
3414         (DR_LEN_2): Likewise.
3415         (DR_LEN_4): Likewise.
3416         (DR_LEN_8): Likewise.
3417         (DR_LOCAL_ENABLE_SHIFT): Likewise.
3418         (DR_GLOBAL_ENABLE_SHIFT): Likewise.
3419         (DR_ENABLE_SIZE): Likewise.
3420         (DR_LOCAL_SLOWDOWN): Likewise.
3421         (DR_GLOBAL_SLOWDOWN): Likewise.
3422         (DR_CONTROL_RESERVED): Likewise.
3423         (I386_DR_CONTROL_MASK): Likewise.
3424         (I386_DR_VACANT): Likewise.
3425         (I386_DR_LOCAL_ENABLE): Likewise.
3426         (I386_DR_GLOBAL_ENABLE): Likewise.
3427         (I386_DR_DISABLE): Likewise.
3428         (I386_DR_SET_RW_LEN): Likewise.
3429         (I386_DR_GET_RW_LEN): Likewise.
3430         (I386_DR_WATCH_HIT): Likewise.
3431         (i386_wp_op_t): Likewise.
3432         (i386_show_dr): Likewise.
3433         (i386_length_and_rw_bits): Likewise.
3434         (i386_insert_aligned_watchpoint): Likewise.
3435         (i386_remove_aligned_watchpoint): Likewise.
3436         (i386_handle_nonaligned_watchpoint): Likewise.
3437         i386_update_inferior_debug_regs(): Likewise.
3438         (i386_dr_insert_watchpoint): Likewise.
3439         (i386_dr_remove_watchpoint): Likewise.
3440         (i386_dr_region_ok_for_watchpoint): Likewise.
3441         (i386_dr_stopped_data_address): Likewise.
3442         (i386_dr_stopped_by_watchpoint): Likewise.
3443
3444 2014-06-19  Gary Benson  <gbenson@redhat.com>
3445
3446         * i386-low.c (i386_dr_show): Renamed to
3447         i386_show_dr and made static.  All uses updated.
3448         (i386_dr_length_and_rw_bits): Renamed to
3449         i386_length_and_rw_bits and made static.
3450         All uses updated.
3451         (i386_dr_insert_aligned_watchpoint): Renamed to
3452         i386_insert_aligned_watchpoint and made static.
3453         All uses updated.
3454         (i386_dr_remove_aligned_watchpoint): Renamed to
3455         i386_remove_aligned_watchpoint and made static.
3456         All uses updated.
3457         (i386_dr_update_inferior_debug_regs): Renamed to
3458         i386_update_inferior_debug_regs and made static.
3459         All uses updated.
3460
3461 2014-06-18  Gary Benson  <gbenson@redhat.com>
3462
3463         * i386-low.h (i386_dr_low_can_set_addr): New macro.
3464         (i386_dr_low_can_set_control): Likewise.
3465         (i386_get_debug_register_length): Likewise.
3466         * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
3467         (i386_dr_low_can_set_control): Likewise.
3468         (i386_get_debug_register_length): Likewise.
3469
3470 2014-06-17  Gary Benson  <gbenson@redhat.com>
3471
3472         * i386-low.h (i386-dregs.h): New include.
3473         (DR_FIRSTADDR): Now in i386-dregs.h.
3474         (DR_LASTADDR): Likewise.
3475         (DR_NADDR): Likewise.
3476         (DR_STATUS): Likewise.
3477         (DR_CONTROL): Likewise.
3478         (i386_debug_reg_state): Likewise.
3479         (i386_dr_insert_watchpoint): Likewise.
3480         (i386_dr_remove_watchpoint): Likewise.
3481         (i386_dr_region_ok_for_watchpoint): Likewise.
3482         (i386_dr_stopped_data_address): Likewise.
3483         (i386_dr_stopped_by_watchpoint): Likewise.
3484         * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
3485
3486 2014-06-18  Gary Benson  <gbenson@redhat.com>
3487
3488         * i386-low.h (i386_low_insert_watchpoint): Renamed to
3489         i386_dr_insert_watchpoint.
3490         (i386_low_remove_watchpoint): Renamed to
3491         i386_dr_remove_watchpoint.
3492         (i386_low_region_ok_for_watchpoint): Renamed to
3493         i386_dr_region_ok_for_watchpoint.
3494         (i386_low_stopped_data_address): Renamed to
3495         i386_dr_stopped_data_address.
3496         (i386_low_stopped_by_watchpoint): Renamed to
3497         i386_dr_stopped_by_watchpoint.
3498         * i386-low.c (i386_show_dr): Renamed to
3499         i386_dr_show and made nonstatic.  All uses updated.
3500         (i386_length_and_rw_bits): Renamed to
3501         i386_dr_length_and_rw_bits and made nonstatic.
3502         All uses updated.
3503         (i386_insert_aligned_watchpoint): Renamed to
3504         i386_dr_insert_aligned_watchpoint and made nonstatic.
3505         All uses updated.
3506         (i386_remove_aligned_watchpoint): Renamed to
3507         i386_dr_remove_aligned_watchpoint and made nonstatic.
3508         All uses updated.
3509         (i386_update_inferior_debug_regs): Renamed to
3510         i386_dr_update_inferior_debug_regs and made nonstatic.
3511         All uses updated.
3512         (i386_low_insert_watchpoint): Renamed to
3513         i386_dr_insert_watchpoint.  All uses updated.
3514         (i386_low_remove_watchpoint): Renamed to
3515         i386_dr_remove_watchpoint.  All uses updated.
3516         (i386_low_region_ok_for_watchpoint): Renamed to
3517         i386_dr_region_ok_for_watchpoint.  All uses updated.
3518         (i386_low_stopped_data_address): Renamed to
3519         i386_dr_stopped_data_address.  All uses updated.
3520         (i386_low_stopped_by_watchpoint): Renamed to
3521         i386_dr_stopped_by_watchpoint.  All uses updated.
3522
3523 2014-06-18  Gary Benson  <gbenson@redhat.com>
3524
3525         * i386-low.c (i386_dr_low_can_set_addr): New macro.
3526         (i386_dr_low_can_set_control): Likewise.
3527         (i386_insert_aligned_watchpoint): New check.
3528
3529 2014-06-18  Gary Benson  <gbenson@redhat.com>
3530
3531         * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
3532         Renamed to state.
3533
3534 2014-06-18  Gary Benson  <gbenson@redhat.com>
3535
3536         * i386-low.c (i386_length_and_rw_bits): Use internal_error
3537         instead of fatal and error.
3538         (i386_handle_nonaligned_watchpoint): Likewise.
3539
3540 2014-06-18  Gary Benson  <gbenson@redhat.com>
3541
3542         * i386-low.c (i386_get_debug_register_length): New macro.
3543         (TARGET_HAS_DR_LEN_8): Remove conditional.  Use above macro.
3544         (i386_show_dr): Use debug_printf instead of fprintf.  Use
3545         phex to format values.
3546
3547 2014-06-18  Gary Benson  <gbenson@redhat.com>
3548
3549         * i386-low.h: Comment changes.
3550         * i386-low.c: Likewise.
3551
3552 2014-06-18  Gary Benson  <gbenson@redhat.com>
3553
3554         * i386-low.c: Whitespace changes.
3555
3556 2014-06-12  Tom Tromey  <tromey@redhat.com>
3557
3558         * utils.c (freeargv): Remove.
3559
3560 2014-06-12  Tom Tromey  <tromey@redhat.com>
3561
3562         * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3563         * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3564         (parse_debug_format_options): Likewise.
3565         (gdbserver_usage): Likewise.
3566         * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3567         (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3568         (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3569         against libiberty.
3570         ($(LIBGNU)): Depend on libiberty.
3571         (all-lib): Recurse into all subdirs.
3572         (install-only): Invoke "install" target in subdirs.
3573         (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3574         targets.
3575         * configure: Rebuild.
3576         * configure.ac: Add ACX_CONFIGURE_DIR for libiberty.  Don't check
3577         for vasprintf, vsnprintf, or gettimeofday.
3578         * configure.srv: Don't add safe-ctype.o or lbasename.o to
3579         srv_tgtobj.
3580
3581 2014-06-05  Joel Brobecker  <brobecker@adacore.com>
3582
3583         * development.sh: Delete.
3584         * Makefile.in (config.status): Adjust dependency on development.sh.
3585         * configure.ac: Adjust development.sh source call.
3586         * configure: Regenerate.
3587
3588 2014-06-02  Pedro Alves  <palves@redhat.com>
3589
3590         * ax.c (gdb_free_agent_expr): New function.
3591         * ax.h (gdb_free_agent_expr): New declaration.
3592         * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3593         list.
3594         (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3595         static.
3596         (clear_breakpoint_conditions_and_commands): New function.
3597         * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3598         (clear_breakpoint_conditions_and_commands): New declaration.
3599
3600 2014-05-23  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
3601
3602         * linux-aarch64-low.c (asm/ptrace.h): Include.
3603
3604 2014-05-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
3605
3606         Fix TLS access for -static -pthread.
3607         * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3608         (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3609         (thread_db_load_search, try_thread_db_load_1): Initialize it.
3610
3611 2014-05-20  Pedro Alves  <palves@redhat.com>
3612
3613         * linux-aarch64-low.c (aarch64_insert_point)
3614         (aarch64_remove_point): No longer check whether the type is
3615         supported here.  Adjust to new interface.
3616         (the_low_target): Install aarch64_supports_z_point_type as
3617         supports_z_point_type method.
3618         * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3619         (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3620         instead of a Z packet char.  Adjust.
3621         (arm_supports_z_point_type): New function.
3622         (arm_insert_point, arm_remove_point): Adjust to new interface.
3623         (the_low_target): Install arm_supports_z_point_type.
3624         * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3625         (cris_insert_point, cris_remove_point): Adjust to new interface.
3626         Don't check whether the type is supported here.
3627         (the_low_target): Install cris_supports_z_point_type.
3628         * linux-low.c (linux_supports_z_point_type): New function.
3629         (linux_insert_point, linux_remove_point): Adjust to new interface.
3630         * linux-low.h (struct linux_target_ops) <insert_point,
3631         remove_point>: Take an enum raw_bkpt_type instead of a char.  Add
3632         raw_breakpoint pointer parameter.
3633         <supports_z_point_type>: New method.
3634         * linux-mips-low.c (mips_supports_z_point_type): New function.
3635         (mips_insert_point, mips_remove_point): Adjust to new interface.
3636         Use mips_supports_z_point_type.
3637         (the_low_target): Install mips_supports_z_point_type.
3638         * linux-ppc-low.c (the_low_target): Install NULL as
3639         supports_z_point_type method.
3640         * linux-s390-low.c (the_low_target): Install NULL as
3641         supports_z_point_type method.
3642         * linux-sparc-low.c (the_low_target): Install NULL as
3643         supports_z_point_type method.
3644         * linux-x86-low.c (x86_supports_z_point_type): New function.
3645         (x86_insert_point): Adjust to new insert_point interface.  Use
3646         insert_memory_breakpoint.  Adjust to new
3647         i386_low_insert_watchpoint interface.
3648         (x86_remove_point): Adjust to remove_point interface.  Use
3649         remove_memory_breakpoint.  Adjust to new
3650         i386_low_remove_watchpoint interface.
3651         (the_low_target): Install x86_supports_z_point_type.
3652         * lynx-low.c (lynx_target_ops): Install NULL as
3653         supports_z_point_type callback.
3654         * nto-low.c (nto_supports_z_point_type): New.
3655         (nto_insert_point, nto_remove_point): Adjust to new interface.
3656         (nto_target_ops): Install nto_supports_z_point_type.
3657         * mem-break.c: Adjust intro comment.
3658         (struct raw_breakpoint) <raw_type, size>: New fields.
3659         <inserted>: Update comment.
3660         <shlib_disabled>: Delete field.
3661         (enum bkpt_type) <gdb_breakpoint>: Delete value.
3662         <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3663         gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3664         (raw_bkpt_type_to_target_hw_bp_type): New function.
3665         (find_enabled_raw_code_breakpoint_at): New function.
3666         (find_raw_breakpoint_at): New type and size parameters.  Use them.
3667         (insert_memory_breakpoint): New function, based off
3668         set_raw_breakpoint_at.
3669         (remove_memory_breakpoint): New function.
3670         (set_raw_breakpoint_at): Reimplement.
3671         (set_breakpoint): New, based on set_breakpoint_at.
3672         (set_breakpoint_at): Reimplement.
3673         (delete_raw_breakpoint): Go through the_target->remove_point
3674         instead of assuming memory breakpoints.
3675         (find_gdb_breakpoint_at): Delete.
3676         (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3677         (find_gdb_breakpoint): New function.
3678         (set_gdb_breakpoint_at): Delete.
3679         (z_type_supported): New function.
3680         (set_gdb_breakpoint_1): New function, loosely based off
3681         set_gdb_breakpoint_at.
3682         (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3683         (delete_gdb_breakpoint_at): Delete.
3684         (delete_gdb_breakpoint_1): New function, loosely based off
3685         delete_gdb_breakpoint_at.
3686         (delete_gdb_breakpoint): New function.
3687         (clear_gdb_breakpoint_conditions): Rename to ...
3688         (clear_breakpoint_conditions): ... this.  Don't handle a NULL
3689         breakpoint.
3690         (add_condition_to_breakpoint): Make static.
3691         (add_breakpoint_condition): Take a struct breakpoint pointer
3692         instead of an address.  Adjust.
3693         (gdb_condition_true_at_breakpoint): Rename to ...
3694         (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3695         z_type parameter.
3696         (gdb_condition_true_at_breakpoint): Reimplement.
3697         (add_breakpoint_commands): Take a struct breakpoint pointer
3698         instead of an address.  Adjust.
3699         (gdb_no_commands_at_breakpoint): Rename to ...
3700         (gdb_no_commands_at_breakpoint_z_type): ... this.  Add z_type
3701         parameter.  Return true if no breakpoint was found.  Change debug
3702         output.
3703         (gdb_no_commands_at_breakpoint): Reimplement.
3704         (run_breakpoint_commands): Rename to ...
3705         (run_breakpoint_commands_z_type): ... this.  Add z_type parameter,
3706         and change return type to boolean.
3707         (run_breakpoint_commands): New function.
3708         (gdb_breakpoint_here): Also check for Z1 breakpoints.
3709         (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3710         breakpoint.  Go through the_target->remove_point instead of
3711         assuming memory breakpoint.
3712         (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3713         software and hardware breakpoints.
3714         (reinsert_raw_breakpoint): Go through the_target->insert_point
3715         instead of assuming memory breakpoint.
3716         (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3717         software and hardware breakpoints.
3718         (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3719         Check both software and hardware breakpoints.
3720         (validate_inserted_breakpoint): Assert the breakpoint is a
3721         software breakpoint.  Set the inserted flag to -1 instead of
3722         setting shlib_disabled.
3723         (delete_disabled_breakpoints): Adjust.
3724         (validate_breakpoints): Only validate software breakpoints.
3725         Adjust to inserted flag change.
3726         (check_mem_read, check_mem_write): Skip breakpoint types other
3727         than software breakpoints.  Adjust to inserted flag change.
3728         * mem-break.h (enum raw_bkpt_type): New enum.
3729         (raw_breakpoint, struct process_info): Forward declare.
3730         (Z_packet_to_target_hw_bp_type): Delete declaration.
3731         (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3732         (set_gdb_breakpoint, delete_gdb_breakpoint)
3733         (clear_breakpoint_conditions): New declarations.
3734         (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3735         (breakpoint_inserted_here): Update comment.
3736         (add_breakpoint_condition, add_breakpoint_commands): Replace
3737         address parameter with a breakpoint pointer parameter.
3738         (gdb_breakpoint_here): Update comment.
3739         (delete_gdb_breakpoint_at): Delete.
3740         (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3741         * server.c (process_point_options): Take a struct breakpoint
3742         pointer instead of an address.  Adjust.
3743         (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3744         delete_gdb_breakpoint.
3745         * spu-low.c (spu_target_ops): Install NULL as
3746         supports_z_point_type method.
3747         * target.h: Include mem-break.h.
3748         (struct target_ops) <prepare_to_access_memory>: Update comment.
3749         <supports_z_point_type>: New field.
3750         <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3751         instead of a char.  Also take a raw breakpoint pointer.
3752         * win32-arm-low.c (the_low_target): Install NULL as
3753         supports_z_point_type.
3754         * win32-i386-low.c (i386_supports_z_point_type): New function.
3755         (i386_insert_point, i386_remove_point): Adjust to new interface.
3756         (the_low_target): Install i386_supports_z_point_type.
3757         * win32-low.c (win32_supports_z_point_type): New function.
3758         (win32_insert_point, win32_remove_point): Adjust to new interface.
3759         (win32_target_ops): Install win32_supports_z_point_type.
3760         * win32-low.h (struct win32_target_ops):
3761         <supports_z_point_type>: New method.
3762         <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3763         instead of a char.  Also take a raw breakpoint pointer.
3764
3765 2014-05-20  Pedro Alves  <palves@redhat.com>
3766
3767         * mem-break.h: Include break-common.h.
3768         (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3769         (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3770         (Z_packet_to_target_hw_bp_type): New declaration.
3771         * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3772         * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3773         (Z_PACKET_ACCESS_WP): Delete macros.
3774         (Z_packet_to_hw_type): Delete function.
3775         * i386-low.h: Don't include break-common.h here.
3776         (Z_packet_to_hw_type): Delete declaration.
3777         * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3778         Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3779         * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3780         Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3781         * linux-aarch64-low.c: Don't include break-common.h here.
3782         (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3783         (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3784         (Z_packet_to_target_hw_bp_type): Delete function.
3785         * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3786         function.
3787         (mips_insert_point, mips_remove_point): Use
3788         Z_packet_to_target_hw_bp_type.
3789
3790 2014-05-20  Pedro Alves  <palves@redhat.com>
3791
3792         * linux-aarch64-low.c: Include break-common.h.
3793         (enum target_point_type): Delete.
3794         (Z_packet_to_point_type): Rename to ...
3795         (Z_packet_to_target_hw_bp_type): ... this, and return a
3796         target_hw_bp_type instead.
3797         (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3798         instead of an enum target_point_type.
3799         (aarch64_point_encode_ctrl_reg): Likewise.  Compute type mask from
3800         breakpoint type.
3801         (aarch64_dr_state_insert_one_point)
3802         (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3803         (aarch64_handle_aligned_watchpoint)
3804         (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3805         Take an enum target_hw_bp_type instead of an enum
3806         target_point_type.
3807         (aarch64_supports_z_point_type): New function.
3808         (aarch64_insert_point, aarch64_remove_point): Use it.  Adjust to
3809         use Z_packet_to_target_hw_bp_type.
3810
3811 2014-05-20  Joel Brobecker  <brobecker@adacore.com>
3812
3813         * configure.ac: Only use -Werror by default when DEVELOPMENT
3814         is true.
3815         * configure: Regenerate.
3816
3817 2014-05-19  Jan Kratochvil  <jan.kratochvil@redhat.com>
3818
3819         Fix gdbserver qGetTLSAddr for x86_64 -m32.
3820         * linux-x86-low.c (X86_64_USER_REGS): New.
3821         (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3822
3823 2014-04-28  Yao Qi  <yao@codesourcery.com>
3824
3825         * Makefile.in (i386-avx512.c): Fix the typo of generated file
3826         name.
3827
3828 2014-04-25  Pedro Alves  <palves@redhat.com>
3829
3830         PR server/16255
3831         * linux-low.c (linux_attach_fail_reason_string): New function.
3832         (linux_attach_lwp): Delete.
3833         (linux_attach_lwp_1): Rename to ...
3834         (linux_attach_lwp): ... this.  Take a ptid instead of a pid as
3835         argument.  Remove "initial" parameter.  Return int instead of
3836         void.  Don't error or warn here.
3837         (linux_attach): Adjust to call linux_attach_lwp.  Call error on
3838         failure to attach to the tgid.  Call warning when failing to
3839         attach to an lwp.
3840         * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3841         argument.  Remove "initial" parameter.  Return int instead of
3842         void.  Don't error or warn here.
3843         (linux_attach_fail_reason_string): New declaration.
3844         * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3845         interface change.  Use linux_attach_fail_reason_string.
3846
3847 2014-04-24  Michael Sturm  <michael.sturm@mintel.com>
3848             Walfred Tedeschi  <walfred.tedeschi@intel.com>
3849
3850         * Makefile.in: Added rules to handle new files
3851         i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3852         amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3853         * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3854         (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3855         (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3856         (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3857         x32-avx512-linux.o.
3858         (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3859         (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3860         (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3861         i386/x32-avx512.xml.
3862         (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3863         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3864         i386/x32-avx512-linux.xml.
3865         * i387-fp.c (num_avx512_k_registers): New constant for number
3866         of K registers.
3867         (num_avx512_zmmh_low_registers): New constant for number of
3868         lower ZMM registers (0-15).
3869         (num_avx512_zmmh_high_registers): New constant for number of
3870         higher ZMM registers (16-31).
3871         (num_avx512_ymmh_registers): New contant for number of higher
3872         YMM registers (ymm16-31 added by avx521 on x86_64).
3873         (num_avx512_xmm_registers): New constant for number of higher
3874         XMM registers (xmm16-31 added by AVX512 on x86_64).
3875         (struct i387_xsave): Add space for AVX512 registers.
3876         (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3877         Add code to handle AVX512 registers.
3878         (i387_xsave_to_cache): Add code to handle AVX512 registers.
3879         * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3880         prototypei from generated file.
3881         (tdesc_amd64_avx512_linux): Likewise.
3882         (init_registers_x32_avx512_linux): Likewise.
3883         (tdesc_x32_avx512_linux): Likewise.
3884         (init_registers_i386_avx512_linux): Likewise.
3885         (tdesc_i386_avx512_linux): Likewise.
3886         (x86_64_regmap): Add AVX512 registers.
3887         (x86_linux_read_description): Add code to handle AVX512 XSTATE
3888         mask.
3889         (initialize_low_arch): Add code to initialize AVX512 registers.
3890
3891 2014-04-23  Pedro Alves  <palves@redhat.com>
3892
3893         * mem-break.c (find_gdb_breakpoint_at): Make static.
3894         * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3895
3896 2014-04-23  Pedro Alves  <palves@redhat.com>
3897
3898         * i386-low.c: Don't include break-common.h here.
3899         (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3900         prototype to take target_hw_bp_type as argument instead of a Z
3901         packet char.
3902         * i386-low.h: Include break-common.h here.
3903         (Z_packet_to_hw_type): Declare.
3904         (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3905         prototypes.
3906         * linux-x86-low.c (x86_insert_point): Convert the packet number to
3907         a target_hw_bp_type before calling i386_low_insert_watchpoint.
3908         (x86_remove_point): Convert the packet number to a
3909         target_hw_bp_type before calling i386_low_remove_watchpoint.
3910         * win32-i386-low.c (i386_insert_point): Convert the packet number
3911         to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3912         (i386_remove_point): Convert the packet number to a
3913         target_hw_bp_type before calling i386_low_remove_watchpoint.
3914
3915 2014-04-23  Pedro Alves  <palves@redhat.com>
3916
3917         * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3918
3919 2014-04-10  Pedro Alves  <palves@redhat.com>
3920
3921         * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3922         Check if the condition or command is NULL before checking if the
3923         breakpoint is known.  On success, return true.
3924         * mem-break.h (add_breakpoint_condition): Document return.
3925         (add_breakpoint_commands): Add describing comment.
3926         * server.c (skip_to_semicolon): New function.
3927         (process_point_options): Use it.
3928
3929 2014-04-09  Pedro Alves  <palves@redhat.com>
3930
3931         * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3932         to lwpid_of.
3933
3934 2014-02-27  Pedro Alves  <palves@redhat.com>
3935
3936         PR 12702
3937         * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3938         macros.
3939         * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3940         output.
3941         (last_thread_of_process_p): Take a PID argument instead of a
3942         thread pointer.
3943         (linux_wait_for_lwp): Delete.
3944         (num_lwps, check_zombie_leaders, not_stopped_callback): New
3945         functions.
3946         (linux_low_filter_event): New function, party factored out from
3947         linux_wait_for_event.
3948         (linux_wait_for_event): Rename to ...
3949         (linux_wait_for_event_filtered): ... this.  Add new filter ptid
3950         argument.  Partly rewrite.  Always use waitpid(-1, WNOHANG) and
3951         sigsuspend.  Check for zombie leaders.
3952         (linux_wait_for_event): Reimplement as wrapper around
3953         linux_wait_for_event_filtered.
3954         (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED.  Assume that if
3955         a normal or signal exit is seen, it's the whole process exiting.
3956         (wait_for_sigstop): No longer a for_each_inferior callback.
3957         Rewrite on top of linux_wait_for_event_filtered.
3958         (stop_all_lwps): Call wait_for_sigstop directly.
3959         * server.c (resume, handle_target_event): Handle
3960         TARGET_WAITKIND_NO_RESUMED.
3961
3962 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
3963
3964         * win32-low.c (psapi_get_dll_name,
3965         * win32_CreateToolhelp32Snapshot): Delete.
3966         (win32_CreateToolhelp32Snapshot, win32_Module32First)
3967         (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3968         Delete.
3969         (handle_load_dll): Add function description.
3970         Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3971
3972 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
3973
3974         * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3975         Add comment.
3976         (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3977         base address when calling win32_add_one_solib.
3978         (handle_load_dll): Delete local variable load_addr.
3979         Remove 0x1000 offset applied to DLL base address when calling
3980         win32_add_one_solib.
3981         (handle_unload_dll): Add comment.
3982
3983 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
3984
3985         * win32-low.c (win32_add_all_dlls): Renames
3986         win32_ensure_ntdll_loaded.  Rewrite function documentation.
3987         Adjust implementation to always load all DLLs.
3988         Add 0x1000 offset to DLL base address when calling
3989         win32_add_one_solib.
3990         (child_initialization_done): New static global.
3991         (do_initial_child_stuff): Set child_initialization_done to
3992         zero during child initialization, and 1 after.  Replace call
3993         to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3994         Add comment.
3995         (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3996         (handle_unload_dll): Add function documentation.
3997         (get_child_debug_event): Ignore load and unload DLL events
3998         during child initialization.
3999
4000 2014-02-20  Doug Evans  <dje@google.com>
4001
4002         Remove global all_lwps.
4003         * inferiors.h (ptid_of): Move here from linux-low.h.
4004         (pid_of, lwpid_of): Ditto.
4005         * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
4006         parameter is a struct thread_info * now.
4007         (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
4008         directly.  Pass &all_threads to find_inferior instead of &all_lwps.
4009         (aarch64_stopped_data_address): Fetch lwpid from current_inferior
4010         directly.
4011         (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
4012         (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
4013         * linux-arm-low.c (update_registers_callback): Update, "entry"
4014         parameter is a struct thread_info * now.
4015         Fetch lwpid from current_inferior directly.
4016         (arm_insert_point): Pass &all_threads to find_inferior instead of
4017         &all_lwps.
4018         (arm_remove_point): Ditto.
4019         (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
4020         (arm_prepare_to_resume): Fetch pid from thread.
4021         (arm_read_description): Fetch lwpid from current_inferior directly.
4022         * linux-low.c (all_lwps): Delete.
4023         (delete_lwp): Delete call to remove_inferior.
4024         (handle_extended_wait): Fetch lwpid from thread.
4025         (add_lwp): Don't set lwp->entry.id.  Remove call to
4026         add_inferior_to_list.
4027         (linux_attach_lwp_1): Fetch pid from current_inferior directly.
4028         (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
4029         (kill_one_lwp_callback): Ditto.
4030         (linux_kill): Don't dereference NULL pointer.
4031         Fetch ptid,lwpid from thread.
4032         (get_detach_signal): Fetch ptid from thread.
4033         (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
4034         Simplify call to regcache_invalidate_thread.
4035         (delete_lwp_callback): Update, "entry" parameter is a
4036         struct thread_info * now.  Fetch pid from thread.
4037         (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
4038         (status_pending_p_callback): Update, "entry" parameter is a
4039         struct thread_info * now.  Fetch ptid from thread.
4040         (find_lwp_pid): Update, "entry" parameter is a
4041         struct thread_info * now.
4042         (linux_wait_for_lwp): Fetch pid from thread.
4043         (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
4044         (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
4045         (enqueue_one_deferred_signal): Fetch lwpid from thread.
4046         (dequeue_one_deferred_signal): Ditto.
4047         (cancel_breakpoint): Fetch ptid from current_inferior.
4048         (linux_wait_for_event): Pass &all_threads to find_inferior,
4049         not &all_lwps.  Fetch ptid, lwpid from thread.
4050         (count_events_callback): Update, "entry" parameter is a
4051         struct thread_info * now.
4052         (select_singlestep_lwp_callback): Ditto.
4053         (select_event_lwp_callback): Ditto.
4054         (cancel_breakpoints_callback): Ditto.
4055         (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
4056         not &all_lwps.
4057         (select_event_lwp): Ditto.  Fetch ptid from event_thread.
4058         (unsuspend_one_lwp): Update, "entry" parameter is a
4059         struct thread_info * now.
4060         (unsuspend_all_lwps): Pass &all_threads to find_inferior,
4061         not &all_lwps.
4062         (linux_stabilize_threads): Ditto.  And for for_each_inferior.
4063         Fetch lwpid from thread, not lwp.
4064         (linux_wait_1): Fetch ptid, lwpid from current_inferior.
4065         Pass &all_threads to find_inferior, not &all_lwps.
4066         (send_sigstop): Fetch lwpid from thread, not lwp.
4067         (send_sigstop_callback): Update, "entry" parameter is a
4068         struct thread_info * now.
4069         (suspend_and_send_sigstop_callback): Ditto.
4070         (wait_for_sigstop): Ditto.  Fetch ptid, lwpid from thread, lwp.
4071         (stuck_in_jump_pad_callback): Update, "entry" parameter is a
4072         struct thread_info * now.
4073         (move_out_of_jump_pad_callback): Ditto.  Fetch ptid, lwpid
4074         from thread, lwp.
4075         (lwp_running): Update, "entry" parameter is a
4076         struct thread_info * now.
4077         (stop_all_lwps): Fetch ptid from thread.
4078         Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
4079         (linux_resume_one_lwp): Fetch lwpid from thread.
4080         (linux_set_resume_request): Update, "entry" parameter is a
4081         struct thread_info * now.  Fetch pid, lwpid from thread.
4082         (resume_status_pending_p): Update, "entry" parameter is a
4083         struct thread_info * now.
4084         (need_step_over_p): Ditto.  Fetch lwpid from thread.
4085         (start_step_over): Fetch lwpid from thread.
4086         (linux_resume_one_thread): Update, "entry" parameter is a
4087         struct thread_info * now.  Fetch lwpid from thread.
4088         (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
4089         (proceed_one_lwp): Update, "entry" parameter is a
4090         struct thread_info * now.  Fetch lwpid from thread.
4091         (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
4092         struct thread_info * now.
4093         (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
4094         (unstop_all_lwps): Ditto.  Fetch lwpid from thread.
4095         (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
4096         directly.
4097         (regsets_store_inferior_registers): Ditto.
4098         (fetch_register, store_register): Ditto.
4099         (linux_read_memory, linux_write_memory): Ditto.
4100         (linux_request_interrupt): Ditto.
4101         (linux_read_auxv): Ditto.
4102         (linux_xfer_siginfo): Ditto.
4103         (linux_qxfer_spu): Ditto.
4104         (linux_qxfer_libraries_svr4): Ditto.
4105         * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
4106         moved to inferiors.h.
4107         (get_lwp): Delete.
4108         (get_thread_lwp): Update.
4109         (struct lwp_info): Delete member "entry".  Simplify comment for
4110         member "thread".
4111         (all_lwps): Delete.
4112         * linux-mips-low.c (mips_read_description): Fetch lwpid from
4113         current_inferior directly.
4114         (update_watch_registers_callback): Update, "entry" parameter is a
4115         struct thread_info * now.  Fetch pid from thread.
4116         (mips_linux_prepare_to_resume): Fetch ptid from thread.
4117         (mips_insert_point): Fetch lwpid from current_inferior.
4118         Pass &all_threads to find_inferior, not &all_lwps.
4119         (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
4120         (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
4121         directly.
4122         (mips_stopped_data_address): Ditto.
4123         * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
4124         directly.
4125         * linux-tile-low.c (tile_arch_setup): Ditto.
4126         * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
4127         (update_debug_registers_callback): Update, "entry" parameter is a
4128         struct thread_info * now.  Fetch pid from thread.
4129         (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
4130         Pass &all_threads to find_inferior, not &all_lwps.
4131         (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
4132         (i386_dr_low_set_control): Fetch pid from current_inferior directly.
4133         Pass &all_threads to find_inferior, not &all_lwps.
4134         (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
4135         (i386_dr_low_get_status): Ditto.
4136         (x86_linux_prepare_to_resume): Fetch ptid from thread.
4137         (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
4138         (x86_linux_read_description): Ditto.
4139         * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
4140
4141 2014-02-20  Doug Evans  <dje@google.com>
4142
4143         * inferiors.c (get_first_inferior): Fix buglet.
4144
4145 2014-02-19  Doug Evans  <dje@google.com>
4146
4147         * gdbthread.h (add_thread): Change result type to struct thread_info *.
4148         * inferiors.c (add_thread): Change result type to struct thread_info *.
4149         All callers updated.
4150         (add_lwp): Call add_thread here instead of in callers.
4151         All callers updated.
4152         * linux-low.h (get_lwp_thread): Rewrite.
4153         (struct lwp_info): New member "thread".
4154
4155 2014-02-19  Doug Evans  <dje@google.com>
4156
4157         * linux-low.c (add_lwp): Change result to struct lwp_info *.
4158         All callers updated.
4159
4160 2014-02-19  Doug Evans  <dje@google.com>
4161
4162         * inferiors.c (add_thread): Fix whitespace.
4163
4164 2014-02-19  Doug Evans  <dje@google.com>
4165
4166         * dll.c (clear_dlls): Replace accessing list implemention details
4167         with API function.
4168         * gdbthread.h (get_first_thread): Declare.
4169         * inferiors.c (for_each_inferior_with_data): New function.
4170         (get_first_thread): New function.
4171         (find_thread_ptid): Simplify.
4172         (get_first_inferior): New function.
4173         (clear_list): Delete.
4174         (one_inferior_p): New function.
4175         (clear_inferior_list): New function.
4176         (clear_inferiors): Update.
4177         * inferiors.h (for_each_inferior_with_data): Declare.
4178         (clear_inferior_list): Declare.
4179         (one_inferior_p): Declare.
4180         (get_first_inferior): Declare.
4181         * linux-low.c (linux_wait_for_event): Replace accessing list
4182         implemention details with API function.
4183         * server.c (target_running): Ditto.
4184         (accumulate_file_name_length): New function.
4185         (emit_dll_description): New function.
4186         (handle_qxfer_libraries): Replace accessing list implemention
4187         details with API function.
4188         (handle_qxfer_threads_worker): New function.
4189         (handle_qxfer_threads_proper): Replace accessing list implemention
4190         details with API function.
4191         (handle_query): Ditto.
4192         (visit_actioned_threads_callback_ftype): New typedef.
4193         (visit_actioned_threads_data): New struct.
4194         (visit_actioned_threads): Rewrite to be find_inferior callback.
4195         (resume): Call find_inferior.
4196         (handle_status): Replace accessing list implemention
4197         details with API function.
4198         (process_serial_event): Replace accessing list implemention details
4199         with API function.
4200         * target.c (set_desired_inferior): Replace accessing list implemention
4201         details with API function.
4202         * tracepoint.c (same_process_p): New function.
4203         (gdb_agent_about_to_close): Replace accessing list implemention
4204         details with API function.
4205         * win32-low.c (child_delete_thread): Replace accessing list
4206         implemention details with API function.
4207         (match_dll_by_basename): New function.
4208         (dll_is_loaded_by_basename): New function.
4209         (win32_ensure_ntdll_loaded): Replace accessing list implemention
4210         details call to dll_is_loaded_by_basename.
4211
4212 2014-02-19  Doug Evans  <dje@google.com>
4213
4214         * dll.h (struct dll_info): Add comment.
4215         * gdbthread.h (struct thread_info): Add comment.
4216         (current_ptid): Simplify.
4217         * inferiors.c (add_process): Update.
4218         (remove_process): Update.
4219         * inferiors.h (struct process_info): Rename member "head" to "entry".
4220         * linux-low.c (delete_lwp): Update.
4221         (add_lwp): Update.
4222         (last_thread_of_process_p): Update.
4223         (kill_one_lwp_callback, linux_kill): Update.
4224         (status_pending_p_callback): Update.
4225         (wait_for_sigstop): Update.  Simplify read of ptid.
4226         (start_step_over): Update.
4227         * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
4228         (get_lwp_thread): Update.
4229         (struct lwp_info): Rename member "head" to "entry".
4230         * regcache.h (inferior_list_entry): Delete.
4231         * server.c (kill_inferior_callback): Update.
4232         (detach_or_kill_inferior_callback): Update.
4233         (print_started_pid): Update.
4234         (print_attached_pid): Update.
4235         (process_serial_event): Simplify read of ptid.
4236         * thread-db.c (thread_db_create_event): Update.
4237         (thread_db_get_tls_address): Update.
4238         * win32-low.c (current_inferior_ptid): Simplify.
4239
4240 2014-02-19  Tom Tromey  <tromey@redhat.com>
4241
4242         * target.h (struct target_ops) <supports_btrace>: Add target_ops
4243         argument.
4244         (target_supports_btrace): Update.
4245
4246 2014-02-14  Yao Qi  <yao@codesourcery.com>
4247
4248         * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
4249         (rsp-low-ipa.o): New target.
4250
4251 2014-02-12  Tom Tromey  <tromey@redhat.com>
4252
4253         * ax.c (gdb_parse_agent_expr): Use hex2bin, not
4254         convert_ascii_to_int.
4255         * regcache.c (registers_to_string): Likewise.
4256         * remote-utils.c (decode_M_packet): Likewise.
4257         * server.c (process_serial_event): Likewise.
4258
4259 2014-02-12  Tom Tromey  <tromey@redhat.com>
4260
4261         * server.c (handle_query, handle_v_run): Use hex2bin, not
4262         unhexify.
4263         * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
4264
4265 2014-02-12  Tom Tromey  <tromey@redhat.com>
4266
4267         * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
4268         convert_int_to_ascii.
4269         * regcache.c (registers_to_string, collect_register_as_string):
4270         Likewise.
4271         * remote-utils.c (look_up_one_symbol, relocate_instruction):
4272         Likewise.
4273         * server.c (process_serial_event): Likewise.
4274         * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
4275         (cmd_qtbuffer, cstr_to_hexstr): Likewise.
4276
4277 2014-02-12  Tom Tromey  <tromey@redhat.com>
4278
4279         * remote-utils.c (look_up_one_symbol, monitor_output): Use
4280         bin2hex, not hexify.
4281         * tracepoint.c (cmd_qtstatus): Likewise.
4282
4283 2014-02-12  Tom Tromey  <tromey@redhat.com>
4284
4285         * remote-utils.c (monitor_output): Pass explicit length to
4286         hexify.
4287
4288 2014-02-12  Tom Tromey  <tromey@redhat.com>
4289
4290         * tracepoint.c: Include rsp-low.h.
4291         * server.c: Include rsp-low.h.
4292         * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
4293         (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
4294         declare.
4295         * remote-utils.c: Include rsp-low.h.
4296         (fromhex, hexchars, ishex, unhexify, tohex, hexify)
4297         (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
4298         (convert_int_to_ascii, convert_ascii_to_int): Move to
4299         common/rsp-low.c.
4300         * regcache.c: Include rsp-low.h.
4301         * ax.c: Include rsp-low.h.
4302         * Makefile.in (SFILES): Add common/rsp-low.c.
4303         (OBS): Add rsp-low.o.
4304         (rsp-low.o): New target.
4305
4306 2014-02-12  Tom Tromey  <tromey@redhat.com>
4307
4308         * utils.h (pulongest, plongest, phex_nz): Don't declare.
4309         Include print-utils.h.
4310         * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
4311         (plongest, thirty_two, phex_nz): Remove.
4312         * Makefile.in (SFILES): Add common/print-utils.c.
4313         (OBS): Add print-utils.o.
4314         (print-utils-ipa.o): New target.
4315         (print-utils.o): New target.
4316         (IPA_OBJS): Add print-utils-ipa.o.
4317
4318 2014-02-06  Tom Tromey  <tromey@redhat.com>
4319
4320         * Makefile.in (SFILES): Fix indentation.
4321
4322 2014-02-05  Doug Evans  <dje@google.com>
4323
4324         * linux-low.c (linux_wait_for_event): Improve comment.
4325         (linux_wait_1): Keep current_inferior in sync with event_child.
4326
4327 2014-01-22  Doug Evans  <dje@google.com>
4328
4329         * gdbthread.h (gdb_id_to_thread): Delete, unused.
4330
4331 2014-01-22  Doug Evans  <dje@google.com>
4332
4333         * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
4334         * configure: Regenerate.
4335         * config.in: Regenerate.
4336         * Makefile.in (SFILES): Add debug.c.
4337         (OBS): Add debug.o.
4338         * debug.c: New file.
4339         * debug.h: New file.
4340         * linux-aarch64-low.c (*): Update all debugging printfs to use
4341         debug_printf instead of fprintf.
4342         * linux-arm-low.c (*): Ditto.
4343         * linux-cris-low.c (*): Ditto.
4344         * linux-crisv32-low.c (*): Ditto.
4345         * linux-m32r-low.c (*): Ditto.
4346         * linux-sparc-low.c (*): Ditto.
4347         * linux-x86.c (*): Ditto.
4348         * linux-low.c (*): Ditto.
4349         (linux_wait_1): Add calls to debug_enter, debug_exit.
4350         (linux_wait): Remove redundant debugging printf.
4351         (stop_all_lwps): Add calls to debug_enter, debug_exit.
4352         (linux_resume, unstop_all_lwps): Ditto.
4353         * mem-break.c (*): Update all debugging printfs to use
4354         debug_printf instead of fprintf.
4355         * remote-utils.c (*): Ditto.
4356         * thread-db.c (*): Ditto.
4357         * server.c #include <ctype.h>, "gdb_vecs.h".
4358         (debug_threads): Moved to debug.c.
4359         (*): Update all debugging printfs to use debug_printf instead of
4360         fprintf.
4361         (start_inferior): Replace call to fflush with call to debug_flush.
4362         (monitor_show_help): Mention set debug-format.
4363         (parse_debug_format_options): New function.
4364         (handle_monitor_command): Handle "monitor set debug-format".
4365         (gdbserver_usage): Mention --debug-format.
4366         (main): Parse --debug-format.
4367         * server.h (debug_threads): Declaration moved to debug.h.
4368         #include "debug.h".
4369         * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
4370         trace_debug_1 that uses debug_printf.
4371         (tracepoint_look_up_symbols): Update all debugging printfs to use
4372         debug_printf instead of fprintf.
4373
4374 2014-01-20  Baruch Siach  <baruch@tkos.co.il>
4375
4376         * linux-xtensa-low.c: Include asm/ptrace.h instead of
4377         sys/ptrace.h.
4378
4379 2014-01-17  Pedro Alves  <palves@redhat.com>
4380
4381         PR build/16445
4382         * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
4383         defined after including gdb_proc_service.h.
4384
4385 2014-01-16  Doug Evans  <dje@google.com>
4386
4387         * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
4388         (match_dll): Use it.
4389
4390 2014-01-16  Markus Metzger  <markus.t.metzger@intel.com>
4391
4392         * target.h (target_ops) <read_btrace>: Change parameters and
4393         return type to allow error reporting.
4394         * server.c (handle_qxfer_btrace): Support delta reads.  Pass
4395         trace reading errors on.
4396         * linux-low.c (linux_low_read_btrace): Pass trace reading
4397         errors on.
4398         (linux_low_disable_btrace): New.
4399
4400 2014-01-15  Doug Evans  <dje@google.com>
4401
4402         * inferiors.c (thread_id_to_gdb_id): Delete.
4403         * inferiors.h (thread_id_to_gdb_id): Delete.
4404
4405 2014-01-13  Eli Zaretskii  <eliz@gnu.org>
4406
4407         * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
4408         "-I$(srcdir)/../".  Fixes MinGW compilation errors with old GCC
4409         versions.
4410
4411 2014-01-08  Pedro Alves  <palves@redhat.com>
4412
4413         * server.c (handle_status): Don't discard previous queued stop
4414         replies or thread's pending status here.
4415         (main) <disconnection>: Do it here instead.
4416
4417 2014-01-08  Pedro Alves  <palves@redhat.com>
4418
4419         * gdbthread.h (struct thread_info) <status_pending_p>: New field.
4420         * server.c (visit_actioned_threads, handle_pending_status): New
4421         function.
4422         (handle_v_cont): Factor out parts to ...
4423         (resume): ... this new function.  If in all-stop, and a thread
4424         being resumed has a pending status, report it without actually
4425         resuming.
4426         (myresume): Adjust to use the new 'resume' function.
4427         (clear_pending_status_callback, set_pending_status_callback)
4428         (find_status_pending_thread_callback): New functions.
4429         (handle_status): Handle the case of multiple threads having
4430         interesting statuses to report.  Report threads' real last signal
4431         instead of always reporting GDB_SIGNAL_TRAP.  Look for a thread
4432         with an interesting thread to report the status for, instead of
4433         always reporting the status of the first thread.
4434
4435 2014-01-01  Joel Brobecker  <brobecker@adacore.com>
4436
4437         * gdbserver.c (gdbserver_version): Set copyright year to 2014.
4438         * gdbreplay.c (gdbreplay_version): Likewise.
4439
4440 2013-12-18  Yufeng Zhang  <yufeng.zhang@arm.com>
4441
4442         * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
4443         iov.iov_len with the real length in use.
4444
4445 2013-12-13  Joel Brobecker  <brobecker@adacore.com>
4446
4447         * Makefile.in (safe-ctype.o, lbasename.o): New rules.
4448         * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
4449         for all targets that use win32-low.c.
4450         * win32-low.c (win32_ensure_ntdll_loaded): New function.
4451         (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
4452
4453 2013-12-13  Pedro Alves  <palves@redhat.com>
4454
4455         * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
4456         if equal to TARGET_WAITKIND_LOADED.
4457         * win32-low.c (cached_status): New static global.
4458         (win32_wait): Add declaration.
4459         (do_initial_child_stuff): Flush all initial pending debug events
4460         up to the initial breakpoint.
4461         (win32_wait): If CACHED_STATUS was set, return that instead
4462         of doing a real wait.  Remove the code resuming the execution
4463         of the inferior after receiving a TARGET_WAITKIND_LOADED event
4464         during the initial phase.  Also remove the code changing
4465         OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
4466         TARGET_WAITKIND_STOPPED.
4467
4468 2013-12-11  Yao Qi  <yao@codesourcery.com>
4469
4470         * notif.c (handle_notif_ack): Return 0 if no notification
4471         matches.
4472
4473 2013-11-20  Doug Evans  <dje@google.com>
4474
4475         * linux-low.c (linux_set_resume_request): Fix comment.
4476
4477 2013-11-20  Doug Evans  <dje@google.com>
4478
4479         * linux-low.c (resume_status_pending_p): Tweak comment.
4480
4481 2013-11-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4482
4483         * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
4484         amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
4485         * configure.srv (srv_i386_regobj): Add i386-mpx.o.
4486         (srv_i386_linux_regobj): Add i386-mpx-linux.o.
4487         (srv_amd64_regobj): Add amd64-mpx.o.
4488         (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
4489         (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
4490         (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
4491         * i387-fp.c (num_pl_bnd_register) Added constant.
4492         (num_pl_bnd_cfg_registers) Added constant.
4493         (struct i387_xsave) Added reserved area and MPX fields.
4494         (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
4495         * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
4496         function.
4497         (tdesc_i386_mpx_linux): Add MPX amd64 target.
4498         (init_registers_amd64_mpx_linux): Declare new function.
4499         (tdesc_amd64_mpx_linux): Add MPX amd64 target.
4500         (x86_64_regmap): Add MPX registers.
4501         (x86_linux_read_description): Add MPX case.
4502         (initialize_low_arch): Initialize MPX targets.
4503
4504 2013-11-18  Tom Tromey  <tromey@redhat.com>
4505
4506         * configure: Rebuild.
4507         * configure.ac: Don't check for stdlib.h.
4508         * gdbreplay.c: Unconditionally include stdlib.h.
4509
4510 2013-11-18  Tom Tromey  <tromey@redhat.com>
4511
4512         * config.in: Rebuild.
4513         * configure: Rebuild.
4514         * configure.ac: Don't use AC_HEADER_DIRENT.
4515
4516 2013-11-18  Tom Tromey  <tromey@redhat.com>
4517
4518         * server.h: Don't check HAVE_STRING_H.
4519         * gdbreplay.c: Don't check HAVE_STRING_H.
4520         * configure: Rebuild.
4521
4522 2013-11-18  Tom Tromey  <tromey@redhat.com>
4523
4524         * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
4525         LIBGNU.
4526
4527 2013-11-08  Tom Tromey  <tromey@redhat.com>
4528
4529         * configure, config.in: Rebuild.
4530         * configure.ac: Remove unused configury.
4531
4532 2013-11-08  Tom Tromey  <tromey@redhat.com>
4533
4534         * acinclude.m4: Include common.m4, codeset.m4.
4535         * configure, config.in: Rebuild.
4536         * configure.ac: Use GDB_AC_COMMON.
4537
4538 2013-11-06  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4539
4540         * linux-s390-low.c (HWCAP_S390_TE): New define.
4541         (s390_arch_setup): Consider the TE field in the HWCAP for
4542         determining 'have_regset_tdb'.
4543
4544 2013-10-16  Sergio Durigan Junior  <sergiodj@redhat.com>
4545
4546         PR gdb/16014
4547         * tracepoint.c (download_tracepoint_1): Remove unnecessary double
4548         call to sizeof.
4549
4550 2013-10-02  Pedro Alves  <palves@redhat.com>
4551
4552         * server.c (process_serial_event): Don't output "GDBserver
4553         exiting" if GDB is connected through stdio.
4554         * target.c (mywait): Likewise, be silent if GDB is connected
4555         through stdio.
4556
4557 2013-10-01  Joel Brobecker  <brobecker@adacore.com>
4558
4559         * lynx-low.c (lynx_add_threads_after_attach): New function.
4560         (lynx_attach): Remove call to add_thread.  Add call to
4561         lynx_add_threads_after_attach instead.
4562
4563 2013-09-28  Mike Frysinger  <vapier@gentoo.org>
4564
4565         * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4566         * config.in, configure: Regenerated.
4567
4568 2013-09-18  Yao Qi  <yao@codesourcery.com>
4569
4570         PR server/15959
4571         * server.c (start_inferior): Clear 'resume_info'.
4572
4573 2013-09-16  Jiong Wang  <jiwang@tilera.com>
4574
4575         * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4576         for each register.
4577
4578 2013-09-16  Jiong Wang  <jiwang@tilera.com>
4579
4580         * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4581         linux-tile-low.o to srv_tgtobj.
4582
4583 2013-09-16  Will Newton  <will.newton@linaro.org>
4584
4585         * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4586         out regs.
4587
4588 2013-09-06  Pedro Alves  <palves@redhat.com>
4589
4590         * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4591         (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4592         (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4593         (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4594         (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4595         (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4596
4597 2013-09-06  Pedro Alves  <palves@redhat.com>
4598
4599         * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4600         explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4601
4602 2013-09-06  Pedro Alves  <palves@redhat.com>
4603
4604         * linux-amd64-ipa.c: Include tracepoint.h.
4605         * linux-i386-ipa.c: Include tracepoint.h.
4606
4607 2013-09-06  Ricard Wanderlof  <ricardw@axis.com>
4608
4609         * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4610         (ps_get_thread_area): New function.
4611
4612 2013-09-06  Ricard Wanderlof  <ricardw@axis.com>
4613
4614         * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4615         (initialize_low_arch): Call init_registers_crisv32 rather than
4616         init_register_crisv32.
4617
4618 2013-09-05  Pedro Alves  <palves@redhat.com>
4619
4620         * server.h (handle_vFile, hostio_last_error_from_errno): Move
4621         to ...
4622         * hostio.h: ... this new file.
4623         * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4624         win32-low.c: Include hostio.h.
4625
4626 2013-09-05  Pedro Alves  <palves@redhat.com>
4627
4628         * server.h (gdb_client_data, handler_func, callback_handler_func)
4629         (delete_file_handler, add_file_handler, append_callback_event)
4630         (delete_callback_event, start_event_loop, initialize_event_loop):
4631         Move to event-loop.h and include it.
4632         * event-loop.h: New file.
4633
4634 2013-09-05  Pedro Alves  <palves@redhat.com>
4635
4636         * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4637         * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4638         (loaded_dll, unloaded_dll): Move to ...
4639         * dll.h: ... this new file.
4640         * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4641
4642 2013-09-05  Pedro Alves  <palves@redhat.com>
4643
4644         * server.h (current_process, get_thread_process, all_processes)
4645         (add_inferior_to_list, for_each_inferior, current_inferior)
4646         (remove_inferior, add_process, remove_process, find_process_pid)
4647         (have_started_inferiors_p, have_attached_inferiors_p)
4648         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4649         (clear_inferiors, find_inferior, find_inferior_id)
4650         (inferior_target_data, set_inferior_target_data)
4651         (inferior_regcache_data, set_inferior_regcache_data): Move to
4652         inferiors.h, and include it.
4653         * inferiors.h: New file.
4654
4655 2013-09-05  Pedro Alves  <palves@redhat.com>
4656
4657         * server.h (struct emit_ops, current_insn_ptr, emit_error):
4658         Move ...
4659         * ax.h: ... here.
4660
4661 2013-09-05  Pedro Alves  <palves@redhat.com>
4662
4663         * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4664         tracepoint.h.
4665         * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4666         (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4667         (handle_tracepoint_general_set, handle_tracepoint_query)
4668         (tracepoint_finished_step, tracepoint_was_hit)
4669         (release_while_stepping_state_list, current_traceframe)
4670         (in_readonly_region, traceframe_read_mem)
4671         (fetch_traceframe_registers, traceframe_read_sdata)
4672         (traceframe_read_info, struct fast_tpoint_collect_status)
4673         (fast_tracepoint_collecting, force_unlock_trace_buffer)
4674         (handle_tracepoit_bkpts, initialize_low_tracepoint)
4675         (supply_fast_tracepoint_registers)
4676         (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4677         (ipa_tdesc, claim_trampoline_space)
4678         (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4679         (agent_mem_read, agent_get_trace_state_variable_value)
4680         (agent_set_trace_state_variable_value, agent_tsv_read)
4681         (agent_mem_read_string, get_raw_reg_func_addr)
4682         (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4683         * tracepoint.h: ... this new file.
4684
4685 2013-09-05  Pedro Alves  <palves@redhat.com>
4686
4687         * server.h (perror_with_name, error, fatal, warning, paddress)
4688         (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4689         include it.
4690         * utils.h: New file.
4691
4692 2013-09-05  Pedro Alves  <palves@redhat.com>
4693
4694         * server.h (remote_debug, noack_mode, transport_is_reliable)
4695         (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4696         (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4697         (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4698         (write_enn, initialize_async_io, enable_async_io)
4699         (disable_async_io, check_remote_input_interrupt_request)
4700         (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4701         (dead_thread_notify, prepare_resume_reply)
4702         (decode_address_to_semicolon, decode_address, decode_m_packet)
4703         (decode_M_packet, decode_X_packet, decode_xfer_write)
4704         (decode_search_memory_packet, unhexify, hexify)
4705         (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4706         (look_up_one_symbol, relocate_instruction)
4707         (monitor_output): Move to remote-utils.h, and include it.
4708         * remote-utils.h: New file.
4709
4710 2013-09-05  Pedro Alves  <palves@redhat.com>
4711
4712         * server.h (_): Delete.
4713
4714 2013-09-02  Pedro Alves  <palves@redhat.com>
4715
4716         * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4717         (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4718         allocated.
4719         (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4720
4721 2013-09-02  Pierre Muller  <muller@sourceware.org>
4722
4723         * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4724         or WriteProcessMemory complete successfully and handle
4725         ERROR_PARTIAL_COPY error.
4726
4727 2013-09-02  Pedro Alves  <palves@redhat.com>
4728
4729         * server.c (gdb_read_memory): Return -1 on traceframe memory read
4730         error instead of EIO.
4731
4732 2013-08-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
4733
4734         PR server/15604
4735         * linux-low.c: Include filestuff.h.
4736         (linux_create_inferior) <pid == 0>: Call close_most_fds.
4737         * lynx-low.c: Include filestuff.h.
4738         (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4739         * server.c: Include filestuff.h.
4740         (main): Call notice_open_fds.
4741         * spu-low.c: Include filestuff.h.
4742         (spu_create_inferior) <pid == 0>: Call close_most_fds.
4743
4744 2013-08-22  Luis Machado  <lgustavo@codesourcery.com>
4745
4746         * Makefile.in: Explain why ../target and ../nat are not
4747         listed as include file search paths.
4748         (linux-waitpid.o): New object file rule.
4749         * configure.srv (srv_native_linux_obj): New variable.
4750         Replace all occurrences of linux native object files with
4751         $srv_native_linux_obj.
4752         * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4753         (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4754         (linux_enable_event_reporting): Remove declaration.
4755         (my_waitpid): Moved to common/linux-waitpid.c.
4756         (linux_wait_for_event): Pass ptid when calling
4757         linux_enable_event_reporting.
4758         (linux_supports_tracefork_flag): Remove.
4759         (linux_enable_event_reporting): Likewise.
4760         (linux_tracefork_grandchild): Remove.
4761         (STACK_SIZE): Moved to common/linux-ptrace.c.
4762         (linux_tracefork_child): Remove.
4763         (linux_test_for_tracefork): Remove.
4764         (linux_look_up_symbols): Call linux_supports_traceclone.
4765         (initialize_low): Remove call to linux_test_for_tracefork.
4766         * linux-low.h (PTRACE_TYPE_ARG3): Move to
4767         common/linux-ptrace.h.
4768         (PTRACE_TYPE_ARG4): Likewise.
4769         Include linux-ptrace.h.
4770
4771 2013-08-21  Pedro Alves  <palves@redhat.com>
4772
4773         * config.in: Renegerate.
4774
4775 2013-08-19  Luis Machado  <lgustavo@codesourcery.com>
4776
4777         * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4778         (SFILES): Remove $(srcdir)/common/target-common.c and
4779         add $(srcdir)/target/waitstatus.c.
4780         (OBS): Remove target-common.o and add waitstatus.o.
4781         (server_h): Remove $(srcdir)/../common/target-common.h and
4782         add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4783         and $(srcdir)/../target/waitstatus.h.
4784         (target-common.o): Remove.
4785         (waitstatus.o): New target object file.
4786         * target.h: Do not include target-common.h and
4787         include target/resume.h, target/wait.h and
4788         target/waitstatus.h.
4789
4790 2013-08-13  Luis Machado  <lgustavo@codesourcery.com>
4791
4792         * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4793         to PTRACE_TYPE_ARG3.
4794         * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4795         to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4796         PTRACE_TYPE_ARG4.
4797         * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4798         (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4799
4800 2013-07-27  Jie Zhang  <jie@codesourcery.com>
4801             Daniel Jacobowitz  <dan@codesourcery.com>
4802             Yao Qi  <yao@codesourcery.com>
4803
4804         * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4805         (mips-linux-watch.o): New rule.
4806         (mips_linux_watch_h): New variable.
4807         * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4808         srv_tgtobj.
4809         * linux-mips-low.c: Include mips-linux-watch.h.
4810         (struct arch_process_info, struct arch_lwp_info): New.
4811         (update_watch_registers_callback): New function.
4812         (mips_linux_new_process, mips_linux_new_thread) New functions.
4813         (mips_linux_prepare_to_resume, mips_insert_point): New
4814         functions.
4815         (mips_remove_point, mips_stopped_by_watchpoint): New
4816         functions.
4817         (rsp_bp_type_to_target_hw_bp_type): New function.
4818         (mips_stopped_data_address): New function.
4819         (the_low_target): Add watchpoint support functions.
4820
4821 2013-07-27  Yao Qi  <yao@codesourcery.com>
4822
4823         * i386-low.c: Include break-common.h.
4824         (enum target_hw_bp_type): Remove.
4825
4826 2013-07-24  Luis Machado  <lgustavo@codesourcery.com>
4827
4828         * Makefile.in (SFILES): /common/target-common.c.
4829         (OBS): Add target-common.o.
4830         (server_h): Add $(srcdir)/../common/target-common.h.
4831         (target-common.o): New target.
4832         * server.c (queue_stop_reply_callback): Free
4833         status string after use.
4834         * target.c (target_waitstatus_to_string): Remove.
4835         * target.h: Include target-common.h.
4836         (resume_kind): Likewise.
4837         (target_waitkind): Likewise.
4838         (target_waitstatus): Likewise.
4839         (TARGET_WNOHANG): Likewise.
4840
4841 2013-07-04  Yao Qi  <yao@codesourcery.com>
4842
4843         * Makefile.in (host_alias): Use @host_noncanonical@.
4844         (target_alias): Use @target_noncanonical@.
4845         * configure.ac: Use ACX_NONCANONICAL_TARGET and
4846         ACX_NONCANONICAL_HOST.
4847         * configure: Regenerated.
4848
4849         Revert:
4850         2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>
4851
4852         * configure.ac (version_host, version_target): Set and AC_SUBST them.
4853         * configure: Rebuild.
4854         * Makefile.in (version_host, version_target): Get from configure.
4855         (version.c): Use $(version_host) and $(version_target).
4856
4857 2013-07-03  Pedro Alves  <palves@redhat.com>
4858
4859         * Makefile.in (config.status): Depend on development.sh.
4860         * acinclude.m4: Include libmcheck.m4.
4861         * configure: Regenerate.
4862
4863 2013-07-02  Mircea Gherzan  <mircea.gherzan@intel.com>
4864
4865         * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4866         attribute inside the parentheses.
4867         (winapi_DebugSetProcessKillOnExit): Ditto.
4868         (winapi_DebugBreakProcess): Ditto.
4869         (winapi_GenerateConsoleCtrlEvent): Ditto.
4870
4871 2013-07-02  Mircea Gherzan  <mircea.gherzan@intel.com>
4872
4873         * notif.h (notif_event): Add a dummy member to avoid compiler
4874         errors.
4875
4876 2013-07-01  Pedro Alves  <palves@redhat.com>
4877
4878         * hostio.c (HOSTIO_PATH_MAX): Define.
4879         (require_filename, handle_open, handle_unlink, handle_readlink):
4880         Use it.
4881
4882 2013-07-01  Pedro Alves  <palves@redhat.com>
4883
4884         * server.h: Include "pathmax.h".
4885         * linux-low.c: Don't include sys/param.h.
4886         (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4887         MAXPATHLEN.
4888         * win32-low.c: Don't include sys/param.h.
4889         (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4890
4891 2013-07-01  Pedro Alves  <palves@redhat.com>
4892
4893         * event-loop.c: Don't check HAVE_UNISTD_H before including
4894         <unistd.h>.
4895         * gdbreplay.c: Likewise.
4896         * remote-utils.c: Likewise.
4897         * server.c: Likewise.
4898         * configure.ac: Don't check for unistd.h.
4899         * configure: Regenerate.
4900
4901 2013-06-28  Tom Tromey  <tromey@redhat.com>
4902
4903         * Makefile.in (version.c): Use version.in, not
4904         common/version.in.
4905
4906 2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>
4907
4908         * configure.ac (version_host, version_target): Set and AC_SUBST them.
4909         * configure: Rebuild.
4910         * Makefile.in (version_host, version_target): Get from configure.
4911         (version.c): Use $(version_host) and $(version_target).
4912
4913 2013-06-10  Dmitry Kozlov <ddk@codesourcery.com>
4914
4915         Fix trace-status to output user name without trailing colon.
4916         * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4917
4918 2013-06-10  Dmitry Kozlov <ddk@codesourcery.com>
4919
4920         Fix trace-status to output proper start-time and stop-time.
4921         * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4922         output start time and stop time in hex as gdb expects.
4923
4924 2013-06-26  Pedro Alves  <pedro@codesourcery.com>
4925
4926         * tracepoint.c (build_traceframe_info_xml): Output trace state
4927         variables present in the trace buffer.
4928
4929 2013-06-24  Tom Tromey  <tromey@redhat.com>
4930
4931         * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4932         create-version.sh.
4933         (version.o): Remove.
4934         * gdbreplay.c: Include version.h.
4935         (version, host_name): Don't declare.
4936         * server.h: Include version.h.
4937         (version, host_name): Don't declare.
4938
4939 2013-06-12  Pedro Alves  <palves@redhat.com>
4940
4941         * linux-x86-low.c (linux_is_elf64): Delete global.
4942         (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4943         with local linux_pid_exe_is_elf_64_file use.
4944
4945 2013-06-11  Pedro Alves  <palves@redhat.com>
4946
4947         * linux-low.c (regset_disabled, disable_regset): New functions.
4948         (regsets_fetch_inferior_registers)
4949         (regsets_store_inferior_registers): Use them.
4950         (initialize_regsets_info); Don't allocate the disabled_regsets
4951         array here.
4952         * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4953         comment.
4954
4955 2013-06-11  Pedro Alves  <palves@redhat.com>
4956
4957         * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4958         xmalloc.
4959
4960 2013-06-11  Pedro Alves  <palves@redhat.com>
4961
4962         * linux-x86-low.c (initialize_low_arch): Call
4963         init_registers_x32_avx_linux.
4964
4965 2013-06-09  Jan Kratochvil  <jan.kratochvil@redhat.com>
4966
4967         Fix compatibility with Android Bionic.
4968         * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4969         it is not empty.
4970
4971 2013-06-07  Pedro Alves  <palves@redhat.com>
4972
4973         PR server/14823
4974         * Makefile.in (OBS): Add tdesc.o.
4975         (IPA_OBJS): Add tdesc-ipa.o.
4976         (tdesc-ipa.o): New rule.
4977         * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4978         interface.
4979         * linux-low.c (new_inferior): Delete.
4980         (disabled_regsets, num_regsets): Delete.
4981         (linux_add_process): Adjust to set the new per-process
4982         new_inferior flag.
4983         (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4984         (linux_wait_for_lwp): Adjust.  Only call arch_setup if the event
4985         was a stop.  When calling arch_setup, switch the current inferior
4986         to the thread that got an event.
4987         (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4988         (regsets_fetch_inferior_registers)
4989         (regsets_store_inferior_registers): New regsets_info parameter.
4990         Adjust to use it.
4991         (linux_register_in_regsets): New regs_info parameter.  Adjust to
4992         use it.
4993         (register_addr, fetch_register, store_register): New usrregs_info
4994         parameter.  Adjust to use it.
4995         (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4996         parameter regs_info.  Adjust to use it.
4997         (linux_fetch_registers): Get the current inferior's regs_info, and
4998         adjust to use it.
4999         (linux_store_registers): Ditto.
5000         [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
5001         (initialize_low): Don't initialize the target_regsets here.  Call
5002         initialize_low_arch.
5003         * linux-low.h (target_regsets): Delete declaration.
5004         (struct regsets_info): New.
5005         (struct usrregs_info): New.
5006         (struct regs_info): New.
5007         (struct process_info_private) <new_inferior>: New field.
5008         (struct linux_target_ops): Delete the num_regs, regmap, and
5009         regset_bitmap fields.  New field regs_info.
5010         [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
5011         * i387-fp.c (num_xmm_registers): Delete.
5012         (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
5013         calls to new interface.
5014         (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
5015         (i387_xsave_to_cache): Adjust find_regno calls to new interface.
5016         Infer the number of xmm registers from the regcache's target
5017         description.
5018         * i387-fp.h (num_xmm_registers): Delete.
5019         * inferiors.c (add_thread): Don't install the thread's regcache
5020         here.
5021         * proc-service.c (gregset_info): Fetch the current inferior's
5022         regs_info.  Adjust to use it.
5023         * regcache.c: Include tdesc.h.
5024         (register_bytes, reg_defs, num_registers)
5025         (gdbserver_expedite_regs): Delete.
5026         (get_thread_regcache): If the thread doesn't have a regcache yet,
5027         create one, instead of aborting gdbserver.
5028         (regcache_invalidate_one): Rename to ...
5029         (regcache_invalidate_thread): ... this.
5030         (regcache_invalidate_one): New.
5031         (regcache_invalidate): Only invalidate registers of the current
5032         process.
5033         (init_register_cache): Add target_desc parameter, and use it.
5034         (new_register_cache): Ditto.  Assert the target description has a
5035         non zero registers_size.
5036         (regcache_cpy): Add assertions.  Adjust.
5037         (realloc_register_cache, set_register_cache): Delete.
5038         (registers_to_string, registers_from_string): Adjust.
5039         (find_register_by_name, find_regno, find_register_by_number)
5040         (register_cache_size): Add target_desc parameter, and use it.
5041         (free_register_cache_thread, free_register_cache_thread_one)
5042         (regcache_release, register_cache_size): New.
5043         (register_size): Add target_desc parameter, and use it.
5044         (register_data, supply_register, supply_register_zeroed)
5045         (supply_regblock, supply_register_by_name, collect_register)
5046         (collect_register_as_string, collect_register_by_name): Adjust.
5047         * regcache.h (struct target_desc): Forward declare.
5048         (struct regcache) <tdesc>: New field.
5049         (init_register_cache, new_register_cache): Add target_desc
5050         parameter.
5051         (regcache_invalidate_thread): Declare.
5052         (regcache_invalidate_one): Delete declaration.
5053         (regcache_release): Declare.
5054         (find_register_by_number, register_cache_size, register_size)
5055         (find_regno): Add target_desc parameter.
5056         (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
5057         declarations.
5058         * remote-utils.c: Include tdesc.h.
5059         (outreg, prepare_resume_reply): Adjust.
5060         * server.c: Include tdesc.h.
5061         (gdbserver_xmltarget): Delete declaration.
5062         (get_features_xml, process_serial_event): Adjust.
5063         * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
5064         declare.
5065         (struct process_info) <tdesc>: New field.
5066         (ipa_tdesc): Declare.
5067         * tdesc.c: New file.
5068         * tdesc.h: New file.
5069         * tracepoint.c: Include tdesc.h.
5070         [IN_PROCESS_AGENT] (ipa_tdesc): Define.
5071         (get_context_regcache): Adjust to pass ipa_tdesc down.
5072         (do_action_at_tracepoint): Adjust to get the register cache size
5073         from the context regcache's description.
5074         (traceframe_walk_blocks): Adjust to get the register cache size
5075         from the current trace frame's description.
5076         (traceframe_get_pc): Adjust to get current trace frame's
5077         description and pass it down.
5078         (gdb_collect): Adjust to get the register cache size from the
5079         IPA's description.
5080         * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
5081         (gdbserver_xmltarget): Delete.
5082         (initialize_low_tracepoint): Set the ipa's target description.
5083         * linux-i386-ipa.c (tdesc_i386_linux): Declare.
5084         (initialize_low_tracepoint): Set the ipa's target description.
5085         * linux-x86-low.c: Include tdesc.h.
5086         [__x86_64__] (is_64bit_tdesc): New.
5087         (ps_get_thread_area, x86_get_thread_area): Use it.
5088         (i386_cannot_store_register): Rename to ...
5089         (x86_cannot_store_register): ... this.  Use is_64bit_tdesc.
5090         (i386_cannot_fetch_register): Rename to ...
5091         (x86_cannot_fetch_register): ... this.  Use is_64bit_tdesc.
5092         (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
5093         to new interface.
5094         (target_regsets): Rename to ...
5095         (x86_regsets): ... this.
5096         (x86_get_pc, x86_set_pc): Adjust register_size calls to new
5097         interface.
5098         (x86_siginfo_fixup): Use is_64bit_tdesc.
5099         [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
5100         (tdesc_x32_avx_linux, tdesc_x32_linux)
5101         (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
5102         Declare.
5103         (x86_linux_update_xmltarget): Delete.
5104         (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
5105         (have_ptrace_getfpxregs, have_ptrace_getregset): New.
5106         (AMD64_LINUX_USER64_CS): New.
5107         (x86_linux_read_description): New, based on
5108         x86_linux_update_xmltarget.
5109         (same_process_callback): New.
5110         (x86_arch_setup_process_callback): New.
5111         (x86_linux_update_xmltarget): New.
5112         (x86_regsets_info): New.
5113         (amd64_linux_regs_info): New.
5114         (i386_linux_usrregs_info): New.
5115         (i386_linux_regs_info): New.
5116         (x86_linux_regs_info): New.
5117         (x86_arch_setup): Reimplement.
5118         (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
5119         (x86_emit_ops): Ditto.
5120         (the_low_target): Adjust.  Install x86_linux_regs_info,
5121         x86_cannot_fetch_register, and x86_cannot_store_register.
5122         (initialize_low_arch): New.
5123         * linux-ia64-low.c (tdesc_ia64): Declare.
5124         (ia64_fetch_register): Adjust.
5125         (ia64_usrregs_info, regs_info): New globals.
5126         (ia64_regs_info): New function.
5127         (the_low_target): Adjust.
5128         (initialize_low_arch): New function.
5129         * linux-sparc-low.c (tdesc_sparc64): Declare.
5130         (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
5131         Adjust.
5132         (sparc_arch_setup): New function.
5133         (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
5134         (the_low_target): Adjust.
5135         (initialize_low_arch): New function.
5136         * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
5137         (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
5138         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
5139         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
5140         (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
5141         (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
5142         (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
5143         (tdesc_powerpc_isa205_vsx64l): Declare.
5144         (ppc_cannot_store_register, ppc_collect_ptrace_register)
5145         (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
5146         (ppc_set_pc, ppc_get_hwcap): Adjust.
5147         (ppc_usrregs_info): Forward declare.
5148         (!__powerpc64__) ppc_regmap_adjusted: New global.
5149         (ppc_arch_setup): Adjust to the current process'es target
5150         description.
5151         (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
5152         (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
5153         (ppc_store_evrregset): Adjust.
5154         (target_regsets): Rename to ...
5155         (ppc_regsets): ... this, and make static.
5156         (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
5157         (ppc_regs_info): New function.
5158         (the_low_target): Adjust.
5159         (initialize_low_arch): New function.
5160         * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
5161         (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
5162         (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
5163         (tdesc_s390x_linux64v2): Declare.
5164         (s390_collect_ptrace_register, s390_supply_ptrace_register)
5165         (s390_fill_gregset, s390_store_last_break): Adjust.
5166         (target_regsets): Rename to ...
5167         (s390_regsets): ... this, and make static.
5168         (s390_get_pc, s390_set_pc): Adjust.
5169         (s390_get_hwcap): New target_desc parameter, and use it.
5170         [__s390x__] (have_hwcap_s390_high_gprs): New global.
5171         (s390_arch_setup): Adjust to set the current process'es target
5172         description.  Don't adjust the regmap.
5173         (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
5174         [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
5175         (regs_info_3264): New globals.
5176         (s390_regs_info): New function.
5177         (the_low_target): Adjust.
5178         (initialize_low_arch): New function.
5179         * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
5180         (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
5181         [__mips64] (init_registers_mips_linux)
5182         (init_registers_mips_dsp_linux): Delete defines.
5183         [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
5184         (have_dsp): New global.
5185         (mips_read_description): New, based on mips_arch_setup.
5186         (mips_arch_setup): Reimplement.
5187         (get_usrregs_info): New function.
5188         (mips_cannot_fetch_register, mips_cannot_store_register)
5189         (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
5190         (mips_fill_fpregset, mips_store_fpregset): Adjust.
5191         (target_regsets): Rename to ...
5192         (mips_regsets): ... this, and make static.
5193         (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
5194         (dsp_regs_info, regs_info): New globals.
5195         (mips_regs_info): New function.
5196         (the_low_target): Adjust.
5197         (initialize_low_arch): New function.
5198         * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
5199         (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
5200         Declare.
5201         (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
5202         (arm_read_description): New, with bits factored from
5203         arm_arch_setup.
5204         (arm_arch_setup): Reimplement.
5205         (target_regsets): Rename to ...
5206         (arm_regsets): ... this, and make static.
5207         (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
5208         (arm_regs_info): New function.
5209         (the_low_target): Adjust.
5210         (initialize_low_arch): New function.
5211         * linux-m68k-low.c (tdesc_m68k): Declare.
5212         (target_regsets): Rename to ...
5213         (m68k_regsets): ... this, and make static.
5214         (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
5215         (m68k_regs_info): New function.
5216         (m68k_arch_setup): New function.
5217         (the_low_target): Adjust.
5218         (initialize_low_arch): New function.
5219         * linux-sh-low.c (tdesc_sharch): Declare.
5220         (target_regsets): Rename to ...
5221         (sh_regsets): ... this, and make static.
5222         (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
5223         (sh_regs_info, sh_arch_setup): New functions.
5224         (the_low_target): Adjust.
5225         (initialize_low_arch): New function.
5226         * linux-bfin-low.c (tdesc_bfin): Declare.
5227         (bfin_arch_setup): New function.
5228         (bfin_usrregs_info, regs_info): New globals.
5229         (bfin_regs_info): New function.
5230         (the_low_target): Adjust.
5231         (initialize_low_arch): New function.
5232         * linux-cris-low.c (tdesc_cris): Declare.
5233         (cris_arch_setup): New function.
5234         (cris_usrregs_info, regs_info): New globals.
5235         (cris_regs_info): New function.
5236         (the_low_target): Adjust.
5237         (initialize_low_arch): New function.
5238         * linux-cris-low.c (tdesc_crisv32): Declare.
5239         (cris_arch_setup): New function.
5240         (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
5241         (cris_regs_info): New function.
5242         (the_low_target): Adjust.
5243         (initialize_low_arch): New function.
5244         * linux-m32r-low.c (tdesc_m32r): Declare.
5245         (m32r_arch_setup): New function.
5246         (m32r_usrregs_info, regs_info): New globals.
5247         (m32r_regs_info): Adjust.
5248         (initialize_low_arch): New function.
5249         * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
5250         (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
5251         (tic6x_usrregs_info): Forward declare.
5252         (tic6x_read_description): New function, based on ...
5253         (tic6x_arch_setup): ... this.  Reimplement.
5254         (target_regsets): Rename to ...
5255         (tic6x_regsets): ... this, and make static.
5256         (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
5257         (tic6x_regs_info): New function.
5258         (the_low_target): Adjust.
5259         (initialize_low_arch): New function.
5260         * linux-xtensa-low.c (tdesc_xtensa): Declare.
5261         (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
5262         (target_regsets): Rename to ...
5263         (xtensa_regsets): ... this, and make static.
5264         (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
5265         globals.
5266         (xtensa_arch_setup, xtensa_regs_info): New functions.
5267         (the_low_target): Adjust.
5268         (initialize_low_arch): New function.
5269         * linux-nios2-low.c (tdesc_nios2_linux): Declare.
5270         (nios2_arch_setup): Set the current process'es tdesc.
5271         (target_regsets): Rename to ...
5272         (nios2_regsets): ... this.
5273         (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
5274         (nios2_regs_info): New function.
5275         (the_low_target): Adjust.
5276         (initialize_low_arch): New function.
5277         * linux-aarch64-low.c (tdesc_aarch64): Declare.
5278         (aarch64_arch_setup): Set the current process'es tdesc.
5279         (target_regsets): Rename to ...
5280         (aarch64_regsets): ... this.
5281         (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
5282         (aarch64_regs_info): New function.
5283         (the_low_target): Adjust.
5284         (initialize_low_arch): New function.
5285         * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
5286         globals.
5287         (target_regsets): Rename to ...
5288         (tile_regsets): ... this.
5289         (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
5290         (tile_regs_info): New function.
5291         (tile_arch_setup): Set the current process'es tdesc.
5292         (the_low_target): Adjust.
5293         (initialize_low_arch): New function.
5294         * spu-low.c (tdesc_spu): Declare.
5295         (spu_create_inferior, spu_attach): Set the new process'es tdesc.
5296         * win32-arm-low.c (tdesc_arm): Declare.
5297         (arm_arch_setup): New function.
5298         (the_low_target): Install arm_arch_setup instead of
5299         init_registers_arm.
5300         * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
5301         (init_windows_x86): Rename to ...
5302         (i386_arch_setup): ... this.  Set `win32_tdesc'.
5303         (the_low_target): Adjust.
5304         * win32-low.c (win32_tdesc): New global.
5305         (child_add_thread): Don't create the thread cache here.
5306         (do_initial_child_stuff): Set the new process'es tdesc.
5307         * win32-low.h (struct target_desc): Forward declare.
5308         (win32_tdesc): Declare.
5309         * lynx-i386-low.c (tdesc_i386): Declare global.
5310         (lynx_i386_arch_setup): Set `lynx_tdesc'.
5311         * lynx-low.c (lynx_tdesc): New global.
5312         (lynx_add_process): Set the new process'es tdesc.
5313         * lynx-low.h (struct target_desc): Forward declare.
5314         (lynx_tdesc): Declare global.
5315         * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
5316         (lynx_ppc_arch_setup): Set `lynx_tdesc'.
5317         * nto-low.c (nto_tdesc): New global.
5318         (do_attach): Set the new process'es tdesc.
5319         * nto-low.h (struct target_desc): Forward declare.
5320         (nto_tdesc): Declare.
5321         * nto-x86-low.c (tdesc_i386): Declare.
5322         (nto_x86_arch_setup): Set `nto_tdesc'.
5323
5324 2013-06-04  Gary Benson  <gbenson@redhat.com>
5325
5326         * server.c (handle_query): Add "augmented-libraries-svr4-read+"
5327         to qSupported response when appropriate.
5328         (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
5329         with nonzero-length annex.
5330         * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
5331         arguments supplied in annex.
5332
5333 2013-05-31  Doug Evans  <dje@google.com>
5334
5335         PR server/15594
5336         * linux-x86-low.c (ps_get_thread_area): Properly extend address to
5337         64 bits in 64-cross-32 environment.
5338
5339 2013-05-28  Pedro Alves  <palves@redhat.com>
5340
5341         * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
5342         (aarch64-without-fpu.c): Delete rule.
5343         * configure.srv (aarch64*-*-linux*): Remove references to
5344         aarch64-without-fpu.o and aarch64-without-fpu.xml.
5345         * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
5346         declaration.
5347
5348 2013-05-24  Pedro Alves  <palves@redhat.com>
5349
5350         * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
5351         instead of strchr/decode_address.  Error if the range isn't split
5352         with a ','.  Don't assume there's be a ':' in the action.
5353
5354 2013-05-23  Yao Qi  <yao@codesourcery.com>
5355             Pedro Alves  <palves@redhat.com>
5356
5357         * linux-low.c (lwp_in_step_range): New function.
5358         (linux_wait_1): If the thread was range stepping and stopped
5359         outside the stepping range, report the stop to GDB.  Otherwise,
5360         continue stepping.  Add range stepping debug output.
5361         (linux_set_resume_request): Copy the step range from the resume
5362         request to the lwp.
5363         (linux_supports_range_stepping): New.
5364         (linux_target_ops) <supports_range_stepping>: Set to
5365         linux_supports_range_stepping.
5366         * linux-low.h (struct linux_target_ops)
5367         <supports_range_stepping>: New field.
5368         (struct lwp_info) <step_range_start, step_range_end>: New fields.
5369         * linux-x86-low.c (x86_supports_range_stepping): New.
5370         (the_low_target) <supports_range_stepping>: Set to
5371         x86_supports_range_stepping.
5372         * server.c (handle_v_cont): Handle 'r' action.
5373         (handle_v_requests): Append ";r" if the target supports range
5374         stepping.
5375         * target.h (struct thread_resume) <step_range_start,
5376         step_range_end>: New fields.
5377         (struct target_ops) <supports_range_stepping>:
5378         New field.
5379         (target_supports_range_stepping): New macro.
5380
5381 2013-05-17  Joel Brobecker  <brobecker@adacore.com>
5382
5383         * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
5384         confusion in comment.
5385
5386 2013-05-17  Joel Brobecker  <brobecker@adacore.com>
5387
5388         * lynx-low.c (struct process_info_private): New type.
5389         (lynx_add_process): New function.
5390         (lynx_create_inferior, lynx_attach): Replace calls to
5391         add_process by calls to lynx_add_process.
5392         (lynx_resume): If PTID is null, then try using
5393         current_process()->private->last_wait_event_ptid.
5394         Add comments.
5395         (lynx_clear_inferiors): Delete.  The contents of that function
5396         has been inlined in lynx_mourn;
5397         (lynx_wait_1): Save the ptid in the process's private data.
5398         (lynx_mourn): Free the process' private data.  Replace call
5399         to lynx_clear_inferiors by call to clear_inferiors.
5400
5401 2013-05-17  Yao Qi  <yao@codesourcery.com>
5402
5403         * i386-low.c (i386_length_and_rw_bits): Move the comment to
5404         the right place.
5405
5406 2013-05-16  Luis Machado  <lgustavo@codesourcery.com>
5407
5408         * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
5409         PT_DATA_ADDR and PT_TEXT_END_ADDR.  Update comments.
5410         (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
5411         PT_TEXT_END_ADDR guards.  Update comments.
5412         (linux_target_op) <read_offsets>: Conditionally define to
5413         linux_read_offsets if the target is UCLIBC and if it defines
5414         PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
5415
5416 2013-05-06  Sandra Loosemore  <sandra@codesourcery.com>
5417             Andrew Jenner  <andrew@codesourcery.com>
5418
5419         * Makefile.in (SFILES): Add linux-nios2-low.c.
5420         (clean): Add action to delete nios2-linux.c.
5421         (nios2-linux.c): New rule.
5422         * configure.srv: Add nios2*-*-linux*.
5423         * linux-nios2-low.c: New.
5424
5425 2013-05-03  Hafiz Abid Qadeer  <abidh@codesourcery.com>
5426
5427         * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
5428
5429 2013-04-25  Hui Zhu  <hui@codesourcery.com>
5430
5431         PR gdb/15186
5432         * ax.c (ax_printf): Add fflush.
5433
5434 2013-04-22  Tom Tromey  <tromey@redhat.com>
5435
5436         * Makefile.in (SFILES): Add filestuff.c.
5437         (OBS): Add filestuff.o.
5438         (filestuff.o): New target.
5439         * config.in, configure: Rebuild.
5440         * configure.ac: Check for fdwalk, pipe2.
5441
5442 2013-04-17  Pedro Alves  <palves@redhat.com>
5443
5444         * configure.ac (USE_THREAD_DB): Delete variable.
5445         (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
5446         Don't AC_SUBST USE_THREAD_DB.
5447         * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
5448         * config.in, configure: Regenerate.
5449
5450 2013-04-16  Pedro Alves  <palves@redhat.com>
5451
5452         * linux-low.h (struct lwp_info) <thread_known>: Move under
5453         the USE_THREAD_DB #ifdef.
5454
5455 2013-04-16  Pedro Alves  <palves@redhat.com>
5456
5457         * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
5458         (linux-low.o): Delete rule.
5459         * linux-low.h: Always include "gdb_thread_db.h" instead of
5460         conditionally including thread_db.h.
5461         (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
5462         HAVE_THREAD_DB_H.
5463
5464 2013-04-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
5465
5466         * Makefile.in (install-only): Fix make install regression.
5467
5468 2013-04-05  Jan Kratochvil  <jan.kratochvil@redhat.com>
5469
5470         Convert man pages to texinfo, new gdbinit.5 texinfo page.
5471         * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
5472         installation.
5473         * gdbserver.1: Remove.
5474
5475 2013-03-22  Pedro Alves  <palves@redhat.com>
5476
5477         * linux-low.c (handle_extended_wait): Don't call
5478         linux_enable_event_reporting.
5479
5480 2013-03-15  Tony Theodore  <tonyt@logyst.com>
5481
5482         PR build/9098:
5483         * Makefile.in (SHELL): Use @SHELL@.
5484
5485 2013-03-14  Sergio Durigan Junior  <sergiodj@redhat.com>
5486
5487         * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
5488         compiler warning.
5489
5490 2013-03-13  Joel Brobecker  <brobecker@adacore.com>
5491
5492         * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
5493         Remove extraneous NULL element.
5494
5495 2013-03-13  Yao Qi  <yao@codesourcery.com>
5496
5497         * tracepoint.c (traceframe_read_tsv): Look for the last matched
5498         'V' block in trace frame.
5499
5500 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
5501
5502         * target.h (struct target_ops): Add btrace ops.
5503         (target_supports_btrace): New macro.
5504         (target_enable_btrace): New macro.
5505         (target_disable_btrace): New macro.
5506         (target_read_btrace): New macro.
5507         * gdbthread.h (struct thread_info): Add btrace field.
5508         * server.c: Include btrace-common.h.
5509         (handle_btrace_general_set): New function.
5510         (handle_btrace_enable): New function.
5511         (handle_btrace_disable): New function.
5512         (handle_general_set): Call handle_btrace_general_set.
5513         (handle_qxfer_btrace): New function.
5514         (struct qxfer qxfer_packets[]): Add btrace entry.
5515         * inferiors.c (remove_thread): Disable btrace.
5516         * linux-low: Include linux-btrace.h.
5517         (linux_low_enable_btrace): New function.
5518         (linux_low_read_btrace): New function.
5519         (linux_target_ops): Add btrace ops.
5520         * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
5521         Add srv_linux_btrace=yes.
5522         (x86_64-*-linux*): Add linux-btrace.o.
5523         Add srv_linux_btrace=yes.
5524         * configure.ac: Define HAVE_LINUX_BTRACE.
5525         * config.in: Regenerated.
5526         * configure: Regenerated.
5527
5528 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
5529
5530         * server.c (handle_qxfer): Preserve error message if -3 is
5531         returned.
5532         (qxfer): Document the -3 return value.
5533
5534 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
5535
5536         * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
5537         (linux_btrace_h): New variable.
5538         (linux-btrace.o): New rule.
5539
5540 2013-03-08  Stan Shebs  <stan@codesourcery.com>
5541             Hafiz Abid Qadeer  <abidh@codesourcery.com>
5542
5543         * tracepoint.c (trace_buffer_size): New global.
5544         (DEFAULT_TRACE_BUFFER_SIZE): New define.
5545         (init_trace_buffer): Change to one-argument function. Allocate
5546         trace buffer memory.
5547         (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
5548         handle QTBuffer:size packet.
5549         (cmd_bigqtbuffer_size): New function.
5550         (initialize_tracepoint): Call init_trace_buffer with
5551         DEFAULT_TRACE_BUFFER_SIZE.
5552         * server.c (handle_query): Add QTBuffer:size in the
5553         supported packets.
5554
5555 2013-03-07  Yao Qi  <yao@codesourcery.com>
5556
5557         * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5558         (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5559         of -1.
5560         (cmd_qtsp): Adjust condition.  Do post increment.
5561         Set cur_action and cur_step_action back to 0.
5562
5563 2013-03-07  Jeremy Bennett  <jeremy.bennett@embecosm.com>
5564
5565         PR server/15236
5566         * linux-low.c (linux_write_memory): Return early success if LEN is
5567         zero.
5568
5569 2013-03-05  Corinna Vinschen  <vinschen@redhat.de>
5570
5571         * configure.srv: Add x86_64-*-cygwin* as target.
5572
5573 2013-02-28  Tom Tromey  <tromey@redhat.com>
5574
5575         * configure.ac: Invoke AC_SYS_LARGEFILE.
5576         * configure, config.in: Rebuild.
5577
5578 2013-02-28  Corinna Vinschen  <vinschen@redhat.com>
5579
5580         * win32-low.c: Throughout, fix format strings and casts of
5581         printf-like functions to avoid type related warnings on all
5582         platforms.
5583         (get_child_debug_event): Print dwDebugEventCode as hex since
5584         that's how it's usually documented.
5585
5586 2013-02-28  Yao Qi  <yao@codesourcery.com>
5587
5588         * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5589         pulongest.
5590
5591 2013-02-27  Jiong Wang  <jiwang@tilera.com>
5592
5593         * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5594         (reg-tilegx32.c): New rule.
5595         * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5596         * linux-tile-low.c (tile_arch_setup): New function.  Invoke
5597         different register info initializer according to elf class.
5598         (init_registers_tilgx32): New function.  The tilegx32 register info
5599         initializer.
5600         (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5601         (tile_store_gregset): Likewise.
5602
5603 2013-02-27  Yao Qi  <yao@codesourcery.com>
5604
5605         * server.c (process_point_options): Print debug message when
5606         debug_threads is true.
5607
5608 2013-02-26  Yao Qi  <yao@codesourcery.com>
5609
5610         * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5611
5612 2013-02-19  Pedro Alves  <palves@redhat.com>
5613             Kai Tietz <ktietz@redhat.com>
5614
5615         PR gdb/15161
5616
5617         * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5618         instead of strtoul to extract address from packet.
5619         (process_serial_event) <'z'>: Likewise.
5620
5621 2013-02-18  Yao Qi  <yao@codesourcery.com>
5622
5623         * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5624
5625 2013-02-14  Pedro Alves  <palves@redhat.com>
5626
5627         Plug memory leak.
5628
5629         * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5630         TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5631
5632 2013-02-14  Pedro Alves  <palves@redhat.com>
5633
5634         * tracepoint.c (cmd_qtdpsrc): Use savestring.
5635
5636 2013-02-14  Pedro Alves  <palves@redhat.com>
5637
5638         * tracepoint.c (save_string): Delete.
5639         (add_tracepoint_action): Use savestring instead of save_string.
5640
5641 2013-02-12  Pedro Alves  <palves@redhat.com>
5642
5643         * linux-xtensa-low.c: Ditto.
5644         * xtensa-xtregs.c: Ditto.
5645
5646 2013-02-12  Sanimir Agovic  <sanimir.agovic@intel.com>
5647
5648         * thread-db.c (thread_db_get_tls_address): NULL pointer check
5649         thread_db.
5650
5651 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
5652
5653         * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5654         aarch64_num_wp_regs and aarch64_num_bp_regs to
5655         AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5656
5657 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
5658
5659         * linux-aarch64-low.c (ps_get_thread_area): Replace
5660         PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5661
5662 2013-02-04  Jim MacArthur  <jim.macarthur@arm.com>
5663             Marcus Shawcroft  <marcus.shawcroft@arm.com>
5664             Nigel Stephens  <nigel.stephens@arm.com>
5665             Yufeng Zhang  <yufeng.zhang@arm.com>
5666
5667         * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5668         (aarch64.c, aarch64-without-fpu.c): New targets.
5669         * configure.srv (aarch64*-*-linux*): New.
5670         * linux-aarch64-low.c: New file.
5671
5672 2013-02-04  Marcus Shawcroft  <marcus.shawcroft@arm.com>
5673
5674         * linux-low.c (handle_extended_wait, linux_create_inferior)
5675         (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5676         (dequeue_one_deferred_signal, linux_resume_one_thread)
5677         (fetch_register, linux_write_memory, linux_enable_event_reporting)
5678         (linux_tracefork_grandchild, linux_test_for_tracefork)
5679         (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5680         PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5681         where the argument is 0.
5682
5683 2013-01-25  Yao Qi  <yao@codesourcery.com>
5684
5685         * event-loop.c: Include "queue.h".
5686         (gdb_event_p): New typedef.
5687         (struct gdb_event) <next_event>: Remove.
5688         (event_queue): Change to QUEUE(gdb_event_p).
5689         (async_queue_event): Remove.
5690         (gdb_event_xfree): New.
5691         (initialize_event_loop): New.
5692         (process_event): Use API from QUEUE.
5693         (wait_for_event): Likewise.
5694         * server.c (main): Call initialize_event_loop.
5695         * server.h (initialize_event_loop): Declare.
5696
5697 2013-01-18  Yao Qi  <yao@codesourcery.com>
5698
5699         * ax.h (struct eval_agent_expr_context): New.
5700         (gdb_eval_agent_expr): Update declaration.
5701         * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5702         TFRAME.  Add new argument CTX.
5703         * server.h (struct eval_agent_expr_context): Declare.
5704         (agent_mem_read, agent_tsv_read): Update declaration.
5705         (agent_mem_read_string): Likewise.
5706         * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5707         (add_traceframe_block): Add new argument TPOINT.
5708         Increase TPOINT->traceframe_usage.
5709         (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5710         eval_tracepoint_agent_expr.
5711         (condition_true_at_tracepoint): Likewise.
5712         (agent_mem_read): Remove argument TFRAME.  Add argument CTX.
5713         (agent_mem_read_string, agent_tsv_read): Likewise.
5714
5715 2013-01-16  Yao Qi  <yao@codesourcery.com>
5716
5717         * linux-low.c (linux_resume_one_lwp): Don't check
5718         'lwp->bp_reinsert != 0'.
5719
5720 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
5721             Pedro Alves  <palves@redhat.com>
5722
5723         * lynx-low.c (ptrace_request_to_str): Define a temporary
5724         macro and use it to simplify this function's implementation.
5725
5726 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
5727
5728         * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5729         sets errno.
5730
5731 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
5732
5733         * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5734
5735 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
5736
5737         * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5738
5739 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
5740
5741         * lynx-low.c (lynx_resume): Use the resume_info parameter
5742         to determine the ptid for the lynx_ptrace call, unless
5743         it is equal to minus_one_ptid, in which case we use the
5744         ptid of the current_inferior.
5745         (lynx_wait_1): After having received a thread create/exit
5746         event, resume the inferior's execution using the signaling
5747         thread's ptid, rather than the old ptid.
5748
5749 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
5750
5751         * lynx-low.c (lynx_resume): Delete variable ret.
5752
5753 2013-01-01  Joel Brobecker  <brobecker@adacore.com>
5754
5755         * gdbreplay.c (gdbreplay_version): Update copyright year.
5756         * server.c (gdbserver_version): Likewise.
5757
5758 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
5759
5760         * lynx-low.c (lynx_wait_1): Add debug trace before adding
5761         new thread.
5762
5763 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
5764
5765         * lynx-low.c (ptrace_request_to_str): Add handling for
5766         PTRACE_GETTRACESIG.
5767
5768 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
5769
5770         * lynx-low.c (lynx_attach): Delete variable new_process.
5771
5772 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
5773
5774         * lynx-low.c (lynx_create_inferior): Delete variable
5775         new_process.
5776
5777 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
5778
5779         * lynx-low.c (ptrace_request_to_str): Do not handle
5780         PTRACE_GETTHREADLIST if this macro does not exist.
5781
5782 2012-12-15  Yao Qi  <yao@codesourcery.com>
5783
5784         * Makefile.in (OBS): Add notif.o.
5785         * notif.c, notif.h: New.
5786         * server.c: Include "notif.h".
5787         (struct vstop_notif) <next>: Remove.
5788         <base>: New field.
5789         (queue_stop_reply): Update.
5790         (push_event, send_next_stop_reply): Remove.
5791         (discard_queued_stop_replies): Update.
5792         (notif_stop): New variable.
5793         (handle_v_stopped): Remove.
5794         (handle_v_requests): Don't call handle_v_stopped.  Call
5795         handle_ack_notif instead.
5796         (queue_stop_reply_callback): Call notif_event_enque instead
5797         of queue_stop_reply.
5798         (handle_status): Don't call send_next_stop_reply, call
5799         notif_write_event instead.
5800         (kill_inferior_callback): Likewise.
5801         (detach_or_kill_inferior_callback): Likewise.
5802         (main): Call initialize_notif.
5803         (process_serial_event): Call QUEUE_is_empty.
5804         (handle_target_event): Call notif_push instead of push event.
5805         * server.h (push_event): Remove declaration.
5806
5807 2012-12-10  Tom Tromey  <tromey@redhat.com>
5808
5809         * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5810         (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5811         macros.
5812         (.c.o): Rewrite.
5813         (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5814         (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5815         (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5816         (amd64-linux-ipa.o, ax.o): Rewrite.
5817         (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5818         (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5819         (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5820         (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5821         (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5822         (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5823         (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5824         (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5825         (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5826         (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5827         (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5828         (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5829         (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5830         (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5831         (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5832         (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5833         (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5834         (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5835         (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5836         (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5837         (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5838         (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5839         (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5840         (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5841         (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5842         (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5843         (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5844         (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5845         (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5846         (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5847         (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5848         (reg-tilegx.o): Remove.
5849         (all_object_files): New macro.
5850         Include .deps files.
5851         * aclocal.m4, configure: Rebuild.
5852         * acinclude.m4: Include depstand.m4, lead-dot.m4.
5853         * configure.ac: Invoke ZW_CREATE_DEPDIR,
5854         ZW_PROG_COMPILER_DEPENDENCIES.  Compute GMAKE condition.
5855
5856 2012-12-05  Tom Tromey  <tromey@redhat.com>
5857
5858         PR gdb/14917:
5859         * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5860
5861 2012-11-28  Markus Metzger  <markus.t.metzger@intel.com>
5862
5863         * configure.ac: Check for linux/perf_event.h.
5864         * config.in: Regenerated.
5865         * configure: Regenerated.
5866
5867 2012-11-26  Maxime Villard  <rustyBSD@gmx.fr>
5868
5869         * hostio.c (handle_readlink): Decrease buffer size
5870         parameter passed to readlink by one byte.
5871
5872 2012-11-26  Yao Qi  <yao@codesourcery.com>
5873
5874         * configure.ac (build_warnings): Append '-Wempty-body'.
5875         * configure: Regenerated.
5876         * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5877         body.
5878
5879 2012-11-15  Pierre Muller  <muller@sourceware.org>
5880
5881         * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5882         * config.in: Regenerate.
5883         * configure: Regenerate.
5884         * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5885         Use "gdb_wait.h" header instead of <sys/wait.h> header.
5886         * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5887         * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5888         header.
5889         * server.c: Remove HAVE_WAIT_H conditional.  Use "gdb_wait.h" header
5890         instead of <sys/wait.h> header.
5891         * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5892
5893 2012-11-13 Markus Metzger  <markus.t.metzger@intel.com>
5894
5895         * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5896         (various make rules): Remove -DGDBSERVER
5897
5898 2012-11-09  Yao Qi  <yao@codesourcery.com>
5899
5900         * spu-low.c (current_ptid): Move it to ..
5901         * gdbthread.h: ... here.  New.
5902         * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5903         * server.c (myresume, process_serial_event): Likewise.
5904         * thread-db.c (thread_db_find_new_threads): Likewise.
5905         * tracepoint.c (run_inferior_command): Likewise.
5906
5907 2012-10-01  Andrew Burgess  <aburgess@broadcom.com>
5908
5909         * server.c (handle_search_memory_1): Include access length in
5910         warning message.
5911
5912 2012-09-05  Michael Brandt  <michael.brandt@axis.com>
5913
5914         * linux-crisv32-low.c: Fix compile errors.
5915
5916 2012-09-04  Yao Qi  <yao@codesourcery.com>
5917
5918         * tracepoint.c (cmd_qtsv): Adjust debug message.
5919         Don't check CUR_TPOINT.
5920
5921 2012-08-28  Yao Qi  <yao@codesourcery.com>
5922
5923         * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5924         * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5925         (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5926         Remove declarations of xmalloc, xreallloc, xstrdup and
5927         freeargv.
5928         * Makefile.in (libiberty_h): New.
5929         (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5930         (linux-bfin-low.o): Append dependency 'libiberty.h'.
5931
5932 2012-08-23  Yao Qi  <yao@codesourcery.com>
5933
5934         * server.h: Remove declaration of 'xsnprintf'.
5935
5936 2012-08-22  Keith Seitz  <keiths@redhat.com>
5937
5938         * server.h: Include build-gnulib-gbserver/config.h.
5939         * gdbreplay.c: Likewise.
5940
5941 2012-08-08  Doug Evans  <dje@google.com>
5942
5943         * Makefile.in (SFILES): Add gdb_vecs.c.
5944         (OBS): Add gdb_vecs.o.
5945         (gdb_vecs_h, host_defs_h): New variables.
5946         (thread-db.o): Add $(gdb_vecs_h) dependency.
5947         (gdb_vecs.o): New rule.
5948         * thread-db.c: #include "gdb_vecs.h".
5949         (thread_db_load_search): Use a vector to iterate over path elements.
5950         Handle text appearing after "$pdir".
5951
5952         * configure.ac: Add check for strstr.
5953         * config.in: Regenerate.
5954         * configure: Regenerate.
5955
5956 2012-08-02  Ulrich Weigand  <ulrich.weigand@linaro.org>
5957
5958         * hostio.c (handle_pread): If pread fails, fall back to attempting
5959         lseek/read.
5960         (handle_pwrite): Likewise for pwrite.
5961
5962 2012-08-01  Ulrich Weigand  <ulrich.weigand@linaro.org>
5963
5964         * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5965         between unsupported TYPE and unimplementable ADDR/LEN combination.
5966         (arm_insert_point): Act on new return value.
5967
5968 2012-07-31  Pedro Alves  <palves@redhat.com>
5969
5970         * server.c (process_point_options): Only skip tokens if we find
5971         one that is unrecognized.  Don't treat 'X' specially while
5972         skipping unrecognized tokens.
5973
5974 2012-07-30  Ulrich Weigand  <ulrich.weigand@linaro.org>
5975
5976         * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5977         to 4-byte-align HW breakpoint addresses for Thumb.
5978
5979 2012-07-27  Yao Qi  <yao@codesourcery.com>
5980
5981         PR remote/14161.
5982
5983         * server.h: Declare gdb_agent_about_to_close.
5984         * target.c (kill_inferior): Include "agent.h".
5985         New.  Send command 'kill'.
5986         * target.h (kill_inferior): Removed macro.
5987         * tracepoint.c (gdb_agent_about_to_close): New.
5988         (gdb_agent_helper_thread): Handle command 'close'.
5989         Wait endlessly until the inferior stops.
5990         Install gdb_agent_remove_socket to atexit hook.
5991         (agent_socket_name): New static variable.
5992         (gdb_agent_socket_init): Replace local variable 'name' with
5993         'agent_socket_name'.
5994         (gdb_agent_remove_socket): New.
5995
5996 2012-07-27  Yao Qi  <yao@codesourcery.com>
5997
5998         * server.c (process_point_options): Stop at 'X' when parsing.
5999
6000 2012-07-19  Michael Eager  <eager@eagercon.com>
6001
6002         * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
6003         to hw_execute.
6004         * linux-x86-low.c (x86_insert_point, x86_remove_point):
6005         Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
6006         hardware breakpoint.
6007
6008 2012-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
6009
6010         * gdbserver/linux-low.c (initialize_low): Call
6011         linux_ptrace_init_warnings.
6012
6013 2012-07-02  Doug Evans  <dje@google.com>
6014
6015         * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
6016         pointer to int.
6017
6018 2012-07-02  Stan Shebs  <stan@codesourcery.com>
6019
6020         * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
6021         (ax.o): Add it to build rule.
6022         (ax-ipa.o): Ditto.
6023         (OBS): Add format.o.
6024         (IPA_OBS): Add format.o.
6025         * server.c (handle_query): Claim support for breakpoint commands.
6026         (process_point_options): Add command case.
6027         (process_serial_event): Leave running if there are printfs in
6028         effect.
6029         * mem-break.h (any_persistent_commands): Declare.
6030         (add_breakpoint_commands): Declare.
6031         (gdb_no_commands_at_breakpoint): Declare.
6032         (run_breakpoint_commands): Declare.
6033         * mem-break.c (struct point_command_list): New struct.
6034         (struct breakpoint): New field command_list.
6035         (any_persistent_commands): New function.
6036         (add_commands_to_breakpoint): New function.
6037         (add_breakpoint_commands): New function.
6038         (gdb_no_commands_at_breakpoint): New function.
6039         (run_breakpoint_commands): New function.
6040         * linux-low.c (linux_wait_1): Test for and run breakpoint commands
6041         locally.
6042         * ax.c: Include format.h.
6043         (ax_printf): New function.
6044         (gdb_eval_agent_expr): Add printf opcode.
6045
6046 2012-06-13  Yao Qi  <yao@codesourcery.com>
6047
6048         * server.c (start_inferior): Remove duplicated writes to fields
6049         'last_resume_kind' and 'last_status' of 'current_inferior'.
6050
6051 2012-06-12  Yao Qi  <yao@codesourcery.com>
6052             Pedro Alves  <palves@redhat.com>
6053
6054         * linux-low.c (linux_set_resume_request): Simplify predicate.  Add
6055         comment.
6056         * server.c (handle_v_cont): Extend comment.
6057
6058 2012-06-11  Yao Qi  <yao@codesourcery.com>
6059
6060         * linux-low.c (linux_attach): Add 'static'.
6061
6062 2012-06-06  Yao Qi  <yao@codesourcery.com>
6063
6064         * ax.c (gdb_eval_agent_expr): Print `top' in hex.
6065
6066 2012-06-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
6067
6068         Fix gcc -flto compilation warning.
6069         * server.c (main): Make variable multi_mode and attach volatile.
6070
6071 2012-05-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
6072
6073         * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
6074         if the platform doesn't know about it.
6075
6076 2012-05-30  Jeff Kenton  <jkenton@tilera.com>
6077
6078         * Makefile.in (SFILES): Add linux-tile-low.c.
6079         (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
6080         * configure.srv: Handle tilegx-*-linux*.
6081         * linux-tile-low.c: New file.
6082
6083 2012-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
6084
6085         * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
6086
6087 2012-05-24  Pedro Alves  <palves@redhat.com>
6088
6089         PR gdb/7205
6090
6091         Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
6092
6093 2012-05-24  Pedro Alves  <palves@redhat.com>
6094
6095         PR gdb/7205
6096
6097         Replace target_signal with gdb_signal throughout.
6098
6099 2012-05-22  Maciej W. Rozycki  <macro@codesourcery.com>
6100
6101         * linux-low.c (linux_store_registers): Avoid the copying sequence
6102         when no data has been retrieved by ptrace.
6103
6104 2012-05-22  Will Deacon  <will.deacon@arm.com>
6105
6106         * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
6107         Include asm/ptrace.h.
6108         (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
6109         already defined.
6110
6111 2012-05-21  Maciej W. Rozycki  <macro@codesourcery.com>
6112
6113         * linux-low.c (linux_store_registers): Don't re-retrieve data
6114         with ptrace that has already been obtained from /proc.  Always
6115         copy any data retrieved with ptrace to the buffer supplied.
6116
6117 2012-05-11  Yao Qi  <yao@codesourcery.com>
6118             Pedro Alves  <palves@redhat.com>
6119
6120         * linux-low.c (enum stopping_threads_kind): New.
6121         (stopping_threads): Change type to `enum stopping_threads_kind'.
6122         (handle_extended_wait): If stopping and suspending threads, leave
6123         the new_lwp suspended too.
6124         (linux_wait_for_event): Adjust.
6125         (stop_all_lwps): Set `stopping_threads' to
6126         STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
6127         whether we're suspending threads or just stopping them.  Assert no
6128         recursion happens.
6129
6130 2012-04-29  Yao Qi  <yao@codesourcery.com>
6131
6132         * server.h: Move some code to ...
6133         * gdbthread.h: ... here.  New.
6134         * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
6135         (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
6136         (nto-low.o, win32-low.o): Likewise.
6137         * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
6138         * regcache.c, remote-utils.c, server.c: Likewise.
6139         * target.c, tracepoint.c, win32-low.c: Likewise.
6140
6141 2012-04-24  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
6142
6143         * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
6144         (PTRACE_ARG4_TYPE): Likewise.
6145         (PTRACE_XFER_TYPE): Likewise.
6146         * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
6147         ptrace to PTRACE_ARG3_TYPE.
6148         * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
6149         (PTRACE_ARG4_TYPE): Likewise.
6150         (PTRACE_XFER_TYPE): Likewise.
6151         (linux_detach_one_lwp): Cast fourth argument of
6152         ptrace to long then PTRACE_ARG4_TYPE.
6153         (regsets_fetch_inferior_registers): Cast third argument of
6154         ptrace to long then PTRACE_ARG3_TYPE.
6155         (regsets_store_inferior_registers): Likewise.
6156
6157 2012-04-20  Pedro Alves  <palves@redhat.com>
6158
6159         * configure: Regenerate.
6160
6161 2012-04-19  Pedro Alves  <palves@redhat.com>
6162
6163         * Makefile.in (GNULIB_BUILDDIR): New.
6164         (LIBGNU, INCGNU, GNULIB_H): Adjust.
6165         (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
6166         (all, install-only, uninstall, clean-info, all-lib, clean): No
6167         longer pass GNULIB_FLAGS_TO_PASS.  Use subdir_do.
6168         (maintainer-clean realclean distclean): Use subdir_do.
6169         (subdir_do): New.
6170         (gnulib/import/Makefile): Adjust.  Replace gnulib/import with
6171         $(GNULIB_BUILDDIR).  Don't pass argument to config.status.
6172         * acinclude.m4: Include acx_configure_dir.m4.
6173         * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
6174         calls.  Call AC_PROG_RANLIB.  Configure gnulib using
6175         ACX_CONFIGURE_DIR.
6176         (GNULIB): New.
6177         (GNULIB_STDINT_H): Adjust.
6178         (AC_OUTPUT): Don't output gnulib/Makefile anymore.
6179         * gdbreplay.c: Include build-gnulib/config.h.
6180         * server.h: Likewise.
6181         * aclocal.m4: Regenerate.
6182         * config.in: Regenerate.
6183         * configure: Regenerate.
6184
6185 2012-04-19  Pedro Alves  <palves@redhat.com>
6186
6187         * Makefile.in (LIBGNU, INCGNU): Adjust.
6188         (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
6189         (all, install-only, uninstall, clean-info, all-lib, clean)
6190         (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
6191         * configure.ac: Adjust AC_OUTPUT output.
6192         * aclocal.m4: Regenerate.
6193         * configure: Regenerate.
6194
6195 2012-04-19  Pedro Alves  <palves@redhat.com>
6196
6197         * Makefile.in (generated_files): New.
6198         (server_h): Remove the explicit dependency on config.h, and depend
6199         on $generated_files.
6200
6201 2012-04-19  Pedro Alves  <palves@redhat.com>
6202
6203         * Makefile.in (INCGNU): Add -Ignulib.
6204
6205 2012-04-19  Pedro Alves  <palves@redhat.com>
6206
6207         * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
6208         (INCGNU): ... this, and spell out -I here.
6209         (GNULIB_LIB): Rename to ...
6210         (LIBGNU): ... this.
6211         (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
6212
6213 2012-04-19  Pedro Alves  <palves@redhat.com>
6214
6215         * config.in: Regenerate.
6216
6217 2012-04-19  Pedro Alves  <palves@redhat.com>
6218
6219         * configure.ac: Remove AC_CHECK_DECLS check for memmem.
6220         * server.h (memmem): Remove declaration.
6221         * config.in: Regenerate.
6222         * configure: Regenerate.
6223
6224 2012-04-19  Yao Qi  <yao@codesourcery.com>
6225
6226         * Makefile.in (SFILES): Add common/vec.c.
6227         (OBS): Add vec.o.
6228         (vec.o): New rule.
6229
6230 2012-04-19  Yao Qi  <yao@codesourcery.com>
6231
6232         * remote-utils.c (prepare_resume_reply): Replace with macro
6233         target_core_of_thread.
6234         * server.c (handle_qxfer_threads_proper): Likewise.
6235         * target.h (traget_core_of_thread): New macro.
6236
6237 2012-04-18  Pedro Alves  <palves@redhat.com>
6238
6239         * aclocal.m4: Regenerate.
6240         * configure: Regenerate.
6241
6242 2012-04-16  Yao Qi  <yao@codesourcery.com>
6243
6244         * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
6245         duplicated on address.
6246
6247 2012-04-16  Yao Qi  <yao@codesourcery.com>
6248
6249         * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
6250         (struct tracepoint_action_ops) <send>: New field.
6251         (m_tracepoint_action_send, r_tracepoint_action_send): New.
6252         (agent_expr_send, x_tracepoint_action_send): New.
6253         (l_tracepoint_action_send): New.
6254         (cmd_qtdp): Download and install tracepoint
6255         according to `use_agent'.
6256         (run_inferior_command): Add one more parameter `len'.
6257         Update callers.
6258         (tracepoint_send_agent): New.
6259         (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
6260
6261 2012-04-16  Yao Qi  <yao@codesourcery.com>
6262
6263         * tracepoint.c (download_tracepoints): Moved to ...
6264         (cmd_qtstart): ... here.
6265
6266 2012-04-14  Yao Qi  <yao@codesourcery.com>
6267
6268         * tracepoint.c: Include inttypes.h.
6269         (struct collect_memory_action): Use sized types.
6270         (struct tracepoint): Likewise.
6271         (cmd_qtdp, stop_tracing): Update print specifiers.
6272         (cmd_qtp, response_tracepoint): Likewise.
6273         (collect_data_at_tracepoint): Likewise.
6274         (collect_data_at_step): Likewise.
6275
6276 2012-04-14  Yao Qi  <yao@codesourcery.com>
6277
6278         Import gnulib module inttypes.
6279         * aclocal.m4, config.in, configure: Regenerated.
6280
6281 2012-04-14  Yao Qi  <yao@codesourcery.com>
6282
6283         * Makefile.in (maintainer-clean, realclean, distclean): Remove
6284         Makefile and config.status at last.
6285
6286 2012-04-13  Yao Qi  <yao@codesourcery.com>
6287
6288         * tracepoint.c: Include stdint.h unconditionally.
6289
6290 2012-04-13  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
6291
6292         * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
6293         on BFD_HAVE_SYS_PROCFS_TYPE.
6294         * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
6295         * configure: Regenerate.
6296         * config.in: Likewise.
6297
6298 2012-04-13  H.J. Lu  <hongjiu.lu@intel.com>
6299
6300         * Makefile.in (clean): Also remove x32.c x32-linux.c
6301         x32-avx.c x32-avx-linux.c.
6302         (x32.o): New target.
6303         (x32.c): Likewise.
6304         (x32-linux.o): Likewise.
6305         (x32-linux.c): Likewise.
6306         (x32-avx.o): Likewise.
6307         (x32-avx.c): Likewise.
6308         (x32-avx-linux.o): Likewise.
6309         (x32-avx-linux.c): Likewise.
6310
6311         * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
6312         (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
6313         (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
6314         (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
6315         (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
6316         i386/x32-avx-linux.xml.
6317
6318         * linux-x86-low.c (init_registers_x32_linux): New prototype.
6319         (init_registers_x32_avx_linux): Likwise.
6320         (x86_linux_update_xmltarget): Call init_registers_x32_linux
6321         or init_registers_x32_avx_linux if linux_is_elf64 is false.
6322
6323 2012-04-13  Pedro Alves  <palves@redhat.com>
6324
6325         * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
6326         (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
6327         (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
6328         (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
6329         the sub-make.
6330
6331 2012-04-12  H.J. Lu  <hongjiu.lu@intel.com>
6332
6333         * linux-x86-low.c (compat_x32_clock_t): New.
6334         (compat_x32_siginfo_t): Likewise.
6335         (compat_x32_siginfo_from_siginfo): Likewise.
6336         (siginfo_from_compat_x32_siginfo): Likewise.
6337         (linux_is_elf64): Likewise.
6338         (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
6339         and siginfo_from_compat_x32_siginfo for x32.
6340         (x86_arch_setup): Set linux_is_elf64.
6341
6342 2012-04-12  H.J. Lu  <hongjiu.lu@intel.com>
6343
6344         PR gdb/13969
6345         * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
6346         e_machine field.
6347         (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
6348         * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
6349         * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
6350         compatible with process.
6351
6352 2012-04-12  Yao Qi  <yao@codesourcery.com>
6353
6354         * Makefile.in: Define abs_top_srcdir and abs_srcdir.
6355         (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
6356         (install-only, install-info, clean): Handle sub dir gnulib.
6357         (all-lib, am--refresh): New targets.
6358         (memmem.o): Remove target.
6359         * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
6360         Invoke gl_EARLY.  Invoke AC_CHECK_PROGS for make.
6361         (AC_REPLACE_FUNCS): Remove memmem.
6362         Invoke gl_INIT and AM_INIT_AUTOMAKE.
6363         (AC_OUTPUT): Generate Makefile in gnulib/.
6364         * aclocal.m4, config.in, configure: Regenerated.
6365
6366 2012-04-10  Maciej W. Rozycki  <macro@codesourcery.com>
6367
6368         * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
6369
6370 2012-04-05  Pedro Alves  <palves@redhat.com>
6371
6372         -Werror=strict-aliasing
6373
6374         * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
6375         pointer.
6376
6377 2012-04-04  Pedro Alves  <palves@redhat.com>
6378
6379         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6380         (sparc_store_gregset_from_stack, sparc_store_gregset)
6381         (sparc_breakpoint_at): Fix formatting.
6382
6383 2012-03-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
6384
6385         * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
6386         are available.
6387         * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
6388         [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
6389         * config.in: Regenerate.
6390         * configure: Likewise.
6391
6392 2012-03-29  Pedro Alves  <palves@redhat.com>
6393
6394         * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
6395         Correct ptrace arguments.
6396
6397 2012-03-28  Pedro Alves  <palves@redhat.com>
6398
6399         * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
6400         (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
6401         (IA64_FR1_REGNUM): New defines.
6402         (ia64_fetch_register): New.
6403         (the_low_target): Install it.
6404         * linux-low.h (struct linux_target_ops) <fetch_register>: New
6405         field.
6406         * linux-low.c (linux_fetch_registers): Try the
6407         the_low_target.fetch_register hook first.
6408
6409         * linux-arm-low.c (the_low_target): Adjust.
6410         * linux-bfin-low.c (the_low_target): Adjust.
6411         * linux-cris-low.c (the_low_target): Adjust.
6412         * linux-crisv32-low.c (the_low_target): Adjust.
6413         * linux-m32r-low.c (the_low_target): Adjust.
6414         * linux-m68k-low.c (the_low_target): Adjust.
6415         * linux-mips-low.c (the_low_target): Adjust.
6416         * linux-ppc-low.c (the_low_target): Adjust.
6417         * linux-s390-low.c (the_low_target): Adjust.
6418         * linux-sh-low.c (the_low_target): Adjust.
6419         * linux-sparc-low.c (the_low_target): Adjust.
6420         * linux-tic6x-low.c (the_low_target): Adjust.
6421         * linux-x86-low.c (the_low_target): Adjust.
6422         * linux-xtensa-low.c (the_low_target): Adjust.
6423
6424 2012-03-26  Pedro Alves  <palves@redhat.com>
6425
6426         * server.c (handle_qxfer_libraries): Don't bail early if
6427         the_target->qxfer_libraries_svr4 is not NULL.
6428
6429 2012-03-26  Pedro Alves  <palves@redhat.com>
6430
6431         * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
6432
6433 2012-03-23  Pedro Alves  <palves@redhat.com>
6434
6435         * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
6436         "library-list-svr4" element's start tag when the the DSO list is
6437         empty.
6438
6439 2012-03-23  Pedro Alves  <palves@redhat.com>
6440
6441         * linux-low.c (read_one_ptr): Read the inferior's pointer through
6442         a variable whose type size is the same as the inferior's pointer
6443         size.
6444
6445 2012-03-21  Thomas Schwinge  <thomas@codesourcery.com>
6446
6447         * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
6448         struct siginfo.
6449         * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
6450         * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6451         * linux-low.h: Include <signal.h>.
6452         (struct siginfo): Remove forward declaration.
6453         (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
6454         struct siginfo.
6455
6456 2012-03-21  Mike Frysinger  <vapier@gentoo.org>
6457
6458         * .gitignore: Ignore more files.
6459
6460 2012-03-19  Pedro Alves  <palves@redhat.com>
6461             Jan Kratochvil  <jan.kratochvil@redhat.com>
6462
6463         * server.c (cont_thread, general_thread): Add describing comments.
6464         (start_inferior): Clear `cont_thread'.
6465         (handle_v_cont): Don't set `cont_thread' if resuming all threads
6466         of a process.
6467
6468 2012-03-15  Yao Qi  <yao@codesourcery.com>
6469
6470         * tracepoint.c (install_tracepoint): Move duplicated tracepoint
6471         handling to ...
6472         (cmd_qtdp): ... here.
6473
6474 2012-03-15  Yao Qi  <yao@codesourcery.com>
6475
6476         * tracepoint.c (struct tracepoint_action_ops): New.
6477         (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
6478         (m_tracepoint_action_download): New.
6479         (r_tracepoint_action_download): New.
6480         (x_tracepoint_action_download): New.
6481         (l_tracepoint_action_download): New.
6482         (add_tracepoint_action): Install `action->ops' according type.
6483         (download_tracepoint_1): Move code `download' function pointer
6484         of various tracepoint_action_ops.
6485
6486 2012-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
6487
6488         * linux-low.c (linux_attach_lwp_1): New variable buffer.  Call
6489         linux_ptrace_attach_warnings.
6490
6491 2012-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
6492
6493         * Makefile.in (linux-ptrace.o): New.
6494         * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
6495         (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
6496         (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
6497         (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
6498         (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
6499         of these targets.
6500         * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
6501
6502 2012-03-08  Yao Qi  <yao@codesourcery.com>
6503             Pedro Alves  <palves@redhat.com>
6504
6505         Fix PR server/13392.
6506         * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
6507         offset of JMP insn.
6508         * tracepoint.c (remove_tracepoint): New.
6509         (cmd_qtdp): Call remove_tracepoint when failed to install.
6510
6511 2012-03-07  Pedro Alves  <palves@redhat.com>
6512
6513         * linux-low.c (get_detach_signal): New.
6514         (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
6515         Pass on pending signals to PTRACE_DETACH.  Check the result of the
6516         ptrace call.
6517         * server.c (program_signals, program_signals_p): New.
6518         (handle_general_set): Handle QProgramSignals.
6519         * server.h (program_signals, program_signals_p): Declare.
6520
6521 2012-03-05  Pedro Alves  <palves@redhat.com>
6522             Jan Kratochvil  <jan.kratochvil@redhat.com>
6523
6524         * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
6525         New comment why.
6526
6527 2012-03-03  Yao Qi  <yao@codesourcery.com>
6528
6529         * tracepoint.c (tracepoint_look_up_symbols): Update call to
6530         agent_look_up_symbols.
6531
6532 2012-03-03  Yao Qi  <yao@codesourcery.com>
6533
6534         * Makefile.in (linux-low.o): Keep dependence on agent.h.
6535         (linux-x86-low.o): Likewise.
6536         * server.h: Remove in_process_agent_loaded.
6537         * tracepoint.c (in_process_agent_loaded): Removed.  Moved it
6538         common/agent.c.
6539         Update callers.
6540
6541 2012-03-03  Yao Qi  <yao@codesourcery.com>
6542
6543         * tracepoint.c (gdb_agent_capability): New global.
6544         (in_process_agent_loaded_ust): Renamed to
6545         `in_process_agent_supports_ust'.
6546         Update callers.
6547         (in_process_agent_supports_ust): Call agent_capability_check.
6548         (clear_installed_tracepoints): Assert that agent supports
6549         agent.
6550
6551 2012-03-03  Yao Qi  <yao@codesourcery.com>
6552
6553         * linux-low.c (linux_supports_agent): New.
6554         (linux_target_ops): Initialize field `supports_agent' with
6555         linux_supports_agent.
6556         * target.h (struct target_ops) <supports_agent>: New.
6557         (target_supports_agent): New macro.
6558         * server.c (handle_general_set): Handle packet 'QAgent'.
6559         (handle_query): Send `QAgent+'.
6560         * Makefile.in (server.o): Depends on agent.h.
6561
6562 2012-03-03  Yao Qi  <yao@codesourcery.com>
6563
6564         * Makefile.in (OBS): Add agent.o.
6565         Add new rule for agent.o.
6566         Track dependence of tracepoint.c on agent.h.
6567         * tracepoint.c (run_inferior_command_1):
6568         (run_inferior_command): Call agent_run_command.
6569         (gdb_ust_connect_sync_socket): Deleted.  Move it to
6570         common/agent.c.
6571         (resume_thread, stop_thread): Likewise.
6572         (gdb_ust_socket_init): Renamed to ...
6573         (gdb_agent_socket_init): ... New.
6574         (gdb_ust_thread): Renamed to ...
6575         (gdb_agent_helper_thread): ... New.
6576         (gdb_ust_init): Move some code to ...
6577         (gdb_agent_init): ... here.  New.
6578         [HAVE_UST]: Call gdb_ust_init.
6579         (initialize_tracepoint_ftlib):  Call gdb_agent_init.
6580         * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6581         * config.in, configure: Regenerated.
6582
6583 2012-03-02  Pedro Alves  <palves@redhat.com>
6584
6585         * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6586         * linux-low.c (struct simple_pid_list): New.
6587         (stopped_pids): New a struct simple_pid_list pointer.
6588         (add_to_pid_list, pull_pid_from_list): New.
6589         (handle_extended_wait): Don't assume the first signal new children
6590         report is SIGSTOP.  Adjust call to pull_pid_from_list.
6591         (linux_wait_for_lwp): Adjust.
6592
6593 2012-03-02  Yao Qi  <yao@codesourcery.com>
6594
6595         * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6596         debug log.
6597
6598 2012-03-02  Yao Qi  <yao@codesourcery.com>
6599
6600         * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6601         `stop_pc' and `tpoint'.  Update caller.
6602
6603 2012-03-01  Maciej W. Rozycki  <macro@codesourcery.com>
6604
6605         * linux-low.h (linux_target_ops): Add regset_bitmap member.
6606         * linux-low.c (use_linux_regsets): New macro.
6607         [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6608         [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6609         (linux_register_in_regsets): New function.
6610         (usr_fetch_inferior_registers): Skip registers covered by
6611         regsets.
6612         (usr_store_inferior_registers): Likewise.
6613         (usr_fetch_inferior_registers): New macro.
6614         (usr_store_inferior_registers): Likewise.
6615         (linux_fetch_registers): Handle mixed regset/non-regset targets.
6616         (linux_store_registers): Likewise.
6617         * linux-mips-low.c (init_registers_mips_dsp_linux): New
6618         prototype.
6619         (init_registers_mips64_dsp_linux): Likewise.
6620         (init_registers_mips_linux): New macro.
6621         (init_registers_mips_dsp_linux): Likewise.
6622         (mips_dsp_num_regs): Likewise.
6623         (DSP_BASE, DSP_CONTROL): New fallback macros.
6624         (mips_base_regs): New macro.
6625         (mips_regmap): Use it.  Fix the size.
6626         (mips_dsp_regmap): New variable.
6627         (mips_dsp_regset_bitmap): Likewise.
6628         (mips_arch_setup): New function.
6629         (mips_cannot_fetch_register): Use the_low_target.regmap rather
6630         than mips_regmap.
6631         (mips_cannot_store_register): Likewise.
6632         (the_low_target): Update .arch_setup, .num_regs and .regmap
6633         initializers.  Add .regset_bitmap initializer.
6634         * linux-arm-low.c (the_low_target): Add .regset_bitmap
6635         initializer.
6636         * linux-bfin-low.c (the_low_target): Likewise.
6637         * linux-cris-low.c (the_low_target): Likewise.
6638         * linux-crisv32-low.c (the_low_target): Likewise.
6639         * linux-ia64-low.c (the_low_target): Likewise.
6640         * linux-m32r-low.c (the_low_target): Likewise.
6641         * linux-m68k-low.c (the_low_target): Likewise.
6642         * linux-ppc-low.c (the_low_target): Likewise.
6643         * linux-s390-low.c (the_low_target): Likewise.
6644         * linux-sh-low.c (the_low_target): Likewise.
6645         * linux-sparc-low.c (the_low_target): Likewise.
6646         * linux-tic6x-low.c (the_low_target): Likewise.
6647         * linux-x86-low.c (the_low_target): Likewise.
6648         * linux-xtensa-low.c (the_low_target): Likewise.
6649         * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6650         mips64-dsp-linux.o to srv_regobj.  Add mips-dsp-linux.xml,
6651         mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6652         srv_xmlfiles.
6653         * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6654         (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6655
6656 2012-02-29  Yao Qi  <yao@codesourcery.com>
6657             Pedro Alves  <palves@redhat.com>
6658
6659         * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6660         `step_over_finished' is true.
6661
6662 2012-02-27  Pedro Alves  <palves@redhat.com>
6663
6664         * linux-low.c (pid_is_stopped): Delete, moved to common/.
6665         (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6666
6667 2012-02-27  Pedro Alves  <palves@redhat.com>
6668
6669         PR server/9684
6670         * linux-low.c (pid_is_stopped): New.
6671         (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6672
6673 2012-02-25  Luis Machado  <lgustavo@codesourcery.com>
6674
6675         * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6676         of conditions.
6677
6678 2012-02-24  Maciej W. Rozycki  <macro@codesourcery.com>
6679
6680         * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6681
6682 2012-02-24  Luis Machado  <lgustavo@codesourcery>
6683
6684         * server.c (handle_query): Advertise support for target-side
6685         breakpoint condition evaluation.
6686         (process_point_options): New function.
6687         (process_serial_event): When inserting a breakpoint, check for
6688         a target-side condition that should be evaluated.
6689
6690         * mem-break.c: Include regcache.h and ax.h.
6691         (point_cond_list_t): New data structure.
6692         (breakpoint) <cond_list>: New field.
6693         (find_gdb_breakpoint_at): Make non-static.
6694         (delete_gdb_breakpoint_at): Clear any target-side
6695         conditions.
6696         (clear_gdb_breakpoint_conditions): New function.
6697         (add_condition_to_breakpoint): Likewise.
6698         (add_breakpoint_condition): Likewise.
6699         (gdb_condition_true_at_breakpoint): Likewise.
6700         (gdb_breakpoint_here): Return result directly instead
6701         of going through a local variable.
6702
6703         * mem-break.h (find_gdb_breakpoint_at): New prototype.
6704         (clear_gdb_breakpoint_conditions): Likewise.
6705         (add_breakpoint_condition): Likewise.
6706         (gdb_condition_true_at_breakpoint): Likewise.
6707
6708         * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6709         (need_step_over_p): Take target-side breakpoint condition into
6710         consideration.
6711
6712 2012-02-24  Luis Machado  <lgustavo@codesourcery>
6713
6714         * server.h: Include tracepoint.h.
6715         (agent_mem_read, agent_get_trace_state_variable_value,
6716         agent_set_trace_state_variable_value,
6717         agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6718         get_set_tsv_func_addr): New prototypes.
6719
6720         * ax.h: New include file.
6721         * ax.c: New source file.
6722
6723         * tracepoint.c: Include ax.h.
6724         (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6725         agent_expr, eval_result_type): Move to ax.h.
6726         (parse_agent_expr): Rename to ...
6727         (gdb_parse_agent_expr): ... this, make it non-static and move
6728         to ax.h.
6729         (unparse_agent_expr) Rename to ...
6730         (gdb_unparse_agent_expr): ... this, make it non-static and move
6731         to ax.h.
6732         (eval_agent_expr): Rename to ...
6733         (eval_tracepoint_agent_expr): ... this.
6734         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6735         forward declarations.
6736         (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6737         (agent_get_trace_state_variable_value): New function.
6738         (agent_set_trace_state_variable_value): New function.
6739         (cmd_qtdp): Call gdb_parse_agent_expr (...).
6740         (response_tracepoint): Call gdb_unparse_agent_expr (...).
6741         (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6742         (condition_true_at_tracepoint): Likewise.
6743         (parse_agent_expr): Rename to ...
6744         (gdb_parse_agent_expr): ... this and move to ax.c.
6745         (unparse_agent_expr): Rename to ...
6746         (gdb_unparse_agent_expr): ... this and move to ax.c.
6747         (gdb_agent_op_name): Move to ax.c.
6748         (eval_agent_expr): Rename to ...
6749         (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6750         and move to ax.c.
6751         (eval_tracepoint_agent_expr): New function.
6752         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
6753         non-static.
6754         (current_insn_ptr, emit_error, struct bytecode_address): Move to
6755         ax.c.
6756         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6757         emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6758         emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6759         emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6760         emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6761         emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6762         emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6763         emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6764         (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6765         (compile_bytecodes): Remove forward declaration.
6766         (is_goto_target): Move to ax.c.
6767         (compile_bytecodes): Move to ax.c and call
6768         agent_get_trace_state_variable_value (...) and
6769         agent_set_trace_state_variable_value (...).
6770
6771         * Makefile.in: Update ax.c and IPA dependencies.
6772
6773 2012-02-24  Pedro Alves  <palves@redhat.com>
6774
6775         * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6776         (cmd_bigqtbuffer_circular): ... this.  Only handle
6777         'QTBuffer:circular:'.
6778         (handle_tracepoint_general_set): Adjust.
6779
6780 2012-02-16  Yao Qi  <yao@codesourcery.com>
6781
6782         * inferiors.c: Move code to ...
6783         * dll.c: .... here.  New.
6784         * server.h: Declare clear_dlls.
6785         * Makefile.in (SFILES): Add dll.c.
6786         (OBS): Add dll.o
6787         (dll.o): New rule.
6788
6789 2012-02-11  Yao Qi  <yao@codesourcery.com>
6790
6791         * server.c: (handle_monitor_command): Add a new parameter
6792         `own_buf'.
6793         (handle_query): Update caller.
6794
6795 2012-02-09  Joel Brobecker  <brobecker@adacore.com>
6796
6797         * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6798         * configure, config.in: Regenerate.
6799         * hostio.c: Provide an alternate implementation if HAVE_READLINK
6800         is not defined.
6801
6802 2012-02-02  Pedro Alves  <palves@redhat.com>
6803
6804         Try SIGKILL first, then PTRACE_KILL.
6805         * linux-low.c (linux_kill_one_lwp): New.
6806         (linux_kill_one_lwp): Rename to ...
6807         (kill_one_lwp_callback): ... this.  Use the new
6808         linux_kill_one_lwp.
6809
6810 2012-02-02  Pedro Alves  <palves@redhat.com>
6811
6812         * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6813         inferior.
6814
6815 2012-01-27  Pedro Alves  <palves@redhat.com>
6816
6817         * linux-low.c (linux_child_pid_to_exec_file): Delete.
6818         (elf_64_file_p): Make static.
6819         (linux_pid_exe_is_elf_64_file): New.
6820         * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6821         Delete declarations.
6822         (linux_pid_exe_is_elf_64_file): Declare.
6823         * linux-x86-low.c (x86_arch_setup): Use
6824         linux_pid_exe_is_elf_64_file.
6825
6826 2012-01-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
6827
6828         * linux-low.c (linux_wait_for_event_1): Rename to ...
6829         (linux_wait_for_event): ... here and merge it with former
6830         linux_wait_for_event - new variable wait_ptid, use it.
6831         (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6832
6833 2012-01-23  Pedro Alves  <palves@redhat.com>
6834
6835         * server.c (main): Avoid yet another case of infinite loop while
6836         detaching/killing after a longjmp.
6837
6838 2012-01-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
6839
6840         Code cleanup.
6841         * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6842
6843 2012-01-20  Ulrich Weigand  <ulrich.weigand@linaro.org>
6844
6845         * hostio.c (handle_readlink): New function.
6846         (handle_vFile): Call it to handle "vFile:readlink" packets.
6847
6848 2012-01-20  Pedro Alves  <palves@redhat.com>
6849             Ulrich Weigand  <ulrich.weigand@linaro.org>
6850
6851         * server.c (handle_v_requests): Only support vAttach and vRun to
6852         start multiple processes when in extended protocol mode.
6853
6854 2012-01-17  Pedro Alves  <palves@redhat.com>
6855
6856         * tracepoint.c (initialize_tracepoint): Use mmap instead of
6857         memalign plus mprotect to allocate the scratch buffer.
6858
6859 2012-01-13  Pedro Alves  <palves@redhat.com>
6860
6861         * server.c (attach_inferior): Clear `cont_thread'.
6862
6863 2012-01-13  Pedro Alves  <palves@redhat.com>
6864
6865         * server.c (main): Avoid infinite loop while detaching/killing
6866         after a longjmp.
6867
6868 2012-01-09  Doug Evans  <dje@google.com>
6869
6870         * server.c (start_inferior): Set last_ptid in --wrapper case.
6871
6872 2012-01-06  Yao Qi  <yao@codesourcery.com>
6873
6874         * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6875         defined.
6876         [IN_PROCESS_AGENT] (debug_agent): New global variable.
6877
6878 2012-01-04  Yao Qi  <yao@codesourcery.com>
6879
6880         * tracepoint.c (cmd_qtdp): Print debug message
6881         for static tracepoint.
6882
6883 2012-01-04  Yao Qi  <yao@codesourcery.com>
6884
6885         * tracepoint.c (trace_vdebug): Differentiate debug message
6886         between gdbserver and IPA.
6887
6888 2012-01-03  Yao Qi  <yao@codesourcery.com>
6889
6890         * tracepoint.c (tracepoint_was_hit): Don't collect for
6891         static tracepoint.
6892
6893 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
6894
6895         * terminal.h: Reformat copyright header.
6896
6897 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
6898
6899         * server.c (gdbserver_version): Update copyright year.
6900         * gdbreplay.c (gdbreplay_version): Likewise.
6901
6902 2011-12-18  Jan Kratochvil  <jan.kratochvil@redhat.com>
6903
6904         * linux-low.c (linux_create_inferior): Put empty if clause for write.
6905
6906         Revert:
6907         2011-12-18  Hui Zhu  <teawater@gmail.com>
6908         * linux-low.c (linux_create_inferior): Save return value to ret.
6909
6910 2011-12-18  Hui Zhu  <teawater@gmail.com>
6911
6912         * linux-low.c (linux_create_inferior): Save return value to ret.
6913
6914 2011-12-16  Doug Evans  <dje@google.com>
6915
6916         * linux-low.c (linux_create_inferior): If stdio connection,
6917         redirect stdin from /dev/null, stdout to stderr.
6918         * remote-utils.c (remote_is_stdio): New static global.
6919         (remote_connection_is_stdio): New function.
6920         (remote_prepare): Handle stdio connection.
6921         (remote_open): Ditto.
6922         (remote_close): Don't close stdin for stdio connections.
6923         (read_prim,write_prim): New functions.  Replace all calls to
6924         read/write to these.
6925         * server.c (main): Watch for "-" argument.  Move call to
6926         remote_prepare before start_inferior.
6927         * server.h (STDIO_CONNECTION_NAME): New macro.
6928         (remote_connection_is_stdio): Declare.
6929
6930         * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6931         in debugging output.
6932
6933 2011-12-15  Yao Qi  <yao@codesourcery.com>
6934
6935         * tracepoint.c: Include sys/syscall.h.
6936         (gdb_ust_thread): Remove preprocessor conditional.
6937
6938 2011-12-14  Pedro Alves  <pedro@codesourcery.com>
6939
6940         * linux-low.c (linux_detach_one_lwp): Call
6941         the_low_target.prepare_to_resume before detaching.
6942
6943 2011-12-14  Yao Qi  <yao@codesourcery.com>
6944
6945         * tracepoint.c (gdb_ust_thread): Don't ignore return value
6946         of write.
6947
6948 2011-12-14  Yao Qi  <yao@codesourcery.com>
6949
6950         * i386-low.c (i386_low_stopped_data_address): Initialize local
6951         variable `control'.
6952
6953 2011-12-13  Pedro Alves  <pedro@codesourcery.com>
6954
6955         PR remote/13492
6956
6957         * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6958         DR_CONTROL unless necessary.  Extend comments.
6959         * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6960         DR0-3 if not used.  If any watchpoint was set, clear DR_STATUS.
6961
6962 2011-12-13  Yao Qi  <yao@codesourcery.com>
6963
6964         * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6965         macros.
6966         (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6967
6968 2011-12-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
6969
6970         * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6971         Print new debug message for such case.
6972
6973 2011-12-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
6974
6975         Fix overlapping memcpy.
6976         * mem-break.c (set_raw_breakpoint_at): New variable buf.  Use it for
6977         the read_inferior_memory transfer.
6978         (delete_fast_tracepoint_jump): New variable buf.  Use it for the
6979         write_inferior_memory transfer.
6980         (set_fast_tracepoint_jump): New variable buf.  Use it for the
6981         read_inferior_memory and write_inferior_memory transfers.
6982         (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6983         (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6984         Use it for the write_inferior_memory transfer.
6985         (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6986         buffers.
6987
6988 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
6989
6990         * linux-low.c (fetch_register, store_register): Make code
6991         consistent, fix formatting.
6992
6993 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
6994
6995         * linux-low.c (usr_store_inferior_registers): Factor out code
6996         to handle individual registers into...
6997         (store_register): ... this new function.
6998
6999 2011-12-06  Ulrich Weigand  <uweigand@de.ibm.com>
7000
7001         * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
7002         (s390-linux32v2.o, s390-linux32v2.c): Likewise.
7003         (s390-linux64v1.o, s390-linux64v1.c): Likewise.
7004         (s390-linux64v2.o, s390-linux64v2.c): Likewise.
7005         (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
7006         (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
7007         * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
7008         (srv_xmlfiles): Add new XML files.
7009
7010         * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
7011         and <sys/uio.h>.
7012         (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
7013         (init_registers_s390_linux32v1): Add prototype.
7014         (init_registers_s390_linux32v2): Likewise.
7015         (init_registers_s390_linux64v1): Likewise.
7016         (init_registers_s390_linux64v2): Likewise.
7017         (init_registers_s390x_linux64v1): Likewise.
7018         (init_registers_s390x_linux64v2): Likewise.
7019         (s390_num_regs): Increment to 52.
7020         (s390_regmap): Add orig_r2 register.
7021         (s390_num_regs_3264): Increment to 68.
7022         (s390_regmap_3264): Add orig_r2 register.
7023         (s390_collect_ptrace_register): Handle orig_r2 register.
7024         (s390_supply_ptrace_register): Likewise.
7025         (s390_fill_last_break): New function.
7026         (s390_store_last_break): Likewise.
7027         (s390_fill_system_call): New function.
7028         (s390_store_system_call): Likewise.
7029         (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
7030         register sets.
7031         (s390_check_regset): New function.
7032         (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
7033         NT_S390_SYSTEM_CALL regsets and use appropriate description.
7034         Update target_regsets for available register sets.
7035
7036 2011-12-02  Paul Pluzhnikov  <ppluzhnikov@google.com>
7037             Jan Kratochvil  <jan.kratochvil@redhat.com>
7038
7039         * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
7040         (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
7041         New.
7042         (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
7043         * linux-low.h (struct process_info_private): New member r_debug.
7044         * server.c (handle_qxfer_libraries): Call
7045         the_target->qxfer_libraries_svr4.
7046         (handle_qxfer_libraries_svr4): New function.
7047         (qxfer_packets): New entry "libraries-svr4".
7048         (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
7049         * target.h (struct target_ops): New member qxfer_libraries_svr4.
7050         * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
7051         PACKET_qXfer_libraries_svr4.
7052
7053 2011-11-30  Ulrich Weigand  <uweigand@de.ibm.com>
7054
7055         * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
7056         PSW address/mask between 8-byte and 16-byte formats.
7057         (s390_supply_ptrace_register): Likewise.
7058         (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
7059         basic addressing mode bit.
7060
7061 2011-11-24  Stan Shebs  <stan@codesourcery.com>
7062
7063         * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
7064
7065 2011-11-17  Stan Shebs  <stan@codesourcery.com>
7066
7067         * tracepoint.c (struct tracepoint): New field traceframe_usage.
7068         (tracing_start_time): New global.
7069         (tracing_stop_time): New global.
7070         (tracing_user_name): New global.
7071         (tracing_notes): New global.
7072         (tracing_stop_note): New global.
7073         (cmd_qtstart): Set traceframe_usage, start_time.
7074         (stop_tracing): Set stop_time.
7075         (cmd_qtstatus): Report additional status.
7076         (cmd_qtp): New function.
7077         (handle_tracepoint_query): Call it.
7078         (cmd_qtnotes): New function.
7079         (handle_tracepoint_general_set): Call it.
7080         (get_timestamp): Rename from tsv_get_timestamp.
7081
7082 2011-11-14  Stan Shebs  <stan@codesourcery.com>
7083             Kwok Cheung Yeung  <kcy@codesourcery.com>
7084
7085         * linux-x86-low.c (small_jump_insn): New.
7086         (i386_install_fast_tracepoint_jump_pad): Add arguments for
7087         trampoline and error message, build a trampoline and issue a small
7088         jump instruction to it.
7089         (x86_install_fast_tracepoint_jump_pad): Add arguments for
7090         trampoline and error message.
7091         (x86_get_min_fast_tracepoint_insn_len): New.
7092         (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
7093         * linux-low.h (struct linux_target_ops): Add arguments to
7094         install_fast_tracepoint_jump_pad operation, add new operation.
7095         * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
7096         arguments.
7097         (linux_get_min_fast_tracepoint_insn_len): New function.
7098         (linux_target_op): Add new operation.
7099         * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
7100         (gdb_trampoline_buffer_end): Ditto.
7101         (gdb_trampoline_buffer_error): Ditto.
7102         (struct ipa_sym_addresses): Add fields for new IPA variables.
7103         (symbol_list): Add entries for new IPA variables.
7104         (struct tracepoint): Add fields to hold the address range of the
7105         trampoline used by the tracepoint.
7106         (trampoline_buffer_head): New static variable.
7107         (trampoline_buffer_tail): Ditto.
7108         (claim_trampoline_space): New function.
7109         (have_fast_tracepoint_trampoline_buffer): New function.
7110         (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
7111         structure.
7112         (install_fast_tracepoint): Ditto, also add error buffer argument.
7113         (cmd_qtminftpilen): New function.
7114         (handle_tracepoint_query): Add response to qTMinFTPILen packet.
7115         (fast_tracepoint_from_trampoline_address): New function.
7116         (fast_tracepoint_collecting): Handle trampoline as part of jump
7117         pad space.
7118         (set_trampoline_buffer_space): New function.
7119         (initialize_tracepoint): Initialize new IPA variables.
7120         * target.h (struct target_ops): Add arguments to
7121         install_fast_tracepoint_jump_pad operation, add new
7122         get_min_fast_tracepoint_insn_len operation.
7123         (target_get_min_fast_tracepoint_insn_len): New.
7124         (install_fast_tracepoint_jump_pad): Add arguments.
7125         * server.h (IPA_BUFSIZ): Define.
7126         * linux-i386-ipa.c: Include extra header files.
7127         (initialize_fast_tracepoint_trampoline_buffer): New function.
7128         (initialize_low_tracepoint): Call it.
7129         * server.h (set_trampoline_buffer_space): Declare.
7130         (claim_trampoline_space): Ditto.
7131         (have_fast_tracepoint_trampoline_buffer): Ditto.
7132
7133 2011-11-14  Yao Qi  <yao@codesourcery.com>
7134
7135         * server.c (handle_query): Handle InstallInTrace for qSupported.
7136         * tracepoint.c (add_tracepoint): Sort list.
7137         (install_tracepoint, download_tracepoint): New.
7138         (cmd_qtdp): Call them to install and download tracepoints.
7139         (sort_tracepoints): Removed.
7140         (cmd_qtstart): Update.
7141
7142 2011-11-14  Yao Qi  <yao@codesourcery.com>
7143
7144         * mem-break.c (inc_ref_fast_tracepoint_jump): New.
7145         * mem-break.h: Declare.
7146         * tracepoint.c (cmd_qtstart): Move some code to ...
7147         (clone_fast_tracepoint, install_fast_tracepoint): ... here.
7148         New.
7149         (download_tracepoints): Move some code to ...
7150         (download_tracepoint_1): ... here.  New.
7151
7152 2011-11-08  Yao Qi  <yao@codesourcery.com>
7153
7154         * remote-utils.c (relocate_instruction): A comment fix.
7155
7156 2011-11-07  Joel Brobecker  <brobecker@adacore.com>
7157
7158         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
7159         (i386_dr_low_get_control, i386_dr_low_get_status): Use
7160         dr_status_mirror and dr_control_mirror from debug_reg_state.
7161         (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
7162         (i386_initial_stuff): Remove use of deleted globals.
7163         (i386_get_thread_context, i386_set_thread_context,
7164         i386_thread_added): Use dr_status_mirror and dr_control_mirror
7165         from debug_reg_state.
7166
7167 2011-11-05  Yao Qi  <yao@codesourcery.com>
7168
7169         * tracepoint.c (gdb_collect): Loop over tracepoints of same
7170         address as TPOINT's.
7171
7172 2011-11-02  Stan Shebs  <stan@codesourcery.com>
7173
7174         * tracepoint.c (agent_mem_read_string): New function.
7175         (eval_agent_expr): Call it for tracenz.
7176         * server.c (handle_query): Report support for tracenz.
7177
7178 2011-11-02  Yao Qi  <yao@codesourcery.com>
7179
7180         * tracepoint.c (cmd_qtstart): Remove unused local variables.
7181
7182 2011-11-02  Yao Qi  <yao@codesourcery.com>
7183
7184         * target.h: Fix a typo in comment.
7185
7186 2011-10-31  Pedro Alves  <pedro@codesourcery.com>
7187
7188         * mem-break.c (check_mem_write): Add `myaddr' parameter.  Don't
7189         clobber the breakpoints' shadows with fast tracepoint jumps.
7190         * mem-break.h (check_mem_write): Add `myaddr' parameter.
7191         * target.c (write_inferior_memory): Also pass MYADDR down to
7192         check_mem_write.
7193
7194 2011-10-07  Ulrich Weigand  <ulrich.weigand@linaro.org>
7195
7196         * configure.ac: Check support for personality routine.
7197         * configure: Regenerate.
7198         * config.in: Likewise.
7199         * linux-low.c: Include <sys/personality.h>.
7200         Define ADDR_NO_RANDOMIZE if necessary.
7201         (linux_create_inferior): Disable address space randomization when
7202         forking inferior, if requested.
7203         (linux_supports_disable_randomization): New function.
7204         (linux_target_ops): Install it.
7205         * server.h (disable_randomization): Declare.
7206         * server.c (disable_randomization): New global variable.
7207         (handle_general_set): Handle QDisableRandomization.
7208         (handle_query): Likewise for qSupported.
7209         (main): Support --disable-randomization and --no-disable-randomization
7210         command line arguments.
7211         * target.h (struct target_ops): Add supports_disable_randomization.
7212         (target_supports_disable_randomization): New macro.
7213
7214 2011-09-29  Mike Frysinger  <vapier@gentoo.org>
7215
7216         * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
7217         ifdef check.
7218         [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
7219         [!PT_GETDSBT] (target_loadmap): New definition.
7220         (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
7221         (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
7222         LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
7223         and PT_GETDSBT to LINUX_LOADMAP.
7224         [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
7225         (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
7226
7227 2011-09-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
7228
7229         * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
7230         (arm_linux_hwbp_cap): New static variable.
7231         (arm_linux_get_hwbp_cap): Replace by ...
7232         (arm_linux_init_hwbp_cap): ... this new function.
7233         (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
7234         (arm_linux_get_hw_watchpoint_count): Likewise.
7235         (arm_linux_get_hw_watchpoint_max_length): Likewise.
7236         (arm_arch_setup): Call arm_linux_init_hwbp_cap.
7237         (arm_prepare_to_resume): Use perror_with_name instead of error.
7238
7239 2011-09-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
7240
7241         * linux-arm-low.c: Include <signal.h>.
7242         (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
7243         (struct arm_linux_hwbp_cap): New data type.
7244         (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
7245         (struct arm_linux_hw_breakpoint): New data type.
7246         (MAX_BPTS, MAX_WPTS): Define.
7247         (struct arch_process_info, struct arch_lwp_info): New data types.
7248         (arm_linux_get_hwbp_cap): New function.
7249         (arm_linux_get_hw_breakpoint_count): Likewise.
7250         (arm_linux_get_hw_watchpoint_count): Likewise.
7251         (arm_linux_get_hw_watchpoint_max_length): Likewise.
7252         (arm_hwbp_control_initialize): Likewise.
7253         (arm_hwbp_control_is_enabled): Likewise.
7254         (arm_hwbp_control_is_initialized): Likewise.
7255         (arm_hwbp_control_disable): Likewise.
7256         (arm_linux_hw_breakpoint_equal): Likewise.
7257         (arm_linux_hw_point_initialize): Likewise.
7258         (struct update_registers_data): New data structure.
7259         (update_registers_callback: New function.
7260         (arm_insert_point): Likewise.
7261         (arm_remove_point): Likewise.
7262         (arm_stopped_by_watchpoint): Likewise.
7263         (arm_stopped_data_address): Likewise.
7264         (arm_new_process): Likewise.
7265         (arm_new_thread): Likewise.
7266         (arm_prepare_to_resume): Likewise.
7267         (the_low_target): Register arm_insert_point, arm_remove_point,
7268         arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
7269         arm_new_thread, and arm_prepare_to_resume.
7270
7271 2011-09-15  Stan Shebs  <stan@codesourcery.com>
7272
7273         * server.h (struct emit_ops): Add compare-goto fields.
7274         * tracepoint.c (gdb_agent_op_sizes): New table.
7275         (emit_eq_goto): New function.
7276         (emit_ne_goto): New function.
7277         (emit_lt_goto): New function.
7278         (emit_le_goto): New function.
7279         (emit_gt_goto): New function.
7280         (emit_ge_goto): New function.
7281         (is_goto_target): New function.
7282         (compile_bytecodes): Recognize special cases of compare-goto
7283         combinations and call specialized emitters for them.
7284         * linux-x86-low.c (amd64_emit_eq_goto): New function.
7285         (amd64_emit_ne_goto): New function.
7286         (amd64_emit_lt_goto): New function.
7287         (amd64_emit_le_goto): New function.
7288         (amd64_emit_gt_goto): New function.
7289         (amd64_emit_ge_goto): New function.
7290         (amd64_emit_ops): Add the new functions.
7291         (i386_emit_eq_goto): New function.
7292         (i386_emit_ne_goto): New function.
7293         (i386_emit_lt_goto): New function.
7294         (i386_emit_le_goto): New function.
7295         (i386_emit_gt_goto): New function.
7296         (i386_emit_ge_goto): New function.
7297         (i386_emit_ops): Add the new functions.
7298
7299 2011-09-08  Stan Shebs  <stan@codesourcery.com>
7300
7301         * linux-x86-low.c (i386_emit_prologue): Save %ebx.
7302         (i386_emit_epilogue): Restore %ebx.
7303
7304 2011-08-31  Jie Zhang  <jzhang918@gmail.com>
7305
7306         * server.c (step_thread): Remove definition.
7307         (process_serial_event): Don't handle Hs.
7308         * server.h (step_thread): Remove declaration.
7309         * target.c (set_desired_inferior): Remove use of step_thread.
7310
7311 2011-08-24  Luis Machado  <lgustavo@codesourcery.com>
7312
7313         * linux-low.c: Include linux-procfs.h.
7314         (linux_attach_lwp_1): Update comments.
7315         (linux_attach): Scan for existing threads when attaching to a
7316         process that is the tgid.
7317         * Makefile.in: Update dependencies.
7318
7319 2011-08-24  Luis Machado  <lgustavo@codesourcery.com>
7320
7321         * configure.srv: Add linux-procfs.o dependencies.
7322
7323 2011-08-14  Yao Qi  <yao@codesourcery.com>
7324
7325         * target.h (struct target_ops): Fix indent.
7326         * win32-low.c (win32_target_ops): Fix comment.
7327
7328 2011-08-14  Andrew Jenner  <andrew@codesourcery.com>
7329             Yao Qi  <yao@codesourcery.com>
7330
7331         * Makefile.in (clean): Remove tic6x-*.c files.
7332         (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
7333         (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
7334         (tic6x-c64xp-linux.c): Likewise.
7335         * configure.srv: Add support for tic6x-*-uclinux.
7336         * linux-tic6x-low.c: New.
7337         * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
7338
7339 2011-08-14  Andrew Stubbs <ams@codesourcery.com>
7340             Yao Qi  <yao@codesourcery.com>
7341
7342         * target.h (struct target_ops): Add read_loadmap.
7343         * linux-low.c (struct target_loadseg): New type.
7344         (struct target_loadmap): New type.
7345         (linux_read_loadmap): New function.
7346         (linux_target_ops): Add linux_read_loadmap.
7347         * server.c (handle_query): Support qXfer:fdpic:read packet.
7348         * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
7349         to NULL.
7350
7351 2011-08-05  Eli Zaretskii  <eliz@gnu.org>
7352
7353         * win32-low.c: Include <stdint.h>.
7354
7355 2011-07-22  Pedro Alves  <pedro@codesourcery.com>
7356
7357         * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
7358         to the inferior here.
7359         (i386_remove_aligned_watchpoint): Ditto.
7360         (i386_handle_nonaligned_watchpoint): Return immediate on fail to
7361         fit part of the watchpoint in the debug registers.
7362         (i386_update_inferior_debug_regs): New.
7363         (i386_low_insert_watchpoint): Work on a local mirror of the debug
7364         registers, and only update the inferior on success.
7365         (i386_low_remove_watchpoint): Ditto.
7366
7367 2011-07-22  Kwok Cheung Yeung  <kcy@codesourcery.com>
7368
7369         * linux-low.c (compare_ints, unique, list_threads, show_process,
7370         linux_core_of_thread): Delete.
7371         (linux_target_ops): Change linux_core_of_thread to
7372         linux_common_core_of_thread.
7373         (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
7374         * utils.c (malloc_failure): Change type of argument.
7375         (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
7376         * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
7377         common/linux-osdata.c, common/ptid.c and common/buffer.c.
7378         (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
7379         (IPA_OBJS): Add common-utils-ipa.o.
7380         (ptid_h, linux_osdata_h): New macros.
7381         (server_h): Add common/common-utils.h, common/xml-utils.h,
7382         common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
7383         common/ptid.h.
7384         (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
7385         ptid.o, buffer.o): New rules.
7386         (linux-low.o): Add common/linux-osdata.h as a dependency.
7387         * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
7388         * configure.ac: Add AC_HEADER_DIRENT check.
7389         * config.in: Regenerate.
7390         * configure: Regenerate.
7391         * remote-utils.c (xml_escape_text): Delete.
7392         (buffer_grow, buffer_free, buffer_init, buffer_finish,
7393         buffer_xml_printf): Move to common/buffer.c.
7394         * server.c (main): Remove call to initialize_inferiors.
7395         * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
7396         ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
7397         ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
7398         internal_error, gdb_assert, gdb_assert_fail): Delete.
7399         (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
7400         buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
7401         common/buffer.h.
7402         * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
7403         ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
7404         initialize_inferiors): Delete.
7405
7406 2011-07-20  Pedro Alves  <pedro@codesourcery.com>
7407
7408         * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
7409         symbol error.
7410
7411 2011-05-31  Pedro Alves  <pedro@codesourcery.com>
7412
7413         * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
7414         assertion.
7415         * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
7416
7417 2011-05-26  Yao Qi  <yao@codesourcery.com>
7418
7419         * Makefile.in (thread-db.o): Track dependence to
7420         common/gdb_thread_db.h.
7421         * thread-db.c: include gdb_thread_db.h from right place.
7422
7423 2011-05-16  Adrian Cornish  <gnu@bluedreamer.com>
7424
7425         * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
7426         __FILE__ and __LINE__ to internal_error.
7427
7428 2011-05-13  Doug Evans  <dje@google.com>
7429
7430         * thread-db.c (try_thread_db_load_from_sdir): New function.
7431         (try_thread_db_load_from_dir): New function.
7432         (thread_db_load_search): Handle $sdir, ignore $pdir.
7433         Remove trying of system directories if search of
7434         libthread-db-search-path fails, that is now done via $sdir.
7435
7436 2011-05-12  Kwok Cheung Yeung  <kcy@codesourcery.com>
7437
7438         * server.c (handle_query): Add EnableDisableTracepoints to the list
7439         of supported features.
7440         * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
7441         tracepoints.
7442         (cmd_qtenable_disable): New.
7443         (cmd_qtstart): Install tracepoints even if disabled.
7444         (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
7445         receiving a QTEnable or QTDisable packet.
7446         (gdb_collect): Skip data collection if fast tracepoint is disabled.
7447         (ust_marker_to_static_tracepoint): Do not ignore disabled static
7448         tracepoints.
7449         (gdb_probe): Skip data collection if static tracepoint is disabled.
7450
7451 2011-05-10  Doug Evans  <dje@google.com>
7452
7453         * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
7454
7455 2011-05-04  Doug Evans  <dje@google.com>
7456
7457         * linux-low.c (linux_join): Skip process lookup.
7458         * spu-low.c (spu_join): Ditto.
7459         * server.c (join_inferiors_callback): Delete.
7460         (process_serial_event): For 'D' packet (detach) call join_inferior
7461         directly.
7462
7463 2011-05-04  Joseph Myers  <joseph@codesourcery.com>
7464
7465         * README: Don't mention xscale*-*-linux*.
7466         * configure.srv (xscale*-*-linux*): Don't handle target.
7467
7468 2011-04-27  Nathan Froyd  <froydnj@codesourcery.com>
7469
7470         * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
7471         casting pointers.
7472         (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
7473         (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
7474         (i386_emit_void_call_2): Likewise.
7475
7476 2011-04-26  Yao Qi  <yao@codesourcery.com>
7477
7478         * linux-low.c: Move common macros to linux-ptrace.h.
7479         Include linux-ptrace.h.
7480         * Makefile.in (linux_ptrace_h): New.
7481         (linux-low.o): Depends on linux-ptrace.h.
7482
7483 2011-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
7484
7485         * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
7486         RUN_ONCE.  Comment for the LISTEN_DESC delete_file_handler call.
7487         (remote_prepare): New function with most of the TCP code from ...
7488         (remote_open): ... here.  Detect PORT here unconditionally.  Move also
7489         setting transport_is_reliable.
7490         * server.c (run_once): New variable.
7491         (gdbserver_usage): Document it.
7492         (main): Set run_once for `--once'.  Call remote_prepare.  Exit after
7493         the first run if RUN_ONCE.
7494         * server.h (run_once, remote_prepare): New declarations.
7495
7496 2011-04-19  Tom Tromey  <tromey@redhat.com>
7497
7498         * win32-low.c (handle_load_dll): Remove duplicate "the".
7499
7500 2011-04-07  Pierre Muller  <muller@ics.u-strasbg.fr>
7501
7502         Remove support for old Cygwin 1.5 versions.
7503         * win32-low.c (win32_create_inferior): Use new cygwin_path_list
7504         function to avoid warning.
7505         (win32_add_one_solib): Use cygwin_conv_path function to avoid
7506         warning.
7507
7508 2011-03-18  Pierre Muller  <muller@ics.u-strasbg.fr>
7509
7510         * gdbserver/server.h (Macro _): Define it if not available.
7511
7512 2011-03-14  Michael Snyder  <msnyder@vmware.com>
7513
7514         * hostio.c (handle_close): Remove unnecessary null test.
7515
7516 2011-03-10  Joel Brobecker  <brobecker@adacore.com>
7517
7518         * Makefile.in (maintainer-clean realclean distclean): Remove
7519         "make ...  subdir_do" command.
7520
7521 2011-03-10  Michael Snyder  <msnyder@vmware.com>
7522
7523         * tracepoint.c (tracepoint_finish_step): Fix loop variable.
7524
7525         * server.c (handle_v_run): Free alloced buffer on early return.
7526
7527 2011-03-09  Yao Qi  <yao@codesourcery.com>
7528
7529         Revert:
7530         2011-03-04  Yao Qi  <yao@codesourcery.com>
7531
7532         * Makefile.in: Remove GNU make feature --directory.
7533
7534         2011-03-05  Yao Qi  <yao@codesourcery.com>
7535
7536         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7537         (subdir_do): New make target.  Copied from gdb/Makefile.
7538         (maintainer-clean, realclean, distclean, clean): Call corresponding
7539         make targets in common/Makefile.
7540
7541         2011-02-11  Yao Qi  <yao@codesourcery.com>
7542
7543         * configure.ac: Call AC_PROG_RANLIB.
7544         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
7545         * configure: Regenerate.
7546
7547 2011-03-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
7548
7549         * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
7550
7551 2011-03-06  Yao Qi  <yao@codesourcery.com>
7552
7553         * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
7554
7555 2011-03-05  Yao Qi  <yao@codesourcery.com>
7556
7557         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7558         (subdir_do): New make target.  Copied from gdb/Makefile.
7559         (maintainer-clean, realclean, distclean, clean): Call corresponding
7560         make targets in common/Makefile.
7561
7562 2011-03-04  Yao Qi  <yao@codesourcery.com>
7563
7564         * Makefile.in: Remove GNU make feature --directory.
7565
7566 2011-03-04  Michael Snyder  <msnyder@vmware.com>
7567
7568         * server.c (queue_stop_reply): Call xmalloc not malloc.
7569
7570 2011-03-02  Michael Snyder  <msnyder@vmware.com>
7571
7572         * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7573
7574 2011-02-28  Michael Snyder  <msnyder@vmware.com>
7575
7576         * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7577         (cmd_qtframe): Ditto.
7578         (cmd_qtbuffer): Ditto.
7579         (cmd_bigqtbuffer): Ditto.
7580
7581         * utils.c (decimal2str): Initialize 'width' to nine, then
7582         don't mess with it.
7583
7584 2011-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
7585
7586         * hostio.c (require_data): Free *data, not data.
7587
7588 2011-02-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
7589
7590         * hostio.c (require_data): Use free, not xfree.
7591
7592 2011-02-27  Michael Snyder  <msnyder@vmware.com>
7593
7594         * server.c (handle_query): Discard unused value.
7595
7596         * hostio.c (require_data): Free malloc memory before returning
7597         error.
7598
7599 2011-02-26  Michael Snyder  <msnyder@vmware.com>
7600
7601         * linux-low.c (list_threads): Call closedir for dirent.
7602
7603 2011-02-27  Michael Snyder  <msnyder@vmware.com>
7604
7605         * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7606         a case statement falls through.
7607
7608         * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7609
7610         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7611         in comparison.
7612
7613 2011-02-26  Michael Snyder  <msnyder@vmware.com>
7614
7615         * utils.c (decimal2str): Eliminate dead code and dead param.
7616         (pulongest): Drop dead param from call to decimal2str.
7617         (plongest): Ditto.
7618
7619 2011-02-24  Joel Brobecker  <brobecker@adacore.com>
7620
7621         Revert the following patch (not approved yet):
7622         2011-02-21  Hui Zhu  <teawater@gmail.com>
7623         * tracepoint.c (tp_printf): New function.
7624         (eval_agent_expr): Handle gdb_agent_op_printf.
7625
7626 2011-02-21  Hui Zhu  <teawater@gmail.com>
7627
7628         * tracepoint.c (tp_printf): New function.
7629         (eval_agent_expr): Handle gdb_agent_op_printf.
7630
7631 2011-02-18  Tom Tromey  <tromey@redhat.com>
7632
7633         * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7634         (tracepoint.o): Likewise.
7635         * tracepoint.c (enum gdb_agent_op): Use ax.def.
7636         (gdb_agent_op_names): Likewise.
7637
7638 2011-02-18  Tom Tromey  <tromey@redhat.com>
7639
7640         * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7641         gdb_agent_op_rot>: New constants.
7642         (gdb_agent_op_names): Add pick and roll.
7643         (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7644         cases.
7645
7646 2011-02-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
7647
7648         * aclocal.m4: Regenerated with aclocal-1.11.1.
7649
7650 2011-02-14  Pedro Alves  <pedro@codesourcery.com>
7651
7652         * server.c (handle_qxfer_traceframe_info): New.
7653         (qxfer_packets): Register "traceframe-info".
7654         (handle_query): Report support for qXfer:traceframe-info:read+.
7655         * tracepoint.c (match_blocktype): New.
7656         (traceframe_find_block_type): Rename to ...
7657         (traceframe_walk_blocks): ... this.  Add callback filter argument,
7658         and use it.
7659         (traceframe_find_block_type): New, reimplemented on top of
7660         traceframe_walk_blocks.
7661         (build_traceframe_info_xml): New.
7662         (traceframe_read_info): New.
7663         * server.h (traceframe_read_info): Declare.
7664
7665 2011-02-11  Yao Qi  <yao@codesourcery.com>
7666
7667         * configure.ac: Call AC_PROG_RANLIB.
7668         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
7669         * configure: Regenerate.
7670
7671 2011-02-07  Pedro Alves  <pedro@codesourcery.com>
7672
7673         * server.c (gdb_read_memory): Change return semantics to allow
7674         partial transfers.
7675         (handle_search_memory_1): Adjust.
7676         (process_serial_event) <'m' packet>: Handle partial transfers.
7677         * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7678
7679 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
7680
7681         * regcache.c (init_register_cache): Initialize
7682         regcache->register_status.
7683         (free_register_cache): Release regcache->register_status.
7684         (regcache_cpy): Copy register_status.
7685         (registers_to_string): Print 'x's for unavailable registers.
7686         (supply_register): Mark the register's status valid or
7687         unavailable, depending on whether a buffer was passed in or not.
7688         (supply_register_zeroed): New.
7689         (supply_regblock): Mark the registers' status valid or
7690         unavailable, depending on whether a buffer was passed in or not.
7691         * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7692         (struct regcache): New `register_status' field.
7693         (supply_register_zeroed): Declare.
7694         * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7695         supply_register_zeroed, rather than passing a NULL buffer to
7696         supply_register.
7697         * tracepoint.c (fetch_traceframe_registers): Update comment.
7698
7699 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
7700
7701         * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7702         buffer explicit.
7703
7704 2011-01-25  Pedro Alves  <pedro@codesourcery.com>
7705
7706         * server.h (decode_xfer_write): Change prototype.
7707         * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7708         and don't extract the annex here.
7709         * server.c (decode_xfer_read): Remove `annex' parameter,
7710         and don't extract the annex here.
7711         (decode_xfer): New.
7712         (struct qxfer): New.
7713         (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7714         (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7715         (handle_qxfer_statictrace): New functions, abstracted out from
7716         handle_query, and made to use the struct qxfer interface.
7717         (handle_threads_qxfer_proper): Rename to ...
7718         (handle_qxfer_threads_proper): ... this.
7719         (handle_threads_qxfer): Rename to ...
7720         (handle_qxfer_threads): ... this.  Adjust.
7721         (qxfer_packets): New array.
7722         (handle_qxfer): New function.
7723         (handle_query): Use handle_qxfer.
7724
7725 2011-01-05  Michael Snyder  <msnyder@msnyder-server.eng.vmware.com>
7726
7727         * gdbreplay.c: Shorten lines of >= 80 columns.
7728         * linux-low.c: Ditto.
7729         * linux-ppc-low.c: Ditto.
7730         * linux-s390-low.c: Ditto.
7731         * linux-sparc-low.c: Ditto.
7732         * linux-x86-low.c: Ditto.
7733         * linux-xtensa-low.c: Ditto.
7734         * mem-break.c: Ditto.
7735         * nto-low.c: Ditto.
7736         * regcache.h: Ditto.
7737         * remote-utils.c: Ditto.
7738         * server.c: Ditto.
7739         * server.h: Ditto.
7740         * thread-db.c: Ditto.
7741         * tracepoint.c: Ditto.
7742         * utils.c: Ditto.
7743         * win32-low.h: Ditto.
7744
7745 2011-01-05  Joel Brobecker  <brobecker@adacore.com>
7746
7747         * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7748         update.
7749
7750 2011-01-01  Joel Brobecker  <brobecker@adacore.com>
7751
7752         * server.c (gdbserver_version): Update copyright year in version
7753         output.
7754         * gdbreplay.c (gdbreplay_version): Ditto.
7755
7756 2010-12-29  Jie Zhang  <jie.zhang@analog.com>
7757
7758         * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7759         * linux-bfin-low.c: New file.
7760         * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7761         PT_DATA_ADDR for BFIN targets.
7762         * Makefile.in (SFILES): Add linux-bfin-low.c.
7763         (clean): Remove reg-bfin.c.
7764         (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7765         * README: Mention supported Blackfin targets.
7766
7767 2010-12-23  Mike Frysinger  <vapier@gentoo.org>
7768
7769         * .gitignore: New file.
7770
7771 2010-11-16  Mike Frysinger  <vapier@gentoo.org>
7772
7773         * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7774
7775 2010-10-22  Jie Zhang  <jie@codesourcery.com>
7776
7777         * Makefile.in: Add FLAGS_TO_PASS variable.
7778         (install): Remove dependency of install-only and recursively
7779         invoke make for install-only.
7780
7781 2010-10-04  Doug Evans  <dje@google.com>
7782
7783         * Makefile.in (uninstall): Use $(DESTDIR).
7784
7785 2010-09-24  Pedro Alves  <pedro@codesourcery.com>
7786
7787         PR gdb/11842
7788
7789         * linux-x86-low.c (compat_siginfo_from_siginfo)
7790         (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7791         si_code is < 0.  Check for si_code == SI_TIMER before checking for
7792         si_code < 0.
7793
7794 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
7795
7796         * lynx-i386-low.c: New file.
7797         * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7798
7799 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
7800
7801         * lynx-low.c (ptrace_request_to_str): Remove handling for
7802         request values that have been removed in LynxOS 5.x.
7803
7804 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
7805
7806         * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7807         <ptrace.h>
7808
7809 2010-09-09  Nathan Sidwell  <nathan@codesourcery.com>
7810
7811         * configure.ac: Add --enable-inprocess-agent option.
7812         * configure: Rebuilt.
7813
7814 2010-09-06  Yao Qi  <yao@codesourcery.com>
7815
7816         * linux-low.c (linux_kill): Remove unused variable.
7817         (linux_stabilize_threads): Likewise.
7818         * server.c (start_inferior): Likewise.
7819         (queue_stop_reply_callback): Likewise.
7820         * tracepoint.c (do_action_at_tracepoint): Likewise.
7821
7822 2010-09-06  Yao Qi  <yao@codesourcery.com>
7823
7824         * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7825         on return.
7826
7827 2010-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
7828
7829         * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7830
7831 2010-09-06  Pedro Alves  <pedro@codesourcery.com>
7832
7833         * Makefile.in (install-only): Replace $IPA_DEPFILES with
7834         "$(IPA_DEPFILES)".
7835
7836 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
7837
7838         * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7839         gdbserver/lynx-ppc-low.c: New files.
7840         * Makefile.in (lynx_low_h): New variable.
7841         (lynx-low.o, lynx-ppc-low.o): New rules.
7842         * configure.ac: On LynxOS, link with -lnetinet.
7843         * configure.srv: Add handling of powerpc-*-lynxos* targets.
7844         * configure: regenerate.
7845
7846 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
7847
7848         * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7849         * configure.ac: Add check for vasprintf and vsnprintf.
7850         * configure, config.in: Regenerate.
7851         * server.h (vasprintf, vsnprintf): Add conditional declarations.
7852
7853 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
7854
7855         * gdbreplay.c: Move include of alloca.h up, next to include of
7856         malloc.h.
7857         * server.h: Add include of malloc.h.
7858         * mem-break.c: Remove include of malloc.h.
7859         * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7860
7861 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
7862
7863         * Makefile.in (memmem.o): Build with -Wno-error.
7864
7865 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
7866
7867         * utils.c (xsnprintf): Make non-static.
7868         * server.h: Add xsnprintf declaration.
7869         * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7870         replace calls to snprintf by calls to xsnprintf throughout.
7871
7872 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
7873
7874         * configure.ac: Add configure check for alloca.
7875         * configure, config.in: Regenerate.
7876         * server.h: Include alloca.h if it exists.
7877         * gdbreplay.c: Include alloca.h if it exists.
7878
7879 2010-08-28  Pedro Alves  <pedro@codesourcery.com>
7880
7881         * linux-low.c (__SIGRTMIN): Define if not already defined.
7882         (linux_create_inferior): Check for __ANDROID__ rather than
7883         __SIGRTMIN.
7884         (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7885         are already deferred.
7886         (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7887         (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7888         stopped and already has a pending signal to report.
7889         (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7890         a pending signal to report or is moving out of a jump pad.
7891         (linux_init_signals): Check for __ANDROID__ rather than
7892         __SIGRTMIN.
7893
7894 2010-08-28  Pedro Alves  <pedro@codesourcery.com>
7895
7896         * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7897         debug_threads check.  Avoid a linear search when not doing debug
7898         output.
7899
7900 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
7901
7902         * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7903         (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7904         (struct file_handler) <fd>: Change type to gdb_fildes_t.
7905         (process_event): Change local fd's type to gdb_fildes_t.
7906         (create_file_handler): Adjust prototype.
7907         (delete_file_handler): Adjust prototype.
7908         (handle_file_event): Adjust prototype.  Use pfildes.
7909         (create_file_event): Adjsut prototype.
7910         * remote-utils.c (remote_desc, listen_desc): Change type to
7911         gdb_fildes_t.
7912         * server.h: New gdb_fildes_t typedef.
7913         [USE_WIN32API]: Include winsock2.h.
7914         (delete_file_handler, add_file_handler): Adjust prototypes.
7915         (pfildes): Declare.
7916         * utils.c (pfildes): New.
7917
7918 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
7919
7920         * configure.ac (build_warnings): Add -Wno-char-subscripts.
7921         * configure: Regenerate.
7922
7923 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
7924
7925         * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7926         (linux_done_accessing_memory): ... this.
7927         (linux_target_ops): Adjust.
7928         * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7929         * nto-low.c (nto_target_ops): Adjust comment.
7930         * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7931         * spu-low.c (spu_target_ops): Adjust comment.
7932         * target.h (target_ops): Rename unprepare_to_access_memory field
7933         to done_accessing_memory.
7934         (unprepare_to_access_memory): Rename to ...
7935         (done_accessing_memory): ... this.
7936
7937 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
7938
7939         * linux-low.c (linux_prepare_to_access_memory): New.
7940         (linux_unprepare_to_access_memory): New.
7941         (linux_target_ops): Install them.
7942         * server.c (read_memory): Rename to ...
7943         (gdb_read_memory): ... this.  Use
7944         prepare_to_access_memory/prepare_to_access_memory.
7945         (write_memory): Rename to ...
7946         (gdb_write_memory): ... this.  Use
7947         prepare_to_access_memory/prepare_to_access_memory.
7948         (handle_search_memory_1): Adjust.
7949         (process_serial_event): Adjust.
7950         * target.h (struct target_ops): New fields
7951         prepare_to_access_memory and unprepare_to_access_memory.
7952         (prepare_to_access_memory, unprepare_to_access_memory): New.
7953         * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7954         prepare_to_access_memory/prepare_to_access_memory.
7955         * nto-low.c (nto_target_ops): Adjust.
7956         * spu-low.c (spu_target_ops): Adjust.
7957         * win32-low.c (win32_target_ops): Adjust.
7958
7959 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
7960
7961         * Makefile.in (WARN_CFLAGS): Get it from configure.
7962         (WERROR_CFLAGS): New.
7963         (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7964         * configure.ac: Introduce --enable-werror, which adds -Werror to
7965         the compiler command line.  Enabled by default.  Disable with
7966         --disable-werror.  Add -Wdeclaration-after-statement
7967         Wpointer-arith and -Wformat-nonliteral to warning flags.
7968         * configure: Regenerate.
7969
7970 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
7971
7972         * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7973
7974 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
7975
7976         * gdbreplay.c (remote_error): New.
7977         (gdbchar): New.
7978         (expect): Use gdbchar.  Check for error reading from GDB.
7979         Clarify sync error output.
7980         (play): Check for errors writing to GDB.
7981         * linux-low.c (sigchld_handler): Really ignore `write' errors.
7982         * remote-utils.c (getpkt): Check for errors writing to the remote
7983         descriptor.
7984
7985 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
7986
7987         * linux-low.c (linux_wait_1): Move non-debugging code out of
7988         `debug_threads' control.
7989
7990 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
7991
7992         * linux-low.c (linux_wait_1): Don't set last_status here.
7993         * server.c (push_event, queue_stop_reply_callback): Assert we're
7994         not pushing a TARGET_WAITKIND_IGNORE event.
7995         (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7996         (myresume, handle_target_event): Set the thread's last_resume_kind
7997         and last_status from the target returned status.
7998
7999 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
8000
8001         PR threads/10729
8002
8003         * linux-x86-low.c (update_debug_registers_callback): New.
8004         (i386_dr_low_set_addr): Use it.
8005         (i386_dr_low_get_addr): New.
8006         (i386_dr_low_set_control): Use update_debug_registers_callback.
8007         (i386_dr_low_get_control): New.
8008         (i386_dr_low_get_status): Adjust.
8009         * linux-low.c (linux_stop_lwp): New.
8010         * linux-low.h (linux_stop_lwp): Declare.
8011
8012         * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
8013         argument instead of a i386_debug_reg_state.
8014         (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
8015         a i386_debug_reg_state.
8016         (i386_insert_aligned_watchpoint): Adjust.
8017         (i386_remove_aligned_watchpoint): Adjust.
8018         (i386_low_stopped_data_address): Read the debug registers from the
8019         inferior instead of from the mirrors.
8020         * i386-low.h (struct i386_debug_reg_state): Extend comment.
8021         (i386_dr_low_get_addr): Declare.
8022         (i386_dr_low_get_control): Declare.
8023         (i386_dr_low_get_status): Change prototype.
8024
8025         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
8026         (i386_dr_low_get_addr): New.
8027         (i386_dr_low_get_control): New.
8028         (i386_dr_low_get_status): Adjust prototype.  Return
8029         dr_status_mirror.
8030         (i386_initial_stuff): Clear dr_status_mirror and
8031         dr_control_mirror.
8032         (i386_get_thread_context): Adjust.
8033         (i386_set_thread_context): Adjust.
8034         (i386_thread_added): Adjust.
8035
8036 2010-08-24  Pedro Alves  <pedro@codesourcery.com>
8037
8038         * linux-low.h (linux_thread_area): Delete declaration.
8039
8040 2010-08-11  Thomas Schwinge  <thomas@codesourcery.com>
8041
8042         * linux-low.c (linux_wait_1): Correctly return the ptid of the child
8043         after its termination.
8044
8045 2010-08-09  Pedro Alves  <pedro@codesourcery.com>
8046
8047         * linux-low.c (gdb_wants_lwp_stopped): Delete.
8048         (gdb_wants_all_stopped): Delete.
8049         (linux_wait_1): Don't call them.
8050         * server.c (handle_v_cont): Tag all threads as want-stopped.
8051         (gdb_wants_thread_stopped): Fix comments.  Tag the thread that
8052         stopped as "client-wants-stopped".
8053
8054 2010-07-31  Pedro Alves  <pedro@codesourcery.com>
8055
8056         * Makefile.in (signals_h): New.
8057         (server_h): Depend on it.
8058         (server.o): Don't depend on $(signals_def).
8059         (signals.o): Depend on $(signals_def).
8060
8061 2010-07-31  Jan Kratochvil  <jan.kratochvil@redhat.com>
8062
8063         * Makefile.in (signals_def): New.
8064         (server_h): Append include/gdb/signals.h and signals_def.
8065         (server.o): Append signals_def.
8066
8067 2010-07-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
8068
8069         * server.c (handle_target_event): Use target_signal_to_host for
8070         resume_info.sig initialization.
8071         * target.h (struct thread_resume) <sig>: New comment.
8072
8073 2010-07-20  Ozkan Sezer  <sezeroz@gmail.com>
8074
8075         * server.c (handle_query): strcpy() the returned string from paddress()
8076         instead of sprintf().
8077         * utils.c (paddress): Return phex_nz().
8078
8079 2010-07-07  Joel Brobecker  <brobecker@adacore.com>
8080
8081         * server.c (handle_v_cont): Call mourn_inferior if process
8082         just exited.
8083         (myresume): Likewise.
8084
8085 2010-07-01  Pedro Alves  <pedro@codesourcery.com>
8086
8087         Static tracepoints, and integration with UST.
8088
8089         * configure.ac: Handle --with-ust.  substitute ustlibs and ustinc.
8090         * mem-break.c (uninsert_all_breakpoints)
8091         (reinsert_all_breakpoints): New.
8092         * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
8093         * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
8094         (gdb_agent_ust_loaded, helper_thread_id)
8095         (gdb_agent_helper_thread_id): New macros.
8096         (struct ipa_sym_addresses): Add addr_ust_loaded,
8097         addr_helper_thread_id, addr_cmd_buf.
8098         (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
8099         (in_process_agent_loaded_ust): New.
8100         (write_e_ust_not_loaded): New.
8101         (maybe_write_ipa_ust_not_loaded): New.
8102         (struct collect_static_trace_data_action): New.
8103         (enum tracepoint_type) <static_tracepoint>: New.
8104         (struct tracepoint) <handle>: Mention static tracepoints.
8105         (struct static_tracepoint_ctx): New.
8106         (CMD_BUF_SIZE): New.
8107         (add_tracepoint_action): Handle static tracepoint actions.
8108         (unprobe_marker_at): New.
8109         (clear_installed_tracepoints): Handle static tracepoints.
8110         (cmd_qtdp): Handle static tracepoints.
8111         (probe_marker_at): New.
8112         (cmd_qtstart): Handle static tracepoints.
8113         (response_tracepoint): Handle static tracepoints.
8114         (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
8115         (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
8116         (get_context_regcache): Handle static tracepoints.
8117         (do_action_at_tracepoint): Handle static tracepoint actions.
8118         (traceframe_find_block_type): Handle static trace data blocks.
8119         (traceframe_read_sdata): New.
8120         (download_tracepoints): Download static tracepoint actions.
8121         [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
8122         (GDB_PROBE_NAME): New.
8123         (ust_ops): New.
8124         (GET_UST_SYM): New.
8125         (USTF): New.
8126         (dlsym_ust): New.
8127         (ust_marker_to_static_tracepoint): New.
8128         (gdb_probe): New.
8129         (collect_ust_data_at_tracepoint): New.
8130         (gdb_ust_probe): New.
8131         (UNIX_PATH_MAX, SOCK_DIR): New.
8132         (gdb_ust_connect_sync_socket): New.
8133         (resume_thread, stop_thread): New.
8134         (run_inferior_command): New.
8135         (init_named_socket): New.
8136         (gdb_ust_socket_init): New.
8137         (cstr_to_hexstr): New.
8138         (next_st): New.
8139         (first_marker, next_marker): New.
8140         (response_ust_marker): New.
8141         (cmd_qtfstm, cmd_qtsstm): New.
8142         (unprobe_marker_at, probe_marker_at): New.
8143         (cmd_qtstmat, gdb_ust_thread): New.
8144         (gdb_ust_init): New.
8145         (initialize_tracepoint_ftlib): Call gdb_ust_init.
8146         * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
8147         (ST_REGENTRY): New.
8148         (x86_64_st_collect_regmap): New.
8149         (X86_64_NUM_ST_COLLECT_GREGS): New.
8150         (AMD64_RIP_REGNUM): New.
8151         (supply_static_tracepoint_registers): New.
8152         * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
8153         (ST_REGENTRY): New.
8154         (i386_st_collect_regmap): New.
8155         (i386_NUM_ST_COLLECT_GREGS): New.
8156         (supply_static_tracepoint_registers): New.
8157         * server.c (handle_query): Handle qXfer:statictrace:read.
8158         <qSupported>: Report support for StaticTracepoints, and
8159         qXfer:statictrace:read features.
8160         * server.h (traceframe_read_sdata)
8161         (supply_static_tracepoint_registers): Declare.
8162         * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
8163         (unpack_varlen_hex): Include in IPA build.
8164         * Makefile.in (ustlibs, ustinc): New.
8165         (IPA_OBJS): Add remote-utils-ipa.o.
8166         ($(IPA_LIB)): Link -ldl and -lpthread.
8167         (UST_CFLAGS): New.
8168         (IPAGENT_CFLAGS): Add UST_CFLAGS.
8169         * config.in, configure: Regenerate.
8170
8171 2010-06-20  Ian Lance Taylor  <iant@google.com>
8172             Pedro Alves  <pedro@codesourcery.com>
8173
8174         * linux-x86-low.c (always_true): Delete.
8175         (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
8176         trying to fool the compiler with always_true.
8177
8178 2010-06-20  Pedro Alves  <pedro@codesourcery.com>
8179
8180         * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
8181         conditions in gdbserver.
8182
8183 2010-06-19  Ulrich Weigand  <uweigand@de.ibm.com>
8184
8185         * spu-low.c (spu_read_memory): Wrap around local store limit.
8186         (spu_write_memory): Likewise.
8187
8188 2010-06-15  Pedro Alves  <pedro@codesourcery.com>
8189
8190         * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
8191         (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
8192         LONGEST uses.
8193         * server.h (struct emit_ops): Replace int64_t uses with LONGEST
8194         uses.
8195         * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
8196         uses with LONGEST uses.
8197
8198 2010-06-14  Stan Shebs  <stan@codesourcery.com>
8199             Pedro Alves  <pedro@codesourcery.com>
8200
8201         Bytecode compiler.
8202
8203         * linux-x86-low.c: Include limits.h.
8204         (add_insns): New.
8205         (always_true): New.
8206         (EMIT_ASM): New.
8207         (EMIT_ASM32): New.
8208         (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
8209         (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
8210         (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
8211         (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
8212         (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
8213         (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
8214         (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
8215         (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
8216         (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
8217         (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
8218         (amd64_emit_void_call_2): New.
8219         (amd64_emit_ops): New.
8220         (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
8221         (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
8222         (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
8223         (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
8224         (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
8225         (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
8226         (i386_emit_goto, i386_write_goto_address, i386_emit_const)
8227         (i386_emit_call, i386_emit_reg, i386_emit_pop)
8228         (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
8229         (i386_emit_stack_adjust, i386_emit_int_call_1)
8230         (i386_emit_void_call_2): New.
8231         (i386_emit_ops): New.
8232         (x86_emit_ops): New.
8233         (the_low_target): Install x86_emit_ops.
8234         * server.h (struct emit_ops): New.
8235         (get_raw_reg_func_addr): Declare.
8236         (current_insn_ptr, emit_error): Declare.
8237         * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
8238         (set_trace_state_variable_value): New defines.
8239         (struct ipa_sym_addresses): New fields addr_get_raw_reg,
8240         addr_get_trace_state_variable_value and
8241         addr_set_trace_state_variable_value.
8242         (symbol_list): New fields for get_raw_reg,
8243         get_trace_state_variable_value and set_trace_state_variable_value.
8244         (condfn): New typedef.
8245         (struct tracepoint): New field `compiled_cond'.
8246         (do_action_at_tracepoint): Clear compiled_cond.
8247         (get_trace_state_variable_value, set_trace_state_variable_value):
8248         Export in the IPA.
8249         (condition_true_at_tracepoint): If there's a compiled condition,
8250         run that.
8251         (current_insn_ptr, emit_error): New globals.
8252         (struct bytecode_address): New.
8253         (get_raw_reg_func_addr): New.
8254         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
8255         (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
8256         (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
8257         (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
8258         (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
8259         (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
8260         (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
8261         (compile_tracepoint_condition, compile_bytecodes): New.
8262         * target.h (emit_ops): Forward declare.
8263         (struct target_ops): New field emit_ops.
8264         (target_emit_ops): New.
8265         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
8266         * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
8267         * linux-low.c (linux_emit_ops): New.
8268         (linux_target_ops): Install it.
8269         * linux-low.h (struct linux_target_ops): New field emit_ops.
8270
8271 2010-06-14  Ulrich Weigand  <uweigand@de.ibm.com>
8272
8273         * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
8274         * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
8275
8276 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
8277             Stan Shebs  <stan@codesourcery.com>
8278
8279         * Makefile.in (IPA_DEPFILES, extra_libraries): New.
8280         (all): Depend on $(extra_libraries).
8281         (install-only): Install the IPA.
8282         (IPA_OBJS, IPA_LIB): New.
8283         (clean): Remove the IPA lib.
8284         (IPAGENT_CFLAGS): New.
8285         (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
8286         (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
8287         (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
8288         * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
8289         * configure.ac: Check for atomic builtins support in the compiler.
8290         (IPA_DEPFILES, extra_libraries): Define.
8291         * configure.srv (ipa_obj): Add description.
8292         (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
8293         (i[34567]86-*-linux*): Set ipa_obj.
8294         (x86_64-*-linux*): Set ipa_obj.
8295         * linux-low.c (stabilizing_threads): New.
8296         (supports_fast_tracepoints): New.
8297         (linux_detach): Stabilize threads before detaching.
8298         (handle_tracepoints): Handle internal tracing breakpoints.  Assert
8299         the lwp is either not stabilizing, or is moving out of a jump pad.
8300         (linux_fast_tracepoint_collecting): New.
8301         (maybe_move_out_of_jump_pad): New.
8302         (enqueue_one_deferred_signal): New.
8303         (dequeue_one_deferred_signal): New.
8304         (linux_wait_for_event_1): If moving out of a jump pad, defer
8305         pending signals to later.
8306         (linux_stabilize_threads): New.
8307         (linux_wait_1): Check if threads need moving out of jump pads, and
8308         do it if so.
8309         (stuck_in_jump_pad_callback): New.
8310         (move_out_of_jump_pad_callback): New.
8311         (lwp_running): New.
8312         (linux_resume_one_lwp): Handle moving out of jump pads.
8313         (linux_set_resume_request): Dequeue deferred signals.
8314         (need_step_over_p): Also step over fast tracepoint jumps.
8315         (start_step_over): Also uninsert fast tracepoint jumps.
8316         (finish_step_over): Also reinsert fast tracepoint jumps.
8317         (linux_install_fast_tracepoint_jump): New.
8318         (linux_target_ops): Install linux_stabilize_threads and
8319         linux_install_fast_tracepoint_jump_pad.
8320         * linux-low.h (linux_target_ops) <get_thread_area,
8321         install_fast_tracepoint_jump_pad>: New fields.
8322         (struct lwp_info) <collecting_fast_tracepoint,
8323         pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
8324         (linux_get_thread_area): Declare.
8325         * linux-x86-low.c (jump_insn): New.
8326         (x86_get_thread_area): New.
8327         (append_insns): New.
8328         (push_opcode): New.
8329         (amd64_install_fast_tracepoint_jump_pad): New.
8330         (i386_install_fast_tracepoint_jump_pad): New.
8331         (x86_install_fast_tracepoint_jump_pad): New.
8332         (the_low_target): Install x86_get_thread_area and
8333         x86_install_fast_tracepoint_jump_pad.
8334         * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
8335         (struct fast_tracepoint_jump): New.
8336         (fast_tracepoint_jump_insn): New.
8337         (fast_tracepoint_jump_shadow): New.
8338         (find_fast_tracepoint_jump_at): New.
8339         (fast_tracepoint_jump_here): New.
8340         (delete_fast_tracepoint_jump): New.
8341         (set_fast_tracepoint_jump): New.
8342         (uninsert_fast_tracepoint_jumps_at): New.
8343         (reinsert_fast_tracepoint_jumps_at): New.
8344         (set_breakpoint_at): Use write_inferior_memory.
8345         (uninsert_raw_breakpoint): Use write_inferior_memory.
8346         (check_mem_read): Mask out fast tracepoint jumps.
8347         (check_mem_write): Mask out fast tracepoint jumps.
8348         * mem-break.h (struct fast_tracepoint_jump): Forward declare.
8349         (set_fast_tracepoint_jump): Declare.
8350         (delete_fast_tracepoint_jump)
8351         (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
8352         (reinsert_fast_tracepoint_jumps_at): Declare.
8353         * regcache.c: Don't compile many functions when building the
8354         in-process agent library.
8355         (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
8356         the register buffer in the heap.
8357         (free_register_cache): If the register buffer isn't owned by the
8358         regcache, don't free it.
8359         (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
8360         pre-existing register caches.
8361         * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
8362         type.
8363         (convert_ascii_to_int): : Constify `from' parameter type.
8364         (decode_M_packet, decode_X_packet): Replace the `to' parameter by
8365         a `to_p' pointer to pointer parameter.  If TO_P is NULL, malloc
8366         the needed buffer in-place.
8367         (relocate_instruction): New.
8368         * server.c (handle_query) <qSymbols>: If the target supports
8369         tracepoints, give it a chance of looking up symbols.  Report
8370         support for fast tracepoints.
8371         (handle_status): Stabilize threads.
8372         (process_serial_event): Adjust.
8373         * server.h (struct fast_tracepoint_jump): Forward declare.
8374         (struct process_info) <fast_tracepoint_jumps>: New field.
8375         (convert_ascii_to_int, convert_int_to_ascii): Adjust.
8376         (decode_X_packet, decode_M_packet): Adjust.
8377         (relocate_instruction): Declare.
8378         (in_process_agent_loaded): Declare.
8379         (tracepoint_look_up_symbols): Declare.
8380         (struct fast_tpoint_collect_status): Declare.
8381         (fast_tracepoint_collecting): Declare.
8382         (force_unlock_trace_buffer): Declare.
8383         (handle_tracepoint_bkpts): Declare.
8384         (initialize_low_tracepoint)
8385         (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
8386         * target.h (struct target_ops) <stabilize_threads,
8387         install_fast_tracepoint_jump_pad>: New fields.
8388         (stabilize_threads, install_fast_tracepoint_jump_pad): New.
8389         * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
8390         [HAVE_STDINT_H]: Include stdint.h.
8391         (trace_debug_1): Rename to ...
8392         (trace_vdebug): ... this.
8393         (trace_debug): Rename to ...
8394         (trace_debug_1): ... this.  Add `level' parameter.
8395         (trace_debug): New.
8396         (ATTR_USED, ATTR_NOINLINE): New.
8397         (IP_AGENT_EXPORT): New.
8398         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8399         (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
8400         (about_to_request_buffer_space, trace_buffer_is_full)
8401         (stopping_tracepoint, expr_eval_result, error_tracepoint)
8402         (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
8403         (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
8404         (traceframe_write_count, traceframes_created)
8405         (trace_state_variables)
8406         New renaming defines.
8407         (struct ipa_sym_addresses): New.
8408         (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
8409         (symbol_list): New.
8410         (ipa_sym_addrs): New.
8411         (all_tracepoint_symbols_looked_up): New.
8412         (in_process_agent_loaded): New.
8413         (write_e_ipa_not_loaded): New.
8414         (maybe_write_ipa_not_loaded): New.
8415         (tracepoint_look_up_symbols): New.
8416         (debug_threads) [IN_PROCESS_AGENT]: New.
8417         (read_inferior_memory) [IN_PROCESS_AGENT]: New.
8418         (UNKNOWN_SIDE_EFFECTS): New.
8419         (stop_tracing): New.
8420         (flush_trace_buffer): New.
8421         (stop_tracing_bkpt): New.
8422         (flush_trace_buffer_bkpt): New.
8423         (read_inferior_integer): New.
8424         (read_inferior_uinteger): New.
8425         (read_inferior_data_pointer): New.
8426         (write_inferior_data_pointer): New.
8427         (write_inferior_integer): New.
8428         (write_inferior_uinteger): New.
8429         (struct collect_static_trace_data_action): Delete.
8430         (enum tracepoint_type): New.
8431         (struct tracepoint) <type>: New field `type'.
8432         <actions_str, step_actions, step_actions_str>: Only include in
8433         GDBserver.
8434         <orig_size, obj_addr_on_target, adjusted_insn_addr>
8435         <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
8436         (tracepoints): Use IP_AGENT_EXPORT.
8437         (last_tracepoint): Don't include in the IPA.
8438         (stopping_tracepoint): Use IP_AGENT_EXPORT.
8439         (trace_buffer_is_full): Use IP_AGENT_EXPORT.
8440         (alloced_trace_state_variables): New.
8441         (trace_state_variables): Use IP_AGENT_EXPORT.
8442         (traceframe_t): Delete unused variable.
8443         (circular_trace_buffer): Don't include in the IPA.
8444         (trace_buffer_start): Delete.
8445         (struct trace_buffer_control): New.
8446         (trace_buffer_free): Delete.
8447         (struct ipa_trace_buffer_control): New.
8448         (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
8449         (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
8450         New.
8451         (trace_buffer_ctrl): New.
8452         (TRACE_BUFFER_CTRL_CURR): New.
8453         (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
8454         Reimplement as macros.
8455         (trace_buffer_wrap): Delete.
8456         (traceframe_write_count, traceframe_read_count)
8457         (traceframes_created, tracing): Use IP_AGENT_EXPORT.
8458         (struct tracepoint_hit_ctx) <type>: New field.
8459         (struct fast_tracepoint_ctx): New.
8460         (memory_barrier): New.
8461         (cmpxchg): New.
8462         (record_tracepoint_error): Update atomically in the IPA.
8463         (clear_inferior_trace_buffer): New.
8464         (about_to_request_buffer_space): New.
8465         (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
8466         updating the same buffer.
8467         (add_tracepoint): Default the tracepoint's type to trap
8468         tracepoint, and orig_size to -1.
8469         (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
8470         internal variables.
8471         (create_trace_state_variable): New parameter `gdb'.  Handle it.
8472         (clear_installed_tracepoints): Clear fast tracepoint jumps.
8473         (cmd_qtdp): Handle fast tracepoints.
8474         (cmd_qtdv): Adjust.
8475         (max_jump_pad_size): New.
8476         (gdb_jump_pad_head): New.
8477         (get_jump_space_head): New.
8478         (claim_jump_space): New.
8479         (sort_tracepoints): New.
8480         (MAX_JUMP_SIZE): New.
8481         (cmd_qtstart): Handle fast tracepoints.  Sync tracepoints with the
8482         IPA.
8483         (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
8484         support.  Upload fast traceframes, and delete internal IPA
8485         breakpoints.
8486         (stop_tracing_handler): New.
8487         (flush_trace_buffer_handler): New.
8488         (cmd_qtstop): Upload fast tracepoints.
8489         (response_tracepoint): Handle fast tracepoints.
8490         (tracepoint_finished_step): Upload fast traceframes.  Set the
8491         tracepoint hit context's tracepoint type.
8492         (handle_tracepoint_bkpts): New.
8493         (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
8494         type.  Add comment about fast tracepoints.
8495         (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
8496         non-existing action_str field.
8497         (get_context_regcache): Handle fast tracepoints.
8498         (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
8499         to the regcache.
8500         (fast_tracepoint_from_jump_pad_address): New.
8501         (fast_tracepoint_from_ipa_tpoint_address): New.
8502         (collecting_t): New.
8503         (force_unlock_trace_buffer): New.
8504         (fast_tracepoint_collecting): New.
8505         (collecting): New.
8506         (gdb_collect): New.
8507         (write_inferior_data_ptr): New.
8508         (target_tp_heap): New.
8509         (target_malloc): New.
8510         (download_agent_expr): New.
8511         (UALIGN): New.
8512         (download_tracepoints): New.
8513         (download_trace_state_variables): New.
8514         (upload_fast_traceframes): New.
8515         (IPA_FIRST_TRACEFRAME): New.
8516         (IPA_NEXT_TRACEFRAME_1): New.
8517         (IPA_NEXT_TRACEFRAME): New.
8518         [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
8519         [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
8520         (gdb_jump_pad_buffer_end): New.
8521         [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
8522         (initialize_tracepoint): Adjust.
8523         [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
8524         buffer.  Initialize the low module.
8525         * utils.c (PREFIX, TOOLNAME): New.
8526         (malloc_failure): Use PREFIX.
8527         (error): In the IPA, an error causes an exit.
8528         (fatal, warning): Use PREFIX.
8529         (internal_error): Use TOOLNAME.
8530         (NUMCELLS): Increase to 10.
8531         * configure, config.in: Regenerate.
8532
8533 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
8534
8535         * server.c (handle_query) <qSupported>: Do two passes over the
8536         qSupported string to avoid nesting strtok.
8537
8538 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
8539
8540         * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
8541         (CDEPS): New.
8542         * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping.  Test also
8543         -Wl,--dynamic-list.
8544         * configure: Regenerate.
8545         * proc-service.list: New.
8546
8547 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
8548
8549         * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
8550         New comment.
8551
8552 2010-05-26  Ozkan Sezer  <sezeroz@gmail.com>
8553
8554         * gdbreplay.c (remote_open): Check error return from socket() call by
8555         its equality to -1 not by it being negative.
8556         * remote-utils.c (remote_open): Likewise.
8557
8558 2010-05-23  Pedro Alves  <pedro@codesourcery.com>
8559
8560         * config.h: Regenerate.
8561
8562 2010-05-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
8563
8564         * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8565         doesn't provide PTRACE_GET_THREAD_AREA.
8566
8567 2010-05-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
8568
8569         * linux-m68k-low.c: Include <asm/ptrace.h>
8570         (ps_get_thread_area): Implement.
8571
8572 2010-05-03  Doug Evans  <dje@google.com>
8573
8574         * event-loop.c (struct callback_event): New struct.
8575         (callback_list): New global.
8576         (append_callback_event, delete_callback_event): New functions.
8577         (process_callback): New function.
8578         (start_event_loop): Call it.
8579         * remote-utils.c (NOT_SCHEDULED): Define.
8580         (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8581         moved out of readchar.
8582         (readchar): Rewrite.  Call reschedule before returning.
8583         (reset_readchar): New function.
8584         (remote_close): Call it.
8585         (process_remaining, reschedule): New functions.
8586         * server.h (callback_handler_func): New typedef.
8587         (append_callback_event, delete_callback_event): Declare.
8588
8589 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
8590
8591         * proc-service.c (ps_pglobal_lookup): Use
8592         thread_db_look_up_one_symbol.
8593         * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8594         parameter.  Use it instead of all_symbols_looked_up.
8595         * server.h (struct process_info) <all_symbols_looked_up>: Delete
8596         field.
8597         (all_symbols_looked_up): Don't declare.
8598         (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8599         * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8600         field.
8601         (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8602         Set all_symbols_looked_up here.
8603         (thread_db_look_up_one_symbol): New.
8604         (thread_db_get_tls_address): Adjust.
8605         (thread_db_load_search, try_thread_db_load_1): Always allocate the
8606         thread_db object on the heap, and tentatively set it in the
8607         process structure.
8608         (thread_db_init): Don't set all_symbols_looked_up here.
8609         * linux-low.h (thread_db_look_up_one_symbol): Declare.
8610
8611 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
8612
8613         * linux-low.c (linux_kill, linux_detach): Adjust.
8614         (status_pending_p_callback): Remove redundant statement.  Check
8615         for !TARGET_WAITIKIND_IGNORE, instead of
8616         TARGET_WAITKIND_STOPPED.
8617         (handle_tracepoints): Make sure LWP is locked.  Adjust.
8618         (linux_wait_for_event_1): Adjust.
8619         (linux_cancel_breakpoints): New.
8620         (unsuspend_one_lwp): New.
8621         (unsuspend_all_lwps): New.
8622         (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8623         (send_sigstop_callback): Change return type to int, add new
8624         `except' parameter and handle it.
8625         (suspend_and_send_sigstop_callback): New.
8626         (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8627         pass them down.  If SUSPEND, also increment the lwp's suspend
8628         count.
8629         (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8630         (need_step_over_p): Don't consider suspended LWPs.
8631         (start_step_over): Adjust.
8632         (proceed_one_lwp): Change return type to int, add new `except'
8633         parameter and handle it.
8634         (unsuspend_and_proceed_one_lwp): New.
8635         (proceed_all_lwps): Use find_inferior instead of
8636         for_each_inferior.
8637         (unstop_all_lwps): Add `unsuspend' parameter.  If UNSUSPEND, them
8638         also decrement the suspend count of LWPs.  Pass `except' down,
8639         instead of hacking its suspend count.
8640         (linux_pause_all): Add `freeze' parameter.  Adjust.
8641         (linux_unpause_all): New.
8642         (linux_target_ops): Install linux_unpause_all.
8643         * server.c (handle_status): Adjust.
8644         * target.h (struct target_ops): New fields `unpause_all' and
8645         `cancel_breakpoints'.  Add new parameter to `pause_all'.
8646         (pause_all): Add new `freeze' parameter.
8647         (unpause_all): New.
8648         (cancel_breakpoints): New.
8649         * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8650         cancel breakpoints.
8651         (cmd_qtstart): Pause threads.
8652         (stop_tracing): Pause threads, and cancel breakpoints.
8653         * win32-low.c (win32_target_ops): Adjust.
8654
8655 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
8656
8657         * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8658         the inferior right away from here...
8659         (linux_wait_1): ... to here, and adjust to check the thread's
8660         last_resume_kind instead of the lwp's step or stop_expected flags.
8661
8662 2010-05-02  Pedro Alves  <pedro@codesourcery.com>
8663
8664         * README: Use consistent `GDB' and `GDBserver' spellings.
8665
8666 2010-05-02  Pedro Alves  <pedro@codesourcery.com>
8667
8668         * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8669         (linux_kill): Stop all lwps here.  Don't delete the main lwp here.
8670         (linux_detach_one_lwp): Assume the lwp is stopped.
8671         (any_thread_of): Delete.
8672         (linux_detach): Stop all lwps here.  Don't blindly delete all
8673         breakpoints.
8674         (delete_lwp_callback): New.
8675         (linux_mourn): Delete all lwps of the process that is gone.
8676         (linux_wait_1): Don't delete the last lwp of the process here.
8677         * mem-break.h (mark_breakpoints_out): Declare.
8678         * mem-break.c (mark_breakpoints_out): New.
8679         (free_all_breakpoints): Use it.
8680         * server.c (handle_target_event): If the process is gone, mark
8681         breakpoints out.
8682         * thread-db.c (struct thread_db) <create_bp>: New field.
8683         (thread_db_enable_reporting): Fix prototype.  Store a thread event
8684         breakpoint reference in the thread_db struct.
8685         (thread_db_load_search): Clear the thread_db object.
8686         (try_thread_db_load_1): Ditto.
8687         (switch_to_process): New.
8688         (disable_thread_event_reporting): Use it.
8689         (remove_thread_event_breakpoints): New.
8690         (thread_db_detach, thread_db_mourn): Use it.
8691
8692 2010-05-01  Pedro Alves  <pedro@codesourcery.com>
8693
8694         * linux-low.c (linux_enable_event_reporting): New.
8695         (linux_wait_for_event_1, handle_extended_wait): Use it.
8696
8697 2010-04-30  Pedro Alves  <pedro@codesourcery.com>
8698
8699         * linux-low.c (linux_kill_one_lwp, linux_kill)
8700         (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8701         (send_sigstop): Take an lwp_info as parameter instead.  Queue a
8702         SIGSTOP even if the LWP is stopped.
8703         (send_sigstop_callback): New.
8704         (stop_all_lwps): Use send_sigstop_callback instead.
8705         (linux_resume_one_thread): Adjust.
8706         (proceed_one_lwp): Still proceed an LWP that the client has
8707         requested to stop, if we haven't reported it as stopped yet.  Make
8708         sure that LWPs the client want stopped, have a pending SIGSTOP.
8709
8710 2010-04-26  Doug Evans  <dje@google.com>
8711
8712         * server.c (handle_general_set): Make static.
8713
8714         * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8715         Print received char after testing for error/eof instead of before.
8716         (input_interrupt): Tweak comment.
8717
8718 2010-04-23  Doug Evans  <dje@google.com>
8719
8720         * server.c (start_inferior): Print inferior argv if --debug.
8721
8722 2010-04-21  Aleksandar Ristovski  <aristovski@qnx.com>
8723
8724         * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8725         * nto-x86-low.c: Include server.h
8726
8727 2010-04-20  Pierre Muller  <muller@ics.u-strasbg.fr>
8728
8729         * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8730         be consistent with other sources of this directory.
8731         (init_registers_amd64): Correct name of source file of this function
8732         in the comment.
8733
8734 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
8735
8736         * configure.srv (x86_64-*-mingw*): New configuration for Windows
8737         64-bit executables.
8738
8739 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
8740
8741         * win32-i386-low.c: Add 64-bit support.
8742         (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8743         (init_registers_amd64): Declare.
8744         (mappings): Add 64-bit version of array.
8745         (init_windows_x86): New function.
8746         (the_low_target): Change init_arch field to init_windows_x86.
8747
8748 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
8749
8750         * win32-low.c: Adapt to support also 64-bit architecture.
8751         (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8752         (get_image_name): Use SIZE_T type for local variable `done'.
8753         (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8754         (toolhelp_get_dll_name): Idem.
8755         (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8756         Use uintptr_t typecast to avoid warning.
8757         (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8758         (handle_exception): Use phex_nz to avoid warning.
8759         (win32_wait): Remove unused local variable `process'.
8760
8761 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
8762
8763         * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8764         `amd64-avx.o'.
8765
8766 2010-04-17  Pierre Muller  <muller@ics.u-strasbg.fr>
8767
8768         * configure.ac: Use `ws2_32' library for srv_mingw.
8769         * configure: Regenerate.
8770         * gdbreplay.c: Include winsock2.h instead of winsock.h.
8771         * remote-utils.c: Likewise.
8772
8773 2010-04-17  H.J. Lu  <hongjiu.lu@intel.com>
8774
8775         * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8776         if __x86_64__ is defined.
8777
8778 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
8779
8780         * configure: Regenerate.
8781
8782 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
8783
8784         * server.c (handle_query): Handle 'qGetTIBAddr' query.
8785         * target.h (target_ops): New get_tib_address field.
8786         * win32-low.h (win32_thread_info): Add thread_local_base field.
8787         * win32-low.c (child_add_thread): Add tlb argument.
8788         Set thread_local_base field to TLB.
8789         (get_child_debug_event): Adapt to child_add_thread change.
8790         (win32_get_tib_address): New function.
8791         (win32_target_ops): Set get_tib_address field to
8792         win32_get_tib_address.
8793         * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8794
8795 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
8796
8797         * linux-low.c (linux_mourn): Also remove the process.
8798         * server.c (handle_target_event): Don't remove the process here.
8799         * nto-low.c (nto_mourn): New.
8800         (nto_target_ops): Install it.
8801         * spu-low.c (spu_mourn): New.
8802         (spu_target_ops): Install it.
8803         * win32-low.c (win32_mourn): New.
8804         (win32_target_ops): Install it.
8805
8806 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
8807
8808         * server.h (buffer_xml_printf): Remove redundant `;'.
8809
8810 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
8811
8812         * regcache.c (set_register_cache): Invalidate regcaches before
8813         changing the register cache layout.
8814         (regcache_invalidate_one): Allow a NULL regcache.
8815         * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8816         regcaches before changing the register cache layout or the target
8817         regsets.
8818
8819 2010-04-12  H.J. Lu  <hongjiu.lu@intel.com>
8820
8821         * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8822         variable warning on Linux/x86-64.
8823
8824 2010-04-11  Pedro Alves  <pedro@codesourcery.com>
8825
8826         GDBserver disconnected tracing support.
8827
8828         * linux-low.c (linux_remove_process): Delete.
8829         (add_lwp): Don't set last_resume_kind here.
8830         (linux_kill): Use `mourn'.
8831         (linux_detach): Use `thread_db_detach', and `mourn'.
8832         (linux_mourn): New.
8833         (linux_attach_lwp_1): Adjust comment.
8834         (linux_attach): last_resume_kind moved the thread_info; adjust.
8835         (status_pending_p_callback): Adjust.
8836         (linux_wait_for_event_1): Adjust.
8837         (count_events_callback, select_singlestep_lwp_callback)
8838         (select_event_lwp_callback, cancel_breakpoints_callback)
8839         (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8840         (proceed_one_lwp): Adjust.
8841         (linux_async): Add debug output.
8842         (linux_thread_stopped): New.
8843         (linux_pause_all): New.
8844         (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8845         linux_pause_all.
8846         * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8847         (thread_db_free): Delete declaration.
8848         (thread_db_detach, thread_db_mourn): Declare.
8849         * thread-db.c (thread_db_init): Use thread_db_mourn.
8850         (thread_db_free): Delete, split in two.
8851         (disable_thread_event_reporting): New.
8852         (thread_db_detach): New.
8853         (thread_db_mourn): New.
8854
8855         * server.h (struct thread_info) <last_resume_kind>: New field.
8856         <attached>: Add comment.
8857         <gdb_detached>: New field.
8858         (handler_func): Change return type to int.
8859         (handle_serial_event, handle_target_event): Ditto.
8860         (gdb_connected): Declare.
8861         (tracing): Delete.
8862         (disconnected_tracing): Declare.
8863         (stop_tracing): Declare.
8864
8865         * server.c (handle_query) <qSupported>: Report support for
8866         disconnected tracing.
8867         (queue_stop_reply_callback): Account for running threads.
8868         (gdb_wants_thread_stopped): New.
8869         (gdb_wants_all_threads_stopped): New.
8870         (gdb_reattached_process): New.
8871         (handle_status): Clear the `gdb_detached' flag of all processes.
8872         In all-stop, stop all threads.
8873         (main): Be sure to leave tfind mode.  Handle disconnected tracing.
8874         (process_serial_event): If the remote connection breaks, or if an
8875         exit was forced with "monitor exit", force an event loop exit.
8876         Handle disconnected tracing on detach.
8877         (handle_serial_event): Adjust.
8878         (handle_target_event): If GDB isn't connected, forward events back
8879         to the inferior, unless the last process exited, in which case,
8880         exit gdbserver.  Adjust interface.
8881
8882         * remote-utils.c (remote_open): Don't block in accept.  Instead
8883         register an event loop source on the listen socket file
8884         descriptor.  Refactor bits into ...
8885         (listen_desc): ... this new global.
8886         (gdb_connected): ... this new function.
8887         (enable_async_notification): ... this new function.
8888         (handle_accept_event): ... this new function.
8889         (remote_close): Clear remote_desc.
8890
8891         * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8892
8893         * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8894         New fields.
8895         (mourn_inferior): Define.
8896         (target_process_qsupported): Avoid the dangling else problem.
8897         (thread_stopped): Define.
8898         (pause_all): Define.
8899         (target_waitstatus_to_string): Declare.
8900         * target.c (target_waitstatus_to_string): New.
8901
8902         * tracepoint.c (tracing): Make extern.
8903         (disconnected_tracing): New.
8904         (stop_tracing): Make extern.  Handle tracing stops due to GDB
8905         disconnecting.
8906         (cmd_qtdisconnected): New.
8907         (cmd_qtstatus): Report disconnected tracing status in trace reply.
8908         (handle_tracepoint_general_set): Handle QTDisconnected.
8909
8910         * event-loop.c (event_handler_func): Change return type to int.
8911         (process_event): Bail out if the event handler wants the event
8912         loop to stop.
8913         (handle_file_event): Ditto.
8914         (start_event_loop): Bail out if the event handler wants the event
8915         loop to stop.
8916
8917         * nto-low.c (nto_target_ops): Adjust.
8918         * spu-low.c (spu_wait): Don't remove the process here.
8919         (spu_target_ops): Adjust.
8920         * win32-low.c (win32_wait): Don't remove the process here.
8921         (win32_target_ops): Adjust.
8922
8923 2010-04-11  Pedro Alves  <pedro@codesourcery.com>
8924
8925         * regcache.c (realloc_register_cache): Invalidate inferior's
8926         regcache before recreating it.
8927
8928 2010-04-09  Pedro Alves  <pedro@codesourcery.com>
8929
8930         * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8931
8932 2010-04-09  Stan Shebs  <stan@codesourcery.com>
8933             Pedro Alves  <pedro@codesourcery.com>
8934
8935         * server.h (LONGEST): New.
8936         (struct thread_info) <while_stepping>: New field.
8937         (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8938         Declare.
8939         (initialize_tracepoint, handle_tracepoint_general_set)
8940         (handle_tracepoint_query, tracepoint_finished_step)
8941         (tracepoint_was_hit, release_while_stepping_state_list):
8942         (current_traceframe): Declare.
8943         * server.c (handle_general_set): Handle tracepoint packets.
8944         (read_memory): New.
8945         (write_memory): New.
8946         (handle_search_memory_1): Use read_memory.
8947         (handle_query): Report support for conditional tracepoints, trace
8948         state variables, and tracepoint sources.  Handle tracepoint
8949         queries.
8950         (main): Initialize the tracepoints module.
8951         (process_serial_event): Handle traceframe reads/writes.
8952
8953         * linux-low.c (handle_tracepoints): New.
8954         (linux_wait_1): Call it.
8955         (linux_resume_one_lwp): Handle while-stepping.
8956         (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8957         (linux_target_ops): Install them.
8958         * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8959         New field.
8960         * linux-x86-low.c (x86_supports_tracepoints): New.
8961         (the_low_target). Install it.
8962
8963         * mem-break.h (delete_breakpoint): Declare.
8964         * mem-break.c (delete_breakpoint): Make external.
8965
8966         * target.h (struct target_ops): Add `supports_tracepoints',
8967         `read_pc', and `write_pc' fields.
8968         (target_supports_tracepoints): Define.
8969         * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8970         (phex_nz): New.
8971
8972         * regcache.h (struct regcache) <registers_owned>: New field.
8973         (init_register_cache, regcache_cpy): Declare.
8974         (regcache_read_pc, regcache_write_pc): Declare.
8975         (register_cache_size): Declare.
8976         (supply_regblock): Declare.
8977         * regcache.c (init_register_cache): New.
8978         (new_register_cache): Use it.
8979         (regcache_cpy): New.
8980         (register_cache_size): New.
8981         (supply_regblock): New.
8982         (regcache_read_pc, regcache_write_pc): New.
8983
8984         * tracepoint.c: New.
8985
8986         * Makefile.in (OBS): Add tracepoint.o.
8987         (tracepoint.o): New rule.
8988
8989 2010-04-08  H.J. Lu  <hongjiu.lu@intel.com>
8990
8991         * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8992         (i386-mmx.o): New.
8993         (i386-mmx.c): Likewise.
8994         (i386-mmx-linux.o): Likewise.
8995         (i386-mmx-linux.c): Likewise.
8996
8997         * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8998         (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8999         (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
9000         (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
9001
9002         * linux-x86-low.c (init_registers_i386_mmx_linux): New.
9003         (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
9004         and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
9005
9006 2010-04-07  H.J. Lu  <hongjiu.lu@intel.com>
9007
9008         * Makefile.in (clean): Updated.
9009         (i386-avx.o): New.
9010         (i386-avx.c): Likewise.
9011         (i386-avx-linux.o): Likewise.
9012         (i386-avx-linux.c): Likewise.
9013         (amd64-avx.o): Likewise.
9014         (amd64-avx.c): Likewise.
9015         (amd64-avx-linux.o): Likewise.
9016         (amd64-avx-linux.c): Likewise.
9017
9018         * configure.srv (srv_i386_regobj): Add i386-avx.o.
9019         (srv_i386_linux_regobj): Add i386-avx-linux.o.
9020         (srv_amd64_regobj): Add amd64-avx.o.
9021         (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
9022         (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
9023         (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
9024         (srv_i386_xmlfiles): Add i386/i386-avx.xml.
9025         (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
9026         (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
9027         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
9028
9029         * i387-fp.c: Include "i386-xstate.h".
9030         (i387_xsave): New.
9031         (i387_cache_to_xsave): Likewise.
9032         (i387_xsave_to_cache): Likewise.
9033         (x86_xcr0): Likewise.
9034
9035         * i387-fp.h (i387_cache_to_xsave): Likewise.
9036         (i387_xsave_to_cache): Likewise.
9037         (x86_xcr0): Likewise.
9038
9039         * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
9040         * linux-crisv32-low.c (target_regsets): Likewise.
9041         * linux-m68k-low.c (target_regsets): Likewise.
9042         * linux-mips-low.c (target_regsets): Likewise.
9043         * linux-ppc-low.c (target_regsets): Likewise.
9044         * linux-s390-low.c (target_regsets): Likewise.
9045         * linux-sh-low.c (target_regsets): Likewise.
9046         * linux-sparc-low.c (target_regsets): Likewise.
9047         * linux-xtensa-low.c (target_regsets): Likewise.
9048
9049         * linux-low.c: Include <sys/uio.h>.
9050         (regsets_fetch_inferior_registers): Support nt_type.
9051         (regsets_store_inferior_registers): Likewise.
9052         (linux_process_qsupported): New.
9053         (linux_target_ops): Add linux_process_qsupported.
9054
9055         * linux-low.h (regset_info): Add nt_type.
9056         (linux_target_ops): Add process_qsupported.
9057
9058         * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
9059         and <sys/uio.h>.
9060         (init_registers_i386_avx_linux): New.
9061         (init_registers_amd64_avx_linux): Likewise.
9062         (xmltarget_i386_linux_no_xml): Likewise.
9063         (xmltarget_amd64_linux_no_xml): Likewise.
9064         (PTRACE_GETREGSET): Likewise.
9065         (PTRACE_SETREGSET): Likewise.
9066         (x86_fill_xstateregset): Likewise.
9067         (x86_store_xstateregset): Likewise.
9068         (use_xml): Likewise.
9069         (x86_linux_update_xmltarget): Likewise.
9070         (x86_linux_process_qsupported): Likewise.
9071         (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
9072         (x86_arch_setup): Don't call init_registers_amd64_linux nor
9073         init_registers_i386_linux here.  Call
9074         x86_linux_update_xmltarget.
9075         (the_low_target): Add x86_linux_process_qsupported.
9076
9077         * server.c (handle_query): Call target_process_qsupported.
9078
9079         * target.h (target_ops): Add process_qsupported.
9080         (target_process_qsupported): New.
9081
9082 2010-04-03  Pedro Alves  <pedro@codesourcery.com>
9083
9084         * inferiors.c (add_thread): Set last_status kind to
9085         TARGET_WAITKIND_IGNORE.
9086         * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
9087         fetch.  Use ptid_of.  Avoid unnecessary get_lwp_thread calls.
9088         (linux_wait_1): Move `thread' local definition to block that uses
9089         it.  Don't NULL initialize `event_child'.
9090         (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
9091         Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
9092         * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
9093
9094 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
9095
9096         * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
9097         an extended waitstatus, or by a watchpoint.
9098         (cancel_breakpoints_callback): Don't cancel a breakpoint if the
9099         thread was stepping or has been stopped by a watchpoint.
9100
9101 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
9102
9103         * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
9104         (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
9105         of another, then delete the previous, and validate all
9106         breakpoints.
9107         (validate_inserted_breakpoint): New.
9108         (delete_disabled_breakpoints): New.
9109         (validate_breakpoints): New.
9110         (check_mem_read): Validate breakpoints before trusting their
9111         shadow.  Delete disabled breakpoints.
9112         (check_mem_write): Validate breakpoints before trusting they
9113         should be inserted.  Delete disabled breakpoints.
9114         * mem-break.h (validate_breakpoints):
9115         * server.c (handle_query): Validate breakpoints when we see a
9116         qSymbol query.
9117
9118 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
9119
9120         * linux-low.c (linux_wait_1): Avoid setting need_step_over is
9121         there's a GDB breakpoint at stop_pc.  Always report a trap to GDB
9122         if we could tell there's a GDB breakpoint at stop_pc.
9123         (need_step_over_p): Don't do a step over if we find a GDB
9124         breakpoint at the resume PC.
9125
9126         * mem-break.c (struct raw_breakpoint): New.
9127         (enum bkpt_type): New type `gdb_breakpoint'.
9128         (struct breakpoint): Delete the `PC', `old_data' and `inserted'
9129         fields.  New field `raw'.
9130         (find_raw_breakpoint_at): New.
9131         (set_raw_breakpoint_at): Handle refcounting.  Create a raw
9132         breakpoint instead.
9133         (set_breakpoint_at): Adjust.
9134         (delete_raw_breakpoint): New.
9135         (release_breakpoint): New.
9136         (delete_breakpoint): Rename to...
9137         (delete_breakpoint_1): ... this.  Add proc parameter.  Use
9138         release_breakpoint.  Return ENOENT.
9139         (delete_breakpoint): Reimplement.
9140         (find_breakpoint_at): Delete.
9141         (find_gdb_breakpoint_at): New.
9142         (delete_breakpoint_at): Delete.
9143         (set_gdb_breakpoint_at): New.
9144         (delete_gdb_breakpoint_at): New.
9145         (gdb_breakpoint_here): New.
9146         (set_reinsert_breakpoint): Use release_breakpoint.
9147         (uninsert_breakpoint): Rename to ...
9148         (uninsert_raw_breakpoint): ... this.
9149         (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
9150         (reinsert_raw_breakpoint): Change parameter type to
9151         raw_breakpoint.
9152         (reinsert_breakpoints_at): Adjust to handle raw breakpoints
9153         instead.
9154         (check_breakpoints): Adjust.  Use release_breakpoint.
9155         (breakpoint_here): Rewrite using find_raw_breakpoint_at.
9156         (breakpoint_inserted_here): Ditto.
9157         (check_mem_read): Adjust to iterate over raw breakpoints instead.
9158         Don't trust the breakpoint's shadow if it is not inserted.
9159         (check_mem_write): Adjust to iterate over raw breakpoints instead.
9160         (delete_all_breakpoints): Adjust.
9161         (free_all_breakpoints): Mark all breakpoints as uninserted, and
9162         use delete_breakpoint_1.
9163
9164         * mem-break.h (breakpoints_supported): Delete declaration.
9165         (set_gdb_breakpoint_at): Declare.
9166         (gdb_breakpoint_here): Declare.
9167         (delete_breakpoint_at): Delete.
9168         (delete_gdb_breakpoint_at): Declare.
9169
9170         * server.h (struct raw_breakpoint): Forward declare.
9171         (struct process_info): New field `raw_breakpoints'.
9172
9173         * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
9174         breakpoints.
9175
9176 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
9177
9178         * linux-low.c (status_pending_p_callback): Fix comment.
9179         (linux_wait_for_event_1): Move most of the internal breakpoint
9180         handling from here...
9181         (linux_wait_1): ... to here.
9182         (count_events_callback): New.
9183         (select_singlestep_lwp_callback): New.
9184         (select_event_lwp_callback): New.
9185         (cancel_breakpoints_callback): New.
9186         (select_event_lwp): New.
9187         (linux_wait_1): Simplify internal breakpoint handling.  Give equal
9188         priority to all LWPs that have had events that should be reported
9189         to the client.  Cancel breakpoints when about to reporting the
9190         event to the client, not while stopping lwps.  No longer cancel
9191         finished single-steps here.
9192         (cancel_finished_single_step): Delete.
9193         (cancel_finished_single_steps): Delete.
9194
9195 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
9196
9197         * mem-break.c (enum bkpt_type): New.
9198         (struct breakpoint): New field `type'.
9199         (set_breakpoint_at): Change return type to struct breakpoint
9200         pointer.  Set type to `other_breakpoint' by default.
9201         (delete_breakpoint): Rewrite, supporting more than one breakpoint
9202         in the breakpoint list.
9203         (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
9204         (reinsert_breakpoint): Rename to ...
9205         (reinsert_raw_breakpoint): ... this.
9206         (reinsert_breakpoints_at): Adjust.
9207         * mem-break.h (struct breakpoint): Declare.
9208         (set_breakpoint_at): Change return type to struct breakpoint
9209         pointer.
9210
9211 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
9212
9213         * server.c (handle_query): Assign, not compare.
9214
9215 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
9216
9217         Teach linux gdbserver to step-over-breakpoints.
9218
9219         * linux-low.c (can_hardware_single_step): New.
9220         (supports_breakpoints): New.
9221         (handle_extended_wait): If stopping threads, read the stop pc of
9222         the new cloned LWP.
9223         (get_pc): New.
9224         (get_stop_pc): Add `lwp' parameter.  Handle it.  Bail out if the
9225         low target doesn't support retrieving the PC.
9226         (add_lwp): Set last_resume_kind to resume_continue.
9227         (linux_attach_lwp_1): Adjust comments.  Always set stop_expected.
9228         (linux_attach): Don't clear stop_expected.  Set the lwp's
9229         last_resume_kind to resume_stop.
9230         (linux_detach_one_lwp): Don't check for removed breakpoints.
9231         (check_removed_breakpoint): Delete.
9232         (status_pending_p): Rename to ...
9233         (status_pending_p_callback): ... this.  Don't check for removed
9234         breakpoints.  Don't consider threads that are stopped from GDB's
9235         perspective.
9236         (linux_wait_for_lwp): Always read the stop_pc here.
9237         (cancel_breakpoint): New.
9238         (step_over_bkpt): New global.
9239         (linux_wait_for_event_1): Implement stepping over breakpoints.
9240         (gdb_wants_lwp_stopped): New.
9241         (gdb_wants_all_stopped): New.
9242         (linux_wait_1): Tag threads as gdb-wants-stopped.  Cancel finished
9243         single-step traps here.  Store the thread's last reported target
9244         wait status.
9245         (send_sigstop): Don't clear stop_expected.  Always set it,
9246         instead.
9247         (mark_lwp_dead): Remove reference to pending_is_breakpoint.
9248         (cancel_finished_single_step): New.
9249         (cancel_finished_single_steps): New.
9250         (wait_for_sigstop): Don't cancel finished single-step traps here.
9251         (linux_resume_one_lwp): Don't check for removed breakpoints.
9252         Don't set `step' on non-hardware step archs.
9253         (linux_set_resume_request): Ignore resume_stop requests if already
9254         stopping or stopped.  Set the lwp's last_resume_kind.
9255         (resume_status_pending_p): Don't check for removed breakpoints.
9256         (need_step_over_p): New.
9257         (start_step_over): New.
9258         (finish_step_over): New.
9259         (linux_resume_one_thread): Always queue a sigstop for resume_stop
9260         requests.  Clear the thread's last reported target waitstatus.
9261         Don't use the `suspended' flag.  Don't consider pending breakpoints.
9262         (linux_resume): Start a step-over if necessary.
9263         (proceed_one_lwp): New.
9264         (proceed_all_lwps): New.
9265         (unstop_all_lwps): New.
9266         * linux-low.h (struct lwp_info): Rewrite comment for the
9267         `suspended' flag.  Add the `stop_pc' field.  Delete the
9268         `pending_stop_pc' field.  Tweak the `stepping' flag's comment.
9269         Add `'last_resume_kind' and `need_step_over' fields.
9270         * inferiors.c (struct thread_info): Delete, moved elsewhere.
9271         * mem-break.c (struct breakpoint): Delete `reinserting' flag.
9272         Delete `breakpoint_to_reinsert' field.  New flag `inserted'.
9273         (set_raw_breakpoint_at): New.
9274         (set_breakpoint_at): Rewrite to use it.
9275         (reinsert_breakpoint_handler): Delete.
9276         (set_reinsert_breakpoint): New.
9277         (reinsert_breakpoint_by_bp): Delete.
9278         (delete_reinsert_breakpoints): New.
9279         (uninsert_breakpoint): Rewrite.
9280         (uninsert_breakpoints_at): New.
9281         (reinsert_breakpoint): Rewrite.
9282         (reinsert_breakpoints_at): New.
9283         (check_breakpoints): Rewrite.
9284         (breakpoint_here): New.
9285         (breakpoint_inserted_here): New.
9286         (check_mem_read): Adjust.
9287         * mem-break.h (breakpoints_supported, breakpoint_here)
9288         (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
9289         (reinsert_breakpoint_by_bp): Delete declaration.
9290         (delete_reinsert_breakpoints): Declare.
9291         (reinsert_breakpoint): Delete declaration.
9292         (reinsert_breakpoints_at): Declare.
9293         (uninsert_breakpoint): Delete declaration.
9294         (uninsert_breakpoints_at): Declare.
9295         (check_breakpoints): Adjust prototype.
9296         * server.h: Adjust include order.
9297         (struct thread_info): Declare here.  Add a `last_status' field.
9298
9299 2010-03-23  Michael Snyder  <msnyder@vmware.com>
9300
9301         * server.c (crc32): New function.
9302         (handle_query): Add handling for 'qCRC:' request.
9303
9304 2010-03-23  Pedro Alves  <pedro@codesourcery.com>
9305
9306         * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
9307         lwp had been stopped by a watchpoint.
9308
9309 2010-03-16  Pedro Alves  <pedro@codesourcery.com>
9310
9311         * server.h (internal_error): Declare.
9312         (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
9313         * utils.c (internal_error): New function.
9314
9315 2010-03-15  Andreas Schwab  <schwab@redhat.com>
9316
9317         * configure.srv: Fix typo setting srv_regobj.
9318
9319 2010-03-15  Pedro Alves  <pedro@codesourcery.com>
9320
9321         * linux-low.c (fetch_register): Avoid passing a non string literal
9322         format to `error'.
9323         (usr_store_inferior_registers): Ditto.
9324
9325 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
9326
9327         * linux-low.c (linux_write_memory): Bail out early if peeking
9328         memory failed.
9329
9330 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
9331
9332         * linux-low.h (struct lwp_info): New fields
9333         `stopped_by_watchpoint' and `stopped_data_address'.
9334         * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
9335         here, and cache them in the lwp object.
9336         (wait_for_sigstop): Check stopped_by_watchpoint lwp field
9337         directly.
9338         (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
9339         field.
9340         (linux_stopped_by_watchpoint): Rewrite.
9341         (linux_stopped_data_address): Rewrite.
9342
9343 2010-03-06  Simo Melenius  <simo.melenius@iki.fi>
9344
9345         * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
9346         switching the current inferior, not before.
9347
9348 2010-03-01  H.J. Lu  <hongjiu.lu@intel.com>
9349
9350         * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
9351         reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
9352         i386-linux.c and amd64-linux.c.
9353         (reg-i386.o): Removed.
9354         (reg-i386.c): Likewise.
9355         (reg-i386-linux.o): Likewise.
9356         (reg-i386-linux.c): Likewise.
9357         (reg-x86-64.o): Likewise.
9358         (reg-x86-64.c): Likewise.
9359         (reg-x86-64-linux.o): Likewise.
9360         (reg-x86-64-linux.c): Likewise.
9361         (i386.o): New.
9362         (i386.c): Likewise.
9363         (i386-linux.o): Likewise.
9364         (i386-linux.c): Likewise.
9365         (amd64.o): Likewise.
9366         (amd64.c): Likewise.
9367         (amd64-linux.o): Likewise.
9368         (amd64-linux.c): Likewise.
9369
9370         * configure.srv (srv_i386_regobj): New.
9371         (srv_i386_linux_regobj): Likewise.
9372         (srv_amd64_regobj): Likewise.
9373         (srv_amd64_linux_regobj): Likewise.
9374         (srv_i386_32bit_xmlfiles): Likewise.
9375         (srv_i386_64bit_xmlfiles): Likewise.
9376         (srv_i386_xmlfiles): Likewise.
9377         (srv_amd64_xmlfiles): Likewise.
9378         (srv_i386_linux_xmlfiles): Likewise.
9379         (srv_amd64_linux_xmlfiles): Likewise.
9380         (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj.  Set
9381         srv_xmlfiles to $srv_i386_xmlfiles.
9382         (i[34567]86-*-mingw32ce*): Likewise.
9383         (i[34567]86-*-mingw*): Likewise.
9384         (i[34567]86-*-nto*): Likewise.
9385         (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
9386         and $srv_amd64_linux_regobj.  Set srv_xmlfiles to
9387         $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
9388         (x86_64-*-linux*): Likewise.
9389
9390         * linux-x86-low.c (init_registers_x86_64_linux): Removed.
9391         (init_registers_amd64_linux): New.
9392         (x86_arch_setup): Replace init_registers_x86_64_linux with
9393         init_registers_amd64_linux.
9394
9395 2010-02-23  Maxim Kuvyrkov  <maxim@codesourcery.com>
9396
9397         * configure.ac: Check for libdl.  If it is not available link against
9398         static libthread_db.
9399         * configure: Regenerate.
9400
9401 2010-02-22  Pedro Alves  <pedro@codesourcery.com>
9402
9403         PR9605
9404
9405         * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
9406         handing a read watchpoint.
9407         (i386_low_insert_watchpoint): Read watchpoints aren't supported.
9408
9409 2010-02-12  Doug Evans  <dje@google.com>
9410
9411         * linux-low.c (linux_supports_tracefork_flag): Document.
9412         (linux_look_up_symbols): Add comment.
9413
9414 2010-02-03  H.J. Lu  <hongjiu.lu@intel.com>
9415
9416         * regcache.c (supply_register): Clear regcache if buf is NULL.
9417
9418 2010-02-02  Nicolas Roche  <roche@sourceware.org>
9419             Joel Brobecker  <brobecker@adacore.com>
9420
9421         * inferiors.c (find_inferior): Add function documentation.
9422         (unloaded_dll): Handle the case where the unloaded dll has not
9423         been previously registered in the dll list.
9424
9425 2010-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
9426
9427         * linux-arm-low.c (thumb_breakpoint_len): Delete.
9428         (thumb2_breakpoint): New.
9429         (arm_breakpoint_at): Check for Thumb-2 breakpoints.
9430
9431 2010-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
9432
9433         * linux-low.c (get_stop_pc): Check for SIGTRAP.
9434         (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
9435         breakpoints.
9436
9437 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
9438
9439         * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
9440
9441 2010-01-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
9442
9443         * linux-s390-low.c (s390_collect_ptrace_register)
9444         (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
9445
9446 2010-01-21  Doug Evans  <dje@google.com>
9447
9448         * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
9449         (PTRACE_ARG4_TYPE): New macro.
9450         (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
9451         (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
9452         (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
9453         (usr_store_inferior_registers): Ditto.
9454         (linux_read_memory, linux_write_memory): Ditto.
9455         (linux_test_for_tracefork): Ditto.
9456
9457         * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
9458         Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
9459
9460 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
9461
9462         * proc-service.c (ps_lgetregs): Don't refetch registers from the
9463         target.
9464
9465 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
9466
9467         * spu-low.c (spu_fetch_registers, spu_store_registers): Change
9468         prototype to take a regcache.  Adjust.
9469
9470 2010-01-20  Pedro Alves  <pedro@codesourcery.com>
9471
9472         * regcache.h (struct thread_info): Forward declare.
9473         (struct regcache): New.
9474         (new_register_cache): Adjust prototype.
9475         (get_thread_regcache): Declare.
9476         (free_register_cache): Adjust prototype.
9477         (registers_to_string, registers_from_string): Ditto.
9478         (supply_register, supply_register_by_name, collect_register)
9479         (collect_register_as_string, collect_register_by_name): Ditto.
9480         * regcache.c (struct inferior_regcache_data): Delete.
9481         (get_regcache): Rename to ...
9482         (get_thread_regcache): ... this.  Adjust.  Switch inferior before
9483         fetching registers.
9484         (regcache_invalidate_one): Adjust.
9485         (regcache_invalidate): Fix prototype.
9486         (new_register_cache): Return the new register cache.
9487         (free_register_cache): Change prototype.
9488         (realloc_register_cache): Adjust.
9489         (registers_to_string): Change prototype to take a regcache.  Adjust.
9490         (registers_from_string): Ditto.
9491         (register_data): Ditto.
9492         (supply_register): Ditto.
9493         (supply_register_by_name): Ditto.
9494         (collect_register): Ditto.
9495         (collect_register_as_string): Ditto.
9496         (collect_register_by_name): Ditto.
9497         * server.c (process_serial_event): Adjust.
9498         * linux-low.h (regset_fill_func, regset_store_func): Change
9499         prototype.
9500         (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
9501         Change prototype.
9502         * linux-low.c (get_stop_pc): Adjust.
9503         (check_removed_breakpoint): Adjust.
9504         (linux_wait_for_event): Adjust.
9505         (linux_resume_one_lwp): Adjust.
9506         (fetch_register): Add regcache parameter.  Adjust.
9507         (usr_store_inferior_registers): Ditto.
9508         (regsets_fetch_inferior_registers): Ditto.
9509         (regsets_store_inferior_registers): Ditto.
9510         (linux_fetch_registers, linux_store_registers): Ditto.
9511         * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
9512         regcache.  Adjust.
9513         (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
9514         Ditto.
9515         * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
9516         prototype to take a regcache.
9517         (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
9518         * remote-utils.c (convert_ascii_to_int, outreg)
9519         (prepare_resume_reply): Change prototype to take a regcache.
9520         Adjust.
9521         * target.h (struct target_ops) <fetch_registers, store_registers>:
9522         Change prototype to take a regcache.
9523         (fetch_inferior_registers, store_inferior_registers): Change
9524         prototype to take a regcache.  Adjust.
9525         * proc-service.c (ps_lgetregs): Adjust.
9526         * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
9527         (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
9528         (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
9529         take a regcache.  Adjust.
9530         * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
9531         (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
9532         (arm_store_vfpregset, arm_get_pc, arm_set_pc):
9533         (arm_breakpoint_at): Change prototype to take a regcache.  Adjust.
9534         * linux-cris-low.c (cris_get_pc, cris_set_pc)
9535         (cris_cannot_fetch_register):
9536         (cris_breakpoint_at): Change prototype to take a regcache.
9537         Adjust.
9538         * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
9539         cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
9540         to take a regcache.  Adjust.
9541         (cris_breakpoint_at, cris_insert_point, cris_remove_point):
9542         Adjust.
9543         * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
9544         take a regcache.  Adjust.
9545         * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
9546         (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
9547         (m68k_set_pc): Change prototype to take a regcache.  Adjust.
9548         * linux-mips-low.c (mips_get_pc):
9549         (mips_set_pc): Change prototype to take a regcache.  Adjust.
9550         (mips_reinsert_addr): Adjust.
9551         (mips_collect_register): Change prototype to take a regcache.
9552         Adjust.
9553         (mips_supply_register):
9554         (mips_collect_register_32bit, mips_supply_register_32bit)
9555         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9556         (mips_store_fpregset): Ditto.
9557         * linux-ppc-low.c (ppc_supply_ptrace_register)
9558         (ppc_supply_ptrace_register): Ditto.
9559         (parse_spufs_run): Adjust.
9560         (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9561         (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9562         (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9563         take a regcache.  Adjust.
9564         * linux-s390-low.c (s390_collect_ptrace_register)
9565         (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9566         (s390_set_pc): Change prototype to take a regcache.  Adjust.
9567         (s390_arch_setup): Adjust.
9568         * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9569         (sh_fill_gregset): Change prototype to take a regcache.  Adjust.
9570         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9571         (sparc_fill_gregset, sparc_store_gregset_from_stack)
9572         (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9573         regcache.  Adjust.
9574         (sparc_breakpoint_at): Adjust.
9575         * linux-xtensa-low.c (xtensa_fill_gregset):
9576         (xtensa_store_gregset):
9577         (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9578         (xtensa_set_pc): Change prototype to take a regcache.  Adjust.
9579         * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9580         prototype to take a regcache.  Adjust.
9581         * win32-arm-low.c (arm_fetch_inferior_register)
9582         (arm_store_inferior_register): Change prototype to take a
9583         regcache.  Adjust.
9584         * win32-i386-low.c (i386_fetch_inferior_register)
9585         (i386_store_inferior_register): Change prototype to take a
9586         regcache.  Adjust.
9587         * win32-low.c (child_fetch_inferior_registers)
9588         (child_store_inferior_registers): Change prototype to take a
9589         regcache.  Adjust.
9590         (win32_wait): Adjust.
9591         (win32_fetch_inferior_registers): Change prototype to take a
9592         regcache.  Adjust.
9593         (win32_store_inferior_registers): Adjust.
9594         * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9595         store_inferior_register>: Change prototype to take a regcache.
9596
9597 2010-01-20  Doug Evans  <dje@google.com>
9598
9599         * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9600         #ifdef.
9601         (linux_wait_for_event1, linux_init_signals): Ditto.
9602         (W_STOPCODE): Provide definition if missing.
9603
9604 2010-01-13  Vladimir Prus  <vladimir@codesourcery.com>
9605
9606         * linux-low.c (linux_core_of_thread): New.
9607         (compare_ints, show_process, list_threads): New.
9608         (linux_qxfer_osdata): Report threads and cores.
9609         (linux_target_op): Register linux_core_of_thread.
9610         * remote-utils.c (prepare_resume_reply): Report the core.
9611         (buffer_xml_printf): Support %d specifier.
9612         * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9613         New.
9614         (handle_query): Handle qXfer:threads.  Announce availability
9615         thereof.
9616         * target.h (struct target_ops): New field core_of_thread.
9617
9618 2010-01-04  Ulrich Weigand  <uweigand@de.ibm.com>
9619
9620         * Makefile.in (clean): Remove new generated files.
9621         (reg-s390.o, reg-s390.c): Remove rules.
9622         (reg-s390x.o, reg-s390x.c): Likewise.
9623         (s390-linux32.o, s390-linux32.c): Add rules.
9624         (s390-linux64.o, s390-linux64.c): Likewise.
9625         (s390x-linux64.o, s390x-linux64.c): Likewise.
9626         * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9627         * linux-s390-low.c: Include <elf.h>.
9628         (HWCAP_S390_HIGH_GPRS): Define if undefined.
9629         (init_registers_s390): Remove prototype.
9630         (init_registers_s390x): Likewise.
9631         (init_registers_s390_linux32): Add prototype.
9632         (init_registers_s390_linux64): Likewise.
9633         (init_registers_s390x_linux64): Likewise.
9634         (s390_num_regs_3264): New define.
9635         (s390_regmap_3264): New global variable.
9636         (s390_cannot_fetch_register): Remove obsolete check.
9637         (s390_cannot_store_register): Likewise.
9638         (s390_collect_ptrace_register): Handle upper/lower register halves.
9639         (s390_supply_ptrace_register): Likewise.
9640         (s390_fill_gregset): Update to register number changes.
9641         (s390_get_hwcap): New routine.
9642         (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9643         Install appropriate regmap and register set.
9644
9645 2010-01-01  Joel Brobecker  <brobecker@adacore.com>
9646
9647         * server.c (gdbserver_version): Update copyright year to 2010.
9648         * gdbreplay.c (gdbreplay_version): Likewise.
9649
9650 2009-12-28  Doug Evans  <dje@google.com>
9651
9652         * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9653         elf/external.h.  Include <elf.h> instead but only if necessary.
9654
9655 2009-12-28  Pedro Alves  <pedro@codesourcery.com>
9656
9657         * linux-low.c (linux_remove_process): Remove `detaching'
9658         parameter.  Don't release/detach from thread_db here.
9659         (linux_kill): Release/detach from thread_db here, ...
9660         (linux_detach): ... and here, before actually detaching.
9661         (linux_wait_1): ... and here, when a process exits.
9662         * thread-db.c (any_thread_of): New.
9663         (thread_db_free): Switch the current inferior to a thread of the
9664         passed in process.
9665
9666 2009-12-21  Doug Evans  <dje@google.com>
9667
9668         * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9669
9670         * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9671         Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9672         warning ifndef __NR_tkill.  Move setting of errno there too.
9673         Delete unnecessary resetting of errno after syscall.
9674         Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9675
9676         * configure.ac: Check for dladdr.
9677         * config.in: Regenerate.
9678         * configure: Regenerate.
9679         * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9680         (try_thread_db_load): Update.
9681
9682         * linux-low.c (my_waitpid): Delete unnecessary prototype.
9683
9684 2009-12-18  Doug Evans  <dje@google.com>
9685
9686         * event-loop.c: Include unistd.h if it exists.
9687
9688         * linux-low.c (my_waitpid): Move definition away from being in
9689         between linux_tracefork_child/linux_test_for_tracefork.
9690
9691         * gdb_proc_service.h (psaddr_t): Fix type.
9692         * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9693         signature to match glibc.
9694
9695 2009-12-16  Doug Evans  <dje@google.com>
9696
9697         * linux-low.c (linux_read_memory): Fix argument to read.
9698
9699 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
9700
9701         * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9702         events, don't leave current_inferior pointing at null.
9703
9704 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
9705
9706         * win32-low.c (LOG): Delete.
9707         (OUTMSG): Output to stderr.
9708         (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9709         on compile time LOG macro.
9710         (win32_wait): Fix debug output.
9711
9712 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
9713
9714         * win32-low.c (win32_add_one_solib): If the dll name is
9715         "ntdll.dll", prepend the system directory to the dll path.
9716
9717 2009-11-17  Daniel Jacobowitz  <dan@codesourcery.com>
9718
9719         * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9720
9721 2009-11-17  Nathan Sidwell  <nathan@codesourcery.com>
9722             Vladimir Prus  <vladimir@codesourcery.com>
9723
9724         * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9725         * configure.ac: Check for __mcoldfire__ and set
9726         gdb_cv_m68k_is_coldfire.
9727         * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9728         reg-cf.o and reg-m68k.o.
9729         * configure: Regenerated.
9730
9731 2009-11-16  Pedro Alves  <pedro@codesourcery.com>
9732
9733         * linux-low.c (linux_remove_process): Add `detaching' parameter.
9734         Pass it to thread_db_free.
9735         (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9736         proper `detaching' argument to linux_remove_process.
9737         * linux-low.h (thread_db_free): Add `detaching' parameter.
9738         * thread-db.c (thread_db_init): Pass false as `detaching' argument
9739         to thread_db_free.
9740         (thread_db_free): Add `detaching' parameter.  Only
9741         call td_ta_clear_event if detaching from process.
9742
9743 2009-11-12  Maxim Kuvyrkov  <maxim@codesourcery.com>
9744
9745         * thread-db.c (thread_db_free): Fix typo.
9746
9747 2009-11-11  Paul Pluzhnikov  <ppluzhnikov@google.com>
9748
9749         PR gdb/10838
9750         * thread-db.c (thread_db_free): Call td_ta_clear_event.
9751
9752 2009-11-03  Nathan Sidwell  <nathan@codesourcery.com>
9753
9754         * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9755         with an i686 compiler.
9756         * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9757         needed.
9758         * configure: Rebuilt.
9759
9760 2009-10-29  Sandra Loosemore  <sandra@codesourcery.com>
9761
9762         PR gdb/10783
9763
9764         * server.c (handle_search_memory_1): Correct read_addr initialization
9765         in loop for searching subsequent chunks.
9766
9767 2009-10-29  Paul Pluzhnikov  <ppluzhnikov@google.com>
9768
9769         * configure.ac: New --with-libthread-db option.
9770         * thread-db.c: Allow direct dependence on libthread_db.
9771         (thread_db_free): Adjust.
9772         * config.in: Regenerate.
9773         * configure: Likewise.
9774
9775 2009-10-28  Paul Pluzhnikov  <ppluzhnikov@google.com>
9776
9777         PR gdb/10757
9778         * thread-db.c (attach_thread): New function.
9779         (maybe_attach_thread): Return success/failure.
9780         (find_new_threads_callback): Adjust.
9781         (thread_db_find_new_threads): Loop until no new threads.
9782
9783 2009-10-13  Pedro Alves  <pedro@codesourcery.com>
9784
9785         * proc-service.c (ps_lgetregs): Formatting.
9786
9787 2009-10-08  Paul Pluzhnikov  <ppluzhnikov@google.com>
9788
9789         * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9790         * configure.ac: Adjust.
9791         * linux-low.h (struct process_info_private): Move members to struct
9792         thread_db.
9793         (thread_db_free, thread_db_handle_monitor_command): New prototype.
9794         * linux-low.c (linux_remove_process): Adjust.
9795         (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9796         * server.c (handle_query): Move code ...
9797         (handle_monitor_command): ... here. New function.
9798         * target.h (struct target_ops): New member.
9799         * thread-db.c (struct thread_db): New.
9800         (libthread_db_search_path): New variable.
9801         (thread_db_create_event, thread_db_enable_reporting)
9802         (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9803         (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9804         (try_thread_db_load_1, dladdr_to_soname): New functions.
9805         (try_thread_db_load, thread_db_load_search): New functions.
9806         (thread_db_init): Search for libthread_db.
9807         (thread_db_free): New function.
9808         (thread_db_handle_monitor_command): Likewise.
9809         * config.in: Regenerate.
9810         * configure: Regenerate.
9811
9812 2009-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
9813
9814         * spu-low.c (spu_kill): Wait for inferior to terminate.
9815         Call clear_inferiors.
9816         (spu_detach): Call clear_inferiors.
9817
9818 2009-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9819
9820         * aclocal.m4: Regenerate.
9821         * config.in: Likewise.
9822         * configure: Likewise.
9823
9824 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
9825
9826         * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9827         (parse_spufs_run): New function.
9828         (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9829         (ppc_breakpoint_at): Handle SPU breakpoints.
9830
9831 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
9832
9833         * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9834         (SPUFS_MAGIC): Define.
9835         (spu_enumerate_spu_ids): New function.
9836         (linux_qxfer_spu): New function.
9837         (linux_target_ops): Install linux_qxfer_spu.
9838
9839 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
9840
9841         * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9842         and powerpc-cell64l.o to srv_regobj.  Add rs6000/powerpc-cell32l.xml
9843         and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9844         * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9845         (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9846         (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9847         * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9848         (init_registers_powerpc_cell32l): Add prototype.
9849         (init_registers_powerpc_cell64l): Likewise.
9850         (ppc_arch_setup): Detect Cell/B.E. architecture.
9851
9852 2009-07-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9853
9854         * Makefile.in (datarootdir): New variable.
9855
9856 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
9857
9858         * linux-low.c (linux_write_memory): Update debugging output.
9859         * Makefile.in (clean): Add new descriptions.
9860         (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9861         (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9862         * configure.srv: Add new files for arm*-*-linux*.
9863         * linux-arm-low.c: Add new declarations.
9864         (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9865         (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9866         (HWCAP_VFPv3D16): New.
9867         (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9868         instead of __IWMMXT__.
9869         (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9870         (arm_arch_setup): New.
9871         (target_regsets): Remove #ifdef.  Add VFP regset.
9872         (the_low_target): Use arm_arch_setup.
9873
9874 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
9875
9876         * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9877         the main thread again.
9878
9879 2009-07-06  Aleksandar Ristovski  <aristovski@qnx.com>
9880
9881         Adding Neutrino gdbserver.
9882         * configure: Regenerated.
9883         * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9884         * configure.srv (i[34567]86-*-nto*): New target.
9885         * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9886         * remote-utils.c [__QNX__]: Include sys/iomgr.h
9887         (nto_comctrl) [__QNX__]: New function.
9888         (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9889
9890 2009-07-05  Danny Backx  <dannybackx@users.sourceforge.net>
9891
9892         * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9893         srv_tgtobj.
9894
9895 2009-07-04  Danny Backx  <dannybackx@users.sourceforge.net>
9896             Pedro Alves  <pedro@codesourcery.com>
9897
9898         * win32-i386-low.c (i386_get_thread_context): Handle systems that
9899         don't support CONTEXT_EXTENDED_REGISTERS.
9900         (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9901         (the_low_target): Install them.
9902         * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9903         failing with ERROR_PIPE_NOT_CONNECTED.
9904
9905 2009-06-30  Doug Evans  <dje@google.com>
9906             Pierre Muller  <muller@ics.u-strasbg.fr>
9907
9908         Add h/w watchpoint support to x86-linux, win32-i386.
9909         * Makefile.in (SFILES): Add i386-low.c
9910         (i386_low_h): Define.
9911         (i386-low.o): Add dependencies.
9912         (linux-x86-low.o): Add i386-low.h dependency.
9913         (win32-i386-low.o): Ditto.
9914         * i386-low.c: New file.
9915         * i386-low.h: New file.
9916         * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9917         (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9918         * linux-low.c (linux_add_process): Initialize arch_private.
9919         (linux_remove_process): Free arch_private.
9920         (add_lwp): Initialize arch_private.
9921         (delete_lwp): Free arch_private.
9922         (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9923         provided.
9924         * linux-low.h (process_info_private): New member arch_private.
9925         (lwp_info): New member arch_private.
9926         (linux_target_ops): New members new_process, new_thread,
9927         prepare_to_resume.
9928         (ptid_of): New macro.
9929         * linux-x86-low.c: Include stddef.h, i386-low.h.
9930         (arch_process_info): New struct.
9931         (arch_lwp_info): New struct.
9932         (x86_linux_dr_get, x86_linux_dr_set): New functions.
9933         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9934         (i386_dr_low_get_status): New function.
9935         (x86_insert_point, x86_remove_point): New functions.
9936         (x86_stopped_by_watchpoint): New function.
9937         (x86_stopped_data_address): New function.
9938         (x86_linux_new_process, x86_linux_new_thread): New functions.
9939         (x86_linux_prepare_to_resume): New function.
9940         (the_low_target): Add entries for insert_point, remove_point,
9941         stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9942         prepare_to_resume.
9943         * server.c (debug_hw_points): New global.
9944         (monitor_show_help): Document set debug-hw-points.
9945         (handle_query): Process "set debug-hw-points".
9946         * server.h (debug_hw_points): Declare.
9947         (paddress): Declare.
9948         * utils.c (NUMCELLS, CELLSIZE): New macros.
9949         (get_sell, xsnprintf, paddress): New functions.
9950         * win32-arm-low.c (the_low_target): Add entries for insert_point,
9951         remove_point, stopped_by_watchpoint, stopped_data_address.
9952         * win32-i386-low.c: Include i386-low.h.
9953         (debug_reg_state): Replaces dr.
9954         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9955         (i386_dr_low_get_status): New function.
9956         (i386_insert_point, i386_remove_point): New functions.
9957         (i386_stopped_by_watchpoint): New function.
9958         (i386_stopped_data_address): New function.
9959         (i386_initial_stuff): Update.
9960         (get_thread_context,set_thread_context,i386_thread_added): Update.
9961         (the_low_target): Add entries for insert_point,
9962         remove_point, stopped_by_watchpoint, stopped_data_address.
9963         * win32-low.c (win32_insert_watchpoint): New function.
9964         (win32_remove_watchpoint): New function.
9965         (win32_stopped_by_watchpoint): New function.
9966         (win32_stopped_data_address): New function.
9967         (win32_target_ops): Add entries for insert_watchpoint,
9968         remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9969         * win32-low.h (win32_target_ops): New members insert_point,
9970         remove_point, stopped_by_watchpoint, stopped_data_address.
9971
9972 2009-06-25  Pedro Alves  <pedro@codesourcery.com>
9973
9974         * server.c (process_serial_event): Re-return unsupported, not
9975         error, if the type isn't recognized.  Re-allow supporting only
9976         insert or remove packets.  Also call require_running for
9977         breakpoints.  Add missing break statement to default case.  Tidy.
9978         * target.h (struct target_ops): Rename insert_watchpoint to
9979         insert_point, and remove_watchpoint to remove_point.
9980
9981         * linux-low.h (struct linux_target_ops): Likewise.
9982         * linux-low.c (linux_insert_watchpoint): Rename to ...
9983         (linux_insert_point): ... this.  Adjust.
9984         (linux_remove_watchpoint): Rename to ...
9985         (linux_remove_point): ... this.  Adjust.
9986         (linux_target_ops): Adjust.
9987         * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9988         (cris_insert_point): ... this.
9989         (cris_remove_watchpoint): Rename to ...
9990         (cris_remove_point): ... this.
9991         (the_low_target): Adjust.
9992
9993 2009-06-24  Pierre Muller  <muller@ics.u-strasbg.fr>
9994
9995         * server.c (handle_v_kill): Pass signal_pid to
9996         kill_inferior if multi_process is zero.
9997
9998 2009-06-23  Aleksandar Ristovski  <aristovski@qnx.com>
9999
10000         * server.c (process_serial_event): Add support for Z0 and Z1 packet.
10001         * target.h (target_ops): Comment for *_watchpoint to make it clear
10002         the functions can get types '0' and '1'.
10003
10004 2009-06-22  Aleksandar Ristovski  <aristovski@qnx.com>
10005
10006         * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
10007         * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
10008         * regcache.c (get_regcache): Likewise.
10009         * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
10010         * win32-low.c (child_fetch_inferior_registers): Remove check for
10011         regno 0.
10012
10013 2009-06-19  Aleksandar Ristovski  <aristovski@qnx.com>
10014             Pedro Alves <pedro@codesourcery.com>
10015
10016         * target.h (struct target_ops) <supports_multi_process>: New
10017         callback.
10018         (target_supports_multi_process): New.
10019         * server.c (handle_query): Even if GDB reports support, only
10020         enable multi-process if the target also supports it.  Report
10021         multi-process support only if the target backend supports it.
10022         * linux-low.c (linux_supports_multi_process): New function.
10023         (linux_target_ops): Install it as target_supports_multi_process
10024         callback.
10025
10026 2009-05-24  Doug Evans  <dje@google.com>
10027
10028         Global renaming of find_thread_pid to find_thread_ptid.
10029         * server.h (find_thread_ptid): Renamed from find_thread_pid.
10030         * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
10031         All callers updated.
10032
10033         * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
10034         to resume the newly created thread, don't call ptrace (PTRACE_CONT)
10035         directly.
10036
10037         * linux-low.c (get_stop_pc): Print pc if debug_threads.
10038         (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
10039         (linux_resume_one_lwp): Ditto.
10040
10041 2009-05-23  Doug Evans  <dje@google.com>
10042
10043         * linux-low.c (linux_resume_one_lwp): Change type of first arg
10044         from struct inferior_list_entry * to struct lwp_info *.
10045         All callers updated.
10046
10047 2009-05-13  Doug Evans  <dje@google.com>
10048
10049         * linux-x86-low.c: Don't include assert.h.
10050         (x86_siginfo_fixup): Use fatal, not assert.
10051         (x86_arch_setup): Fix comment.
10052
10053 2009-05-12  Doug Evans  <dje@google.com>
10054
10055         Biarch support for i386/amd64 gdbserver.
10056         * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
10057         Add linux-x86-low.c.
10058         (linux-i386-low.o, linux-x86-64-low.o): Delete.
10059         (linux-x86-low.o): Add.
10060         * linux-x86-64-low.c: Delete.
10061         * linux-i386-low.c: Delete.
10062         * linux-x86-low.c: New file.
10063         * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
10064         linux-x86-low.o.
10065         (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
10066         linux-x86-low.o.
10067         (x86_64-linux srv_regobj): Add reg-i386-linux.o.
10068         * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
10069         (linux_child_pid_to_exec_file): New function.
10070         (elf_64_header_p, elf_64_file_p): New functions.
10071         (siginfo_fixup): New function.
10072         (linux_xfer_siginfo): New local inf_siginfo.  Call siginfo_fixup to
10073         give target a chance to convert layout.
10074         * linux-low.h (linux_target_ops): New member siginfo_fixup.
10075         (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
10076
10077 2009-05-07  Doug Evans  <dje@google.com>
10078
10079         * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
10080         (regsets_store_inferior_registers): Ditto.
10081
10082 2009-05-06  Pedro Alves  <pedro@codesourcery.com>
10083
10084         PR server/10048
10085
10086         * linux-low.c (must_set_ptrace_flags): Delete.
10087         (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
10088         of the global.
10089         (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here.  Set
10090         `lwp->must_set_ptrace_flags' instead.
10091         (linux_wait_for_event_1): Set ptrace options here.
10092         (linux_wait_1): ... not here.
10093
10094 2009-04-30  Doug Evans  <dje@google.com>
10095
10096         * inferiors.c (started_inferior_callback): New function.
10097         (attached_inferior_callback): New function.
10098         (have_started_inferiors_p, have_attached_inferiors_p): New functions.
10099         * server.c (print_started_pid, print_attached_pid): New functions.
10100         (detach_or_kill_for_exit): New function.
10101         (main): Call it instead of for_each_inferior (kill_inferior_callback).
10102         * server.h (have_started_inferiors_p): Declare.
10103         (have_attached_inferiors_p): Declare.
10104
10105         * inferiors.c (remove_process): Fix memory leak, free process.
10106         * linux-low.c (linux_remove_process): New function.
10107         (linux_kill): Call it instead of remove_process.
10108         (linux_detach, linux_wait_1): Ditto.
10109
10110 2009-04-19  Danny Backx  <dannybackx@users.sourceforge.net>
10111
10112         * configure.srv: Add x86 Windows CE target.
10113
10114 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
10115
10116         * inferiors.c (get_thread_process): Make global.
10117         * server.h (get_thread_process): Add prototype.
10118         * thread-db.c (find_one_thread): Use get_thread_process
10119         instead of current_process.
10120         (thread_db_get_tls_address): Do not crash if called when
10121         thread layer is not yet initialized.
10122
10123 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
10124
10125         * remote-utils.c (prepare_resume_reply): Null-terminate packet.
10126         * spu-low.c (current_tid): Rename to ...
10127         (current_ptid): ... this.
10128         (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
10129         spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
10130         ptid_get_lwp (current_ptid) instead of current_tid.
10131         (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
10132         instead of current_tid.  Use find_process_pid to verify pid
10133         argument is valid.  Pass proper argument to remove_process.
10134         (spu_thread_alive): Compare current_ptid instead of current_tid.
10135         (spu_resume): Likewise.
10136
10137 2009-04-02  Pedro Alves  <pedro@codesourcery.com>
10138
10139         * linux-low.c (usr_store_inferior_registers): Declare local `pid'
10140         variable.
10141
10142 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
10143
10144         Implement the multiprocess extensions, and add linux multiprocess
10145         support.
10146
10147         * server.h (ULONGEST): Declare.
10148         (struct ptid, ptid_t): New.
10149         (minus_one_ptid, null_ptid): Declare.
10150         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10151         (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
10152         (struct inferior_list_entry): Change `id' type from unsigned from
10153         to ptid_t.
10154         (struct sym_cache, struct breakpoint, struct
10155         process_info_private): Forward declare.
10156         (struct process_info): Declare.
10157         (current_process): Declare.
10158         (all_processes): Declare.
10159         (initialize_inferiors): Declare.
10160         (add_thread): Adjust to use ptid_t.
10161         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
10162         (add_process, remove_process, find_thread_pid): Declare.
10163         (find_inferior_id): Adjust to use ptid_t.
10164         (cont_thread, general_thread, step_thread): Change type to ptid_t.
10165         (multi_process): Declare.
10166         (push_event): Adjust to use ptid_t.
10167         (read_ptid, write_ptid): Declare.
10168         (prepare_resume_reply): Adjust to use ptid_t.
10169         (clear_symbol_cache): Declare.
10170         * inferiors.c (all_processes): New.
10171         (null_ptid, minus_one_ptid): New.
10172         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10173         (ptid_get_tid, ptid_equal, ptid_is_pid): New.
10174         (add_thread): Change unsigned long to ptid.  Remove gdb_id
10175         parameter.  Adjust.
10176         (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
10177         (gdb_id_to_thread): Rename to ...
10178         (find_thread_pid): ... this.  Change unsigned long to ptid.
10179         (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
10180         (loaded_dll, pull_pid_from_list): Adjust.
10181         (add_process, remove_process, find_process_pid)
10182         (get_thread_process, current_process, initialize_inferiors): New.
10183         * target.h (struct thread_resume) <thread>: Change type to ptid_t.
10184         (struct target_waitstatus) <related_pid>: Ditto.
10185         (struct target_ops) <kill, detach>: Add `pid' argument.  Change
10186         return type to int.
10187         (struct target_ops) <join>: Add `pid' argument.
10188         (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
10189         (struct target_ops) <wait>: Add `ptid' field.  Change return type
10190         to ptid.
10191         (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
10192         (mywait): Add `ptid' argument.  Change return type to ptid_t.
10193         (target_pid_to_str): Declare.
10194         * target.c (set_desired_inferior): Adjust to use ptids.
10195         (mywait): Add new `ptid' argument.  Adjust.
10196         (target_pid_to_str): New.
10197         * mem-break.h (free_all_breakpoints): Declare.
10198         * mem-break.c (breakpoints): Delelete.
10199         (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
10200         (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
10201         to use per-process breakpoint list.
10202         (free_all_breakpoints): New.
10203         * remote-utils.c (struct sym_cache) <name>: Drop `const'.
10204         (symbol_cache, all_symbols_looked_up): Delete.
10205         (hexchars): New.
10206         (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
10207         read_ptid): New.
10208         (prepare_resume_reply): Change ptid argument's type from unsigned
10209         long to ptid_t.  Adjust.  Implement W;process and X;process.
10210         (free_sym_cache, clear_symbol_cache): New.
10211         (look_up_one_symbol): Adjust to per-process symbol cache.  *
10212         * server.c (cont_thread, general_thread, step_thread): Change type
10213         to ptid_t.
10214         (attached): Delete.
10215         (multi_process): New.
10216         (last_ptid): Change type to ptid_t.
10217         (struct vstop_notif) <ptid>: Change type to ptid_t.
10218         (queue_stop_reply, push_event): Change `ptid' argument's type to
10219         ptid_t.
10220         (discard_queued_stop_replies): Add `pid' argument.
10221         (start_inferior): Adjust to use ptids.  Adjust to mywait interface
10222         changes.  Don't reference the `attached' global.
10223         (attach_inferior): Adjust to mywait interface changes.
10224         (handle_query): Adjust to use ptids.  Parse GDB's qSupported
10225         features.  Handle and report "multiprocess+".  Handle
10226         "qAttached:PID".
10227         (handle_v_cont): Adjust to use ptids.  Adjust to mywait interface
10228         changes.
10229         (handle_v_kill): New.
10230         (handle_v_stopped): Adjust to use target_pid_to_str.
10231         (handle_v_requests): Allow multiple attaches and runs when
10232         multiprocess extensions are in effect.  Handle "vKill".
10233         (myresume): Adjust to use ptids.
10234         (queue_stop_reply_callback): Add `arg' parameter.  Handle it.
10235         (handle_status): Adjust to discard_queued_stop_replies interface
10236         change.
10237         (first_thread_of, kill_inferior_callback)
10238         (detach_or_kill_inferior_callback, join_inferiors_callback): New.
10239         (main): Call initialize_inferiors.  Adjust to use ptids, killing
10240         and detaching from all inferiors.  Handle multiprocess packet
10241         variants.
10242         * linux-low.h: Include gdb_proc_service.h.
10243         (struct process_info_private): New.
10244         (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
10245         <lwpid_of>: Use ptid_get_lwp.
10246         (get_lwp_thread): Adjust.
10247         (struct lwp_info): Add `dead' member.
10248         (find_lwp_pid): Declare.
10249         * linux-low.c (thread_db_active): Delete.
10250         (new_inferior): Adjust comment.
10251         (inferior_pid): Delete.
10252         (linux_add_process): New.
10253         (handle_extended_wait): Adjust.
10254         (add_lwp): Change unsigned long to ptid.
10255         (linux_create_inferior): Add process to processes table.  Adjust
10256         to use ptids.  Don't set new_inferior here.
10257         (linux_attach_lwp): Rename to ...
10258         (linux_attach_lwp_1): ... this.  Add `initial' argument.  Handle
10259         it.  Adjust to use ptids.
10260         (linux_attach_lwp): New.
10261         (linux_attach): Add process to processes table.  Don't set
10262         new_inferior here.
10263         (struct counter): New.
10264         (second_thread_of_pid_p, last_thread_of_process_p): New.
10265         (linux_kill_one_lwp): Add `args' parameter.  Handle it.  Adjust to
10266         multiple processes.
10267         (linux_kill): Add `pid' argument.  Handle it.  Adjust to multiple
10268         processes.  Remove process from process table.
10269         (linux_detach_one_lwp): Add `args' parameter.  Handle it.  Adjust
10270         to multiple processes.
10271         (any_thread_of): New.
10272         (linux_detach): Add `pid' argument, and handle it.  Remove process
10273         from processes table.
10274         (linux_join): Add `pid' argument.  Handle it.
10275         (linux_thread_alive): Change unsighed long argument to ptid_t.
10276         Consider dead lwps as not being alive.
10277         (status_pending_p): Rename `dummy' argument to `arg'.  Filter out
10278         threads we're not interested in.
10279         (same_lwp, find_lwp_pid): New.
10280         (linux_wait_for_lwp): Change `pid' argument's type from int to
10281         ptid_t.  Adjust.
10282         (linux_wait_for_event): Rename to ...
10283         (linux_wait_for_event_1): ... this.  Change `pid' argument's type
10284         from int to ptid_t.  Adjust.
10285         (linux_wait_for_event): New.
10286         (linux_wait_1): Add `ptid' argument.  Change return type to
10287         ptid_t.  Adjust.  Use last_thread_of_process_p.  Remove processes
10288         that exit from the process table.
10289         (linux_wait): Add `ptid' argument.  Change return type to ptid_t.
10290         Adjust.
10291         (mark_lwp_dead): New.
10292         (wait_for_sigstop): Adjust to use ptids.  If a process exits while
10293         stopping all threads, mark its main lwp as dead.
10294         (linux_set_resume_request, linux_resume_one_thread): Adjust to use
10295         ptids.
10296         (fetch_register, usr_store_inferior_registers)
10297         (regsets_fetch_inferior_registers)
10298         (regsets_store_inferior_registers, linux_read_memory)
10299         (linux_write_memory): Inline `inferior_pid'.
10300         (linux_look_up_symbols): Adjust to use per-process
10301         `thread_db_active'.
10302         (linux_request_interrupt): Adjust to use ptids.
10303         (linux_read_auxv): Inline `inferior_pid'.
10304         (initialize_low): Don't reference thread_db_active.
10305         * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
10306         * proc-service.c (ps_lgetregs): Use find_lwp_pid.
10307         (ps_getpid): Return the pid of the current inferior.
10308         * thread-db.c (proc_handle, thread_agent): Delete.
10309         (thread_db_create_event, thread_db_enable_reporting): Adjust to
10310         per-process data.
10311         (find_one_thread): Change argument type to ptid_t.  Adjust to
10312         per-process data.
10313         (maybe_attach_thread): Adjust to per-process data and ptids.
10314         (thread_db_find_new_threads): Ditto.
10315         (thread_db_init): Ditto.
10316         * spu-low.c (spu_create_inferior, spu_attach): Add process to
10317         processes table.  Adjust to use ptids.
10318         (spu_kill, spu_detach): Adjust interface.  Remove process from
10319         processes table.
10320         (spu_join, spu_thread_alive): Adjust interface.
10321         (spu_wait): Adjust interface.  Remove process from processes
10322         table.  Adjust to use ptids.
10323         * win32-low.c (current_inferior_tid): Delete.
10324         (current_inferior_ptid): New.
10325         (debug_event_ptid): New.
10326         (thread_rec): Take a ptid.  Adjust.
10327         (child_add_thread): Add `pid' argument.  Adjust to use ptids.
10328         (child_delete_thread): Ditto.
10329         (do_initial_child_stuff): Add `attached' argument.  Add process to
10330         processes table.
10331         (child_fetch_inferior_registers, child_store_inferior_registers):
10332         Adjust.
10333         (win32_create_inferior): Pass 0 to do_initial_child_stuff.
10334         (win32_attach): Pass 1 to do_initial_child_stuff.
10335         (win32_kill): Adjust interface.  Remove process from processes
10336         table.
10337         (win32_detach): Ditto.
10338         (win32_join): Adjust interface.
10339         (win32_thread_alive): Take a ptid.
10340         (win32_resume): Adjust to use ptids.
10341         (get_child_debug_event): Ditto.
10342         (win32_wait): Adjust interface.  Remove exiting process from
10343         processes table.
10344
10345 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
10346
10347         Non-stop mode support.
10348
10349         * server.h (non_stop): Declare.
10350         (gdb_client_data, handler_func): Declare.
10351         (delete_file_handler, add_file_handler, start_event_loop):
10352         Declare.
10353         (handle_serial_event, handle_target_event, push_event)
10354         (putpkt_notif): Declare.
10355         * target.h (enum resume_kind): New.
10356         (struct thread_resume): Replace `step' field by `kind' field.
10357         (TARGET_WNOHANG): Define.
10358         (struct target_ops) <wait>: Add `options' argument.
10359         <supports_non_stop, async, start_non_stop>: New fields.
10360         (target_supports_non_stop, target_async): New.
10361         (start_non_stop): Declare.
10362         (mywait): Add `options' argument.
10363         * target.c (mywait): Add `options' argument.  Print child exit
10364         notifications here.
10365         (start_non_stop): New.
10366         * server.c (non_stop, own_buf, mem_buf): New globals.
10367         (struct vstop_notif): New.
10368         (notif_queue): New global.
10369         (queue_stop_reply, push_event, discard_queued_stop_replies)
10370         (send_next_stop_reply): New.
10371         (start_inferior): Adjust to use resume_kind.  Adjust to mywait
10372         interface changes.
10373         (attach_inferior): In non-stop mode, don't wait for the target
10374         here.
10375         (handle_general_set): Handle QNonStop.
10376         (handle_query): When handling qC, return the current general
10377         thread, instead of the first thread of the list.
10378         (handle_query): If the backend supports non-stop mode, include
10379         QNonStop+ in the qSupported query response.
10380         (handle_v_cont): Adjust to use resume_kind.  Handle resume_stop
10381         and non-stop mode.
10382         (handle_v_attach, handle_v_run): Handle non-stop mode.
10383         (handle_v_stopped): New.
10384         (handle_v_requests): Report support for vCont;t.  Handle vStopped.
10385         (myresume): Adjust to use resume_kind.  Handle non-stop.
10386         (queue_stop_reply_callback): New.
10387         (handle_status): Handle non-stop mode.
10388         (main): Clear non_stop flag on reconnection.  Use the event-loop.
10389         Refactor serial protocol handling from here ...
10390         (process_serial_event): ... to this new function.  When GDB
10391         selects any thread, select one here.  In non-stop mode, wait until
10392         GDB acks all pending events before exiting.
10393         (handle_serial_event, handle_target_event): New.
10394         * remote-utils.c (remote_open): Install remote_desc in the event
10395         loop.
10396         (remote_close): Remove remote_desc from the event loop.
10397         (putpkt_binary): Rename to...
10398         (putpkt_binary_1): ... this.  Add `is_notic' argument.  Handle it.
10399         (putpkt_binary): New as wrapper around putpkt_binary_1.
10400         (putpkt_notif): New.
10401         (prepare_resume_reply): In non-stop mode, don't change the
10402         general_thread.
10403         * event-loop.c: New.
10404         * Makefile.in (OBJ): Add event-loop.o.
10405         (event-loop.o): New rule.
10406
10407         * linux-low.h (pid_of): Moved here.
10408         (lwpid_of): New.
10409         (get_lwp_thread): Use lwpid_of.
10410         (struct lwp_info): Delete `lwpid' field.  Add `suspended' field.
10411         * linux-low.c (pid_of): Delete.
10412         (inferior_pid): Use lwpid_of.
10413         (linux_event_pipe): New.
10414         (target_is_async_p): New.
10415         (delete_lwp): New.
10416         (handle_extended_wait): Use lwpid_of.
10417         (add_lwp): Don't set lwpid field.
10418         (linux_attach_lwp): Adjust debug output.  Use lwpid_of.
10419         (linux_kill_one_lwp): If killing a running lwp, stop it first.
10420         Use lwpid_of.  Adjust to linux_wait_for_event interface changes.
10421         (linux_detach_one_lwp): If detaching from a running lwp, stop it
10422         first.  Adjust to linux_wait_for_event interface changes.  Use
10423         lwpid_of.
10424         (linux_detach): Don't delete the main lwp here.
10425         (linux_join): Use my_waitpid.  Avoid signal_pid.  Use lwpid_of.
10426         (status_pending_p): Don't consider explicitly suspended lwps.
10427         (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
10428         pointer.  Add OPTIONS argument.  Change return type to int.  Use
10429         my_waitpid instead of sleeping.  Handle WNOHANG.  Use lwpid_of.
10430         (linux_wait_for_event): Take an integer pid instead of a lwp_info
10431         pointer.  Add status pointer argument.  Return a pid instead of a
10432         status.  Use lwpid_of.  Adjust to linux_wait_for_lwp interface
10433         changes.  In non-stop mode, don't switch to a random thread.
10434         (linux_wait): Rename to...
10435         (linux_wait_1): ... this.  Add target_options argument, and handle
10436         it.  Adjust to use resume_kind.  Use lwpid_of.  In non-stop mode,
10437         don't handle the continue thread.  Handle TARGET_WNOHANG.  Merge
10438         clean exit and signal exit code.  Don't stop all threads in
10439         non-stop mode.  In all-stop mode, only stop all threads when
10440         reporting a stop to GDB.  Handle explicit thread stop requests.
10441         (async_file_flush, async_file_mark): New.
10442         (linux_wait): New.
10443         (send_sigstop): Use lwpid_of.
10444         (wait_for_sigstop): Use lwpid_of.  Adjust to linux_wait_for_event
10445         interface changes.  In non-stop mode, don't switch to a random
10446         thread.
10447         (linux_resume_one_lwp): Use lwpid_of.
10448         (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
10449         (linux_resume_one_thread): ... this.  Handle resume_stop.  In
10450         non-stop mode, don't look for pending flag in all threads.
10451         (resume_status_pending_p): Don't consider explicitly suspended
10452         threads.
10453         (my_waitpid): Reimplement.  Emulate __WALL.
10454         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10455         Use lwpid_of.
10456         (sigchld_handler, linux_supports_non_stop, linux_async)
10457         (linux_start_non_stop): New.
10458         (linux_target_ops): Register linux_supports_non_stop, linux_async
10459         and linux_start_non_stop.
10460         (initialize_low): Install SIGCHLD handler.
10461         * thread-db.c (thread_db_create_event, find_one_thread)
10462         (thread_db_get_tls_address): Use lwpid_of.
10463         * win32-low.c (win32_detach): Adjust to use resume_kind.
10464         (win32_wait): Add `options' argument.
10465         * spu-low.c (spu_resume): Adjust to use resume_kind.
10466         (spu_wait): Add `options' argument.
10467
10468 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
10469
10470         Decouple target code from remote protocol.
10471
10472         * target.h (enum target_waitkind): New.
10473         (struct target_waitstatus): New.
10474         (struct target_ops) <wait>: Return an unsigned long.  Take a
10475         target_waitstatus pointer instead of a char pointer.
10476         (mywait): Likewise.
10477         * target.c (mywait): Change prototype to return an unsigned long.
10478         Take a target_waitstatus pointer instead of a char pointer.  Adjust.
10479         * server.h (thread_from_wait, old_thread_from_wait): Delete
10480         declarations.
10481         (prepare_resume_reply): Change prototype to take a
10482         target_waitstatus.
10483         * server.c (thread_from_wait, old_thread_from_wait): Delete.
10484         (last_status, last_ptid): New.
10485         (start_inferior): Remove "statusptr" argument.  Adjust.  Return a
10486         pid instead of a signal.
10487         (attach_inferior): Remove "status" and "signal" parameters.
10488         Adjust.
10489         (handle_query): For qGetTLSAddr, parse the thread id with strtol,
10490         not as an address.
10491         (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
10492         (handle_v_requests, myresume): Remove "status" and "signal"
10493         parameters.  Adjust.
10494         (handle_status): New.
10495         (main): Delete local `status'.  Adjust.
10496         * remote-utils.c: Include target.h.
10497         (prepare_resume_reply): Change prototype to take a
10498         target_waitstatus.  Adjust.
10499
10500         * linux-low.c (linux_wait): Adjust to new target_ops->wait
10501         interface.
10502         * spu-low.c (spu_wait): Adjust.
10503         * win32-low.c (enum target_waitkind, struct target_waitstatus):
10504         Delete.
10505         (win32_wait): Adjust.
10506
10507 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
10508
10509         * target.h (struct thread_resume): Delete leave_stopped member.
10510         (struct target_ops): Add a `n' argument to the `resume' callback.
10511         * server.c (start_inferior): Adjust.
10512         (handle_v_cont, myresume): Adjust.
10513         * linux-low.c (check_removed_breakpoint): Adjust to resume
10514         interface change, and to removed leave_stopped field.
10515         (resume_ptr): Delete.
10516         (struct thread_resume_array): New.
10517         (linux_set_resume_request): Add new `arg' parameter.  Adjust to
10518         resume interface change.
10519         (linux_continue_one_thread, linux_queue_one_thread)
10520         (resume_status_pending_p): Check if the resume field is NULL
10521         instead of checking the leave_stopped member.
10522         (linux_resume): Adjust to the target resume interface change.
10523         * spu-low.c (spu_resume): Adjust to the target resume interface
10524         change.
10525         * win32-low.c (win32_detach, win32_resume): Ditto.
10526
10527 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
10528
10529         * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
10530         flag.
10531         (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
10532         pending.
10533         (linux_continue_one_thread): Only preserve the stepping flag if
10534         there's a pending breakpoint.
10535
10536 2009-03-31  Pedro Alves  <pedro@codesourcery.com>
10537
10538         * server.c (main): After the inferior having exited, call
10539         remote_close before exiting gdbserver.
10540
10541 2009-03-25  Thiago Jung Bauermann  <bauerman@br.ibm.com>
10542
10543         Fix size of FPSCR in Power 7 processors.
10544         * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
10545         (PPC_FEATURE_HAS_DFP): New #define.
10546         (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
10547         size of the FPSCR.
10548
10549 2009-03-23  Pedro Alves  <pedro@codesourcery.com>
10550
10551         * server.c (handle_query) Whitespace and formatting.
10552
10553 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
10554
10555         * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10556         linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10557         linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10558         linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10559         regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10560         thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10561         Makefile.in, configure.ac: Fix whitespace throughout.
10562         * configure: Regenerate.
10563
10564 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
10565
10566         * inferiors.c (find_inferior): Make it safe for the callback
10567         function to delete the currently iterated inferior.
10568
10569 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
10570
10571         * Makefile.in (linuw_low_h): Move higher.
10572         (thread-db.o): Depend on $(linux_low_h).
10573
10574 2009-03-17  Pedro Alves  <pedro@codesourcery.com>
10575
10576         Rename "process" to "lwp" throughout.
10577
10578         * linux-low.c (all_processes): Rename to...
10579         (all_lwps): ... this.
10580         (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10581         (add_process): Rename to ...
10582         (add_lwp): ... this.  Adjust.
10583         (linux_create_inferior): Adjust.
10584         (linux_attach_lwp): Adjust.
10585         (linux_attach): Adjust.
10586         (linux_kill_one_process): Rename to ...
10587         (linux_kill_one_lwp): ... this.  Adjust.
10588         (linux_kill): Adjust.
10589         (linux_detach_one_process): Rename to ...
10590         (linux_detach_one_lwp): ... this.  Adjust.
10591         (linux_detach): Adjust.
10592         (check_removed_breakpoint): Adjust.
10593         (status_pending_p): Adjust.
10594         (linux_wait_for_process): Rename to ...
10595         (linux_wait_for_lwp): ... this.  Adjust.
10596         (linux_wait_for_event): Adjust.
10597         (send_sigstop): Adjust.
10598         (wait_for_sigstop): Adjust.
10599         (stop_all_processes): Rename to ...
10600         (stop_all_lwps): ... this.
10601         (linux_resume_one_process): Rename to ...
10602         (linux_resume_one_lwp): ... this.  Adjust.
10603         (linux_set_resume_request, linux_continue_one_thread)
10604         (linux_queue_one_thread, resume_status_pending_p)
10605         (usr_store_inferior_registers, regsets_store_inferior_registers)
10606         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10607         Adjust.
10608         * linux-low.h (get_process): Rename to ...
10609         (get_lwp): ... this.  Adjust.
10610         (get_thread_process): Rename to ...
10611         (get_thread_lwp): ... this.  Adjust.
10612         (get_process_thread): Rename to ...
10613         (get_lwp_thread): ... this.  Adjust.
10614         (struct process_info): Rename to ...
10615         (struct lwp_info): ... this.
10616         (all_processes): Rename to ...
10617         (all_lwps): ... this.
10618         * proc-service.c (ps_lgetregs): Adjust.
10619         * thread-db.c (thread_db_create_event, find_one_thread)
10620         (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10621
10622 2009-03-14  Pedro Alves  <pedro@codesourcery.com>
10623
10624         * server.c (handle_query): Handle "qAttached".
10625
10626 2009-03-13  Nathan Sidwell  <nathan@codesourcery.com>
10627
10628         * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10629         GPLv3, update license URL.
10630
10631 2009-03-01  Doug Evans  <dje@google.com>
10632
10633         * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
10634         (server_h): Add gdb_signals.h.
10635         (signals.o): Update.
10636         * server.h (target_signal_from_host,target_signal_to_host_p)
10637         (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10638
10639 2009-02-14  Pierre Muller  <muller@ics.u-strasbg.fr>
10640
10641         * remote-utils.c (getpkt): Also generate remote-debug
10642         information if noack_mode is set.
10643
10644 2009-02-06  Pedro Alves  <pedro@codesourcery.com>
10645
10646         * server.c (handle_query): Report qXfer:siginfo:read and
10647         qXfer:siginfo:write as supported and handle them.
10648         * target.h (struct target_ops) <qxfer_siginfo>: New field.
10649         * linux-low.c (linux_xfer_siginfo): New.
10650         (linux_target_ops): Set it.
10651
10652 2009-01-26  Pedro Alves  <pedro@codesourcery.com>
10653
10654         * server.c (gdbserver_usage): Mention --remote-debug.
10655         (main): Accept '--remote-debug' switch.
10656
10657 2009-01-18  Doug Evans  <dje@google.com>
10658
10659         * regcache.c (new_register_cache): No need to check result of xcalloc.
10660         * server.c (handle_search_memory): Back out calls to xmalloc,
10661         result is checked and error is returned to user upon failure.
10662         (handle_query): Ditto.  Add more checks for result of malloc.
10663         (handle_v_cont): Check result of malloc, report error back to
10664         user upon failure.
10665         (handle_v_run): Ditto.  Call freeargv.
10666         * server.h (freeargv): Declare.
10667         * utils.c (freeargv): New fn.
10668
10669 2009-01-15  Doug Evans  <dje@google.com>
10670
10671         * gdbreplay.c (perror_with_name): Make arg const char *.
10672         * server.h (target_signal_to_name): Make return type const char *.
10673         * thread-db.c (thread_db_err_str): Make return type const char *.
10674         * utils.c (perror_with_name): Make arg const char *.
10675
10676 2009-01-14  Pedro Alves  <pedro@codesourcery.com>
10677
10678         * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10679         when handling a EXIT_PROCESS_DEBUG_EVENT.
10680
10681 2009-01-06  Joel Brobecker  <brobecker@adacore.com>
10682
10683         * gdbreplay.c (gdbreplay_version): Update copyright year.
10684         * server.c (gdbserver_version): Likewise.
10685
10686 2009-01-05  Doug Evans  <dje@google.com>
10687
10688         * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
10689         (handle_extended_wait): Improve comment.
10690
10691 2008-12-13  Doug Evans  <dje@google.com>
10692
10693         * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10694         * server.h (ATTR_MALLOC): New macro.
10695         (xmalloc,xcalloc,xstrdup): Declare.
10696         * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10697         * inferiors.c: Ditto.
10698         * linux-low.c: Ditto.
10699         * mem-break.c: Ditto.
10700         * regcache.c: Ditto.
10701         * remote-utils.c: Ditto.
10702         * server.c: Ditto.
10703         * target.c: Ditto.
10704         * win32-low.c: Ditto.
10705
10706 2008-12-12  Doug Evans  <dje@google.com>
10707
10708         * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10709         in debugging printf.
10710
10711         * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10712
10713 2008-12-09  Doug Evans  <dje@google.com>
10714
10715         * linux-low.h (struct process_info): Delete member tid, unused.
10716         * thread-db.c (find_one_thread): Update.
10717         (maybe_attach_thread): Update.
10718
10719 2008-12-02  Pedro Alves  <pedro@codesourcery.com>
10720
10721         * target.h (struct target_ops): Add qxfer_osdata member.
10722         * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10723         and dirent.h.
10724         (linux_qxfer_osdata): New functions.
10725         (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10726         callback.
10727         * server.c (handle_query): Handle "qXfer:osdata:read:".
10728         * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10729         (buffer_xml_printf): New functions.
10730         * server.h (struct buffer): New.
10731         (buffer_grow_str, buffer_grow_str0): New macros.
10732         (buffer_grow, buffer_free, buffer_init, buffer_finish)
10733         (buffer_xml_printf): Declare.
10734
10735 2008-11-24  Doug Evans  <dje@google.com>
10736
10737         * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10738
10739 2008-11-24  Daniel Jacobowitz  <dan@codesourcery.com>
10740
10741         * server.c (handle_v_run): Always use the supplied argument list.
10742
10743 2008-11-19  Bob Wilson  <bob.wilson@acm.org>
10744
10745         * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10746         (xtensa_regmap_table): Add entry for scompare1.
10747
10748 2008-11-18  Thiago Jung Bauermann  <bauerman@br.ibm.com>
10749
10750         * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10751         powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10752         powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10753         powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10754         powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10755         powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10756         * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10757         XML target descriptions.
10758         * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10759         when inferior is running on an ISA 2.05 or later processor.  Add
10760         special case to return offset for full 64-bit slot of FPSCR when
10761         in 32-bits.
10762
10763 2008-11-14  Daniel Gutson  <dgutson@codesourcery.com>
10764
10765         * Makefile.in (SFILES, clean): Added sparc64 files.
10766         (reg-sparc64.o, reg-sparc64.c): New.
10767         * configure.srv (sparc*-*-linux*): New configuration.
10768         * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10769         syscall arguments for SPARC.
10770         (regsets_store_inferior_registers): Likewise.
10771         * linux-sparc-low.c: New file.
10772
10773 2008-10-21  Doug Evans  <dje@google.com>
10774
10775         * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10776         (READLINE_DIR,READLINE_DEP): Delete.
10777         (INTERNAL_CFLAGS): Update.
10778         (LINTFLAGS): Update.
10779
10780 2008-10-10  Pedro Alves  <pedro@codesourcery.com>
10781
10782         * server.c (handle_v_run): If GDB didn't specify an argv, use the
10783         whole argv from the last run, not just argv[0].
10784
10785 2008-09-08  Pedro Alves  <pedro@codesourcery.com>
10786
10787         * regcache.c (new_register_cache): Return NULL if the register
10788         cache size isn't known yet.
10789         (free_register_cache): Avoid dereferencing a NULL regcache.
10790
10791 2008-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
10792
10793         * configure.srv: Merge MIPS and MIPS64.
10794
10795 2008-08-24  Maciej W. Rozycki  <macro@linux-mips.org>
10796
10797         * Makefile.in (uninstall): Apply $(EXEEXT) too.
10798
10799 2008-08-18  Luis Machado  <luisgpm@br.ibm.com>
10800
10801         * Makefile.in: Add required vsx dependencies.
10802
10803         * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10804         Declare init_registers_powerpc_vsx32l.
10805         Declare init_registers_powerpc_vsx64l.
10806         Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10807         (ppc_arch_setup): Check for VSX in hwcap.
10808         (ppc_fill_vsxregset): New function.
10809         (ppc_store_vsxregset): New function.
10810         Add new VSX entry in regset_info target_regsets.
10811
10812         * configure.srv: Add new VSX dependencies.
10813
10814 2008-08-12  Pedro Alves  <pedro@codesourcery.com>
10815
10816         * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10817         (remote_open): Set or clear transport_is_reliable.
10818         (putpkt_binary): Don't expect acks in noack mode.
10819         (getpkt): Don't send ack/nac in noack mode.
10820         * server.c (handle_general_set): Handle QStartNoAckMode.
10821         (handle_query): If connected by tcp pass QStartNoAckMode+ in
10822         qSupported.
10823         (main): Reset noack_mode on every connection.
10824         * server.h (noack_mode): Declare.
10825
10826 2008-08-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10827
10828         * Makefile.in (GDBREPLAY_OBS): New variable.
10829         (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10830
10831 2008-08-05  Ulrich Weigand  <uweigand@de.ibm.com>
10832             Daniel Jacobowitz  <dan@codesourcery.com>
10833
10834         * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10835         (usr_store_inferior_registers): Likewise.
10836         (regsets_store_inferior_registers): Likewise.
10837
10838 2008-07-31  Rolf Jansen  <rj@surtec.com>
10839             Pedro Alves  <pedro@codesourcery.com>
10840
10841         * configure.ac: Check for memmem declaration.
10842         * server.c [HAVE_MALLOC_H]: Include malloc.h.
10843         (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10844         (disable_packet_qfThreadInfo): Unconditionally compile.
10845         * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10846         * configure, config.in: Regenerate.
10847
10848 2008-07-28  Doug Kwan  <dougkwan@google.com>
10849
10850         * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10851         (linux_write_memory): Remove declaration of errno.
10852
10853 2008-07-12  Ulrich Weigand  <uweigand@de.ibm.com>
10854
10855         * linux-low.c (handle_extended_wait): Do not use "status"
10856         variable uninitialized.
10857
10858 2008-07-07  Pedro Alves  <pedro@codesourcery.com>
10859
10860         * server.c (handle_v_attach): Inhibit reporting dll changes.
10861
10862 2008-06-27  Pedro Alves  <pedro@codesourcery.com>
10863
10864         * remote-utils.c (prepare_resume_reply): If requested, don't
10865         output "thread:TID" in the T stop reply.
10866
10867         * server.c (disable_packet_vCont, disable_packet_Tthread)
10868         (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10869         (handle_query): If requested, disable support for qC, qfThreadInfo
10870         and qsThreadInfo.
10871         (handle_v_requests): If requested, disable support for vCont.
10872         (gdbserver_show_disableable): New.
10873         (main): Handle --disable-packet and --disable-packet=LIST.
10874
10875         * server.h (disable_packet_vCont, disable_packet_Tthread)
10876         (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10877
10878 2008-06-20  Carlos O'Donell  <carlos@codesourcery.com>
10879
10880         * server.c (gdbserver_usage): Mention --version.
10881
10882 2008-06-06  Daniel Jacobowitz  <dan@codesourcery.com>
10883
10884         * Makefile.in (gdbreplay.o): New rule.
10885
10886 2008-06-06  Joseph Myers  <joseph@codesourcery.com>
10887
10888         * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10889         message, not gdbserver.
10890
10891 2008-06-05  Vladimir Prus  <vladimir@codesourcery.com>
10892             Nathan Sidwell  <nathan@codesourcery.com>
10893             Joseph Myers  <joseph@codesourcery.com>
10894
10895         * acinclude.m4: Include ../../config/acx.m4.
10896         * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10897         * configure, config.in: Regenerate.
10898         * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10899         * server.c (gdbserver_version): Print PKGVERSION.
10900         (gdbsrever_usage): Add stream parameter.  Print REPORT_BUGS_TO.
10901         (main): Adjust gdbserver_usage calls.
10902         * gdbreplay.c (version, host_name): Add declarations.
10903         (gdbreplay_version, gdbreplay_usage): New.
10904         (main): Accept --version and --help options.
10905
10906 2008-06-04  Daniel Jacobowitz  <dan@codesourcery.com>
10907
10908         * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10909         (arm_breakpoint_at): Handle Thumb.
10910         (the_low_target): Add comment.
10911
10912 2008-05-29  Ulrich Weigand  <uweigand@de.ibm.com>
10913
10914         * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10915
10916 2008-05-09  Doug Evans  <dje@google.com>
10917
10918         * server.h (decode_search_memory_packet): Declare.
10919         * remote-utils.c (decode_search_memory_packet): New fn.
10920         * server.c (handle_search_memory_1): New fn.
10921         (handle_search_memory): New fn.
10922         (handle_query): Process qSearch:memory packets.
10923
10924 2008-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
10925
10926         * regcache.c (registers_length): Remove.
10927         (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10928         full register packet.
10929         * regcache.h (registers_length): Remove prototype.
10930         * server.h (PBUFSIZ): Define to 16384.
10931
10932 2008-05-03  Ulrich Weigand  <uweigand@de.ibm.com>
10933
10934         * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10935         powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10936         powerpc-64l.o, and powerpc-altivec64l.o.
10937         Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10938         rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10939         rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10940         rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10941         rs6000/power-linux.xml, and rs6000/power64-linux.xml
10942         to srv_xmlfiles.
10943
10944         * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10945         (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10946         (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10947         (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10948         (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10949         (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10950         (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10951         (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10952         (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10953         (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10954         (clean): Update.
10955
10956         * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10957         (init_registers_powerpc_32l): ... this new prototype.
10958         (init_registers_powerpc_32): Remove, replace by ...
10959         (init_registers_powerpc_altivec32l): ... this new prototype.
10960         (init_registers_powerpc_e500): Remove, replace by ...
10961         (init_registers_powerpc_e500l): ... this new prototype.
10962         (init_registers_ppc64): Remove, replace by ...
10963         (init_registers_powerpc_64l): ... this new prototype.
10964         (init_registers_powerpc_64): Remove, replace by ...
10965         (init_registers_powerpc_altivec64l): ... this new prototype.
10966         (ppc_num_regs): Set to 73.
10967         (PT_ORIG_R3, PT_TRAP): Define if necessary.
10968         (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10969         (ppc_cannot_store_register): Handle orig_r3 and trap.
10970         (ppc_arch_setup): Update init_registers_... calls.
10971         (ppc_fill_gregset): Handle orig_r3 and trap.
10972
10973         * inferiors.c (clear_inferiors): Reset current_inferior.
10974
10975 2008-04-23  Paolo Bonzini  <bonzini@gnu.org>
10976
10977         * acinclude.m4: Add override.m4.
10978         * configure: Regenerate.
10979
10980 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
10981
10982         * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10983         initial call to init_register_ppc64.
10984
10985 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
10986
10987         * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10988         single powerpc*-*-linux* case.
10989         (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10990
10991 2008-04-17  Ulrich Weigand  <uweigand@de.ibm.com>
10992
10993         * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
10994         srv_regobj.  Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
10995         from reg_xmlfiles.
10996         * linux-ppc-low.c: Include <elf.h>.
10997         (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10998         (ppc_hwcap): New global variable.
10999         (ppc_regmap): Remove __SPE__ #ifdef sections.
11000         (ppc_regmap_e500): New global variable.
11001         (ppc_cannot_store_register): Update __SPE__ special case.
11002         (ppc_get_hwcap): New function.
11003         (ppc_arch_setup): Use it to determine whether inferior supports
11004         AltiVec or SPE registers.  Set the_low_target.regmap if appropriate.
11005         (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
11006         Do not access registers if target does not support AltiVec.
11007         (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
11008         Do not access registers if target does not support SPE.
11009         (target_regsets): Unconditionally include AltiVec and SPE regsets.
11010
11011 2008-04-17  Daniel Jacobowitz  <dan@codesourcery.com>
11012
11013         * linux-low.c (disabled_regsets, num_regsets): New.
11014         (use_regsets_p): Delete.
11015         (linux_wait_for_process): Clear disabled_regsets.
11016         (regsets_fetch_inferior_registers): Check and set it.
11017         (regsets_store_inferior_registers): Likewise.
11018         (linux_fetch_registers, linux_store_registers): Do not use
11019         use_regsets_p.
11020         (initialize_low): Allocate disabled_regsets.
11021
11022 2008-04-14  Daniel Jacobowitz  <dan@codesourcery.com>
11023
11024         * Makefile.in (LIBOBJS): New.
11025         (OBS): Use LIBOBJS.
11026         (memmem.o): New rule.
11027         * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
11028         * configure: Regenerated.
11029
11030 2008-04-04  Ulrich Weigand  <uweigand@de.ibm.com>
11031
11032         * server.c (handle_query): Never return "unsupported" for
11033         qXfer:features:read queries.
11034
11035 2008-03-27  Ulrich Weigand  <uweigand@de.ibm.com>
11036
11037         * server.c (get_features_xml): Fix inverted condition.
11038         (handle_query): Always support qXfer:feature:read.
11039
11040 2008-03-10  Daniel Jacobowitz  <dan@codesourcery.com>
11041
11042         * server.c (wrapper_argv): New.
11043         (start_inferior): Handle wrapper_argv.  If set, expect an extra
11044         trap.
11045         (gdbserver_usage): Document --wrapper.
11046         (main): Parse --wrapper.
11047
11048 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
11049
11050         * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
11051         powerpc-*-linux* to srv_regobj and reg_xmlfiles.
11052         * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
11053         (ppc_set_pc): Likewise.
11054         (ppc_arch_setup): New function.
11055         (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
11056         of collect_register.
11057         (the_low_target): Use ppc_arch_setup as arch_setup initializer.
11058
11059 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
11060
11061         * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
11062         instead of linux-ppc64-low.o.
11063         * linux-ppc64-low.c: Remove file.
11064         * Makefile.in (SFILES): Remove linux-ppc64-low.c.
11065         (linux-ppc64-low.o): Remove rule.
11066
11067         * linux-ppc-low.c (init_registers_ppc64): Add prototype.
11068         (init_registers_powerpc_64): Likewise.
11069         (ppc_regmap): Conditionally define depending on __powerpc64__.
11070         (ppc_cannot_store_register): Do not special-case "fpscr" when
11071         compiled on __powerpc64__.
11072         (ppc_collect_ptrace_register): New function.
11073         (ppc_supply_ptrace_register): New function.
11074         (ppc_breakpoint): Change type to "unsigned int".
11075         (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
11076         (the_low_target): Conditionally provide initializers for the
11077         arch_setup member depending on __powerpc64__.  Install
11078         collect_ptrace_register and supply_ptrace_register members.
11079
11080 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
11081
11082         * regcache.h (gdbserver_xmltarget): Add extern declaration.
11083         * server.c (gdbserver_xmltarget): Define.
11084         (get_features_xml): Use it to replace "target.xml" and arch_string.
11085
11086         * configure.srv: Remove srv_xmltarget.  Add XML files that were
11087         mentioned there to srv_xmlfiles instead.  Remove conditional tests
11088         on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
11089         srv_xmlfiles and srv_regobj to include all possible choices.
11090         * configure.ac (srv_xmltarget): Remove.
11091         (srv_xmlfiles): Do not add "target.xml".
11092         (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
11093         checks for supplementary target information.
11094         * configure: Regenerate.
11095         * Makefile.in (XML_TARGET): Remove.
11096         (target.xml): Remove rule.
11097         (clean): Do not clean up target.xml.
11098         (.PRECIOUS): Do not mention target.xml.
11099
11100         * target.h (struct target_ops): Remove arch_string member.
11101         * linux-low.c (linux_arch_string): Remove.
11102         (linux_target_ops): Remove arch_string initializer.
11103         * linux-low.h (struct linux_target_ops): Remove arch_string member.
11104         * linux-i386-low.c (the_low_target): Remove arch_string initializer.
11105         * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
11106         * spu-low.c (spu_arch_string): Remove.
11107         (spu_target_ops): Remove arch_string initializer.
11108         * win32-low.c (win32_arch_string): Remove.
11109         (win32_target_ops): Remove arch_string initializer.
11110         * win32-low.h (struct win32_target_ops): Remove arch_string member.
11111         * win32-arm-low.c (the_low_target): Remove arch_string initializer.
11112         * win32-i368-low.c (the_low_target): Remove arch_string initializer.
11113
11114 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
11115
11116         * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
11117         by collect_ptrace_register and supply_ptrace_register hooks.
11118         * linux-low.c (fetch_register): Use supply_ptrace_register callback
11119         instead of checking for the_low_target.left_pad_xfer.
11120         (usr_store_inferior_registers): Use collect_ptrace_register callback
11121         instead of checking for the_low_target.left_pad_xfer.
11122
11123         * linux-s390-low.c (s390_collect_ptrace_register): New function.
11124         (s390_supply_ptrace_register): Likewise.
11125         (s390_fill_gregset): Call s390_collect_ptrace_register.
11126         (the_low_target): Update.
11127
11128         * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
11129         (ppc_supply_ptrace_register): Likewise.
11130         (the_low_target): Update.
11131
11132         * linux-i386-low.c (the_low_target): Update.
11133         * linux-x86-64-low.c (the_low_target): Update.
11134
11135 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
11136
11137         * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
11138         reg-s390.o and reg-s390x.o.
11139
11140         * linux-low.c (new_inferior): New global variable.
11141         (linux_create_inferior, linux_attach): Set it.
11142         (linux_wait_for_process): Call the_low_target.arch_setup after the
11143         target has stopped for the first time.
11144         (initialize_low): Do not call the_low_target.arch_setup.
11145
11146         * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
11147         (s390_set_pc): Likewise.
11148         (s390_arch_setup): New function.
11149         (the_low_target): Use s390_arch_setup as arch_setup routine.
11150
11151         * regcache.c (realloc_register_cache): New function.
11152         (set_register_cache): Call it for each existing regcache.
11153
11154 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
11155
11156         * server.h (init_registers): Remove prototype.
11157
11158         * linux-low.h (struct linux_target_ops): Add arch_setup field.
11159         * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
11160         instead of init_registers ().
11161         * linux-arm-low.c (init_registers_arm): Add prototype.
11162         (init_registers_arm_with_iwmmxt): Likewise.
11163         (the_low_target): Add initializer for arch_setup field.
11164         * linux-cris-low.c (init_registers_cris): Add prototype.
11165         (the_low_target): Add initializer for arch_setup field.
11166         * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
11167         (the_low_target): Add initializer for arch_setup field.
11168         * linux-i386-low.c (init_registers_i386_linux): Add prototype.
11169         (the_low_target): Add initializer for arch_setup field.
11170         * linux-ia64-low.c (init_registers_ia64): Add prototype.
11171         (the_low_target): Add initializer for arch_setup field.
11172         * linux-m32r-low.c (init_registers_m32r): Add prototype.
11173         (the_low_target): Add initializer for arch_setup field.
11174         * linux-m68k-low.c (init_registers_m68k): Add prototype.
11175         (the_low_target): Add initializer for arch_setup field.
11176         * linux-mips-low.c (init_registers_mips_linux): Add prototype.
11177         (init_registers_mips64_linux): Likewise.
11178         (the_low_target): Add initializer for arch_setup field.
11179         * linux-ppc-low.c (init_registers_ppc): Add prototype.
11180         (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
11181         (the_low_target): Add initializer for arch_setup field.
11182         * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
11183         (init_registers_powerpc_64): Likewise.
11184         (the_low_target): Add initializer for arch_setup field.
11185         * linux-s390-low.c (init_registers_s390): Add prototype.
11186         (init_registers_s390x): Likewise.
11187         (the_low_target): Add initializer for arch_setup field.
11188         * linux-sh-low.c (init_registers_sh): Add prototype.
11189         (the_low_target): Add initializer for arch_setup field.
11190         * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
11191         (the_low_target): Add initializer for arch_setup field.
11192         * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
11193         (the_low_target): Add initializer for arch_setup field.
11194
11195         * win32-low.h (struct win32_target_ops): Add arch_setup field.
11196         * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
11197         instead of init_registers ().
11198         * win32-arm-low.c (init_registers_arm): Add prototype.
11199         (the_low_target): Add initializer for arch_setup field.
11200         * win32-i386-low.c (init_registers_i386): Add prototype.
11201         (the_low_target): Add initializer for arch_setup field.
11202
11203         * spu-low.c (init_registers_spu): Add prototype.
11204         (initialize_low): Call initialie_registers_spu () instead of
11205         initialize_registers ().
11206
11207 2008-02-19  Pedro Alves  <pedro@codesourcery.com>
11208
11209         * server.c (handle_v_requests): When handling the vRun and vAttach
11210         packets, if already debugging a process, don't kill it.  Return an
11211         error instead.
11212
11213 2008-02-17  Daniel Jacobowitz  <dan@codesourcery.com>
11214
11215         * server.c (handle_query): Correct length check.
11216
11217 2008-02-14  Pedro Alves  <pedro_alves@portugalmail.pt>
11218
11219         * win32-low.c (do_initial_child_stuff): Add process handle
11220         parameter.  Set current_process_handle and current_process_id from the
11221         parameters. Clear globals.
11222         (win32_create_inferior): Don't set current_process_handle and
11223         current_process_id here.  Instead pass them on the call to
11224         do_initial_child_stuff.
11225         (win32_attach): Likewise.
11226         (win32_clear_inferiors): New.
11227         (win32_kill): Don't close the current process handle or the
11228         current thread handle here.  Instead call win32_clear_inferiors.
11229         (win32_detach): Don't open a new handle to the process.  Call
11230         win32_clear_inferiors.
11231         (win32_join): Don't rely on current_process_handle; open a new
11232         handle using the process id.
11233         (win32_wait): Call win32_clear_inferiors when the inferior process
11234         has exited.
11235
11236 2008-02-14  Daniel Jacobowitz  <dan@codesourcery.com>
11237
11238         * server.c (monitor_show_help): Add "exit".
11239
11240 2008-02-11  Maxim Grigoriev  <maxim2405@gmail.com>
11241
11242         * Makefile.in (SFILES): Add linux-xtensa-low.c.
11243         (clean): Add reg-xtensa.c.
11244         (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
11245         * configure.srv (xtensa*-*-linux*) New target.
11246         * linux-xtensa-low.c: New.
11247         * xtensa-xtregs.c: New.
11248
11249 2008-02-01  Pedro Alves  <pedro_alves@portugalmail.pt>
11250
11251         * hostio.c: Don't include errno.h.
11252         (errno_to_fileio_errno): Move to hostio-errno.
11253         * hostio.c: (hostio_error): Remove the error parameter.  Defer the
11254         error number outputting to the target->hostio_last_error callback.
11255         (hostio_packet_error): Use FILEIO_EINVAL directly.
11256         (handle_open, handle_pread, hostio_error, handle_unlink): Update
11257         calls to hostio_error.
11258         * hostio-errno.c: New.
11259         * server.h (hostio_last_error_from_errno): Declare.
11260         * target.h (target_ops): Add hostio_last_error member.
11261         * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
11262         as hostio_last_error handler.
11263         * spu-low.c (spu_target_ops): Likewise.
11264         * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
11265         (wince_hostio_last_error): New functions.
11266         (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
11267         as hostio_last_error handler.
11268         (win32_target_ops) [!_WIN32_WCE]: Register
11269         hostio_last_error_from_errno as hostio_last_error handler.
11270         * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
11271         (hostio-errno.o): New rule.
11272         * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
11273         * configure.srv (srv_hostio_err_objs): New variable.  Default to
11274         hostio-errno.o.
11275         (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
11276         * configure: Regenerate.
11277
11278 2008-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
11279
11280         * linux-low.c (linux_attach_lwp): Do not _exit after errors.
11281         (linux_kill, linux_detach): Clean up the process list.
11282         * remote-utils.c (remote_open): Improve port number parsing.
11283         (putpkt_binary, input_interrupt): Only send interrupts if the target
11284         is running.
11285         * server.c (extended_protocol): Make static.
11286         (attached): Define earlier.
11287         (exit_requested, response_needed, program_argv): New variables.
11288         (target_running): New.
11289         (start_inferior): Clear attached here.
11290         (attach_inferior): Set attached here.
11291         (require_running): Define.
11292         (handle_query): Use require_running and target_running.  Implement
11293         "monitor exit".
11294         (handle_v_attach, handle_v_run): New.
11295         (handle_v_requests): Use require_running.  Handle vAttach and vRun.
11296         (gdbserver_usage): Update.
11297         (main): Redo argument parsing.  Handle --debug and --multi.  Handle
11298         --attach along with other options or after the port.  Save
11299         program_argv.  Support no initial program.  Resynchronize
11300         communication with GDB after an error.  Handle "monitor exit".
11301         Use require_running and target_running.  Always allow the extended
11302         protocol.  Do not error out for Hc0 or Hc-1.  Do not automatically
11303         restart in extended mode.
11304         * README: Refer to the GDB manual.  Update --attach usage.
11305
11306 2007-12-20  Andreas Schwab  <schwab@suse.de>
11307
11308         * linux-low.c (STACK_SIZE): Define.
11309         (linux_tracefork_child): Use it.  Use __clone2 on ia64.
11310         (linux_test_for_tracefork): Likewise.
11311
11312 2007-12-18  Daniel Jacobowitz  <dan@codesourcery.com>
11313
11314         * linux-low.c (linux_wait_for_event): Update messages.  Do not
11315         reinsert auto-delete breakpoints.
11316         * mem-break.c (struct breakpoint): Change return type of handler to
11317         int.
11318         (set_breakpoint_at): Update handler type.
11319         (reinsert_breakpoint_handler): Return 1 instead of calling
11320         delete_breakpoint.
11321         (reinsert_breakpoint_by_bp): Check for the original breakpoint before
11322         setting a new one.
11323         (check_breakpoints): Delete auto-delete breakpoints and return 2.
11324         * mem-break.h (set_breakpoint_at): Update handler type.
11325         * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
11326         * win32-low.c (auto_delete_breakpoint): New.
11327         (get_child_debug_event): Use it.
11328
11329 2007-12-16  Daniel Jacobowitz  <dan@codesourcery.com>
11330
11331         * configure.ac: Check for pread and pwrite.
11332         * hostio.c (handle_pread): Fall back to lseek and read.
11333         (handle_pwrite): Fall back to lseek and write.
11334         * config.in, configure: Regenerated.
11335
11336 2007-12-07  Daniel Jacobowitz  <dan@codesourcery.com>
11337
11338         * server.c (myresume): Add own_buf argument.
11339         (main): Update calls.
11340
11341 2007-12-06  Daniel Jacobowitz  <dan@codesourcery.com>
11342
11343         * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
11344         * remote-utils.c (remote_open): Do not call disable_async_io.
11345         (block_async_io): Delete.
11346         (unblock_async_io): Make static.
11347         (initialize_async_io): New.
11348         * server.c (handle_v_cont): Handle async I/O here.
11349         (myresume): Likewise.  Move other common resume tasks here...
11350         (main): ... from here.  Call initialize_async_io.  Disable async
11351         I/O before the main loop.
11352         * server.h (initialize_async_io): Declare.
11353         (block_async_io, unblock_async_io): Delete prototypes.
11354         * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
11355
11356 2007-12-06  Mick Davis  <mickd@goanna.iinet.net.au>
11357
11358         * remote-utils.c (readchar): Allow binary data in received messages.
11359
11360 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11361
11362         * win32-low.c (attaching): New global.
11363         (win32_create_inferior): Clear the `attaching' global.
11364         (win32_attach): Set the `attaching' global.
11365         (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
11366         attaching.  Only set a breakpoint at the entry point if not
11367         attaching.
11368
11369 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11370
11371         * server.c (main): Don't report dll events on the initial
11372         connection on attaches.
11373
11374 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11375
11376         * server.c (main): Relax numerical bases supported for the pid of
11377         the --attach command line argument.
11378
11379 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11380
11381         * win32-low.c (win32_attach): Call OpenProcess before
11382         DebugActiveProcess, not after.  Add last error output to error
11383         call.
11384
11385 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11386
11387         * win32-low.c (win32_get_thread_context)
11388         (win32_set_thread_context): New functions.
11389         (thread_rec): Use win32_get_thread_context.
11390         (continue_one_thread, win32_resume): Use win32_set_thread_context.
11391         * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
11392         field.
11393
11394 2007-12-03  Leo Zayas
11395             Pedro Alves  <pedro_alves@portugalmail.pt>
11396
11397         * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
11398         global variables.
11399         (child_add_thread): Minor cleanup.
11400         (child_continue): Resume artificially suspended threads before
11401         calling ContinueDebugEvent.
11402         (suspend_one_thread): New.
11403         (fake_breakpoint_event): New.
11404         (get_child_debug_event): Change return type to int.  Check here if
11405         gdb sent an interrupt request.  If a soft interrupt was requested,
11406         fake a breakpoint event.  Return 0 if there is no event to handle,
11407         and 1 otherwise.
11408         (win32_wait): Don't check here if gdb sent an interrupt request.
11409         Ensure there is a valid event to handle.
11410         (win32_request_interrupt): Add soft interruption method as last
11411         resort.
11412
11413 2007-12-03  Leo Zayas
11414             Pedro Alves  <pedro_alves@portugalmail.pt>
11415
11416         * win32-low.h (win32_thread_info): Add descriptions to the
11417         structure members.  Replace `suspend_count' counter by a
11418         `suspended' flag.
11419         * win32-low.c (thread_rec): Update condition of when to get the
11420         context from the inferior.  Rely on ContextFlags being set if it
11421         has already been retrieved.  Only suspend the inferior thread if
11422         we haven't already.  Warn if that fails.
11423         (continue_one_thread): s/suspend_count/suspended/.  Only call
11424         ResumeThread once.  Warn if that fails.
11425
11426 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
11427
11428         * win32-low.c (win32_wait): Don't read from the inferior when it
11429         has already exited.
11430
11431 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
11432
11433         * Makefile.in (win32_low_h): New variable.
11434         (win32-low.o): Add dependency on $(win32_low_h).
11435         (win32-arm-low.o, win32-i386-low.o): New rules.
11436
11437 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
11438
11439         * hostio.c: Correct copyright year.
11440
11441 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
11442
11443         * Makefile.in (OBS): Add hostio.o.
11444         (hostio.o): New rule.
11445         * server.h (handle_vFile): Declare.
11446         * hostio.c: New file.
11447         * server.c (handle_v_requests): Take packet_len and new_packet_len
11448         for binary packets.  Call handle_vFile.
11449         (main): Update call to handle_v_requests.
11450
11451 2007-11-05  Daniel Jacobowitz  <dan@codesourcery.com>
11452
11453         * linux-low.c: Include <sched.h>.
11454
11455 2007-11-01  Daniel Jacobowitz  <dan@codesourcery.com>
11456
11457         * linux-low.c (linux_tracefork_grandchild): New.
11458         (linux_tracefork_child): Use clone.
11459         (linux_test_for_tracefork): Use clone; allocate and free a stack.
11460
11461 2007-10-31  Joel Brobecker  <brobecker@adacore.com>
11462
11463         * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
11464
11465 2007-10-24  Daniel Jacobowitz  <dan@codesourcery.com>
11466
11467         * linux-low.c (handle_extended_wait): Handle unexpected signals.
11468
11469 2007-10-23  Daniel Jacobowitz  <dan@codesourcery.com>
11470
11471         * inferiors.c (change_inferior_id): Delete.
11472         (add_pid_to_list, pull_pid_from_list): New.
11473         * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
11474         (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
11475         (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
11476         (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
11477         (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
11478         (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
11479         (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
11480         (using_threads): Always set to 1.
11481         (handle_extended_wait): New.
11482         (add_process): Do not set TID.
11483         (linux_create_inferior): Set must_set_ptrace_flags.
11484         (linux_attach_lwp): Remove TID argument.  Do not check using_threads.
11485         Use PTRACE_SETOPTIONS.  Call new_thread_notify.  Update all callers.
11486         (linux_thread_alive): Rename TID argument to LWPID.
11487         (linux_wait_for_process): Handle unknown processes.  Do not use TID.
11488         (linux_wait_for_event): Do not use TID or check using_threads.  Update
11489         call to dead_thread_notify.  Call handle_extended_wait.
11490         (linux_create_inferior): Use PTRACE_SETOPTIONS.
11491         (send_sigstop): Delete sigstop_sent.
11492         (wait_for_sigstop): Avoid TID.
11493         (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
11494         (linux_test_for_tracefork): New.
11495         (linux_lookup_signals): Use thread_db_active and
11496         linux_supports_tracefork_flag.
11497         (initialize_low): Use thread_db_active and linux_test_for_tracefork.
11498         * linux-low.h (get_process_thread): Avoid TID.
11499         (struct process_ifo): Move thread_known and tid to the end.  Remove
11500         sigstop_sent.
11501         (linux_attach_lwp, thread_db_init): Update prototypes.
11502         * server.h (change_inferior_id): Delete prototype.
11503         (add_pid_to_list, pull_pid_from_list): New prototypes.
11504         * thread-db.c (thread_db_use_events): New.
11505         (find_first_thread): Rename to...
11506         (find_one_thread): ...this.  Update callers and messages.  Do not
11507         call fatal.  Check thread_db_use_events.  Do not call
11508         change_inferior_id or new_thread_notify.
11509         (maybe_attach_thread): Update.  Do not call new_thread_notify.
11510         (thread_db_init): Set thread_db_use_events.  Check use_events.
11511         * utils.c (fatal, warning): Correct message prefix.
11512
11513 2007-10-15  Daniel Jacobowitz  <dan@codesourcery.com>
11514
11515         * Makefile.in (clean): Remove new files.
11516         (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
11517         (powerpc-64.o, powerpc-64.c): New rules.
11518         * configure.srv: Use alternate register sets for powerpc64-*-linux*
11519         with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
11520         with SPE.
11521         * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
11522         SPE targets.
11523         (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
11524         (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
11525         (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
11526         (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
11527         (target_regsets): Add AltiVec and SPE register sets.
11528         * configure.ac: Check for AltiVec and SPE.
11529         * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
11530         (ppc_fill_vrregset, ppc_store_vrregset): New.
11531         (target_regsets): Add AltiVec register set.
11532         * configure: Regenerated.
11533
11534 2007-09-19  Daniel Jacobowitz  <dan@codesourcery.com>
11535
11536         * linux-low.c (O_LARGEFILE): Define.
11537         (linux_read_memory): Use /proc/PID/mem.
11538         * configure.ac: Use AC_GNU_SOURCE.  Check for pread64.
11539         * configure, config.in: Regenerated.
11540
11541 2007-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
11542
11543         * linux-low.c (linux_wait_for_event): Do not pass signals while
11544         single-stepping.
11545
11546 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11547
11548         * win32-low.c (create_process): New.
11549         (win32_create_inferior): Use create_process instead of
11550         CreateProcess.  If create_process failed retry appending an ".exe"
11551         suffix.  Store the GetLastError result immediatelly after
11552         create_process calls and use it on the call to error.
11553
11554 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11555
11556         * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11557
11558 2007-08-23  Joel Brobecker  <brobecker@adacore.com>
11559
11560         * configure.ac: Switch license to GPLv3.
11561
11562 2007-08-01  Michael Snyder  <msnyder@access-company.com>
11563
11564         * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11565
11566 2007-07-31  Pedro Alves  <pedro_alves@portugalmail.pt>
11567
11568         * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11569         typedef.
11570         (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11571         (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL.  Get
11572         CloseToolhelp32Snapshot.
11573         (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11574         CloseToolhelp32Snapshot.
11575
11576 2007-07-27  Michael Snyder  <michael.snyder@access-company.com>
11577
11578         * server.c (main): Check for inferior exit before main loop.
11579
11580 2007-07-18  Pedro Alves  <pedro_alves@portugalmail.pt>
11581
11582         * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11583         instead of on tmp_desc.
11584
11585 2007-07-17  Pedro Alves  <pedro_alves@portugalmail.pt>
11586             Daniel Jacobowitz  <dan@codesourcery.com>
11587
11588         * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11589         (add_thread): Minor cleanups.
11590         (clear_inferiors): Move lower in the file.  Clear the DLL
11591         list.
11592         (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11593         * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11594         (xml_escape_text): New.
11595         * server.c (handle_query): Handle qXfer:libraries:read.  Report it
11596         for qSupported.
11597         (handle_v_cont): Report errors.
11598         (gdbserver_version): Update.
11599         (main): Correct size of own_buf.  Do not report initial DLL events.
11600         * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11601         (unloaded_dll, xml_escape_text): New.
11602         * win32-low.c (enum target_waitkind): Update comments.
11603         (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11604         (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11605         (win32_EnumProcessModules, win32_GetModuleInformation)
11606         (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11607         (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11608         (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11609         (win32_Module32First, win32_Module32Next, load_toolhelp)
11610         (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11611         (get_child_debug_event): Handle DLL events.
11612         (win32_wait): Likewise.
11613
11614 2007-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
11615
11616         * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11617         * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11618
11619 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
11620
11621         * win32-low.c (handle_output_debug_string): Ignore event if not
11622         waiting.
11623
11624 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
11625
11626         * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11627
11628 2007-07-03  Daniel Jacobowitz  <dan@codesourcery.com>
11629
11630         * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11631
11632 2007-07-02  Daniel Jacobowitz  <dan@codesourcery.com>
11633
11634         * inferiors.c (change_inferior_id): Add comment.
11635         * linux-low.c (check_removed_breakpoint): Add an early
11636         prototype.  Improve debug output.
11637         (linux_attach): Doc update.
11638         (linux_detach_one_process, linux_detach): Clean up before releasing
11639         each process.
11640         (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11641         * linux-low.h (struct process_info): Doc improvement.
11642         * mem-break.c (delete_all_breakpoints): New.
11643         * mem-break.h (delete_all_breakpoints): New prototype.
11644         * thread-db.c (find_first_thread): New.
11645         (thread_db_create_event): Call it instead of
11646         thread_db_find_new_threads.  Clean up unused variables.
11647         (maybe_attach_thread): Remove first thread handling.
11648         (thread_db_find_new_threads): Use find_first_thread.
11649         (thread_db_get_tls_address): Likewise.
11650
11651 2007-06-27  Daniel Jacobowitz  <dan@codesourcery.com>
11652
11653         * thread-db.c (thread_db_find_new_threads): Add prototype.
11654         (thread_db_create_event): Check for the main thread before adding
11655         a new thread.
11656         (maybe_attach_thread): Only enable event reporting if TID == 0.
11657         (thread_db_get_tls_address): Check for new threads.
11658
11659 2007-06-20  Daniel Jacobowitz  <dan@codesourcery.com>
11660
11661         * linux-low.c (linux_create_inferior): Try execv before execvp.
11662         * spu-low.c (spu_create_inferior): Likewise.
11663
11664 2007-06-13  Mike Frysinger  <vapier@gentoo.org>
11665
11666         * linux-low.c (linux_create_inferior): Change execv to execvp.
11667         * spu-low.c (spu_create_inferior): Likewies.
11668
11669 2007-06-13  Daniel Jacobowitz  <dan@codesourcery.com>
11670
11671         * Makefile.in (clean): Clean new files instead of deleted ones.
11672         (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11673         (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11674         rules.
11675         * configure.srv: Specify XML files and new regformats for MIPS and
11676         MIPS64 GNU/Linux.
11677         * linux-mips-low.c (mips_num_regs): Set to only used registers.
11678         (mips_regmap): Do not fetch $0.  Remove unused registers.  Add
11679         an entry for the restart register.
11680         (mips_cannot_fetch_register, mips_cannot_store_register)
11681         (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11682         register names to match the XML descriptions.
11683         (mips_fill_gregset, mips_store_gregset): Likewise.  Handle the
11684         restart register instead of $0.
11685
11686 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
11687             Markus Deuling  <deuling@de.ibm.com>
11688
11689         * remote-utils.c (decode_xfer_write): New function.
11690         * server.h (decode_xfer_write): Add prototype.
11691         * server.c (handle_query): Add PACKET_LEN argument.  Support
11692         qXfer:spu:read and qXfer:spu:write packets.
11693         (main): Pass packet_len to handle_query.
11694         * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11695         * target.h (target_ops): Add qxfer_spu.
11696
11697 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
11698
11699         * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11700         accessing non-seekable spufs files.
11701
11702 2007-05-16  Markus Deuling  <deuling@de.ibm.com>
11703
11704         * server.c (handle_query): Add reply for qC packet.
11705
11706 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
11707             Leo Zayas  <lerele@champenstudios@com>
11708
11709         * server.h (check_remote_input_interrupt_request): New function.
11710         * remote_utils.c (INVALID_DESCRIPTOR): New define.
11711         (remote_desc): Initialize with INVALID_DESCRIPTOR.
11712         (input_interrupt): Expose on USE_WIN32API too.  Fix whitespace.
11713         (check_remote_input_interrupt_request): New function.
11714         * server.h (check_remote_input_interrupt_request): Declare.
11715         * win32-low.c (winapi_DebugBreakProcess,
11716         winapi_GenerateConsoleCtrlEvent): New typedefs.
11717         (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11718         to 250 ms.
11719         (win32_wait): Check for remote interrupt request
11720         with check_remote_input_interrupt_request.
11721         (win32_request_interrupt): New function.
11722         (win32_target_op): Set request_interrupt to win32_request_interrupt.
11723
11724 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
11725
11726         * win32-low.c (debug_registers_changed,
11727         debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11728         CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11729         CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11730         (thread_rec): Get context using the low target.
11731         (child_add_thread): Call thread_added on the low target,
11732         which does the same thing.
11733         (regptr): Delete.
11734         (do_initial_child_stuff): Remove debug registers references.
11735         Set context using the low target.  Resume threads after
11736         setting the contexts.
11737         (child_continue): Remove dead variable.  Remove debug
11738         registers references.
11739         (child_fetch_inferior_registers): Go through the low target.
11740         (do_child_store_inferior_registers): Remove.
11741         (child_store_inferior_registers): Go through the low target.
11742         (win32_resume): Remove debug registers references.
11743         Set context using the low target.
11744         (handle_exception): Change return type to void.  Don't record
11745         context here.  Set status to TARGET_WAITKIND_SPURIOUS on a
11746         first chance exception.
11747         (get_child_debug_event): Change return type to void.  Remove
11748         goto loop.  Always return after waiting for debug event.
11749         (win32_wait): Convert to switch statement.  Handle spurious
11750         events.
11751
11752         * win32-i386-low.c (debug_registers_changed,
11753         debug_registers_used): New.
11754         (initial_stuff): Rename to ...
11755         (i386_initial_stuff): ... this.  Clear debug registers
11756         state variables.
11757         (store_debug_registers): Delete.
11758         (i386_get_thread_context): New.
11759         (load_debug_registers): Delete.
11760         (i386_set_thread_context): New.
11761         (i386_thread_added): New.
11762         (single_step): Rename to ...
11763         (i386_single_step): ... this.
11764         (do_fetch_inferior_registers): Rename to ...
11765         (i386_fetch_inferior_register): ... this.
11766         (i386_store_inferior_register): New.
11767         (the_low_target): Adapt to new interface.
11768
11769         * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11770         (arm_get_thread_context): New.
11771         (arm_set_thread_context): New.
11772         (regptr): New.
11773         (do_fetch_inferior_registers): Rename to ...
11774         (arm_fetch_inferior_register): ... this.
11775         (arm_store_inferior_register): New.
11776         (arm_wince_breakpoint): Reimplement as unsigned long.
11777         (arm_wince_breakpoint_len): Define.
11778         (the_low_target): Adapt to new interface.
11779
11780         * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11781         load_debug_registers.  Add get_thread_context, set_thread_context,
11782         thread_added and store_inferior_register.  Rename
11783         fetch_inferior_registers to fetch_inferior_register.
11784         (regptr): Remove declaration.
11785
11786 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
11787
11788         * linux-low.c (linux_detach): Change return type to int.  Return 0.
11789         * spu-low.c (spu_detach): Likewise.
11790
11791 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
11792
11793         * target.h (target_ops): Change return type of detach to int.
11794         Add join.
11795         (join_inferior): New.
11796         * server.c (main): Don't skip detach support on mingw32.
11797         If the inferior doesn't support detaching return error.
11798         Call join_inferior instead of using waitpid.
11799         * linux-low.c (linux_join): New.
11800         (linux_target_op): Add linux_join.
11801         * spu-low.c (spu_join): New.
11802         (spu_target_ops): Add spu_join.
11803         * win32-low.c (win32_detach): Adapt to new interface.
11804         Reopen current_process_handle before detaching.  Issue a child
11805         resume before detaching.
11806         (win32_join): New.
11807         (win32_target_op): Add win32_join.
11808
11809 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
11810
11811         * win32-low.c (win32-attach): Fix return value.
11812         * target.h (target_ops): Describe ATTACH return values.
11813
11814 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
11815
11816         * win32-low.c (GETPROCADDRESS): Define.
11817         (winapi_DebugActiveProcessStop): Add WINAPI.  typedef as pointer.
11818         (winapi_DebugSetProcessKillOnExit): Likewise.
11819         (win32_create_inferior): Force usage of ansi CreateProcessA.
11820         (win32_attach): Use GETPROCADDRESS.
11821         (win32_detach): Likewise.
11822
11823 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
11824
11825         * win32-low.c (win32_wait): Don't use WSTOPSIG.
11826
11827 2007-03-30  Pedro Alves  <pedro_alves@portugalmail.pt>
11828
11829         * win32-low.c: Commit leftover changes from 2007-03-29.
11830
11831 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
11832
11833         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11834         fields short instead of int.  Add explicit padding.
11835         (i387_cache_to_fsave): Remove unnecessary casts.
11836         (i387_fsave_to_cache): Doc fix.
11837         (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11838
11839 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
11840
11841         * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11842         (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11843
11844 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
11845
11846         * configure.srv (arm*-*-mingw32ce*): Move near the other
11847         arm targets.
11848
11849 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
11850
11851         * configure.ac: Add errno checking.
11852         (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11853         sys/file.h and malloc.h.
11854         (AC_CHECK_DECLS): Add perror.
11855         (srv_mingwce): Handle.
11856         * configure.srv (i[34567]86-*-cygwin*): Add
11857         win32-i386-low.o to srv_tgtobj.
11858         (i[34567]86-*-mingw*): Likewise.
11859         (arm*-*-mingw32ce*): Add case.
11860         * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11861         HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11862         [__MINGW32CE__] (strerror): New function.
11863         [__MINGW32CE__] (errno): Define to GetLastError.
11864         [__MINGW32CE__] (COUNTOF): New macro.
11865         (remote_open): Remove extra close call.
11866         * mem-break.c (delete_breakpoint_at): New function.
11867         * mem-break.h (delete_breakpoint_at): Declare.
11868         * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11869         HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11870         [USE_WIN32API] (read, write): Add char* casts.
11871         * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11872         * server.h: Include wincecompat.h on Windows CE.
11873         [HAVE_ERRNO_H]: Check.
11874         (perror): Declare if not declared.
11875         * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11876         (perror_with_name): Remove errno declaration.
11877         * wincecompat.h: New.
11878         * wincecompat.c: New.
11879         * win32-low.h: New.
11880         * win32-arm-low.c: New.
11881         * win32-i386-low.c: New.
11882         (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11883         (OUTMSG2): Make it safe.
11884         (_T): New macro.
11885         (COUNTOF): New macro.
11886         (NUM_REGS): Get it from the low target.
11887         (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11888         CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11889         (thread_rec): Let low target handle debug registers.
11890         (child_add_thread): Likewise.
11891         (child_init_thread_list): Likewise.
11892         (continue_one_thread): Likewise.
11893         (regptr): New.
11894         (do_child_fetch_inferior_registers): Move to ...
11895         * win32-i386-low.c: ... here, and rename to ...
11896         (do_fetch_inferior_registers): ... this.
11897         * win32-low.c (child_fetch_inferior_registers):
11898         Go through the low target.
11899         (do_child_store_inferior_registers): Use regptr.
11900         (strwinerror): New function.
11901         (win32_create_inferior): Handle Windows CE.
11902         Use strwinerror instead of strerror on Windows error
11903         codes.  Add program to the error output.
11904         Don't close the main thread handle on Windows CE.
11905         (win32_attach): Use coredll.dll on Windows CE.
11906         (win32_kill): Close current process and current
11907         thread handles.
11908         (win32_detach): Use coredll.dll on Windows CE.
11909         (win32_resume): Let low target handle debug registers, and
11910         step request.
11911         (handle_exception): Add/Remove initial breakpoint.  Avoid
11912         non-existant WSTOPSIG on Windows CE.
11913         (win32_read_inferior_memory): Cast to remove warning.
11914         (win32_arch_string): Go through the low target.
11915         (initialize_low): Call set_breakpoint_data with the low
11916         target's breakpoint.
11917         * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11918         FOP_REGNUM, mappings): Move to ...
11919         * win32-i386-low.c: ... here.
11920         * win32-low.c (win32_thread_info): Move to ...
11921         * win32-low.h: ... here.
11922         * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11923         win32-arm-low.c and wincecompat.c.
11924         (all:): Add $EXEEXT.
11925         (install-only:): Likewise.
11926         (gdbserver:): Likewise.
11927         (gdbreplay:): Likewise.
11928         * config.in: Regenerate.
11929         * configure: Regenerate.
11930
11931 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
11932
11933         * win32-low.c: Rename typedef thread_info to
11934         win32_thread_info throughout.
11935
11936 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
11937
11938         * win32-i386-low.c: Rename to ...
11939         * win32-low.c: ... this.
11940         * configure.srv: Replace win32-i386-low.o with win32-low.o.
11941         * Makefile.in: Likewise.
11942
11943 2007-03-27  Pedro Alves  <pedro_alves@portugalmail.pt>
11944
11945         * remote-utils.c (monitor_output): Constify msg parameter.
11946         * server.h (monitor_output): Likewise.
11947         * win32-i386-low.c (handle_output_debug_string): New.
11948         (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11949         handle_output_debug_string.
11950         (get_child_debug_event): Likewise.
11951
11952 2007-03-27  Mat Hostetter  <mat@lcs.mit.edu>
11953
11954         * server.c (main): Correct strtoul check.
11955
11956 2007-03-27  Jon Ringle  <jon@ringle.org>
11957
11958         * linux-low.c: Check __ARCH_HAS_MMU__ also.
11959
11960 2007-03-27  Brooks Moses  <brooks.moses@codesourcery.com>
11961
11962         * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11963
11964 2007-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
11965
11966         * terminal.h: Check HAVE_SGTTY_H.
11967
11968 2007-02-27  Mat Hostetter  <mat@lcs.mit.edu>
11969
11970         * remote-utils.c (remote_open): Print out the assigned port number.
11971
11972 2007-02-26  Daniel Jacobowitz  <dan@codesourcery.com>
11973
11974         * remote-utils.c (monitor_output): New function.
11975         * server.c (debug_threads): Define here.
11976         (monitor_show_help): New function.
11977         (handle_query): Handle qRcmd.
11978         (main): Do not handle 'd' packet.
11979         * server.h (debug_threads, remote_debug, monitor_output): Declare.
11980         * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11981         of debug_threads.
11982
11983 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
11984
11985         * Makefile.in (EXEEXT): New.
11986         (clean): Use $(EXEEXT).
11987
11988 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
11989
11990         * target.h (target_ops): Rename send_signal to request_interrupt,
11991         and remove enum target_signal parameter.
11992         * linux-low.c (linux_request_interrupt): Rename from
11993         linux_send_signal, and always send SIGINT.
11994         * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11995         and always send SIGINT.
11996         * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11997         of send_signal.
11998         (input_interrupt): Likewise.
11999
12000 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
12001
12002         * server.c (get_features_xml): Check if target implemented
12003         arch_string.
12004         * win32-i386-low.c (win32_arch_string): New.
12005         (win32_target_ops): Add win32_arch_string as arch_string member.
12006
12007 2007-02-22  Markus Deuling  <deuling@de.ibm.com>
12008
12009         * spu-low.c (spu_arch_string): New.
12010         (spu_target_ops): Add spu_arch_string.
12011
12012 2007-02-16  Daniel Jacobowitz  <dan@codesourcery.com>
12013
12014         * remote-utils.c: Remove HAVE_TERMINAL_H check.
12015         * configure.ac: Do not check for terminal.h.
12016         * configure, config.in: Regenerated.
12017
12018 2007-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
12019
12020         * Makefile.in (OBS): Add $(XML_BUILTIN).
12021         (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
12022         (clean): Update.
12023         (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
12024         (arm-with-iwmmxt.c): New.
12025         * config.in, configure: Regenerate.
12026         * configure.ac: Check for iWMMXt.  Handle srv_xmltarget,
12027         srv_xmlbuiltin, and srv_xmlfiles.  Define USE_XML.
12028         * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
12029         (arm*-*-linux*): Add iWMMXt and regset support.
12030         * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
12031         (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
12032         (arm_store_wmmxregset, target_regsets): New.
12033         * server.c (get_features_xml): Take annex argument.  Check builtin
12034         XML documents.
12035         (handle_query): Handle multiple annexes.
12036
12037 2007-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
12038
12039         * remote-utils.c [USE_WIN32API] (read, write): Define.
12040         (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
12041         write.
12042
12043 2007-01-09  Daniel Jacobowitz  <dan@codesourcery.com>
12044
12045         * linux-i386-low.c (the_low_target): Set arch_string.
12046         * linux-x86-64-low.c (the_low_target): Likewise.
12047         * linux-low.c (linux_arch_string): New.
12048         (linux_target_ops): Add it.
12049         * linux-low.h (struct linux_target_ops): Add arch_string.
12050         * server.c (write_qxfer_response): Use const void * for DATA.
12051         (get_features_xml): New.
12052         (handle_query): Handle qXfer:features:read.  Report it for qSupported.
12053         * target.h (struct target_ops): Add arch_string method.
12054
12055 2007-01-03  Denis Pilat  <denis.pilat@st.com>
12056             Daniel Jacobowitz  <dan@codesourcery.com>
12057
12058         * linux-low.c (linux_kill): Handle being called with no threads.
12059         * win32-i386-low.c (win32_kill): Likewise.
12060         (get_child_debug_event): Clear current_process_handle.
12061
12062 2006-12-30  Denis PILAT  <denis.pilat@st.com>
12063             Daniel Jacobowitz  <dan@codesourcery.com>
12064
12065         * remote-utils.c (remote_open): Check the type of specified
12066         serial port devices before opening them.
12067         * server.c (main): Kill the inferior if an error occurs during
12068         the first remote_open.
12069
12070 2006-12-05  Markus Deuling  <deuling@de.ibm.com>
12071
12072         * README: Update supported targets.
12073
12074 2006-11-28  Daniel Jacobowitz  <dan@codesourcery.com>
12075
12076         * Makefile.in (clean): Remove reg-mips64.c.
12077         (reg-mips64.c, reg-mips64.o): New rules.
12078         * configure.srv: Handle mips64.  Include regset support for mips.
12079         * linux-mips-low.c (union mips_register): New.
12080         (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
12081         (mips_breakpoint, mips_breakpoint_at): Use int.
12082         (mips_collect_register, mips_supply_register)
12083         (mips_collect_register_32bit, mips_supply_register_32bit)
12084         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12085         (mips_store_fpregset, target_regsets): New.
12086         * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
12087
12088 2006-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
12089
12090         * configure.srv: Add target "spu*-*-*".
12091         * Makefile.in (clean): Remove reg-spu.c.
12092         (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
12093         * spu-low.c: New file.
12094
12095 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
12096
12097         * configure.ac: Correct td_thr_tls_get_addr test.
12098         * configure: Regenerated.
12099
12100 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
12101
12102         * linux-low.c (linux_wait_for_event): Reformat.  Use the
12103         pass_signals array.
12104         * remote-utils.c (decode_address_to_semicolon): New.
12105         * server.c (pass_signals, handle_general_set): New.
12106         (handle_query): Mention QPassSignals for qSupported.
12107         (main): Call handle_general_set.
12108         * server.h (pass_signals, decode_address_to_semicolon): New.
12109
12110 2006-11-06  Daniel Jacobowitz  <dan@codesourcery.com>
12111
12112         * server.c (handle_query): Correct error handling for read_auxv.
12113
12114 2005-10-19  Ulrich Weigand  <uweigand@de.ibm.com>
12115
12116         * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
12117         and srv_linux_thread_db to yes.
12118         * linux-s390-low.c (s390_fill_gregset): New function.
12119         (target_regsets): Define data structure.
12120
12121 2006-10-17  Daniel Jacobowitz  <dan@codesourcery.com>
12122
12123         * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
12124         * configure.ac: Use it.  Define HAVE_TD_THR_TLS_GET_ADDR.
12125         * config.in, configure: Regenerated.
12126         * inferiors.c (gdb_id_to_thread): New function.
12127         (gdb_id_to_thread_id): Use it.
12128         * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
12129         * linux-low.h (struct process_info): Add th member.
12130         (thread_db_get_tls_address): New prototype.
12131         * remote-utils.c (decode_address): Make non-static.
12132         * server.c (handle_query): Handle qGetTLSAddr.
12133         * server.h (gdb_id_to_thread, decode_address): New prototypes.
12134         * target.h (struct target_ops): Add get_tls_address.
12135         * thread-db.c (maybe_attach_thread): Save the thread handle.
12136         (thread_db_get_tls_address): New.
12137
12138 2006-09-28  Daniel Jacobowitz  <dan@codesourcery.com>
12139
12140         * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
12141         (linux_resume_one_process): Take a siginfo_t *.  Update all
12142         callers.  Queue it if necessary.  Use PTRACE_SETSIGINFO.
12143         (struct pending_signals): Add a siginfo_t.
12144         (linux_wait_for_process): Always set last_status.
12145         (linux_wait_for_event): Use PTRACE_GETSIGINFO.
12146         (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
12147         * linux-low.h (struct process_info): Add last_status.
12148
12149 2006-09-21  Daniel Jacobowitz  <dan@codesourcery.com>
12150
12151         * remote-utils.c (try_rle): New function.
12152         (putpkt_binary): Use it.
12153
12154 2006-08-19  Daniel Jacobowitz  <dan@codesourcery.com>
12155
12156         * Makefile.in (clean): Clean reg-x86-64-linux.c.
12157         (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
12158         * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
12159         * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
12160         (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
12161         point registers.
12162
12163 2006-08-08  Richard Sandiford  <richard@codesourcery.com>
12164
12165         * server.c (terminal_fd): New variable.
12166         (old_foreground_pgrp): Likewise.
12167         (restore_old_foreground_pgrp): New function.
12168         (start_inferior): Record the terminal file descriptor in terminal_fd
12169         and its original foreground group in old_foreground_pgrp.  Register
12170         restore_old_foreground_pgrp with atexit().
12171
12172 2006-07-26  Daniel Jacobowitz  <dan@codesourcery.com>
12173
12174         * server.c (handle_query): Correct qPart to qXfer.
12175
12176 2006-07-22  Daniel Jacobowitz  <dan@codesourcery.com>
12177
12178         * configure.ac: Check for more headers which are missing on
12179         Windows.  Automatically supply -lwsock32 and USE_WIN32API.
12180         * configure.srv: Add Cygwin and mingw32.
12181         * remote-utils.c: Don't include headers unconditionally which
12182         are missing on mingw32.  Include <winsock.h> for mingw32.
12183         (remote_open): Adjust for mingw32 support.  Flush
12184         standard error after writing to it.
12185         (remote_close, putpkt_binary, input_interrupt, block_async_io)
12186         (unblock_async_io, enable_async_io, disable_async_io)
12187         (readchar, getpkt): Update for Winsock support.
12188         (prepare_resume_reply): Expect a protocol signal number.
12189         * server.c: Disable <sys/wait.h> on mingw32.
12190         (start_inferior): Adjust for mingw32 support.  Flush
12191         standard error after writing to it.
12192         (attach_inferior): Likewise.  Use protocol signal
12193         numbers.
12194         (main): Skip 'D' packet on mingw32.  Use protocol signal numbers
12195         and names.
12196         * win32-i386-low.c: New file.
12197         * Makefile.in (XM_CLIBS): Set.
12198         (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
12199         (win32-i386-low.o): New dependency rule.
12200         * linux-low.c (linux_wait): Use target signal numbers.
12201         * target.h (struct target_ops): Doc fix.
12202         * server.h (target_signal_to_name): New prototype.
12203         * gdbreplay.c: Don't include headers unconditionally which
12204         are missing on mingw32.  Include <winsock.h> for mingw32.
12205         (remote_close, remote_open): Adjust for Winsock support.
12206         * configure, config.in: Regenerated.
12207
12208 2006-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
12209
12210         * server.c (decode_xfer_read, write_qxfer_response): New.
12211         (handle_query): Take a packet length argument.  Handle
12212         qXfer:auxv:read instead of qPart:auxv:read.  Mention it in
12213         the qSupported response.
12214         (main): Update call to handle_query.
12215
12216 2006-06-22  Daniel Jacobowitz  <dan@codesourcery.com>
12217
12218         * remote-utils.c (remote_escape_output, remote_unescape_input): New.
12219         (putpkt_binary): Renamed from putpkt and adjusted for binary
12220         data.
12221         (putpkt): New wrapper for putpkt_binary.
12222         (readchar): Don't mask off the high bit.
12223         (decode_X_packet): New function.
12224         * server.c (main): Call putpkt_binary if a handler sets the packet
12225         length.  Save the length of the incoming packet.  Handle 'X'.
12226         * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
12227
12228 2006-06-21  Daniel Jacobowitz  <dan@codesourcery.com>
12229
12230         * server.c (handle_query): Handle qSupported.
12231
12232 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
12233
12234         * remote-utils.c (all_symbols_looked_up): New variable.
12235         (look_up_one_symbol): Check it.
12236         * server.h (look_up_one_symbol): New declaration.
12237         * thread-db.c (thread_db_init): Set all_symbols_looked_up.
12238
12239 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
12240
12241         * Makefile.in (linux-arm-low.o): Update dependencies.
12242         * linux-arm-low.c: Include "gdb_proc_service.h".
12243         (PTRACE_GET_THREAD_AREA): Define.
12244         (ps_get_thread_area): New function.
12245
12246 2006-05-09  Nathan Sidwell  <nathan@codesourcery.com>
12247
12248         * configure.srv (m68k*-*-uclinux*): New target.
12249         * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
12250         (linux_resume_one_process): Remove extraneous cast.
12251         (linux_read_offsets): New.
12252         (linux_target_op): Add linux_read_offsets on mmuless systems.
12253         * server.c (handle_query): Add qOffsets logic.
12254         * target.h (struct target_ops): Add read_offsets.
12255
12256 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
12257
12258         * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
12259         (PTRACE_GET_THREAD_AREA): Define.
12260         (ps_get_thread_area): New function.
12261         * Makefile.in (linux-i386-low.o, linux-mips-low.o)
12262         (linux-x86-64-low.o): Update.
12263
12264 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
12265
12266         * configure.ac: Remove checks for prfpregset_t.
12267         * gdb_proc_service.h: New file.
12268         * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
12269         new "gdb_proc_service.h".
12270         * proc-service.c: Likewise.
12271         (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
12272         (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
12273         * Makefile.in (gdb_proc_service_h): Updated.
12274         * configure, config.in: Regenerated.
12275
12276 2006-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
12277
12278         * remote-utils.c (prepare_resume_reply): Move declaration
12279         of gdb_id_from_wait to the top of the block.
12280
12281 2006-02-15  Daniel Jacobowitz  <dan@codesourcery.com>
12282
12283         * linux-low.c (regsets_store_inferior_registers): Read the regset
12284         from the target before filling it.
12285
12286 2006-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
12287
12288         * server.c (attach_inferior): Return SIGTRAP for a successful
12289         attach.
12290
12291 2006-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
12292
12293         * Makefile.in (OBS): Add version.o.
12294         (STAGESTUFF): Delete.
12295         (version.o): Add dependencies.
12296         (version.c): Replace rule.
12297         (clean): Remove version.c.
12298         * server.c (gdbserver_version): New.
12299         (gdbserver_usage): Use printf.
12300         (main): Handle --version and --help.
12301         * server.h (version, host_name): Add declarations.
12302
12303 2005-12-23  Eli Zaretskii  <eliz@gnu.org>
12304
12305         * linux-arm-low.c:
12306         * linux-arm-low.c:
12307         * inferiors.c:
12308         * i387-fp.h:
12309         * i387-fp.c:
12310         * gdbreplay.c:
12311         * regcache.c:
12312         * proc-service.c:
12313         * mem-break.h:
12314         * mem-break.c:
12315         * linux-x86-64-low.c:
12316         * linux-sh-low.c:
12317         * linux-s390-low.c:
12318         * linux-ppc64-low.c:
12319         * linux-ppc-low.c:
12320         * linux-mips-low.c:
12321         * linux-m68k-low.c:
12322         * linux-m32r-low.c:
12323         * linux-low.h:
12324         * linux-low.c:
12325         * linux-ia64-low.c:
12326         * linux-i386-low.c:
12327         * linux-crisv32-low.c:
12328         * thread-db.c:
12329         * terminal.h:
12330         * target.h:
12331         * target.c:
12332         * server.h:
12333         * server.c:
12334         * remote-utils.c:
12335         * regcache.h:
12336         * utils.c:
12337         * Makefile.in:
12338         * configure.ac:
12339         * gdbserver.1: Add (C) after Copyright.  Update the FSF
12340         address.
12341
12342 2005-11-13  Daniel Jacobowitz  <dan@codesourcery.com>
12343
12344         * linux-arm-low.c (arm_eabi_breakpoint): New variable.
12345         (arm_breakpoint_at): Recognize both breakpoints.
12346         (the_low_target): Use the correct breakpoint instruction.
12347
12348 2005-11-02  Daniel Jacobowitz  <dan@codesourcery.com>
12349
12350         * configure.srv (x86_64-*-linux*): Turn on thread_db support.
12351         * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
12352         (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
12353         (the_low_target): Update.
12354
12355 2005-10-25  Andreas Schwab  <schwab@suse.de>
12356
12357         * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
12358
12359         * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
12360         (ia64_num_regs): Reduce to 462.
12361
12362 2005-09-17  Daniel Jacobowitz  <dan@codesourcery.com>
12363
12364         * acinclude.m4: Correct quoting.
12365         * aclocal.m4: Regenerated.
12366
12367         Suggested by SZOKOVACS Robert <szo@ies.hu>:
12368         * thread-db.c (thread_db_err_str): Handle TD_VERSION.
12369         (thread_db_init): Call thread_db_err_str.
12370         * configure.ac: Check for TD_VERSION.
12371         * config.in, configure: Regenerated.
12372
12373 2005-07-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12374
12375         * server.h (error, fatal, warning): Add ATTR_FORMAT.
12376
12377 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
12378
12379         * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
12380         is not available.  Define HAVE_PTRACE_GETREGS if it is.
12381         * config.in, configure: Regenerated.
12382         * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
12383         * linux-i386-low.c, linux-m68k-low.c: Update to use
12384         HAVE_PTRACE_GETREGS.
12385         * linux-low.c (regsets_fetch_inferior_registers)
12386         (regsets_store_inferior_registers): Only return 0 if we processed
12387         GENERAL_REGS.
12388         * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
12389         * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
12390
12391 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
12392
12393         * inferiors.c (struct thread_info): Add gdb_id.
12394         (add_thread): Add gdb_id argument.
12395         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
12396         * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
12397         calls to add_thread.
12398         * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
12399         * server.c (handle_query): Use thread_to_gdb_id.
12400         (handle_v_cont, main): Use gdb_id_to_thread_id.
12401         * server.h (add_thread): Update prototype.
12402         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
12403         prototypes.
12404
12405 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
12406
12407         * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
12408         left-padded registers.
12409         * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
12410         * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
12411
12412 2005-07-01  Steve Ellcey  <sje@cup.hp.com>
12413
12414         * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
12415         * configure: Regenerate.
12416         * config.in: Regenerate.
12417         * server.h (NEED_DECLARATION_STRERROR):
12418         Replace with !HAVE_DECL_STRERROR.
12419
12420 2005-06-16  Daniel Jacobowitz  <dan@codesourcery.com>
12421
12422         * linux-low.c (linux_wait, linux_send_signal): Don't test
12423         an unsigned long variable for > 0 if it could be MAX_ULONG.
12424         * server.c (myresume): Likewise.
12425         * target.c (set_desired_inferior): Likewise.
12426
12427 2005-06-13  Mark Kettenis  <kettenis@gnu.org>
12428
12429         * configure.ac: Simplify and improve check for socklen_t.
12430         * configure, config.in: Regenerate.
12431
12432 2005-06-12  Daniel Jacobowitz  <dan@codesourcery.com>
12433
12434         * acconfig.h: Remove.
12435         * configure.ac: Add a test for socklen_t.  Use three-argument
12436         AC_DEFINE throughout.
12437         * config.in: Regenerated using autoheader 2.59.
12438         * configure: Regenerated.
12439
12440         * gdbreplay.c (socklen_t): Provide a default.
12441         (remote_open): Use socklen_t.
12442         * remote-utils.c (socklen_t): Provide a default.
12443         (remote_open): Use socklen_t.
12444         (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
12445         unsigned char.
12446
12447         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
12448         char for buffers.
12449         * linux-low.c (linux_read_memory, linux_write_memory)
12450         (linux_read_auxv): Likewise.
12451         * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
12452         (check_mem_write): Likewise.
12453         * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
12454         Likewise.
12455         * regcache.c (struct inferior_rgcache_data, registers_to_string)
12456         (registers_from_string, register_data): Likewise.
12457         * server.c (handle_query, main): Likewise.
12458         * server.h (convert_ascii_to_int, convert_int_to_ascii)
12459         (decode_M_packet): Likewise.
12460         * target.c (read_inferior_memory, write_inferior_memory): Likewise.
12461         * target.h (struct target_ops): Update read_memory, write_memory,
12462         and read_auxv.
12463         (read_inferior_memory, write_inferior_memory): Update.
12464         * linux-low.h (struct linux_target_ops): Change type of breakpoint
12465         to unsigned char *.
12466         * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
12467         linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
12468         linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
12469         linux-s390-low.c, linux-sh-low.c: Update for changes in
12470         read_inferior_memory and the_low_target->breakpoint.
12471
12472 2005-05-28  Daniel Jacobowitz  <dan@codesourcery.com>
12473
12474         * Makefile.in (SFILES): Add linux-ppc64-low.c.
12475         (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
12476         * configure.srv: Add powerpc64-*-linux*.
12477         * linux-ppc64-low.c: New file.
12478
12479 2005-05-23  Orjan Friberg  <orjanf@axis.com>
12480
12481         * linux-cris-low.c: New file with support for CRIS.
12482         * linux-crisv32-low.c: Ditto for CRISv32.
12483         * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
12484         (clean): Add reg-cris.c and reg-crisv32.c.
12485         Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
12486         reg-crisv32.o, and reg-crisv32.c to make rules.
12487         * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
12488         recognized targets.
12489
12490 2005-05-16  Ulrich Weigand  <uweigand@de.ibm.com>
12491
12492         * linux-low.c (fetch_register): Ensure buffer size is a multiple
12493         of sizeof (PTRACE_XFER_TYPE).
12494         (usr_store_inferior_registers): Likewise.  Zero out excess bytes.
12495
12496 2005-05-12  Orjan Friberg  <orjanf@axis.com>
12497
12498         * target.h (struct target_ops): Add insert_watchpoint,
12499         remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
12500         pointers for hardware watchpoint support.
12501         * linux-low.h (struct linux_target_ops): Ditto.
12502         * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
12503         (linux_stopped_by_watchpoint, linux_stopped_data_address): New.  Add
12504         to linux_target_ops.
12505         * remote-utils.c (prepare_resume_reply): Add watchpoint information to
12506         reply packet.
12507         * server.c (main): Recognize 'Z' and 'z' packets.
12508
12509 2005-05-10  Ulrich Weigand  <uweigand@de.ibm.com>
12510
12511         * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
12512         (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
12513         (the_low_target): Add new members.
12514
12515 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
12516
12517         * proc-service.c (ps_lgetregs): Search all_processes instead of
12518         all_threads.
12519
12520 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
12521
12522         * server.c (start_inferior): Change return type to int.
12523         (attach_inferior): Change sigptr to int *.
12524         (handle_v_cont, handle_v_requests): Change signal to int *.
12525         (main): Change signal to int.
12526
12527 2005-04-15  Kei Sakamoto  <sakamoto.kei@renesas.com>
12528
12529         * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
12530         * configure.srv: Add m32r*-*-linux*.
12531         * linux-m32r-low.c: New file.
12532
12533 2005-03-04  Daniel Jacobowitz  <dan@codesourcery.com>
12534
12535         * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
12536
12537 2005-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
12538
12539         * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
12540         Take unsigned long arguments for PIDs.
12541         * linux-low.c (add_process, linux_attach_lwp, linux_attach)
12542         (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
12543         (wait_for_sigstop, linux_resume_one_process)
12544         (regsets_fetch_inferior_registers, linux_send_signal)
12545         (linux_read_auxv): Likewise.  Update the types of variables holding
12546         PIDs.  Update format string specifiers.
12547         * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
12548         * remote-utils.c (prepare_resume_reply): Likewise.
12549         * server.c (cont_thread, general_thread, step_thread)
12550         (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
12551         unsigned long.
12552         (handle_query): Update format specifiers.
12553         (handle_v_cont, main): Use strtoul for thread IDs.
12554         * server.h (struct inferior_list_entry): Use unsigned long for ID.
12555         (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12556         (general_thread, step_thread, thread_from_wait)
12557         (old_thread_from_wait): Update.
12558         * target.h (struct thread_resume): Use unsigned long for THREAD.
12559         (struct target_ops): Use unsigned long for arguments to attach and
12560         thread_alive.
12561
12562 2005-02-24  Daniel Jacobowitz  <dan@codesourcery.com>
12563
12564         * acinclude.m4: Include bfd/bfd.m4 directly.
12565         * configure.ac: Use AC_ARG_PROGRAM.  Suggested by Aron Griffis
12566         <agriffis@toolchain.org>.
12567         * aclocal.m4, configure: Regenerated.
12568
12569 2005-01-07  Andrew Cagney  <cagney@gnu.org>
12570
12571         * configure.ac: Rename configure.in, require autoconf 2.59.
12572         * configure: Re-generate.
12573
12574 2004-12-08  Daniel Jacobowitz  <dan@debian.org>
12575
12576         * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area.  Reset
12577         LIBS when finished.
12578         * aclocal.m4: Regenerated.
12579         * configure: Regenerated.
12580
12581 2004-11-21  Andreas Schwab  <schwab@suse.de>
12582
12583         * linux-m68k-low.c (m68k_num_gregs): Define.
12584         (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12585         (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12586         (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12587         (m68k_breakpoint_at): New.  Add to the_low_target.
12588
12589         * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12590         srv_linux_thread_db to yes.
12591
12592 2004-10-20  Joel Brobecker  <brobecker@gnat.com>
12593
12594         * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12595         (ARCH_SET_FS): Likewise.
12596         (ARCH_GET_FS): Likewise.
12597         (ARCH_GET_GS): Likewise.
12598
12599 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
12600
12601         * linux-i386-low.c (ps_get_thread_area): New.
12602         * linux-x86-64-low.c (ps_get_thread_area): New.
12603         * linux-low.c: Include <sys/syscall.h>.
12604         (linux_kill_one_process): Don't kill the first thread here.
12605         (linux_kill): Kill the first thread here.
12606         (kill_lwp): New function.
12607         (send_sigstop, linux_send_signal): Use it.
12608         * proc-service.c: Clean up #ifdefs.
12609         (fpregset_info): Delete.
12610         (ps_lgetregs): Update and enable implementation.
12611         (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12612         implementations.
12613         * remote-utils.c (struct sym_cache, symbol_cache): New.
12614         (input_interrupt): Print a clearer message.
12615         (async_io_enabled): New variable.
12616         (enable_async_io, disable_async_io): Use it.  Update comments.
12617         (look_up_one_symbol): Use the symbol cache.
12618         * thread-db.c (thread_db_look_up_symbols): New function.
12619         (thread_db_init): Update comments.  Call thread_db_look_up_symbols.
12620
12621 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
12622
12623         * configure.in: Test for -rdynamic.
12624         * configure: Regenerated.
12625         * Makefile (INTERNAL_LDFLAGS): New.
12626         (gdbserver, gdbreplay): Use it.
12627
12628 2004-09-02  Andrew Cagney  <cagney@gnu.org>
12629
12630         * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12631
12632 2004-03-23  Daniel Jacobowitz  <drow@mvista.com>
12633
12634         * linux-low.c (linux_wait): Clear all_processes list also.
12635
12636 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
12637
12638         * linux-low.c: Include <errno.h>.  Remove extern declaration of
12639         errno.
12640
12641 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
12642
12643         * gdbreplay.c, server.h, utils.c: Update copyright years.
12644
12645 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
12646
12647         * server.c (main): Print child status or termination signal from
12648         variable 'signal', not 'sig'.
12649
12650 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
12651
12652         * linux-low.c (linux_read_memory): Change return type to
12653         int.  Check for and return error from ptrace().
12654         * target.c (read_inferior_memory): Change return type to int.  Pass
12655         back return status from the_target->read_memory().
12656         * target.h (struct target_ops): Adapt *read_memory() prototype.
12657         Update comment.
12658         (read_inferior_memory): Adapt prototype.
12659         * server.c (main): Return an error packet if
12660         read_inferior_memory() returns an error.
12661
12662 2004-03-04  Daniel Jacobowitz  <drow@mvista.com>
12663
12664         * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12665         Unify with other clean targets.
12666
12667 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
12668
12669         * server.c (handle_v_cont): Call set_desired_inferior.
12670
12671 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
12672
12673         * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12674
12675 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
12676
12677         * linux-low.c (linux_wait): Unblock async I/O.
12678         (linux_resume): Block and enable async I/O.
12679         * remote-utils.c (block_async_io, unblock_async_io): New functions.
12680         * server.h (block_async_io, unblock_async_io): Add prototypes.
12681
12682 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
12683
12684         * remote-utils.c (remote_open): Print a status notice after
12685         opening a TCP port.
12686         * server.c (attach_inferior): Print a status notice after
12687         attaching.
12688
12689 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
12690
12691         * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12692
12693 2004-02-26  Daniel Jacobowitz  <drow@mvista.com>
12694
12695         * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12696         error packet.
12697         * server.c, target.h: Update copyright years.
12698
12699 2004-02-25  Roland McGrath  <roland@redhat.com>
12700
12701         * target.h (struct target_ops): New member `read_auxv'.
12702         * server.c (handle_query): Handle qPart:auxv:read: query using that.
12703         * linux-low.c (linux_read_auxv): New function.
12704         (linux_target_ops): Initialize `read_auxv' member to that.
12705
12706 2004-02-17  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12707
12708         Committed by Jim Blandy  <jimb@redhat.com>.
12709
12710         * linux-s390-low.c (s390_num_regs): Update.
12711         (s390_regmap): Remove control registers.  Use __s390x__ predefine
12712         instead of GPR_SIZE to distiguish s390 and s390x targets.
12713
12714 2004-01-31  Daniel Jacobowitz  <drow@mvista.com>
12715
12716         * linux-low.c: Update copyright year.
12717         (check_removed_breakpoint): Clear pending_is_breakpoint.
12718         (linux_set_resume_request, linux_queue_one_thread)
12719         (resume_status_pending_p): New functions.
12720         (linux_continue_one_thread): Use process->resume.
12721         (linux_resume): Only resume threads if there are no pending events.
12722         * linux-low.h (struct process_info): Add resume request
12723         pointer.
12724
12725 2004-01-30  Daniel Jacobowitz  <drow@mvista.com>
12726
12727         * regcache.c (new_register_cache): Clear the allocated register
12728         buffer.  Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12729
12730 2003-10-13  Daniel Jacobowitz  <drow@mvista.com>
12731
12732         * linux-low.c (linux_resume): Take a struct thread_resume *
12733         argument.
12734         (linux_wait): Update call.
12735         (resume_ptr): New static variable.
12736         (linux_continue_one_thread): Renamed from
12737         linux_continue_one_process.  Use resume_ptr.
12738         (linux_resume): Use linux_continue_one_thread.
12739         * server.c (handle_v_cont, handle_v_requests): New functions.
12740         (myresume): New function.
12741         (main): Handle 'v' case.
12742         * target.h (struct thread_resume): New type.
12743         (struct target_ops): Change argument of "resume" to struct
12744         thread_resume *.
12745         (myresume): Delete macro.
12746
12747 2003-08-08  H.J. Lu  <hongjiu.lu@intel.com>
12748
12749         * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12750         (uninstall): Support DESTDIR.
12751
12752 Mon Jul 21 20:09:34 UTC 2003  Brendan Conoboy  <blc@redhat.com>
12753
12754         * configure.srv: Add xscale*linux copy of arm*linux entry.
12755
12756 2003-07-24  Daniel Jacobowitz  <drow@mvista.com>
12757
12758         * linux-arm-low.c (arm_reinsert_addr): New function.
12759         (the_low_target): Add arm_reinsert_addr.
12760
12761 2003-07-08  Mark Kettenis  <kettenis@gnu.org>
12762
12763         * mem-break.c: Remove whitespace at end of file.
12764
12765 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
12766
12767         * configure.in: Check whether we need to prototype strerror.
12768         * server.h: Optionally prototype strerror.
12769         * gdbreplay.c (perror_with_name): Use strerror.
12770         * linux-low.c (linux_attach_lwp): Use strerror.
12771         * utils.c (perror_with_name): Use strerror.
12772         * config.in, configure: Regenerated.
12773
12774 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
12775
12776         * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12777         SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12778
12779 2003-06-20  Daniel Jacobowitz  <drow@mvista.com>
12780
12781         * Makefile.in (SFILES): Update.
12782         * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12783         low-sun3.c: Remove files.
12784
12785 2003-06-17  Daniel Jacobowitz  <drow@mvista.com>
12786
12787         * linux-low.c: Move comment to linux_thread_alive where it belonged.
12788         (linux_detach_one_process, linux_detach): New functions.
12789         (linux_target_ops): Add linux_detach.
12790         * server.c (main): Handle 'D' packet.
12791         * target.h (struct target_ops): Add "detach" member.
12792         (detach_inferior): Define.
12793
12794 2003-06-13  Mark Kettenis  <kettenis@gnu.org>
12795
12796         From Kelley Cook  <kelleycook@wideopenwest.com>:
12797         * configure.srv: Accept i[34567]86 variants.
12798
12799 2003-06-05  Daniel Jacobowitz  <drow@mvista.com>
12800
12801         * linux-low.c (linux_wait_for_event): Correct comment typos.
12802         (linux_resume_one_process): Call check_removed_breakpoint.
12803         (linux_send_signal): New function.
12804         (linux_target_ops): Add linux_send_signal.
12805         * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12806         of kill.
12807         * target.h (struct target_ops): Add send_signal.
12808
12809 2003-05-29  Jim Blandy  <jimb@redhat.com>
12810
12811         * linux-low.c (usr_store_inferior_registers): Transfer buf in
12812         PTRACE_XFER_TYPE-sized chunks, not int-sized chunks.  Otherwise,
12813         if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12814         away part of the register's value.
12815
12816 2003-03-26  Daniel Jacobowitz  <drow@mvista.com>
12817
12818         * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12819         (linux_wait_for_event, linux_init_signals): Likewise.
12820
12821 2003-03-17  Daniel Jacobowitz  <drow@mvista.com>
12822
12823         * configure.in: Check for stdlib.h.
12824         * configure: Regenerated.
12825         * config.in: Regenerated.
12826
12827 2003-01-04  Andreas Schwab  <schwab@suse.de>
12828
12829         * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12830
12831 2003-01-02  Andrew Cagney  <ac131313@redhat.com>
12832
12833         * Makefile.in: Remove obsolete code.
12834
12835 2002-11-20  Daniel Jacobowitz  <drow@mvista.com>
12836
12837         * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12838         defined(PT_FPR0_HI).
12839
12840 2002-11-17  Stuart Hughes  <seh@zee2.com>
12841
12842         * linux-arm-low.c (arm_num_regs): Increase.
12843         (arm_regmap): Include status register.
12844
12845 2002-11-17  Daniel Jacobowitz  <drow@mvista.com>
12846
12847         * linux-low.c (register_addr): Remove incorrect -1 check.
12848
12849 2002-08-29  Daniel Jacobowitz  <drow@mvista.com>
12850
12851         * linux-low.c (linux_create_inferior): Call setpgid.  Return
12852         the new PID.
12853         (unstopped_p, linux_signal_pid): Remove.
12854         (linux_target_ops): Remove linux_signal_pid.
12855         * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12856         global instead of target method.
12857         * target.h (struct target_ops): Remove signal_pid.  Update comment
12858         for create_inferior.
12859         * server.c (signal_pid): New variable.
12860         (create_inferior): Set signal_pid.  Block SIGTTOU and SIGTTIN in
12861         gdbserver.  Set the child to be the foreground process group.
12862         (attach_inferior): Set signal_pid.
12863
12864 2002-08-23  Daniel Jacobowitz  <drow@mvista.com>
12865
12866         * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12867
12868 2002-08-20  Jim Blandy  <jimb@redhat.com>
12869
12870         * Makefile.in (LDFLAGS): Allow the configure script to establish a
12871         default for this.
12872
12873 2002-08-01  Andrew Cagney  <cagney@redhat.com>
12874
12875         * Makefile.in: Make chill references obsolete.
12876
12877 2002-07-24  Kevin Buettner  <kevinb@redhat.com>
12878
12879         * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12880         * configure: Regenerate.
12881         * config.in: Regenerate.
12882
12883 2002-07-09  David O'Brien  <obrien@FreeBSD.org>
12884
12885         * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12886         (perror_with_name, remote_close, remote_open, expect, play): Static.
12887
12888 2002-07-04  Michal Ludvig  <mludvig@suse.cz>
12889
12890         * linux-x86-64-low.c (x86_64_regmap): Make it an array of
12891         byte offsets instead of an array of indexes.
12892         (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12893
12894 2002-06-13  Daniel Jacobowitz  <drow@mvista.com>
12895
12896         * regcache.c: Add comment.
12897
12898 2002-06-11  Daniel Jacobowitz  <drow@mvista.com>
12899
12900         * thread-db.c: New file.
12901         * proc-service.c: New file.
12902         * acinclude.m4: New file.
12903         * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12904         proc-service.o, and thread-db.o.
12905         (linux-low.o): Add USE_THREAD_DB.
12906         * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12907         HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12908         * aclocal.m4: Regenerated.
12909         * config.in: Regenerated.
12910         * configure: Regenerated.
12911         * configure.in: Check for proc_service.h, sys/procfs.h,
12912         thread_db.h, and linux/elf.h headrs.
12913         Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12914         PRFPREGSET_T_BROKEN.  Introduce srv_thread_depfiles and USE_THREAD_DB.
12915         Check for -lthread_db and thread support.
12916         * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12917         PowerPC, and SuperH.
12918         * i387-fp.c: Constify arguments.
12919         * i387-fp.h: Likewise.
12920         * inferiors.c: (struct thread_info): Renamed from
12921         `struct inferior_info'.  Remove PID member.  Use generic inferior
12922         list header.  All uses updated.
12923         (inferiors, signal_pid): Removed.
12924         (all_threads): New variable.
12925         (get_thread): Define.
12926         (add_inferior_to_list): New function.
12927         (for_each_inferior): New function.
12928         (change_inferior_id): New function.
12929         (add_inferior): Removed.
12930         (remove_inferior): New function.
12931         (add_thread): New function.
12932         (free_one_thread): New function.
12933         (remove_thread): New function.
12934         (clear_inferiors): Use for_each_inferior and free_one_thread.
12935         (find_inferior): New function.
12936         (find_inferior_id): New function.
12937         (inferior_target_data): Update argument type.
12938         (set_inferior_target_data): Likewise.
12939         (inferior_regcache_data): Likewise.
12940         (set_inferior_regcache_data): Likewise.
12941         * linux-low.c (linux_bp_reinsert): Remove.
12942         (all_processes, stopping_threads, using_thrads)
12943         (struct pending_signals, debug_threads, pid_of): New.
12944         (inferior_pid): Replace with macro.
12945         (struct inferior_linux_data): Remove.
12946         (get_stop_pc, add_process): New functions.
12947         (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12948         Use add_process and add_thread.
12949         (linux_attach_lwp): New function, based on old linux_attach.  Use
12950         add_process and add_thread.  Set stop_expected for new threads.
12951         (linux_attach): New function.
12952         (linux_kill_one_process): New function.
12953         (linux_kill): Kill all LWPs.
12954         (linux_thread_alive): Use find_inferior_id.
12955         (check_removed_breakpoints, status_pending_p): New functions.
12956         (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12957         Update.  Use WNOHANG.  Wait for cloned processes also.  Update process
12958         struct for the found process.
12959         (linux_wait_for_event): New function.
12960         (linux_wait): Use it.  Support LWPs.
12961         (send_sigstop, wait_for_sigstop, stop_all_processes)
12962         (linux_resume_one_process, linux_continue_one_process): New functions.
12963         (linux_resume): Support LWPs.
12964         (REGISTER_RAW_SIZE): Remove.
12965         (fetch_register): Use register_size instead.  Call supply_register.
12966         (usr_store_inferior_registers): Likewise.  Call collect_register.
12967         Fix recursive case.
12968         (regsets_fetch_inferior_registers): Improve error message.
12969         (regsets_store_inferior_registers): Add debugging.
12970         (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12971         (unstopped_p, linux_signal_pid): New functions.
12972         (linux_target_ops): Add linux_signal_pid.
12973         (linux_init_signals): New function.
12974         (initialize_low): Call it.  Initialize using_threads.
12975         * regcache.c (inferior_regcache_data): Add valid
12976         flag.
12977         (get_regcache): Fetch registers lazily.  Add fetch argument
12978         and update all callers.
12979         (regcache_invalidate_one, regcache_invalidate): New
12980         functions.
12981         (new_register_cache): Renamed from create_register_cache.
12982         Return the new regcache.
12983         (free_register_cache): Change argument to a void *.
12984         (registers_to_string, registers_from_string): Call get_regcache
12985         with fetch flag set.
12986         (register_data): Make static.  Pass fetch flag to get_regcache.
12987         (supply_register): Call get_regcache with fetch flag clear.
12988         (collect_register): Call get_regcache with fetch flag set.
12989         (collect_register_as_string): New function.
12990         * regcache.h: Update.
12991         * remote-utils.c (putpkt): Flush after debug output and use
12992         stderr.
12993         Handle input interrupts while waiting for an ACK.
12994         (input_interrupt): Use signal_pid method.
12995         (getpkt): Flush after debug output and use stderr.
12996         (outreg): Use collect_register_as_string.
12997         (new_thread_notify, dead_thread_notify): New functions.
12998         (prepare_resume_reply): Check using_threads.  Set thread_from_wait
12999         and general_thread.
13000         (look_up_one_symbol): Flush after debug output.
13001         * server.c (step_thread, server_waiting): New variables.
13002         (start_inferior): Don't use signal_pid.  Update call to mywait.
13003         (attach_inferior): Update call to mywait.
13004         (handle_query): Handle qfThreadInfo and qsThreadInfo.
13005         (main): Don't fetch/store registers explicitly.  Use
13006         set_desired_inferior.  Support proposed ``Hs'' packet.  Update
13007         calls to mywait.
13008         * server.h: Update.
13009         (struct inferior_list, struct_inferior_list_entry): New.
13010         * target.c (set_desired_inferior): New.
13011         (write_inferior_memory): Constify.
13012         (mywait): New function.
13013         * target.h: Update.
13014         (struct target_ops): New signal_pid method.
13015         (mywait): Removed macro, added prototype.
13016
13017         * linux-low.h (regset_func): Removed.
13018         (regset_fill_func, regset_store_func): New.
13019         (enum regset_type): New.
13020         (struct regset_info): Add type field.  Use new operation types.
13021         (struct linux_target_ops): stop_pc renamed to get_pc.
13022         Add decr_pc_after_break and breakpoint_at.
13023         (get_process, get_thread_proess, get_process_thread)
13024         (strut process_info, all_processes, linux_attach_lwp)
13025         (thread_db_init): New.
13026
13027         * linux-arm-low.c (arm_get_pc, arm_set_pc,
13028         arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
13029         (the_low_target): Add new members.
13030         * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
13031         (i386_store_fpxregset): Constify.
13032         (target_regsets): Add new kind identifier.
13033         (i386_get_pc): Renamed from i386_stop_pc.  Simplify.
13034         (i386_set_pc): Add debugging.
13035         (i386_breakpoint_at): New function.
13036         (the_low_target): Add new members.
13037         * linux-mips-low.c (mips_get_pc, mips_set_pc)
13038         (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
13039         (mips_breakpoint_at): New.
13040         (the_low_target): Add new members.
13041         * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
13042         (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
13043         (the_low_target): Add new members.
13044         * linux-sh-low.c (sh_get_pc, sh_set_pc)
13045         (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
13046         (the_low_target): Add new members.
13047         * linux-x86-64-low.c (target_regsets): Add new kind
13048         identifier.
13049
13050 2002-05-15  Daniel Jacobowitz  <drow@mvista.com>
13051
13052         From Martin Pool <mbp@samba.org>:
13053         * server.c (gdbserver_usage): New function.
13054         (main): Call it.
13055
13056 2002-05-14  Daniel Jacobowitz  <drow@mvista.com>
13057
13058         * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
13059         stop_at -> stop_pc.
13060
13061 2002-05-04  Andrew Cagney  <ac131313@redhat.com>
13062
13063         * Makefile.in: Remove obsolete code.
13064
13065 2002-04-24  Michal Ludvig  <mludvig@suse.cz>
13066
13067         * linux-low.c (regsets_fetch_inferior_registers),
13068         (regsets_store_inferior_registers): Removed cast to int from
13069         ptrace() calls.
13070         * regcache.h: Added declaration of struct inferior_info.
13071
13072 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
13073
13074         * inferiors.c (struct inferior_info): Add regcache_data.
13075         (add_inferior): Call create_register_cache.
13076         (clear_inferiors): Call free_register_cache.
13077         (inferior_regcache_data, set_inferior_regcache_data): New functions.
13078         * regcache.c (struct inferior_regcache_data): New.
13079         (registers): Remove.
13080         (get_regcache): New function.
13081         (create_register_cache, free_register_cache): New functions.
13082         (set_register_cache): Don't initialize the register cache here.
13083         (registers_to_string, registers_from_string, register_data): Call
13084         get_regcache.
13085         * regcache.h: Add prototypes.
13086         * server.h: Likewise.
13087
13088 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
13089
13090         * mem-break.c: New file.
13091         * mem-break.h: New file.
13092         * Makefile.in: Add mem-break.o rule; update server.h
13093         dependencies.
13094         * inferiors.c (struct inferior_info): Add target_data
13095         member.
13096         (clear_inferiors): Free target_data member if set.
13097         (inferior_target_data, set_inferior_target_data): New functions.
13098         * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
13099         (i386_stop_pc, i386_set_pc): New.  Add to the_low_target.
13100         * linux-low.c (linux_bp_reinsert): New variable.
13101         (struct inferior_linux_data): New.
13102         (linux_create_inferior): Use set_inferior_target_data.
13103         (linux_attach): Likewise.  Call add_inferior.
13104         (linux_wait_for_one_inferior): New function.
13105         (linux_wait): Call it.
13106         (linux_write_memory): Add const.
13107         (initialize_low): Call set_breakpoint_data.
13108         * linux-low.h (struct linux_target_ops): Add breakpoint
13109         handling members.
13110         * server.c (attach_inferior): Remove extra add_inferior
13111         call.
13112         * server.h: Include mem-break.h.  Update inferior.c
13113         prototypes.
13114         * target.c (read_inferior_memory)
13115         (write_inferior_memory): New functions.
13116         * target.h (read_inferior_memory)
13117         (write_inferior_memory): Change macros to prototypes.
13118         (struct target_ops): Update comments.  Add const to write_memory
13119         definition.
13120
13121 2002-04-11  Daniel Jacobowitz  <drow@mvista.com>
13122
13123         * linux-low.c (usr_store_inferior_registers): Support
13124         registers which are allowed to fail to store.
13125         * linux-low.h (linux_target_ops): Likewise.
13126         * linux-ppc-low.c (ppc_regmap): Support FPSCR.
13127         (ppc_cannot_store_register): FPSCR may not be storable.
13128
13129 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13130
13131         * server.h: Include <string.h> if HAVE_STRING_H.
13132         * ChangeLog: Correct paths in last ChangeLog entry.
13133
13134 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13135
13136         * linux-low.h: Remove obsolete prototypes.
13137         (struct linux_target_ops): New.
13138         (extern the_low_target): New.
13139         * linux-low.c (num_regs, regmap): Remove declarations.
13140         (register_addr): Use the_low_target explicitly.
13141         (fetch_register): Likewise.
13142         (usr_fetch_inferior_registers): Likewise.
13143         (usr_store_inferior_registers): Likewise.
13144         * linux-arm-low.c (num_regs): Remove.
13145         (arm_num_regs): Define.
13146         (arm_regmap): Renamed from regmap, made static.
13147         (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
13148         made static.
13149         (arm_cannot_store_register): Renamed from cannot_store_register,
13150         made static.
13151         (the_low_target): New.
13152         * linux-i386-low.c (num_regs): Remove.
13153         (i386_num_regs): Define.
13154         (i386_regmap): Renamed from regmap, made static.
13155         (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
13156         made static.
13157         (i386_cannot_store_register): Renamed from cannot_store_register,
13158         made static.
13159         (the_low_target): New.
13160         * linux-ia64-low.c (num_regs): Remove.
13161         (ia64_num_regs): Define.
13162         (ia64_regmap): Renamed from regmap, made static.
13163         (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
13164         made static.
13165         (ia64_cannot_store_register): Renamed from cannot_store_register,
13166         made static.
13167         (the_low_target): New.
13168         * linux-m68k-low.c (num_regs): Remove.
13169         (m68k_num_regs): Define.
13170         (m68k_regmap): Renamed from regmap, made static.
13171         (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
13172         made static.
13173         (m68k_cannot_store_register): Renamed from cannot_store_register,
13174         made static.
13175         (the_low_target): New.
13176         * linux-mips-low.c (num_regs): Remove.
13177         (mips_num_regs): Define.
13178         (mips_regmap): Renamed from regmap, made static.
13179         (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
13180         made static.
13181         (mips_cannot_store_register): Renamed from cannot_store_register,
13182         made static.
13183         (the_low_target): New.
13184         * linux-ppc-low.c (num_regs): Remove.
13185         (ppc_num_regs): Define.
13186         (ppc_regmap): Renamed from regmap, made static.
13187         (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
13188         made static.
13189         (ppc_cannot_store_register): Renamed from cannot_store_register,
13190         made static.
13191         (the_low_target): New.
13192         * linux-s390-low.c (num_regs): Remove.
13193         (s390_num_regs): Define.
13194         (s390_regmap): Renamed from regmap, made static.
13195         (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
13196         made static.
13197         (s390_cannot_store_register): Renamed from cannot_store_register,
13198         made static.
13199         (the_low_target): New.
13200         * linux-sh-low.c (num_regs): Remove.
13201         (sh_num_regs): Define.
13202         (sh_regmap): Renamed from regmap, made static.
13203         (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
13204         made static.
13205         (sh_cannot_store_register): Renamed from cannot_store_register,
13206         made static.
13207         (the_low_target): New.
13208         * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
13209         (the_low_target): New.
13210
13211 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13212
13213         * Makefile.in: Add stamp-h target.
13214         * configure.in: Create stamp-h.
13215         * configure: Regenerated.
13216
13217 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13218
13219         * inferiors.c: New file.
13220         * target.c: New file.
13221         * target.h: New file.
13222         * Makefile.in:  Add target.o and inferiors.o.  Update
13223         dependencies.
13224         * linux-low.c (inferior_pid): New static variable,
13225         moved from server.c.
13226         (linux_create_inferior): Renamed from create_inferior.
13227         Call add_inferior.  Return 0 on success instead of a PID.
13228         (linux_attach): Renamed from myattach.
13229         (linux_kill): Renamed from kill_inferior.  Call clear_inferiors ().
13230         (linux_thread_alive): Renamed from mythread_alive.
13231         (linux_wait): Renamed from mywait.  Call clear_inferiors () if the
13232         child dies.
13233         (linux_resume): Renamed from myresume.  Add missing ``return 0''.
13234         (regsets_store_inferior_registers): Correct error message.
13235         Add missing ``return 0''.
13236         (linux_fetch_registers): Renamed from fetch_inferior_registers.
13237         (linux_store_registers): Renamed from store_inferior_registers.
13238         (linux_read_memory): Renamed from read_inferior_memory.
13239         (linux_write_memory): Renamed from write_inferior_memory.
13240         (linux_target_ops): New structure.
13241         (initialize_low): Call set_target_ops ().
13242         * remote-utils.c (unhexify): New function.
13243         (hexify): New function.
13244         (input_interrupt): Send signals to ``signal_pid''.
13245         * server.c (inferior_pid): Remove.
13246         (start_inferior): Update create_inferior call.
13247         (attach_inferior): Call add_inferior.
13248         (handle_query): New function.
13249         (main): Call handle_query for `q' packets.
13250         * server.h: Include "target.h".  Remove obsolete prototypes.
13251         Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
13252
13253 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13254
13255         * Makefile.in: Add WARN_CFLAGS.  Update configury
13256         dependencies.
13257         * configure.in: Check for <string.h>
13258         * configure: Regenerate.
13259         * config.in: Regenerate.
13260         * gdbreplay.c: Include needed system headers.
13261         (remote_open): Remove strchr prototype.
13262         * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
13263         * regcache.c (supply_register): Change buf argument to const void *.
13264         (supply_register_by_name): Likewise.
13265         (collect_register): Change buf argument to void *.
13266         (collect_register_by_name): Likewise.
13267         * regcache.h: Add missing prototypes.
13268         * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
13269         * server.c (handle_query): New function.
13270         (attached): New static variable, moved out of main.
13271         (main): Quiet longjmp clobber warnings.
13272         * server.h: Add ATTR_NORETURN and ATTR_FORMAT.  Update prototypes.
13273         * utils.c (error): Remove NORETURN.
13274         (fatal): Likewise.