Detect the arm/thumb mode of code SIGRETURN or RT_SIGRETURN returns to
[external/binutils.git] / gdb / gdbserver / ChangeLog
1 2016-01-21  Yao Qi  <yao.qi@linaro.org>
2
3         * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4         is_thumb and set it according to CPSR saved on the stack.
5         (get_next_pcs_syscall_next_pc): Pass is_thumb to
6         arm_sigreturn_next_pc.
7
8 2016-01-18  Yao Qi  <yao.qi@linaro.org>
9
10         * linux-low.c (linux_set_pc_64bit): New function.
11         (linux_get_pc_64bit): New function.
12         * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
13         Declare.
14         * linux-sparc-low.c (debug_threads): Remove declaration.
15         (sparc_get_pc): Remove.
16         (the_low_target): Use linux_get_pc_64bit instead of
17         sparc_get_pc.
18         * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
19         (the_low_target): Use linux_get_pc_64bit and
20         linux_set_pc_64bit.
21
22 2016-01-18  Yao Qi  <yao.qi@linaro.org>
23
24         * linux-arm-low.c (debug_threads): Remove declaration.
25         (arm_get_pc, arm_set_pc): Remove.
26         (the_low_target): Use linux_get_pc_32bit and
27         linux_set_pc_32bit.
28         * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
29         (the_low_target): Use linux_get_pc_32bit and
30         linux_set_pc_32bit.
31         * linux-cris-low.c (debug_threads): Remove declaration.
32         (cris_get_pc, cris_set_pc,): Remove.
33         (the_low_target): Use linux_get_pc_32bit and
34         linux_set_pc_32bit.
35         * linux-crisv32-low.c (debug_threads): Remove declaration.
36         (cris_get_pc, cris_set_pc): Remove.
37         (the_low_target): Use linux_get_pc_32bit and
38         linux_set_pc_32bit.
39         * linux-low.c: Include inttypes.h.
40         (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
41         * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
42         * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
43         (the_low_target): Use linux_get_pc_32bit and
44         linux_set_pc_32bit.
45         * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
46         (the_low_target): Use linux_get_pc_32bit and
47         linux_set_pc_32bit.
48         * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
49         (the_low_target): Use linux_get_pc_32bit and
50         linux_set_pc_32bit.
51         * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
52         (the_low_target): Use linux_get_pc_32bit and
53         linux_set_pc_32bit.
54         * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
55         (the_low_target): Use linux_get_pc_32bit and
56         linux_set_pc_32bit.
57
58 2016-01-18  Gary Benson  <gbenson@redhat.com>
59
60         * configure.ac (AC_FUNC_FORK): New check.
61         * config.in: Regenerate.
62         * configure: Likewise.
63
64 2016-01-14  Yao Qi  <yao.qi@linaro.org>
65
66         * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
67         * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
68         * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
69         arm_get_next_pcs_ctor.
70
71 2016-01-12  Josh Stone  <jistone@redhat.com>
72             Philippe Waroquiers  <philippe.waroquiers@skynet.be>
73
74         * inferiors.h: Include "gdb_vecs.h".
75         (struct process_info): Add syscalls_to_catch.
76         * inferiors.c (remove_process): Free syscalls_to_catch.
77         * remote-utils.c (prepare_resume_reply): Report syscall_entry and
78         syscall_return stops.
79         * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
80         * server.c (handle_general_set): Handle QCatchSyscalls.
81         (handle_query): Report support for QCatchSyscalls.
82         * target.h (struct target_ops): Add supports_catch_syscall.
83         (target_supports_catch_syscall): New macro.
84         * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
85         (struct lwp_info): Add syscall_state.
86         * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
87         Maintain syscall_state and syscalls_to_catch across exec.
88         (get_syscall_trapinfo): New function, proxy to the_low_target.
89         (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
90         (linux_low_filter_event): Toggle syscall_state entry/return for
91         syscall traps, and set it ignored for all others.
92         (gdb_catching_syscalls_p): New function.
93         (gdb_catch_this_syscall_p): New function.
94         (linux_wait_1): Handle SYSCALL_SIGTRAP.
95         (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
96         (linux_supports_catch_syscall): New function.
97         (linux_target_ops): Install it.
98         * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
99         (the_low_target): Install it.
100
101 2016-01-12  Mike Frysinger  <vapier@gentoo.org>
102
103         * acinclude.m4: Include new ../warning.m4 file.
104         * configure: Regenerated.
105         * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
106
107 2016-01-12  Mike Frysinger  <vapier@gentoo.org>
108
109         * ax.c (is_goto_target): Mark static.
110         * linux-low.c (register_addr): Likewise.
111         (linux_fetch_registers, linux_store_registers): Likewise.
112         * mem-break.c (any_persistent_commands): Fix old prototype.
113         (add_commands_to_breakpoint): Mark static.
114         * regcache.c (find_register_by_name): Delete unused func.
115         * remote-utils.c (hex_or_minus_one): Mark static.
116         * server.c (monitor_show_help): Mark static.
117         (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
118         handle_v_requests): Likewise.
119
120 2016-01-12  Pedro Alves  <palves@redhat.com>
121
122         Remove use of the registered trademark symbol throughout.
123
124 2016-01-08  Yao Qi  <yao.qi@linaro.org>
125
126         * remote-utils.c (getpkt): If c is '\003', call target hook
127         request_interrupt.
128
129 2016-01-06  Yao Qi  <yao.qi@linaro.org>
130
131         * linux-aarch32-low.h (arm_abi_breakpoint): Move to
132         linux-aarch32-low.c.
133         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
134         (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
135         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
136         (thumb2_breakpoint): Declare.
137         * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
138         linux-aarch32-low.h.
139         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
140         (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
141         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
142
143 2016-01-01  Joel Brobecker  <brobecker@adacore.com>
144
145         * gdbreplay.c (gdbreplay_version): Change copyright year in
146         version message.
147         * server.c (gdbserver_version): Likewise.
148
149 2015-12-28  Patrick Palka  <patrick@parcs.ath.cx>
150
151         * server.c (crc32_table): Delete.
152         (crc32): Use libiberty's xcrc32 function.
153
154 2015-12-22  Joel Brobecker  <brobecker@adacore.com>
155
156         * lynx-low.c (lynx_delete_thread_callback): New function.
157         (lynx_mourn): Properly delete our process and all of its
158         threads.  Remove call to clear_inferiors.
159
160 2015-12-22  Joel Brobecker  <brobecker@adacore.com>
161
162         * target.c (thread_search_callback): Add check that
163         the thread_stopped target callback is not NULL before
164         calling it.
165
166 2015-12-21  Yao Qi  <yao.qi@linaro.org>
167
168         * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
169         arm breakpoint.
170
171 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
172
173         * server.c (handle_query): Call target_supports_software_single_step.
174
175 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
176
177         * linux-low.c (single_step): New function.
178         (linux_resume_one_lwp_throw): Call single_step.
179         (start_step_over): Likewise.
180
181 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
182
183         * Makefile.in (SFILES): Append arch/arm-linux.c,
184         arch/arm-get-next-pcs.c.
185         (arm-linux.o): New rule.
186         (arm-get-next-pcs.o): New rule.
187         * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
188         arm-linux.o.
189         * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro.  Moved
190         to linux-aarch32-low.c.
191         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
192         (arm_breakpoint_len, thumb_breakpoint): Likewise.
193         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
194         (thumb2_breakpoint_len): Likewise.
195         (arm_is_thumb_mode): Make non-static.
196         * linux-aarch32-low.h (arm_abi_breakpoint): New macro.  Moved
197         from linux-aarch32-low.c.
198         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
199         (arm_breakpoint_len, thumb_breakpoint): Likewise.
200         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
201         (thumb2_breakpoint_len): Likewise.
202         (arm_is_thumb_mode): New declaration.
203         * linux-arm-low.c: Include arch/arm-linux.h
204         aarch/arm-get-next-pcs.h, sys/syscall.h.
205         (get_next_pcs_ops): New struct.
206         (get_next_pcs_addr_bits_remove): New function.
207         (get_next_pcs_is_thumb): New function.
208         (get_next_pcs_read_memory_unsigned_integer): Likewise.
209         (arm_sigreturn_next_pc): Likewise.
210         (get_next_pcs_syscall_next_pc): Likewise.
211         (arm_gdbserver_get_next_pcs): Likewise.
212         (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
213         Initialize.
214         * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
215         * server.h: Include gdb_vecs.h.
216
217 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
218
219         * Makefile.in (SFILES): Append common/common-regcache.c.
220         (OBS): Append common-regcache.o.
221         (common-regcache.o): New rule.
222         * regcache.c (init_register_cache): Initialize cache to
223         REG_UNAVAILABLE.
224         (regcache_raw_read_unsigned): New function.
225         * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
226         register_status enum.
227
228 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
229
230         * linux-aarch64-low.c (the_low_targets): Rename
231         breakpoint_reinsert_addr to get_next_pcs.
232         * linux-arm-low.c (the_low_targets): Likewise.
233         * linux-bfin-low.c (the_low_targets): Likewise.
234         * linux-cris-low.c (the_low_targets): Likewise.
235         * linux-crisv32-low.c (the_low_targets): Likewise.
236         * linux-low.c (can_software_single_step): Likewise.
237         (install_software_single_step_breakpoints): New function.
238         (start_step_over): Use install_software_single_step_breakpoints.
239         * linux-low.h: New CORE_ADDR vector.
240         (struct linux_target_ops) Rename breakpoint_reinsert_addr to
241         get_next_pcs.
242         * linux-mips-low.c (the_low_targets): Likewise.
243         * linux-nios2-low.c (the_low_targets): Likewise.
244         * linux-sparc-low.c (the_low_targets): Likewise.
245
246 2015-12-17  Pedro Alves  <palves@redhat.com>
247
248         * linux-low.c (linux_kill_one_lwp): Remove references to
249         LinuxThreads.
250         (kill_lwp): Remove HAVE_TKILL_SYSCALL check.  No longer fall back
251         to 'kill'.
252         (linux_init_signals): Delete.
253         (initialize_low): Adjust.
254         * thread-db.c (thread_db_init): Remove LinuxThreads reference.
255
256 2015-12-16  Pedro Alves  <palves@redhat.com>
257
258         * configure.ac (compiler warning flags): When testing a
259         -Wno-foo option, check whether -Wfoo works instead.
260         * configure: Regenerate.
261
262 2015-12-11  Don Breazeal  <donb@codesourcery.com>
263
264         * server.c (process_serial_event): Don't exit from gdbserver
265         in remote mode if there are still active inferiors.
266
267 2015-12-11  Yao Qi  <yao.qi@linaro.org>
268
269         * linux-aarch64-low.c (aarch64_breakpoint_at): Call
270         arm_breakpoint_at if the process is 32-bit.
271
272 2015-12-11  Yao Qi  <yao.qi@linaro.org>
273
274         * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
275         arm breakpoint.
276
277 2015-12-07  Yao Qi  <yao.qi@linaro.org>
278
279         * configure.srv: Append arm.o to srv_tgtobj for
280         aarch64*-*-linux* target.
281         * linux-aarch32-low.c (arm_abi_breakpoint): New macro.  Moved
282         from linux-arm-low.c.
283         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
284         (arm_breakpoint_len, thumb_breakpoint): Likewise.
285         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
286         (thumb2_breakpoint_len): Likewise.
287         (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
288         (arm_breakpoint_kinds): Likewise.
289         (arm_breakpoint_kind_from_pc): Likewise.
290         (arm_sw_breakpoint_from_kind): Likewise.
291         (arm_breakpoint_kind_from_current_state): Likewise.
292         * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
293         (arm_sw_breakpoint_from_kind): Declare.
294         (arm_breakpoint_kind_from_current_state): Declare.
295         (arm_breakpoint_at): Declare.
296         * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
297         arm_sw_breakpoint_from_kind if process is 32-bit.
298         (aarch64_breakpoint_kind_from_pc): New function.
299         (aarch64_breakpoint_kind_from_current_state): New function.
300         (the_low_target): Initialize fields breakpoint_kind_from_pc
301         and breakpoint_kind_from_current_state.
302         * linux-arm-low.c (arm_breakpoint_kinds): Move to
303         linux-aarch32-low.c.
304         (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
305         (arm_breakpoint, arm_breakpoint_len): Likewise.
306         (thumb_breakpoint, thumb_breakpoint_len): Likewise.
307         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
308         (arm_is_thumb_mode): Likewise.
309         (arm_breakpoint_at): Likewise.
310         (arm_breakpoint_kind_from_pc): Likewise.
311         (arm_sw_breakpoint_from_kind): Likewise.
312         (arm_breakpoint_kind_from_current_state): Likewise.
313
314         Revert:
315         2015-08-04  Yao Qi  <yao.qi@linaro.org>
316
317         * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
318         0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
319         * server.c (extended_protocol): Remove "static".
320         * server.h (extended_protocol): Declare it.
321
322 2015-12-04  Josh Stone  <jistone@redhat.com>
323
324         * target.h (struct target_ops) <arch_setup>: Rename to ...
325         (struct target_ops) <post_create_inferior>: ... this.
326         (target_arch_setup): Rename to ...
327         (target_post_create_inferior): ... this, calling post_create_inferior.
328         * server.c (start_inferior): Update target_arch_setup calls to
329         target_post_create_inferior.
330         * linux-low.c (linux_low_ptrace_options): Forward declare.
331         (linux_arch_setup): Update its comment for general use.
332         (linux_post_create_inferior): New, run arch_setup and setup ptrace.
333         (struct linux_target_ops): Use linux_post_create_inferior.
334         * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
335         to post_create_inferior.
336         * nto-low.c (struct nto_target_ops): Likewise.
337         * spu-low.c (struct spu_target_ops): Likewise.
338         * win32-low.c (struct win32_target_ops): Likewise.
339
340 2015-12-03  Antoine Tremblay  <antoine.tremblay@ericsson.com>
341
342         * linux-arm-low.c: Remove duplicate arch/arm.h include.
343
344 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
345
346         * linux-arm-low.c (arm_reinsert_addr): Remove function.
347         (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
348         * linux-cris-low.c (cris_reinsert_addr> Remove function.
349         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
350         * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
351         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
352         * linux-mips-low.c (mips_reinsert_addr): Remove function.
353         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
354         * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
355         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
356         * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
357         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
358
359 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
360
361         * linux-low.c (linux_look_up_symbols): Don't call
362         linux_supports_traceclone.
363         * linux-low.h (thread_db_init): Remove use_events argument.
364         * thread-db.c (thread_db_use_event): Remove global variable.
365         (struct thread_db) <td_thr_event_enable_p>: Remove field.
366         (struct thread_db) <td_create_bp>: Remove field.
367         (thread_db_create_event): Remove function.
368         (thread_db_enable_reporting): Likewise.
369         (find_one_thread): Don't check for thread_db_use_events.
370         (attach_thread): Likewise.
371         (thread_db_load_search): Remove td_thr_event_enable_p initialization.
372         (try_thread_db_load_1): Don't check for thread_db_use_events.
373         (thread_db_init): Remove use_events argument and thread events
374         handling.
375         (remove_thread_event_breakpoints): Remove function.
376         (thread_db_detach): Remove call to remove_thred_event_breakpoints.
377
378 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
379
380         * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
381         New function.
382         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
383         * linux-arm-low.c (arm_supports_hardware_single_step): New function.
384         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
385         * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
386         (struct linux_target_ops) <bfin_supports_hardware_single_step>:
387         Initialize.
388         * linux-crisv32-low.c (cris_supports_hardware_single_step):
389         New function.
390         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
391         * linux-low.c (can_hardware_single_step): Use
392         supports_hardware_single_step.
393         (can_software_single_step): New function.
394         (start_step_over): Call can_software_single_step.
395         (linux_supports_hardware_single_step): New function.
396         (struct target_ops) <supports_software_single_step>: Initialize.
397         * linux-low.h (struct linux_target_ops)
398         <supports_hardware_single_step>: Initialize.
399         * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
400         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
401         * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
402         (struct linux_target_ops) <supports_hardware_single_step> Initialize.
403         * linux-s390-low.c (s390_supports_hardware_single_step): New function.
404         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
405         * linux-sh-low.c (sh_supports_hardware_single_step): New function.
406         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
407         * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
408         (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
409         Initialize.
410         * linux-tile-low.c (tile_supports_hardware_single_step): New function.
411         (struct linux_target_ops) <tile_supports_hardware_single_step>:
412         Initialize.
413         * linux-x86-low.c (x86_supports_hardware_single_step) New function.
414         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
415         * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
416         New function.
417         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
418         * target.h (struct target_ops): <supports_software_single_step>:
419         New field.
420         (target_supports_software_single_step): New macro.
421
422 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
423
424         * linux-low.c (linux_wait_1): Fix pc advance condition.
425         * mem-break.c (reinsert_breakpoint_inserted_here): New function.
426         * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
427
428 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
429
430         * linux-arm-low.c (arm_is_thumb_mode): New function.
431         (arm_breakpoint_at): Use arm_is_thumb_mode.
432         (arm_breakpoint_kind_from_current_state): New function.
433         (struct linux_target_ops) <breakpoint_kind_from_current_state>:
434         Initialize.
435         * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
436         (linux_breakpoint_kind_from_current_state): New function.
437         (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
438         * linux-low.h (struct linux_target_ops)
439         <breakpoint_kind_from_current_state>: New field.
440         * target.h (struct target_ops): Likewise.
441         (target_breakpoint_kind_from_current_state): New macro.
442
443 2015-11-30  Pedro Alves  <palves@redhat.com>
444
445         * linux-low.c (linux_resume): Wake up the event loop before
446         returning.
447
448 2015-11-30  Pedro Alves  <palves@redhat.com>
449
450         * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
451         check.
452         (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
453         to -1.
454         * target.c (struct thread_search): New structure.
455         (thread_search_callback): New function.
456         (prev_general_thread): New global.
457         (prepare_to_access_memory, done_accessing_memory): New functions.
458         * target.h (prepare_to_access_memory, done_accessing_memory):
459         Replace macros with function declarations.
460
461 2015-11-30  Pedro Alves  <palves@redhat.com>
462
463         PR 14618
464         * linux-low.c (linux_wait_1): If the last resumed thread is gone,
465         report TARGET_WAITKIND_NO_RESUMED.
466         * remote-utils.c (prepare_resume_reply): Handle
467         TARGET_WAITKIND_NO_RESUMED.
468         * server.c (report_no_resumed): New global.
469         (handle_query) <qSupported>: Handle "no-resumed+".  Report
470         "no-resumed+" support.
471         (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
472         return error if the client doesn't support no-resumed events.
473         (push_stop_notification): New function.
474         (handle_target_event): Use it.  Report TARGET_WAITKIND_NO_RESUMED
475         events if the client supports them.
476
477 2015-11-30  Pedro Alves  <palves@redhat.com>
478
479         * linux-low.c (thread_still_has_status_pending_p): Don't check
480         vCont;t here.
481         (lwp_resumed): New function.
482         (status_pending_p_callback): Return early if the LWP is not
483         supposed to be resumed.
484
485 2015-11-30  Pedro Alves  <palves@redhat.com>
486
487         * linux-low.c (handle_extended_wait): Assert that the LWP's
488         waitstatus is TARGET_WAITKIND_IGNORE.  If GDB wants to hear about
489         thread create events, leave the new child's status pending.
490         (linux_low_filter_event): If GDB wants to hear about thread exit
491         events, leave the LWP marked dead and don't delete it.
492         (linux_wait_for_event_filtered): Don't check for thread exit.
493         (filter_exit_event): New function.
494         (linux_wait_1): Use it, when returning an exit event.
495         (linux_resume_one_lwp_throw): Assert that the LWP's
496         waitstatus is TARGET_WAITKIND_IGNORE.
497         * remote-utils.c (prepare_resume_reply): Handle
498         TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
499         * server.c (report_thread_events): New global.
500         (handle_general_set): Handle QThreadEvents.
501         (handle_query) <qSupported>: Handle and report QThreadEvents+;
502         (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
503         TARGET_WAITKIND_THREAD_EXITED.
504         * server.h (report_thread_events): Declare.
505
506 2015-11-30  Pedro Alves  <palves@redhat.com>
507
508         * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
509         the thread's last_resume_kind was resume_stop.
510
511 2015-11-30  Pedro Alves  <palves@redhat.com>
512
513         * linux-low.c (linux_attach): In non-stop mode, wait for one stop
514         before returning.
515
516 2015-11-30  Pedro Alves  <palves@redhat.com>
517
518         * server.c (handle_v_requests): Handle vCtrlC.
519
520 2015-11-30  Pedro Alves  <palves@redhat.com>
521
522         * gdbthread.h (find_any_thread_of_pid): Declare.
523         * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
524         functions.
525         * server.c (handle_query): If current_thread is NULL, look for
526         another thread of the selected process.
527
528 2015-11-26  Daniel Colascione  <dancol@dancol.org>
529             Simon Marchi  <simon.marchi@ericsson.com>
530
531         * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
532         * server.c (handle_qxfer_threads_worker): Refactor to include thread
533         name in reply.
534         * target.h (struct target_ops) <thread_name>: New field.
535         (target_thread_name): New macro.
536
537 2015-11-23  Joel Brobecker  <brobecker@adacore.com>
538
539         * regcache.h (regcache_invalidate_pid): Add declaration.
540         * regcache.c (regcache_invalidate_pid): New function, extracted
541         from regcache_invalidate.
542         (regcache_invalidate): Reimplement using regcache_invalidate_pid.
543         Add trivial documentation comment.
544         * lynx-low.c: Use regcache_invalidate_pid instead of
545         regcache_invalidate.
546
547 2015-11-23  Joel Brobecker  <brobecker@adacore.com>
548
549         * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
550         and Elf64_auxv_t if the target is Android.
551
552 2015-11-22  Doug Evans  <xdje42@gmail.com>
553
554         * target.h: #include <sys/types.h>.
555
556 2015-11-19  Pedro Alves  <palves@redhat.com>
557
558         * linux-low.c (linux_process_qsupported): Change prototype.
559         Adjust.
560         * linux-low.h (struct linux_target_ops) <process_qsupported>:
561         Change prototype.
562         * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
563         and adjust to loop over all features.
564         * server.c (handle_query) <qSupported>: Adjust to call
565         target_process_qsupported once, passing it a vector of unprocessed
566         features.
567         * target.h (struct target_ops) <process_qsupported>: Change
568         prototype.
569         (target_process_qsupported): Adjust.
570
571 2015-11-19  Pedro Alves  <palves@redhat.com>
572
573         * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
574         mode.
575         * configure: Regenerate.
576
577 2015-11-19  Pedro Alves  <palves@redhat.com>
578
579         * configure: Regenerate.
580
581 2015-11-19  Yao Qi  <yao.qi@linaro.org>
582
583         * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
584         type to uint32_t.
585
586 2015-11-19  Yao Qi  <yao.qi@linaro.org>
587
588         * linux-aarch64-low.c (enum aarch64_operand_type): New.
589         (struct aarch64_operand): Move enum out.
590
591 2015-11-19  Yao Qi  <yao.qi@linaro.org>
592
593         * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
594         struct user_fpsimd_state *.
595         (aarch64_store_fpregset): Likewise.
596
597 2015-11-19  Yao Qi  <yao.qi@linaro.org>
598
599         * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
600         struct user_pt_regs *.
601         (aarch64_store_gregset): Likewise.
602
603 2015-11-18  Pedro Alves  <palves@redhat.com>
604
605         * Makefile.in (all_object_files): Add $IPA_OBJS.
606
607 2015-11-17  Pedro Alves  <palves@redhat.com>
608
609         * win32-low.c (win32_resume): Use gdb_signal_from_host,
610         GDB_SIGNAL_0 and gdb_signal_to_string.
611
612 2015-11-17  Pedro Alves  <palves@redhat.com>
613
614         * win32-low.c (handle_output_debug_string): Remove parameter.
615         (win32_kill): Remove our_status local and adjust call to
616         handle_output_debug_string.
617         (get_child_debug_event): Adjust call to
618         handle_output_debug_string.
619
620 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
621
622         * linux-mips-low.c (mips_fill_gregset): Add cast.
623         (mips_store_gregset): Likewise.
624         (mips_fill_fpregset): Likewise.
625         (mips_store_fpregset): Likewise.
626
627 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
628
629         * linux-mips-low.c (mips_add_watchpoint): Rename private to
630         priv.
631
632 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
633
634         * linux-mips-low.c (mips_linux_new_thread): Change type of
635         watch_type to enum target_hw_bp_type.
636
637 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
638
639                 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
640                 Change return type to arm_hwbp_type.
641
642 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
643
644         * linux-aarch32-low.c (arm_fill_gregset): Add cast.
645         (arm_store_gregset): Likewise.
646         * linux-arm-low.c (arm_get_hwcap): Likewise.
647         (arm_read_description): Likewise.
648
649 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
650
651         * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
652
653 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
654
655         * linux-ppc-low.c (ppc_get_hwcap): Add cast.
656         (ppc_fill_vsxregset): Likewise.
657         (ppc_store_vsxregset): Likewise.
658         (ppc_fill_vrregset): Likewise.
659         (ppc_store_vrregset): Likewise.
660         (ppc_fill_evrregset): Likewise.
661         (ppc_store_evrregset): Likewise.
662
663 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
664
665         * linux-ppc-low.c (ppc_usrregs_info): Remove
666         forward-declaration.
667         (ppc_arch_setup): Move lower in file.
668
669 2015-10-30  Simon Marchi  <simon.marchi@ericsson.com>
670
671         * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
672         (ps_pdwrite): Likewise.
673
674 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
675
676         * linux-arm-low.c (arm_new_thread): Move pointer dereference
677         to after assert checks.
678
679 2015-10-29  Simon Marchi  <simon.marchi@ericsson.com>
680
681         * proc-service.c (ps_pdread): Add/adjust casts.
682         (ps_pdwrite): Add/adjust casts.
683
684 2015-10-29  Simon Marchi  <simon.marchi@polymtl.ca>
685
686         * server.c (handle_search_memory_1): Cast return value of
687         memmem.
688
689 2015-10-29  Simon Marchi  <simon.marchi@polymtl.ca>
690
691         * server.c (write_qxfer_response): Change type of data to
692         gdb_byte *.
693
694 2015-10-29  Pedro Alves  <palves@redhat.com>
695
696         * mem-break.c (Z_packet_to_bkpt_type): Add cast.
697
698 2015-10-29  Pedro Alves  <palves@redhat.com>
699
700         * tracepoint.c (clear_installed_tracepoints): Add casts.
701
702 2015-10-29  Pedro Alves  <palves@redhat.com>
703
704         * server.c (handle_v_cont, process_serial_event): Add enum
705         gdb_signal casts to signal parsing code.
706
707 2015-10-29  Pedro Alves  <palves@redhat.com>
708
709         * linux-low.h (NULL_REGSET): Define.
710         * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
711         * linux-arm-low.c (arm_regsets): Likewise.
712         * linux-crisv32-low.c (cris_regsets): Likewise.
713         * linux-m68k-low.c (m68k_regsets): Likewise.
714         * linux-mips-low.c (mips_regsets): Likewise.
715         * linux-nios2-low.c (nios2_regsets): Likewise.
716         * linux-ppc-low.c (ppc_regsets): Likewise.
717         * linux-s390-low.c (s390_regsets): Likewise.
718         * linux-sh-low.c (sh_regsets): Likewise.
719         * linux-sparc-low.c (sparc_regsets): Likewise.
720         * linux-tic6x-low.c (tic6x_regsets): Likewise.
721         * linux-tile-low.c (tile_regsets): Likewise.
722         * linux-x86-low.c (x86_regsets): Likewise.
723         * linux-xtensa-low.c (xtensa_regsets): Likewise.
724
725 2015-10-29  Pedro Alves  <palves@redhat.com>
726
727         * linux-low.h (NULL_REGSET): Define.
728         * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
729         * linux-arm-low.c (arm_regsets): Likewise.
730         * linux-crisv32-low.c (cris_regsets): Likewise.
731         * linux-m68k-low.c (m68k_regsets): Likewise.
732         * linux-mips-low.c (mips_regsets): Likewise.
733         * linux-nios2-low.c (nios2_regsets): Likewise.
734         * linux-ppc-low.c (ppc_regsets): Likewise.
735         * linux-s390-low.c (s390_regsets): Likewise.
736         * linux-sh-low.c (sh_regsets): Likewise.
737         * linux-sparc-low.c (sparc_regsets): Likewise.
738         * linux-tic6x-low.c (tic6x_regsets): Likewise.
739         * linux-tile-low.c (tile_regsets): Likewise.
740         * linux-x86-low.c (x86_regsets): Likewise.
741         * linux-xtensa-low.c (xtensa_regsets): Likewise.
742
743 2015-10-26  Doug Evans  <dje@google.com>
744
745         * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
746
747 2015-10-26  Doug Evans  <dje@google.com>
748
749         * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
750
751 2015-10-26  Doug Evans  <dje@google.com>
752
753         * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
754         for debug_printf.
755         (attach_thread, find_new_threads_callback): Ditto.
756
757 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
758
759         * mem-break.h (set_breakpoint_data): Remove.
760
761 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
762
763         * nto-low.c (nto_sw_breakpoint_from_kind): New function.
764         (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
765         (initialize_low): Remove set_breakpoint_data call.
766         * spu-low.c (spu_sw_breakpoint_from_kind): New function.
767         (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
768         (initialize_low): Remove set_breakpoint_data call.
769         * win32-low.c (win32_sw_breakpoint_from_kind): New function.
770         (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
771         (initialize_low): Remove set_breakpoint_data call.
772
773 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
774
775         * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
776         * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
777         * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
778         * target.h (target_breakpoint_kind_from_pc): New macro.
779
780 2015-10-22  Antoine Tremblay  <antoine.tremblay@ericsson.com>
781
782         * linux-low.c (default_breakpoint_kind_from_pc): New function.
783         (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
784         the default breakpoint kind.
785
786 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
787
788         * linux-arm-low.c (arm_supports_z_point_type): Add software
789         breakpoint support.
790
791 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
792
793         * linux-arm-low.c: Refactor breakpoint definitions.
794         (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
795         (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
796
797 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
798
799         * Makefile.in: Add arm.c/o.
800         * configure.srv: Likewise.
801         * linux-arm-low.c (arm_breakpoint_kinds): New enum.
802         (arm_breakpoint_kind_from_pc): New function.
803         (arm_sw_breakpoint_from_kind): Return proper kind.
804         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
805
806 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
807
808         * linux-low.c (initialize_low): Ajdust for breakpoint global variables
809         removal.
810         * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
811         (struct raw_breakpoint) <size>: Remove.
812         (struct raw_breakpoint) <kind>: Add.
813         (bp_size): New function.
814         (bp_opcode): Likewise.
815         (find_raw_breakpoint_at): Adjust for kind.
816         (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
817         (remove_memory_breakpoint): Adjust for kind call bp_size.
818         (set_raw_breakpoint_at): Adjust for kind.
819         (set_breakpoint): Likewise.
820         (set_breakpoint_at): Call breakpoint_kind_from_pc.
821         (delete_raw_breakpoint): Adjust for kind.
822         (delete_breakpoint): Likewise.
823         (find_gdb_breakpoint): Likewise.
824         (set_gdb_breakpoint_1): Likewise.
825         (set_gdb_breakpoint): Likewise.
826         (delete_gdb_breakpoint_1): Likewise.
827         (delete_gdb_breakpoint): Likewise.
828         (uninsert_raw_breakpoint): Likewise.
829         (reinsert_raw_breakpoint): Likewise.
830         (set_breakpoint_data): Remove.
831         (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
832         (check_mem_read): Adjust for kind call bp_size.
833         (check_mem_write): Adjust for kind call bp_size,bp_opcode.
834         (clone_one_breakpoint): Adjust for kind.
835         * mem-break.h (set_gdb_breakpoint): Likewise.
836         (delete_gdb_breakpoint): Likewise.
837         * server.c (process_serial_event): Likewise.
838
839 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
840
841         * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
842         (struct linux_target_ops) <breakpoint>: Remove.
843         (struct linux_target_ops) <breakpoint_len>: Remove.
844         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
845         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
846         * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
847         (arm_sw_breakpoint_from_kind): New function.
848         * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
849         (struct linux_target_ops) <breakpoint>: Remove.
850         (struct linux_target_ops) <breakpoint_len>: Remove.
851         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
852         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
853         * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
854         (struct linux_target_ops) <breakpoint>: Remove.
855         (struct linux_target_ops) <breakpoint_len>: Remove.
856         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
857         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
858         * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
859         (struct linux_target_ops) <breakpoint>: Remove.
860         (struct linux_target_ops) <breakpoint_len>: Remove.
861         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
862         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
863         * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
864         and sw_breakpoint_from_kind to increment the pc.
865         (linux_breakpoint_kind_from_pc): New function.
866         (linux_sw_breakpoint_from_kind): New function.
867         (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
868         (initialize_low): Call breakpoint_kind_from_pc and
869         sw_breakpoint_from_kind to replace breakpoint_data/len.
870         * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
871         New field.
872         (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
873         * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
874         (struct linux_target_ops) <breakpoint>: Remove.
875         (struct linux_target_ops) <breakpoint_len>: Remove.
876         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
877         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
878         * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
879         (struct linux_target_ops) <breakpoint>: Remove.
880         (struct linux_target_ops) <breakpoint_len>: Remove.
881         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
882         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
883         * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
884         (struct linux_target_ops) <breakpoint>: Remove.
885         (struct linux_target_ops) <breakpoint_len>: Remove.
886         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
887         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
888         * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
889         (struct linux_target_ops) <breakpoint>: Remove.
890         (struct linux_target_ops) <breakpoint_len>: Remove.
891         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
892         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
893         * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
894         (struct linux_target_ops) <breakpoint>: Remove.
895         (struct linux_target_ops) <breakpoint_len>: Remove.
896         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
897         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
898         * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
899         (struct linux_target_ops) <breakpoint>: Remove.
900         (struct linux_target_ops) <breakpoint_len>: Remove.
901         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
902         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
903         * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
904         (struct linux_target_ops) <breakpoint>: Remove.
905         (struct linux_target_ops) <breakpoint_len>: Remove.
906         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
907         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
908         * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
909         (struct linux_target_ops) <breakpoint>: Remove.
910         (struct linux_target_ops) <breakpoint_len>: Remove.
911         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
912         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
913         * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
914         (struct linux_target_ops) <breakpoint>: Remove.
915         (struct linux_target_ops) <breakpoint_len>: Remove.
916         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
917         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
918         * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
919         * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
920         (struct linux_target_ops) <breakpoint>: Remove.
921         (struct linux_target_ops) <breakpoint_len>: Remove.
922         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
923         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
924         * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
925         (struct linux_target_ops) <breakpoint>: Remove.
926         (struct linux_target_ops) <breakpoint_len>: Remove.
927         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
928         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
929
930 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
931
932         * linux-cris-low.c (cris_get_pc): Remove void arg.
933
934 2015-10-16  Aleksandar Ristovski  <aristovski@qnx.com>
935
936         * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
937         variable name.
938
939 2015-10-16  Aleksandar Ristovski  <aristovski@qnx.com>
940
941         * inferiors.c (thread_pid_matches_callback): New function.
942         (find_thread_process): New function.
943         (remove_thread): Reset current_thread.
944         (remove_process): Assert threads have been removed first.
945
946 2015-10-15  Yao Qi  <yao.qi@linaro.org>
947
948         * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
949         if it is 3.
950         (aarch64_remove_point): Likewise.
951         * regcache.c (regcache_register_size): New function.
952
953 2015-10-12  Yao Qi  <yao.qi@linaro.org>
954
955         * linux-aarch64-low.c: Update all callers as emit_load_store
956         is renamed to aarch64_emit_load_store.
957
958 2015-10-12  Yao Qi  <yao.qi@linaro.org>
959
960         * linux-aarch64-low.c: Update all callers of function renaming
961         from emit_insn to aarch64_emit_insn.
962
963 2015-10-12  Yao Qi  <yao.qi@linaro.org>
964
965         * linux-aarch64-low.c (enum aarch64_opcodes): Move to
966         arch/aarch64-insn.h.
967         (struct aarch64_memory_operand): Likewise.
968         (ENCODE): Likewise.
969         (emit_insn): Move to arch/aarch64-insn.c.
970         (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
971         (emit_load_store): Move to arch/aarch64-insn.c.
972         (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
973         (can_encode_int32): Remove.
974
975 2015-10-12  Yao Qi  <yao.qi@linaro.org>
976
977         * linux-aarch64-low.c (extract_signed_bitfield): Remove.
978         (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
979         (aarch64_relocate_instruction): Likewise.
980         (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
981         (struct aarch64_insn_visitor): Likewise.
982
983 2015-10-12  Yao Qi  <yao.qi@linaro.org>
984
985         * linux-aarch64-low.c (struct aarch64_insn_data): New.
986         (struct aarch64_insn_visitor): New.
987         (struct aarch64_insn_relocation_data): New.
988         (aarch64_ftrace_insn_reloc_b): New function.
989         (aarch64_ftrace_insn_reloc_b_cond): Likewise.
990         (aarch64_ftrace_insn_reloc_cb): Likewise.
991         (aarch64_ftrace_insn_reloc_tb): Likewise.
992         (aarch64_ftrace_insn_reloc_adr): Likewise.
993         (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
994         (aarch64_ftrace_insn_reloc_others): Likewise.
995         (visitor): New.
996         (aarch64_relocate_instruction): Use visitor.
997
998 2015-10-12  Yao Qi  <yao.qi@linaro.org>
999
1000         * linux-aarch64-low.c (aarch64_relocate_instruction): Return
1001         int.  Add argument buf.
1002         (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
1003         aarch64_relocate_instruction.
1004
1005 2015-10-12  Yao Qi  <yao.qi@linaro.org>
1006
1007         * linux-aarch64-low.c (aarch64_relocate_instruction): Add
1008         argument insn.  Remove local variable insn.  Don't call
1009         target_read_uint32.
1010         (aarch64_install_fast_tracepoint_jump_pad): Call
1011         target_read_uint32.
1012
1013 2015-09-30  Yao Qi  <yao.qi@linaro.org>
1014
1015         * linux-aarch64-low.c (emit_movk): Shorten a long line.
1016         (emit_load_store_pair): Likewise.
1017
1018 2015-09-25  Simon Marchi  <simon.marchi@ericsson.com>
1019
1020         * dll.c (match_dll): Add cast(s).
1021         (unloaded_dll): Likewise.
1022         * linux-low.c (second_thread_of_pid_p): Likewise.
1023         (delete_lwp_callback): Likewise.
1024         (count_events_callback): Likewise.
1025         (select_event_lwp_callback): Likewise.
1026         (linux_set_resume_request): Likewise.
1027         * server.c (accumulate_file_name_length): Likewise.
1028         (emit_dll_description): Likewise.
1029         (handle_qxfer_threads_worker): Likewise.
1030         (visit_actioned_threads): Likewise.
1031         * thread-db.c (any_thread_of): Likewise.
1032         * tracepoint.c (same_process_p): Likewise.
1033         (match_blocktype): Likewise.
1034         (build_traceframe_info_xml): Likewise.
1035
1036 2015-09-25  Simon Marchi  <simon.marchi@ericsson.com>
1037
1038         * ax.c (gdb_parse_agent_expr): Add cast to allocation result
1039         assignment.
1040         (gdb_unparse_agent_expr): Likewise.
1041         * hostio.c (require_data): Likewise.
1042         (handle_pread): Likewise.
1043         * linux-low.c (disable_regset): Likewise.
1044         (fetch_register): Likewise.
1045         (store_register): Likewise.
1046         (get_dynamic): Likewise.
1047         (linux_qxfer_libraries_svr4): Likewise.
1048         * mem-break.c (delete_fast_tracepoint_jump): Likewise.
1049         (set_fast_tracepoint_jump): Likewise.
1050         (uninsert_fast_tracepoint_jumps_at): Likewise.
1051         (reinsert_fast_tracepoint_jumps_at): Likewise.
1052         (validate_inserted_breakpoint): Likewise.
1053         (clone_agent_expr): Likewise.
1054         * regcache.c (init_register_cache): Likewise.
1055         * remote-utils.c (putpkt_binary_1): Likewise.
1056         (decode_M_packet): Likewise.
1057         (decode_X_packet): Likewise.
1058         (look_up_one_symbol): Likewise.
1059         (relocate_instruction): Likewise.
1060         (monitor_output): Likewise.
1061         * server.c (handle_search_memory): Likewise.
1062         (handle_qxfer_exec_file): Likewise.
1063         (handle_qxfer_libraries): Likewise.
1064         (handle_qxfer): Likewise.
1065         (handle_query): Likewise.
1066         (handle_v_cont): Likewise.
1067         (handle_v_run): Likewise.
1068         (captured_main): Likewise.
1069         * target.c (write_inferior_memory): Likewise.
1070         * thread-db.c (try_thread_db_load_from_dir): Likewise.
1071         * tracepoint.c (init_trace_buffer): Likewise.
1072         (add_tracepoint_action): Likewise.
1073         (add_traceframe): Likewise.
1074         (add_traceframe_block): Likewise.
1075         (cmd_qtdpsrc): Likewise.
1076         (cmd_qtdv): Likewise.
1077         (cmd_qtstatus): Likewise.
1078         (response_source): Likewise.
1079         (response_tsv): Likewise.
1080         (cmd_qtnotes): Likewise.
1081         (gdb_collect): Likewise.
1082         (initialize_tracepoint): Likewise.
1083
1084 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
1085
1086         * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
1087         (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
1088         <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
1089         <NOP>: New.
1090         (enum aarch64_condition_codes): New enum.
1091         (w0): New static global.
1092         (fp): Likewise.
1093         (lr): Likewise.
1094         (struct aarch64_memory_operand) <type>: New
1095         MEMORY_OPERAND_POSTINDEX type.
1096         (postindex_memory_operand): New helper function.
1097         (emit_ret): New function.
1098         (emit_load_store_pair): New function, factored out of emit_stp
1099         with support for MEMORY_OPERAND_POSTINDEX.
1100         (emit_stp): Rewrite using emit_load_store_pair.
1101         (emit_ldp): New function.
1102         (emit_load_store): Likewise.
1103         (emit_ldr): Mention post-index instruction in comment.
1104         (emit_ldrh): New function.
1105         (emit_ldrb): New function.
1106         (emit_ldrsw): Mention post-index instruction in comment.
1107         (emit_str): Likewise.
1108         (emit_subs): New function.
1109         (emit_cmp): Likewise.
1110         (emit_and): Likewise.
1111         (emit_orr): Likewise.
1112         (emit_orn): Likewise.
1113         (emit_eor): Likewise.
1114         (emit_mvn): Likewise.
1115         (emit_lslv): Likewise.
1116         (emit_lsrv): Likewise.
1117         (emit_asrv): Likewise.
1118         (emit_mul): Likewise.
1119         (emit_sbfm): Likewise.
1120         (emit_sbfx): Likewise.
1121         (emit_ubfm): Likewise.
1122         (emit_ubfx): Likewise.
1123         (emit_csinc): Likewise.
1124         (emit_cset): Likewise.
1125         (emit_nop): Likewise.
1126         (emit_ops_insns): New helper function.
1127         (emit_pop): Likewise.
1128         (emit_push): Likewise.
1129         (aarch64_emit_prologue): New function.
1130         (aarch64_emit_epilogue): Likewise.
1131         (aarch64_emit_add): Likewise.
1132         (aarch64_emit_sub): Likewise.
1133         (aarch64_emit_mul): Likewise.
1134         (aarch64_emit_lsh): Likewise.
1135         (aarch64_emit_rsh_signed): Likewise.
1136         (aarch64_emit_rsh_unsigned): Likewise.
1137         (aarch64_emit_ext): Likewise.
1138         (aarch64_emit_log_not): Likewise.
1139         (aarch64_emit_bit_and): Likewise.
1140         (aarch64_emit_bit_or): Likewise.
1141         (aarch64_emit_bit_xor): Likewise.
1142         (aarch64_emit_bit_not): Likewise.
1143         (aarch64_emit_equal): Likewise.
1144         (aarch64_emit_less_signed): Likewise.
1145         (aarch64_emit_less_unsigned): Likewise.
1146         (aarch64_emit_ref): Likewise.
1147         (aarch64_emit_if_goto): Likewise.
1148         (aarch64_emit_goto): Likewise.
1149         (aarch64_write_goto_address): Likewise.
1150         (aarch64_emit_const): Likewise.
1151         (aarch64_emit_call): Likewise.
1152         (aarch64_emit_reg): Likewise.
1153         (aarch64_emit_pop): Likewise.
1154         (aarch64_emit_stack_flush): Likewise.
1155         (aarch64_emit_zero_ext): Likewise.
1156         (aarch64_emit_swap): Likewise.
1157         (aarch64_emit_stack_adjust): Likewise.
1158         (aarch64_emit_int_call_1): Likewise.
1159         (aarch64_emit_void_call_2): Likewise.
1160         (aarch64_emit_eq_goto): Likewise.
1161         (aarch64_emit_ne_goto): Likewise.
1162         (aarch64_emit_lt_goto): Likewise.
1163         (aarch64_emit_le_goto): Likewise.
1164         (aarch64_emit_gt_goto): Likewise.
1165         (aarch64_emit_ge_got): Likewise.
1166         (aarch64_emit_ops_impl): New static global variable.
1167         (aarch64_emit_ops): New target function, return
1168         &aarch64_emit_ops_impl.
1169         (struct linux_target_ops): Install it.
1170
1171 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
1172
1173         * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
1174         * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
1175         aarch64-ipa.o.
1176         * linux-aarch64-ipa.c: New file.
1177         * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
1178         and endian.h.
1179         (aarch64_get_thread_area): New target method.
1180         (extract_signed_bitfield): New helper function.
1181         (aarch64_decode_ldr_literal): New function.
1182         (enum aarch64_opcodes): New enum.
1183         (struct aarch64_register): New struct.
1184         (struct aarch64_operand): New struct.
1185         (x0): New static global.
1186         (x1): Likewise.
1187         (x2): Likewise.
1188         (x3): Likewise.
1189         (x4): Likewise.
1190         (w2): Likewise.
1191         (ip0): Likewise.
1192         (sp): Likewise.
1193         (xzr): Likewise.
1194         (aarch64_register): New helper function.
1195         (register_operand): Likewise.
1196         (immediate_operand): Likewise.
1197         (struct aarch64_memory_operand): New struct.
1198         (offset_memory_operand): New helper function.
1199         (preindex_memory_operand): Likewise.
1200         (enum aarch64_system_control_registers): New enum.
1201         (ENCODE): New macro.
1202         (emit_insn): New helper function.
1203         (emit_b): New function.
1204         (emit_bcond): Likewise.
1205         (emit_cb): Likewise.
1206         (emit_tb): Likewise.
1207         (emit_blr): Likewise.
1208         (emit_stp): Likewise.
1209         (emit_ldp_q_offset): Likewise.
1210         (emit_stp_q_offset): Likewise.
1211         (emit_load_store): Likewise.
1212         (emit_ldr): Likewise.
1213         (emit_ldrsw): Likewise.
1214         (emit_str): Likewise.
1215         (emit_ldaxr): Likewise.
1216         (emit_stxr): Likewise.
1217         (emit_stlr): Likewise.
1218         (emit_data_processing_reg): Likewise.
1219         (emit_data_processing): Likewise.
1220         (emit_add): Likewise.
1221         (emit_sub): Likewise.
1222         (emit_mov): Likewise.
1223         (emit_movk): Likewise.
1224         (emit_mov_addr): Likewise.
1225         (emit_mrs): Likewise.
1226         (emit_msr): Likewise.
1227         (emit_sevl): Likewise.
1228         (emit_wfe): Likewise.
1229         (append_insns): Likewise.
1230         (can_encode_int32_in): New helper function.
1231         (aarch64_relocate_instruction): New function.
1232         (aarch64_install_fast_tracepoint_jump_pad): Likewise.
1233         (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
1234         (struct linux_target_ops): Install aarch64_get_thread_area,
1235         aarch64_install_fast_tracepoint_jump_pad and
1236         aarch64_get_min_fast_tracepoint_insn_len.
1237
1238 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
1239
1240         * Makefile.in (aarch64-insn.o): New rule.
1241         * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
1242
1243 2015-09-21  Yao Qi  <yao.qi@linaro.org>
1244
1245         * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
1246
1247 2015-09-21  Yao Qi  <yao.qi@linaro.org>
1248
1249         * tracepoint.c (max_jump_pad_size): Remove.
1250
1251 2015-09-18  Yao Qi  <yao.qi@linaro.org>
1252
1253         * linux-aarch64-low.c: Don't include sys/uio.h.
1254         (ps_get_thread_area): Call aarch64_ps_get_thread_area.
1255
1256 2015-09-16  Wei-cheng Wang  <cole945@gmail.com>
1257
1258         * tracepoint.c (eval_result_type): Change prototype.
1259         (condition_true_at_tracepoint): Fix argument to compiled_cond.
1260
1261 2015-09-15  Pedro Alves  <palves@redhat.com>
1262
1263         * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
1264         Check whether to report exec events instead of checking whether
1265         multiprocess is enabled.
1266
1267 2015-09-15  Pedro Alves  <palves@redhat.com>
1268
1269         PR remote/18965
1270         * remote-utils.c (prepare_resume_reply): Merge
1271         TARGET_WAITKIND_VFORK_DONE switch case with the
1272         TARGET_WAITKIND_FORKED case.
1273
1274 2015-09-15  Yao Qi  <yao.qi@linaro.org>
1275
1276         * server.c (handle_query): Check string comparison using
1277         "else if" instead of "if".
1278
1279 2015-09-15  Yao Qi  <yao.qi@linaro.org>
1280
1281         * server.c (vCont_supported): New global variable.
1282         (handle_query): Set vCont_supported to 1 if "vContSupported+"
1283         matches.  Append ";vContSupported+" to own_buf.
1284         (handle_v_requests): Append ";s;S" to own_buf if target supports
1285         hardware single step or vCont_supported is false.
1286         (capture_main): Set vCont_supported to zero.
1287
1288 2015-09-15  Yao Qi  <yao.qi@linaro.org>
1289
1290         * linux-low.c (linux_supports_conditional_breakpoints): Rename
1291         it to ...
1292         (linux_supports_hardware_single_step): ... New function.
1293         (linux_target_ops): Update.
1294         * lynx-low.c (lynx_target_ops): Set field
1295         supports_hardware_single_step to target_can_do_hardware_single_step.
1296         * nto-low.c (nto_target_ops): Likewise.
1297         * spu-low.c (spu_target_ops): Likewise.
1298         * win32-low.c (win32_target_ops): Likewise.
1299         * target.c (target_can_do_hardware_single_step): New function.
1300         * target.h (struct target_ops) <supports_conditional_breakpoints>:
1301         Remove.  <supports_hardware_single_step>: New field.
1302         (target_supports_conditional_breakpoints): Remove.
1303         (target_supports_hardware_single_step): New macro.
1304         (target_can_do_hardware_single_step): Declare.
1305         * server.c (handle_query): Use target_supports_hardware_single_step
1306         instead of target_supports_conditional_breakpoints.
1307
1308 2015-09-15  Yao Qi  <yao.qi@linaro.org>
1309
1310         * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
1311         function.
1312         (struct linux_target_ops the_low_target): Install
1313         aarch64_linux_siginfo_fixup.
1314
1315 2015-09-11  Don Breazeal  <donb@codesourcery.com>
1316             Luis Machado  <lgustavo@codesourcery.com>
1317
1318         * linux-low.c (linux_mourn): Static declaration.
1319         (linux_arch_setup): Move in front of
1320         handle_extended_wait.
1321         (linux_arch_setup_thread): New function.
1322         (handle_extended_wait): Handle exec events.  Call
1323         linux_arch_setup_thread.  Make event_lwp argument a
1324         pointer-to-a-pointer.
1325         (check_zombie_leaders): Do not check stopped threads.
1326         (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
1327         (linux_low_filter_event): Add lwp and thread for exec'ing
1328         non-leader thread if leader thread has been deleted.
1329         Refactor code into linux_arch_setup_thread and call it.
1330         Pass child lwp pointer by reference to handle_extended_wait.
1331         (linux_wait_for_event_filtered): Update comment.
1332         (linux_wait_1): Prevent clobbering exec event status.
1333         (linux_supports_exec_events): New function.
1334         (linux_target_ops) <supports_exec_events>: Initialize new member.
1335         * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
1336         new member.
1337         * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
1338         * server.c (report_exec_events): New global variable.
1339         (handle_query): Handle qSupported query for exec-events feature.
1340         (captured_main): Initialize report_exec_events.
1341         * server.h (report_exec_events): Declare new global variable.
1342         * target.h (struct target_ops) <supports_exec_events>: New
1343         member.
1344         (target_supports_exec_events): New macro.
1345         * win32-low.c (win32_target_ops) <supports_exec_events>:
1346         Initialize new member.
1347
1348 2015-09-09  Markus Metzger  <markus.t.metzger@intel.com>
1349
1350         * linux-low.c (linux_low_enable_btrace): Remove.
1351         (linux_target_ops): Replace linux_low_enable_btrace with
1352         linux_enable_btrace.
1353
1354 2015-09-03  Yao Qi  <yao.qi@linaro.org>
1355
1356         * linux-aarch64-low.c (aarch64_insert_point): Call
1357         aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
1358         returns true.
1359
1360 2015-08-27  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1361
1362         * linux-low.c (check_stopped_by_breakpoint): Use
1363         GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
1364
1365 2015-08-27  Pedro Alves  <palves@redhat.com>
1366
1367         * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
1368
1369 2015-08-26  Simon Marchi  <simon.marchi@ericsson.com>
1370
1371         * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
1372         the XNEW-family equivalent.
1373         (compile_bytecodes): Likewise.
1374         * dll.c (loaded_dll): Likewise.
1375         * event-loop.c (append_callback_event): Likewise.
1376         (create_file_handler): Likewise.
1377         (create_file_event): Likewise.
1378         * hostio.c (handle_open): Likewise.
1379         * inferiors.c (add_thread): Likewise.
1380         (add_process): Likewise.
1381         * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
1382         * linux-arm-low.c (arm_new_process): Likewise.
1383         (arm_new_thread): Likewise.
1384         * linux-low.c (add_to_pid_list): Likewise.
1385         (linux_add_process): Likewise.
1386         (handle_extended_wait): Likewise.
1387         (add_lwp): Likewise.
1388         (enqueue_one_deferred_signal): Likewise.
1389         (enqueue_pending_signal): Likewise.
1390         (linux_resume_one_lwp_throw): Likewise.
1391         (linux_resume_one_thread): Likewise.
1392         (linux_read_memory): Likewise.
1393         (linux_write_memory): Likewise.
1394         * linux-mips-low.c (mips_linux_new_process): Likewise.
1395         (mips_linux_new_thread): Likewise.
1396         (mips_add_watchpoint): Likewise.
1397         * linux-x86-low.c (initialize_low_arch): Likewise.
1398         * lynx-low.c (lynx_add_process): Likewise.
1399         * mem-break.c (set_raw_breakpoint_at): Likewise.
1400         (set_breakpoint): Likewise.
1401         (add_condition_to_breakpoint): Likewise.
1402         (add_commands_to_breakpoint): Likewise.
1403         (clone_agent_expr): Likewise.
1404         (clone_one_breakpoint): Likewise.
1405         * regcache.c (new_register_cache): Likewise.
1406         * remote-utils.c (look_up_one_symbol): Likewise.
1407         * server.c (queue_stop_reply): Likewise.
1408         (start_inferior): Likewise.
1409         (queue_stop_reply_callback): Likewise.
1410         (handle_target_event): Likewise.
1411         * spu-low.c (fetch_ppc_memory): Likewise.
1412         (store_ppc_memory): Likewise.
1413         * target.c (set_target_ops): Likewise.
1414         * thread-db.c (thread_db_load_search): Likewise.
1415         (try_thread_db_load_1): Likewise.
1416         * tracepoint.c (add_tracepoint): Likewise.
1417         (add_tracepoint_action): Likewise.
1418         (create_trace_state_variable): Likewise.
1419         (cmd_qtdpsrc): Likewise.
1420         (cmd_qtro): Likewise.
1421         (add_while_stepping_state): Likewise.
1422         * win32-low.c (child_add_thread): Likewise.
1423         (get_image_name): Likewise.
1424
1425 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1426
1427         * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
1428
1429 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1430
1431         * Makefile.in (aarch64-linux.o): New rule.
1432         * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
1433         srv_tgtobj.
1434         * linux-aarch64-low.c: Include nat/aarch64-linux.h.
1435         (aarch64_init_debug_reg_state): Make it extern.
1436         (aarch64_linux_prepare_to_resume): Remove.
1437
1438 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1439
1440         * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
1441         lwp_arch_private_info and ptid_of_lwp.
1442
1443 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1444
1445         * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
1446         Find proc_info by find_process_pid.  All callers updated.
1447
1448 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1449
1450         * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
1451         Remove.
1452         (debug_reg_change_callback): Remove.
1453         (aarch64_notify_debug_reg_change): Remove.
1454
1455 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1456
1457         * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
1458         Call current_lwp_ptid.
1459
1460 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1461
1462         * linux-aarch64-low.c (debug_reg_change_callback): Use
1463         debug_printf.
1464
1465 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1466
1467         * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
1468
1469 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1470
1471         * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
1472
1473 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1474
1475         * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
1476         the code.
1477
1478 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1479
1480         * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
1481         Remove.
1482         (debug_reg_change_callback): Remove argument entry and add argument
1483         lwp.  Remove local variable thread.  Don't print thread id in the
1484         debugging output.  Don't check whether pid of thread equals to pid.
1485         (aarch64_notify_debug_reg_change): Don't set param.pid.  Call
1486         iterate_over_lwps instead find_inferior.
1487
1488 2015-08-24  Pedro Alves  <palves@redhat.com>
1489
1490         * inferiors.c (get_first_process): New function.
1491         * inferiors.h (get_first_process): New declaration.
1492         * remote-utils.c (read_ptid): Default to the first process in the
1493         list, instead of to the current thread's process.
1494
1495 2015-08-24  Pedro Alves  <palves@redhat.com>
1496
1497         * debug.c: Include gdb_sys_time.h instead of sys/time.h.
1498         * event-loop.c: Likewise.
1499         * remote-utils.c: Likewise.
1500         * tracepoint.c: Likewise.
1501
1502 2015-08-24  Pedro Alves  <palves@redhat.com>
1503
1504         * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
1505         ptid_get_lwp.
1506
1507 2015-08-21  Pedro Alves  <palves@redhat.com>
1508
1509         * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
1510         instead of literal 1.
1511
1512 2015-08-21  Pedro Alves  <palves@redhat.com>
1513
1514         * tdesc.c (default_description): Explicitly zero-initialize.
1515
1516 2015-08-21  Pedro Alves  <palves@redhat.com>
1517
1518         PR gdb/18749
1519         * inferiors.c (remove_thread): Discard any pending stop reply for
1520         this thread.
1521         * server.c (remove_all_on_match_pid): Rename to ...
1522         (remove_all_on_match_ptid): ... this.  Work with a filter ptid
1523         instead of a pid.
1524         (discard_queued_stop_replies): Change parameter to a ptid.  Now
1525         extern.
1526         (handle_v_kill, kill_inferior_callback, captured_main)
1527         (process_serial_event): Adjust.
1528         * server.h (discard_queued_stop_replies): Declare.
1529
1530 2015-08-21  Pedro Alves  <palves@redhat.com>
1531
1532         * linux-low.c (wait_for_sigstop): Always switch to no thread
1533         selected if the previously current thread dies.
1534         * lynx-low.c (lynx_request_interrupt): Use the first thread's
1535         process instead of the current thread's.
1536         * remote-utils.c (input_interrupt): Don't check if there's no
1537         current thread.
1538         * server.c (gdb_read_memory, gdb_write_memory): If setting the
1539         current thread to the general thread fails, error out.
1540         (handle_qxfer_auxv, handle_qxfer_libraries)
1541         (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
1542         (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
1543         (handle_query): Check if there's a thread selected instead of
1544         checking whether there's any thread in the thread list.
1545         (handle_qxfer_threads, handle_qxfer_btrace)
1546         (handle_qxfer_btrace_conf): Don't error out early if there's no
1547         thread in the thread list.
1548         (handle_v_cont, myresume): Don't set the current thread to the
1549         continue thread.
1550         (process_serial_event) <Hg handling>: Also set thread_id if the
1551         previous general thread is still alive.
1552         (process_serial_event) <g/G handling>: If setting the current
1553         thread to the general thread fails, error out.
1554         * spu-low.c (spu_resume, spu_request_interrupt): Use the first
1555         thread's lwp instead of the current thread's.
1556         * target.c (set_desired_thread): If the desired thread was not
1557         found, leave the current thread pointing to NULL.  Return an int
1558         (boolean) indicating success.
1559         * target.h (set_desired_thread): Change return type to int.
1560
1561 2015-08-20  Max Filippov  <jcmvbkbc@gmail.com>
1562
1563         * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
1564         * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
1565         #includes.
1566         (ps_get_thread_area): New function.
1567
1568 2015-08-19  Gary Benson  <gbenson@redhat.com>
1569
1570         * hostio.c (handle_pread): Do not attempt to read more data
1571         than hostio_reply_with_data can fit in a packet.
1572
1573 2015-08-18  Joel Brobecker  <brobecker@adacore.com>
1574
1575         * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
1576
1577 2015-08-14  Matthew Fortune  <matthew.fortune@imgtec.com>
1578
1579         * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
1580
1581 2015-08-06  Pedro Alves  <palves@redhat.com>
1582
1583         * tracepoint.c (expr_eval_result): Now an int.
1584
1585 2015-08-06  Pedro Alves  <palves@redhat.com>
1586
1587         * gdbthread.h (struct regcache): Forward declare.
1588         (struct thread_info) <regcache_data>: Now a struct regcache
1589         pointer.
1590         * inferiors.c (inferior_regcache_data)
1591         (set_inferior_regcache_data): Now work with struct regcache
1592         pointers.
1593         * inferiors.h (struct regcache): Forward declare.
1594         (inferior_regcache_data, set_inferior_regcache_data): Now work
1595         with struct regcache pointers.
1596         * regcache.c (get_thread_regcache, regcache_invalidate_thread)
1597         (free_register_cache_thread): Remove struct regcache pointer
1598         casts.
1599
1600 2015-08-06  Pedro Alves  <palves@redhat.com>
1601
1602         * server.c (captured_main): On error, print the exception message
1603         to stderr, and if run_once is set, throw a quit.
1604
1605 2015-08-06  Pedro Alves  <palves@redhat.com>
1606
1607         * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
1608         the current thread.
1609
1610 2015-08-06  Pedro Alves  <palves@redhat.com>
1611
1612         * linux-low.c (linux_write_memory): Rewrite debug output to avoid
1613         reading beyond the passed in buffer length.
1614
1615 2015-08-06  Pierre Langlois  <pierre.langlois@arm.com>
1616
1617         * tracepoint.c (symbol_list) <required>: Remove.
1618
1619 2015-08-06  Pedro Alves  <palves@redhat.com>
1620
1621         * linux-low.c (handle_extended_wait): Set the fork child's suspend
1622         count if stopping and suspending threads.
1623         (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1624         stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1625         (linux_detach): Complete an ongoing step-over.
1626         (lwp_suspended_inc, lwp_suspended_decr): New functions.  Use
1627         throughout.
1628         (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1629         (linux_wait_1): If passing a signal to the inferior after
1630         finishing a step-over, unsuspend and re-resume all lwps.  If we
1631         see a single-step event but the thread should be continuing, don't
1632         pass the trap to gdb.
1633         (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1634         internal_error instead of gdb_assert.
1635         (enqueue_pending_signal): New function.
1636         (check_ptrace_stopped_lwp_gone): Add debug output.
1637         (start_step_over): Use internal_error instead of gdb_assert.
1638         (complete_ongoing_step_over): New function.
1639         (linux_resume_one_thread): Don't resume a suspended thread.
1640         (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1641         it stepping.
1642
1643 2015-08-06  Pedro Alves  <palves@redhat.com>
1644
1645         * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1646         (linux_thread_alive): Use lwp_is_marked_dead.
1647         (extended_event_reported): Delete.
1648         (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1649         instead of extended_event_reported.
1650         (mark_lwp_dead): Don't set the 'dead' flag.  Store the waitstatus
1651         as well.
1652         (lwp_is_marked_dead): New function.
1653         (lwp_running): Use lwp_is_marked_dead.
1654         * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1655         comment.
1656
1657 2015-08-06  Pedro Alves  <palves@redhat.com>
1658
1659         * linux-low.c (linux_wait_1): Move fork event output out of the
1660         !report_to_gdb check.  Pass event_child->waitstatus to
1661         target_waitstatus_to_string instead of ourstatus.
1662
1663 2015-08-04  Yao Qi  <yao.qi@linaro.org>
1664
1665         * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1666         if current_thread is 32 bit.
1667
1668 2015-08-04  Yao Qi  <yao.qi@linaro.org>
1669
1670         * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1671         0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1672         * server.c (extended_protocol): Remove "static".
1673         * server.h (extended_protocol): Declare it.
1674
1675 2015-08-04  Yao Qi  <yao.qi@linaro.org>
1676
1677         * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1678         both aarch64 and aarch32.
1679         (aarch64_set_pc): Likewise.
1680
1681 2015-08-04  Yao Qi  <yao.qi@linaro.org>
1682
1683         * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1684         to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1685         arm-with-neon.xml to srv_xmlfiles.
1686         * linux-aarch64-low.c: Include linux-aarch32-low.h.
1687         (is_64bit_tdesc): New function.
1688         (aarch64_linux_read_description): New function.
1689         (aarch64_arch_setup): Call aarch64_linux_read_description.
1690         (regs_info): Rename to regs_info_aarch64.
1691         (aarch64_regs_info): Return right regs_info.
1692         (initialize_low_arch): Call initialize_low_arch_aarch32.
1693
1694 2015-08-04  Yao Qi  <yao.qi@linaro.org>
1695
1696         * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1697         * linux-aarch32-low.c: New file.
1698         * linux-aarch32-low.h: New file.
1699         * linux-arm-low.c (arm_fill_gregset): Move it to
1700         linux-aarch32-low.c.
1701         (arm_store_gregset): Likewise.
1702         (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1703         (arm_store_vfpregset): Call arm_store_vfpregset_num.
1704         (arm_arch_setup): Check if PTRACE_GETREGSET works.
1705         (regs_info): Rename to regs_info_arm.
1706         (arm_regs_info): Return regs_info_aarch32 if
1707         have_ptrace_getregset is 1 and target description is
1708         arm_with_neon or arm_with_vfpv3.
1709         (initialize_low_arch): Don't call init_registers_arm_with_neon.
1710         Call initialize_low_arch_aarch32 instead.
1711
1712 2015-08-04  Yao Qi  <yao.qi@linaro.org>
1713
1714         * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1715         * linux-low.c: ... here.
1716         * linux-low.h (have_ptrace_getregset): Declare it.
1717
1718 2015-08-04  Pedro Alves  <palves@redhat.com>
1719
1720         * thread-db.c (struct thread_db): Use new typedefs.
1721         (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1722         CHK calls.
1723         (disable_thread_event_reporting): Cast result of dlsym to
1724         destination function pointer type.
1725         (thread_db_mourn): Use td_ta_delete_ftype.
1726
1727 2015-08-03  Sandra Loosemore  <sandra@codesourcery.com>
1728
1729         * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1730         arch variant.
1731         (CDX_BREAKPOINT): Define for R2.
1732         (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1733         (the_low_target): Add comments.
1734
1735 2015-07-30  Yao Qi  <yao.qi@linaro.org>
1736
1737         * linux-arm-low.c (arm_hwcap): Remove it.
1738         (arm_read_description): New local variable arm_hwcap.  Don't
1739         set arm_hwcap to zero.
1740
1741 2015-07-30  Yao Qi  <yao.qi@linaro.org>
1742
1743         * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1744         Use regcache->tdesc instead.
1745         (arm_store_wmmxregset): Likewise.
1746         (arm_fill_vfpregset): Likewise.
1747         (arm_store_vfpregset): Likewise.
1748
1749 2015-07-30  Yao Qi  <yao.qi@linaro.org>
1750
1751         * linux-arm-low.c: Include arch/arm.h.
1752         (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1753         (arm_store_gregset): Likewise.
1754
1755 2015-07-29  Simon Marchi  <simon.marchi@ericsson.com>
1756
1757         * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1758         ptrace's 4th parameter.
1759
1760 2015-07-27  Yao Qi  <yao.qi@linaro.org>
1761
1762         * configure.srv (case aarch64*-*-linux*): Don't set
1763         srv_linux_usrregs.
1764
1765 2015-07-24  Pedro Alves  <palves@redhat.c: Likewise.om>
1766
1767         * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1768         sys/ptrace.h.
1769         * linux-arm-low.c: Likewise.
1770         * linux-cris-low.c: Likewise.
1771         * linux-crisv32-low.c: Likewise.
1772         * linux-low.c: Likewise.
1773         * linux-m68k-low.c: Likewise.
1774         * linux-mips-low.c: Likewise.
1775         * linux-nios2-low.c: Likewise.
1776         * linux-s390-low.c: Likewise.
1777         * linux-sparc-low.c: Likewise.
1778         * linux-tic6x-low.c: Likewise.
1779         * linux-tile-low.c: Likewise.
1780         * linux-x86-low.c: Likewise.
1781
1782 2015-07-24  Pedro Alves  <palves@redhat.com>
1783
1784         * config.in: Regenerate.
1785         * configure: Regenerate.
1786
1787 2015-07-24  Pedro Alves  <palves@redhat.com>
1788
1789         * acinclude.m4: Include ../ptrace.m4.
1790         * configure.ac: Call GDB_AC_PTRACE.
1791         * config.in, configure: Regenerate.
1792
1793 2015-07-24  Yao Qi  <yao.qi@linaro.org>
1794
1795         * linux-low.c (linux_create_inferior): Remove setting to
1796         proc->priv->new_inferior.
1797         (linux_attach): Likewise.
1798         (linux_low_filter_event): Likewise.
1799         * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1800
1801 2015-07-24  Yao Qi  <yao.qi@linaro.org>
1802
1803         * linux-low.c (linux_arch_setup): New function.
1804         (linux_low_filter_event): If proc->tdesc is NULL and
1805         proc->attached is true, call the_low_target.arch_setup.
1806         Otherwise, keep status pending, and return.
1807         (linux_resume_one_lwp_throw): Don't call get_pc if
1808         thread->while_stepping isn't NULL.  Don't call
1809         get_thread_regcache if proc->tdesc is NULL.
1810         (need_step_over_p): Return 0 if proc->tdesc is NULL.
1811         (linux_target_ops): Install arch_setup.
1812         * server.c (start_inferior): Call the_target->arch_setup.
1813         * target.h (struct target_ops) <arch_setup>: New field.
1814         (target_arch_setup): New marco.
1815         * lynx-low.c (lynx_target_ops): Update.
1816         * nto-low.c (nto_target_ops): Update.
1817         * spu-low.c (spu_target_ops): Update.
1818         * win32-low.c (win32_target_ops): Update.
1819
1820 2015-07-24  Yao Qi  <yao.qi@linaro.org>
1821
1822         * linux-low.c (linux_add_process): Don't set
1823         proc->priv->new_inferior.
1824         (linux_create_inferior): Set proc->priv->new_inferior to 1.
1825         (linux_attach): Likewise.
1826
1827 2015-07-24  Yao Qi  <yao.qi@linaro.org>
1828
1829         * server.c (start_inferior): Code refactor.
1830
1831 2015-07-24  Yao Qi  <yao.qi@linaro.org>
1832
1833         * server.c (process_serial_event): Set general_thread.
1834
1835 2015-07-21  Yao Qi  <yao.qi@linaro.org>
1836
1837         * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1838         aarch64_linux_get_debug_reg_capacity.
1839
1840 2015-07-17  Yao Qi  <yao.qi@linaro.org>
1841
1842         * Makefile.in (aarch64-linux-hw-point.o): New rule.
1843         * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1844         * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1845         (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1846         (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1847         (AARCH64_HWP_ALIGNMENT): Likewise.
1848         (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1849         (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1850         (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1851         (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1852         (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1853         (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1854         (struct aarch64_debug_reg_state): Likewise.
1855         (struct arch_lwp_info): Likewise.
1856         (aarch64_align_watchpoint): Likewise.
1857         (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1858         (aarch64_watchpoint_length): Likewise.
1859         (aarch64_point_encode_ctrl_reg): Likewise
1860         (aarch64_point_is_aligned): Likewise.
1861         (aarch64_align_watchpoint): Likewise.
1862         (aarch64_linux_set_debug_regs):
1863         (aarch64_dr_state_insert_one_point): Likewise.
1864         (aarch64_dr_state_remove_one_point): Likewise.
1865         (aarch64_handle_breakpoint): Likewise.
1866         (aarch64_handle_aligned_watchpoint): Likewise.
1867         (aarch64_handle_unaligned_watchpoint): Likewise.
1868         (aarch64_handle_watchpoint): Likewise.
1869
1870 2015-07-17  Yao Qi  <yao.qi@linaro.org>
1871
1872         * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1873         and don't aarch64_get_debug_reg_state.  All callers update.
1874         (aarch64_handle_aligned_watchpoint): Likewise.
1875         (aarch64_handle_unaligned_watchpoint): Likewise.
1876         (aarch64_handle_watchpoint): Likewise.
1877         (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1878         (aarch64_remove_point): Likewise.
1879
1880 2015-07-17  Yao Qi  <yao.qi@linaro.org>
1881
1882         * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1883         debug_printf.
1884         (aarch64_handle_unaligned_watchpoint): Likewise.
1885
1886 2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
1887
1888         Revert the previous 3 commits:
1889         Move gdb_regex* to common/
1890         Move linux_find_memory_regions_full & co.
1891         gdbserver build-id attribute generator
1892
1893 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
1894             Jan Kratochvil  <jan.kratochvil@redhat.com>
1895
1896         gdbserver build-id attribute generator.
1897         * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1898         (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1899         (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1900         (find_phdr): New.
1901         (get_dynamic): Use find_pdhr to traverse program headers.
1902         (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1903         (compare_mapping_entry_range, struct find_memory_region_callback_data)
1904         (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1905         (get_hex_build_id): New.
1906         (linux_qxfer_libraries_svr4): Add optional build-id attribute
1907         to reply XML document.
1908
1909 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
1910             Jan Kratochvil  <jan.kratochvil@redhat.com>
1911
1912         * target.c: Include target/target-utils.h and fcntl.h.
1913         (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1914         (target_fileio_read_stralloc): New functions.
1915
1916 2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
1917
1918         * Makefile.in (OBS): Add gdb_regex.o.
1919         (gdb_regex.o): New.
1920         * config.in: Rebuilt.
1921         * configure: Rebuilt.
1922
1923 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
1924             Jan Kratochvil  <jan.kratochvil@redhat.com>
1925
1926         Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1927         * Makefile.in (OBS): Add target-utils.o.
1928         (linux-maps.o, target-utils.o): New.
1929         * configure.srv (srv_linux_obj): Add linux-maps.o.
1930
1931 2015-07-15  Pierre Langlois  <pierre.langlois@arm.com>
1932
1933         * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1934         function, return 1.
1935         (the_low_target): Install it.
1936
1937 2015-07-14  Pedro Alves  <palves@redhat.com>
1938
1939         * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1940         Instead, ignore ECHILD, and throw an error for other errnos.
1941
1942 2015-07-10  Pedro Alves  <palves@redhat.com>
1943
1944         * event-loop.c (struct callback_event) <data>: Change type to
1945         gdb_client_data instance instead of gdb_client_data pointer.
1946         (append_callback_event): Adjust.
1947
1948 2015-07-10  Pierre Langlois  <pierre.langlois@arm.com>
1949
1950         * linux-aarch64-low.c: Add comments for each linux_target_ops
1951         method.  Remove comments already covered in target_ops and
1952         linux_target_ops definitions.
1953         (the_low_target): Add comments for each unimplemented method.
1954
1955 2015-07-09  Yao Qi  <yao.qi@linaro.org>
1956
1957         * linux-aarch64-low.c (aarch64_regmap): Remove.
1958         (aarch64_usrregs_info): Remove.
1959         (regs_info): Set field usrregs to NULL.
1960
1961 2015-07-02  Markus Metzger  <markus.t.metzger@intel.com>
1962
1963         * linux-low.c: Include "rsp-low.h"
1964         (linux_low_encode_pt_config, linux_low_encode_raw): New.
1965         (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1966         (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1967         (handle_btrace_enable_pt): New.
1968         (handle_btrace_general_set): Support "pt".
1969         (handle_btrace_conf_general_set): Support "pt:size".
1970
1971 2015-06-29  Pierre Langlois  <pierre.langlois@arm.com>
1972
1973         * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1974         Z_PACKET_SW_BP.
1975
1976 2015-06-29  Pierre Langlois  <pierre.langlois@arm.com>
1977
1978         * linux-aarch64-low.c: Remove comment about endianness.
1979         (aarch64_breakpoint): Change type to gdb_byte[].  Set to "brk #0".
1980         (aarch64_breakpoint_at): Change type of insn to gdb_byte[].  Use
1981         memcmp.
1982
1983 2015-06-24  Gary Benson  <gbenson@redhat.com>
1984
1985         * linux-i386-ipa.c (stdint.h): Do not include.
1986         * lynx-i386-low.c (stdint.h): Likewise.
1987         * lynx-ppc-low.c (stdint.h): Likewise.
1988         * mem-break.c (stdint.h): Likewise.
1989         * thread-db.c (stdint.h): Likewise.
1990         * tracepoint.c (stdint.h): Likewise.
1991         * win32-low.c (stdint.h): Likewise.
1992
1993 2015-06-18  Simon Marchi  <simon.marchi@ericsson.com>
1994
1995         * server.c (write_qxfer_response): Update call to
1996         remote_escape_output.
1997
1998 2015-06-15  Aleksandar Ristovski  <aristovski@qnx.com
1999             Jan Kratochvil  <jan.kratochvil@redhat.com>
2000
2001         Merge multiple hex conversions.
2002         * gdbreplay.c (tohex): Rename to 'fromhex'.
2003         (logchar): Use fromhex.
2004
2005 2015-06-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
2006
2007         * server.c (handle_qxfer_libraries): Set `version' attribute for
2008         <library-list>.
2009
2010 2015-06-10  Gary Benson  <gbenson@redhat.com>
2011
2012         * target.h (struct target_ops) <multifs_open>: New field.
2013         <multifs_unlink>: Likewise.
2014         <multifs_readlink>: Likewise.
2015         * linux-low.c (nat/linux-namespaces.h): New include.
2016         (linux_target_ops): Initialize the_target->multifs_open,
2017         the_target->multifs_unlink and the_target->multifs_readlink.
2018         * hostio.h (hostio_handle_new_gdb_connection): New declaration.
2019         * hostio.c (hostio_fs_pid): New static variable.
2020         (hostio_handle_new_gdb_connection): New function.
2021         (handle_setfs): Likewise.
2022         (handle_open): Use the_target->multifs_open as appropriate.
2023         (handle_unlink): Use the_target->multifs_unlink as appropriate.
2024         (handle_readlink): Use the_target->multifs_readlink as
2025         appropriate.
2026         (handle_vFile): Handle vFile:setfs packets.
2027         * server.c (handle_query): Call hostio_handle_new_gdb_connection
2028         after target_handle_new_gdb_connection.
2029
2030 2015-06-10  Gary Benson  <gbenson@redhat.com>
2031
2032         * configure.ac (AC_CHECK_FUNCS): Add setns.
2033         * config.in: Regenerate.
2034         * configure: Likewise.
2035         * Makefile.in (SFILES): Add nat/linux-namespaces.c.
2036         (linux-namespaces.o): New rule.
2037         * configure.srv (srv_linux_obj): Add linux-namespaces.o.
2038
2039 2015-06-09  Gary Benson <gbenson@redhat.com>
2040
2041         * hostio.c (handle_open): Process mode argument with
2042         fileio_to_host_mode.
2043
2044 2015-06-01  Yao Qi  <yao.qi@linaro.org>
2045
2046         * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
2047         * linux-x86-low.c: Likewise.
2048
2049 2015-05-28  Don Breazeal  <donb@codesourcery.com>
2050
2051         * linux-low.c (handle_extended_wait): Initialize
2052         thread_info.last_resume_kind for new fork children.
2053
2054 2015-05-15  Pedro Alves  <palves@redhat.com>
2055
2056         * target.h (target_handle_new_gdb_connection): Rewrite using if
2057         wrapped in do/while.
2058
2059 2015-05-14  Joel Brobecker  <brobecker@adacore.com>
2060
2061         * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
2062         * configure, config.in: Regenerate.
2063         * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
2064         Declare typedef.
2065
2066 2015-05-12  Don Breazeal  <donb@codesourcery.com>
2067
2068         * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
2069         PTRACE_EVENT_VFORK_DONE.
2070         (linux_low_ptrace_options, extended_event_reported): Add vfork
2071         events.
2072         * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
2073         and "vforkdone" for RSP 'T' Stop Reply Packet.
2074         * server.h (report_vfork_events): Declare
2075         global variable.
2076
2077 2015-05-12  Don Breazeal  <donb@codesourcery.com>
2078
2079         * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
2080         (the_low_target) <new_fork>: Initialize new member.
2081         * linux-arm-low.c (arm_new_fork): New function.
2082         (the_low_target) <new_fork>: Initialize new member.
2083         * linux-low.c (handle_extended_wait): Call new target function
2084         new_fork.
2085         * linux-low.h (struct linux_target_ops) <new_fork>: New member.
2086         * linux-mips-low.c (mips_add_watchpoint): New function
2087         extracted from mips_insert_point.
2088         (the_low_target) <new_fork>: Initialize new member.
2089         (mips_linux_new_fork): New function.
2090         (mips_insert_point): Call mips_add_watchpoint.
2091         * linux-x86-low.c (x86_linux_new_fork): New function.
2092         (the_low_target) <new_fork>: Initialize new member.
2093
2094 2015-05-12  Don Breazeal  <donb@codesourcery.com>
2095
2096         * linux-low.c (handle_extended_wait): Implement return value,
2097         rename argument 'event_child' to 'event_lwp', handle
2098         PTRACE_EVENT_FORK, call internal_error for unrecognized event.
2099         (linux_low_ptrace_options): New function.
2100         (linux_low_filter_event): Call linux_low_ptrace_options,
2101         use different argument fo linux_enable_event_reporting,
2102         use return value from handle_extended_wait.
2103         (extended_event_reported): New function.
2104         (linux_wait_1): Call extended_event_reported and set
2105         status to report fork events.
2106         (linux_write_memory): Add pid to debug message.
2107         (reset_lwp_ptrace_options_callback): New function.
2108         (linux_handle_new_gdb_connection): New function.
2109         (linux_target_ops): Initialize new structure member.
2110         * linux-low.h (struct lwp_info) <waitstatus>: New member.
2111         * lynx-low.c: Initialize new structure member.
2112         * remote-utils.c (prepare_resume_reply): Implement stop reason
2113         "fork" for "T" stop message.
2114         * server.c (handle_query): Call handle_new_gdb_connection.
2115         * server.h (report_fork_events): Declare global flag.
2116         * target.h (struct target_ops) <handle_new_gdb_connection>:
2117         New member.
2118         (target_handle_new_gdb_connection): New macro.
2119         * win32-low.c: Initialize new structure member.
2120
2121 2015-05-12  Don Breazeal  <donb@codesourcery.com>
2122
2123         * mem-break.c (APPEND_TO_LIST): Define macro.
2124         (clone_agent_expr): New function.
2125         (clone_one_breakpoint): New function.
2126         (clone_all_breakpoints): New function.
2127         * mem-break.h: Declare new functions.
2128
2129 2015-05-12  Don Breazeal  <donb@codesourcery.com>
2130
2131         * linux-low.c (linux_supports_fork_events): New function.
2132         (linux_supports_vfork_events): New function.
2133         (linux_target_ops): Initialize new structure members.
2134         (initialize_low): Call linux_check_ptrace_features.
2135         * lynx-low.c (lynx_target_ops): Initialize new structure
2136         members.
2137         * server.c (report_fork_events, report_vfork_events):
2138         New global flags.
2139         (handle_query): Add new features to qSupported packet and
2140         response.
2141         (captured_main): Initialize new global variables.
2142         * target.h (struct target_ops) <supports_fork_events>:
2143         New member.
2144         <supports_vfork_events>: New member.
2145         (target_supports_fork_events): New macro.
2146         (target_supports_vfork_events): New macro.
2147         * win32-low.c (win32_target_ops): Initialize new structure
2148         members.
2149
2150 2015-05-12  Gary Benson <gbenson@redhat.com>
2151
2152         * server.c (handle_qxfer_exec_file): Use current process
2153         if annex is empty.
2154
2155 2015-05-08  Sandra Loosemore  <sandra@codesourcery.com>
2156
2157         * linux-nios2-low.c: Include elf/common.h.  Adjust comments.
2158         Remove HAVE_PTRACE_GETREGS conditionals.
2159         (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
2160         instead of PTRACE_GETREGS and PTRACE_SETREGS.
2161
2162 2015-05-08  Yao Qi  <yao.qi@linaro.org>
2163
2164         * linux-low.c (linux_supports_conditional_breakpoints): New
2165         function.
2166         (linux_target_ops): Install new target method.
2167         * lynx-low.c (lynx_target_ops): Install NULL hook for
2168         supports_conditional_breakpoints.
2169         * nto-low.c (nto_target_ops): Likewise.
2170         * spu-low.c (spu_target_ops): Likewise.
2171         * win32-low.c (win32_target_ops): Likewise.
2172         * server.c (handle_query): Check
2173         target_supports_conditional_breakpoints.
2174         * target.h (struct target_ops) <supports_conditional_breakpoints>:
2175         New field.
2176         (target_supports_conditional_breakpoints): New macro.
2177
2178 2015-05-06  Pedro Alves  <palves@redhat.com>
2179
2180         PR server/18081
2181         * server.c (start_inferior): If the process exits, mourn it.
2182
2183 2015-04-21  Gary Benson <gbenson@redhat.com>
2184
2185         * hostio.c (fileio_open_flags_to_host): Factored out to
2186         fileio_to_host_openflags in common/fileio.c.  Single use
2187         updated.
2188
2189 2015-04-17  Max Filippov  <jcmvbkbc@gmail.com>
2190
2191         * linux-xtensa-low.c (xtensa_fill_gregset)
2192         (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
2193         XCHAL_HAVE_LOOP.
2194
2195 2015-04-17  Max Filippov  <jcmvbkbc@gmail.com>
2196
2197         * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
2198         (regs_info): Replace usrregs pointer with NULL.
2199
2200 2015-04-17  Gary Benson  <gbenson@redhat.com>
2201
2202         * target.h (struct target_ops) <pid_to_exec_file>: New field.
2203         * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
2204         * server.c (handle_qxfer_exec_file): New function.
2205         (qxfer_packets): Add exec-file entry.
2206         (handle_query): Report qXfer:exec-file:read as supported packet.
2207
2208 2015-04-14  Romain Naour <romain.naour@openwide.fr>  (tiny change)
2209
2210         * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
2211
2212 2015-04-09  Gary Benson <gbenson@redhat.com>
2213
2214         * hostio-errno.c (errno_to_fileio_error): Remove function.
2215         Update caller to use remote_fileio_to_fio_error.
2216
2217 2015-04-09  Yao Qi  <yao.qi@linaro.org>
2218
2219         * linux-low.c (linux_insert_point): Call
2220         insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
2221         (linux_remove_point): Call remove_memory_breakpoint if type is
2222         raw_bkpt_type_sw.
2223         * linux-x86-low.c (x86_insert_point): Don't call
2224         insert_memory_breakpoint.
2225         (x86_remove_point): Don't call remove_memory_breakpoint.
2226
2227 2015-04-01  Pedro Alves  <palves@redhat.com>
2228             Cleber Rosa  <crosa@redhat.com>
2229
2230         * server.c (gdbserver_usage): Reorganize and extend the usage
2231         message.
2232
2233 2015-03-24  Pedro Alves  <palves@redhat.com>
2234
2235         * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
2236         output.  Also dump TRAP_TRACE.
2237         (linux_low_filter_event): In debug output, distinguish a
2238         resume_stop SIGSTOP from a delayed SIGSTOP.
2239
2240 2015-03-24  Gary Benson  <gbenson@redhat.com>
2241
2242         * linux-x86-low.c (x86_linux_new_thread): Moved to
2243         nat/x86-linux.c.
2244         (x86_linux_prepare_to_resume): Likewise.
2245
2246 2015-03-24  Gary Benson  <gbenson@redhat.com>
2247
2248         * Makefile.in (x86-linux-dregs.o): New rule.
2249         * configure.srv: Add x86-linux-dregs.o to relevant targets.
2250         * linux-x86-low.c: Include nat/x86-linux-dregs.h.
2251         (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
2252         (x86_linux_dr_get): Likewise.
2253         (x86_linux_dr_set): Likewise.
2254         (update_debug_registers_callback): Likewise.
2255         (x86_linux_dr_set_addr): Likewise.
2256         (x86_linux_dr_get_addr): Likewise.
2257         (x86_linux_dr_set_control): Likewise.
2258         (x86_linux_dr_get_control): Likewise.
2259         (x86_linux_dr_get_status): Likewise.
2260         (x86_linux_update_debug_registers): Likewise.
2261
2262 2015-03-24  Gary Benson  <gbenson@redhat.com>
2263
2264         * linux-x86-low.c (x86_linux_update_debug_registers):
2265         New function, factored out from...
2266         (x86_linux_prepare_to_resume): ...this.
2267
2268 2015-03-24  Gary Benson  <gbenson@redhat.com>
2269
2270         * linux-x86-low.c (x86_linux_dr_get): Update comments.
2271         (x86_linux_dr_set): Likewise.
2272         (update_debug_registers_callback): Likewise.
2273         (x86_linux_dr_set_addr): Likewise.
2274         (x86_linux_dr_get_addr): Likewise.
2275         (x86_linux_dr_set_control): Likewise.
2276         (x86_linux_dr_get_control): Likewise.
2277         (x86_linux_dr_get_status): Likewise.
2278         (x86_linux_prepare_to_resume): Likewise.
2279
2280 2015-03-24  Gary Benson  <gbenson@redhat.com>
2281
2282         * linux-x86-low.c (x86_linux_dr_get): Add assertion.
2283         Use perror_with_name.  Pass string through gettext.
2284         (x86_linux_dr_set): Likewise.
2285
2286 2015-03-24  Gary Benson  <gbenson@redhat.com>
2287
2288         * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
2289         (x86_linux_dr_set_addr): ...this.
2290         (x86_dr_low_get_addr): Rename to...
2291         (x86_linux_dr_get_addr): ...this.
2292         (x86_dr_low_set_control): Rename to...
2293         (x86_linux_dr_set_control): ...this.
2294         (x86_dr_low_get_control): Rename to...
2295         (x86_linux_dr_get_control): ...this.
2296         (x86_dr_low_get_status): Rename to...
2297         (x86_linux_dr_get_status): ...this.
2298         (x86_dr_low): Update with new function names.
2299
2300 2015-03-24  Gary Benson  <gbenson@redhat.com>
2301
2302         * Makefile.in (x86-linux.o): New rule.
2303         * configure.srv: Add x86-linux.o to relevant targets.
2304         * linux-low.c (lwp_set_arch_private_info): New function.
2305         (lwp_arch_private_info): Likewise.
2306         * linux-x86-low.c: Include nat/x86-linux.h.
2307         (arch_lwp_info): Removed structure.
2308         (update_debug_registers_callback):
2309         Use lwp_set_debug_registers_changed.
2310         (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
2311         and lwp_set_debug_registers_changed.
2312         (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
2313
2314 2015-03-24  Gary Benson  <gbenson@redhat.com>
2315
2316         * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
2317         * linux-arm-low.c (arm_new_thread): Likewise.
2318         * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
2319         * linux-mips-low.c (mips_linux_new_thread): Likewise.
2320         * linux-x86-low.c (x86_linux_new_thread): Likewise.
2321         * linux-low.c (add_lwp): Update the_low_target.new_thread call.
2322
2323 2015-03-24  Gary Benson  <gbenson@redhat.com>
2324
2325         * linux-low.c (ptid_of_lwp): New function.
2326         (lwp_is_stopped): Likewise.
2327         (lwp_stop_reason): Likewise.
2328         * linux-x86-low.c (update_debug_registers_callback):
2329         Use lwp_is_stopped.
2330         (x86_linux_prepare_to_resume): Use ptid_of_lwp and
2331         lwp_stop_reason.
2332
2333 2015-03-24  Gary Benson  <gbenson@redhat.com>
2334
2335         * linux-low.h (linux_stop_lwp): Remove declaration.
2336
2337 2015-03-24  Gary Benson  <gbenson@redhat.com>
2338
2339         * linux-low.h: Include nat/linux-nat.h.
2340         * linux-low.c (iterate_over_lwps_args): New structure.
2341         (iterate_over_lwps_filter): New function.
2342         (iterate_over_lwps): Likewise.
2343         * linux-x86-low.c (update_debug_registers_callback):
2344         Update signature to what iterate_over_lwps expects.
2345         Remove PID check that iterate_over_lwps now performs.
2346         (x86_dr_low_set_addr): Use iterate_over_lwps.
2347         (x86_dr_low_set_control): Likewise.
2348
2349 2015-03-24  Gary Benson  <gbenson@redhat.com>
2350
2351         * linux-x86-low.c (x86_debug_reg_state): New function.
2352         (x86_linux_prepare_to_resume): Use the above.
2353
2354 2015-03-24  Gary Benson  <gbenson@redhat.com>
2355
2356         * linux-low.c (current_lwp_ptid): New function.
2357         * linux-x86-low.c: Include nat/linux-nat.h.
2358         (x86_dr_low_get_addr): Use current_lwp_ptid.
2359         (x86_dr_low_get_control): Likewise.
2360         (x86_dr_low_get_status): Likewise.
2361
2362 2015-03-20  Pedro Alves  <palves@redhat.com>
2363
2364         * tracepoint.c (cmd_qtstatus): Make "str" const.
2365
2366 2015-03-20  Pedro Alves  <palves@redhat.com>
2367
2368         * server.c (handle_general_set): Make "req_str" const.
2369
2370 2015-03-19  Pedro Alves  <palves@redhat.com>
2371
2372         * linux-low.c (linux_resume_one_lwp): Rename to ...
2373         (linux_resume_one_lwp_throw): ... this.  Don't handle ESRCH here,
2374         instead call perror_with_name.
2375         (check_ptrace_stopped_lwp_gone): New function.
2376         (linux_resume_one_lwp): Reimplement as wrapper around
2377         linux_resume_one_lwp_throw that swallows errors if the LWP is
2378         gone.
2379
2380 2015-03-19  Pedro Alves  <palves@redhat.com>
2381
2382         * linux-low.c (count_events_callback, select_event_lwp_callback):
2383         No longer check whether the thread has resume_stop as last resume
2384         kind.
2385
2386 2015-03-19 Pedro Alves  <palves@redhat.com>
2387
2388         * linux-low.c (count_events_callback, select_event_lwp_callback):
2389         Use the lwp's status_pending_p field, not the thread's.
2390
2391 2015-03-19  Pedro Alves  <palves@redhat.com>
2392
2393         * linux-low.c (select_event_lwp_callback): Update comments to
2394         no longer mention SIGTRAP.
2395
2396 2015-03-18  Gary Benson  <gbenson@redhat.com>
2397
2398         * server.c (handle_query): Do not report vFile:fstat as supported.
2399
2400 2015-03-11  Gary Benson  <gbenson@redhat.com>
2401
2402         * hostio.c (sys/types.h): New include.
2403         (sys/stat.h): Likewise.
2404         (common-remote-fileio.h): Likewise.
2405         (handle_fstat): New function.
2406         (handle_vFile): Handle vFile:fstat packets.
2407
2408 2015-03-11  Gary Benson  <gbenson@redhat.com>
2409
2410         * configure.ac (AC_CHECK_MEMBERS): Add checks for
2411         struct stat.st_blocks and struct stat.st_blksize.
2412         * configure: Regenerate.
2413         * config.in: Likewise.
2414         * Makefile.in (SFILES): Add common/common-remote-fileio.c.
2415         (OBS): Add common-remote-fileio.o.
2416         (common-remote-fileio.o): New rule.
2417
2418 2015-03-09  Pedro Alves  <palves@redhat.com>
2419
2420         * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
2421         'struct sockaddr' pointer in 'accept' call.
2422
2423 2015-03-09  Pedro Alves  <palves@redhat.com>
2424
2425         Revert:
2426         2015-03-07  Pedro Alves  <palves@redhat.com>
2427         * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2428         or <winsock2.h> here.  Instead include "gdb_socket.h".
2429         (remote_open): Use union gdb_sockaddr_u.
2430         * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2431         or <winsock2.h> here.  Instead include "gdb_socket.h".
2432         (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2433         * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2434         or <sys/un.h>.
2435         (init_named_socket, gdb_agent_helper_thread): Use union
2436         gdb_sockaddr_u.
2437
2438 2015-03-07  Pedro Alves  <palves@redhat.com>
2439
2440         * configure.ac (build_warnings): Move
2441         -Wdeclaration-after-statement to the C-specific set.
2442         * configure: Regenerate.
2443
2444 2015-03-07  Pedro Alves  <palves@redhat.com>
2445
2446         * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2447         or <winsock2.h> here.  Instead include "gdb_socket.h".
2448         (remote_open): Use union gdb_sockaddr_u.
2449         * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2450         or <winsock2.h> here.  Instead include "gdb_socket.h".
2451         (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2452         * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2453         or <sys/un.h>.
2454         (init_named_socket, gdb_agent_helper_thread): Use union
2455         gdb_sockaddr_u.
2456
2457 2015-03-07  Pedro Alves  <palves@redhat.com>
2458
2459         Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
2460         instead.
2461
2462 2015-03-06  Yao Qi  <yao.qi@linaro.org>
2463
2464         * linux-aarch64-low.c (aarch64_insert_point): Use
2465         show_debug_regs as a boolean.
2466         (aarch64_remove_point): Likewise.
2467
2468 2015-03-05  Pedro Alves  <palves@redhat.com>
2469
2470         * lynx-low.c (lynx_target_ops): Install NULL hooks for
2471         stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2472         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
2473         * nto-low.c (nto_target_ops): Likewise.
2474         * spu-low.c (spu_target_ops): Likewise.
2475         * win32-low.c (win32_target_ops): Likewise.
2476
2477 2015-03-04  Pedro Alves  <palves@redhat.com>
2478
2479         * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
2480         Decide whether a breakpoint triggered based on the SIGTRAP's
2481         siginfo.si_code.
2482         (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
2483         breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
2484         (linux_low_filter_event): Check for breakpoints before checking
2485         watchpoints.
2486         (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
2487         siginfo.si_code.
2488         (linux_stopped_by_sw_breakpoint)
2489         (linux_supports_stopped_by_sw_breakpoint)
2490         (linux_stopped_by_hw_breakpoint)
2491         (linux_supports_stopped_by_hw_breakpoint): New functions.
2492         (linux_target_ops): Install new target methods.
2493
2494 2015-03-04  Pedro Alves  <palves@redhat.com>
2495
2496         * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
2497         * server.c (swbreak_feature, hwbreak_feature): New globals.
2498         (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
2499         (captured_main): Clear swbreak_feature and hwbreak_feature.
2500         * server.h (swbreak_feature, hwbreak_feature): Declare.
2501         * target.h (struct target_ops) <stopped_by_sw_breakpoint,
2502         supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
2503         supports_stopped_by_hw_breakpoint>: New fields.
2504         (target_supports_stopped_by_sw_breakpoint)
2505         (target_stopped_by_sw_breakpoint)
2506         (target_supports_stopped_by_hw_breakpoint)
2507         (target_stopped_by_hw_breakpoint): Declare.
2508
2509 2015-03-04  Pedro Alves  <palves@redhat.com>
2510
2511         enum lwp_stop_reason -> enum target_stop_reason
2512         * linux-low.c (check_stopped_by_breakpoint): Adjust.
2513         (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
2514         (linux_wait_1, stuck_in_jump_pad_callback)
2515         (move_out_of_jump_pad_callback, linux_resume_one_lwp)
2516         (linux_stopped_by_watchpoint):
2517         * linux-low.h (enum lwp_stop_reason): Delete.
2518         (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
2519         * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2520
2521 2015-03-04  Yao Qi  <yao.qi@linaro.org>
2522
2523         * Makefile.in (SFILES): Add linux-aarch64-low.c.
2524
2525 2015-03-03  Gary Benson  <gbenson@redhat.com>
2526
2527         * hostio.c (handle_vFile): Fix prefix lengths.
2528
2529 2015-03-03  Markus Metzger  <markus.t.metzger@intel.com>
2530
2531         * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
2532         ptr_bits.
2533
2534 2015-03-02  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2535
2536         * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
2537         (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
2538         (clean): Add "rm -f" for above C files.
2539         * configure.srv (srv_regobj): Add s390-vx-linux64.o,
2540         s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
2541         (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
2542         s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
2543         * linux-s390-low.c (HWCAP_S390_VX): New macro.
2544         (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
2545         (init_registers_s390x_vx_linux64)
2546         (init_registers_s390x_tevx_linux64)
2547         (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
2548         (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
2549         declarations.
2550         (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
2551         (s390_store_vxrs_high): New functions.
2552         (s390_regsets): Add entries for NT_S390_VXRS_LOW and
2553         NT_S390_VXRS_HIGH.
2554         (s390_arch_setup): Add logic for selecting one of the new target
2555         descriptions.  Activate the new vector regsets if applicable.
2556         (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
2557         init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
2558         and init_registers_s390x_tevx_linux64.
2559
2560 2015-03-01  Pedro Alves  <palves@redhat.com>
2561
2562         * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
2563         parameter.
2564
2565 2015-02-27  Pedro Alves  <palves@redhat.com>
2566
2567         * linux-x86-low.c (u_debugreg_offset): New function.
2568         (x86_linux_dr_get, x86_linux_dr_set): Use it.
2569
2570 2015-02-27  Pedro Alves  <palves@redhat.com>
2571
2572         * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
2573         [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
2574         [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
2575         ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2576         (ps_lsetfpregs, ps_getpid)
2577         (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
2578         (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
2579         (ps_lsetxregs, ps_plog): Declare.
2580
2581 2015-02-27  Pedro Alves  <palves@redhat.com>
2582
2583         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
2584         IP_AGENT_EXPORT_FUNC.
2585         * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
2586         IP_AGENT_EXPORT_FUNC.
2587         * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
2588         (IP_AGENT_EXPORT): Delete.
2589         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2590         (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2591         (gdb_trampoline_buffer_error, collecting, gdb_collect)
2592         (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
2593         (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
2594         (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
2595         (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
2596         (traceframe_read_count, traceframe_write_count)
2597         (traceframes_created, trace_state_variables, get_raw_reg)
2598         (get_trace_state_variable_value, set_trace_state_variable_value)
2599         (ust_loaded, helper_thread_id, cmd_buf): Use
2600         IPA_SYM_EXPORTED_NAME.
2601         (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
2602         (tracepoints) Use IP_AGENT_EXPORT_VAR.
2603         (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
2604         IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2605         (last_tracepoint): Move into !IN_PROCESS_AGENT block.
2606         (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
2607         EXTERN_C_PUSH/EXTERN_C_POP.
2608         (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
2609         (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
2610         wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2611         (trace_buffer_ctrl, trace_buffer_ctrl_curr)
2612         (traceframe_write_count, traceframe_read_count)
2613         (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
2614         (about_to_request_buffer_space, get_trace_state_variable_value)
2615         (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
2616         (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
2617         EXTERN_C_PUSH/EXTERN_C_POP.
2618         (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2619         (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2620         (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2621         and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2622         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2623         (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2624         (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2625         * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2626         Define.
2627         (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2628         (IP_AGENT_EXPORT_VAR_DECL): Define.
2629         (tracing): Declare.
2630         (gdb_agent_get_raw_reg): Declare.
2631
2632 2015-02-27  Tom Tromey  <tromey@redhat.com>
2633             Pedro Alves  <palves@redhat.com>
2634
2635         Rename symbols whose names are reserved C++ keywords throughout.
2636
2637 2015-02-27  Pedro Alves  <palves@redhat.com>
2638
2639         * Makefile.in (COMPILER): New, get it from autoconf.
2640         (CXX): Get from autoconf instead.
2641         (COMPILE.pre): Use COMPILER.
2642         (CC-LD): Rename to ...
2643         (CC_LD): ... this.  Use COMPILER.
2644         (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2645         (CXX_FOR_TARGET): Default to g++ instead of gcc.
2646         * acinclude.m4: Include build-with-cxx.m4.
2647         * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2648         Disable -Werror by default if building in C++ mode.
2649         (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2650         -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2651         the C++ compiler.  Save/restore CXXFLAGS too.
2652         * configure: Regenerate.
2653
2654 2015-02-27  Pedro Alves  <palves@redhat.com>
2655
2656         * acinclude.m4: Include libiberty.m4.
2657         * configure.ac: Call libiberty_INIT.
2658         * config.in, configure: Regenerate.
2659
2660 2015-02-26  Pedro Alves  <palves@redhat.com>
2661
2662         * linux-low.c (linux_wait_1): When incrementing the PC past a
2663         program breakpoint always use the_low_target.breakpoint_len as
2664         increment, rather than the maximum between that and
2665         the_low_target.decr_pc_after_break.
2666
2667 2015-02-23  Pedro Alves  <palves@redhat.com>
2668
2669         * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2670         thread was doing a step-over; always adjust the PC if
2671         we stepped over a permanent breakpoint.
2672         (linux_wait_1): If we stepped over breakpoint that was on top of a
2673         permanent breakpoint, manually advance the PC past it.
2674
2675 2015-02-23  Pedro Alves  <palves@redhat.com>
2676
2677         * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2678         modes.
2679         (x86_fill_gregset, x86_store_gregset): Use it when handling
2680         $orig_eax.
2681
2682 2015-02-20  Pedro Alves  <palves@redhat.com>
2683
2684         * thread-db.c: Include "nat/linux-procfs.h".
2685         (thread_db_init): Skip listing new threads if the kernel supports
2686         PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2687
2688 2015-02-20  Pedro Alves  <palves@redhat.com>
2689
2690         * linux-low.c (status_pending_p_callback): Use ptid_match.
2691
2692 2015-02-19  Antoine Tremblay  <antoine.tremblay@ericsson.com>
2693
2694         PR breakpoints/16812
2695         * linux-low.c (wstatus_maybe_breakpoint): Remove.
2696         (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2697         (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2698
2699 2015-02-10  Antoine Tremblay <antoine.tremblay@ericsson.com>
2700
2701         PR breakpoints/15956
2702         * tracepoint.c (cmd_qtinit): Add check for current_thread.
2703
2704 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
2705
2706         * linux-low.c (linux_low_btrace_conf): Print size.
2707         * server.c (handle_btrace_conf_general_set): New.
2708         (hanle_general_set): Call handle_btrace_conf_general_set.
2709         (handle_query): Report Qbtrace-conf:bts:size as supported.
2710
2711 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
2712
2713         * linux-low.c (linux_low_enable_btrace): Update parameters.
2714         (linux_low_btrace_conf): New.
2715         (linux_target_ops)<to_btrace_conf>: Initialize.
2716         * server.c (current_btrace_conf): New.
2717         (handle_btrace_enable): Rename to ...
2718         (handle_btrace_enable_bts): ... this.  Pass &current_btrace_conf
2719         to target_enable_btrace.  Update comment.  Update users.
2720         (handle_qxfer_btrace_conf): New.
2721         (qxfer_packets): Add btrace-conf entry.
2722         (handle_query): Report qXfer:btrace-conf:read as supported packet.
2723         * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2724         (target_ops)<read_btrace_conf>: New.
2725         (target_enable_btrace): Update parameters.
2726         (target_read_btrace_conf): New.
2727
2728 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
2729
2730         * server.c (handle_btrace_general_set): Remove call to
2731         target_supports_btrace.
2732         (supported_btrace_packets): New.
2733         (handle_query): Call supported_btrace_packets.
2734         * target.h: include btrace-common.h.
2735         (btrace_target_info): Removed.
2736         (supports_btrace, target_supports_btrace): Update parameters.
2737
2738 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
2739
2740         * Makefile.in (SFILES): Add common/btrace-common.c.
2741         (OBS): Add common/btrace-common.o.
2742         (btrace-common.o): Add build rules.
2743         * linux-low: Include btrace-common.h.
2744         (linux_low_read_btrace): Use struct btrace_data.  Call
2745         btrace_data_init and btrace_data_fini.
2746
2747 2015-02-06  Pedro Alves  <palves@redhat.com>
2748
2749         * thread-db.c (find_new_threads_callback): Add debug output.
2750
2751 2015-02-04  Pedro Alves  <palves@redhat.com>
2752
2753         * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2754         (resume_stopped_resumed_lwps): New function.
2755         (linux_wait_for_event_filtered): Use it.
2756
2757 2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
2758
2759         * Makefile.in (SFILES): Add linux-personality.c.
2760         (linux-personality.o): New rule.
2761         * configure.srv (srv_linux_obj): Add linux-personality.o to the
2762         list of objects to be built.
2763         * linux-low.c: Include nat/linux-personality.h.
2764         (linux_create_inferior): Remove code to disable address space
2765         randomization (moved to ../nat/linux-personality.c).  Create
2766         cleanup to disable address space randomization.
2767
2768 2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
2769
2770         * Makefile.in (posix-strerror.o): New rule.
2771         (mingw-strerror.o): Likewise.
2772         * configure: Regenerated.
2773         * configure.ac: Source file ../common/common.host.  Initialize new
2774         variable srv_host_obs.  Add srv_host_obs to GDBSERVER_DEPFILES.
2775
2776 2015-01-14  Yao Qi  <yao@codesourcery.com>
2777
2778         * Makefile.in (SFILES): Add nat/ppc-linux.c.
2779         (ppc-linux.o): New rule.
2780         * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2781         * configure.ac: AC_CHECK_FUNCS(getauxval).
2782         * config.in: Re-generated.
2783         * configure: Re-generated.
2784         * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2785         ppc64_64bit_inferior_p
2786
2787 2015-01-14  Yao Qi  <yao@codesourcery.com>
2788
2789         * linux-ppc-low.c: Include "nat/ppc-linux.h".
2790          (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2791         (PPC_FEATURE_HAS_ALTIVEC,  PPC_FEATURE_HAS_SPE): Likewise.
2792         (PT_ORIG_R3, PT_TRAP): Likewise.
2793         (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2794         (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2795         (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2796
2797 2015-01-10  Joel Brobecker  <brobecker@adacore.com>
2798
2799         * i387-fp.c (i387_cache_to_xsave): In look over
2800         num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2801         zmmh_low_space field by use of zmmh_high_space.
2802
2803 2015-01-09  Pedro Alves  <palves@redhat.com>
2804
2805         * linux-low.c (step_over_bkpt): Move higher up in the file.
2806         (handle_extended_wait): Don't store the stop_pc here.
2807         (get_stop_pc): Adjust comments and rename to ...
2808         (check_stopped_by_breakpoint): ... this.  Record whether the LWP
2809         stopped for a software breakpoint or hardware breakpoint.
2810         (thread_still_has_status_pending_p): New function.
2811         (status_pending_p_callback): Use
2812         thread_still_has_status_pending_p.  If the event is no longer
2813         interesting, resume the LWP.
2814         (handle_tracepoints): Add assert.
2815         (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2816         (wstatus_maybe_breakpoint): New function.
2817         (cancel_breakpoint): Delete function.
2818         (check_stopped_by_watchpoint): New function, factored out from
2819         linux_low_filter_event.
2820         (lp_status_maybe_breakpoint): Delete function.
2821         (linux_low_filter_event): Remove filter_ptid argument.
2822         Leave thread group exits pending here.  Store the LWP's stop PC.
2823         Always leave events pending.
2824         (linux_wait_for_event_filtered): Pull all events out of the
2825         kernel, and leave them all pending.
2826         (count_events_callback, select_event_lwp_callback): Consider all
2827         events.
2828         (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2829         (select_event_lwp): Only give preference to the stepping LWP in
2830         all-stop mode.  Adjust comments.
2831         (ignore_event): New function.
2832         (linux_wait_1): Delete 'retry' label.  Use ignore_event.  Remove
2833         references to cancel_breakpoints.  Adjust to renames.  Also give
2834         equal priority to all LWPs that have had events in non-stop mode.
2835         If reporting a software breakpoint event, unadjust the LWP's PC.
2836         (linux_wait): If linux_wait_1 returned an ignored event, retry.
2837         (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2838         Adjust.
2839         (linux_resume_one_lwp): Store the LWP's PC.  Adjust.
2840         (resume_status_pending_p): Use thread_still_has_status_pending_p.
2841         (linux_stopped_by_watchpoint): Adjust.
2842         (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2843         * linux-low.h (enum lwp_stop_reason): New.
2844         (struct lwp_info) <stop_pc>: Adjust comment.
2845         <stopped_by_watchpoint>: Delete field.
2846         <stop_reason>: New field.
2847         * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2848         * mem-break.c (software_breakpoint_inserted_here)
2849         (hardware_breakpoint_inserted_here): New function.
2850         * mem-break.h (software_breakpoint_inserted_here)
2851         (hardware_breakpoint_inserted_here): Declare.
2852         * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2853         (cancel_breakpoints): Delete.
2854         * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2855         (upload_fast_traceframes): Remove references to
2856         cancel_breakpoints.
2857
2858 2015-01-09  Pedro Alves  <palves@redhat.com>
2859
2860         * thread-db.c (find_new_threads_callback): Ignore thread if the
2861         kernel thread ID is -1.
2862
2863 2015-01-09  Pedro Alves  <palves@redhat.com>
2864
2865         * linux-low.c (linux_attach_fail_reason_string): Move to
2866         nat/linux-ptrace.c, and rename.
2867         (linux_attach_lwp): Update comment.
2868         (attach_proc_task_lwp_callback): New function.
2869         (linux_attach): Adjust to rename and use
2870         linux_proc_attach_tgid_threads.
2871         (linux_attach_fail_reason_string): Delete declaration.
2872
2873 2015-01-01  Joel Brobecker  <brobecker@adacore.com>
2874
2875         * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2876         * server.c (gdbserver_version): Likewise.
2877
2878 2014-12-29  Sergio Durigan Junior  <sergiodj@redhat.com>
2879
2880         * remote-utils.c: Include ctype.h.
2881         (input_interrupt): Explicitly handle the case when the char
2882         received is the NUL byte.  Improve the printing of non-ASCII
2883         characters.
2884
2885 2014-12-16  Joel Brobecker  <brobecker@adacore.com>
2886
2887         * linux-low.c (linux_low_filter_event): Update call to
2888         linux_enable_event_reporting following the addition of
2889         a new parameter to that function.
2890
2891 2014-12-16  Catalin Udma  <catalin.udma@freescale.com>
2892
2893         PR server/17457
2894         * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2895         (AARCH64_FPCR_REGNO): Likewise.
2896         (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2897         (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2898         (aarch64_store_fpregset): Likewise.
2899
2900 2014-12-15  Joel Brobecker  <brobecker@adacore.com>
2901
2902         * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2903         Remove FIXME comment about assumption about N.
2904
2905 2014-12-13  Joel Brobecker  <brobecker@adacore.com>
2906
2907         * configure.ac: If large-file support is disabled in GDBserver,
2908         pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2909         * configure: Regenerate.
2910
2911 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2912
2913         * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2914         warning upon ENODATA from ptrace.
2915         * linux-s390-low.c (s390_store_tdb): New.
2916         (s390_regsets): Add regset for NT_S390_TDB.
2917
2918 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2919
2920         * linux-low.c (regsets_store_inferior_registers): Skip regsets
2921         without a fill_function.
2922         * linux-s390-low.c (s390_fill_last_break): Remove.
2923         (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2924         (s390_arch_setup): Use regset's size instead of fill_function for
2925         loop end condition.
2926
2927 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2928
2929         * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2930         the regset's store function when ptrace returned an error.
2931         * regcache.c (get_thread_regcache): Invalidate register cache
2932         before fetching inferior's registers.
2933
2934 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2935
2936         * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2937         while-loop as for-loop.
2938         (regsets_store_inferior_registers): Likewise.
2939
2940 2014-11-28  Yao Qi  <yao@codesourcery.com>
2941
2942         * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2943         * config.in, configure: Re-generate.
2944         * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2945         is defined.
2946
2947 2014-11-21  Yao Qi  <yao@codesourcery.com>
2948
2949         * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2950         (AC_CHECK_HEADERS): Remove malloc.h.
2951         * configure: Re-generated.
2952         * config.in: Re-generated.
2953         * server.h: Don't include alloca.h and malloc.h.
2954         * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2955         Don't include malloc.h.
2956
2957 2014-11-17  Joel Brobecker  <brobecker@adacore.com>
2958
2959         * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2960         corresponding ERRNO check in same block.
2961
2962 2014-11-12  Pedro Alves  <palves@redhat.com>
2963
2964         * server.c (cont_thread): Update comment.
2965         (start_inferior, attach_inferior): No longer clear cont_thread.
2966         (handle_v_cont): No longer set cont_thread.
2967         (captured_main): Clear cont_thread each time a GDB connects.
2968
2969 2014-11-12  Pedro Alves  <palves@redhat.com>
2970
2971         * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2972         thread, and don't resume all threads if the Hc thread has exited.
2973
2974 2014-11-12  Pedro Alves  <palves@redhat.com>
2975
2976         * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2977         the process group instead of to a specific LWP.
2978
2979 2014-10-15  Pedro Alves  <palves@redhat.com>
2980
2981         PR server/17487
2982         * win32-arm-low.c (arm_set_thread_context): Remove current_event
2983         parameter.
2984         (arm_set_thread_context): Delete.
2985         (the_low_target): Adjust.
2986         * win32-i386-low.c (debug_registers_changed)
2987         (debug_registers_used): Delete.
2988         (update_debug_registers_callback): New function.
2989         (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2990         needing to update their debug registers.
2991         (win32_get_current_dr): New function.
2992         (x86_dr_low_get_addr, x86_dr_low_get_control)
2993         (x86_dr_low_get_status): Fetch the debug register from the thread
2994         record's context.
2995         (i386_initial_stuff): Adjust.
2996         (i386_get_thread_context): Remove current_event parameter.  Don't
2997         clear debug_registers_changed nor copy DR values to
2998         debug_reg_state.
2999         (i386_set_thread_context): Delete.
3000         (i386_prepare_to_resume): New function.
3001         (i386_thread_added): Mark the thread as needing to update irs
3002         debug registers.
3003         (the_low_target): Remove i386_set_thread_context and install
3004         i386_prepare_to_resume.
3005         * win32-low.c (win32_get_thread_context): Adjust.
3006         (win32_set_thread_context): Use SetThreadContext
3007         directly.
3008         (win32_prepare_to_resume): New function.
3009         (win32_require_context): New function, factored out from ...
3010         (thread_rec): ... this.
3011         (continue_one_thread): Call win32_prepare_to_resume on each thread
3012         we're about to continue.
3013         (win32_resume): Call win32_prepare_to_resume on the event thread.
3014         * win32-low.h (struct win32_thread_info)
3015         <debug_registers_changed>: New field.
3016         (struct win32_target_ops): Change prototype of set_thread_context,
3017         delete set_thread_context and add prepare_to_resume.
3018         (win32_require_context): New declaration.
3019
3020 2014-10-08  Gary Benson  <gbenson@redhat.com>
3021
3022         * server.h: Do not include common-exceptions.h.
3023
3024 2014-10-08  Gary Benson  <gbenson@redhat.com>
3025
3026         * server.h: Do not include cleanups.h.
3027
3028 2014-09-30  James Hogan  <james.hogan@imgtec.com>
3029
3030         * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
3031         mips64-dsp-linux.c.
3032
3033 2014-09-23  Yao Qi  <yao@codesourcery.com>
3034
3035         * linux-low.c (lp_status_maybe_breakpoint): New function.
3036         (linux_low_filter_event): Call lp_status_maybe_breakpoint.
3037         (count_events_callback): Likewise.
3038         (select_event_lwp_callback): Likewise.
3039         (cancel_breakpoints_callback): Likewise.
3040
3041 2014-09-19  Don Breazeal  <donb@codesourcery.com>
3042
3043         * linux-low.c (handle_extended_wait): Call
3044         linux_ptrace_get_extended_event.
3045         (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
3046         linux_is_extended_waitstatus.
3047
3048 2014-09-16  Joel Brobecker  <brobecker@adacore.com>
3049
3050         * Makefile.in (CPPFLAGS): Define.
3051         (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
3052         (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
3053
3054 2014-09-16  Gary Benson  <gbenson@redhat.com>
3055
3056         * inferiors.h (current_inferior): Renamed as...
3057         (current_thread): New variable.  All uses updated.
3058         * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
3059         (maybe_move_out_of_jump_pad): Likewise.
3060         (cancel_breakpoint): Likewise.
3061         (linux_low_filter_event): Likewise.
3062         (wait_for_sigstop): Likewise.
3063         (linux_resume_one_lwp): Likewise.
3064         (need_step_over_p): Likewise.
3065         (start_step_over): Likewise.
3066         (linux_stabilize_threads): Renamed save_inferior as saved_thread.
3067         * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
3068         * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
3069         and save_inferior as saved_thread.
3070         * regcache.c (get_thread_regcache): Renamed saved_inferior as
3071         saved_thread.
3072         (regcache_invalidate_thread): Likewise.
3073         * remote-utils.c (prepare_resume_reply): Likewise.
3074         * thread-db.c (thread_db_get_tls_address): Likewise.
3075         (disable_thread_event_reporting): Likewise.
3076         (remove_thread_event_breakpoints): Likewise.
3077         * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
3078         as saved_thread.
3079         * target.h (set_desired_inferior): Renamed as...
3080         (set_desired_thread): New declaration.  All uses updated.
3081         * server.c (myresume): Updated comment to reference thread instead
3082         of inferior.
3083         (handle_serial_event): Likewise.
3084         (handle_target_event): Likewise.
3085
3086 2014-09-12  Tom Tromey  <tromey@redhat.com>
3087             Gary Benson  <gbenson@redhat.com>
3088
3089         * regcache.h: Include common-regcache.h.
3090         (regcache_read_pc): Don't declare.
3091         * regcache.c (get_thread_regcache_for_ptid): New function.
3092
3093 2014-09-11  Tom Tromey  <tromey@redhat.com>
3094             Gary Benson  <gbenson@redhat.com>
3095
3096         * symbol.c: New file.
3097         * Makefile.in (SFILES): Add symbol.c.
3098         (OBS): Add symbol.o.
3099
3100 2014-09-11  Gary Benson  <gbenson@redhat.com>
3101
3102         * target.c (target_stop_ptid, target_continue_ptid): New
3103         functions.
3104
3105 2014-09-11  Tom Tromey  <tromey@redhat.com>
3106             Gary Benson  <gbenson@redhat.com>
3107
3108         * target.h: Include target/target.h.
3109         * target.c (target_read_memory, target_read_uint32)
3110         (target_write_memory): New functions.
3111
3112 2014-09-11  Gary Benson  <gbenson@redhat.com>
3113
3114         * server.h (debug_hw_points): Don't declare.
3115         * server.c (debug_hw_points): Don't define.  Replace all uses
3116         with show_debug_regs.
3117         * linux-aarch64-low.c (debug_hw_points): Don't define.  Replace
3118         all uses with show_debug_regs.
3119
3120 2014-09-08  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
3121
3122         * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
3123         endianness into account.
3124         (ppc_supply_ptrace_register): Likewise.
3125
3126 2014-09-03  James Hogan  <james.hogan@imgtec.com>
3127
3128         * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
3129         to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
3130
3131 2014-09-03  Gary Benson  <gbenson@redhat.com>
3132
3133         * linux-x86-low.c (x86_linux_prepare_to_resume): Use
3134         ALL_DEBUG_ADDRESS_REGISTERS.
3135
3136 2014-09-02  Gary Benson  <gbenson@redhat.com>
3137
3138         * i386-low.h: Renamed as...
3139         * x86-low.h: New file.  All type, function and variable name
3140         prefixes changed from "i386_" to "x86_".  All references updated.
3141         * i386-low.c: Renamed as...
3142         * x86-low.c: New file.  All type, function and variable name
3143         prefixes changed from "i386_" to "x86_".  All references updated.
3144
3145 2014-09-02  Gary Benson  <gbenson@redhat.com>
3146
3147         * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
3148         (x86_linux_new_thread): Likewise.
3149
3150 2014-08-29  Gary Benson  <gbenson@redhat.com>
3151
3152         * server.h (setjmp.h): Do not include.
3153         (toplevel): Do not declare.
3154         (common-exceptions.h): Include.
3155         (cleanups.h): Likewise.
3156         * server.c (toplevel): Do not define.
3157         (exit_code): New static global.
3158         (detach_or_kill_for_exit_cleanup): New function.
3159         (main): New function.  Original main renamed to...
3160         (captured_main): New function.
3161         * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
3162
3163 2014-08-29  Gary Benson  <gbenson@redhat.com>
3164
3165         * Makefile.in (SFILES): Add common/common-exceptions.c.
3166         (OBS): Add common-exceptions.o.
3167         (common-exceptions.o): New rule.
3168         * utils.c (prepare_to_throw_exception): New function.
3169
3170 2014-08-29  Gary Benson  <gbenson@redhat.com>
3171
3172         * config.in: Regenerate.
3173         * configure: Likewise.
3174
3175 2014-08-29  Gary Benson  <gbenson@redhat.com>
3176
3177         * Makefile.in (SFILES): Add common/cleanups.c.
3178         (OBS): cleanups.o.
3179         (cleanups.o): New rule.
3180
3181 2014-08-29  Gary Benson  <gbenson@redhat.com>
3182
3183         * utils.c (internal_vwarning): New function.
3184
3185 2014-08-28  Gary Benson  <gbenson@redhat.com>
3186
3187         * utils.h (fatal): Remove declaration.
3188         * utils.c (fatal): Remove function.
3189
3190 2014-08-28  Gary Benson  <gbenson@redhat.com>
3191
3192         * tracepoint.c (gdb_agent_init): Replace fatal with
3193         perror_with_name.
3194         (initialize_tracepoint): Likewise.
3195
3196 2014-08-28  Gary Benson  <gbenson@redhat.com>
3197
3198         * remote-utils.c (remote_prepare): Replace fatal with error.
3199
3200 2014-08-28  Gary Benson  <gbenson@redhat.com>
3201
3202         * linux-low.c (linux_async): Replace fatal with warning.
3203         Tidy up and return.
3204         (linux_start_non_stop): Return -1 if linux_async failed.
3205
3206 2014-08-28  Gary Benson  <gbenson@redhat.com>
3207
3208         * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
3209         gdb_assert.
3210         (i386_dr_low_get_addr): Remove vague comment.
3211         * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
3212         gdb_assert.
3213
3214 2014-08-28  Gary Benson  <gbenson@redhat.com>
3215
3216         * inferiors.c (get_thread_process): Replace check with gdb_assert.
3217         * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
3218         internal_error.
3219         (linux_resume_one_lwp): Likewise.
3220         * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
3221         gdb_assert.
3222         * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
3223         with internal_error.
3224         * regcache.c (get_thread_regcache): Replace check with gdb_assert.
3225         (init_register_cache): Replace fatal with gdb_assert_not_reached.
3226         (find_register_by_name): Replace fatal with internal_error.
3227         (find_regno): Likewise.
3228         * tdesc.c (init_target_desc): Replace check with gdb_assert.
3229         * thread-db.c (thread_db_create_event): Likewise.
3230         (thread_db_load_search): Likewise.
3231         (try_thread_db_load_1): Likewise.
3232         * tracepoint.c (get_jump_space_head): Replace fatal with
3233         internal_error.
3234         (claim_trampoline_space): Likewise.
3235         (have_fast_tracepoint_trampoline_buffer): Likewise.
3236         (cmd_qtstart): Likewise.
3237         (stop_tracing): Likewise.
3238         (fast_tracepoint_collecting): Likewise.
3239         (target_malloc): Likewise.
3240         (download_tracepoint): Likewise.
3241         (download_trace_state_variables): Replace check with gdb_assert.
3242         (upload_fast_traceframes): Replace fatal with internal_error.
3243
3244 2014-08-19  Tom Tromey  <tromey@redhat.com>
3245             Gary Benson  <gbenson@redhat.com>
3246
3247         * Makefile.in (SFILES): Add common/common-debug.c.
3248         (OBS): Add common-debug.o.
3249         (common-debug.o): New rule.
3250         * debug.h (debug_printf): Don't declare.
3251         * debug.c (debug_printf): Renamed and rewritten as...
3252         (debug_vprintf): New function.
3253
3254 2014-08-19  Gary Benson  <gbenson@redhat.com>
3255
3256         * utils.h: Do not include print-utils.h.
3257
3258 2014-08-19  Tom Tromey  <tromey@redhat.com>
3259             Gary Benson  <gbenson@redhat.com>
3260
3261         * server.h: Add static assertion.
3262         (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
3263
3264 2014-08-19  Tom Tromey  <tromey@redhat.com>
3265             Gary Benson  <gbenson@redhat.com>
3266
3267         * Makefile.in (SFILES): Add common/errors.c.
3268         (OBS): Add errors.o.
3269         (IPA_OBS): Add errors-ipa.o.
3270         (errors.o): New rule.
3271         (errors-ipa.o): Likewise.
3272         * utils.h (perror_with_name, error, warning): Don't declare.
3273         * utils.c (warning): Renamed and rewritten as...
3274         (vwarning): New function.
3275         (error): Renamed and rewritten as...
3276         (verror): New function.
3277         (internal_error): Renamed and rewritten as...
3278         (internal_verror): New function.
3279
3280 2014-08-07  Gary Benson  <gbenson@redhat.com>
3281
3282         * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
3283         * configure: Regenerate.
3284         * config.in: Likewise.
3285         * server.h: Do not include errno.h.
3286         * event-loop.c: Likewise.
3287         * hostio-errno.c: Likewise.
3288         * linux-low.c: Likewise.
3289         * remote-utils.c: Likewise.
3290         * spu-low.c: Likewise.
3291         * utils.c: Likewise.
3292         * gdbreplay.c: Unconditionally include errno.h.
3293
3294 2014-08-07  Gary Benson  <gbenson@redhat.com>
3295
3296         * server.h: Do not include string.h.
3297         * event-loop.c: Likewise.
3298         * linux-low.c: Likewise.
3299         * regcache.c: Likewise.
3300         * remote-utils.c: Likewise.
3301         * spu-low.c: Likewise.
3302         * utils.c: Likewise.
3303
3304 2014-08-07  Gary Benson  <gbenson@redhat.com>
3305
3306         * server.h: Do not include gdb_assert.h.
3307
3308 2014-08-07  Gary Benson  <gbenson@redhat.com>
3309
3310         * server.h: Do not include common-utils.h.
3311
3312 2014-08-07  Gary Benson  <gbenson@redhat.com>
3313
3314         * server.h: Do not include ptid.h.
3315         * notif.h: Likewise.
3316
3317 2014-08-07  Gary Benson  <gbenson@redhat.com>
3318
3319         * server.h: Do not include gdb_locale.h.
3320
3321 2014-08-07  Gary Benson  <gbenson@redhat.com>
3322
3323         * server.h: Do not include gdb/signals.h.
3324         * win32-low.c: Likewise.
3325
3326 2014-08-07  Gary Benson  <gbenson@redhat.com>
3327
3328         * server.h: Do not include pathmax.h.
3329
3330 2014-08-07  Gary Benson  <gbenson@redhat.com>
3331
3332         * server.h: Do not include libiberty.h.
3333         * linux-bfin-low.c: Likewise.
3334
3335 2014-08-07  Gary Benson  <gbenson@redhat.com>
3336
3337         * server.h: Do not include ansidecl.h.
3338
3339 2014-08-07  Gary Benson  <gbenson@redhat.com>
3340
3341         * linux-x86-low.c: Do not include stddef.h.
3342         * lynx-ppc-low.c: Likewise.
3343         * tracepoint.c: Likewise.
3344
3345 2014-08-07  Gary Benson  <gbenson@redhat.com>
3346
3347         * server.h: Do not include stdarg.h.
3348         * nto-low.c: Likewise.
3349
3350 2014-08-07  Gary Benson  <gbenson@redhat.com>
3351
3352         * server.h: Do not include stdlib.h.
3353         * inferiors.c: Likewise.
3354         * linux-low.c: Likewise.
3355         * regcache.c: Likewise.
3356         * spu-low.c: Likewise.
3357         * tracepoint.c: Likewise.
3358         * utils.c: Likewise.
3359
3360 2014-08-07  Gary Benson  <gbenson@redhat.com>
3361
3362         * server.h: Do not include stdio.h.
3363         * linux-low.c: Likewise.
3364         * remote-utils.c: Likewise.
3365         * spu-low.c: Likewise.
3366         * utils.c: Likewise.
3367         * wincecompat.c: Likewise.
3368
3369 2014-08-06  Gary Benson  <gbenson@redhat.com>
3370
3371         * regcache.c (init_register_cache): Move conditionals inside if.
3372
3373 2014-08-06  Gary Benson  <gbenson@redhat.com>
3374
3375         * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
3376
3377 2014-07-31  Gary Benson  <gbenson@redhat.com>
3378
3379         * ax.h: Do not include server.h.
3380         * gdbthread.h: Likewise.
3381         * lynx-low.h: Likewise.
3382         * notif.h: Likewise.
3383
3384 2014-07-30  Gary Benson  <gbenson@redhat.com>
3385
3386         * server.h: Include common-defs.h.
3387         Do not include config.h or build-gnulib-gdbserver/config.h.
3388
3389 2014-07-30  Gary Benson  <gbenson@redhat.com>
3390
3391         * hostio-errno.c: Move server.h to top of includes list.
3392         * inferiors.c: Likewise.
3393         * linux-x86-low.c: Likewise.
3394         * notif.c: Include server.h.
3395
3396 2014-07-24  Tom Tromey  <tromey@redhat.com>
3397             Gary Benson  <gbenson@redhat.com>
3398
3399         * server.h (CORE_ADDR): Now unsigned.
3400
3401 2014-07-16  Pedro Alves  <palves@redhat.com>
3402
3403         * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
3404
3405 2014-07-15  Pedro Alves  <palves@redhat.com>
3406
3407         * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
3408         copy.
3409
3410 2014-07-11  Pedro Alves  <palves@redhat.com>
3411
3412         * linux-low.c (kill_wait_lwp): New function, based on
3413         kill_one_lwp_callback, but use my_waitpid directly.
3414         (kill_one_lwp_callback, linux_kill): Use it.
3415
3416 2014-06-23  Pedro Alves  <palves@redhat.com>
3417
3418         * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
3419         before setting DR0..DR3.
3420
3421 2014-06-20  Gary Benson  <gbenson@redhat.com>
3422
3423         * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
3424         * configure: Regenerated.
3425         * config.in: Likewise.
3426
3427 2014-06-20  Gary Benson  <gbenson@redhat.com>
3428
3429         * Makefile.in (SFILES): Update locations for files moved
3430         from common to nat.
3431         (object file files): Reordered.
3432
3433 2014-06-20  Gary Benson  <gbenson@redhat.com>
3434
3435         * i386-low.h (i386_dr_low_can_set_addr): Removed.
3436         (i386_dr_low_set_addr): Likewise.
3437         (i386_dr_low_get_addr): Likewise.
3438         (i386_dr_low_can_set_control): Likewise.
3439         (i386_dr_low_set_control): Likewise.
3440         (i386_dr_low_get_control): Likewise.
3441         (i386_dr_low_get_status): Likewise.
3442         (i386_get_debug_register_length): Likewise.
3443         * linux-x86-low.c (i386_dr_low_set_addr):
3444         Changed signature.  Made static.
3445         (i386_dr_low_get_addr): Likewise.
3446         (i386_dr_low_set_control): Likewise.
3447         (i386_dr_low_get_control): Likewise.
3448         (i386_dr_low_get_status): Likewise.
3449         (i386_dr_low): New global variable.
3450         * win32-i386-low.c (i386_dr_low_set_addr):
3451         Changed signature.  Made static.
3452         (i386_dr_low_get_addr): Likewise.
3453         (i386_dr_low_set_control): Likewise.
3454         (i386_dr_low_get_control): Likewise.
3455         (i386_dr_low_get_status): Likewise.
3456         (i386_dr_low): New global variable.
3457
3458 2014-06-20  Marcus Shawcroft  <marcus.shawcroft@arm.com>
3459
3460         * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
3461         * Makefile.in (AR, AR_FLAGS): Define.
3462         * configure: Regenerate.
3463
3464 2014-06-19  Gary Benson  <gbenson@redhat.com>
3465
3466         * Makefile.in (i386-dregs.o): New rule.
3467         * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
3468         * i386-low.c (target.h): Remove include.
3469         (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
3470         (DR_CONTROL_SHIFT): Likewise.
3471         (DR_CONTROL_SIZE): Likewise.
3472         (DR_RW_EXECUTE): Likewise.
3473         (DR_RW_WRITE): Likewise.
3474         (DR_RW_READ): Likewise.
3475         (DR_RW_IORW): Likewise.
3476         (DR_LEN_1): Likewise.
3477         (DR_LEN_2): Likewise.
3478         (DR_LEN_4): Likewise.
3479         (DR_LEN_8): Likewise.
3480         (DR_LOCAL_ENABLE_SHIFT): Likewise.
3481         (DR_GLOBAL_ENABLE_SHIFT): Likewise.
3482         (DR_ENABLE_SIZE): Likewise.
3483         (DR_LOCAL_SLOWDOWN): Likewise.
3484         (DR_GLOBAL_SLOWDOWN): Likewise.
3485         (DR_CONTROL_RESERVED): Likewise.
3486         (I386_DR_CONTROL_MASK): Likewise.
3487         (I386_DR_VACANT): Likewise.
3488         (I386_DR_LOCAL_ENABLE): Likewise.
3489         (I386_DR_GLOBAL_ENABLE): Likewise.
3490         (I386_DR_DISABLE): Likewise.
3491         (I386_DR_SET_RW_LEN): Likewise.
3492         (I386_DR_GET_RW_LEN): Likewise.
3493         (I386_DR_WATCH_HIT): Likewise.
3494         (i386_wp_op_t): Likewise.
3495         (i386_show_dr): Likewise.
3496         (i386_length_and_rw_bits): Likewise.
3497         (i386_insert_aligned_watchpoint): Likewise.
3498         (i386_remove_aligned_watchpoint): Likewise.
3499         (i386_handle_nonaligned_watchpoint): Likewise.
3500         i386_update_inferior_debug_regs(): Likewise.
3501         (i386_dr_insert_watchpoint): Likewise.
3502         (i386_dr_remove_watchpoint): Likewise.
3503         (i386_dr_region_ok_for_watchpoint): Likewise.
3504         (i386_dr_stopped_data_address): Likewise.
3505         (i386_dr_stopped_by_watchpoint): Likewise.
3506
3507 2014-06-19  Gary Benson  <gbenson@redhat.com>
3508
3509         * i386-low.c (i386_dr_show): Renamed to
3510         i386_show_dr and made static.  All uses updated.
3511         (i386_dr_length_and_rw_bits): Renamed to
3512         i386_length_and_rw_bits and made static.
3513         All uses updated.
3514         (i386_dr_insert_aligned_watchpoint): Renamed to
3515         i386_insert_aligned_watchpoint and made static.
3516         All uses updated.
3517         (i386_dr_remove_aligned_watchpoint): Renamed to
3518         i386_remove_aligned_watchpoint and made static.
3519         All uses updated.
3520         (i386_dr_update_inferior_debug_regs): Renamed to
3521         i386_update_inferior_debug_regs and made static.
3522         All uses updated.
3523
3524 2014-06-18  Gary Benson  <gbenson@redhat.com>
3525
3526         * i386-low.h (i386_dr_low_can_set_addr): New macro.
3527         (i386_dr_low_can_set_control): Likewise.
3528         (i386_get_debug_register_length): Likewise.
3529         * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
3530         (i386_dr_low_can_set_control): Likewise.
3531         (i386_get_debug_register_length): Likewise.
3532
3533 2014-06-17  Gary Benson  <gbenson@redhat.com>
3534
3535         * i386-low.h (i386-dregs.h): New include.
3536         (DR_FIRSTADDR): Now in i386-dregs.h.
3537         (DR_LASTADDR): Likewise.
3538         (DR_NADDR): Likewise.
3539         (DR_STATUS): Likewise.
3540         (DR_CONTROL): Likewise.
3541         (i386_debug_reg_state): Likewise.
3542         (i386_dr_insert_watchpoint): Likewise.
3543         (i386_dr_remove_watchpoint): Likewise.
3544         (i386_dr_region_ok_for_watchpoint): Likewise.
3545         (i386_dr_stopped_data_address): Likewise.
3546         (i386_dr_stopped_by_watchpoint): Likewise.
3547         * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
3548
3549 2014-06-18  Gary Benson  <gbenson@redhat.com>
3550
3551         * i386-low.h (i386_low_insert_watchpoint): Renamed to
3552         i386_dr_insert_watchpoint.
3553         (i386_low_remove_watchpoint): Renamed to
3554         i386_dr_remove_watchpoint.
3555         (i386_low_region_ok_for_watchpoint): Renamed to
3556         i386_dr_region_ok_for_watchpoint.
3557         (i386_low_stopped_data_address): Renamed to
3558         i386_dr_stopped_data_address.
3559         (i386_low_stopped_by_watchpoint): Renamed to
3560         i386_dr_stopped_by_watchpoint.
3561         * i386-low.c (i386_show_dr): Renamed to
3562         i386_dr_show and made nonstatic.  All uses updated.
3563         (i386_length_and_rw_bits): Renamed to
3564         i386_dr_length_and_rw_bits and made nonstatic.
3565         All uses updated.
3566         (i386_insert_aligned_watchpoint): Renamed to
3567         i386_dr_insert_aligned_watchpoint and made nonstatic.
3568         All uses updated.
3569         (i386_remove_aligned_watchpoint): Renamed to
3570         i386_dr_remove_aligned_watchpoint and made nonstatic.
3571         All uses updated.
3572         (i386_update_inferior_debug_regs): Renamed to
3573         i386_dr_update_inferior_debug_regs and made nonstatic.
3574         All uses updated.
3575         (i386_low_insert_watchpoint): Renamed to
3576         i386_dr_insert_watchpoint.  All uses updated.
3577         (i386_low_remove_watchpoint): Renamed to
3578         i386_dr_remove_watchpoint.  All uses updated.
3579         (i386_low_region_ok_for_watchpoint): Renamed to
3580         i386_dr_region_ok_for_watchpoint.  All uses updated.
3581         (i386_low_stopped_data_address): Renamed to
3582         i386_dr_stopped_data_address.  All uses updated.
3583         (i386_low_stopped_by_watchpoint): Renamed to
3584         i386_dr_stopped_by_watchpoint.  All uses updated.
3585
3586 2014-06-18  Gary Benson  <gbenson@redhat.com>
3587
3588         * i386-low.c (i386_dr_low_can_set_addr): New macro.
3589         (i386_dr_low_can_set_control): Likewise.
3590         (i386_insert_aligned_watchpoint): New check.
3591
3592 2014-06-18  Gary Benson  <gbenson@redhat.com>
3593
3594         * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
3595         Renamed to state.
3596
3597 2014-06-18  Gary Benson  <gbenson@redhat.com>
3598
3599         * i386-low.c (i386_length_and_rw_bits): Use internal_error
3600         instead of fatal and error.
3601         (i386_handle_nonaligned_watchpoint): Likewise.
3602
3603 2014-06-18  Gary Benson  <gbenson@redhat.com>
3604
3605         * i386-low.c (i386_get_debug_register_length): New macro.
3606         (TARGET_HAS_DR_LEN_8): Remove conditional.  Use above macro.
3607         (i386_show_dr): Use debug_printf instead of fprintf.  Use
3608         phex to format values.
3609
3610 2014-06-18  Gary Benson  <gbenson@redhat.com>
3611
3612         * i386-low.h: Comment changes.
3613         * i386-low.c: Likewise.
3614
3615 2014-06-18  Gary Benson  <gbenson@redhat.com>
3616
3617         * i386-low.c: Whitespace changes.
3618
3619 2014-06-12  Tom Tromey  <tromey@redhat.com>
3620
3621         * utils.c (freeargv): Remove.
3622
3623 2014-06-12  Tom Tromey  <tromey@redhat.com>
3624
3625         * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3626         * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3627         (parse_debug_format_options): Likewise.
3628         (gdbserver_usage): Likewise.
3629         * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3630         (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3631         (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3632         against libiberty.
3633         ($(LIBGNU)): Depend on libiberty.
3634         (all-lib): Recurse into all subdirs.
3635         (install-only): Invoke "install" target in subdirs.
3636         (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3637         targets.
3638         * configure: Rebuild.
3639         * configure.ac: Add ACX_CONFIGURE_DIR for libiberty.  Don't check
3640         for vasprintf, vsnprintf, or gettimeofday.
3641         * configure.srv: Don't add safe-ctype.o or lbasename.o to
3642         srv_tgtobj.
3643
3644 2014-06-05  Joel Brobecker  <brobecker@adacore.com>
3645
3646         * development.sh: Delete.
3647         * Makefile.in (config.status): Adjust dependency on development.sh.
3648         * configure.ac: Adjust development.sh source call.
3649         * configure: Regenerate.
3650
3651 2014-06-02  Pedro Alves  <palves@redhat.com>
3652
3653         * ax.c (gdb_free_agent_expr): New function.
3654         * ax.h (gdb_free_agent_expr): New declaration.
3655         * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3656         list.
3657         (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3658         static.
3659         (clear_breakpoint_conditions_and_commands): New function.
3660         * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3661         (clear_breakpoint_conditions_and_commands): New declaration.
3662
3663 2014-05-23  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
3664
3665         * linux-aarch64-low.c (asm/ptrace.h): Include.
3666
3667 2014-05-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
3668
3669         Fix TLS access for -static -pthread.
3670         * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3671         (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3672         (thread_db_load_search, try_thread_db_load_1): Initialize it.
3673
3674 2014-05-20  Pedro Alves  <palves@redhat.com>
3675
3676         * linux-aarch64-low.c (aarch64_insert_point)
3677         (aarch64_remove_point): No longer check whether the type is
3678         supported here.  Adjust to new interface.
3679         (the_low_target): Install aarch64_supports_z_point_type as
3680         supports_z_point_type method.
3681         * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3682         (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3683         instead of a Z packet char.  Adjust.
3684         (arm_supports_z_point_type): New function.
3685         (arm_insert_point, arm_remove_point): Adjust to new interface.
3686         (the_low_target): Install arm_supports_z_point_type.
3687         * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3688         (cris_insert_point, cris_remove_point): Adjust to new interface.
3689         Don't check whether the type is supported here.
3690         (the_low_target): Install cris_supports_z_point_type.
3691         * linux-low.c (linux_supports_z_point_type): New function.
3692         (linux_insert_point, linux_remove_point): Adjust to new interface.
3693         * linux-low.h (struct linux_target_ops) <insert_point,
3694         remove_point>: Take an enum raw_bkpt_type instead of a char.  Add
3695         raw_breakpoint pointer parameter.
3696         <supports_z_point_type>: New method.
3697         * linux-mips-low.c (mips_supports_z_point_type): New function.
3698         (mips_insert_point, mips_remove_point): Adjust to new interface.
3699         Use mips_supports_z_point_type.
3700         (the_low_target): Install mips_supports_z_point_type.
3701         * linux-ppc-low.c (the_low_target): Install NULL as
3702         supports_z_point_type method.
3703         * linux-s390-low.c (the_low_target): Install NULL as
3704         supports_z_point_type method.
3705         * linux-sparc-low.c (the_low_target): Install NULL as
3706         supports_z_point_type method.
3707         * linux-x86-low.c (x86_supports_z_point_type): New function.
3708         (x86_insert_point): Adjust to new insert_point interface.  Use
3709         insert_memory_breakpoint.  Adjust to new
3710         i386_low_insert_watchpoint interface.
3711         (x86_remove_point): Adjust to remove_point interface.  Use
3712         remove_memory_breakpoint.  Adjust to new
3713         i386_low_remove_watchpoint interface.
3714         (the_low_target): Install x86_supports_z_point_type.
3715         * lynx-low.c (lynx_target_ops): Install NULL as
3716         supports_z_point_type callback.
3717         * nto-low.c (nto_supports_z_point_type): New.
3718         (nto_insert_point, nto_remove_point): Adjust to new interface.
3719         (nto_target_ops): Install nto_supports_z_point_type.
3720         * mem-break.c: Adjust intro comment.
3721         (struct raw_breakpoint) <raw_type, size>: New fields.
3722         <inserted>: Update comment.
3723         <shlib_disabled>: Delete field.
3724         (enum bkpt_type) <gdb_breakpoint>: Delete value.
3725         <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3726         gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3727         (raw_bkpt_type_to_target_hw_bp_type): New function.
3728         (find_enabled_raw_code_breakpoint_at): New function.
3729         (find_raw_breakpoint_at): New type and size parameters.  Use them.
3730         (insert_memory_breakpoint): New function, based off
3731         set_raw_breakpoint_at.
3732         (remove_memory_breakpoint): New function.
3733         (set_raw_breakpoint_at): Reimplement.
3734         (set_breakpoint): New, based on set_breakpoint_at.
3735         (set_breakpoint_at): Reimplement.
3736         (delete_raw_breakpoint): Go through the_target->remove_point
3737         instead of assuming memory breakpoints.
3738         (find_gdb_breakpoint_at): Delete.
3739         (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3740         (find_gdb_breakpoint): New function.
3741         (set_gdb_breakpoint_at): Delete.
3742         (z_type_supported): New function.
3743         (set_gdb_breakpoint_1): New function, loosely based off
3744         set_gdb_breakpoint_at.
3745         (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3746         (delete_gdb_breakpoint_at): Delete.
3747         (delete_gdb_breakpoint_1): New function, loosely based off
3748         delete_gdb_breakpoint_at.
3749         (delete_gdb_breakpoint): New function.
3750         (clear_gdb_breakpoint_conditions): Rename to ...
3751         (clear_breakpoint_conditions): ... this.  Don't handle a NULL
3752         breakpoint.
3753         (add_condition_to_breakpoint): Make static.
3754         (add_breakpoint_condition): Take a struct breakpoint pointer
3755         instead of an address.  Adjust.
3756         (gdb_condition_true_at_breakpoint): Rename to ...
3757         (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3758         z_type parameter.
3759         (gdb_condition_true_at_breakpoint): Reimplement.
3760         (add_breakpoint_commands): Take a struct breakpoint pointer
3761         instead of an address.  Adjust.
3762         (gdb_no_commands_at_breakpoint): Rename to ...
3763         (gdb_no_commands_at_breakpoint_z_type): ... this.  Add z_type
3764         parameter.  Return true if no breakpoint was found.  Change debug
3765         output.
3766         (gdb_no_commands_at_breakpoint): Reimplement.
3767         (run_breakpoint_commands): Rename to ...
3768         (run_breakpoint_commands_z_type): ... this.  Add z_type parameter,
3769         and change return type to boolean.
3770         (run_breakpoint_commands): New function.
3771         (gdb_breakpoint_here): Also check for Z1 breakpoints.
3772         (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3773         breakpoint.  Go through the_target->remove_point instead of
3774         assuming memory breakpoint.
3775         (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3776         software and hardware breakpoints.
3777         (reinsert_raw_breakpoint): Go through the_target->insert_point
3778         instead of assuming memory breakpoint.
3779         (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3780         software and hardware breakpoints.
3781         (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3782         Check both software and hardware breakpoints.
3783         (validate_inserted_breakpoint): Assert the breakpoint is a
3784         software breakpoint.  Set the inserted flag to -1 instead of
3785         setting shlib_disabled.
3786         (delete_disabled_breakpoints): Adjust.
3787         (validate_breakpoints): Only validate software breakpoints.
3788         Adjust to inserted flag change.
3789         (check_mem_read, check_mem_write): Skip breakpoint types other
3790         than software breakpoints.  Adjust to inserted flag change.
3791         * mem-break.h (enum raw_bkpt_type): New enum.
3792         (raw_breakpoint, struct process_info): Forward declare.
3793         (Z_packet_to_target_hw_bp_type): Delete declaration.
3794         (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3795         (set_gdb_breakpoint, delete_gdb_breakpoint)
3796         (clear_breakpoint_conditions): New declarations.
3797         (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3798         (breakpoint_inserted_here): Update comment.
3799         (add_breakpoint_condition, add_breakpoint_commands): Replace
3800         address parameter with a breakpoint pointer parameter.
3801         (gdb_breakpoint_here): Update comment.
3802         (delete_gdb_breakpoint_at): Delete.
3803         (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3804         * server.c (process_point_options): Take a struct breakpoint
3805         pointer instead of an address.  Adjust.
3806         (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3807         delete_gdb_breakpoint.
3808         * spu-low.c (spu_target_ops): Install NULL as
3809         supports_z_point_type method.
3810         * target.h: Include mem-break.h.
3811         (struct target_ops) <prepare_to_access_memory>: Update comment.
3812         <supports_z_point_type>: New field.
3813         <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3814         instead of a char.  Also take a raw breakpoint pointer.
3815         * win32-arm-low.c (the_low_target): Install NULL as
3816         supports_z_point_type.
3817         * win32-i386-low.c (i386_supports_z_point_type): New function.
3818         (i386_insert_point, i386_remove_point): Adjust to new interface.
3819         (the_low_target): Install i386_supports_z_point_type.
3820         * win32-low.c (win32_supports_z_point_type): New function.
3821         (win32_insert_point, win32_remove_point): Adjust to new interface.
3822         (win32_target_ops): Install win32_supports_z_point_type.
3823         * win32-low.h (struct win32_target_ops):
3824         <supports_z_point_type>: New method.
3825         <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3826         instead of a char.  Also take a raw breakpoint pointer.
3827
3828 2014-05-20  Pedro Alves  <palves@redhat.com>
3829
3830         * mem-break.h: Include break-common.h.
3831         (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3832         (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3833         (Z_packet_to_target_hw_bp_type): New declaration.
3834         * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3835         * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3836         (Z_PACKET_ACCESS_WP): Delete macros.
3837         (Z_packet_to_hw_type): Delete function.
3838         * i386-low.h: Don't include break-common.h here.
3839         (Z_packet_to_hw_type): Delete declaration.
3840         * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3841         Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3842         * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3843         Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3844         * linux-aarch64-low.c: Don't include break-common.h here.
3845         (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3846         (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3847         (Z_packet_to_target_hw_bp_type): Delete function.
3848         * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3849         function.
3850         (mips_insert_point, mips_remove_point): Use
3851         Z_packet_to_target_hw_bp_type.
3852
3853 2014-05-20  Pedro Alves  <palves@redhat.com>
3854
3855         * linux-aarch64-low.c: Include break-common.h.
3856         (enum target_point_type): Delete.
3857         (Z_packet_to_point_type): Rename to ...
3858         (Z_packet_to_target_hw_bp_type): ... this, and return a
3859         target_hw_bp_type instead.
3860         (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3861         instead of an enum target_point_type.
3862         (aarch64_point_encode_ctrl_reg): Likewise.  Compute type mask from
3863         breakpoint type.
3864         (aarch64_dr_state_insert_one_point)
3865         (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3866         (aarch64_handle_aligned_watchpoint)
3867         (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3868         Take an enum target_hw_bp_type instead of an enum
3869         target_point_type.
3870         (aarch64_supports_z_point_type): New function.
3871         (aarch64_insert_point, aarch64_remove_point): Use it.  Adjust to
3872         use Z_packet_to_target_hw_bp_type.
3873
3874 2014-05-20  Joel Brobecker  <brobecker@adacore.com>
3875
3876         * configure.ac: Only use -Werror by default when DEVELOPMENT
3877         is true.
3878         * configure: Regenerate.
3879
3880 2014-05-19  Jan Kratochvil  <jan.kratochvil@redhat.com>
3881
3882         Fix gdbserver qGetTLSAddr for x86_64 -m32.
3883         * linux-x86-low.c (X86_64_USER_REGS): New.
3884         (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3885
3886 2014-04-28  Yao Qi  <yao@codesourcery.com>
3887
3888         * Makefile.in (i386-avx512.c): Fix the typo of generated file
3889         name.
3890
3891 2014-04-25  Pedro Alves  <palves@redhat.com>
3892
3893         PR server/16255
3894         * linux-low.c (linux_attach_fail_reason_string): New function.
3895         (linux_attach_lwp): Delete.
3896         (linux_attach_lwp_1): Rename to ...
3897         (linux_attach_lwp): ... this.  Take a ptid instead of a pid as
3898         argument.  Remove "initial" parameter.  Return int instead of
3899         void.  Don't error or warn here.
3900         (linux_attach): Adjust to call linux_attach_lwp.  Call error on
3901         failure to attach to the tgid.  Call warning when failing to
3902         attach to an lwp.
3903         * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3904         argument.  Remove "initial" parameter.  Return int instead of
3905         void.  Don't error or warn here.
3906         (linux_attach_fail_reason_string): New declaration.
3907         * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3908         interface change.  Use linux_attach_fail_reason_string.
3909
3910 2014-04-24  Michael Sturm  <michael.sturm@mintel.com>
3911             Walfred Tedeschi  <walfred.tedeschi@intel.com>
3912
3913         * Makefile.in: Added rules to handle new files
3914         i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3915         amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3916         * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3917         (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3918         (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3919         (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3920         x32-avx512-linux.o.
3921         (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3922         (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3923         (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3924         i386/x32-avx512.xml.
3925         (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3926         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3927         i386/x32-avx512-linux.xml.
3928         * i387-fp.c (num_avx512_k_registers): New constant for number
3929         of K registers.
3930         (num_avx512_zmmh_low_registers): New constant for number of
3931         lower ZMM registers (0-15).
3932         (num_avx512_zmmh_high_registers): New constant for number of
3933         higher ZMM registers (16-31).
3934         (num_avx512_ymmh_registers): New contant for number of higher
3935         YMM registers (ymm16-31 added by avx521 on x86_64).
3936         (num_avx512_xmm_registers): New constant for number of higher
3937         XMM registers (xmm16-31 added by AVX512 on x86_64).
3938         (struct i387_xsave): Add space for AVX512 registers.
3939         (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3940         Add code to handle AVX512 registers.
3941         (i387_xsave_to_cache): Add code to handle AVX512 registers.
3942         * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3943         prototypei from generated file.
3944         (tdesc_amd64_avx512_linux): Likewise.
3945         (init_registers_x32_avx512_linux): Likewise.
3946         (tdesc_x32_avx512_linux): Likewise.
3947         (init_registers_i386_avx512_linux): Likewise.
3948         (tdesc_i386_avx512_linux): Likewise.
3949         (x86_64_regmap): Add AVX512 registers.
3950         (x86_linux_read_description): Add code to handle AVX512 XSTATE
3951         mask.
3952         (initialize_low_arch): Add code to initialize AVX512 registers.
3953
3954 2014-04-23  Pedro Alves  <palves@redhat.com>
3955
3956         * mem-break.c (find_gdb_breakpoint_at): Make static.
3957         * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3958
3959 2014-04-23  Pedro Alves  <palves@redhat.com>
3960
3961         * i386-low.c: Don't include break-common.h here.
3962         (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3963         prototype to take target_hw_bp_type as argument instead of a Z
3964         packet char.
3965         * i386-low.h: Include break-common.h here.
3966         (Z_packet_to_hw_type): Declare.
3967         (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3968         prototypes.
3969         * linux-x86-low.c (x86_insert_point): Convert the packet number to
3970         a target_hw_bp_type before calling i386_low_insert_watchpoint.
3971         (x86_remove_point): Convert the packet number to a
3972         target_hw_bp_type before calling i386_low_remove_watchpoint.
3973         * win32-i386-low.c (i386_insert_point): Convert the packet number
3974         to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3975         (i386_remove_point): Convert the packet number to a
3976         target_hw_bp_type before calling i386_low_remove_watchpoint.
3977
3978 2014-04-23  Pedro Alves  <palves@redhat.com>
3979
3980         * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3981
3982 2014-04-10  Pedro Alves  <palves@redhat.com>
3983
3984         * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3985         Check if the condition or command is NULL before checking if the
3986         breakpoint is known.  On success, return true.
3987         * mem-break.h (add_breakpoint_condition): Document return.
3988         (add_breakpoint_commands): Add describing comment.
3989         * server.c (skip_to_semicolon): New function.
3990         (process_point_options): Use it.
3991
3992 2014-04-09  Pedro Alves  <palves@redhat.com>
3993
3994         * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3995         to lwpid_of.
3996
3997 2014-02-27  Pedro Alves  <palves@redhat.com>
3998
3999         PR 12702
4000         * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
4001         macros.
4002         * linux-low.c (delete_lwp, handle_extended_wait): Add debug
4003         output.
4004         (last_thread_of_process_p): Take a PID argument instead of a
4005         thread pointer.
4006         (linux_wait_for_lwp): Delete.
4007         (num_lwps, check_zombie_leaders, not_stopped_callback): New
4008         functions.
4009         (linux_low_filter_event): New function, party factored out from
4010         linux_wait_for_event.
4011         (linux_wait_for_event): Rename to ...
4012         (linux_wait_for_event_filtered): ... this.  Add new filter ptid
4013         argument.  Partly rewrite.  Always use waitpid(-1, WNOHANG) and
4014         sigsuspend.  Check for zombie leaders.
4015         (linux_wait_for_event): Reimplement as wrapper around
4016         linux_wait_for_event_filtered.
4017         (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED.  Assume that if
4018         a normal or signal exit is seen, it's the whole process exiting.
4019         (wait_for_sigstop): No longer a for_each_inferior callback.
4020         Rewrite on top of linux_wait_for_event_filtered.
4021         (stop_all_lwps): Call wait_for_sigstop directly.
4022         * server.c (resume, handle_target_event): Handle
4023         TARGET_WAITKIND_NO_RESUMED.
4024
4025 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
4026
4027         * win32-low.c (psapi_get_dll_name,
4028         * win32_CreateToolhelp32Snapshot): Delete.
4029         (win32_CreateToolhelp32Snapshot, win32_Module32First)
4030         (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
4031         Delete.
4032         (handle_load_dll): Add function description.
4033         Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
4034
4035 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
4036
4037         * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
4038         Add comment.
4039         (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
4040         base address when calling win32_add_one_solib.
4041         (handle_load_dll): Delete local variable load_addr.
4042         Remove 0x1000 offset applied to DLL base address when calling
4043         win32_add_one_solib.
4044         (handle_unload_dll): Add comment.
4045
4046 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
4047
4048         * win32-low.c (win32_add_all_dlls): Renames
4049         win32_ensure_ntdll_loaded.  Rewrite function documentation.
4050         Adjust implementation to always load all DLLs.
4051         Add 0x1000 offset to DLL base address when calling
4052         win32_add_one_solib.
4053         (child_initialization_done): New static global.
4054         (do_initial_child_stuff): Set child_initialization_done to
4055         zero during child initialization, and 1 after.  Replace call
4056         to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
4057         Add comment.
4058         (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
4059         (handle_unload_dll): Add function documentation.
4060         (get_child_debug_event): Ignore load and unload DLL events
4061         during child initialization.
4062
4063 2014-02-20  Doug Evans  <dje@google.com>
4064
4065         Remove global all_lwps.
4066         * inferiors.h (ptid_of): Move here from linux-low.h.
4067         (pid_of, lwpid_of): Ditto.
4068         * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
4069         parameter is a struct thread_info * now.
4070         (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
4071         directly.  Pass &all_threads to find_inferior instead of &all_lwps.
4072         (aarch64_stopped_data_address): Fetch lwpid from current_inferior
4073         directly.
4074         (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
4075         (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
4076         * linux-arm-low.c (update_registers_callback): Update, "entry"
4077         parameter is a struct thread_info * now.
4078         Fetch lwpid from current_inferior directly.
4079         (arm_insert_point): Pass &all_threads to find_inferior instead of
4080         &all_lwps.
4081         (arm_remove_point): Ditto.
4082         (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
4083         (arm_prepare_to_resume): Fetch pid from thread.
4084         (arm_read_description): Fetch lwpid from current_inferior directly.
4085         * linux-low.c (all_lwps): Delete.
4086         (delete_lwp): Delete call to remove_inferior.
4087         (handle_extended_wait): Fetch lwpid from thread.
4088         (add_lwp): Don't set lwp->entry.id.  Remove call to
4089         add_inferior_to_list.
4090         (linux_attach_lwp_1): Fetch pid from current_inferior directly.
4091         (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
4092         (kill_one_lwp_callback): Ditto.
4093         (linux_kill): Don't dereference NULL pointer.
4094         Fetch ptid,lwpid from thread.
4095         (get_detach_signal): Fetch ptid from thread.
4096         (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
4097         Simplify call to regcache_invalidate_thread.
4098         (delete_lwp_callback): Update, "entry" parameter is a
4099         struct thread_info * now.  Fetch pid from thread.
4100         (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
4101         (status_pending_p_callback): Update, "entry" parameter is a
4102         struct thread_info * now.  Fetch ptid from thread.
4103         (find_lwp_pid): Update, "entry" parameter is a
4104         struct thread_info * now.
4105         (linux_wait_for_lwp): Fetch pid from thread.
4106         (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
4107         (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
4108         (enqueue_one_deferred_signal): Fetch lwpid from thread.
4109         (dequeue_one_deferred_signal): Ditto.
4110         (cancel_breakpoint): Fetch ptid from current_inferior.
4111         (linux_wait_for_event): Pass &all_threads to find_inferior,
4112         not &all_lwps.  Fetch ptid, lwpid from thread.
4113         (count_events_callback): Update, "entry" parameter is a
4114         struct thread_info * now.
4115         (select_singlestep_lwp_callback): Ditto.
4116         (select_event_lwp_callback): Ditto.
4117         (cancel_breakpoints_callback): Ditto.
4118         (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
4119         not &all_lwps.
4120         (select_event_lwp): Ditto.  Fetch ptid from event_thread.
4121         (unsuspend_one_lwp): Update, "entry" parameter is a
4122         struct thread_info * now.
4123         (unsuspend_all_lwps): Pass &all_threads to find_inferior,
4124         not &all_lwps.
4125         (linux_stabilize_threads): Ditto.  And for for_each_inferior.
4126         Fetch lwpid from thread, not lwp.
4127         (linux_wait_1): Fetch ptid, lwpid from current_inferior.
4128         Pass &all_threads to find_inferior, not &all_lwps.
4129         (send_sigstop): Fetch lwpid from thread, not lwp.
4130         (send_sigstop_callback): Update, "entry" parameter is a
4131         struct thread_info * now.
4132         (suspend_and_send_sigstop_callback): Ditto.
4133         (wait_for_sigstop): Ditto.  Fetch ptid, lwpid from thread, lwp.
4134         (stuck_in_jump_pad_callback): Update, "entry" parameter is a
4135         struct thread_info * now.
4136         (move_out_of_jump_pad_callback): Ditto.  Fetch ptid, lwpid
4137         from thread, lwp.
4138         (lwp_running): Update, "entry" parameter is a
4139         struct thread_info * now.
4140         (stop_all_lwps): Fetch ptid from thread.
4141         Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
4142         (linux_resume_one_lwp): Fetch lwpid from thread.
4143         (linux_set_resume_request): Update, "entry" parameter is a
4144         struct thread_info * now.  Fetch pid, lwpid from thread.
4145         (resume_status_pending_p): Update, "entry" parameter is a
4146         struct thread_info * now.
4147         (need_step_over_p): Ditto.  Fetch lwpid from thread.
4148         (start_step_over): Fetch lwpid from thread.
4149         (linux_resume_one_thread): Update, "entry" parameter is a
4150         struct thread_info * now.  Fetch lwpid from thread.
4151         (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
4152         (proceed_one_lwp): Update, "entry" parameter is a
4153         struct thread_info * now.  Fetch lwpid from thread.
4154         (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
4155         struct thread_info * now.
4156         (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
4157         (unstop_all_lwps): Ditto.  Fetch lwpid from thread.
4158         (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
4159         directly.
4160         (regsets_store_inferior_registers): Ditto.
4161         (fetch_register, store_register): Ditto.
4162         (linux_read_memory, linux_write_memory): Ditto.
4163         (linux_request_interrupt): Ditto.
4164         (linux_read_auxv): Ditto.
4165         (linux_xfer_siginfo): Ditto.
4166         (linux_qxfer_spu): Ditto.
4167         (linux_qxfer_libraries_svr4): Ditto.
4168         * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
4169         moved to inferiors.h.
4170         (get_lwp): Delete.
4171         (get_thread_lwp): Update.
4172         (struct lwp_info): Delete member "entry".  Simplify comment for
4173         member "thread".
4174         (all_lwps): Delete.
4175         * linux-mips-low.c (mips_read_description): Fetch lwpid from
4176         current_inferior directly.
4177         (update_watch_registers_callback): Update, "entry" parameter is a
4178         struct thread_info * now.  Fetch pid from thread.
4179         (mips_linux_prepare_to_resume): Fetch ptid from thread.
4180         (mips_insert_point): Fetch lwpid from current_inferior.
4181         Pass &all_threads to find_inferior, not &all_lwps.
4182         (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
4183         (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
4184         directly.
4185         (mips_stopped_data_address): Ditto.
4186         * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
4187         directly.
4188         * linux-tile-low.c (tile_arch_setup): Ditto.
4189         * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
4190         (update_debug_registers_callback): Update, "entry" parameter is a
4191         struct thread_info * now.  Fetch pid from thread.
4192         (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
4193         Pass &all_threads to find_inferior, not &all_lwps.
4194         (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
4195         (i386_dr_low_set_control): Fetch pid from current_inferior directly.
4196         Pass &all_threads to find_inferior, not &all_lwps.
4197         (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
4198         (i386_dr_low_get_status): Ditto.
4199         (x86_linux_prepare_to_resume): Fetch ptid from thread.
4200         (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
4201         (x86_linux_read_description): Ditto.
4202         * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
4203
4204 2014-02-20  Doug Evans  <dje@google.com>
4205
4206         * inferiors.c (get_first_inferior): Fix buglet.
4207
4208 2014-02-19  Doug Evans  <dje@google.com>
4209
4210         * gdbthread.h (add_thread): Change result type to struct thread_info *.
4211         * inferiors.c (add_thread): Change result type to struct thread_info *.
4212         All callers updated.
4213         (add_lwp): Call add_thread here instead of in callers.
4214         All callers updated.
4215         * linux-low.h (get_lwp_thread): Rewrite.
4216         (struct lwp_info): New member "thread".
4217
4218 2014-02-19  Doug Evans  <dje@google.com>
4219
4220         * linux-low.c (add_lwp): Change result to struct lwp_info *.
4221         All callers updated.
4222
4223 2014-02-19  Doug Evans  <dje@google.com>
4224
4225         * inferiors.c (add_thread): Fix whitespace.
4226
4227 2014-02-19  Doug Evans  <dje@google.com>
4228
4229         * dll.c (clear_dlls): Replace accessing list implemention details
4230         with API function.
4231         * gdbthread.h (get_first_thread): Declare.
4232         * inferiors.c (for_each_inferior_with_data): New function.
4233         (get_first_thread): New function.
4234         (find_thread_ptid): Simplify.
4235         (get_first_inferior): New function.
4236         (clear_list): Delete.
4237         (one_inferior_p): New function.
4238         (clear_inferior_list): New function.
4239         (clear_inferiors): Update.
4240         * inferiors.h (for_each_inferior_with_data): Declare.
4241         (clear_inferior_list): Declare.
4242         (one_inferior_p): Declare.
4243         (get_first_inferior): Declare.
4244         * linux-low.c (linux_wait_for_event): Replace accessing list
4245         implemention details with API function.
4246         * server.c (target_running): Ditto.
4247         (accumulate_file_name_length): New function.
4248         (emit_dll_description): New function.
4249         (handle_qxfer_libraries): Replace accessing list implemention
4250         details with API function.
4251         (handle_qxfer_threads_worker): New function.
4252         (handle_qxfer_threads_proper): Replace accessing list implemention
4253         details with API function.
4254         (handle_query): Ditto.
4255         (visit_actioned_threads_callback_ftype): New typedef.
4256         (visit_actioned_threads_data): New struct.
4257         (visit_actioned_threads): Rewrite to be find_inferior callback.
4258         (resume): Call find_inferior.
4259         (handle_status): Replace accessing list implemention
4260         details with API function.
4261         (process_serial_event): Replace accessing list implemention details
4262         with API function.
4263         * target.c (set_desired_inferior): Replace accessing list implemention
4264         details with API function.
4265         * tracepoint.c (same_process_p): New function.
4266         (gdb_agent_about_to_close): Replace accessing list implemention
4267         details with API function.
4268         * win32-low.c (child_delete_thread): Replace accessing list
4269         implemention details with API function.
4270         (match_dll_by_basename): New function.
4271         (dll_is_loaded_by_basename): New function.
4272         (win32_ensure_ntdll_loaded): Replace accessing list implemention
4273         details call to dll_is_loaded_by_basename.
4274
4275 2014-02-19  Doug Evans  <dje@google.com>
4276
4277         * dll.h (struct dll_info): Add comment.
4278         * gdbthread.h (struct thread_info): Add comment.
4279         (current_ptid): Simplify.
4280         * inferiors.c (add_process): Update.
4281         (remove_process): Update.
4282         * inferiors.h (struct process_info): Rename member "head" to "entry".
4283         * linux-low.c (delete_lwp): Update.
4284         (add_lwp): Update.
4285         (last_thread_of_process_p): Update.
4286         (kill_one_lwp_callback, linux_kill): Update.
4287         (status_pending_p_callback): Update.
4288         (wait_for_sigstop): Update.  Simplify read of ptid.
4289         (start_step_over): Update.
4290         * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
4291         (get_lwp_thread): Update.
4292         (struct lwp_info): Rename member "head" to "entry".
4293         * regcache.h (inferior_list_entry): Delete.
4294         * server.c (kill_inferior_callback): Update.
4295         (detach_or_kill_inferior_callback): Update.
4296         (print_started_pid): Update.
4297         (print_attached_pid): Update.
4298         (process_serial_event): Simplify read of ptid.
4299         * thread-db.c (thread_db_create_event): Update.
4300         (thread_db_get_tls_address): Update.
4301         * win32-low.c (current_inferior_ptid): Simplify.
4302
4303 2014-02-19  Tom Tromey  <tromey@redhat.com>
4304
4305         * target.h (struct target_ops) <supports_btrace>: Add target_ops
4306         argument.
4307         (target_supports_btrace): Update.
4308
4309 2014-02-14  Yao Qi  <yao@codesourcery.com>
4310
4311         * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
4312         (rsp-low-ipa.o): New target.
4313
4314 2014-02-12  Tom Tromey  <tromey@redhat.com>
4315
4316         * ax.c (gdb_parse_agent_expr): Use hex2bin, not
4317         convert_ascii_to_int.
4318         * regcache.c (registers_to_string): Likewise.
4319         * remote-utils.c (decode_M_packet): Likewise.
4320         * server.c (process_serial_event): Likewise.
4321
4322 2014-02-12  Tom Tromey  <tromey@redhat.com>
4323
4324         * server.c (handle_query, handle_v_run): Use hex2bin, not
4325         unhexify.
4326         * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
4327
4328 2014-02-12  Tom Tromey  <tromey@redhat.com>
4329
4330         * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
4331         convert_int_to_ascii.
4332         * regcache.c (registers_to_string, collect_register_as_string):
4333         Likewise.
4334         * remote-utils.c (look_up_one_symbol, relocate_instruction):
4335         Likewise.
4336         * server.c (process_serial_event): Likewise.
4337         * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
4338         (cmd_qtbuffer, cstr_to_hexstr): Likewise.
4339
4340 2014-02-12  Tom Tromey  <tromey@redhat.com>
4341
4342         * remote-utils.c (look_up_one_symbol, monitor_output): Use
4343         bin2hex, not hexify.
4344         * tracepoint.c (cmd_qtstatus): Likewise.
4345
4346 2014-02-12  Tom Tromey  <tromey@redhat.com>
4347
4348         * remote-utils.c (monitor_output): Pass explicit length to
4349         hexify.
4350
4351 2014-02-12  Tom Tromey  <tromey@redhat.com>
4352
4353         * tracepoint.c: Include rsp-low.h.
4354         * server.c: Include rsp-low.h.
4355         * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
4356         (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
4357         declare.
4358         * remote-utils.c: Include rsp-low.h.
4359         (fromhex, hexchars, ishex, unhexify, tohex, hexify)
4360         (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
4361         (convert_int_to_ascii, convert_ascii_to_int): Move to
4362         common/rsp-low.c.
4363         * regcache.c: Include rsp-low.h.
4364         * ax.c: Include rsp-low.h.
4365         * Makefile.in (SFILES): Add common/rsp-low.c.
4366         (OBS): Add rsp-low.o.
4367         (rsp-low.o): New target.
4368
4369 2014-02-12  Tom Tromey  <tromey@redhat.com>
4370
4371         * utils.h (pulongest, plongest, phex_nz): Don't declare.
4372         Include print-utils.h.
4373         * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
4374         (plongest, thirty_two, phex_nz): Remove.
4375         * Makefile.in (SFILES): Add common/print-utils.c.
4376         (OBS): Add print-utils.o.
4377         (print-utils-ipa.o): New target.
4378         (print-utils.o): New target.
4379         (IPA_OBJS): Add print-utils-ipa.o.
4380
4381 2014-02-06  Tom Tromey  <tromey@redhat.com>
4382
4383         * Makefile.in (SFILES): Fix indentation.
4384
4385 2014-02-05  Doug Evans  <dje@google.com>
4386
4387         * linux-low.c (linux_wait_for_event): Improve comment.
4388         (linux_wait_1): Keep current_inferior in sync with event_child.
4389
4390 2014-01-22  Doug Evans  <dje@google.com>
4391
4392         * gdbthread.h (gdb_id_to_thread): Delete, unused.
4393
4394 2014-01-22  Doug Evans  <dje@google.com>
4395
4396         * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
4397         * configure: Regenerate.
4398         * config.in: Regenerate.
4399         * Makefile.in (SFILES): Add debug.c.
4400         (OBS): Add debug.o.
4401         * debug.c: New file.
4402         * debug.h: New file.
4403         * linux-aarch64-low.c (*): Update all debugging printfs to use
4404         debug_printf instead of fprintf.
4405         * linux-arm-low.c (*): Ditto.
4406         * linux-cris-low.c (*): Ditto.
4407         * linux-crisv32-low.c (*): Ditto.
4408         * linux-m32r-low.c (*): Ditto.
4409         * linux-sparc-low.c (*): Ditto.
4410         * linux-x86.c (*): Ditto.
4411         * linux-low.c (*): Ditto.
4412         (linux_wait_1): Add calls to debug_enter, debug_exit.
4413         (linux_wait): Remove redundant debugging printf.
4414         (stop_all_lwps): Add calls to debug_enter, debug_exit.
4415         (linux_resume, unstop_all_lwps): Ditto.
4416         * mem-break.c (*): Update all debugging printfs to use
4417         debug_printf instead of fprintf.
4418         * remote-utils.c (*): Ditto.
4419         * thread-db.c (*): Ditto.
4420         * server.c #include <ctype.h>, "gdb_vecs.h".
4421         (debug_threads): Moved to debug.c.
4422         (*): Update all debugging printfs to use debug_printf instead of
4423         fprintf.
4424         (start_inferior): Replace call to fflush with call to debug_flush.
4425         (monitor_show_help): Mention set debug-format.
4426         (parse_debug_format_options): New function.
4427         (handle_monitor_command): Handle "monitor set debug-format".
4428         (gdbserver_usage): Mention --debug-format.
4429         (main): Parse --debug-format.
4430         * server.h (debug_threads): Declaration moved to debug.h.
4431         #include "debug.h".
4432         * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
4433         trace_debug_1 that uses debug_printf.
4434         (tracepoint_look_up_symbols): Update all debugging printfs to use
4435         debug_printf instead of fprintf.
4436
4437 2014-01-20  Baruch Siach  <baruch@tkos.co.il>
4438
4439         * linux-xtensa-low.c: Include asm/ptrace.h instead of
4440         sys/ptrace.h.
4441
4442 2014-01-17  Pedro Alves  <palves@redhat.com>
4443
4444         PR build/16445
4445         * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
4446         defined after including gdb_proc_service.h.
4447
4448 2014-01-16  Doug Evans  <dje@google.com>
4449
4450         * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
4451         (match_dll): Use it.
4452
4453 2014-01-16  Markus Metzger  <markus.t.metzger@intel.com>
4454
4455         * target.h (target_ops) <read_btrace>: Change parameters and
4456         return type to allow error reporting.
4457         * server.c (handle_qxfer_btrace): Support delta reads.  Pass
4458         trace reading errors on.
4459         * linux-low.c (linux_low_read_btrace): Pass trace reading
4460         errors on.
4461         (linux_low_disable_btrace): New.
4462
4463 2014-01-15  Doug Evans  <dje@google.com>
4464
4465         * inferiors.c (thread_id_to_gdb_id): Delete.
4466         * inferiors.h (thread_id_to_gdb_id): Delete.
4467
4468 2014-01-13  Eli Zaretskii  <eliz@gnu.org>
4469
4470         * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
4471         "-I$(srcdir)/../".  Fixes MinGW compilation errors with old GCC
4472         versions.
4473
4474 2014-01-08  Pedro Alves  <palves@redhat.com>
4475
4476         * server.c (handle_status): Don't discard previous queued stop
4477         replies or thread's pending status here.
4478         (main) <disconnection>: Do it here instead.
4479
4480 2014-01-08  Pedro Alves  <palves@redhat.com>
4481
4482         * gdbthread.h (struct thread_info) <status_pending_p>: New field.
4483         * server.c (visit_actioned_threads, handle_pending_status): New
4484         function.
4485         (handle_v_cont): Factor out parts to ...
4486         (resume): ... this new function.  If in all-stop, and a thread
4487         being resumed has a pending status, report it without actually
4488         resuming.
4489         (myresume): Adjust to use the new 'resume' function.
4490         (clear_pending_status_callback, set_pending_status_callback)
4491         (find_status_pending_thread_callback): New functions.
4492         (handle_status): Handle the case of multiple threads having
4493         interesting statuses to report.  Report threads' real last signal
4494         instead of always reporting GDB_SIGNAL_TRAP.  Look for a thread
4495         with an interesting thread to report the status for, instead of
4496         always reporting the status of the first thread.
4497
4498 2014-01-01  Joel Brobecker  <brobecker@adacore.com>
4499
4500         * gdbserver.c (gdbserver_version): Set copyright year to 2014.
4501         * gdbreplay.c (gdbreplay_version): Likewise.
4502
4503 2013-12-18  Yufeng Zhang  <yufeng.zhang@arm.com>
4504
4505         * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
4506         iov.iov_len with the real length in use.
4507
4508 2013-12-13  Joel Brobecker  <brobecker@adacore.com>
4509
4510         * Makefile.in (safe-ctype.o, lbasename.o): New rules.
4511         * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
4512         for all targets that use win32-low.c.
4513         * win32-low.c (win32_ensure_ntdll_loaded): New function.
4514         (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
4515
4516 2013-12-13  Pedro Alves  <palves@redhat.com>
4517
4518         * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
4519         if equal to TARGET_WAITKIND_LOADED.
4520         * win32-low.c (cached_status): New static global.
4521         (win32_wait): Add declaration.
4522         (do_initial_child_stuff): Flush all initial pending debug events
4523         up to the initial breakpoint.
4524         (win32_wait): If CACHED_STATUS was set, return that instead
4525         of doing a real wait.  Remove the code resuming the execution
4526         of the inferior after receiving a TARGET_WAITKIND_LOADED event
4527         during the initial phase.  Also remove the code changing
4528         OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
4529         TARGET_WAITKIND_STOPPED.
4530
4531 2013-12-11  Yao Qi  <yao@codesourcery.com>
4532
4533         * notif.c (handle_notif_ack): Return 0 if no notification
4534         matches.
4535
4536 2013-11-20  Doug Evans  <dje@google.com>
4537
4538         * linux-low.c (linux_set_resume_request): Fix comment.
4539
4540 2013-11-20  Doug Evans  <dje@google.com>
4541
4542         * linux-low.c (resume_status_pending_p): Tweak comment.
4543
4544 2013-11-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4545
4546         * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
4547         amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
4548         * configure.srv (srv_i386_regobj): Add i386-mpx.o.
4549         (srv_i386_linux_regobj): Add i386-mpx-linux.o.
4550         (srv_amd64_regobj): Add amd64-mpx.o.
4551         (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
4552         (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
4553         (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
4554         * i387-fp.c (num_pl_bnd_register) Added constant.
4555         (num_pl_bnd_cfg_registers) Added constant.
4556         (struct i387_xsave) Added reserved area and MPX fields.
4557         (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
4558         * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
4559         function.
4560         (tdesc_i386_mpx_linux): Add MPX amd64 target.
4561         (init_registers_amd64_mpx_linux): Declare new function.
4562         (tdesc_amd64_mpx_linux): Add MPX amd64 target.
4563         (x86_64_regmap): Add MPX registers.
4564         (x86_linux_read_description): Add MPX case.
4565         (initialize_low_arch): Initialize MPX targets.
4566
4567 2013-11-18  Tom Tromey  <tromey@redhat.com>
4568
4569         * configure: Rebuild.
4570         * configure.ac: Don't check for stdlib.h.
4571         * gdbreplay.c: Unconditionally include stdlib.h.
4572
4573 2013-11-18  Tom Tromey  <tromey@redhat.com>
4574
4575         * config.in: Rebuild.
4576         * configure: Rebuild.
4577         * configure.ac: Don't use AC_HEADER_DIRENT.
4578
4579 2013-11-18  Tom Tromey  <tromey@redhat.com>
4580
4581         * server.h: Don't check HAVE_STRING_H.
4582         * gdbreplay.c: Don't check HAVE_STRING_H.
4583         * configure: Rebuild.
4584
4585 2013-11-18  Tom Tromey  <tromey@redhat.com>
4586
4587         * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
4588         LIBGNU.
4589
4590 2013-11-08  Tom Tromey  <tromey@redhat.com>
4591
4592         * configure, config.in: Rebuild.
4593         * configure.ac: Remove unused configury.
4594
4595 2013-11-08  Tom Tromey  <tromey@redhat.com>
4596
4597         * acinclude.m4: Include common.m4, codeset.m4.
4598         * configure, config.in: Rebuild.
4599         * configure.ac: Use GDB_AC_COMMON.
4600
4601 2013-11-06  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4602
4603         * linux-s390-low.c (HWCAP_S390_TE): New define.
4604         (s390_arch_setup): Consider the TE field in the HWCAP for
4605         determining 'have_regset_tdb'.
4606
4607 2013-10-16  Sergio Durigan Junior  <sergiodj@redhat.com>
4608
4609         PR gdb/16014
4610         * tracepoint.c (download_tracepoint_1): Remove unnecessary double
4611         call to sizeof.
4612
4613 2013-10-02  Pedro Alves  <palves@redhat.com>
4614
4615         * server.c (process_serial_event): Don't output "GDBserver
4616         exiting" if GDB is connected through stdio.
4617         * target.c (mywait): Likewise, be silent if GDB is connected
4618         through stdio.
4619
4620 2013-10-01  Joel Brobecker  <brobecker@adacore.com>
4621
4622         * lynx-low.c (lynx_add_threads_after_attach): New function.
4623         (lynx_attach): Remove call to add_thread.  Add call to
4624         lynx_add_threads_after_attach instead.
4625
4626 2013-09-28  Mike Frysinger  <vapier@gentoo.org>
4627
4628         * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4629         * config.in, configure: Regenerated.
4630
4631 2013-09-18  Yao Qi  <yao@codesourcery.com>
4632
4633         PR server/15959
4634         * server.c (start_inferior): Clear 'resume_info'.
4635
4636 2013-09-16  Jiong Wang  <jiwang@tilera.com>
4637
4638         * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4639         for each register.
4640
4641 2013-09-16  Jiong Wang  <jiwang@tilera.com>
4642
4643         * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4644         linux-tile-low.o to srv_tgtobj.
4645
4646 2013-09-16  Will Newton  <will.newton@linaro.org>
4647
4648         * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4649         out regs.
4650
4651 2013-09-06  Pedro Alves  <palves@redhat.com>
4652
4653         * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4654         (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4655         (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4656         (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4657         (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4658         (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4659
4660 2013-09-06  Pedro Alves  <palves@redhat.com>
4661
4662         * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4663         explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4664
4665 2013-09-06  Pedro Alves  <palves@redhat.com>
4666
4667         * linux-amd64-ipa.c: Include tracepoint.h.
4668         * linux-i386-ipa.c: Include tracepoint.h.
4669
4670 2013-09-06  Ricard Wanderlof  <ricardw@axis.com>
4671
4672         * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4673         (ps_get_thread_area): New function.
4674
4675 2013-09-06  Ricard Wanderlof  <ricardw@axis.com>
4676
4677         * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4678         (initialize_low_arch): Call init_registers_crisv32 rather than
4679         init_register_crisv32.
4680
4681 2013-09-05  Pedro Alves  <palves@redhat.com>
4682
4683         * server.h (handle_vFile, hostio_last_error_from_errno): Move
4684         to ...
4685         * hostio.h: ... this new file.
4686         * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4687         win32-low.c: Include hostio.h.
4688
4689 2013-09-05  Pedro Alves  <palves@redhat.com>
4690
4691         * server.h (gdb_client_data, handler_func, callback_handler_func)
4692         (delete_file_handler, add_file_handler, append_callback_event)
4693         (delete_callback_event, start_event_loop, initialize_event_loop):
4694         Move to event-loop.h and include it.
4695         * event-loop.h: New file.
4696
4697 2013-09-05  Pedro Alves  <palves@redhat.com>
4698
4699         * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4700         * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4701         (loaded_dll, unloaded_dll): Move to ...
4702         * dll.h: ... this new file.
4703         * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4704
4705 2013-09-05  Pedro Alves  <palves@redhat.com>
4706
4707         * server.h (current_process, get_thread_process, all_processes)
4708         (add_inferior_to_list, for_each_inferior, current_inferior)
4709         (remove_inferior, add_process, remove_process, find_process_pid)
4710         (have_started_inferiors_p, have_attached_inferiors_p)
4711         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4712         (clear_inferiors, find_inferior, find_inferior_id)
4713         (inferior_target_data, set_inferior_target_data)
4714         (inferior_regcache_data, set_inferior_regcache_data): Move to
4715         inferiors.h, and include it.
4716         * inferiors.h: New file.
4717
4718 2013-09-05  Pedro Alves  <palves@redhat.com>
4719
4720         * server.h (struct emit_ops, current_insn_ptr, emit_error):
4721         Move ...
4722         * ax.h: ... here.
4723
4724 2013-09-05  Pedro Alves  <palves@redhat.com>
4725
4726         * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4727         tracepoint.h.
4728         * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4729         (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4730         (handle_tracepoint_general_set, handle_tracepoint_query)
4731         (tracepoint_finished_step, tracepoint_was_hit)
4732         (release_while_stepping_state_list, current_traceframe)
4733         (in_readonly_region, traceframe_read_mem)
4734         (fetch_traceframe_registers, traceframe_read_sdata)
4735         (traceframe_read_info, struct fast_tpoint_collect_status)
4736         (fast_tracepoint_collecting, force_unlock_trace_buffer)
4737         (handle_tracepoit_bkpts, initialize_low_tracepoint)
4738         (supply_fast_tracepoint_registers)
4739         (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4740         (ipa_tdesc, claim_trampoline_space)
4741         (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4742         (agent_mem_read, agent_get_trace_state_variable_value)
4743         (agent_set_trace_state_variable_value, agent_tsv_read)
4744         (agent_mem_read_string, get_raw_reg_func_addr)
4745         (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4746         * tracepoint.h: ... this new file.
4747
4748 2013-09-05  Pedro Alves  <palves@redhat.com>
4749
4750         * server.h (perror_with_name, error, fatal, warning, paddress)
4751         (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4752         include it.
4753         * utils.h: New file.
4754
4755 2013-09-05  Pedro Alves  <palves@redhat.com>
4756
4757         * server.h (remote_debug, noack_mode, transport_is_reliable)
4758         (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4759         (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4760         (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4761         (write_enn, initialize_async_io, enable_async_io)
4762         (disable_async_io, check_remote_input_interrupt_request)
4763         (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4764         (dead_thread_notify, prepare_resume_reply)
4765         (decode_address_to_semicolon, decode_address, decode_m_packet)
4766         (decode_M_packet, decode_X_packet, decode_xfer_write)
4767         (decode_search_memory_packet, unhexify, hexify)
4768         (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4769         (look_up_one_symbol, relocate_instruction)
4770         (monitor_output): Move to remote-utils.h, and include it.
4771         * remote-utils.h: New file.
4772
4773 2013-09-05  Pedro Alves  <palves@redhat.com>
4774
4775         * server.h (_): Delete.
4776
4777 2013-09-02  Pedro Alves  <palves@redhat.com>
4778
4779         * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4780         (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4781         allocated.
4782         (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4783
4784 2013-09-02  Pierre Muller  <muller@sourceware.org>
4785
4786         * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4787         or WriteProcessMemory complete successfully and handle
4788         ERROR_PARTIAL_COPY error.
4789
4790 2013-09-02  Pedro Alves  <palves@redhat.com>
4791
4792         * server.c (gdb_read_memory): Return -1 on traceframe memory read
4793         error instead of EIO.
4794
4795 2013-08-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
4796
4797         PR server/15604
4798         * linux-low.c: Include filestuff.h.
4799         (linux_create_inferior) <pid == 0>: Call close_most_fds.
4800         * lynx-low.c: Include filestuff.h.
4801         (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4802         * server.c: Include filestuff.h.
4803         (main): Call notice_open_fds.
4804         * spu-low.c: Include filestuff.h.
4805         (spu_create_inferior) <pid == 0>: Call close_most_fds.
4806
4807 2013-08-22  Luis Machado  <lgustavo@codesourcery.com>
4808
4809         * Makefile.in: Explain why ../target and ../nat are not
4810         listed as include file search paths.
4811         (linux-waitpid.o): New object file rule.
4812         * configure.srv (srv_native_linux_obj): New variable.
4813         Replace all occurrences of linux native object files with
4814         $srv_native_linux_obj.
4815         * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4816         (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4817         (linux_enable_event_reporting): Remove declaration.
4818         (my_waitpid): Moved to common/linux-waitpid.c.
4819         (linux_wait_for_event): Pass ptid when calling
4820         linux_enable_event_reporting.
4821         (linux_supports_tracefork_flag): Remove.
4822         (linux_enable_event_reporting): Likewise.
4823         (linux_tracefork_grandchild): Remove.
4824         (STACK_SIZE): Moved to common/linux-ptrace.c.
4825         (linux_tracefork_child): Remove.
4826         (linux_test_for_tracefork): Remove.
4827         (linux_look_up_symbols): Call linux_supports_traceclone.
4828         (initialize_low): Remove call to linux_test_for_tracefork.
4829         * linux-low.h (PTRACE_TYPE_ARG3): Move to
4830         common/linux-ptrace.h.
4831         (PTRACE_TYPE_ARG4): Likewise.
4832         Include linux-ptrace.h.
4833
4834 2013-08-21  Pedro Alves  <palves@redhat.com>
4835
4836         * config.in: Renegerate.
4837
4838 2013-08-19  Luis Machado  <lgustavo@codesourcery.com>
4839
4840         * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4841         (SFILES): Remove $(srcdir)/common/target-common.c and
4842         add $(srcdir)/target/waitstatus.c.
4843         (OBS): Remove target-common.o and add waitstatus.o.
4844         (server_h): Remove $(srcdir)/../common/target-common.h and
4845         add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4846         and $(srcdir)/../target/waitstatus.h.
4847         (target-common.o): Remove.
4848         (waitstatus.o): New target object file.
4849         * target.h: Do not include target-common.h and
4850         include target/resume.h, target/wait.h and
4851         target/waitstatus.h.
4852
4853 2013-08-13  Luis Machado  <lgustavo@codesourcery.com>
4854
4855         * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4856         to PTRACE_TYPE_ARG3.
4857         * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4858         to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4859         PTRACE_TYPE_ARG4.
4860         * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4861         (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4862
4863 2013-07-27  Jie Zhang  <jie@codesourcery.com>
4864             Daniel Jacobowitz  <dan@codesourcery.com>
4865             Yao Qi  <yao@codesourcery.com>
4866
4867         * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4868         (mips-linux-watch.o): New rule.
4869         (mips_linux_watch_h): New variable.
4870         * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4871         srv_tgtobj.
4872         * linux-mips-low.c: Include mips-linux-watch.h.
4873         (struct arch_process_info, struct arch_lwp_info): New.
4874         (update_watch_registers_callback): New function.
4875         (mips_linux_new_process, mips_linux_new_thread) New functions.
4876         (mips_linux_prepare_to_resume, mips_insert_point): New
4877         functions.
4878         (mips_remove_point, mips_stopped_by_watchpoint): New
4879         functions.
4880         (rsp_bp_type_to_target_hw_bp_type): New function.
4881         (mips_stopped_data_address): New function.
4882         (the_low_target): Add watchpoint support functions.
4883
4884 2013-07-27  Yao Qi  <yao@codesourcery.com>
4885
4886         * i386-low.c: Include break-common.h.
4887         (enum target_hw_bp_type): Remove.
4888
4889 2013-07-24  Luis Machado  <lgustavo@codesourcery.com>
4890
4891         * Makefile.in (SFILES): /common/target-common.c.
4892         (OBS): Add target-common.o.
4893         (server_h): Add $(srcdir)/../common/target-common.h.
4894         (target-common.o): New target.
4895         * server.c (queue_stop_reply_callback): Free
4896         status string after use.
4897         * target.c (target_waitstatus_to_string): Remove.
4898         * target.h: Include target-common.h.
4899         (resume_kind): Likewise.
4900         (target_waitkind): Likewise.
4901         (target_waitstatus): Likewise.
4902         (TARGET_WNOHANG): Likewise.
4903
4904 2013-07-04  Yao Qi  <yao@codesourcery.com>
4905
4906         * Makefile.in (host_alias): Use @host_noncanonical@.
4907         (target_alias): Use @target_noncanonical@.
4908         * configure.ac: Use ACX_NONCANONICAL_TARGET and
4909         ACX_NONCANONICAL_HOST.
4910         * configure: Regenerated.
4911
4912         Revert:
4913         2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>
4914
4915         * configure.ac (version_host, version_target): Set and AC_SUBST them.
4916         * configure: Rebuild.
4917         * Makefile.in (version_host, version_target): Get from configure.
4918         (version.c): Use $(version_host) and $(version_target).
4919
4920 2013-07-03  Pedro Alves  <palves@redhat.com>
4921
4922         * Makefile.in (config.status): Depend on development.sh.
4923         * acinclude.m4: Include libmcheck.m4.
4924         * configure: Regenerate.
4925
4926 2013-07-02  Mircea Gherzan  <mircea.gherzan@intel.com>
4927
4928         * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4929         attribute inside the parentheses.
4930         (winapi_DebugSetProcessKillOnExit): Ditto.
4931         (winapi_DebugBreakProcess): Ditto.
4932         (winapi_GenerateConsoleCtrlEvent): Ditto.
4933
4934 2013-07-02  Mircea Gherzan  <mircea.gherzan@intel.com>
4935
4936         * notif.h (notif_event): Add a dummy member to avoid compiler
4937         errors.
4938
4939 2013-07-01  Pedro Alves  <palves@redhat.com>
4940
4941         * hostio.c (HOSTIO_PATH_MAX): Define.
4942         (require_filename, handle_open, handle_unlink, handle_readlink):
4943         Use it.
4944
4945 2013-07-01  Pedro Alves  <palves@redhat.com>
4946
4947         * server.h: Include "pathmax.h".
4948         * linux-low.c: Don't include sys/param.h.
4949         (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4950         MAXPATHLEN.
4951         * win32-low.c: Don't include sys/param.h.
4952         (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4953
4954 2013-07-01  Pedro Alves  <palves@redhat.com>
4955
4956         * event-loop.c: Don't check HAVE_UNISTD_H before including
4957         <unistd.h>.
4958         * gdbreplay.c: Likewise.
4959         * remote-utils.c: Likewise.
4960         * server.c: Likewise.
4961         * configure.ac: Don't check for unistd.h.
4962         * configure: Regenerate.
4963
4964 2013-06-28  Tom Tromey  <tromey@redhat.com>
4965
4966         * Makefile.in (version.c): Use version.in, not
4967         common/version.in.
4968
4969 2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>
4970
4971         * configure.ac (version_host, version_target): Set and AC_SUBST them.
4972         * configure: Rebuild.
4973         * Makefile.in (version_host, version_target): Get from configure.
4974         (version.c): Use $(version_host) and $(version_target).
4975
4976 2013-06-10  Dmitry Kozlov <ddk@codesourcery.com>
4977
4978         Fix trace-status to output user name without trailing colon.
4979         * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4980
4981 2013-06-10  Dmitry Kozlov <ddk@codesourcery.com>
4982
4983         Fix trace-status to output proper start-time and stop-time.
4984         * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4985         output start time and stop time in hex as gdb expects.
4986
4987 2013-06-26  Pedro Alves  <pedro@codesourcery.com>
4988
4989         * tracepoint.c (build_traceframe_info_xml): Output trace state
4990         variables present in the trace buffer.
4991
4992 2013-06-24  Tom Tromey  <tromey@redhat.com>
4993
4994         * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4995         create-version.sh.
4996         (version.o): Remove.
4997         * gdbreplay.c: Include version.h.
4998         (version, host_name): Don't declare.
4999         * server.h: Include version.h.
5000         (version, host_name): Don't declare.
5001
5002 2013-06-12  Pedro Alves  <palves@redhat.com>
5003
5004         * linux-x86-low.c (linux_is_elf64): Delete global.
5005         (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
5006         with local linux_pid_exe_is_elf_64_file use.
5007
5008 2013-06-11  Pedro Alves  <palves@redhat.com>
5009
5010         * linux-low.c (regset_disabled, disable_regset): New functions.
5011         (regsets_fetch_inferior_registers)
5012         (regsets_store_inferior_registers): Use them.
5013         (initialize_regsets_info); Don't allocate the disabled_regsets
5014         array here.
5015         * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
5016         comment.
5017
5018 2013-06-11  Pedro Alves  <palves@redhat.com>
5019
5020         * linux-low.c (initialize_regsets_info): Use xcalloc instead of
5021         xmalloc.
5022
5023 2013-06-11  Pedro Alves  <palves@redhat.com>
5024
5025         * linux-x86-low.c (initialize_low_arch): Call
5026         init_registers_x32_avx_linux.
5027
5028 2013-06-09  Jan Kratochvil  <jan.kratochvil@redhat.com>
5029
5030         Fix compatibility with Android Bionic.
5031         * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
5032         it is not empty.
5033
5034 2013-06-07  Pedro Alves  <palves@redhat.com>
5035
5036         PR server/14823
5037         * Makefile.in (OBS): Add tdesc.o.
5038         (IPA_OBJS): Add tdesc-ipa.o.
5039         (tdesc-ipa.o): New rule.
5040         * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
5041         interface.
5042         * linux-low.c (new_inferior): Delete.
5043         (disabled_regsets, num_regsets): Delete.
5044         (linux_add_process): Adjust to set the new per-process
5045         new_inferior flag.
5046         (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
5047         (linux_wait_for_lwp): Adjust.  Only call arch_setup if the event
5048         was a stop.  When calling arch_setup, switch the current inferior
5049         to the thread that got an event.
5050         (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
5051         (regsets_fetch_inferior_registers)
5052         (regsets_store_inferior_registers): New regsets_info parameter.
5053         Adjust to use it.
5054         (linux_register_in_regsets): New regs_info parameter.  Adjust to
5055         use it.
5056         (register_addr, fetch_register, store_register): New usrregs_info
5057         parameter.  Adjust to use it.
5058         (usr_fetch_inferior_registers, usr_store_inferior_registers): New
5059         parameter regs_info.  Adjust to use it.
5060         (linux_fetch_registers): Get the current inferior's regs_info, and
5061         adjust to use it.
5062         (linux_store_registers): Ditto.
5063         [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
5064         (initialize_low): Don't initialize the target_regsets here.  Call
5065         initialize_low_arch.
5066         * linux-low.h (target_regsets): Delete declaration.
5067         (struct regsets_info): New.
5068         (struct usrregs_info): New.
5069         (struct regs_info): New.
5070         (struct process_info_private) <new_inferior>: New field.
5071         (struct linux_target_ops): Delete the num_regs, regmap, and
5072         regset_bitmap fields.  New field regs_info.
5073         [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
5074         * i387-fp.c (num_xmm_registers): Delete.
5075         (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
5076         calls to new interface.
5077         (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
5078         (i387_xsave_to_cache): Adjust find_regno calls to new interface.
5079         Infer the number of xmm registers from the regcache's target
5080         description.
5081         * i387-fp.h (num_xmm_registers): Delete.
5082         * inferiors.c (add_thread): Don't install the thread's regcache
5083         here.
5084         * proc-service.c (gregset_info): Fetch the current inferior's
5085         regs_info.  Adjust to use it.
5086         * regcache.c: Include tdesc.h.
5087         (register_bytes, reg_defs, num_registers)
5088         (gdbserver_expedite_regs): Delete.
5089         (get_thread_regcache): If the thread doesn't have a regcache yet,
5090         create one, instead of aborting gdbserver.
5091         (regcache_invalidate_one): Rename to ...
5092         (regcache_invalidate_thread): ... this.
5093         (regcache_invalidate_one): New.
5094         (regcache_invalidate): Only invalidate registers of the current
5095         process.
5096         (init_register_cache): Add target_desc parameter, and use it.
5097         (new_register_cache): Ditto.  Assert the target description has a
5098         non zero registers_size.
5099         (regcache_cpy): Add assertions.  Adjust.
5100         (realloc_register_cache, set_register_cache): Delete.
5101         (registers_to_string, registers_from_string): Adjust.
5102         (find_register_by_name, find_regno, find_register_by_number)
5103         (register_cache_size): Add target_desc parameter, and use it.
5104         (free_register_cache_thread, free_register_cache_thread_one)
5105         (regcache_release, register_cache_size): New.
5106         (register_size): Add target_desc parameter, and use it.
5107         (register_data, supply_register, supply_register_zeroed)
5108         (supply_regblock, supply_register_by_name, collect_register)
5109         (collect_register_as_string, collect_register_by_name): Adjust.
5110         * regcache.h (struct target_desc): Forward declare.
5111         (struct regcache) <tdesc>: New field.
5112         (init_register_cache, new_register_cache): Add target_desc
5113         parameter.
5114         (regcache_invalidate_thread): Declare.
5115         (regcache_invalidate_one): Delete declaration.
5116         (regcache_release): Declare.
5117         (find_register_by_number, register_cache_size, register_size)
5118         (find_regno): Add target_desc parameter.
5119         (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
5120         declarations.
5121         * remote-utils.c: Include tdesc.h.
5122         (outreg, prepare_resume_reply): Adjust.
5123         * server.c: Include tdesc.h.
5124         (gdbserver_xmltarget): Delete declaration.
5125         (get_features_xml, process_serial_event): Adjust.
5126         * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
5127         declare.
5128         (struct process_info) <tdesc>: New field.
5129         (ipa_tdesc): Declare.
5130         * tdesc.c: New file.
5131         * tdesc.h: New file.
5132         * tracepoint.c: Include tdesc.h.
5133         [IN_PROCESS_AGENT] (ipa_tdesc): Define.
5134         (get_context_regcache): Adjust to pass ipa_tdesc down.
5135         (do_action_at_tracepoint): Adjust to get the register cache size
5136         from the context regcache's description.
5137         (traceframe_walk_blocks): Adjust to get the register cache size
5138         from the current trace frame's description.
5139         (traceframe_get_pc): Adjust to get current trace frame's
5140         description and pass it down.
5141         (gdb_collect): Adjust to get the register cache size from the
5142         IPA's description.
5143         * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
5144         (gdbserver_xmltarget): Delete.
5145         (initialize_low_tracepoint): Set the ipa's target description.
5146         * linux-i386-ipa.c (tdesc_i386_linux): Declare.
5147         (initialize_low_tracepoint): Set the ipa's target description.
5148         * linux-x86-low.c: Include tdesc.h.
5149         [__x86_64__] (is_64bit_tdesc): New.
5150         (ps_get_thread_area, x86_get_thread_area): Use it.
5151         (i386_cannot_store_register): Rename to ...
5152         (x86_cannot_store_register): ... this.  Use is_64bit_tdesc.
5153         (i386_cannot_fetch_register): Rename to ...
5154         (x86_cannot_fetch_register): ... this.  Use is_64bit_tdesc.
5155         (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
5156         to new interface.
5157         (target_regsets): Rename to ...
5158         (x86_regsets): ... this.
5159         (x86_get_pc, x86_set_pc): Adjust register_size calls to new
5160         interface.
5161         (x86_siginfo_fixup): Use is_64bit_tdesc.
5162         [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
5163         (tdesc_x32_avx_linux, tdesc_x32_linux)
5164         (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
5165         Declare.
5166         (x86_linux_update_xmltarget): Delete.
5167         (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
5168         (have_ptrace_getfpxregs, have_ptrace_getregset): New.
5169         (AMD64_LINUX_USER64_CS): New.
5170         (x86_linux_read_description): New, based on
5171         x86_linux_update_xmltarget.
5172         (same_process_callback): New.
5173         (x86_arch_setup_process_callback): New.
5174         (x86_linux_update_xmltarget): New.
5175         (x86_regsets_info): New.
5176         (amd64_linux_regs_info): New.
5177         (i386_linux_usrregs_info): New.
5178         (i386_linux_regs_info): New.
5179         (x86_linux_regs_info): New.
5180         (x86_arch_setup): Reimplement.
5181         (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
5182         (x86_emit_ops): Ditto.
5183         (the_low_target): Adjust.  Install x86_linux_regs_info,
5184         x86_cannot_fetch_register, and x86_cannot_store_register.
5185         (initialize_low_arch): New.
5186         * linux-ia64-low.c (tdesc_ia64): Declare.
5187         (ia64_fetch_register): Adjust.
5188         (ia64_usrregs_info, regs_info): New globals.
5189         (ia64_regs_info): New function.
5190         (the_low_target): Adjust.
5191         (initialize_low_arch): New function.
5192         * linux-sparc-low.c (tdesc_sparc64): Declare.
5193         (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
5194         Adjust.
5195         (sparc_arch_setup): New function.
5196         (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
5197         (the_low_target): Adjust.
5198         (initialize_low_arch): New function.
5199         * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
5200         (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
5201         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
5202         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
5203         (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
5204         (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
5205         (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
5206         (tdesc_powerpc_isa205_vsx64l): Declare.
5207         (ppc_cannot_store_register, ppc_collect_ptrace_register)
5208         (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
5209         (ppc_set_pc, ppc_get_hwcap): Adjust.
5210         (ppc_usrregs_info): Forward declare.
5211         (!__powerpc64__) ppc_regmap_adjusted: New global.
5212         (ppc_arch_setup): Adjust to the current process'es target
5213         description.
5214         (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
5215         (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
5216         (ppc_store_evrregset): Adjust.
5217         (target_regsets): Rename to ...
5218         (ppc_regsets): ... this, and make static.
5219         (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
5220         (ppc_regs_info): New function.
5221         (the_low_target): Adjust.
5222         (initialize_low_arch): New function.
5223         * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
5224         (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
5225         (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
5226         (tdesc_s390x_linux64v2): Declare.
5227         (s390_collect_ptrace_register, s390_supply_ptrace_register)
5228         (s390_fill_gregset, s390_store_last_break): Adjust.
5229         (target_regsets): Rename to ...
5230         (s390_regsets): ... this, and make static.
5231         (s390_get_pc, s390_set_pc): Adjust.
5232         (s390_get_hwcap): New target_desc parameter, and use it.
5233         [__s390x__] (have_hwcap_s390_high_gprs): New global.
5234         (s390_arch_setup): Adjust to set the current process'es target
5235         description.  Don't adjust the regmap.
5236         (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
5237         [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
5238         (regs_info_3264): New globals.
5239         (s390_regs_info): New function.
5240         (the_low_target): Adjust.
5241         (initialize_low_arch): New function.
5242         * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
5243         (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
5244         [__mips64] (init_registers_mips_linux)
5245         (init_registers_mips_dsp_linux): Delete defines.
5246         [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
5247         (have_dsp): New global.
5248         (mips_read_description): New, based on mips_arch_setup.
5249         (mips_arch_setup): Reimplement.
5250         (get_usrregs_info): New function.
5251         (mips_cannot_fetch_register, mips_cannot_store_register)
5252         (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
5253         (mips_fill_fpregset, mips_store_fpregset): Adjust.
5254         (target_regsets): Rename to ...
5255         (mips_regsets): ... this, and make static.
5256         (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
5257         (dsp_regs_info, regs_info): New globals.
5258         (mips_regs_info): New function.
5259         (the_low_target): Adjust.
5260         (initialize_low_arch): New function.
5261         * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
5262         (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
5263         Declare.
5264         (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
5265         (arm_read_description): New, with bits factored from
5266         arm_arch_setup.
5267         (arm_arch_setup): Reimplement.
5268         (target_regsets): Rename to ...
5269         (arm_regsets): ... this, and make static.
5270         (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
5271         (arm_regs_info): New function.
5272         (the_low_target): Adjust.
5273         (initialize_low_arch): New function.
5274         * linux-m68k-low.c (tdesc_m68k): Declare.
5275         (target_regsets): Rename to ...
5276         (m68k_regsets): ... this, and make static.
5277         (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
5278         (m68k_regs_info): New function.
5279         (m68k_arch_setup): New function.
5280         (the_low_target): Adjust.
5281         (initialize_low_arch): New function.
5282         * linux-sh-low.c (tdesc_sharch): Declare.
5283         (target_regsets): Rename to ...
5284         (sh_regsets): ... this, and make static.
5285         (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
5286         (sh_regs_info, sh_arch_setup): New functions.
5287         (the_low_target): Adjust.
5288         (initialize_low_arch): New function.
5289         * linux-bfin-low.c (tdesc_bfin): Declare.
5290         (bfin_arch_setup): New function.
5291         (bfin_usrregs_info, regs_info): New globals.
5292         (bfin_regs_info): New function.
5293         (the_low_target): Adjust.
5294         (initialize_low_arch): New function.
5295         * linux-cris-low.c (tdesc_cris): Declare.
5296         (cris_arch_setup): New function.
5297         (cris_usrregs_info, regs_info): New globals.
5298         (cris_regs_info): New function.
5299         (the_low_target): Adjust.
5300         (initialize_low_arch): New function.
5301         * linux-cris-low.c (tdesc_crisv32): Declare.
5302         (cris_arch_setup): New function.
5303         (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
5304         (cris_regs_info): New function.
5305         (the_low_target): Adjust.
5306         (initialize_low_arch): New function.
5307         * linux-m32r-low.c (tdesc_m32r): Declare.
5308         (m32r_arch_setup): New function.
5309         (m32r_usrregs_info, regs_info): New globals.
5310         (m32r_regs_info): Adjust.
5311         (initialize_low_arch): New function.
5312         * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
5313         (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
5314         (tic6x_usrregs_info): Forward declare.
5315         (tic6x_read_description): New function, based on ...
5316         (tic6x_arch_setup): ... this.  Reimplement.
5317         (target_regsets): Rename to ...
5318         (tic6x_regsets): ... this, and make static.
5319         (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
5320         (tic6x_regs_info): New function.
5321         (the_low_target): Adjust.
5322         (initialize_low_arch): New function.
5323         * linux-xtensa-low.c (tdesc_xtensa): Declare.
5324         (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
5325         (target_regsets): Rename to ...
5326         (xtensa_regsets): ... this, and make static.
5327         (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
5328         globals.
5329         (xtensa_arch_setup, xtensa_regs_info): New functions.
5330         (the_low_target): Adjust.
5331         (initialize_low_arch): New function.
5332         * linux-nios2-low.c (tdesc_nios2_linux): Declare.
5333         (nios2_arch_setup): Set the current process'es tdesc.
5334         (target_regsets): Rename to ...
5335         (nios2_regsets): ... this.
5336         (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
5337         (nios2_regs_info): New function.
5338         (the_low_target): Adjust.
5339         (initialize_low_arch): New function.
5340         * linux-aarch64-low.c (tdesc_aarch64): Declare.
5341         (aarch64_arch_setup): Set the current process'es tdesc.
5342         (target_regsets): Rename to ...
5343         (aarch64_regsets): ... this.
5344         (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
5345         (aarch64_regs_info): New function.
5346         (the_low_target): Adjust.
5347         (initialize_low_arch): New function.
5348         * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
5349         globals.
5350         (target_regsets): Rename to ...
5351         (tile_regsets): ... this.
5352         (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
5353         (tile_regs_info): New function.
5354         (tile_arch_setup): Set the current process'es tdesc.
5355         (the_low_target): Adjust.
5356         (initialize_low_arch): New function.
5357         * spu-low.c (tdesc_spu): Declare.
5358         (spu_create_inferior, spu_attach): Set the new process'es tdesc.
5359         * win32-arm-low.c (tdesc_arm): Declare.
5360         (arm_arch_setup): New function.
5361         (the_low_target): Install arm_arch_setup instead of
5362         init_registers_arm.
5363         * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
5364         (init_windows_x86): Rename to ...
5365         (i386_arch_setup): ... this.  Set `win32_tdesc'.
5366         (the_low_target): Adjust.
5367         * win32-low.c (win32_tdesc): New global.
5368         (child_add_thread): Don't create the thread cache here.
5369         (do_initial_child_stuff): Set the new process'es tdesc.
5370         * win32-low.h (struct target_desc): Forward declare.
5371         (win32_tdesc): Declare.
5372         * lynx-i386-low.c (tdesc_i386): Declare global.
5373         (lynx_i386_arch_setup): Set `lynx_tdesc'.
5374         * lynx-low.c (lynx_tdesc): New global.
5375         (lynx_add_process): Set the new process'es tdesc.
5376         * lynx-low.h (struct target_desc): Forward declare.
5377         (lynx_tdesc): Declare global.
5378         * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
5379         (lynx_ppc_arch_setup): Set `lynx_tdesc'.
5380         * nto-low.c (nto_tdesc): New global.
5381         (do_attach): Set the new process'es tdesc.
5382         * nto-low.h (struct target_desc): Forward declare.
5383         (nto_tdesc): Declare.
5384         * nto-x86-low.c (tdesc_i386): Declare.
5385         (nto_x86_arch_setup): Set `nto_tdesc'.
5386
5387 2013-06-04  Gary Benson  <gbenson@redhat.com>
5388
5389         * server.c (handle_query): Add "augmented-libraries-svr4-read+"
5390         to qSupported response when appropriate.
5391         (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
5392         with nonzero-length annex.
5393         * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
5394         arguments supplied in annex.
5395
5396 2013-05-31  Doug Evans  <dje@google.com>
5397
5398         PR server/15594
5399         * linux-x86-low.c (ps_get_thread_area): Properly extend address to
5400         64 bits in 64-cross-32 environment.
5401
5402 2013-05-28  Pedro Alves  <palves@redhat.com>
5403
5404         * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
5405         (aarch64-without-fpu.c): Delete rule.
5406         * configure.srv (aarch64*-*-linux*): Remove references to
5407         aarch64-without-fpu.o and aarch64-without-fpu.xml.
5408         * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
5409         declaration.
5410
5411 2013-05-24  Pedro Alves  <palves@redhat.com>
5412
5413         * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
5414         instead of strchr/decode_address.  Error if the range isn't split
5415         with a ','.  Don't assume there's be a ':' in the action.
5416
5417 2013-05-23  Yao Qi  <yao@codesourcery.com>
5418             Pedro Alves  <palves@redhat.com>
5419
5420         * linux-low.c (lwp_in_step_range): New function.
5421         (linux_wait_1): If the thread was range stepping and stopped
5422         outside the stepping range, report the stop to GDB.  Otherwise,
5423         continue stepping.  Add range stepping debug output.
5424         (linux_set_resume_request): Copy the step range from the resume
5425         request to the lwp.
5426         (linux_supports_range_stepping): New.
5427         (linux_target_ops) <supports_range_stepping>: Set to
5428         linux_supports_range_stepping.
5429         * linux-low.h (struct linux_target_ops)
5430         <supports_range_stepping>: New field.
5431         (struct lwp_info) <step_range_start, step_range_end>: New fields.
5432         * linux-x86-low.c (x86_supports_range_stepping): New.
5433         (the_low_target) <supports_range_stepping>: Set to
5434         x86_supports_range_stepping.
5435         * server.c (handle_v_cont): Handle 'r' action.
5436         (handle_v_requests): Append ";r" if the target supports range
5437         stepping.
5438         * target.h (struct thread_resume) <step_range_start,
5439         step_range_end>: New fields.
5440         (struct target_ops) <supports_range_stepping>:
5441         New field.
5442         (target_supports_range_stepping): New macro.
5443
5444 2013-05-17  Joel Brobecker  <brobecker@adacore.com>
5445
5446         * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
5447         confusion in comment.
5448
5449 2013-05-17  Joel Brobecker  <brobecker@adacore.com>
5450
5451         * lynx-low.c (struct process_info_private): New type.
5452         (lynx_add_process): New function.
5453         (lynx_create_inferior, lynx_attach): Replace calls to
5454         add_process by calls to lynx_add_process.
5455         (lynx_resume): If PTID is null, then try using
5456         current_process()->private->last_wait_event_ptid.
5457         Add comments.
5458         (lynx_clear_inferiors): Delete.  The contents of that function
5459         has been inlined in lynx_mourn;
5460         (lynx_wait_1): Save the ptid in the process's private data.
5461         (lynx_mourn): Free the process' private data.  Replace call
5462         to lynx_clear_inferiors by call to clear_inferiors.
5463
5464 2013-05-17  Yao Qi  <yao@codesourcery.com>
5465
5466         * i386-low.c (i386_length_and_rw_bits): Move the comment to
5467         the right place.
5468
5469 2013-05-16  Luis Machado  <lgustavo@codesourcery.com>
5470
5471         * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
5472         PT_DATA_ADDR and PT_TEXT_END_ADDR.  Update comments.
5473         (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
5474         PT_TEXT_END_ADDR guards.  Update comments.
5475         (linux_target_op) <read_offsets>: Conditionally define to
5476         linux_read_offsets if the target is UCLIBC and if it defines
5477         PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
5478
5479 2013-05-06  Sandra Loosemore  <sandra@codesourcery.com>
5480             Andrew Jenner  <andrew@codesourcery.com>
5481
5482         * Makefile.in (SFILES): Add linux-nios2-low.c.
5483         (clean): Add action to delete nios2-linux.c.
5484         (nios2-linux.c): New rule.
5485         * configure.srv: Add nios2*-*-linux*.
5486         * linux-nios2-low.c: New.
5487
5488 2013-05-03  Hafiz Abid Qadeer  <abidh@codesourcery.com>
5489
5490         * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
5491
5492 2013-04-25  Hui Zhu  <hui@codesourcery.com>
5493
5494         PR gdb/15186
5495         * ax.c (ax_printf): Add fflush.
5496
5497 2013-04-22  Tom Tromey  <tromey@redhat.com>
5498
5499         * Makefile.in (SFILES): Add filestuff.c.
5500         (OBS): Add filestuff.o.
5501         (filestuff.o): New target.
5502         * config.in, configure: Rebuild.
5503         * configure.ac: Check for fdwalk, pipe2.
5504
5505 2013-04-17  Pedro Alves  <palves@redhat.com>
5506
5507         * configure.ac (USE_THREAD_DB): Delete variable.
5508         (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
5509         Don't AC_SUBST USE_THREAD_DB.
5510         * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
5511         * config.in, configure: Regenerate.
5512
5513 2013-04-16  Pedro Alves  <palves@redhat.com>
5514
5515         * linux-low.h (struct lwp_info) <thread_known>: Move under
5516         the USE_THREAD_DB #ifdef.
5517
5518 2013-04-16  Pedro Alves  <palves@redhat.com>
5519
5520         * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
5521         (linux-low.o): Delete rule.
5522         * linux-low.h: Always include "gdb_thread_db.h" instead of
5523         conditionally including thread_db.h.
5524         (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
5525         HAVE_THREAD_DB_H.
5526
5527 2013-04-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
5528
5529         * Makefile.in (install-only): Fix make install regression.
5530
5531 2013-04-05  Jan Kratochvil  <jan.kratochvil@redhat.com>
5532
5533         Convert man pages to texinfo, new gdbinit.5 texinfo page.
5534         * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
5535         installation.
5536         * gdbserver.1: Remove.
5537
5538 2013-03-22  Pedro Alves  <palves@redhat.com>
5539
5540         * linux-low.c (handle_extended_wait): Don't call
5541         linux_enable_event_reporting.
5542
5543 2013-03-15  Tony Theodore  <tonyt@logyst.com>
5544
5545         PR build/9098:
5546         * Makefile.in (SHELL): Use @SHELL@.
5547
5548 2013-03-14  Sergio Durigan Junior  <sergiodj@redhat.com>
5549
5550         * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
5551         compiler warning.
5552
5553 2013-03-13  Joel Brobecker  <brobecker@adacore.com>
5554
5555         * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
5556         Remove extraneous NULL element.
5557
5558 2013-03-13  Yao Qi  <yao@codesourcery.com>
5559
5560         * tracepoint.c (traceframe_read_tsv): Look for the last matched
5561         'V' block in trace frame.
5562
5563 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
5564
5565         * target.h (struct target_ops): Add btrace ops.
5566         (target_supports_btrace): New macro.
5567         (target_enable_btrace): New macro.
5568         (target_disable_btrace): New macro.
5569         (target_read_btrace): New macro.
5570         * gdbthread.h (struct thread_info): Add btrace field.
5571         * server.c: Include btrace-common.h.
5572         (handle_btrace_general_set): New function.
5573         (handle_btrace_enable): New function.
5574         (handle_btrace_disable): New function.
5575         (handle_general_set): Call handle_btrace_general_set.
5576         (handle_qxfer_btrace): New function.
5577         (struct qxfer qxfer_packets[]): Add btrace entry.
5578         * inferiors.c (remove_thread): Disable btrace.
5579         * linux-low: Include linux-btrace.h.
5580         (linux_low_enable_btrace): New function.
5581         (linux_low_read_btrace): New function.
5582         (linux_target_ops): Add btrace ops.
5583         * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
5584         Add srv_linux_btrace=yes.
5585         (x86_64-*-linux*): Add linux-btrace.o.
5586         Add srv_linux_btrace=yes.
5587         * configure.ac: Define HAVE_LINUX_BTRACE.
5588         * config.in: Regenerated.
5589         * configure: Regenerated.
5590
5591 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
5592
5593         * server.c (handle_qxfer): Preserve error message if -3 is
5594         returned.
5595         (qxfer): Document the -3 return value.
5596
5597 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
5598
5599         * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
5600         (linux_btrace_h): New variable.
5601         (linux-btrace.o): New rule.
5602
5603 2013-03-08  Stan Shebs  <stan@codesourcery.com>
5604             Hafiz Abid Qadeer  <abidh@codesourcery.com>
5605
5606         * tracepoint.c (trace_buffer_size): New global.
5607         (DEFAULT_TRACE_BUFFER_SIZE): New define.
5608         (init_trace_buffer): Change to one-argument function. Allocate
5609         trace buffer memory.
5610         (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
5611         handle QTBuffer:size packet.
5612         (cmd_bigqtbuffer_size): New function.
5613         (initialize_tracepoint): Call init_trace_buffer with
5614         DEFAULT_TRACE_BUFFER_SIZE.
5615         * server.c (handle_query): Add QTBuffer:size in the
5616         supported packets.
5617
5618 2013-03-07  Yao Qi  <yao@codesourcery.com>
5619
5620         * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5621         (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5622         of -1.
5623         (cmd_qtsp): Adjust condition.  Do post increment.
5624         Set cur_action and cur_step_action back to 0.
5625
5626 2013-03-07  Jeremy Bennett  <jeremy.bennett@embecosm.com>
5627
5628         PR server/15236
5629         * linux-low.c (linux_write_memory): Return early success if LEN is
5630         zero.
5631
5632 2013-03-05  Corinna Vinschen  <vinschen@redhat.de>
5633
5634         * configure.srv: Add x86_64-*-cygwin* as target.
5635
5636 2013-02-28  Tom Tromey  <tromey@redhat.com>
5637
5638         * configure.ac: Invoke AC_SYS_LARGEFILE.
5639         * configure, config.in: Rebuild.
5640
5641 2013-02-28  Corinna Vinschen  <vinschen@redhat.com>
5642
5643         * win32-low.c: Throughout, fix format strings and casts of
5644         printf-like functions to avoid type related warnings on all
5645         platforms.
5646         (get_child_debug_event): Print dwDebugEventCode as hex since
5647         that's how it's usually documented.
5648
5649 2013-02-28  Yao Qi  <yao@codesourcery.com>
5650
5651         * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5652         pulongest.
5653
5654 2013-02-27  Jiong Wang  <jiwang@tilera.com>
5655
5656         * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5657         (reg-tilegx32.c): New rule.
5658         * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5659         * linux-tile-low.c (tile_arch_setup): New function.  Invoke
5660         different register info initializer according to elf class.
5661         (init_registers_tilgx32): New function.  The tilegx32 register info
5662         initializer.
5663         (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5664         (tile_store_gregset): Likewise.
5665
5666 2013-02-27  Yao Qi  <yao@codesourcery.com>
5667
5668         * server.c (process_point_options): Print debug message when
5669         debug_threads is true.
5670
5671 2013-02-26  Yao Qi  <yao@codesourcery.com>
5672
5673         * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5674
5675 2013-02-19  Pedro Alves  <palves@redhat.com>
5676             Kai Tietz <ktietz@redhat.com>
5677
5678         PR gdb/15161
5679
5680         * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5681         instead of strtoul to extract address from packet.
5682         (process_serial_event) <'z'>: Likewise.
5683
5684 2013-02-18  Yao Qi  <yao@codesourcery.com>
5685
5686         * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5687
5688 2013-02-14  Pedro Alves  <palves@redhat.com>
5689
5690         Plug memory leak.
5691
5692         * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5693         TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5694
5695 2013-02-14  Pedro Alves  <palves@redhat.com>
5696
5697         * tracepoint.c (cmd_qtdpsrc): Use savestring.
5698
5699 2013-02-14  Pedro Alves  <palves@redhat.com>
5700
5701         * tracepoint.c (save_string): Delete.
5702         (add_tracepoint_action): Use savestring instead of save_string.
5703
5704 2013-02-12  Pedro Alves  <palves@redhat.com>
5705
5706         * linux-xtensa-low.c: Ditto.
5707         * xtensa-xtregs.c: Ditto.
5708
5709 2013-02-12  Sanimir Agovic  <sanimir.agovic@intel.com>
5710
5711         * thread-db.c (thread_db_get_tls_address): NULL pointer check
5712         thread_db.
5713
5714 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
5715
5716         * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5717         aarch64_num_wp_regs and aarch64_num_bp_regs to
5718         AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5719
5720 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
5721
5722         * linux-aarch64-low.c (ps_get_thread_area): Replace
5723         PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5724
5725 2013-02-04  Jim MacArthur  <jim.macarthur@arm.com>
5726             Marcus Shawcroft  <marcus.shawcroft@arm.com>
5727             Nigel Stephens  <nigel.stephens@arm.com>
5728             Yufeng Zhang  <yufeng.zhang@arm.com>
5729
5730         * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5731         (aarch64.c, aarch64-without-fpu.c): New targets.
5732         * configure.srv (aarch64*-*-linux*): New.
5733         * linux-aarch64-low.c: New file.
5734
5735 2013-02-04  Marcus Shawcroft  <marcus.shawcroft@arm.com>
5736
5737         * linux-low.c (handle_extended_wait, linux_create_inferior)
5738         (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5739         (dequeue_one_deferred_signal, linux_resume_one_thread)
5740         (fetch_register, linux_write_memory, linux_enable_event_reporting)
5741         (linux_tracefork_grandchild, linux_test_for_tracefork)
5742         (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5743         PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5744         where the argument is 0.
5745
5746 2013-01-25  Yao Qi  <yao@codesourcery.com>
5747
5748         * event-loop.c: Include "queue.h".
5749         (gdb_event_p): New typedef.
5750         (struct gdb_event) <next_event>: Remove.
5751         (event_queue): Change to QUEUE(gdb_event_p).
5752         (async_queue_event): Remove.
5753         (gdb_event_xfree): New.
5754         (initialize_event_loop): New.
5755         (process_event): Use API from QUEUE.
5756         (wait_for_event): Likewise.
5757         * server.c (main): Call initialize_event_loop.
5758         * server.h (initialize_event_loop): Declare.
5759
5760 2013-01-18  Yao Qi  <yao@codesourcery.com>
5761
5762         * ax.h (struct eval_agent_expr_context): New.
5763         (gdb_eval_agent_expr): Update declaration.
5764         * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5765         TFRAME.  Add new argument CTX.
5766         * server.h (struct eval_agent_expr_context): Declare.
5767         (agent_mem_read, agent_tsv_read): Update declaration.
5768         (agent_mem_read_string): Likewise.
5769         * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5770         (add_traceframe_block): Add new argument TPOINT.
5771         Increase TPOINT->traceframe_usage.
5772         (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5773         eval_tracepoint_agent_expr.
5774         (condition_true_at_tracepoint): Likewise.
5775         (agent_mem_read): Remove argument TFRAME.  Add argument CTX.
5776         (agent_mem_read_string, agent_tsv_read): Likewise.
5777
5778 2013-01-16  Yao Qi  <yao@codesourcery.com>
5779
5780         * linux-low.c (linux_resume_one_lwp): Don't check
5781         'lwp->bp_reinsert != 0'.
5782
5783 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
5784             Pedro Alves  <palves@redhat.com>
5785
5786         * lynx-low.c (ptrace_request_to_str): Define a temporary
5787         macro and use it to simplify this function's implementation.
5788
5789 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
5790
5791         * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5792         sets errno.
5793
5794 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
5795
5796         * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5797
5798 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
5799
5800         * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5801
5802 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
5803
5804         * lynx-low.c (lynx_resume): Use the resume_info parameter
5805         to determine the ptid for the lynx_ptrace call, unless
5806         it is equal to minus_one_ptid, in which case we use the
5807         ptid of the current_inferior.
5808         (lynx_wait_1): After having received a thread create/exit
5809         event, resume the inferior's execution using the signaling
5810         thread's ptid, rather than the old ptid.
5811
5812 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
5813
5814         * lynx-low.c (lynx_resume): Delete variable ret.
5815
5816 2013-01-01  Joel Brobecker  <brobecker@adacore.com>
5817
5818         * gdbreplay.c (gdbreplay_version): Update copyright year.
5819         * server.c (gdbserver_version): Likewise.
5820
5821 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
5822
5823         * lynx-low.c (lynx_wait_1): Add debug trace before adding
5824         new thread.
5825
5826 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
5827
5828         * lynx-low.c (ptrace_request_to_str): Add handling for
5829         PTRACE_GETTRACESIG.
5830
5831 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
5832
5833         * lynx-low.c (lynx_attach): Delete variable new_process.
5834
5835 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
5836
5837         * lynx-low.c (lynx_create_inferior): Delete variable
5838         new_process.
5839
5840 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
5841
5842         * lynx-low.c (ptrace_request_to_str): Do not handle
5843         PTRACE_GETTHREADLIST if this macro does not exist.
5844
5845 2012-12-15  Yao Qi  <yao@codesourcery.com>
5846
5847         * Makefile.in (OBS): Add notif.o.
5848         * notif.c, notif.h: New.
5849         * server.c: Include "notif.h".
5850         (struct vstop_notif) <next>: Remove.
5851         <base>: New field.
5852         (queue_stop_reply): Update.
5853         (push_event, send_next_stop_reply): Remove.
5854         (discard_queued_stop_replies): Update.
5855         (notif_stop): New variable.
5856         (handle_v_stopped): Remove.
5857         (handle_v_requests): Don't call handle_v_stopped.  Call
5858         handle_ack_notif instead.
5859         (queue_stop_reply_callback): Call notif_event_enque instead
5860         of queue_stop_reply.
5861         (handle_status): Don't call send_next_stop_reply, call
5862         notif_write_event instead.
5863         (kill_inferior_callback): Likewise.
5864         (detach_or_kill_inferior_callback): Likewise.
5865         (main): Call initialize_notif.
5866         (process_serial_event): Call QUEUE_is_empty.
5867         (handle_target_event): Call notif_push instead of push event.
5868         * server.h (push_event): Remove declaration.
5869
5870 2012-12-10  Tom Tromey  <tromey@redhat.com>
5871
5872         * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5873         (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5874         macros.
5875         (.c.o): Rewrite.
5876         (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5877         (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5878         (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5879         (amd64-linux-ipa.o, ax.o): Rewrite.
5880         (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5881         (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5882         (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5883         (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5884         (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5885         (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5886         (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5887         (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5888         (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5889         (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5890         (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5891         (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5892         (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5893         (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5894         (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5895         (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5896         (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5897         (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5898         (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5899         (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5900         (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5901         (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5902         (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5903         (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5904         (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5905         (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5906         (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5907         (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5908         (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5909         (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5910         (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5911         (reg-tilegx.o): Remove.
5912         (all_object_files): New macro.
5913         Include .deps files.
5914         * aclocal.m4, configure: Rebuild.
5915         * acinclude.m4: Include depstand.m4, lead-dot.m4.
5916         * configure.ac: Invoke ZW_CREATE_DEPDIR,
5917         ZW_PROG_COMPILER_DEPENDENCIES.  Compute GMAKE condition.
5918
5919 2012-12-05  Tom Tromey  <tromey@redhat.com>
5920
5921         PR gdb/14917:
5922         * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5923
5924 2012-11-28  Markus Metzger  <markus.t.metzger@intel.com>
5925
5926         * configure.ac: Check for linux/perf_event.h.
5927         * config.in: Regenerated.
5928         * configure: Regenerated.
5929
5930 2012-11-26  Maxime Villard  <rustyBSD@gmx.fr>
5931
5932         * hostio.c (handle_readlink): Decrease buffer size
5933         parameter passed to readlink by one byte.
5934
5935 2012-11-26  Yao Qi  <yao@codesourcery.com>
5936
5937         * configure.ac (build_warnings): Append '-Wempty-body'.
5938         * configure: Regenerated.
5939         * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5940         body.
5941
5942 2012-11-15  Pierre Muller  <muller@sourceware.org>
5943
5944         * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5945         * config.in: Regenerate.
5946         * configure: Regenerate.
5947         * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5948         Use "gdb_wait.h" header instead of <sys/wait.h> header.
5949         * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5950         * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5951         header.
5952         * server.c: Remove HAVE_WAIT_H conditional.  Use "gdb_wait.h" header
5953         instead of <sys/wait.h> header.
5954         * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5955
5956 2012-11-13 Markus Metzger  <markus.t.metzger@intel.com>
5957
5958         * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5959         (various make rules): Remove -DGDBSERVER
5960
5961 2012-11-09  Yao Qi  <yao@codesourcery.com>
5962
5963         * spu-low.c (current_ptid): Move it to ..
5964         * gdbthread.h: ... here.  New.
5965         * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5966         * server.c (myresume, process_serial_event): Likewise.
5967         * thread-db.c (thread_db_find_new_threads): Likewise.
5968         * tracepoint.c (run_inferior_command): Likewise.
5969
5970 2012-10-01  Andrew Burgess  <aburgess@broadcom.com>
5971
5972         * server.c (handle_search_memory_1): Include access length in
5973         warning message.
5974
5975 2012-09-05  Michael Brandt  <michael.brandt@axis.com>
5976
5977         * linux-crisv32-low.c: Fix compile errors.
5978
5979 2012-09-04  Yao Qi  <yao@codesourcery.com>
5980
5981         * tracepoint.c (cmd_qtsv): Adjust debug message.
5982         Don't check CUR_TPOINT.
5983
5984 2012-08-28  Yao Qi  <yao@codesourcery.com>
5985
5986         * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5987         * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5988         (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5989         Remove declarations of xmalloc, xreallloc, xstrdup and
5990         freeargv.
5991         * Makefile.in (libiberty_h): New.
5992         (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5993         (linux-bfin-low.o): Append dependency 'libiberty.h'.
5994
5995 2012-08-23  Yao Qi  <yao@codesourcery.com>
5996
5997         * server.h: Remove declaration of 'xsnprintf'.
5998
5999 2012-08-22  Keith Seitz  <keiths@redhat.com>
6000
6001         * server.h: Include build-gnulib-gbserver/config.h.
6002         * gdbreplay.c: Likewise.
6003
6004 2012-08-08  Doug Evans  <dje@google.com>
6005
6006         * Makefile.in (SFILES): Add gdb_vecs.c.
6007         (OBS): Add gdb_vecs.o.
6008         (gdb_vecs_h, host_defs_h): New variables.
6009         (thread-db.o): Add $(gdb_vecs_h) dependency.
6010         (gdb_vecs.o): New rule.
6011         * thread-db.c: #include "gdb_vecs.h".
6012         (thread_db_load_search): Use a vector to iterate over path elements.
6013         Handle text appearing after "$pdir".
6014
6015         * configure.ac: Add check for strstr.
6016         * config.in: Regenerate.
6017         * configure: Regenerate.
6018
6019 2012-08-02  Ulrich Weigand  <ulrich.weigand@linaro.org>
6020
6021         * hostio.c (handle_pread): If pread fails, fall back to attempting
6022         lseek/read.
6023         (handle_pwrite): Likewise for pwrite.
6024
6025 2012-08-01  Ulrich Weigand  <ulrich.weigand@linaro.org>
6026
6027         * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
6028         between unsupported TYPE and unimplementable ADDR/LEN combination.
6029         (arm_insert_point): Act on new return value.
6030
6031 2012-07-31  Pedro Alves  <palves@redhat.com>
6032
6033         * server.c (process_point_options): Only skip tokens if we find
6034         one that is unrecognized.  Don't treat 'X' specially while
6035         skipping unrecognized tokens.
6036
6037 2012-07-30  Ulrich Weigand  <ulrich.weigand@linaro.org>
6038
6039         * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
6040         to 4-byte-align HW breakpoint addresses for Thumb.
6041
6042 2012-07-27  Yao Qi  <yao@codesourcery.com>
6043
6044         PR remote/14161.
6045
6046         * server.h: Declare gdb_agent_about_to_close.
6047         * target.c (kill_inferior): Include "agent.h".
6048         New.  Send command 'kill'.
6049         * target.h (kill_inferior): Removed macro.
6050         * tracepoint.c (gdb_agent_about_to_close): New.
6051         (gdb_agent_helper_thread): Handle command 'close'.
6052         Wait endlessly until the inferior stops.
6053         Install gdb_agent_remove_socket to atexit hook.
6054         (agent_socket_name): New static variable.
6055         (gdb_agent_socket_init): Replace local variable 'name' with
6056         'agent_socket_name'.
6057         (gdb_agent_remove_socket): New.
6058
6059 2012-07-27  Yao Qi  <yao@codesourcery.com>
6060
6061         * server.c (process_point_options): Stop at 'X' when parsing.
6062
6063 2012-07-19  Michael Eager  <eager@eagercon.com>
6064
6065         * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
6066         to hw_execute.
6067         * linux-x86-low.c (x86_insert_point, x86_remove_point):
6068         Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
6069         hardware breakpoint.
6070
6071 2012-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
6072
6073         * gdbserver/linux-low.c (initialize_low): Call
6074         linux_ptrace_init_warnings.
6075
6076 2012-07-02  Doug Evans  <dje@google.com>
6077
6078         * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
6079         pointer to int.
6080
6081 2012-07-02  Stan Shebs  <stan@codesourcery.com>
6082
6083         * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
6084         (ax.o): Add it to build rule.
6085         (ax-ipa.o): Ditto.
6086         (OBS): Add format.o.
6087         (IPA_OBS): Add format.o.
6088         * server.c (handle_query): Claim support for breakpoint commands.
6089         (process_point_options): Add command case.
6090         (process_serial_event): Leave running if there are printfs in
6091         effect.
6092         * mem-break.h (any_persistent_commands): Declare.
6093         (add_breakpoint_commands): Declare.
6094         (gdb_no_commands_at_breakpoint): Declare.
6095         (run_breakpoint_commands): Declare.
6096         * mem-break.c (struct point_command_list): New struct.
6097         (struct breakpoint): New field command_list.
6098         (any_persistent_commands): New function.
6099         (add_commands_to_breakpoint): New function.
6100         (add_breakpoint_commands): New function.
6101         (gdb_no_commands_at_breakpoint): New function.
6102         (run_breakpoint_commands): New function.
6103         * linux-low.c (linux_wait_1): Test for and run breakpoint commands
6104         locally.
6105         * ax.c: Include format.h.
6106         (ax_printf): New function.
6107         (gdb_eval_agent_expr): Add printf opcode.
6108
6109 2012-06-13  Yao Qi  <yao@codesourcery.com>
6110
6111         * server.c (start_inferior): Remove duplicated writes to fields
6112         'last_resume_kind' and 'last_status' of 'current_inferior'.
6113
6114 2012-06-12  Yao Qi  <yao@codesourcery.com>
6115             Pedro Alves  <palves@redhat.com>
6116
6117         * linux-low.c (linux_set_resume_request): Simplify predicate.  Add
6118         comment.
6119         * server.c (handle_v_cont): Extend comment.
6120
6121 2012-06-11  Yao Qi  <yao@codesourcery.com>
6122
6123         * linux-low.c (linux_attach): Add 'static'.
6124
6125 2012-06-06  Yao Qi  <yao@codesourcery.com>
6126
6127         * ax.c (gdb_eval_agent_expr): Print `top' in hex.
6128
6129 2012-06-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
6130
6131         Fix gcc -flto compilation warning.
6132         * server.c (main): Make variable multi_mode and attach volatile.
6133
6134 2012-05-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
6135
6136         * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
6137         if the platform doesn't know about it.
6138
6139 2012-05-30  Jeff Kenton  <jkenton@tilera.com>
6140
6141         * Makefile.in (SFILES): Add linux-tile-low.c.
6142         (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
6143         * configure.srv: Handle tilegx-*-linux*.
6144         * linux-tile-low.c: New file.
6145
6146 2012-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
6147
6148         * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
6149
6150 2012-05-24  Pedro Alves  <palves@redhat.com>
6151
6152         PR gdb/7205
6153
6154         Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
6155
6156 2012-05-24  Pedro Alves  <palves@redhat.com>
6157
6158         PR gdb/7205
6159
6160         Replace target_signal with gdb_signal throughout.
6161
6162 2012-05-22  Maciej W. Rozycki  <macro@codesourcery.com>
6163
6164         * linux-low.c (linux_store_registers): Avoid the copying sequence
6165         when no data has been retrieved by ptrace.
6166
6167 2012-05-22  Will Deacon  <will.deacon@arm.com>
6168
6169         * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
6170         Include asm/ptrace.h.
6171         (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
6172         already defined.
6173
6174 2012-05-21  Maciej W. Rozycki  <macro@codesourcery.com>
6175
6176         * linux-low.c (linux_store_registers): Don't re-retrieve data
6177         with ptrace that has already been obtained from /proc.  Always
6178         copy any data retrieved with ptrace to the buffer supplied.
6179
6180 2012-05-11  Yao Qi  <yao@codesourcery.com>
6181             Pedro Alves  <palves@redhat.com>
6182
6183         * linux-low.c (enum stopping_threads_kind): New.
6184         (stopping_threads): Change type to `enum stopping_threads_kind'.
6185         (handle_extended_wait): If stopping and suspending threads, leave
6186         the new_lwp suspended too.
6187         (linux_wait_for_event): Adjust.
6188         (stop_all_lwps): Set `stopping_threads' to
6189         STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
6190         whether we're suspending threads or just stopping them.  Assert no
6191         recursion happens.
6192
6193 2012-04-29  Yao Qi  <yao@codesourcery.com>
6194
6195         * server.h: Move some code to ...
6196         * gdbthread.h: ... here.  New.
6197         * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
6198         (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
6199         (nto-low.o, win32-low.o): Likewise.
6200         * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
6201         * regcache.c, remote-utils.c, server.c: Likewise.
6202         * target.c, tracepoint.c, win32-low.c: Likewise.
6203
6204 2012-04-24  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
6205
6206         * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
6207         (PTRACE_ARG4_TYPE): Likewise.
6208         (PTRACE_XFER_TYPE): Likewise.
6209         * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
6210         ptrace to PTRACE_ARG3_TYPE.
6211         * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
6212         (PTRACE_ARG4_TYPE): Likewise.
6213         (PTRACE_XFER_TYPE): Likewise.
6214         (linux_detach_one_lwp): Cast fourth argument of
6215         ptrace to long then PTRACE_ARG4_TYPE.
6216         (regsets_fetch_inferior_registers): Cast third argument of
6217         ptrace to long then PTRACE_ARG3_TYPE.
6218         (regsets_store_inferior_registers): Likewise.
6219
6220 2012-04-20  Pedro Alves  <palves@redhat.com>
6221
6222         * configure: Regenerate.
6223
6224 2012-04-19  Pedro Alves  <palves@redhat.com>
6225
6226         * Makefile.in (GNULIB_BUILDDIR): New.
6227         (LIBGNU, INCGNU, GNULIB_H): Adjust.
6228         (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
6229         (all, install-only, uninstall, clean-info, all-lib, clean): No
6230         longer pass GNULIB_FLAGS_TO_PASS.  Use subdir_do.
6231         (maintainer-clean realclean distclean): Use subdir_do.
6232         (subdir_do): New.
6233         (gnulib/import/Makefile): Adjust.  Replace gnulib/import with
6234         $(GNULIB_BUILDDIR).  Don't pass argument to config.status.
6235         * acinclude.m4: Include acx_configure_dir.m4.
6236         * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
6237         calls.  Call AC_PROG_RANLIB.  Configure gnulib using
6238         ACX_CONFIGURE_DIR.
6239         (GNULIB): New.
6240         (GNULIB_STDINT_H): Adjust.
6241         (AC_OUTPUT): Don't output gnulib/Makefile anymore.
6242         * gdbreplay.c: Include build-gnulib/config.h.
6243         * server.h: Likewise.
6244         * aclocal.m4: Regenerate.
6245         * config.in: Regenerate.
6246         * configure: Regenerate.
6247
6248 2012-04-19  Pedro Alves  <palves@redhat.com>
6249
6250         * Makefile.in (LIBGNU, INCGNU): Adjust.
6251         (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
6252         (all, install-only, uninstall, clean-info, all-lib, clean)
6253         (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
6254         * configure.ac: Adjust AC_OUTPUT output.
6255         * aclocal.m4: Regenerate.
6256         * configure: Regenerate.
6257
6258 2012-04-19  Pedro Alves  <palves@redhat.com>
6259
6260         * Makefile.in (generated_files): New.
6261         (server_h): Remove the explicit dependency on config.h, and depend
6262         on $generated_files.
6263
6264 2012-04-19  Pedro Alves  <palves@redhat.com>
6265
6266         * Makefile.in (INCGNU): Add -Ignulib.
6267
6268 2012-04-19  Pedro Alves  <palves@redhat.com>
6269
6270         * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
6271         (INCGNU): ... this, and spell out -I here.
6272         (GNULIB_LIB): Rename to ...
6273         (LIBGNU): ... this.
6274         (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
6275
6276 2012-04-19  Pedro Alves  <palves@redhat.com>
6277
6278         * config.in: Regenerate.
6279
6280 2012-04-19  Pedro Alves  <palves@redhat.com>
6281
6282         * configure.ac: Remove AC_CHECK_DECLS check for memmem.
6283         * server.h (memmem): Remove declaration.
6284         * config.in: Regenerate.
6285         * configure: Regenerate.
6286
6287 2012-04-19  Yao Qi  <yao@codesourcery.com>
6288
6289         * Makefile.in (SFILES): Add common/vec.c.
6290         (OBS): Add vec.o.
6291         (vec.o): New rule.
6292
6293 2012-04-19  Yao Qi  <yao@codesourcery.com>
6294
6295         * remote-utils.c (prepare_resume_reply): Replace with macro
6296         target_core_of_thread.
6297         * server.c (handle_qxfer_threads_proper): Likewise.
6298         * target.h (traget_core_of_thread): New macro.
6299
6300 2012-04-18  Pedro Alves  <palves@redhat.com>
6301
6302         * aclocal.m4: Regenerate.
6303         * configure: Regenerate.
6304
6305 2012-04-16  Yao Qi  <yao@codesourcery.com>
6306
6307         * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
6308         duplicated on address.
6309
6310 2012-04-16  Yao Qi  <yao@codesourcery.com>
6311
6312         * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
6313         (struct tracepoint_action_ops) <send>: New field.
6314         (m_tracepoint_action_send, r_tracepoint_action_send): New.
6315         (agent_expr_send, x_tracepoint_action_send): New.
6316         (l_tracepoint_action_send): New.
6317         (cmd_qtdp): Download and install tracepoint
6318         according to `use_agent'.
6319         (run_inferior_command): Add one more parameter `len'.
6320         Update callers.
6321         (tracepoint_send_agent): New.
6322         (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
6323
6324 2012-04-16  Yao Qi  <yao@codesourcery.com>
6325
6326         * tracepoint.c (download_tracepoints): Moved to ...
6327         (cmd_qtstart): ... here.
6328
6329 2012-04-14  Yao Qi  <yao@codesourcery.com>
6330
6331         * tracepoint.c: Include inttypes.h.
6332         (struct collect_memory_action): Use sized types.
6333         (struct tracepoint): Likewise.
6334         (cmd_qtdp, stop_tracing): Update print specifiers.
6335         (cmd_qtp, response_tracepoint): Likewise.
6336         (collect_data_at_tracepoint): Likewise.
6337         (collect_data_at_step): Likewise.
6338
6339 2012-04-14  Yao Qi  <yao@codesourcery.com>
6340
6341         Import gnulib module inttypes.
6342         * aclocal.m4, config.in, configure: Regenerated.
6343
6344 2012-04-14  Yao Qi  <yao@codesourcery.com>
6345
6346         * Makefile.in (maintainer-clean, realclean, distclean): Remove
6347         Makefile and config.status at last.
6348
6349 2012-04-13  Yao Qi  <yao@codesourcery.com>
6350
6351         * tracepoint.c: Include stdint.h unconditionally.
6352
6353 2012-04-13  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
6354
6355         * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
6356         on BFD_HAVE_SYS_PROCFS_TYPE.
6357         * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
6358         * configure: Regenerate.
6359         * config.in: Likewise.
6360
6361 2012-04-13  H.J. Lu  <hongjiu.lu@intel.com>
6362
6363         * Makefile.in (clean): Also remove x32.c x32-linux.c
6364         x32-avx.c x32-avx-linux.c.
6365         (x32.o): New target.
6366         (x32.c): Likewise.
6367         (x32-linux.o): Likewise.
6368         (x32-linux.c): Likewise.
6369         (x32-avx.o): Likewise.
6370         (x32-avx.c): Likewise.
6371         (x32-avx-linux.o): Likewise.
6372         (x32-avx-linux.c): Likewise.
6373
6374         * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
6375         (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
6376         (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
6377         (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
6378         (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
6379         i386/x32-avx-linux.xml.
6380
6381         * linux-x86-low.c (init_registers_x32_linux): New prototype.
6382         (init_registers_x32_avx_linux): Likwise.
6383         (x86_linux_update_xmltarget): Call init_registers_x32_linux
6384         or init_registers_x32_avx_linux if linux_is_elf64 is false.
6385
6386 2012-04-13  Pedro Alves  <palves@redhat.com>
6387
6388         * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
6389         (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
6390         (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
6391         (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
6392         the sub-make.
6393
6394 2012-04-12  H.J. Lu  <hongjiu.lu@intel.com>
6395
6396         * linux-x86-low.c (compat_x32_clock_t): New.
6397         (compat_x32_siginfo_t): Likewise.
6398         (compat_x32_siginfo_from_siginfo): Likewise.
6399         (siginfo_from_compat_x32_siginfo): Likewise.
6400         (linux_is_elf64): Likewise.
6401         (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
6402         and siginfo_from_compat_x32_siginfo for x32.
6403         (x86_arch_setup): Set linux_is_elf64.
6404
6405 2012-04-12  H.J. Lu  <hongjiu.lu@intel.com>
6406
6407         PR gdb/13969
6408         * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
6409         e_machine field.
6410         (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
6411         * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
6412         * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
6413         compatible with process.
6414
6415 2012-04-12  Yao Qi  <yao@codesourcery.com>
6416
6417         * Makefile.in: Define abs_top_srcdir and abs_srcdir.
6418         (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
6419         (install-only, install-info, clean): Handle sub dir gnulib.
6420         (all-lib, am--refresh): New targets.
6421         (memmem.o): Remove target.
6422         * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
6423         Invoke gl_EARLY.  Invoke AC_CHECK_PROGS for make.
6424         (AC_REPLACE_FUNCS): Remove memmem.
6425         Invoke gl_INIT and AM_INIT_AUTOMAKE.
6426         (AC_OUTPUT): Generate Makefile in gnulib/.
6427         * aclocal.m4, config.in, configure: Regenerated.
6428
6429 2012-04-10  Maciej W. Rozycki  <macro@codesourcery.com>
6430
6431         * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
6432
6433 2012-04-05  Pedro Alves  <palves@redhat.com>
6434
6435         -Werror=strict-aliasing
6436
6437         * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
6438         pointer.
6439
6440 2012-04-04  Pedro Alves  <palves@redhat.com>
6441
6442         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6443         (sparc_store_gregset_from_stack, sparc_store_gregset)
6444         (sparc_breakpoint_at): Fix formatting.
6445
6446 2012-03-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
6447
6448         * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
6449         are available.
6450         * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
6451         [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
6452         * config.in: Regenerate.
6453         * configure: Likewise.
6454
6455 2012-03-29  Pedro Alves  <palves@redhat.com>
6456
6457         * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
6458         Correct ptrace arguments.
6459
6460 2012-03-28  Pedro Alves  <palves@redhat.com>
6461
6462         * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
6463         (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
6464         (IA64_FR1_REGNUM): New defines.
6465         (ia64_fetch_register): New.
6466         (the_low_target): Install it.
6467         * linux-low.h (struct linux_target_ops) <fetch_register>: New
6468         field.
6469         * linux-low.c (linux_fetch_registers): Try the
6470         the_low_target.fetch_register hook first.
6471
6472         * linux-arm-low.c (the_low_target): Adjust.
6473         * linux-bfin-low.c (the_low_target): Adjust.
6474         * linux-cris-low.c (the_low_target): Adjust.
6475         * linux-crisv32-low.c (the_low_target): Adjust.
6476         * linux-m32r-low.c (the_low_target): Adjust.
6477         * linux-m68k-low.c (the_low_target): Adjust.
6478         * linux-mips-low.c (the_low_target): Adjust.
6479         * linux-ppc-low.c (the_low_target): Adjust.
6480         * linux-s390-low.c (the_low_target): Adjust.
6481         * linux-sh-low.c (the_low_target): Adjust.
6482         * linux-sparc-low.c (the_low_target): Adjust.
6483         * linux-tic6x-low.c (the_low_target): Adjust.
6484         * linux-x86-low.c (the_low_target): Adjust.
6485         * linux-xtensa-low.c (the_low_target): Adjust.
6486
6487 2012-03-26  Pedro Alves  <palves@redhat.com>
6488
6489         * server.c (handle_qxfer_libraries): Don't bail early if
6490         the_target->qxfer_libraries_svr4 is not NULL.
6491
6492 2012-03-26  Pedro Alves  <palves@redhat.com>
6493
6494         * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
6495
6496 2012-03-23  Pedro Alves  <palves@redhat.com>
6497
6498         * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
6499         "library-list-svr4" element's start tag when the the DSO list is
6500         empty.
6501
6502 2012-03-23  Pedro Alves  <palves@redhat.com>
6503
6504         * linux-low.c (read_one_ptr): Read the inferior's pointer through
6505         a variable whose type size is the same as the inferior's pointer
6506         size.
6507
6508 2012-03-21  Thomas Schwinge  <thomas@codesourcery.com>
6509
6510         * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
6511         struct siginfo.
6512         * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
6513         * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6514         * linux-low.h: Include <signal.h>.
6515         (struct siginfo): Remove forward declaration.
6516         (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
6517         struct siginfo.
6518
6519 2012-03-21  Mike Frysinger  <vapier@gentoo.org>
6520
6521         * .gitignore: Ignore more files.
6522
6523 2012-03-19  Pedro Alves  <palves@redhat.com>
6524             Jan Kratochvil  <jan.kratochvil@redhat.com>
6525
6526         * server.c (cont_thread, general_thread): Add describing comments.
6527         (start_inferior): Clear `cont_thread'.
6528         (handle_v_cont): Don't set `cont_thread' if resuming all threads
6529         of a process.
6530
6531 2012-03-15  Yao Qi  <yao@codesourcery.com>
6532
6533         * tracepoint.c (install_tracepoint): Move duplicated tracepoint
6534         handling to ...
6535         (cmd_qtdp): ... here.
6536
6537 2012-03-15  Yao Qi  <yao@codesourcery.com>
6538
6539         * tracepoint.c (struct tracepoint_action_ops): New.
6540         (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
6541         (m_tracepoint_action_download): New.
6542         (r_tracepoint_action_download): New.
6543         (x_tracepoint_action_download): New.
6544         (l_tracepoint_action_download): New.
6545         (add_tracepoint_action): Install `action->ops' according type.
6546         (download_tracepoint_1): Move code `download' function pointer
6547         of various tracepoint_action_ops.
6548
6549 2012-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
6550
6551         * linux-low.c (linux_attach_lwp_1): New variable buffer.  Call
6552         linux_ptrace_attach_warnings.
6553
6554 2012-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
6555
6556         * Makefile.in (linux-ptrace.o): New.
6557         * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
6558         (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
6559         (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
6560         (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
6561         (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
6562         of these targets.
6563         * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
6564
6565 2012-03-08  Yao Qi  <yao@codesourcery.com>
6566             Pedro Alves  <palves@redhat.com>
6567
6568         Fix PR server/13392.
6569         * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
6570         offset of JMP insn.
6571         * tracepoint.c (remove_tracepoint): New.
6572         (cmd_qtdp): Call remove_tracepoint when failed to install.
6573
6574 2012-03-07  Pedro Alves  <palves@redhat.com>
6575
6576         * linux-low.c (get_detach_signal): New.
6577         (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
6578         Pass on pending signals to PTRACE_DETACH.  Check the result of the
6579         ptrace call.
6580         * server.c (program_signals, program_signals_p): New.
6581         (handle_general_set): Handle QProgramSignals.
6582         * server.h (program_signals, program_signals_p): Declare.
6583
6584 2012-03-05  Pedro Alves  <palves@redhat.com>
6585             Jan Kratochvil  <jan.kratochvil@redhat.com>
6586
6587         * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
6588         New comment why.
6589
6590 2012-03-03  Yao Qi  <yao@codesourcery.com>
6591
6592         * tracepoint.c (tracepoint_look_up_symbols): Update call to
6593         agent_look_up_symbols.
6594
6595 2012-03-03  Yao Qi  <yao@codesourcery.com>
6596
6597         * Makefile.in (linux-low.o): Keep dependence on agent.h.
6598         (linux-x86-low.o): Likewise.
6599         * server.h: Remove in_process_agent_loaded.
6600         * tracepoint.c (in_process_agent_loaded): Removed.  Moved it
6601         common/agent.c.
6602         Update callers.
6603
6604 2012-03-03  Yao Qi  <yao@codesourcery.com>
6605
6606         * tracepoint.c (gdb_agent_capability): New global.
6607         (in_process_agent_loaded_ust): Renamed to
6608         `in_process_agent_supports_ust'.
6609         Update callers.
6610         (in_process_agent_supports_ust): Call agent_capability_check.
6611         (clear_installed_tracepoints): Assert that agent supports
6612         agent.
6613
6614 2012-03-03  Yao Qi  <yao@codesourcery.com>
6615
6616         * linux-low.c (linux_supports_agent): New.
6617         (linux_target_ops): Initialize field `supports_agent' with
6618         linux_supports_agent.
6619         * target.h (struct target_ops) <supports_agent>: New.
6620         (target_supports_agent): New macro.
6621         * server.c (handle_general_set): Handle packet 'QAgent'.
6622         (handle_query): Send `QAgent+'.
6623         * Makefile.in (server.o): Depends on agent.h.
6624
6625 2012-03-03  Yao Qi  <yao@codesourcery.com>
6626
6627         * Makefile.in (OBS): Add agent.o.
6628         Add new rule for agent.o.
6629         Track dependence of tracepoint.c on agent.h.
6630         * tracepoint.c (run_inferior_command_1):
6631         (run_inferior_command): Call agent_run_command.
6632         (gdb_ust_connect_sync_socket): Deleted.  Move it to
6633         common/agent.c.
6634         (resume_thread, stop_thread): Likewise.
6635         (gdb_ust_socket_init): Renamed to ...
6636         (gdb_agent_socket_init): ... New.
6637         (gdb_ust_thread): Renamed to ...
6638         (gdb_agent_helper_thread): ... New.
6639         (gdb_ust_init): Move some code to ...
6640         (gdb_agent_init): ... here.  New.
6641         [HAVE_UST]: Call gdb_ust_init.
6642         (initialize_tracepoint_ftlib):  Call gdb_agent_init.
6643         * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6644         * config.in, configure: Regenerated.
6645
6646 2012-03-02  Pedro Alves  <palves@redhat.com>
6647
6648         * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6649         * linux-low.c (struct simple_pid_list): New.
6650         (stopped_pids): New a struct simple_pid_list pointer.
6651         (add_to_pid_list, pull_pid_from_list): New.
6652         (handle_extended_wait): Don't assume the first signal new children
6653         report is SIGSTOP.  Adjust call to pull_pid_from_list.
6654         (linux_wait_for_lwp): Adjust.
6655
6656 2012-03-02  Yao Qi  <yao@codesourcery.com>
6657
6658         * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6659         debug log.
6660
6661 2012-03-02  Yao Qi  <yao@codesourcery.com>
6662
6663         * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6664         `stop_pc' and `tpoint'.  Update caller.
6665
6666 2012-03-01  Maciej W. Rozycki  <macro@codesourcery.com>
6667
6668         * linux-low.h (linux_target_ops): Add regset_bitmap member.
6669         * linux-low.c (use_linux_regsets): New macro.
6670         [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6671         [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6672         (linux_register_in_regsets): New function.
6673         (usr_fetch_inferior_registers): Skip registers covered by
6674         regsets.
6675         (usr_store_inferior_registers): Likewise.
6676         (usr_fetch_inferior_registers): New macro.
6677         (usr_store_inferior_registers): Likewise.
6678         (linux_fetch_registers): Handle mixed regset/non-regset targets.
6679         (linux_store_registers): Likewise.
6680         * linux-mips-low.c (init_registers_mips_dsp_linux): New
6681         prototype.
6682         (init_registers_mips64_dsp_linux): Likewise.
6683         (init_registers_mips_linux): New macro.
6684         (init_registers_mips_dsp_linux): Likewise.
6685         (mips_dsp_num_regs): Likewise.
6686         (DSP_BASE, DSP_CONTROL): New fallback macros.
6687         (mips_base_regs): New macro.
6688         (mips_regmap): Use it.  Fix the size.
6689         (mips_dsp_regmap): New variable.
6690         (mips_dsp_regset_bitmap): Likewise.
6691         (mips_arch_setup): New function.
6692         (mips_cannot_fetch_register): Use the_low_target.regmap rather
6693         than mips_regmap.
6694         (mips_cannot_store_register): Likewise.
6695         (the_low_target): Update .arch_setup, .num_regs and .regmap
6696         initializers.  Add .regset_bitmap initializer.
6697         * linux-arm-low.c (the_low_target): Add .regset_bitmap
6698         initializer.
6699         * linux-bfin-low.c (the_low_target): Likewise.
6700         * linux-cris-low.c (the_low_target): Likewise.
6701         * linux-crisv32-low.c (the_low_target): Likewise.
6702         * linux-ia64-low.c (the_low_target): Likewise.
6703         * linux-m32r-low.c (the_low_target): Likewise.
6704         * linux-m68k-low.c (the_low_target): Likewise.
6705         * linux-ppc-low.c (the_low_target): Likewise.
6706         * linux-s390-low.c (the_low_target): Likewise.
6707         * linux-sh-low.c (the_low_target): Likewise.
6708         * linux-sparc-low.c (the_low_target): Likewise.
6709         * linux-tic6x-low.c (the_low_target): Likewise.
6710         * linux-x86-low.c (the_low_target): Likewise.
6711         * linux-xtensa-low.c (the_low_target): Likewise.
6712         * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6713         mips64-dsp-linux.o to srv_regobj.  Add mips-dsp-linux.xml,
6714         mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6715         srv_xmlfiles.
6716         * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6717         (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6718
6719 2012-02-29  Yao Qi  <yao@codesourcery.com>
6720             Pedro Alves  <palves@redhat.com>
6721
6722         * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6723         `step_over_finished' is true.
6724
6725 2012-02-27  Pedro Alves  <palves@redhat.com>
6726
6727         * linux-low.c (pid_is_stopped): Delete, moved to common/.
6728         (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6729
6730 2012-02-27  Pedro Alves  <palves@redhat.com>
6731
6732         PR server/9684
6733         * linux-low.c (pid_is_stopped): New.
6734         (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6735
6736 2012-02-25  Luis Machado  <lgustavo@codesourcery.com>
6737
6738         * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6739         of conditions.
6740
6741 2012-02-24  Maciej W. Rozycki  <macro@codesourcery.com>
6742
6743         * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6744
6745 2012-02-24  Luis Machado  <lgustavo@codesourcery>
6746
6747         * server.c (handle_query): Advertise support for target-side
6748         breakpoint condition evaluation.
6749         (process_point_options): New function.
6750         (process_serial_event): When inserting a breakpoint, check for
6751         a target-side condition that should be evaluated.
6752
6753         * mem-break.c: Include regcache.h and ax.h.
6754         (point_cond_list_t): New data structure.
6755         (breakpoint) <cond_list>: New field.
6756         (find_gdb_breakpoint_at): Make non-static.
6757         (delete_gdb_breakpoint_at): Clear any target-side
6758         conditions.
6759         (clear_gdb_breakpoint_conditions): New function.
6760         (add_condition_to_breakpoint): Likewise.
6761         (add_breakpoint_condition): Likewise.
6762         (gdb_condition_true_at_breakpoint): Likewise.
6763         (gdb_breakpoint_here): Return result directly instead
6764         of going through a local variable.
6765
6766         * mem-break.h (find_gdb_breakpoint_at): New prototype.
6767         (clear_gdb_breakpoint_conditions): Likewise.
6768         (add_breakpoint_condition): Likewise.
6769         (gdb_condition_true_at_breakpoint): Likewise.
6770
6771         * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6772         (need_step_over_p): Take target-side breakpoint condition into
6773         consideration.
6774
6775 2012-02-24  Luis Machado  <lgustavo@codesourcery>
6776
6777         * server.h: Include tracepoint.h.
6778         (agent_mem_read, agent_get_trace_state_variable_value,
6779         agent_set_trace_state_variable_value,
6780         agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6781         get_set_tsv_func_addr): New prototypes.
6782
6783         * ax.h: New include file.
6784         * ax.c: New source file.
6785
6786         * tracepoint.c: Include ax.h.
6787         (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6788         agent_expr, eval_result_type): Move to ax.h.
6789         (parse_agent_expr): Rename to ...
6790         (gdb_parse_agent_expr): ... this, make it non-static and move
6791         to ax.h.
6792         (unparse_agent_expr) Rename to ...
6793         (gdb_unparse_agent_expr): ... this, make it non-static and move
6794         to ax.h.
6795         (eval_agent_expr): Rename to ...
6796         (eval_tracepoint_agent_expr): ... this.
6797         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6798         forward declarations.
6799         (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6800         (agent_get_trace_state_variable_value): New function.
6801         (agent_set_trace_state_variable_value): New function.
6802         (cmd_qtdp): Call gdb_parse_agent_expr (...).
6803         (response_tracepoint): Call gdb_unparse_agent_expr (...).
6804         (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6805         (condition_true_at_tracepoint): Likewise.
6806         (parse_agent_expr): Rename to ...
6807         (gdb_parse_agent_expr): ... this and move to ax.c.
6808         (unparse_agent_expr): Rename to ...
6809         (gdb_unparse_agent_expr): ... this and move to ax.c.
6810         (gdb_agent_op_name): Move to ax.c.
6811         (eval_agent_expr): Rename to ...
6812         (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6813         and move to ax.c.
6814         (eval_tracepoint_agent_expr): New function.
6815         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
6816         non-static.
6817         (current_insn_ptr, emit_error, struct bytecode_address): Move to
6818         ax.c.
6819         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6820         emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6821         emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6822         emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6823         emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6824         emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6825         emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6826         emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6827         (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6828         (compile_bytecodes): Remove forward declaration.
6829         (is_goto_target): Move to ax.c.
6830         (compile_bytecodes): Move to ax.c and call
6831         agent_get_trace_state_variable_value (...) and
6832         agent_set_trace_state_variable_value (...).
6833
6834         * Makefile.in: Update ax.c and IPA dependencies.
6835
6836 2012-02-24  Pedro Alves  <palves@redhat.com>
6837
6838         * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6839         (cmd_bigqtbuffer_circular): ... this.  Only handle
6840         'QTBuffer:circular:'.
6841         (handle_tracepoint_general_set): Adjust.
6842
6843 2012-02-16  Yao Qi  <yao@codesourcery.com>
6844
6845         * inferiors.c: Move code to ...
6846         * dll.c: .... here.  New.
6847         * server.h: Declare clear_dlls.
6848         * Makefile.in (SFILES): Add dll.c.
6849         (OBS): Add dll.o
6850         (dll.o): New rule.
6851
6852 2012-02-11  Yao Qi  <yao@codesourcery.com>
6853
6854         * server.c: (handle_monitor_command): Add a new parameter
6855         `own_buf'.
6856         (handle_query): Update caller.
6857
6858 2012-02-09  Joel Brobecker  <brobecker@adacore.com>
6859
6860         * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6861         * configure, config.in: Regenerate.
6862         * hostio.c: Provide an alternate implementation if HAVE_READLINK
6863         is not defined.
6864
6865 2012-02-02  Pedro Alves  <palves@redhat.com>
6866
6867         Try SIGKILL first, then PTRACE_KILL.
6868         * linux-low.c (linux_kill_one_lwp): New.
6869         (linux_kill_one_lwp): Rename to ...
6870         (kill_one_lwp_callback): ... this.  Use the new
6871         linux_kill_one_lwp.
6872
6873 2012-02-02  Pedro Alves  <palves@redhat.com>
6874
6875         * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6876         inferior.
6877
6878 2012-01-27  Pedro Alves  <palves@redhat.com>
6879
6880         * linux-low.c (linux_child_pid_to_exec_file): Delete.
6881         (elf_64_file_p): Make static.
6882         (linux_pid_exe_is_elf_64_file): New.
6883         * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6884         Delete declarations.
6885         (linux_pid_exe_is_elf_64_file): Declare.
6886         * linux-x86-low.c (x86_arch_setup): Use
6887         linux_pid_exe_is_elf_64_file.
6888
6889 2012-01-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
6890
6891         * linux-low.c (linux_wait_for_event_1): Rename to ...
6892         (linux_wait_for_event): ... here and merge it with former
6893         linux_wait_for_event - new variable wait_ptid, use it.
6894         (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6895
6896 2012-01-23  Pedro Alves  <palves@redhat.com>
6897
6898         * server.c (main): Avoid yet another case of infinite loop while
6899         detaching/killing after a longjmp.
6900
6901 2012-01-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
6902
6903         Code cleanup.
6904         * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6905
6906 2012-01-20  Ulrich Weigand  <ulrich.weigand@linaro.org>
6907
6908         * hostio.c (handle_readlink): New function.
6909         (handle_vFile): Call it to handle "vFile:readlink" packets.
6910
6911 2012-01-20  Pedro Alves  <palves@redhat.com>
6912             Ulrich Weigand  <ulrich.weigand@linaro.org>
6913
6914         * server.c (handle_v_requests): Only support vAttach and vRun to
6915         start multiple processes when in extended protocol mode.
6916
6917 2012-01-17  Pedro Alves  <palves@redhat.com>
6918
6919         * tracepoint.c (initialize_tracepoint): Use mmap instead of
6920         memalign plus mprotect to allocate the scratch buffer.
6921
6922 2012-01-13  Pedro Alves  <palves@redhat.com>
6923
6924         * server.c (attach_inferior): Clear `cont_thread'.
6925
6926 2012-01-13  Pedro Alves  <palves@redhat.com>
6927
6928         * server.c (main): Avoid infinite loop while detaching/killing
6929         after a longjmp.
6930
6931 2012-01-09  Doug Evans  <dje@google.com>
6932
6933         * server.c (start_inferior): Set last_ptid in --wrapper case.
6934
6935 2012-01-06  Yao Qi  <yao@codesourcery.com>
6936
6937         * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6938         defined.
6939         [IN_PROCESS_AGENT] (debug_agent): New global variable.
6940
6941 2012-01-04  Yao Qi  <yao@codesourcery.com>
6942
6943         * tracepoint.c (cmd_qtdp): Print debug message
6944         for static tracepoint.
6945
6946 2012-01-04  Yao Qi  <yao@codesourcery.com>
6947
6948         * tracepoint.c (trace_vdebug): Differentiate debug message
6949         between gdbserver and IPA.
6950
6951 2012-01-03  Yao Qi  <yao@codesourcery.com>
6952
6953         * tracepoint.c (tracepoint_was_hit): Don't collect for
6954         static tracepoint.
6955
6956 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
6957
6958         * terminal.h: Reformat copyright header.
6959
6960 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
6961
6962         * server.c (gdbserver_version): Update copyright year.
6963         * gdbreplay.c (gdbreplay_version): Likewise.
6964
6965 2011-12-18  Jan Kratochvil  <jan.kratochvil@redhat.com>
6966
6967         * linux-low.c (linux_create_inferior): Put empty if clause for write.
6968
6969         Revert:
6970         2011-12-18  Hui Zhu  <teawater@gmail.com>
6971         * linux-low.c (linux_create_inferior): Save return value to ret.
6972
6973 2011-12-18  Hui Zhu  <teawater@gmail.com>
6974
6975         * linux-low.c (linux_create_inferior): Save return value to ret.
6976
6977 2011-12-16  Doug Evans  <dje@google.com>
6978
6979         * linux-low.c (linux_create_inferior): If stdio connection,
6980         redirect stdin from /dev/null, stdout to stderr.
6981         * remote-utils.c (remote_is_stdio): New static global.
6982         (remote_connection_is_stdio): New function.
6983         (remote_prepare): Handle stdio connection.
6984         (remote_open): Ditto.
6985         (remote_close): Don't close stdin for stdio connections.
6986         (read_prim,write_prim): New functions.  Replace all calls to
6987         read/write to these.
6988         * server.c (main): Watch for "-" argument.  Move call to
6989         remote_prepare before start_inferior.
6990         * server.h (STDIO_CONNECTION_NAME): New macro.
6991         (remote_connection_is_stdio): Declare.
6992
6993         * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6994         in debugging output.
6995
6996 2011-12-15  Yao Qi  <yao@codesourcery.com>
6997
6998         * tracepoint.c: Include sys/syscall.h.
6999         (gdb_ust_thread): Remove preprocessor conditional.
7000
7001 2011-12-14  Pedro Alves  <pedro@codesourcery.com>
7002
7003         * linux-low.c (linux_detach_one_lwp): Call
7004         the_low_target.prepare_to_resume before detaching.
7005
7006 2011-12-14  Yao Qi  <yao@codesourcery.com>
7007
7008         * tracepoint.c (gdb_ust_thread): Don't ignore return value
7009         of write.
7010
7011 2011-12-14  Yao Qi  <yao@codesourcery.com>
7012
7013         * i386-low.c (i386_low_stopped_data_address): Initialize local
7014         variable `control'.
7015
7016 2011-12-13  Pedro Alves  <pedro@codesourcery.com>
7017
7018         PR remote/13492
7019
7020         * i386-low.c (i386_low_stopped_data_address): Avoid fetching
7021         DR_CONTROL unless necessary.  Extend comments.
7022         * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
7023         DR0-3 if not used.  If any watchpoint was set, clear DR_STATUS.
7024
7025 2011-12-13  Yao Qi  <yao@codesourcery.com>
7026
7027         * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
7028         macros.
7029         (upload_fast_traceframes, upload_fast_traceframes): Likewise.
7030
7031 2011-12-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
7032
7033         * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
7034         Print new debug message for such case.
7035
7036 2011-12-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
7037
7038         Fix overlapping memcpy.
7039         * mem-break.c (set_raw_breakpoint_at): New variable buf.  Use it for
7040         the read_inferior_memory transfer.
7041         (delete_fast_tracepoint_jump): New variable buf.  Use it for the
7042         write_inferior_memory transfer.
7043         (set_fast_tracepoint_jump): New variable buf.  Use it for the
7044         read_inferior_memory and write_inferior_memory transfers.
7045         (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
7046         (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
7047         Use it for the write_inferior_memory transfer.
7048         (check_mem_read, check_mem_write): New gdb_asserts for overlapping
7049         buffers.
7050
7051 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
7052
7053         * linux-low.c (fetch_register, store_register): Make code
7054         consistent, fix formatting.
7055
7056 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
7057
7058         * linux-low.c (usr_store_inferior_registers): Factor out code
7059         to handle individual registers into...
7060         (store_register): ... this new function.
7061
7062 2011-12-06  Ulrich Weigand  <uweigand@de.ibm.com>
7063
7064         * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
7065         (s390-linux32v2.o, s390-linux32v2.c): Likewise.
7066         (s390-linux64v1.o, s390-linux64v1.c): Likewise.
7067         (s390-linux64v2.o, s390-linux64v2.c): Likewise.
7068         (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
7069         (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
7070         * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
7071         (srv_xmlfiles): Add new XML files.
7072
7073         * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
7074         and <sys/uio.h>.
7075         (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
7076         (init_registers_s390_linux32v1): Add prototype.
7077         (init_registers_s390_linux32v2): Likewise.
7078         (init_registers_s390_linux64v1): Likewise.
7079         (init_registers_s390_linux64v2): Likewise.
7080         (init_registers_s390x_linux64v1): Likewise.
7081         (init_registers_s390x_linux64v2): Likewise.
7082         (s390_num_regs): Increment to 52.
7083         (s390_regmap): Add orig_r2 register.
7084         (s390_num_regs_3264): Increment to 68.
7085         (s390_regmap_3264): Add orig_r2 register.
7086         (s390_collect_ptrace_register): Handle orig_r2 register.
7087         (s390_supply_ptrace_register): Likewise.
7088         (s390_fill_last_break): New function.
7089         (s390_store_last_break): Likewise.
7090         (s390_fill_system_call): New function.
7091         (s390_store_system_call): Likewise.
7092         (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
7093         register sets.
7094         (s390_check_regset): New function.
7095         (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
7096         NT_S390_SYSTEM_CALL regsets and use appropriate description.
7097         Update target_regsets for available register sets.
7098
7099 2011-12-02  Paul Pluzhnikov  <ppluzhnikov@google.com>
7100             Jan Kratochvil  <jan.kratochvil@redhat.com>
7101
7102         * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
7103         (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
7104         New.
7105         (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
7106         * linux-low.h (struct process_info_private): New member r_debug.
7107         * server.c (handle_qxfer_libraries): Call
7108         the_target->qxfer_libraries_svr4.
7109         (handle_qxfer_libraries_svr4): New function.
7110         (qxfer_packets): New entry "libraries-svr4".
7111         (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
7112         * target.h (struct target_ops): New member qxfer_libraries_svr4.
7113         * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
7114         PACKET_qXfer_libraries_svr4.
7115
7116 2011-11-30  Ulrich Weigand  <uweigand@de.ibm.com>
7117
7118         * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
7119         PSW address/mask between 8-byte and 16-byte formats.
7120         (s390_supply_ptrace_register): Likewise.
7121         (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
7122         basic addressing mode bit.
7123
7124 2011-11-24  Stan Shebs  <stan@codesourcery.com>
7125
7126         * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
7127
7128 2011-11-17  Stan Shebs  <stan@codesourcery.com>
7129
7130         * tracepoint.c (struct tracepoint): New field traceframe_usage.
7131         (tracing_start_time): New global.
7132         (tracing_stop_time): New global.
7133         (tracing_user_name): New global.
7134         (tracing_notes): New global.
7135         (tracing_stop_note): New global.
7136         (cmd_qtstart): Set traceframe_usage, start_time.
7137         (stop_tracing): Set stop_time.
7138         (cmd_qtstatus): Report additional status.
7139         (cmd_qtp): New function.
7140         (handle_tracepoint_query): Call it.
7141         (cmd_qtnotes): New function.
7142         (handle_tracepoint_general_set): Call it.
7143         (get_timestamp): Rename from tsv_get_timestamp.
7144
7145 2011-11-14  Stan Shebs  <stan@codesourcery.com>
7146             Kwok Cheung Yeung  <kcy@codesourcery.com>
7147
7148         * linux-x86-low.c (small_jump_insn): New.
7149         (i386_install_fast_tracepoint_jump_pad): Add arguments for
7150         trampoline and error message, build a trampoline and issue a small
7151         jump instruction to it.
7152         (x86_install_fast_tracepoint_jump_pad): Add arguments for
7153         trampoline and error message.
7154         (x86_get_min_fast_tracepoint_insn_len): New.
7155         (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
7156         * linux-low.h (struct linux_target_ops): Add arguments to
7157         install_fast_tracepoint_jump_pad operation, add new operation.
7158         * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
7159         arguments.
7160         (linux_get_min_fast_tracepoint_insn_len): New function.
7161         (linux_target_op): Add new operation.
7162         * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
7163         (gdb_trampoline_buffer_end): Ditto.
7164         (gdb_trampoline_buffer_error): Ditto.
7165         (struct ipa_sym_addresses): Add fields for new IPA variables.
7166         (symbol_list): Add entries for new IPA variables.
7167         (struct tracepoint): Add fields to hold the address range of the
7168         trampoline used by the tracepoint.
7169         (trampoline_buffer_head): New static variable.
7170         (trampoline_buffer_tail): Ditto.
7171         (claim_trampoline_space): New function.
7172         (have_fast_tracepoint_trampoline_buffer): New function.
7173         (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
7174         structure.
7175         (install_fast_tracepoint): Ditto, also add error buffer argument.
7176         (cmd_qtminftpilen): New function.
7177         (handle_tracepoint_query): Add response to qTMinFTPILen packet.
7178         (fast_tracepoint_from_trampoline_address): New function.
7179         (fast_tracepoint_collecting): Handle trampoline as part of jump
7180         pad space.
7181         (set_trampoline_buffer_space): New function.
7182         (initialize_tracepoint): Initialize new IPA variables.
7183         * target.h (struct target_ops): Add arguments to
7184         install_fast_tracepoint_jump_pad operation, add new
7185         get_min_fast_tracepoint_insn_len operation.
7186         (target_get_min_fast_tracepoint_insn_len): New.
7187         (install_fast_tracepoint_jump_pad): Add arguments.
7188         * server.h (IPA_BUFSIZ): Define.
7189         * linux-i386-ipa.c: Include extra header files.
7190         (initialize_fast_tracepoint_trampoline_buffer): New function.
7191         (initialize_low_tracepoint): Call it.
7192         * server.h (set_trampoline_buffer_space): Declare.
7193         (claim_trampoline_space): Ditto.
7194         (have_fast_tracepoint_trampoline_buffer): Ditto.
7195
7196 2011-11-14  Yao Qi  <yao@codesourcery.com>
7197
7198         * server.c (handle_query): Handle InstallInTrace for qSupported.
7199         * tracepoint.c (add_tracepoint): Sort list.
7200         (install_tracepoint, download_tracepoint): New.
7201         (cmd_qtdp): Call them to install and download tracepoints.
7202         (sort_tracepoints): Removed.
7203         (cmd_qtstart): Update.
7204
7205 2011-11-14  Yao Qi  <yao@codesourcery.com>
7206
7207         * mem-break.c (inc_ref_fast_tracepoint_jump): New.
7208         * mem-break.h: Declare.
7209         * tracepoint.c (cmd_qtstart): Move some code to ...
7210         (clone_fast_tracepoint, install_fast_tracepoint): ... here.
7211         New.
7212         (download_tracepoints): Move some code to ...
7213         (download_tracepoint_1): ... here.  New.
7214
7215 2011-11-08  Yao Qi  <yao@codesourcery.com>
7216
7217         * remote-utils.c (relocate_instruction): A comment fix.
7218
7219 2011-11-07  Joel Brobecker  <brobecker@adacore.com>
7220
7221         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
7222         (i386_dr_low_get_control, i386_dr_low_get_status): Use
7223         dr_status_mirror and dr_control_mirror from debug_reg_state.
7224         (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
7225         (i386_initial_stuff): Remove use of deleted globals.
7226         (i386_get_thread_context, i386_set_thread_context,
7227         i386_thread_added): Use dr_status_mirror and dr_control_mirror
7228         from debug_reg_state.
7229
7230 2011-11-05  Yao Qi  <yao@codesourcery.com>
7231
7232         * tracepoint.c (gdb_collect): Loop over tracepoints of same
7233         address as TPOINT's.
7234
7235 2011-11-02  Stan Shebs  <stan@codesourcery.com>
7236
7237         * tracepoint.c (agent_mem_read_string): New function.
7238         (eval_agent_expr): Call it for tracenz.
7239         * server.c (handle_query): Report support for tracenz.
7240
7241 2011-11-02  Yao Qi  <yao@codesourcery.com>
7242
7243         * tracepoint.c (cmd_qtstart): Remove unused local variables.
7244
7245 2011-11-02  Yao Qi  <yao@codesourcery.com>
7246
7247         * target.h: Fix a typo in comment.
7248
7249 2011-10-31  Pedro Alves  <pedro@codesourcery.com>
7250
7251         * mem-break.c (check_mem_write): Add `myaddr' parameter.  Don't
7252         clobber the breakpoints' shadows with fast tracepoint jumps.
7253         * mem-break.h (check_mem_write): Add `myaddr' parameter.
7254         * target.c (write_inferior_memory): Also pass MYADDR down to
7255         check_mem_write.
7256
7257 2011-10-07  Ulrich Weigand  <ulrich.weigand@linaro.org>
7258
7259         * configure.ac: Check support for personality routine.
7260         * configure: Regenerate.
7261         * config.in: Likewise.
7262         * linux-low.c: Include <sys/personality.h>.
7263         Define ADDR_NO_RANDOMIZE if necessary.
7264         (linux_create_inferior): Disable address space randomization when
7265         forking inferior, if requested.
7266         (linux_supports_disable_randomization): New function.
7267         (linux_target_ops): Install it.
7268         * server.h (disable_randomization): Declare.
7269         * server.c (disable_randomization): New global variable.
7270         (handle_general_set): Handle QDisableRandomization.
7271         (handle_query): Likewise for qSupported.
7272         (main): Support --disable-randomization and --no-disable-randomization
7273         command line arguments.
7274         * target.h (struct target_ops): Add supports_disable_randomization.
7275         (target_supports_disable_randomization): New macro.
7276
7277 2011-09-29  Mike Frysinger  <vapier@gentoo.org>
7278
7279         * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
7280         ifdef check.
7281         [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
7282         [!PT_GETDSBT] (target_loadmap): New definition.
7283         (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
7284         (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
7285         LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
7286         and PT_GETDSBT to LINUX_LOADMAP.
7287         [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
7288         (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
7289
7290 2011-09-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
7291
7292         * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
7293         (arm_linux_hwbp_cap): New static variable.
7294         (arm_linux_get_hwbp_cap): Replace by ...
7295         (arm_linux_init_hwbp_cap): ... this new function.
7296         (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
7297         (arm_linux_get_hw_watchpoint_count): Likewise.
7298         (arm_linux_get_hw_watchpoint_max_length): Likewise.
7299         (arm_arch_setup): Call arm_linux_init_hwbp_cap.
7300         (arm_prepare_to_resume): Use perror_with_name instead of error.
7301
7302 2011-09-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
7303
7304         * linux-arm-low.c: Include <signal.h>.
7305         (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
7306         (struct arm_linux_hwbp_cap): New data type.
7307         (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
7308         (struct arm_linux_hw_breakpoint): New data type.
7309         (MAX_BPTS, MAX_WPTS): Define.
7310         (struct arch_process_info, struct arch_lwp_info): New data types.
7311         (arm_linux_get_hwbp_cap): New function.
7312         (arm_linux_get_hw_breakpoint_count): Likewise.
7313         (arm_linux_get_hw_watchpoint_count): Likewise.
7314         (arm_linux_get_hw_watchpoint_max_length): Likewise.
7315         (arm_hwbp_control_initialize): Likewise.
7316         (arm_hwbp_control_is_enabled): Likewise.
7317         (arm_hwbp_control_is_initialized): Likewise.
7318         (arm_hwbp_control_disable): Likewise.
7319         (arm_linux_hw_breakpoint_equal): Likewise.
7320         (arm_linux_hw_point_initialize): Likewise.
7321         (struct update_registers_data): New data structure.
7322         (update_registers_callback: New function.
7323         (arm_insert_point): Likewise.
7324         (arm_remove_point): Likewise.
7325         (arm_stopped_by_watchpoint): Likewise.
7326         (arm_stopped_data_address): Likewise.
7327         (arm_new_process): Likewise.
7328         (arm_new_thread): Likewise.
7329         (arm_prepare_to_resume): Likewise.
7330         (the_low_target): Register arm_insert_point, arm_remove_point,
7331         arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
7332         arm_new_thread, and arm_prepare_to_resume.
7333
7334 2011-09-15  Stan Shebs  <stan@codesourcery.com>
7335
7336         * server.h (struct emit_ops): Add compare-goto fields.
7337         * tracepoint.c (gdb_agent_op_sizes): New table.
7338         (emit_eq_goto): New function.
7339         (emit_ne_goto): New function.
7340         (emit_lt_goto): New function.
7341         (emit_le_goto): New function.
7342         (emit_gt_goto): New function.
7343         (emit_ge_goto): New function.
7344         (is_goto_target): New function.
7345         (compile_bytecodes): Recognize special cases of compare-goto
7346         combinations and call specialized emitters for them.
7347         * linux-x86-low.c (amd64_emit_eq_goto): New function.
7348         (amd64_emit_ne_goto): New function.
7349         (amd64_emit_lt_goto): New function.
7350         (amd64_emit_le_goto): New function.
7351         (amd64_emit_gt_goto): New function.
7352         (amd64_emit_ge_goto): New function.
7353         (amd64_emit_ops): Add the new functions.
7354         (i386_emit_eq_goto): New function.
7355         (i386_emit_ne_goto): New function.
7356         (i386_emit_lt_goto): New function.
7357         (i386_emit_le_goto): New function.
7358         (i386_emit_gt_goto): New function.
7359         (i386_emit_ge_goto): New function.
7360         (i386_emit_ops): Add the new functions.
7361
7362 2011-09-08  Stan Shebs  <stan@codesourcery.com>
7363
7364         * linux-x86-low.c (i386_emit_prologue): Save %ebx.
7365         (i386_emit_epilogue): Restore %ebx.
7366
7367 2011-08-31  Jie Zhang  <jzhang918@gmail.com>
7368
7369         * server.c (step_thread): Remove definition.
7370         (process_serial_event): Don't handle Hs.
7371         * server.h (step_thread): Remove declaration.
7372         * target.c (set_desired_inferior): Remove use of step_thread.
7373
7374 2011-08-24  Luis Machado  <lgustavo@codesourcery.com>
7375
7376         * linux-low.c: Include linux-procfs.h.
7377         (linux_attach_lwp_1): Update comments.
7378         (linux_attach): Scan for existing threads when attaching to a
7379         process that is the tgid.
7380         * Makefile.in: Update dependencies.
7381
7382 2011-08-24  Luis Machado  <lgustavo@codesourcery.com>
7383
7384         * configure.srv: Add linux-procfs.o dependencies.
7385
7386 2011-08-14  Yao Qi  <yao@codesourcery.com>
7387
7388         * target.h (struct target_ops): Fix indent.
7389         * win32-low.c (win32_target_ops): Fix comment.
7390
7391 2011-08-14  Andrew Jenner  <andrew@codesourcery.com>
7392             Yao Qi  <yao@codesourcery.com>
7393
7394         * Makefile.in (clean): Remove tic6x-*.c files.
7395         (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
7396         (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
7397         (tic6x-c64xp-linux.c): Likewise.
7398         * configure.srv: Add support for tic6x-*-uclinux.
7399         * linux-tic6x-low.c: New.
7400         * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
7401
7402 2011-08-14  Andrew Stubbs <ams@codesourcery.com>
7403             Yao Qi  <yao@codesourcery.com>
7404
7405         * target.h (struct target_ops): Add read_loadmap.
7406         * linux-low.c (struct target_loadseg): New type.
7407         (struct target_loadmap): New type.
7408         (linux_read_loadmap): New function.
7409         (linux_target_ops): Add linux_read_loadmap.
7410         * server.c (handle_query): Support qXfer:fdpic:read packet.
7411         * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
7412         to NULL.
7413
7414 2011-08-05  Eli Zaretskii  <eliz@gnu.org>
7415
7416         * win32-low.c: Include <stdint.h>.
7417
7418 2011-07-22  Pedro Alves  <pedro@codesourcery.com>
7419
7420         * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
7421         to the inferior here.
7422         (i386_remove_aligned_watchpoint): Ditto.
7423         (i386_handle_nonaligned_watchpoint): Return immediate on fail to
7424         fit part of the watchpoint in the debug registers.
7425         (i386_update_inferior_debug_regs): New.
7426         (i386_low_insert_watchpoint): Work on a local mirror of the debug
7427         registers, and only update the inferior on success.
7428         (i386_low_remove_watchpoint): Ditto.
7429
7430 2011-07-22  Kwok Cheung Yeung  <kcy@codesourcery.com>
7431
7432         * linux-low.c (compare_ints, unique, list_threads, show_process,
7433         linux_core_of_thread): Delete.
7434         (linux_target_ops): Change linux_core_of_thread to
7435         linux_common_core_of_thread.
7436         (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
7437         * utils.c (malloc_failure): Change type of argument.
7438         (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
7439         * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
7440         common/linux-osdata.c, common/ptid.c and common/buffer.c.
7441         (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
7442         (IPA_OBJS): Add common-utils-ipa.o.
7443         (ptid_h, linux_osdata_h): New macros.
7444         (server_h): Add common/common-utils.h, common/xml-utils.h,
7445         common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
7446         common/ptid.h.
7447         (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
7448         ptid.o, buffer.o): New rules.
7449         (linux-low.o): Add common/linux-osdata.h as a dependency.
7450         * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
7451         * configure.ac: Add AC_HEADER_DIRENT check.
7452         * config.in: Regenerate.
7453         * configure: Regenerate.
7454         * remote-utils.c (xml_escape_text): Delete.
7455         (buffer_grow, buffer_free, buffer_init, buffer_finish,
7456         buffer_xml_printf): Move to common/buffer.c.
7457         * server.c (main): Remove call to initialize_inferiors.
7458         * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
7459         ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
7460         ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
7461         internal_error, gdb_assert, gdb_assert_fail): Delete.
7462         (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
7463         buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
7464         common/buffer.h.
7465         * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
7466         ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
7467         initialize_inferiors): Delete.
7468
7469 2011-07-20  Pedro Alves  <pedro@codesourcery.com>
7470
7471         * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
7472         symbol error.
7473
7474 2011-05-31  Pedro Alves  <pedro@codesourcery.com>
7475
7476         * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
7477         assertion.
7478         * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
7479
7480 2011-05-26  Yao Qi  <yao@codesourcery.com>
7481
7482         * Makefile.in (thread-db.o): Track dependence to
7483         common/gdb_thread_db.h.
7484         * thread-db.c: include gdb_thread_db.h from right place.
7485
7486 2011-05-16  Adrian Cornish  <gnu@bluedreamer.com>
7487
7488         * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
7489         __FILE__ and __LINE__ to internal_error.
7490
7491 2011-05-13  Doug Evans  <dje@google.com>
7492
7493         * thread-db.c (try_thread_db_load_from_sdir): New function.
7494         (try_thread_db_load_from_dir): New function.
7495         (thread_db_load_search): Handle $sdir, ignore $pdir.
7496         Remove trying of system directories if search of
7497         libthread-db-search-path fails, that is now done via $sdir.
7498
7499 2011-05-12  Kwok Cheung Yeung  <kcy@codesourcery.com>
7500
7501         * server.c (handle_query): Add EnableDisableTracepoints to the list
7502         of supported features.
7503         * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
7504         tracepoints.
7505         (cmd_qtenable_disable): New.
7506         (cmd_qtstart): Install tracepoints even if disabled.
7507         (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
7508         receiving a QTEnable or QTDisable packet.
7509         (gdb_collect): Skip data collection if fast tracepoint is disabled.
7510         (ust_marker_to_static_tracepoint): Do not ignore disabled static
7511         tracepoints.
7512         (gdb_probe): Skip data collection if static tracepoint is disabled.
7513
7514 2011-05-10  Doug Evans  <dje@google.com>
7515
7516         * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
7517
7518 2011-05-04  Doug Evans  <dje@google.com>
7519
7520         * linux-low.c (linux_join): Skip process lookup.
7521         * spu-low.c (spu_join): Ditto.
7522         * server.c (join_inferiors_callback): Delete.
7523         (process_serial_event): For 'D' packet (detach) call join_inferior
7524         directly.
7525
7526 2011-05-04  Joseph Myers  <joseph@codesourcery.com>
7527
7528         * README: Don't mention xscale*-*-linux*.
7529         * configure.srv (xscale*-*-linux*): Don't handle target.
7530
7531 2011-04-27  Nathan Froyd  <froydnj@codesourcery.com>
7532
7533         * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
7534         casting pointers.
7535         (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
7536         (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
7537         (i386_emit_void_call_2): Likewise.
7538
7539 2011-04-26  Yao Qi  <yao@codesourcery.com>
7540
7541         * linux-low.c: Move common macros to linux-ptrace.h.
7542         Include linux-ptrace.h.
7543         * Makefile.in (linux_ptrace_h): New.
7544         (linux-low.o): Depends on linux-ptrace.h.
7545
7546 2011-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
7547
7548         * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
7549         RUN_ONCE.  Comment for the LISTEN_DESC delete_file_handler call.
7550         (remote_prepare): New function with most of the TCP code from ...
7551         (remote_open): ... here.  Detect PORT here unconditionally.  Move also
7552         setting transport_is_reliable.
7553         * server.c (run_once): New variable.
7554         (gdbserver_usage): Document it.
7555         (main): Set run_once for `--once'.  Call remote_prepare.  Exit after
7556         the first run if RUN_ONCE.
7557         * server.h (run_once, remote_prepare): New declarations.
7558
7559 2011-04-19  Tom Tromey  <tromey@redhat.com>
7560
7561         * win32-low.c (handle_load_dll): Remove duplicate "the".
7562
7563 2011-04-07  Pierre Muller  <muller@ics.u-strasbg.fr>
7564
7565         Remove support for old Cygwin 1.5 versions.
7566         * win32-low.c (win32_create_inferior): Use new cygwin_path_list
7567         function to avoid warning.
7568         (win32_add_one_solib): Use cygwin_conv_path function to avoid
7569         warning.
7570
7571 2011-03-18  Pierre Muller  <muller@ics.u-strasbg.fr>
7572
7573         * gdbserver/server.h (Macro _): Define it if not available.
7574
7575 2011-03-14  Michael Snyder  <msnyder@vmware.com>
7576
7577         * hostio.c (handle_close): Remove unnecessary null test.
7578
7579 2011-03-10  Joel Brobecker  <brobecker@adacore.com>
7580
7581         * Makefile.in (maintainer-clean realclean distclean): Remove
7582         "make ...  subdir_do" command.
7583
7584 2011-03-10  Michael Snyder  <msnyder@vmware.com>
7585
7586         * tracepoint.c (tracepoint_finish_step): Fix loop variable.
7587
7588         * server.c (handle_v_run): Free alloced buffer on early return.
7589
7590 2011-03-09  Yao Qi  <yao@codesourcery.com>
7591
7592         Revert:
7593         2011-03-04  Yao Qi  <yao@codesourcery.com>
7594
7595         * Makefile.in: Remove GNU make feature --directory.
7596
7597         2011-03-05  Yao Qi  <yao@codesourcery.com>
7598
7599         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7600         (subdir_do): New make target.  Copied from gdb/Makefile.
7601         (maintainer-clean, realclean, distclean, clean): Call corresponding
7602         make targets in common/Makefile.
7603
7604         2011-02-11  Yao Qi  <yao@codesourcery.com>
7605
7606         * configure.ac: Call AC_PROG_RANLIB.
7607         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
7608         * configure: Regenerate.
7609
7610 2011-03-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
7611
7612         * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
7613
7614 2011-03-06  Yao Qi  <yao@codesourcery.com>
7615
7616         * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
7617
7618 2011-03-05  Yao Qi  <yao@codesourcery.com>
7619
7620         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7621         (subdir_do): New make target.  Copied from gdb/Makefile.
7622         (maintainer-clean, realclean, distclean, clean): Call corresponding
7623         make targets in common/Makefile.
7624
7625 2011-03-04  Yao Qi  <yao@codesourcery.com>
7626
7627         * Makefile.in: Remove GNU make feature --directory.
7628
7629 2011-03-04  Michael Snyder  <msnyder@vmware.com>
7630
7631         * server.c (queue_stop_reply): Call xmalloc not malloc.
7632
7633 2011-03-02  Michael Snyder  <msnyder@vmware.com>
7634
7635         * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7636
7637 2011-02-28  Michael Snyder  <msnyder@vmware.com>
7638
7639         * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7640         (cmd_qtframe): Ditto.
7641         (cmd_qtbuffer): Ditto.
7642         (cmd_bigqtbuffer): Ditto.
7643
7644         * utils.c (decimal2str): Initialize 'width' to nine, then
7645         don't mess with it.
7646
7647 2011-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
7648
7649         * hostio.c (require_data): Free *data, not data.
7650
7651 2011-02-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
7652
7653         * hostio.c (require_data): Use free, not xfree.
7654
7655 2011-02-27  Michael Snyder  <msnyder@vmware.com>
7656
7657         * server.c (handle_query): Discard unused value.
7658
7659         * hostio.c (require_data): Free malloc memory before returning
7660         error.
7661
7662 2011-02-26  Michael Snyder  <msnyder@vmware.com>
7663
7664         * linux-low.c (list_threads): Call closedir for dirent.
7665
7666 2011-02-27  Michael Snyder  <msnyder@vmware.com>
7667
7668         * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7669         a case statement falls through.
7670
7671         * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7672
7673         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7674         in comparison.
7675
7676 2011-02-26  Michael Snyder  <msnyder@vmware.com>
7677
7678         * utils.c (decimal2str): Eliminate dead code and dead param.
7679         (pulongest): Drop dead param from call to decimal2str.
7680         (plongest): Ditto.
7681
7682 2011-02-24  Joel Brobecker  <brobecker@adacore.com>
7683
7684         Revert the following patch (not approved yet):
7685         2011-02-21  Hui Zhu  <teawater@gmail.com>
7686         * tracepoint.c (tp_printf): New function.
7687         (eval_agent_expr): Handle gdb_agent_op_printf.
7688
7689 2011-02-21  Hui Zhu  <teawater@gmail.com>
7690
7691         * tracepoint.c (tp_printf): New function.
7692         (eval_agent_expr): Handle gdb_agent_op_printf.
7693
7694 2011-02-18  Tom Tromey  <tromey@redhat.com>
7695
7696         * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7697         (tracepoint.o): Likewise.
7698         * tracepoint.c (enum gdb_agent_op): Use ax.def.
7699         (gdb_agent_op_names): Likewise.
7700
7701 2011-02-18  Tom Tromey  <tromey@redhat.com>
7702
7703         * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7704         gdb_agent_op_rot>: New constants.
7705         (gdb_agent_op_names): Add pick and roll.
7706         (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7707         cases.
7708
7709 2011-02-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
7710
7711         * aclocal.m4: Regenerated with aclocal-1.11.1.
7712
7713 2011-02-14  Pedro Alves  <pedro@codesourcery.com>
7714
7715         * server.c (handle_qxfer_traceframe_info): New.
7716         (qxfer_packets): Register "traceframe-info".
7717         (handle_query): Report support for qXfer:traceframe-info:read+.
7718         * tracepoint.c (match_blocktype): New.
7719         (traceframe_find_block_type): Rename to ...
7720         (traceframe_walk_blocks): ... this.  Add callback filter argument,
7721         and use it.
7722         (traceframe_find_block_type): New, reimplemented on top of
7723         traceframe_walk_blocks.
7724         (build_traceframe_info_xml): New.
7725         (traceframe_read_info): New.
7726         * server.h (traceframe_read_info): Declare.
7727
7728 2011-02-11  Yao Qi  <yao@codesourcery.com>
7729
7730         * configure.ac: Call AC_PROG_RANLIB.
7731         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
7732         * configure: Regenerate.
7733
7734 2011-02-07  Pedro Alves  <pedro@codesourcery.com>
7735
7736         * server.c (gdb_read_memory): Change return semantics to allow
7737         partial transfers.
7738         (handle_search_memory_1): Adjust.
7739         (process_serial_event) <'m' packet>: Handle partial transfers.
7740         * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7741
7742 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
7743
7744         * regcache.c (init_register_cache): Initialize
7745         regcache->register_status.
7746         (free_register_cache): Release regcache->register_status.
7747         (regcache_cpy): Copy register_status.
7748         (registers_to_string): Print 'x's for unavailable registers.
7749         (supply_register): Mark the register's status valid or
7750         unavailable, depending on whether a buffer was passed in or not.
7751         (supply_register_zeroed): New.
7752         (supply_regblock): Mark the registers' status valid or
7753         unavailable, depending on whether a buffer was passed in or not.
7754         * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7755         (struct regcache): New `register_status' field.
7756         (supply_register_zeroed): Declare.
7757         * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7758         supply_register_zeroed, rather than passing a NULL buffer to
7759         supply_register.
7760         * tracepoint.c (fetch_traceframe_registers): Update comment.
7761
7762 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
7763
7764         * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7765         buffer explicit.
7766
7767 2011-01-25  Pedro Alves  <pedro@codesourcery.com>
7768
7769         * server.h (decode_xfer_write): Change prototype.
7770         * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7771         and don't extract the annex here.
7772         * server.c (decode_xfer_read): Remove `annex' parameter,
7773         and don't extract the annex here.
7774         (decode_xfer): New.
7775         (struct qxfer): New.
7776         (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7777         (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7778         (handle_qxfer_statictrace): New functions, abstracted out from
7779         handle_query, and made to use the struct qxfer interface.
7780         (handle_threads_qxfer_proper): Rename to ...
7781         (handle_qxfer_threads_proper): ... this.
7782         (handle_threads_qxfer): Rename to ...
7783         (handle_qxfer_threads): ... this.  Adjust.
7784         (qxfer_packets): New array.
7785         (handle_qxfer): New function.
7786         (handle_query): Use handle_qxfer.
7787
7788 2011-01-05  Michael Snyder  <msnyder@msnyder-server.eng.vmware.com>
7789
7790         * gdbreplay.c: Shorten lines of >= 80 columns.
7791         * linux-low.c: Ditto.
7792         * linux-ppc-low.c: Ditto.
7793         * linux-s390-low.c: Ditto.
7794         * linux-sparc-low.c: Ditto.
7795         * linux-x86-low.c: Ditto.
7796         * linux-xtensa-low.c: Ditto.
7797         * mem-break.c: Ditto.
7798         * nto-low.c: Ditto.
7799         * regcache.h: Ditto.
7800         * remote-utils.c: Ditto.
7801         * server.c: Ditto.
7802         * server.h: Ditto.
7803         * thread-db.c: Ditto.
7804         * tracepoint.c: Ditto.
7805         * utils.c: Ditto.
7806         * win32-low.h: Ditto.
7807
7808 2011-01-05  Joel Brobecker  <brobecker@adacore.com>
7809
7810         * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7811         update.
7812
7813 2011-01-01  Joel Brobecker  <brobecker@adacore.com>
7814
7815         * server.c (gdbserver_version): Update copyright year in version
7816         output.
7817         * gdbreplay.c (gdbreplay_version): Ditto.
7818
7819 2010-12-29  Jie Zhang  <jie.zhang@analog.com>
7820
7821         * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7822         * linux-bfin-low.c: New file.
7823         * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7824         PT_DATA_ADDR for BFIN targets.
7825         * Makefile.in (SFILES): Add linux-bfin-low.c.
7826         (clean): Remove reg-bfin.c.
7827         (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7828         * README: Mention supported Blackfin targets.
7829
7830 2010-12-23  Mike Frysinger  <vapier@gentoo.org>
7831
7832         * .gitignore: New file.
7833
7834 2010-11-16  Mike Frysinger  <vapier@gentoo.org>
7835
7836         * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7837
7838 2010-10-22  Jie Zhang  <jie@codesourcery.com>
7839
7840         * Makefile.in: Add FLAGS_TO_PASS variable.
7841         (install): Remove dependency of install-only and recursively
7842         invoke make for install-only.
7843
7844 2010-10-04  Doug Evans  <dje@google.com>
7845
7846         * Makefile.in (uninstall): Use $(DESTDIR).
7847
7848 2010-09-24  Pedro Alves  <pedro@codesourcery.com>
7849
7850         PR gdb/11842
7851
7852         * linux-x86-low.c (compat_siginfo_from_siginfo)
7853         (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7854         si_code is < 0.  Check for si_code == SI_TIMER before checking for
7855         si_code < 0.
7856
7857 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
7858
7859         * lynx-i386-low.c: New file.
7860         * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7861
7862 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
7863
7864         * lynx-low.c (ptrace_request_to_str): Remove handling for
7865         request values that have been removed in LynxOS 5.x.
7866
7867 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
7868
7869         * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7870         <ptrace.h>
7871
7872 2010-09-09  Nathan Sidwell  <nathan@codesourcery.com>
7873
7874         * configure.ac: Add --enable-inprocess-agent option.
7875         * configure: Rebuilt.
7876
7877 2010-09-06  Yao Qi  <yao@codesourcery.com>
7878
7879         * linux-low.c (linux_kill): Remove unused variable.
7880         (linux_stabilize_threads): Likewise.
7881         * server.c (start_inferior): Likewise.
7882         (queue_stop_reply_callback): Likewise.
7883         * tracepoint.c (do_action_at_tracepoint): Likewise.
7884
7885 2010-09-06  Yao Qi  <yao@codesourcery.com>
7886
7887         * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7888         on return.
7889
7890 2010-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
7891
7892         * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7893
7894 2010-09-06  Pedro Alves  <pedro@codesourcery.com>
7895
7896         * Makefile.in (install-only): Replace $IPA_DEPFILES with
7897         "$(IPA_DEPFILES)".
7898
7899 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
7900
7901         * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7902         gdbserver/lynx-ppc-low.c: New files.
7903         * Makefile.in (lynx_low_h): New variable.
7904         (lynx-low.o, lynx-ppc-low.o): New rules.
7905         * configure.ac: On LynxOS, link with -lnetinet.
7906         * configure.srv: Add handling of powerpc-*-lynxos* targets.
7907         * configure: regenerate.
7908
7909 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
7910
7911         * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7912         * configure.ac: Add check for vasprintf and vsnprintf.
7913         * configure, config.in: Regenerate.
7914         * server.h (vasprintf, vsnprintf): Add conditional declarations.
7915
7916 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
7917
7918         * gdbreplay.c: Move include of alloca.h up, next to include of
7919         malloc.h.
7920         * server.h: Add include of malloc.h.
7921         * mem-break.c: Remove include of malloc.h.
7922         * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7923
7924 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
7925
7926         * Makefile.in (memmem.o): Build with -Wno-error.
7927
7928 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
7929
7930         * utils.c (xsnprintf): Make non-static.
7931         * server.h: Add xsnprintf declaration.
7932         * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7933         replace calls to snprintf by calls to xsnprintf throughout.
7934
7935 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
7936
7937         * configure.ac: Add configure check for alloca.
7938         * configure, config.in: Regenerate.
7939         * server.h: Include alloca.h if it exists.
7940         * gdbreplay.c: Include alloca.h if it exists.
7941
7942 2010-08-28  Pedro Alves  <pedro@codesourcery.com>
7943
7944         * linux-low.c (__SIGRTMIN): Define if not already defined.
7945         (linux_create_inferior): Check for __ANDROID__ rather than
7946         __SIGRTMIN.
7947         (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7948         are already deferred.
7949         (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7950         (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7951         stopped and already has a pending signal to report.
7952         (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7953         a pending signal to report or is moving out of a jump pad.
7954         (linux_init_signals): Check for __ANDROID__ rather than
7955         __SIGRTMIN.
7956
7957 2010-08-28  Pedro Alves  <pedro@codesourcery.com>
7958
7959         * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7960         debug_threads check.  Avoid a linear search when not doing debug
7961         output.
7962
7963 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
7964
7965         * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7966         (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7967         (struct file_handler) <fd>: Change type to gdb_fildes_t.
7968         (process_event): Change local fd's type to gdb_fildes_t.
7969         (create_file_handler): Adjust prototype.
7970         (delete_file_handler): Adjust prototype.
7971         (handle_file_event): Adjust prototype.  Use pfildes.
7972         (create_file_event): Adjsut prototype.
7973         * remote-utils.c (remote_desc, listen_desc): Change type to
7974         gdb_fildes_t.
7975         * server.h: New gdb_fildes_t typedef.
7976         [USE_WIN32API]: Include winsock2.h.
7977         (delete_file_handler, add_file_handler): Adjust prototypes.
7978         (pfildes): Declare.
7979         * utils.c (pfildes): New.
7980
7981 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
7982
7983         * configure.ac (build_warnings): Add -Wno-char-subscripts.
7984         * configure: Regenerate.
7985
7986 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
7987
7988         * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7989         (linux_done_accessing_memory): ... this.
7990         (linux_target_ops): Adjust.
7991         * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7992         * nto-low.c (nto_target_ops): Adjust comment.
7993         * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7994         * spu-low.c (spu_target_ops): Adjust comment.
7995         * target.h (target_ops): Rename unprepare_to_access_memory field
7996         to done_accessing_memory.
7997         (unprepare_to_access_memory): Rename to ...
7998         (done_accessing_memory): ... this.
7999
8000 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
8001
8002         * linux-low.c (linux_prepare_to_access_memory): New.
8003         (linux_unprepare_to_access_memory): New.
8004         (linux_target_ops): Install them.
8005         * server.c (read_memory): Rename to ...
8006         (gdb_read_memory): ... this.  Use
8007         prepare_to_access_memory/prepare_to_access_memory.
8008         (write_memory): Rename to ...
8009         (gdb_write_memory): ... this.  Use
8010         prepare_to_access_memory/prepare_to_access_memory.
8011         (handle_search_memory_1): Adjust.
8012         (process_serial_event): Adjust.
8013         * target.h (struct target_ops): New fields
8014         prepare_to_access_memory and unprepare_to_access_memory.
8015         (prepare_to_access_memory, unprepare_to_access_memory): New.
8016         * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
8017         prepare_to_access_memory/prepare_to_access_memory.
8018         * nto-low.c (nto_target_ops): Adjust.
8019         * spu-low.c (spu_target_ops): Adjust.
8020         * win32-low.c (win32_target_ops): Adjust.
8021
8022 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
8023
8024         * Makefile.in (WARN_CFLAGS): Get it from configure.
8025         (WERROR_CFLAGS): New.
8026         (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
8027         * configure.ac: Introduce --enable-werror, which adds -Werror to
8028         the compiler command line.  Enabled by default.  Disable with
8029         --disable-werror.  Add -Wdeclaration-after-statement
8030         Wpointer-arith and -Wformat-nonliteral to warning flags.
8031         * configure: Regenerate.
8032
8033 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
8034
8035         * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
8036
8037 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
8038
8039         * gdbreplay.c (remote_error): New.
8040         (gdbchar): New.
8041         (expect): Use gdbchar.  Check for error reading from GDB.
8042         Clarify sync error output.
8043         (play): Check for errors writing to GDB.
8044         * linux-low.c (sigchld_handler): Really ignore `write' errors.
8045         * remote-utils.c (getpkt): Check for errors writing to the remote
8046         descriptor.
8047
8048 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
8049
8050         * linux-low.c (linux_wait_1): Move non-debugging code out of
8051         `debug_threads' control.
8052
8053 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
8054
8055         * linux-low.c (linux_wait_1): Don't set last_status here.
8056         * server.c (push_event, queue_stop_reply_callback): Assert we're
8057         not pushing a TARGET_WAITKIND_IGNORE event.
8058         (start_inferior, start_inferior, attach_inferior, handle_v_cont)
8059         (myresume, handle_target_event): Set the thread's last_resume_kind
8060         and last_status from the target returned status.
8061
8062 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
8063
8064         PR threads/10729
8065
8066         * linux-x86-low.c (update_debug_registers_callback): New.
8067         (i386_dr_low_set_addr): Use it.
8068         (i386_dr_low_get_addr): New.
8069         (i386_dr_low_set_control): Use update_debug_registers_callback.
8070         (i386_dr_low_get_control): New.
8071         (i386_dr_low_get_status): Adjust.
8072         * linux-low.c (linux_stop_lwp): New.
8073         * linux-low.h (linux_stop_lwp): Declare.
8074
8075         * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
8076         argument instead of a i386_debug_reg_state.
8077         (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
8078         a i386_debug_reg_state.
8079         (i386_insert_aligned_watchpoint): Adjust.
8080         (i386_remove_aligned_watchpoint): Adjust.
8081         (i386_low_stopped_data_address): Read the debug registers from the
8082         inferior instead of from the mirrors.
8083         * i386-low.h (struct i386_debug_reg_state): Extend comment.
8084         (i386_dr_low_get_addr): Declare.
8085         (i386_dr_low_get_control): Declare.
8086         (i386_dr_low_get_status): Change prototype.
8087
8088         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
8089         (i386_dr_low_get_addr): New.
8090         (i386_dr_low_get_control): New.
8091         (i386_dr_low_get_status): Adjust prototype.  Return
8092         dr_status_mirror.
8093         (i386_initial_stuff): Clear dr_status_mirror and
8094         dr_control_mirror.
8095         (i386_get_thread_context): Adjust.
8096         (i386_set_thread_context): Adjust.
8097         (i386_thread_added): Adjust.
8098
8099 2010-08-24  Pedro Alves  <pedro@codesourcery.com>
8100
8101         * linux-low.h (linux_thread_area): Delete declaration.
8102
8103 2010-08-11  Thomas Schwinge  <thomas@codesourcery.com>
8104
8105         * linux-low.c (linux_wait_1): Correctly return the ptid of the child
8106         after its termination.
8107
8108 2010-08-09  Pedro Alves  <pedro@codesourcery.com>
8109
8110         * linux-low.c (gdb_wants_lwp_stopped): Delete.
8111         (gdb_wants_all_stopped): Delete.
8112         (linux_wait_1): Don't call them.
8113         * server.c (handle_v_cont): Tag all threads as want-stopped.
8114         (gdb_wants_thread_stopped): Fix comments.  Tag the thread that
8115         stopped as "client-wants-stopped".
8116
8117 2010-07-31  Pedro Alves  <pedro@codesourcery.com>
8118
8119         * Makefile.in (signals_h): New.
8120         (server_h): Depend on it.
8121         (server.o): Don't depend on $(signals_def).
8122         (signals.o): Depend on $(signals_def).
8123
8124 2010-07-31  Jan Kratochvil  <jan.kratochvil@redhat.com>
8125
8126         * Makefile.in (signals_def): New.
8127         (server_h): Append include/gdb/signals.h and signals_def.
8128         (server.o): Append signals_def.
8129
8130 2010-07-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
8131
8132         * server.c (handle_target_event): Use target_signal_to_host for
8133         resume_info.sig initialization.
8134         * target.h (struct thread_resume) <sig>: New comment.
8135
8136 2010-07-20  Ozkan Sezer  <sezeroz@gmail.com>
8137
8138         * server.c (handle_query): strcpy() the returned string from paddress()
8139         instead of sprintf().
8140         * utils.c (paddress): Return phex_nz().
8141
8142 2010-07-07  Joel Brobecker  <brobecker@adacore.com>
8143
8144         * server.c (handle_v_cont): Call mourn_inferior if process
8145         just exited.
8146         (myresume): Likewise.
8147
8148 2010-07-01  Pedro Alves  <pedro@codesourcery.com>
8149
8150         Static tracepoints, and integration with UST.
8151
8152         * configure.ac: Handle --with-ust.  substitute ustlibs and ustinc.
8153         * mem-break.c (uninsert_all_breakpoints)
8154         (reinsert_all_breakpoints): New.
8155         * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
8156         * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
8157         (gdb_agent_ust_loaded, helper_thread_id)
8158         (gdb_agent_helper_thread_id): New macros.
8159         (struct ipa_sym_addresses): Add addr_ust_loaded,
8160         addr_helper_thread_id, addr_cmd_buf.
8161         (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
8162         (in_process_agent_loaded_ust): New.
8163         (write_e_ust_not_loaded): New.
8164         (maybe_write_ipa_ust_not_loaded): New.
8165         (struct collect_static_trace_data_action): New.
8166         (enum tracepoint_type) <static_tracepoint>: New.
8167         (struct tracepoint) <handle>: Mention static tracepoints.
8168         (struct static_tracepoint_ctx): New.
8169         (CMD_BUF_SIZE): New.
8170         (add_tracepoint_action): Handle static tracepoint actions.
8171         (unprobe_marker_at): New.
8172         (clear_installed_tracepoints): Handle static tracepoints.
8173         (cmd_qtdp): Handle static tracepoints.
8174         (probe_marker_at): New.
8175         (cmd_qtstart): Handle static tracepoints.
8176         (response_tracepoint): Handle static tracepoints.
8177         (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
8178         (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
8179         (get_context_regcache): Handle static tracepoints.
8180         (do_action_at_tracepoint): Handle static tracepoint actions.
8181         (traceframe_find_block_type): Handle static trace data blocks.
8182         (traceframe_read_sdata): New.
8183         (download_tracepoints): Download static tracepoint actions.
8184         [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
8185         (GDB_PROBE_NAME): New.
8186         (ust_ops): New.
8187         (GET_UST_SYM): New.
8188         (USTF): New.
8189         (dlsym_ust): New.
8190         (ust_marker_to_static_tracepoint): New.
8191         (gdb_probe): New.
8192         (collect_ust_data_at_tracepoint): New.
8193         (gdb_ust_probe): New.
8194         (UNIX_PATH_MAX, SOCK_DIR): New.
8195         (gdb_ust_connect_sync_socket): New.
8196         (resume_thread, stop_thread): New.
8197         (run_inferior_command): New.
8198         (init_named_socket): New.
8199         (gdb_ust_socket_init): New.
8200         (cstr_to_hexstr): New.
8201         (next_st): New.
8202         (first_marker, next_marker): New.
8203         (response_ust_marker): New.
8204         (cmd_qtfstm, cmd_qtsstm): New.
8205         (unprobe_marker_at, probe_marker_at): New.
8206         (cmd_qtstmat, gdb_ust_thread): New.
8207         (gdb_ust_init): New.
8208         (initialize_tracepoint_ftlib): Call gdb_ust_init.
8209         * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
8210         (ST_REGENTRY): New.
8211         (x86_64_st_collect_regmap): New.
8212         (X86_64_NUM_ST_COLLECT_GREGS): New.
8213         (AMD64_RIP_REGNUM): New.
8214         (supply_static_tracepoint_registers): New.
8215         * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
8216         (ST_REGENTRY): New.
8217         (i386_st_collect_regmap): New.
8218         (i386_NUM_ST_COLLECT_GREGS): New.
8219         (supply_static_tracepoint_registers): New.
8220         * server.c (handle_query): Handle qXfer:statictrace:read.
8221         <qSupported>: Report support for StaticTracepoints, and
8222         qXfer:statictrace:read features.
8223         * server.h (traceframe_read_sdata)
8224         (supply_static_tracepoint_registers): Declare.
8225         * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
8226         (unpack_varlen_hex): Include in IPA build.
8227         * Makefile.in (ustlibs, ustinc): New.
8228         (IPA_OBJS): Add remote-utils-ipa.o.
8229         ($(IPA_LIB)): Link -ldl and -lpthread.
8230         (UST_CFLAGS): New.
8231         (IPAGENT_CFLAGS): Add UST_CFLAGS.
8232         * config.in, configure: Regenerate.
8233
8234 2010-06-20  Ian Lance Taylor  <iant@google.com>
8235             Pedro Alves  <pedro@codesourcery.com>
8236
8237         * linux-x86-low.c (always_true): Delete.
8238         (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
8239         trying to fool the compiler with always_true.
8240
8241 2010-06-20  Pedro Alves  <pedro@codesourcery.com>
8242
8243         * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
8244         conditions in gdbserver.
8245
8246 2010-06-19  Ulrich Weigand  <uweigand@de.ibm.com>
8247
8248         * spu-low.c (spu_read_memory): Wrap around local store limit.
8249         (spu_write_memory): Likewise.
8250
8251 2010-06-15  Pedro Alves  <pedro@codesourcery.com>
8252
8253         * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
8254         (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
8255         LONGEST uses.
8256         * server.h (struct emit_ops): Replace int64_t uses with LONGEST
8257         uses.
8258         * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
8259         uses with LONGEST uses.
8260
8261 2010-06-14  Stan Shebs  <stan@codesourcery.com>
8262             Pedro Alves  <pedro@codesourcery.com>
8263
8264         Bytecode compiler.
8265
8266         * linux-x86-low.c: Include limits.h.
8267         (add_insns): New.
8268         (always_true): New.
8269         (EMIT_ASM): New.
8270         (EMIT_ASM32): New.
8271         (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
8272         (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
8273         (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
8274         (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
8275         (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
8276         (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
8277         (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
8278         (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
8279         (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
8280         (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
8281         (amd64_emit_void_call_2): New.
8282         (amd64_emit_ops): New.
8283         (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
8284         (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
8285         (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
8286         (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
8287         (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
8288         (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
8289         (i386_emit_goto, i386_write_goto_address, i386_emit_const)
8290         (i386_emit_call, i386_emit_reg, i386_emit_pop)
8291         (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
8292         (i386_emit_stack_adjust, i386_emit_int_call_1)
8293         (i386_emit_void_call_2): New.
8294         (i386_emit_ops): New.
8295         (x86_emit_ops): New.
8296         (the_low_target): Install x86_emit_ops.
8297         * server.h (struct emit_ops): New.
8298         (get_raw_reg_func_addr): Declare.
8299         (current_insn_ptr, emit_error): Declare.
8300         * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
8301         (set_trace_state_variable_value): New defines.
8302         (struct ipa_sym_addresses): New fields addr_get_raw_reg,
8303         addr_get_trace_state_variable_value and
8304         addr_set_trace_state_variable_value.
8305         (symbol_list): New fields for get_raw_reg,
8306         get_trace_state_variable_value and set_trace_state_variable_value.
8307         (condfn): New typedef.
8308         (struct tracepoint): New field `compiled_cond'.
8309         (do_action_at_tracepoint): Clear compiled_cond.
8310         (get_trace_state_variable_value, set_trace_state_variable_value):
8311         Export in the IPA.
8312         (condition_true_at_tracepoint): If there's a compiled condition,
8313         run that.
8314         (current_insn_ptr, emit_error): New globals.
8315         (struct bytecode_address): New.
8316         (get_raw_reg_func_addr): New.
8317         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
8318         (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
8319         (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
8320         (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
8321         (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
8322         (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
8323         (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
8324         (compile_tracepoint_condition, compile_bytecodes): New.
8325         * target.h (emit_ops): Forward declare.
8326         (struct target_ops): New field emit_ops.
8327         (target_emit_ops): New.
8328         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
8329         * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
8330         * linux-low.c (linux_emit_ops): New.
8331         (linux_target_ops): Install it.
8332         * linux-low.h (struct linux_target_ops): New field emit_ops.
8333
8334 2010-06-14  Ulrich Weigand  <uweigand@de.ibm.com>
8335
8336         * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
8337         * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
8338
8339 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
8340             Stan Shebs  <stan@codesourcery.com>
8341
8342         * Makefile.in (IPA_DEPFILES, extra_libraries): New.
8343         (all): Depend on $(extra_libraries).
8344         (install-only): Install the IPA.
8345         (IPA_OBJS, IPA_LIB): New.
8346         (clean): Remove the IPA lib.
8347         (IPAGENT_CFLAGS): New.
8348         (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
8349         (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
8350         (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
8351         * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
8352         * configure.ac: Check for atomic builtins support in the compiler.
8353         (IPA_DEPFILES, extra_libraries): Define.
8354         * configure.srv (ipa_obj): Add description.
8355         (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
8356         (i[34567]86-*-linux*): Set ipa_obj.
8357         (x86_64-*-linux*): Set ipa_obj.
8358         * linux-low.c (stabilizing_threads): New.
8359         (supports_fast_tracepoints): New.
8360         (linux_detach): Stabilize threads before detaching.
8361         (handle_tracepoints): Handle internal tracing breakpoints.  Assert
8362         the lwp is either not stabilizing, or is moving out of a jump pad.
8363         (linux_fast_tracepoint_collecting): New.
8364         (maybe_move_out_of_jump_pad): New.
8365         (enqueue_one_deferred_signal): New.
8366         (dequeue_one_deferred_signal): New.
8367         (linux_wait_for_event_1): If moving out of a jump pad, defer
8368         pending signals to later.
8369         (linux_stabilize_threads): New.
8370         (linux_wait_1): Check if threads need moving out of jump pads, and
8371         do it if so.
8372         (stuck_in_jump_pad_callback): New.
8373         (move_out_of_jump_pad_callback): New.
8374         (lwp_running): New.
8375         (linux_resume_one_lwp): Handle moving out of jump pads.
8376         (linux_set_resume_request): Dequeue deferred signals.
8377         (need_step_over_p): Also step over fast tracepoint jumps.
8378         (start_step_over): Also uninsert fast tracepoint jumps.
8379         (finish_step_over): Also reinsert fast tracepoint jumps.
8380         (linux_install_fast_tracepoint_jump): New.
8381         (linux_target_ops): Install linux_stabilize_threads and
8382         linux_install_fast_tracepoint_jump_pad.
8383         * linux-low.h (linux_target_ops) <get_thread_area,
8384         install_fast_tracepoint_jump_pad>: New fields.
8385         (struct lwp_info) <collecting_fast_tracepoint,
8386         pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
8387         (linux_get_thread_area): Declare.
8388         * linux-x86-low.c (jump_insn): New.
8389         (x86_get_thread_area): New.
8390         (append_insns): New.
8391         (push_opcode): New.
8392         (amd64_install_fast_tracepoint_jump_pad): New.
8393         (i386_install_fast_tracepoint_jump_pad): New.
8394         (x86_install_fast_tracepoint_jump_pad): New.
8395         (the_low_target): Install x86_get_thread_area and
8396         x86_install_fast_tracepoint_jump_pad.
8397         * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
8398         (struct fast_tracepoint_jump): New.
8399         (fast_tracepoint_jump_insn): New.
8400         (fast_tracepoint_jump_shadow): New.
8401         (find_fast_tracepoint_jump_at): New.
8402         (fast_tracepoint_jump_here): New.
8403         (delete_fast_tracepoint_jump): New.
8404         (set_fast_tracepoint_jump): New.
8405         (uninsert_fast_tracepoint_jumps_at): New.
8406         (reinsert_fast_tracepoint_jumps_at): New.
8407         (set_breakpoint_at): Use write_inferior_memory.
8408         (uninsert_raw_breakpoint): Use write_inferior_memory.
8409         (check_mem_read): Mask out fast tracepoint jumps.
8410         (check_mem_write): Mask out fast tracepoint jumps.
8411         * mem-break.h (struct fast_tracepoint_jump): Forward declare.
8412         (set_fast_tracepoint_jump): Declare.
8413         (delete_fast_tracepoint_jump)
8414         (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
8415         (reinsert_fast_tracepoint_jumps_at): Declare.
8416         * regcache.c: Don't compile many functions when building the
8417         in-process agent library.
8418         (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
8419         the register buffer in the heap.
8420         (free_register_cache): If the register buffer isn't owned by the
8421         regcache, don't free it.
8422         (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
8423         pre-existing register caches.
8424         * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
8425         type.
8426         (convert_ascii_to_int): : Constify `from' parameter type.
8427         (decode_M_packet, decode_X_packet): Replace the `to' parameter by
8428         a `to_p' pointer to pointer parameter.  If TO_P is NULL, malloc
8429         the needed buffer in-place.
8430         (relocate_instruction): New.
8431         * server.c (handle_query) <qSymbols>: If the target supports
8432         tracepoints, give it a chance of looking up symbols.  Report
8433         support for fast tracepoints.
8434         (handle_status): Stabilize threads.
8435         (process_serial_event): Adjust.
8436         * server.h (struct fast_tracepoint_jump): Forward declare.
8437         (struct process_info) <fast_tracepoint_jumps>: New field.
8438         (convert_ascii_to_int, convert_int_to_ascii): Adjust.
8439         (decode_X_packet, decode_M_packet): Adjust.
8440         (relocate_instruction): Declare.
8441         (in_process_agent_loaded): Declare.
8442         (tracepoint_look_up_symbols): Declare.
8443         (struct fast_tpoint_collect_status): Declare.
8444         (fast_tracepoint_collecting): Declare.
8445         (force_unlock_trace_buffer): Declare.
8446         (handle_tracepoint_bkpts): Declare.
8447         (initialize_low_tracepoint)
8448         (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
8449         * target.h (struct target_ops) <stabilize_threads,
8450         install_fast_tracepoint_jump_pad>: New fields.
8451         (stabilize_threads, install_fast_tracepoint_jump_pad): New.
8452         * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
8453         [HAVE_STDINT_H]: Include stdint.h.
8454         (trace_debug_1): Rename to ...
8455         (trace_vdebug): ... this.
8456         (trace_debug): Rename to ...
8457         (trace_debug_1): ... this.  Add `level' parameter.
8458         (trace_debug): New.
8459         (ATTR_USED, ATTR_NOINLINE): New.
8460         (IP_AGENT_EXPORT): New.
8461         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8462         (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
8463         (about_to_request_buffer_space, trace_buffer_is_full)
8464         (stopping_tracepoint, expr_eval_result, error_tracepoint)
8465         (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
8466         (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
8467         (traceframe_write_count, traceframes_created)
8468         (trace_state_variables)
8469         New renaming defines.
8470         (struct ipa_sym_addresses): New.
8471         (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
8472         (symbol_list): New.
8473         (ipa_sym_addrs): New.
8474         (all_tracepoint_symbols_looked_up): New.
8475         (in_process_agent_loaded): New.
8476         (write_e_ipa_not_loaded): New.
8477         (maybe_write_ipa_not_loaded): New.
8478         (tracepoint_look_up_symbols): New.
8479         (debug_threads) [IN_PROCESS_AGENT]: New.
8480         (read_inferior_memory) [IN_PROCESS_AGENT]: New.
8481         (UNKNOWN_SIDE_EFFECTS): New.
8482         (stop_tracing): New.
8483         (flush_trace_buffer): New.
8484         (stop_tracing_bkpt): New.
8485         (flush_trace_buffer_bkpt): New.
8486         (read_inferior_integer): New.
8487         (read_inferior_uinteger): New.
8488         (read_inferior_data_pointer): New.
8489         (write_inferior_data_pointer): New.
8490         (write_inferior_integer): New.
8491         (write_inferior_uinteger): New.
8492         (struct collect_static_trace_data_action): Delete.
8493         (enum tracepoint_type): New.
8494         (struct tracepoint) <type>: New field `type'.
8495         <actions_str, step_actions, step_actions_str>: Only include in
8496         GDBserver.
8497         <orig_size, obj_addr_on_target, adjusted_insn_addr>
8498         <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
8499         (tracepoints): Use IP_AGENT_EXPORT.
8500         (last_tracepoint): Don't include in the IPA.
8501         (stopping_tracepoint): Use IP_AGENT_EXPORT.
8502         (trace_buffer_is_full): Use IP_AGENT_EXPORT.
8503         (alloced_trace_state_variables): New.
8504         (trace_state_variables): Use IP_AGENT_EXPORT.
8505         (traceframe_t): Delete unused variable.
8506         (circular_trace_buffer): Don't include in the IPA.
8507         (trace_buffer_start): Delete.
8508         (struct trace_buffer_control): New.
8509         (trace_buffer_free): Delete.
8510         (struct ipa_trace_buffer_control): New.
8511         (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
8512         (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
8513         New.
8514         (trace_buffer_ctrl): New.
8515         (TRACE_BUFFER_CTRL_CURR): New.
8516         (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
8517         Reimplement as macros.
8518         (trace_buffer_wrap): Delete.
8519         (traceframe_write_count, traceframe_read_count)
8520         (traceframes_created, tracing): Use IP_AGENT_EXPORT.
8521         (struct tracepoint_hit_ctx) <type>: New field.
8522         (struct fast_tracepoint_ctx): New.
8523         (memory_barrier): New.
8524         (cmpxchg): New.
8525         (record_tracepoint_error): Update atomically in the IPA.
8526         (clear_inferior_trace_buffer): New.
8527         (about_to_request_buffer_space): New.
8528         (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
8529         updating the same buffer.
8530         (add_tracepoint): Default the tracepoint's type to trap
8531         tracepoint, and orig_size to -1.
8532         (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
8533         internal variables.
8534         (create_trace_state_variable): New parameter `gdb'.  Handle it.
8535         (clear_installed_tracepoints): Clear fast tracepoint jumps.
8536         (cmd_qtdp): Handle fast tracepoints.
8537         (cmd_qtdv): Adjust.
8538         (max_jump_pad_size): New.
8539         (gdb_jump_pad_head): New.
8540         (get_jump_space_head): New.
8541         (claim_jump_space): New.
8542         (sort_tracepoints): New.
8543         (MAX_JUMP_SIZE): New.
8544         (cmd_qtstart): Handle fast tracepoints.  Sync tracepoints with the
8545         IPA.
8546         (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
8547         support.  Upload fast traceframes, and delete internal IPA
8548         breakpoints.
8549         (stop_tracing_handler): New.
8550         (flush_trace_buffer_handler): New.
8551         (cmd_qtstop): Upload fast tracepoints.
8552         (response_tracepoint): Handle fast tracepoints.
8553         (tracepoint_finished_step): Upload fast traceframes.  Set the
8554         tracepoint hit context's tracepoint type.
8555         (handle_tracepoint_bkpts): New.
8556         (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
8557         type.  Add comment about fast tracepoints.
8558         (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
8559         non-existing action_str field.
8560         (get_context_regcache): Handle fast tracepoints.
8561         (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
8562         to the regcache.
8563         (fast_tracepoint_from_jump_pad_address): New.
8564         (fast_tracepoint_from_ipa_tpoint_address): New.
8565         (collecting_t): New.
8566         (force_unlock_trace_buffer): New.
8567         (fast_tracepoint_collecting): New.
8568         (collecting): New.
8569         (gdb_collect): New.
8570         (write_inferior_data_ptr): New.
8571         (target_tp_heap): New.
8572         (target_malloc): New.
8573         (download_agent_expr): New.
8574         (UALIGN): New.
8575         (download_tracepoints): New.
8576         (download_trace_state_variables): New.
8577         (upload_fast_traceframes): New.
8578         (IPA_FIRST_TRACEFRAME): New.
8579         (IPA_NEXT_TRACEFRAME_1): New.
8580         (IPA_NEXT_TRACEFRAME): New.
8581         [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
8582         [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
8583         (gdb_jump_pad_buffer_end): New.
8584         [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
8585         (initialize_tracepoint): Adjust.
8586         [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
8587         buffer.  Initialize the low module.
8588         * utils.c (PREFIX, TOOLNAME): New.
8589         (malloc_failure): Use PREFIX.
8590         (error): In the IPA, an error causes an exit.
8591         (fatal, warning): Use PREFIX.
8592         (internal_error): Use TOOLNAME.
8593         (NUMCELLS): Increase to 10.
8594         * configure, config.in: Regenerate.
8595
8596 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
8597
8598         * server.c (handle_query) <qSupported>: Do two passes over the
8599         qSupported string to avoid nesting strtok.
8600
8601 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
8602
8603         * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
8604         (CDEPS): New.
8605         * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping.  Test also
8606         -Wl,--dynamic-list.
8607         * configure: Regenerate.
8608         * proc-service.list: New.
8609
8610 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
8611
8612         * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
8613         New comment.
8614
8615 2010-05-26  Ozkan Sezer  <sezeroz@gmail.com>
8616
8617         * gdbreplay.c (remote_open): Check error return from socket() call by
8618         its equality to -1 not by it being negative.
8619         * remote-utils.c (remote_open): Likewise.
8620
8621 2010-05-23  Pedro Alves  <pedro@codesourcery.com>
8622
8623         * config.h: Regenerate.
8624
8625 2010-05-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
8626
8627         * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8628         doesn't provide PTRACE_GET_THREAD_AREA.
8629
8630 2010-05-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
8631
8632         * linux-m68k-low.c: Include <asm/ptrace.h>
8633         (ps_get_thread_area): Implement.
8634
8635 2010-05-03  Doug Evans  <dje@google.com>
8636
8637         * event-loop.c (struct callback_event): New struct.
8638         (callback_list): New global.
8639         (append_callback_event, delete_callback_event): New functions.
8640         (process_callback): New function.
8641         (start_event_loop): Call it.
8642         * remote-utils.c (NOT_SCHEDULED): Define.
8643         (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8644         moved out of readchar.
8645         (readchar): Rewrite.  Call reschedule before returning.
8646         (reset_readchar): New function.
8647         (remote_close): Call it.
8648         (process_remaining, reschedule): New functions.
8649         * server.h (callback_handler_func): New typedef.
8650         (append_callback_event, delete_callback_event): Declare.
8651
8652 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
8653
8654         * proc-service.c (ps_pglobal_lookup): Use
8655         thread_db_look_up_one_symbol.
8656         * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8657         parameter.  Use it instead of all_symbols_looked_up.
8658         * server.h (struct process_info) <all_symbols_looked_up>: Delete
8659         field.
8660         (all_symbols_looked_up): Don't declare.
8661         (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8662         * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8663         field.
8664         (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8665         Set all_symbols_looked_up here.
8666         (thread_db_look_up_one_symbol): New.
8667         (thread_db_get_tls_address): Adjust.
8668         (thread_db_load_search, try_thread_db_load_1): Always allocate the
8669         thread_db object on the heap, and tentatively set it in the
8670         process structure.
8671         (thread_db_init): Don't set all_symbols_looked_up here.
8672         * linux-low.h (thread_db_look_up_one_symbol): Declare.
8673
8674 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
8675
8676         * linux-low.c (linux_kill, linux_detach): Adjust.
8677         (status_pending_p_callback): Remove redundant statement.  Check
8678         for !TARGET_WAITIKIND_IGNORE, instead of
8679         TARGET_WAITKIND_STOPPED.
8680         (handle_tracepoints): Make sure LWP is locked.  Adjust.
8681         (linux_wait_for_event_1): Adjust.
8682         (linux_cancel_breakpoints): New.
8683         (unsuspend_one_lwp): New.
8684         (unsuspend_all_lwps): New.
8685         (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8686         (send_sigstop_callback): Change return type to int, add new
8687         `except' parameter and handle it.
8688         (suspend_and_send_sigstop_callback): New.
8689         (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8690         pass them down.  If SUSPEND, also increment the lwp's suspend
8691         count.
8692         (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8693         (need_step_over_p): Don't consider suspended LWPs.
8694         (start_step_over): Adjust.
8695         (proceed_one_lwp): Change return type to int, add new `except'
8696         parameter and handle it.
8697         (unsuspend_and_proceed_one_lwp): New.
8698         (proceed_all_lwps): Use find_inferior instead of
8699         for_each_inferior.
8700         (unstop_all_lwps): Add `unsuspend' parameter.  If UNSUSPEND, them
8701         also decrement the suspend count of LWPs.  Pass `except' down,
8702         instead of hacking its suspend count.
8703         (linux_pause_all): Add `freeze' parameter.  Adjust.
8704         (linux_unpause_all): New.
8705         (linux_target_ops): Install linux_unpause_all.
8706         * server.c (handle_status): Adjust.
8707         * target.h (struct target_ops): New fields `unpause_all' and
8708         `cancel_breakpoints'.  Add new parameter to `pause_all'.
8709         (pause_all): Add new `freeze' parameter.
8710         (unpause_all): New.
8711         (cancel_breakpoints): New.
8712         * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8713         cancel breakpoints.
8714         (cmd_qtstart): Pause threads.
8715         (stop_tracing): Pause threads, and cancel breakpoints.
8716         * win32-low.c (win32_target_ops): Adjust.
8717
8718 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
8719
8720         * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8721         the inferior right away from here...
8722         (linux_wait_1): ... to here, and adjust to check the thread's
8723         last_resume_kind instead of the lwp's step or stop_expected flags.
8724
8725 2010-05-02  Pedro Alves  <pedro@codesourcery.com>
8726
8727         * README: Use consistent `GDB' and `GDBserver' spellings.
8728
8729 2010-05-02  Pedro Alves  <pedro@codesourcery.com>
8730
8731         * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8732         (linux_kill): Stop all lwps here.  Don't delete the main lwp here.
8733         (linux_detach_one_lwp): Assume the lwp is stopped.
8734         (any_thread_of): Delete.
8735         (linux_detach): Stop all lwps here.  Don't blindly delete all
8736         breakpoints.
8737         (delete_lwp_callback): New.
8738         (linux_mourn): Delete all lwps of the process that is gone.
8739         (linux_wait_1): Don't delete the last lwp of the process here.
8740         * mem-break.h (mark_breakpoints_out): Declare.
8741         * mem-break.c (mark_breakpoints_out): New.
8742         (free_all_breakpoints): Use it.
8743         * server.c (handle_target_event): If the process is gone, mark
8744         breakpoints out.
8745         * thread-db.c (struct thread_db) <create_bp>: New field.
8746         (thread_db_enable_reporting): Fix prototype.  Store a thread event
8747         breakpoint reference in the thread_db struct.
8748         (thread_db_load_search): Clear the thread_db object.
8749         (try_thread_db_load_1): Ditto.
8750         (switch_to_process): New.
8751         (disable_thread_event_reporting): Use it.
8752         (remove_thread_event_breakpoints): New.
8753         (thread_db_detach, thread_db_mourn): Use it.
8754
8755 2010-05-01  Pedro Alves  <pedro@codesourcery.com>
8756
8757         * linux-low.c (linux_enable_event_reporting): New.
8758         (linux_wait_for_event_1, handle_extended_wait): Use it.
8759
8760 2010-04-30  Pedro Alves  <pedro@codesourcery.com>
8761
8762         * linux-low.c (linux_kill_one_lwp, linux_kill)
8763         (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8764         (send_sigstop): Take an lwp_info as parameter instead.  Queue a
8765         SIGSTOP even if the LWP is stopped.
8766         (send_sigstop_callback): New.
8767         (stop_all_lwps): Use send_sigstop_callback instead.
8768         (linux_resume_one_thread): Adjust.
8769         (proceed_one_lwp): Still proceed an LWP that the client has
8770         requested to stop, if we haven't reported it as stopped yet.  Make
8771         sure that LWPs the client want stopped, have a pending SIGSTOP.
8772
8773 2010-04-26  Doug Evans  <dje@google.com>
8774
8775         * server.c (handle_general_set): Make static.
8776
8777         * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8778         Print received char after testing for error/eof instead of before.
8779         (input_interrupt): Tweak comment.
8780
8781 2010-04-23  Doug Evans  <dje@google.com>
8782
8783         * server.c (start_inferior): Print inferior argv if --debug.
8784
8785 2010-04-21  Aleksandar Ristovski  <aristovski@qnx.com>
8786
8787         * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8788         * nto-x86-low.c: Include server.h
8789
8790 2010-04-20  Pierre Muller  <muller@ics.u-strasbg.fr>
8791
8792         * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8793         be consistent with other sources of this directory.
8794         (init_registers_amd64): Correct name of source file of this function
8795         in the comment.
8796
8797 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
8798
8799         * configure.srv (x86_64-*-mingw*): New configuration for Windows
8800         64-bit executables.
8801
8802 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
8803
8804         * win32-i386-low.c: Add 64-bit support.
8805         (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8806         (init_registers_amd64): Declare.
8807         (mappings): Add 64-bit version of array.
8808         (init_windows_x86): New function.
8809         (the_low_target): Change init_arch field to init_windows_x86.
8810
8811 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
8812
8813         * win32-low.c: Adapt to support also 64-bit architecture.
8814         (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8815         (get_image_name): Use SIZE_T type for local variable `done'.
8816         (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8817         (toolhelp_get_dll_name): Idem.
8818         (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8819         Use uintptr_t typecast to avoid warning.
8820         (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8821         (handle_exception): Use phex_nz to avoid warning.
8822         (win32_wait): Remove unused local variable `process'.
8823
8824 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
8825
8826         * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8827         `amd64-avx.o'.
8828
8829 2010-04-17  Pierre Muller  <muller@ics.u-strasbg.fr>
8830
8831         * configure.ac: Use `ws2_32' library for srv_mingw.
8832         * configure: Regenerate.
8833         * gdbreplay.c: Include winsock2.h instead of winsock.h.
8834         * remote-utils.c: Likewise.
8835
8836 2010-04-17  H.J. Lu  <hongjiu.lu@intel.com>
8837
8838         * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8839         if __x86_64__ is defined.
8840
8841 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
8842
8843         * configure: Regenerate.
8844
8845 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
8846
8847         * server.c (handle_query): Handle 'qGetTIBAddr' query.
8848         * target.h (target_ops): New get_tib_address field.
8849         * win32-low.h (win32_thread_info): Add thread_local_base field.
8850         * win32-low.c (child_add_thread): Add tlb argument.
8851         Set thread_local_base field to TLB.
8852         (get_child_debug_event): Adapt to child_add_thread change.
8853         (win32_get_tib_address): New function.
8854         (win32_target_ops): Set get_tib_address field to
8855         win32_get_tib_address.
8856         * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8857
8858 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
8859
8860         * linux-low.c (linux_mourn): Also remove the process.
8861         * server.c (handle_target_event): Don't remove the process here.
8862         * nto-low.c (nto_mourn): New.
8863         (nto_target_ops): Install it.
8864         * spu-low.c (spu_mourn): New.
8865         (spu_target_ops): Install it.
8866         * win32-low.c (win32_mourn): New.
8867         (win32_target_ops): Install it.
8868
8869 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
8870
8871         * server.h (buffer_xml_printf): Remove redundant `;'.
8872
8873 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
8874
8875         * regcache.c (set_register_cache): Invalidate regcaches before
8876         changing the register cache layout.
8877         (regcache_invalidate_one): Allow a NULL regcache.
8878         * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8879         regcaches before changing the register cache layout or the target
8880         regsets.
8881
8882 2010-04-12  H.J. Lu  <hongjiu.lu@intel.com>
8883
8884         * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8885         variable warning on Linux/x86-64.
8886
8887 2010-04-11  Pedro Alves  <pedro@codesourcery.com>
8888
8889         GDBserver disconnected tracing support.
8890
8891         * linux-low.c (linux_remove_process): Delete.
8892         (add_lwp): Don't set last_resume_kind here.
8893         (linux_kill): Use `mourn'.
8894         (linux_detach): Use `thread_db_detach', and `mourn'.
8895         (linux_mourn): New.
8896         (linux_attach_lwp_1): Adjust comment.
8897         (linux_attach): last_resume_kind moved the thread_info; adjust.
8898         (status_pending_p_callback): Adjust.
8899         (linux_wait_for_event_1): Adjust.
8900         (count_events_callback, select_singlestep_lwp_callback)
8901         (select_event_lwp_callback, cancel_breakpoints_callback)
8902         (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8903         (proceed_one_lwp): Adjust.
8904         (linux_async): Add debug output.
8905         (linux_thread_stopped): New.
8906         (linux_pause_all): New.
8907         (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8908         linux_pause_all.
8909         * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8910         (thread_db_free): Delete declaration.
8911         (thread_db_detach, thread_db_mourn): Declare.
8912         * thread-db.c (thread_db_init): Use thread_db_mourn.
8913         (thread_db_free): Delete, split in two.
8914         (disable_thread_event_reporting): New.
8915         (thread_db_detach): New.
8916         (thread_db_mourn): New.
8917
8918         * server.h (struct thread_info) <last_resume_kind>: New field.
8919         <attached>: Add comment.
8920         <gdb_detached>: New field.
8921         (handler_func): Change return type to int.
8922         (handle_serial_event, handle_target_event): Ditto.
8923         (gdb_connected): Declare.
8924         (tracing): Delete.
8925         (disconnected_tracing): Declare.
8926         (stop_tracing): Declare.
8927
8928         * server.c (handle_query) <qSupported>: Report support for
8929         disconnected tracing.
8930         (queue_stop_reply_callback): Account for running threads.
8931         (gdb_wants_thread_stopped): New.
8932         (gdb_wants_all_threads_stopped): New.
8933         (gdb_reattached_process): New.
8934         (handle_status): Clear the `gdb_detached' flag of all processes.
8935         In all-stop, stop all threads.
8936         (main): Be sure to leave tfind mode.  Handle disconnected tracing.
8937         (process_serial_event): If the remote connection breaks, or if an
8938         exit was forced with "monitor exit", force an event loop exit.
8939         Handle disconnected tracing on detach.
8940         (handle_serial_event): Adjust.
8941         (handle_target_event): If GDB isn't connected, forward events back
8942         to the inferior, unless the last process exited, in which case,
8943         exit gdbserver.  Adjust interface.
8944
8945         * remote-utils.c (remote_open): Don't block in accept.  Instead
8946         register an event loop source on the listen socket file
8947         descriptor.  Refactor bits into ...
8948         (listen_desc): ... this new global.
8949         (gdb_connected): ... this new function.
8950         (enable_async_notification): ... this new function.
8951         (handle_accept_event): ... this new function.
8952         (remote_close): Clear remote_desc.
8953
8954         * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8955
8956         * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8957         New fields.
8958         (mourn_inferior): Define.
8959         (target_process_qsupported): Avoid the dangling else problem.
8960         (thread_stopped): Define.
8961         (pause_all): Define.
8962         (target_waitstatus_to_string): Declare.
8963         * target.c (target_waitstatus_to_string): New.
8964
8965         * tracepoint.c (tracing): Make extern.
8966         (disconnected_tracing): New.
8967         (stop_tracing): Make extern.  Handle tracing stops due to GDB
8968         disconnecting.
8969         (cmd_qtdisconnected): New.
8970         (cmd_qtstatus): Report disconnected tracing status in trace reply.
8971         (handle_tracepoint_general_set): Handle QTDisconnected.
8972
8973         * event-loop.c (event_handler_func): Change return type to int.
8974         (process_event): Bail out if the event handler wants the event
8975         loop to stop.
8976         (handle_file_event): Ditto.
8977         (start_event_loop): Bail out if the event handler wants the event
8978         loop to stop.
8979
8980         * nto-low.c (nto_target_ops): Adjust.
8981         * spu-low.c (spu_wait): Don't remove the process here.
8982         (spu_target_ops): Adjust.
8983         * win32-low.c (win32_wait): Don't remove the process here.
8984         (win32_target_ops): Adjust.
8985
8986 2010-04-11  Pedro Alves  <pedro@codesourcery.com>
8987
8988         * regcache.c (realloc_register_cache): Invalidate inferior's
8989         regcache before recreating it.
8990
8991 2010-04-09  Pedro Alves  <pedro@codesourcery.com>
8992
8993         * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8994
8995 2010-04-09  Stan Shebs  <stan@codesourcery.com>
8996             Pedro Alves  <pedro@codesourcery.com>
8997
8998         * server.h (LONGEST): New.
8999         (struct thread_info) <while_stepping>: New field.
9000         (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
9001         Declare.
9002         (initialize_tracepoint, handle_tracepoint_general_set)
9003         (handle_tracepoint_query, tracepoint_finished_step)
9004         (tracepoint_was_hit, release_while_stepping_state_list):
9005         (current_traceframe): Declare.
9006         * server.c (handle_general_set): Handle tracepoint packets.
9007         (read_memory): New.
9008         (write_memory): New.
9009         (handle_search_memory_1): Use read_memory.
9010         (handle_query): Report support for conditional tracepoints, trace
9011         state variables, and tracepoint sources.  Handle tracepoint
9012         queries.
9013         (main): Initialize the tracepoints module.
9014         (process_serial_event): Handle traceframe reads/writes.
9015
9016         * linux-low.c (handle_tracepoints): New.
9017         (linux_wait_1): Call it.
9018         (linux_resume_one_lwp): Handle while-stepping.
9019         (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
9020         (linux_target_ops): Install them.
9021         * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
9022         New field.
9023         * linux-x86-low.c (x86_supports_tracepoints): New.
9024         (the_low_target). Install it.
9025
9026         * mem-break.h (delete_breakpoint): Declare.
9027         * mem-break.c (delete_breakpoint): Make external.
9028
9029         * target.h (struct target_ops): Add `supports_tracepoints',
9030         `read_pc', and `write_pc' fields.
9031         (target_supports_tracepoints): Define.
9032         * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
9033         (phex_nz): New.
9034
9035         * regcache.h (struct regcache) <registers_owned>: New field.
9036         (init_register_cache, regcache_cpy): Declare.
9037         (regcache_read_pc, regcache_write_pc): Declare.
9038         (register_cache_size): Declare.
9039         (supply_regblock): Declare.
9040         * regcache.c (init_register_cache): New.
9041         (new_register_cache): Use it.
9042         (regcache_cpy): New.
9043         (register_cache_size): New.
9044         (supply_regblock): New.
9045         (regcache_read_pc, regcache_write_pc): New.
9046
9047         * tracepoint.c: New.
9048
9049         * Makefile.in (OBS): Add tracepoint.o.
9050         (tracepoint.o): New rule.
9051
9052 2010-04-08  H.J. Lu  <hongjiu.lu@intel.com>
9053
9054         * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
9055         (i386-mmx.o): New.
9056         (i386-mmx.c): Likewise.
9057         (i386-mmx-linux.o): Likewise.
9058         (i386-mmx-linux.c): Likewise.
9059
9060         * configure.srv (srv_i386_regobj): Add i386-mmx.o.
9061         (srv_i386_linux_regobj): Add i386-mmx-linux.o.
9062         (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
9063         (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
9064
9065         * linux-x86-low.c (init_registers_i386_mmx_linux): New.
9066         (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
9067         and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
9068
9069 2010-04-07  H.J. Lu  <hongjiu.lu@intel.com>
9070
9071         * Makefile.in (clean): Updated.
9072         (i386-avx.o): New.
9073         (i386-avx.c): Likewise.
9074         (i386-avx-linux.o): Likewise.
9075         (i386-avx-linux.c): Likewise.
9076         (amd64-avx.o): Likewise.
9077         (amd64-avx.c): Likewise.
9078         (amd64-avx-linux.o): Likewise.
9079         (amd64-avx-linux.c): Likewise.
9080
9081         * configure.srv (srv_i386_regobj): Add i386-avx.o.
9082         (srv_i386_linux_regobj): Add i386-avx-linux.o.
9083         (srv_amd64_regobj): Add amd64-avx.o.
9084         (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
9085         (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
9086         (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
9087         (srv_i386_xmlfiles): Add i386/i386-avx.xml.
9088         (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
9089         (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
9090         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
9091
9092         * i387-fp.c: Include "i386-xstate.h".
9093         (i387_xsave): New.
9094         (i387_cache_to_xsave): Likewise.
9095         (i387_xsave_to_cache): Likewise.
9096         (x86_xcr0): Likewise.
9097
9098         * i387-fp.h (i387_cache_to_xsave): Likewise.
9099         (i387_xsave_to_cache): Likewise.
9100         (x86_xcr0): Likewise.
9101
9102         * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
9103         * linux-crisv32-low.c (target_regsets): Likewise.
9104         * linux-m68k-low.c (target_regsets): Likewise.
9105         * linux-mips-low.c (target_regsets): Likewise.
9106         * linux-ppc-low.c (target_regsets): Likewise.
9107         * linux-s390-low.c (target_regsets): Likewise.
9108         * linux-sh-low.c (target_regsets): Likewise.
9109         * linux-sparc-low.c (target_regsets): Likewise.
9110         * linux-xtensa-low.c (target_regsets): Likewise.
9111
9112         * linux-low.c: Include <sys/uio.h>.
9113         (regsets_fetch_inferior_registers): Support nt_type.
9114         (regsets_store_inferior_registers): Likewise.
9115         (linux_process_qsupported): New.
9116         (linux_target_ops): Add linux_process_qsupported.
9117
9118         * linux-low.h (regset_info): Add nt_type.
9119         (linux_target_ops): Add process_qsupported.
9120
9121         * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
9122         and <sys/uio.h>.
9123         (init_registers_i386_avx_linux): New.
9124         (init_registers_amd64_avx_linux): Likewise.
9125         (xmltarget_i386_linux_no_xml): Likewise.
9126         (xmltarget_amd64_linux_no_xml): Likewise.
9127         (PTRACE_GETREGSET): Likewise.
9128         (PTRACE_SETREGSET): Likewise.
9129         (x86_fill_xstateregset): Likewise.
9130         (x86_store_xstateregset): Likewise.
9131         (use_xml): Likewise.
9132         (x86_linux_update_xmltarget): Likewise.
9133         (x86_linux_process_qsupported): Likewise.
9134         (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
9135         (x86_arch_setup): Don't call init_registers_amd64_linux nor
9136         init_registers_i386_linux here.  Call
9137         x86_linux_update_xmltarget.
9138         (the_low_target): Add x86_linux_process_qsupported.
9139
9140         * server.c (handle_query): Call target_process_qsupported.
9141
9142         * target.h (target_ops): Add process_qsupported.
9143         (target_process_qsupported): New.
9144
9145 2010-04-03  Pedro Alves  <pedro@codesourcery.com>
9146
9147         * inferiors.c (add_thread): Set last_status kind to
9148         TARGET_WAITKIND_IGNORE.
9149         * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
9150         fetch.  Use ptid_of.  Avoid unnecessary get_lwp_thread calls.
9151         (linux_wait_1): Move `thread' local definition to block that uses
9152         it.  Don't NULL initialize `event_child'.
9153         (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
9154         Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
9155         * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
9156
9157 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
9158
9159         * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
9160         an extended waitstatus, or by a watchpoint.
9161         (cancel_breakpoints_callback): Don't cancel a breakpoint if the
9162         thread was stepping or has been stopped by a watchpoint.
9163
9164 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
9165
9166         * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
9167         (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
9168         of another, then delete the previous, and validate all
9169         breakpoints.
9170         (validate_inserted_breakpoint): New.
9171         (delete_disabled_breakpoints): New.
9172         (validate_breakpoints): New.
9173         (check_mem_read): Validate breakpoints before trusting their
9174         shadow.  Delete disabled breakpoints.
9175         (check_mem_write): Validate breakpoints before trusting they
9176         should be inserted.  Delete disabled breakpoints.
9177         * mem-break.h (validate_breakpoints):
9178         * server.c (handle_query): Validate breakpoints when we see a
9179         qSymbol query.
9180
9181 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
9182
9183         * linux-low.c (linux_wait_1): Avoid setting need_step_over is
9184         there's a GDB breakpoint at stop_pc.  Always report a trap to GDB
9185         if we could tell there's a GDB breakpoint at stop_pc.
9186         (need_step_over_p): Don't do a step over if we find a GDB
9187         breakpoint at the resume PC.
9188
9189         * mem-break.c (struct raw_breakpoint): New.
9190         (enum bkpt_type): New type `gdb_breakpoint'.
9191         (struct breakpoint): Delete the `PC', `old_data' and `inserted'
9192         fields.  New field `raw'.
9193         (find_raw_breakpoint_at): New.
9194         (set_raw_breakpoint_at): Handle refcounting.  Create a raw
9195         breakpoint instead.
9196         (set_breakpoint_at): Adjust.
9197         (delete_raw_breakpoint): New.
9198         (release_breakpoint): New.
9199         (delete_breakpoint): Rename to...
9200         (delete_breakpoint_1): ... this.  Add proc parameter.  Use
9201         release_breakpoint.  Return ENOENT.
9202         (delete_breakpoint): Reimplement.
9203         (find_breakpoint_at): Delete.
9204         (find_gdb_breakpoint_at): New.
9205         (delete_breakpoint_at): Delete.
9206         (set_gdb_breakpoint_at): New.
9207         (delete_gdb_breakpoint_at): New.
9208         (gdb_breakpoint_here): New.
9209         (set_reinsert_breakpoint): Use release_breakpoint.
9210         (uninsert_breakpoint): Rename to ...
9211         (uninsert_raw_breakpoint): ... this.
9212         (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
9213         (reinsert_raw_breakpoint): Change parameter type to
9214         raw_breakpoint.
9215         (reinsert_breakpoints_at): Adjust to handle raw breakpoints
9216         instead.
9217         (check_breakpoints): Adjust.  Use release_breakpoint.
9218         (breakpoint_here): Rewrite using find_raw_breakpoint_at.
9219         (breakpoint_inserted_here): Ditto.
9220         (check_mem_read): Adjust to iterate over raw breakpoints instead.
9221         Don't trust the breakpoint's shadow if it is not inserted.
9222         (check_mem_write): Adjust to iterate over raw breakpoints instead.
9223         (delete_all_breakpoints): Adjust.
9224         (free_all_breakpoints): Mark all breakpoints as uninserted, and
9225         use delete_breakpoint_1.
9226
9227         * mem-break.h (breakpoints_supported): Delete declaration.
9228         (set_gdb_breakpoint_at): Declare.
9229         (gdb_breakpoint_here): Declare.
9230         (delete_breakpoint_at): Delete.
9231         (delete_gdb_breakpoint_at): Declare.
9232
9233         * server.h (struct raw_breakpoint): Forward declare.
9234         (struct process_info): New field `raw_breakpoints'.
9235
9236         * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
9237         breakpoints.
9238
9239 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
9240
9241         * linux-low.c (status_pending_p_callback): Fix comment.
9242         (linux_wait_for_event_1): Move most of the internal breakpoint
9243         handling from here...
9244         (linux_wait_1): ... to here.
9245         (count_events_callback): New.
9246         (select_singlestep_lwp_callback): New.
9247         (select_event_lwp_callback): New.
9248         (cancel_breakpoints_callback): New.
9249         (select_event_lwp): New.
9250         (linux_wait_1): Simplify internal breakpoint handling.  Give equal
9251         priority to all LWPs that have had events that should be reported
9252         to the client.  Cancel breakpoints when about to reporting the
9253         event to the client, not while stopping lwps.  No longer cancel
9254         finished single-steps here.
9255         (cancel_finished_single_step): Delete.
9256         (cancel_finished_single_steps): Delete.
9257
9258 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
9259
9260         * mem-break.c (enum bkpt_type): New.
9261         (struct breakpoint): New field `type'.
9262         (set_breakpoint_at): Change return type to struct breakpoint
9263         pointer.  Set type to `other_breakpoint' by default.
9264         (delete_breakpoint): Rewrite, supporting more than one breakpoint
9265         in the breakpoint list.
9266         (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
9267         (reinsert_breakpoint): Rename to ...
9268         (reinsert_raw_breakpoint): ... this.
9269         (reinsert_breakpoints_at): Adjust.
9270         * mem-break.h (struct breakpoint): Declare.
9271         (set_breakpoint_at): Change return type to struct breakpoint
9272         pointer.
9273
9274 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
9275
9276         * server.c (handle_query): Assign, not compare.
9277
9278 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
9279
9280         Teach linux gdbserver to step-over-breakpoints.
9281
9282         * linux-low.c (can_hardware_single_step): New.
9283         (supports_breakpoints): New.
9284         (handle_extended_wait): If stopping threads, read the stop pc of
9285         the new cloned LWP.
9286         (get_pc): New.
9287         (get_stop_pc): Add `lwp' parameter.  Handle it.  Bail out if the
9288         low target doesn't support retrieving the PC.
9289         (add_lwp): Set last_resume_kind to resume_continue.
9290         (linux_attach_lwp_1): Adjust comments.  Always set stop_expected.
9291         (linux_attach): Don't clear stop_expected.  Set the lwp's
9292         last_resume_kind to resume_stop.
9293         (linux_detach_one_lwp): Don't check for removed breakpoints.
9294         (check_removed_breakpoint): Delete.
9295         (status_pending_p): Rename to ...
9296         (status_pending_p_callback): ... this.  Don't check for removed
9297         breakpoints.  Don't consider threads that are stopped from GDB's
9298         perspective.
9299         (linux_wait_for_lwp): Always read the stop_pc here.
9300         (cancel_breakpoint): New.
9301         (step_over_bkpt): New global.
9302         (linux_wait_for_event_1): Implement stepping over breakpoints.
9303         (gdb_wants_lwp_stopped): New.
9304         (gdb_wants_all_stopped): New.
9305         (linux_wait_1): Tag threads as gdb-wants-stopped.  Cancel finished
9306         single-step traps here.  Store the thread's last reported target
9307         wait status.
9308         (send_sigstop): Don't clear stop_expected.  Always set it,
9309         instead.
9310         (mark_lwp_dead): Remove reference to pending_is_breakpoint.
9311         (cancel_finished_single_step): New.
9312         (cancel_finished_single_steps): New.
9313         (wait_for_sigstop): Don't cancel finished single-step traps here.
9314         (linux_resume_one_lwp): Don't check for removed breakpoints.
9315         Don't set `step' on non-hardware step archs.
9316         (linux_set_resume_request): Ignore resume_stop requests if already
9317         stopping or stopped.  Set the lwp's last_resume_kind.
9318         (resume_status_pending_p): Don't check for removed breakpoints.
9319         (need_step_over_p): New.
9320         (start_step_over): New.
9321         (finish_step_over): New.
9322         (linux_resume_one_thread): Always queue a sigstop for resume_stop
9323         requests.  Clear the thread's last reported target waitstatus.
9324         Don't use the `suspended' flag.  Don't consider pending breakpoints.
9325         (linux_resume): Start a step-over if necessary.
9326         (proceed_one_lwp): New.
9327         (proceed_all_lwps): New.
9328         (unstop_all_lwps): New.
9329         * linux-low.h (struct lwp_info): Rewrite comment for the
9330         `suspended' flag.  Add the `stop_pc' field.  Delete the
9331         `pending_stop_pc' field.  Tweak the `stepping' flag's comment.
9332         Add `'last_resume_kind' and `need_step_over' fields.
9333         * inferiors.c (struct thread_info): Delete, moved elsewhere.
9334         * mem-break.c (struct breakpoint): Delete `reinserting' flag.
9335         Delete `breakpoint_to_reinsert' field.  New flag `inserted'.
9336         (set_raw_breakpoint_at): New.
9337         (set_breakpoint_at): Rewrite to use it.
9338         (reinsert_breakpoint_handler): Delete.
9339         (set_reinsert_breakpoint): New.
9340         (reinsert_breakpoint_by_bp): Delete.
9341         (delete_reinsert_breakpoints): New.
9342         (uninsert_breakpoint): Rewrite.
9343         (uninsert_breakpoints_at): New.
9344         (reinsert_breakpoint): Rewrite.
9345         (reinsert_breakpoints_at): New.
9346         (check_breakpoints): Rewrite.
9347         (breakpoint_here): New.
9348         (breakpoint_inserted_here): New.
9349         (check_mem_read): Adjust.
9350         * mem-break.h (breakpoints_supported, breakpoint_here)
9351         (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
9352         (reinsert_breakpoint_by_bp): Delete declaration.
9353         (delete_reinsert_breakpoints): Declare.
9354         (reinsert_breakpoint): Delete declaration.
9355         (reinsert_breakpoints_at): Declare.
9356         (uninsert_breakpoint): Delete declaration.
9357         (uninsert_breakpoints_at): Declare.
9358         (check_breakpoints): Adjust prototype.
9359         * server.h: Adjust include order.
9360         (struct thread_info): Declare here.  Add a `last_status' field.
9361
9362 2010-03-23  Michael Snyder  <msnyder@vmware.com>
9363
9364         * server.c (crc32): New function.
9365         (handle_query): Add handling for 'qCRC:' request.
9366
9367 2010-03-23  Pedro Alves  <pedro@codesourcery.com>
9368
9369         * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
9370         lwp had been stopped by a watchpoint.
9371
9372 2010-03-16  Pedro Alves  <pedro@codesourcery.com>
9373
9374         * server.h (internal_error): Declare.
9375         (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
9376         * utils.c (internal_error): New function.
9377
9378 2010-03-15  Andreas Schwab  <schwab@redhat.com>
9379
9380         * configure.srv: Fix typo setting srv_regobj.
9381
9382 2010-03-15  Pedro Alves  <pedro@codesourcery.com>
9383
9384         * linux-low.c (fetch_register): Avoid passing a non string literal
9385         format to `error'.
9386         (usr_store_inferior_registers): Ditto.
9387
9388 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
9389
9390         * linux-low.c (linux_write_memory): Bail out early if peeking
9391         memory failed.
9392
9393 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
9394
9395         * linux-low.h (struct lwp_info): New fields
9396         `stopped_by_watchpoint' and `stopped_data_address'.
9397         * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
9398         here, and cache them in the lwp object.
9399         (wait_for_sigstop): Check stopped_by_watchpoint lwp field
9400         directly.
9401         (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
9402         field.
9403         (linux_stopped_by_watchpoint): Rewrite.
9404         (linux_stopped_data_address): Rewrite.
9405
9406 2010-03-06  Simo Melenius  <simo.melenius@iki.fi>
9407
9408         * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
9409         switching the current inferior, not before.
9410
9411 2010-03-01  H.J. Lu  <hongjiu.lu@intel.com>
9412
9413         * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
9414         reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
9415         i386-linux.c and amd64-linux.c.
9416         (reg-i386.o): Removed.
9417         (reg-i386.c): Likewise.
9418         (reg-i386-linux.o): Likewise.
9419         (reg-i386-linux.c): Likewise.
9420         (reg-x86-64.o): Likewise.
9421         (reg-x86-64.c): Likewise.
9422         (reg-x86-64-linux.o): Likewise.
9423         (reg-x86-64-linux.c): Likewise.
9424         (i386.o): New.
9425         (i386.c): Likewise.
9426         (i386-linux.o): Likewise.
9427         (i386-linux.c): Likewise.
9428         (amd64.o): Likewise.
9429         (amd64.c): Likewise.
9430         (amd64-linux.o): Likewise.
9431         (amd64-linux.c): Likewise.
9432
9433         * configure.srv (srv_i386_regobj): New.
9434         (srv_i386_linux_regobj): Likewise.
9435         (srv_amd64_regobj): Likewise.
9436         (srv_amd64_linux_regobj): Likewise.
9437         (srv_i386_32bit_xmlfiles): Likewise.
9438         (srv_i386_64bit_xmlfiles): Likewise.
9439         (srv_i386_xmlfiles): Likewise.
9440         (srv_amd64_xmlfiles): Likewise.
9441         (srv_i386_linux_xmlfiles): Likewise.
9442         (srv_amd64_linux_xmlfiles): Likewise.
9443         (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj.  Set
9444         srv_xmlfiles to $srv_i386_xmlfiles.
9445         (i[34567]86-*-mingw32ce*): Likewise.
9446         (i[34567]86-*-mingw*): Likewise.
9447         (i[34567]86-*-nto*): Likewise.
9448         (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
9449         and $srv_amd64_linux_regobj.  Set srv_xmlfiles to
9450         $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
9451         (x86_64-*-linux*): Likewise.
9452
9453         * linux-x86-low.c (init_registers_x86_64_linux): Removed.
9454         (init_registers_amd64_linux): New.
9455         (x86_arch_setup): Replace init_registers_x86_64_linux with
9456         init_registers_amd64_linux.
9457
9458 2010-02-23  Maxim Kuvyrkov  <maxim@codesourcery.com>
9459
9460         * configure.ac: Check for libdl.  If it is not available link against
9461         static libthread_db.
9462         * configure: Regenerate.
9463
9464 2010-02-22  Pedro Alves  <pedro@codesourcery.com>
9465
9466         PR9605
9467
9468         * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
9469         handing a read watchpoint.
9470         (i386_low_insert_watchpoint): Read watchpoints aren't supported.
9471
9472 2010-02-12  Doug Evans  <dje@google.com>
9473
9474         * linux-low.c (linux_supports_tracefork_flag): Document.
9475         (linux_look_up_symbols): Add comment.
9476
9477 2010-02-03  H.J. Lu  <hongjiu.lu@intel.com>
9478
9479         * regcache.c (supply_register): Clear regcache if buf is NULL.
9480
9481 2010-02-02  Nicolas Roche  <roche@sourceware.org>
9482             Joel Brobecker  <brobecker@adacore.com>
9483
9484         * inferiors.c (find_inferior): Add function documentation.
9485         (unloaded_dll): Handle the case where the unloaded dll has not
9486         been previously registered in the dll list.
9487
9488 2010-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
9489
9490         * linux-arm-low.c (thumb_breakpoint_len): Delete.
9491         (thumb2_breakpoint): New.
9492         (arm_breakpoint_at): Check for Thumb-2 breakpoints.
9493
9494 2010-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
9495
9496         * linux-low.c (get_stop_pc): Check for SIGTRAP.
9497         (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
9498         breakpoints.
9499
9500 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
9501
9502         * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
9503
9504 2010-01-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
9505
9506         * linux-s390-low.c (s390_collect_ptrace_register)
9507         (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
9508
9509 2010-01-21  Doug Evans  <dje@google.com>
9510
9511         * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
9512         (PTRACE_ARG4_TYPE): New macro.
9513         (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
9514         (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
9515         (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
9516         (usr_store_inferior_registers): Ditto.
9517         (linux_read_memory, linux_write_memory): Ditto.
9518         (linux_test_for_tracefork): Ditto.
9519
9520         * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
9521         Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
9522
9523 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
9524
9525         * proc-service.c (ps_lgetregs): Don't refetch registers from the
9526         target.
9527
9528 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
9529
9530         * spu-low.c (spu_fetch_registers, spu_store_registers): Change
9531         prototype to take a regcache.  Adjust.
9532
9533 2010-01-20  Pedro Alves  <pedro@codesourcery.com>
9534
9535         * regcache.h (struct thread_info): Forward declare.
9536         (struct regcache): New.
9537         (new_register_cache): Adjust prototype.
9538         (get_thread_regcache): Declare.
9539         (free_register_cache): Adjust prototype.
9540         (registers_to_string, registers_from_string): Ditto.
9541         (supply_register, supply_register_by_name, collect_register)
9542         (collect_register_as_string, collect_register_by_name): Ditto.
9543         * regcache.c (struct inferior_regcache_data): Delete.
9544         (get_regcache): Rename to ...
9545         (get_thread_regcache): ... this.  Adjust.  Switch inferior before
9546         fetching registers.
9547         (regcache_invalidate_one): Adjust.
9548         (regcache_invalidate): Fix prototype.
9549         (new_register_cache): Return the new register cache.
9550         (free_register_cache): Change prototype.
9551         (realloc_register_cache): Adjust.
9552         (registers_to_string): Change prototype to take a regcache.  Adjust.
9553         (registers_from_string): Ditto.
9554         (register_data): Ditto.
9555         (supply_register): Ditto.
9556         (supply_register_by_name): Ditto.
9557         (collect_register): Ditto.
9558         (collect_register_as_string): Ditto.
9559         (collect_register_by_name): Ditto.
9560         * server.c (process_serial_event): Adjust.
9561         * linux-low.h (regset_fill_func, regset_store_func): Change
9562         prototype.
9563         (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
9564         Change prototype.
9565         * linux-low.c (get_stop_pc): Adjust.
9566         (check_removed_breakpoint): Adjust.
9567         (linux_wait_for_event): Adjust.
9568         (linux_resume_one_lwp): Adjust.
9569         (fetch_register): Add regcache parameter.  Adjust.
9570         (usr_store_inferior_registers): Ditto.
9571         (regsets_fetch_inferior_registers): Ditto.
9572         (regsets_store_inferior_registers): Ditto.
9573         (linux_fetch_registers, linux_store_registers): Ditto.
9574         * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
9575         regcache.  Adjust.
9576         (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
9577         Ditto.
9578         * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
9579         prototype to take a regcache.
9580         (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
9581         * remote-utils.c (convert_ascii_to_int, outreg)
9582         (prepare_resume_reply): Change prototype to take a regcache.
9583         Adjust.
9584         * target.h (struct target_ops) <fetch_registers, store_registers>:
9585         Change prototype to take a regcache.
9586         (fetch_inferior_registers, store_inferior_registers): Change
9587         prototype to take a regcache.  Adjust.
9588         * proc-service.c (ps_lgetregs): Adjust.
9589         * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
9590         (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
9591         (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
9592         take a regcache.  Adjust.
9593         * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
9594         (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
9595         (arm_store_vfpregset, arm_get_pc, arm_set_pc):
9596         (arm_breakpoint_at): Change prototype to take a regcache.  Adjust.
9597         * linux-cris-low.c (cris_get_pc, cris_set_pc)
9598         (cris_cannot_fetch_register):
9599         (cris_breakpoint_at): Change prototype to take a regcache.
9600         Adjust.
9601         * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
9602         cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
9603         to take a regcache.  Adjust.
9604         (cris_breakpoint_at, cris_insert_point, cris_remove_point):
9605         Adjust.
9606         * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
9607         take a regcache.  Adjust.
9608         * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
9609         (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
9610         (m68k_set_pc): Change prototype to take a regcache.  Adjust.
9611         * linux-mips-low.c (mips_get_pc):
9612         (mips_set_pc): Change prototype to take a regcache.  Adjust.
9613         (mips_reinsert_addr): Adjust.
9614         (mips_collect_register): Change prototype to take a regcache.
9615         Adjust.
9616         (mips_supply_register):
9617         (mips_collect_register_32bit, mips_supply_register_32bit)
9618         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9619         (mips_store_fpregset): Ditto.
9620         * linux-ppc-low.c (ppc_supply_ptrace_register)
9621         (ppc_supply_ptrace_register): Ditto.
9622         (parse_spufs_run): Adjust.
9623         (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9624         (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9625         (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9626         take a regcache.  Adjust.
9627         * linux-s390-low.c (s390_collect_ptrace_register)
9628         (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9629         (s390_set_pc): Change prototype to take a regcache.  Adjust.
9630         (s390_arch_setup): Adjust.
9631         * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9632         (sh_fill_gregset): Change prototype to take a regcache.  Adjust.
9633         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9634         (sparc_fill_gregset, sparc_store_gregset_from_stack)
9635         (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9636         regcache.  Adjust.
9637         (sparc_breakpoint_at): Adjust.
9638         * linux-xtensa-low.c (xtensa_fill_gregset):
9639         (xtensa_store_gregset):
9640         (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9641         (xtensa_set_pc): Change prototype to take a regcache.  Adjust.
9642         * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9643         prototype to take a regcache.  Adjust.
9644         * win32-arm-low.c (arm_fetch_inferior_register)
9645         (arm_store_inferior_register): Change prototype to take a
9646         regcache.  Adjust.
9647         * win32-i386-low.c (i386_fetch_inferior_register)
9648         (i386_store_inferior_register): Change prototype to take a
9649         regcache.  Adjust.
9650         * win32-low.c (child_fetch_inferior_registers)
9651         (child_store_inferior_registers): Change prototype to take a
9652         regcache.  Adjust.
9653         (win32_wait): Adjust.
9654         (win32_fetch_inferior_registers): Change prototype to take a
9655         regcache.  Adjust.
9656         (win32_store_inferior_registers): Adjust.
9657         * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9658         store_inferior_register>: Change prototype to take a regcache.
9659
9660 2010-01-20  Doug Evans  <dje@google.com>
9661
9662         * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9663         #ifdef.
9664         (linux_wait_for_event1, linux_init_signals): Ditto.
9665         (W_STOPCODE): Provide definition if missing.
9666
9667 2010-01-13  Vladimir Prus  <vladimir@codesourcery.com>
9668
9669         * linux-low.c (linux_core_of_thread): New.
9670         (compare_ints, show_process, list_threads): New.
9671         (linux_qxfer_osdata): Report threads and cores.
9672         (linux_target_op): Register linux_core_of_thread.
9673         * remote-utils.c (prepare_resume_reply): Report the core.
9674         (buffer_xml_printf): Support %d specifier.
9675         * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9676         New.
9677         (handle_query): Handle qXfer:threads.  Announce availability
9678         thereof.
9679         * target.h (struct target_ops): New field core_of_thread.
9680
9681 2010-01-04  Ulrich Weigand  <uweigand@de.ibm.com>
9682
9683         * Makefile.in (clean): Remove new generated files.
9684         (reg-s390.o, reg-s390.c): Remove rules.
9685         (reg-s390x.o, reg-s390x.c): Likewise.
9686         (s390-linux32.o, s390-linux32.c): Add rules.
9687         (s390-linux64.o, s390-linux64.c): Likewise.
9688         (s390x-linux64.o, s390x-linux64.c): Likewise.
9689         * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9690         * linux-s390-low.c: Include <elf.h>.
9691         (HWCAP_S390_HIGH_GPRS): Define if undefined.
9692         (init_registers_s390): Remove prototype.
9693         (init_registers_s390x): Likewise.
9694         (init_registers_s390_linux32): Add prototype.
9695         (init_registers_s390_linux64): Likewise.
9696         (init_registers_s390x_linux64): Likewise.
9697         (s390_num_regs_3264): New define.
9698         (s390_regmap_3264): New global variable.
9699         (s390_cannot_fetch_register): Remove obsolete check.
9700         (s390_cannot_store_register): Likewise.
9701         (s390_collect_ptrace_register): Handle upper/lower register halves.
9702         (s390_supply_ptrace_register): Likewise.
9703         (s390_fill_gregset): Update to register number changes.
9704         (s390_get_hwcap): New routine.
9705         (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9706         Install appropriate regmap and register set.
9707
9708 2010-01-01  Joel Brobecker  <brobecker@adacore.com>
9709
9710         * server.c (gdbserver_version): Update copyright year to 2010.
9711         * gdbreplay.c (gdbreplay_version): Likewise.
9712
9713 2009-12-28  Doug Evans  <dje@google.com>
9714
9715         * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9716         elf/external.h.  Include <elf.h> instead but only if necessary.
9717
9718 2009-12-28  Pedro Alves  <pedro@codesourcery.com>
9719
9720         * linux-low.c (linux_remove_process): Remove `detaching'
9721         parameter.  Don't release/detach from thread_db here.
9722         (linux_kill): Release/detach from thread_db here, ...
9723         (linux_detach): ... and here, before actually detaching.
9724         (linux_wait_1): ... and here, when a process exits.
9725         * thread-db.c (any_thread_of): New.
9726         (thread_db_free): Switch the current inferior to a thread of the
9727         passed in process.
9728
9729 2009-12-21  Doug Evans  <dje@google.com>
9730
9731         * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9732
9733         * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9734         Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9735         warning ifndef __NR_tkill.  Move setting of errno there too.
9736         Delete unnecessary resetting of errno after syscall.
9737         Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9738
9739         * configure.ac: Check for dladdr.
9740         * config.in: Regenerate.
9741         * configure: Regenerate.
9742         * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9743         (try_thread_db_load): Update.
9744
9745         * linux-low.c (my_waitpid): Delete unnecessary prototype.
9746
9747 2009-12-18  Doug Evans  <dje@google.com>
9748
9749         * event-loop.c: Include unistd.h if it exists.
9750
9751         * linux-low.c (my_waitpid): Move definition away from being in
9752         between linux_tracefork_child/linux_test_for_tracefork.
9753
9754         * gdb_proc_service.h (psaddr_t): Fix type.
9755         * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9756         signature to match glibc.
9757
9758 2009-12-16  Doug Evans  <dje@google.com>
9759
9760         * linux-low.c (linux_read_memory): Fix argument to read.
9761
9762 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
9763
9764         * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9765         events, don't leave current_inferior pointing at null.
9766
9767 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
9768
9769         * win32-low.c (LOG): Delete.
9770         (OUTMSG): Output to stderr.
9771         (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9772         on compile time LOG macro.
9773         (win32_wait): Fix debug output.
9774
9775 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
9776
9777         * win32-low.c (win32_add_one_solib): If the dll name is
9778         "ntdll.dll", prepend the system directory to the dll path.
9779
9780 2009-11-17  Daniel Jacobowitz  <dan@codesourcery.com>
9781
9782         * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9783
9784 2009-11-17  Nathan Sidwell  <nathan@codesourcery.com>
9785             Vladimir Prus  <vladimir@codesourcery.com>
9786
9787         * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9788         * configure.ac: Check for __mcoldfire__ and set
9789         gdb_cv_m68k_is_coldfire.
9790         * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9791         reg-cf.o and reg-m68k.o.
9792         * configure: Regenerated.
9793
9794 2009-11-16  Pedro Alves  <pedro@codesourcery.com>
9795
9796         * linux-low.c (linux_remove_process): Add `detaching' parameter.
9797         Pass it to thread_db_free.
9798         (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9799         proper `detaching' argument to linux_remove_process.
9800         * linux-low.h (thread_db_free): Add `detaching' parameter.
9801         * thread-db.c (thread_db_init): Pass false as `detaching' argument
9802         to thread_db_free.
9803         (thread_db_free): Add `detaching' parameter.  Only
9804         call td_ta_clear_event if detaching from process.
9805
9806 2009-11-12  Maxim Kuvyrkov  <maxim@codesourcery.com>
9807
9808         * thread-db.c (thread_db_free): Fix typo.
9809
9810 2009-11-11  Paul Pluzhnikov  <ppluzhnikov@google.com>
9811
9812         PR gdb/10838
9813         * thread-db.c (thread_db_free): Call td_ta_clear_event.
9814
9815 2009-11-03  Nathan Sidwell  <nathan@codesourcery.com>
9816
9817         * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9818         with an i686 compiler.
9819         * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9820         needed.
9821         * configure: Rebuilt.
9822
9823 2009-10-29  Sandra Loosemore  <sandra@codesourcery.com>
9824
9825         PR gdb/10783
9826
9827         * server.c (handle_search_memory_1): Correct read_addr initialization
9828         in loop for searching subsequent chunks.
9829
9830 2009-10-29  Paul Pluzhnikov  <ppluzhnikov@google.com>
9831
9832         * configure.ac: New --with-libthread-db option.
9833         * thread-db.c: Allow direct dependence on libthread_db.
9834         (thread_db_free): Adjust.
9835         * config.in: Regenerate.
9836         * configure: Likewise.
9837
9838 2009-10-28  Paul Pluzhnikov  <ppluzhnikov@google.com>
9839
9840         PR gdb/10757
9841         * thread-db.c (attach_thread): New function.
9842         (maybe_attach_thread): Return success/failure.
9843         (find_new_threads_callback): Adjust.
9844         (thread_db_find_new_threads): Loop until no new threads.
9845
9846 2009-10-13  Pedro Alves  <pedro@codesourcery.com>
9847
9848         * proc-service.c (ps_lgetregs): Formatting.
9849
9850 2009-10-08  Paul Pluzhnikov  <ppluzhnikov@google.com>
9851
9852         * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9853         * configure.ac: Adjust.
9854         * linux-low.h (struct process_info_private): Move members to struct
9855         thread_db.
9856         (thread_db_free, thread_db_handle_monitor_command): New prototype.
9857         * linux-low.c (linux_remove_process): Adjust.
9858         (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9859         * server.c (handle_query): Move code ...
9860         (handle_monitor_command): ... here. New function.
9861         * target.h (struct target_ops): New member.
9862         * thread-db.c (struct thread_db): New.
9863         (libthread_db_search_path): New variable.
9864         (thread_db_create_event, thread_db_enable_reporting)
9865         (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9866         (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9867         (try_thread_db_load_1, dladdr_to_soname): New functions.
9868         (try_thread_db_load, thread_db_load_search): New functions.
9869         (thread_db_init): Search for libthread_db.
9870         (thread_db_free): New function.
9871         (thread_db_handle_monitor_command): Likewise.
9872         * config.in: Regenerate.
9873         * configure: Regenerate.
9874
9875 2009-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
9876
9877         * spu-low.c (spu_kill): Wait for inferior to terminate.
9878         Call clear_inferiors.
9879         (spu_detach): Call clear_inferiors.
9880
9881 2009-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9882
9883         * aclocal.m4: Regenerate.
9884         * config.in: Likewise.
9885         * configure: Likewise.
9886
9887 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
9888
9889         * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9890         (parse_spufs_run): New function.
9891         (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9892         (ppc_breakpoint_at): Handle SPU breakpoints.
9893
9894 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
9895
9896         * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9897         (SPUFS_MAGIC): Define.
9898         (spu_enumerate_spu_ids): New function.
9899         (linux_qxfer_spu): New function.
9900         (linux_target_ops): Install linux_qxfer_spu.
9901
9902 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
9903
9904         * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9905         and powerpc-cell64l.o to srv_regobj.  Add rs6000/powerpc-cell32l.xml
9906         and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9907         * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9908         (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9909         (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9910         * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9911         (init_registers_powerpc_cell32l): Add prototype.
9912         (init_registers_powerpc_cell64l): Likewise.
9913         (ppc_arch_setup): Detect Cell/B.E. architecture.
9914
9915 2009-07-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9916
9917         * Makefile.in (datarootdir): New variable.
9918
9919 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
9920
9921         * linux-low.c (linux_write_memory): Update debugging output.
9922         * Makefile.in (clean): Add new descriptions.
9923         (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9924         (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9925         * configure.srv: Add new files for arm*-*-linux*.
9926         * linux-arm-low.c: Add new declarations.
9927         (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9928         (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9929         (HWCAP_VFPv3D16): New.
9930         (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9931         instead of __IWMMXT__.
9932         (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9933         (arm_arch_setup): New.
9934         (target_regsets): Remove #ifdef.  Add VFP regset.
9935         (the_low_target): Use arm_arch_setup.
9936
9937 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
9938
9939         * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9940         the main thread again.
9941
9942 2009-07-06  Aleksandar Ristovski  <aristovski@qnx.com>
9943
9944         Adding Neutrino gdbserver.
9945         * configure: Regenerated.
9946         * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9947         * configure.srv (i[34567]86-*-nto*): New target.
9948         * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9949         * remote-utils.c [__QNX__]: Include sys/iomgr.h
9950         (nto_comctrl) [__QNX__]: New function.
9951         (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9952
9953 2009-07-05  Danny Backx  <dannybackx@users.sourceforge.net>
9954
9955         * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9956         srv_tgtobj.
9957
9958 2009-07-04  Danny Backx  <dannybackx@users.sourceforge.net>
9959             Pedro Alves  <pedro@codesourcery.com>
9960
9961         * win32-i386-low.c (i386_get_thread_context): Handle systems that
9962         don't support CONTEXT_EXTENDED_REGISTERS.
9963         (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9964         (the_low_target): Install them.
9965         * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9966         failing with ERROR_PIPE_NOT_CONNECTED.
9967
9968 2009-06-30  Doug Evans  <dje@google.com>
9969             Pierre Muller  <muller@ics.u-strasbg.fr>
9970
9971         Add h/w watchpoint support to x86-linux, win32-i386.
9972         * Makefile.in (SFILES): Add i386-low.c
9973         (i386_low_h): Define.
9974         (i386-low.o): Add dependencies.
9975         (linux-x86-low.o): Add i386-low.h dependency.
9976         (win32-i386-low.o): Ditto.
9977         * i386-low.c: New file.
9978         * i386-low.h: New file.
9979         * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9980         (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9981         * linux-low.c (linux_add_process): Initialize arch_private.
9982         (linux_remove_process): Free arch_private.
9983         (add_lwp): Initialize arch_private.
9984         (delete_lwp): Free arch_private.
9985         (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9986         provided.
9987         * linux-low.h (process_info_private): New member arch_private.
9988         (lwp_info): New member arch_private.
9989         (linux_target_ops): New members new_process, new_thread,
9990         prepare_to_resume.
9991         (ptid_of): New macro.
9992         * linux-x86-low.c: Include stddef.h, i386-low.h.
9993         (arch_process_info): New struct.
9994         (arch_lwp_info): New struct.
9995         (x86_linux_dr_get, x86_linux_dr_set): New functions.
9996         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9997         (i386_dr_low_get_status): New function.
9998         (x86_insert_point, x86_remove_point): New functions.
9999         (x86_stopped_by_watchpoint): New function.
10000         (x86_stopped_data_address): New function.
10001         (x86_linux_new_process, x86_linux_new_thread): New functions.
10002         (x86_linux_prepare_to_resume): New function.
10003         (the_low_target): Add entries for insert_point, remove_point,
10004         stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
10005         prepare_to_resume.
10006         * server.c (debug_hw_points): New global.
10007         (monitor_show_help): Document set debug-hw-points.
10008         (handle_query): Process "set debug-hw-points".
10009         * server.h (debug_hw_points): Declare.
10010         (paddress): Declare.
10011         * utils.c (NUMCELLS, CELLSIZE): New macros.
10012         (get_sell, xsnprintf, paddress): New functions.
10013         * win32-arm-low.c (the_low_target): Add entries for insert_point,
10014         remove_point, stopped_by_watchpoint, stopped_data_address.
10015         * win32-i386-low.c: Include i386-low.h.
10016         (debug_reg_state): Replaces dr.
10017         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10018         (i386_dr_low_get_status): New function.
10019         (i386_insert_point, i386_remove_point): New functions.
10020         (i386_stopped_by_watchpoint): New function.
10021         (i386_stopped_data_address): New function.
10022         (i386_initial_stuff): Update.
10023         (get_thread_context,set_thread_context,i386_thread_added): Update.
10024         (the_low_target): Add entries for insert_point,
10025         remove_point, stopped_by_watchpoint, stopped_data_address.
10026         * win32-low.c (win32_insert_watchpoint): New function.
10027         (win32_remove_watchpoint): New function.
10028         (win32_stopped_by_watchpoint): New function.
10029         (win32_stopped_data_address): New function.
10030         (win32_target_ops): Add entries for insert_watchpoint,
10031         remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
10032         * win32-low.h (win32_target_ops): New members insert_point,
10033         remove_point, stopped_by_watchpoint, stopped_data_address.
10034
10035 2009-06-25  Pedro Alves  <pedro@codesourcery.com>
10036
10037         * server.c (process_serial_event): Re-return unsupported, not
10038         error, if the type isn't recognized.  Re-allow supporting only
10039         insert or remove packets.  Also call require_running for
10040         breakpoints.  Add missing break statement to default case.  Tidy.
10041         * target.h (struct target_ops): Rename insert_watchpoint to
10042         insert_point, and remove_watchpoint to remove_point.
10043
10044         * linux-low.h (struct linux_target_ops): Likewise.
10045         * linux-low.c (linux_insert_watchpoint): Rename to ...
10046         (linux_insert_point): ... this.  Adjust.
10047         (linux_remove_watchpoint): Rename to ...
10048         (linux_remove_point): ... this.  Adjust.
10049         (linux_target_ops): Adjust.
10050         * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
10051         (cris_insert_point): ... this.
10052         (cris_remove_watchpoint): Rename to ...
10053         (cris_remove_point): ... this.
10054         (the_low_target): Adjust.
10055
10056 2009-06-24  Pierre Muller  <muller@ics.u-strasbg.fr>
10057
10058         * server.c (handle_v_kill): Pass signal_pid to
10059         kill_inferior if multi_process is zero.
10060
10061 2009-06-23  Aleksandar Ristovski  <aristovski@qnx.com>
10062
10063         * server.c (process_serial_event): Add support for Z0 and Z1 packet.
10064         * target.h (target_ops): Comment for *_watchpoint to make it clear
10065         the functions can get types '0' and '1'.
10066
10067 2009-06-22  Aleksandar Ristovski  <aristovski@qnx.com>
10068
10069         * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
10070         * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
10071         * regcache.c (get_regcache): Likewise.
10072         * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
10073         * win32-low.c (child_fetch_inferior_registers): Remove check for
10074         regno 0.
10075
10076 2009-06-19  Aleksandar Ristovski  <aristovski@qnx.com>
10077             Pedro Alves <pedro@codesourcery.com>
10078
10079         * target.h (struct target_ops) <supports_multi_process>: New
10080         callback.
10081         (target_supports_multi_process): New.
10082         * server.c (handle_query): Even if GDB reports support, only
10083         enable multi-process if the target also supports it.  Report
10084         multi-process support only if the target backend supports it.
10085         * linux-low.c (linux_supports_multi_process): New function.
10086         (linux_target_ops): Install it as target_supports_multi_process
10087         callback.
10088
10089 2009-05-24  Doug Evans  <dje@google.com>
10090
10091         Global renaming of find_thread_pid to find_thread_ptid.
10092         * server.h (find_thread_ptid): Renamed from find_thread_pid.
10093         * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
10094         All callers updated.
10095
10096         * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
10097         to resume the newly created thread, don't call ptrace (PTRACE_CONT)
10098         directly.
10099
10100         * linux-low.c (get_stop_pc): Print pc if debug_threads.
10101         (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
10102         (linux_resume_one_lwp): Ditto.
10103
10104 2009-05-23  Doug Evans  <dje@google.com>
10105
10106         * linux-low.c (linux_resume_one_lwp): Change type of first arg
10107         from struct inferior_list_entry * to struct lwp_info *.
10108         All callers updated.
10109
10110 2009-05-13  Doug Evans  <dje@google.com>
10111
10112         * linux-x86-low.c: Don't include assert.h.
10113         (x86_siginfo_fixup): Use fatal, not assert.
10114         (x86_arch_setup): Fix comment.
10115
10116 2009-05-12  Doug Evans  <dje@google.com>
10117
10118         Biarch support for i386/amd64 gdbserver.
10119         * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
10120         Add linux-x86-low.c.
10121         (linux-i386-low.o, linux-x86-64-low.o): Delete.
10122         (linux-x86-low.o): Add.
10123         * linux-x86-64-low.c: Delete.
10124         * linux-i386-low.c: Delete.
10125         * linux-x86-low.c: New file.
10126         * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
10127         linux-x86-low.o.
10128         (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
10129         linux-x86-low.o.
10130         (x86_64-linux srv_regobj): Add reg-i386-linux.o.
10131         * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
10132         (linux_child_pid_to_exec_file): New function.
10133         (elf_64_header_p, elf_64_file_p): New functions.
10134         (siginfo_fixup): New function.
10135         (linux_xfer_siginfo): New local inf_siginfo.  Call siginfo_fixup to
10136         give target a chance to convert layout.
10137         * linux-low.h (linux_target_ops): New member siginfo_fixup.
10138         (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
10139
10140 2009-05-07  Doug Evans  <dje@google.com>
10141
10142         * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
10143         (regsets_store_inferior_registers): Ditto.
10144
10145 2009-05-06  Pedro Alves  <pedro@codesourcery.com>
10146
10147         PR server/10048
10148
10149         * linux-low.c (must_set_ptrace_flags): Delete.
10150         (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
10151         of the global.
10152         (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here.  Set
10153         `lwp->must_set_ptrace_flags' instead.
10154         (linux_wait_for_event_1): Set ptrace options here.
10155         (linux_wait_1): ... not here.
10156
10157 2009-04-30  Doug Evans  <dje@google.com>
10158
10159         * inferiors.c (started_inferior_callback): New function.
10160         (attached_inferior_callback): New function.
10161         (have_started_inferiors_p, have_attached_inferiors_p): New functions.
10162         * server.c (print_started_pid, print_attached_pid): New functions.
10163         (detach_or_kill_for_exit): New function.
10164         (main): Call it instead of for_each_inferior (kill_inferior_callback).
10165         * server.h (have_started_inferiors_p): Declare.
10166         (have_attached_inferiors_p): Declare.
10167
10168         * inferiors.c (remove_process): Fix memory leak, free process.
10169         * linux-low.c (linux_remove_process): New function.
10170         (linux_kill): Call it instead of remove_process.
10171         (linux_detach, linux_wait_1): Ditto.
10172
10173 2009-04-19  Danny Backx  <dannybackx@users.sourceforge.net>
10174
10175         * configure.srv: Add x86 Windows CE target.
10176
10177 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
10178
10179         * inferiors.c (get_thread_process): Make global.
10180         * server.h (get_thread_process): Add prototype.
10181         * thread-db.c (find_one_thread): Use get_thread_process
10182         instead of current_process.
10183         (thread_db_get_tls_address): Do not crash if called when
10184         thread layer is not yet initialized.
10185
10186 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
10187
10188         * remote-utils.c (prepare_resume_reply): Null-terminate packet.
10189         * spu-low.c (current_tid): Rename to ...
10190         (current_ptid): ... this.
10191         (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
10192         spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
10193         ptid_get_lwp (current_ptid) instead of current_tid.
10194         (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
10195         instead of current_tid.  Use find_process_pid to verify pid
10196         argument is valid.  Pass proper argument to remove_process.
10197         (spu_thread_alive): Compare current_ptid instead of current_tid.
10198         (spu_resume): Likewise.
10199
10200 2009-04-02  Pedro Alves  <pedro@codesourcery.com>
10201
10202         * linux-low.c (usr_store_inferior_registers): Declare local `pid'
10203         variable.
10204
10205 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
10206
10207         Implement the multiprocess extensions, and add linux multiprocess
10208         support.
10209
10210         * server.h (ULONGEST): Declare.
10211         (struct ptid, ptid_t): New.
10212         (minus_one_ptid, null_ptid): Declare.
10213         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10214         (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
10215         (struct inferior_list_entry): Change `id' type from unsigned from
10216         to ptid_t.
10217         (struct sym_cache, struct breakpoint, struct
10218         process_info_private): Forward declare.
10219         (struct process_info): Declare.
10220         (current_process): Declare.
10221         (all_processes): Declare.
10222         (initialize_inferiors): Declare.
10223         (add_thread): Adjust to use ptid_t.
10224         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
10225         (add_process, remove_process, find_thread_pid): Declare.
10226         (find_inferior_id): Adjust to use ptid_t.
10227         (cont_thread, general_thread, step_thread): Change type to ptid_t.
10228         (multi_process): Declare.
10229         (push_event): Adjust to use ptid_t.
10230         (read_ptid, write_ptid): Declare.
10231         (prepare_resume_reply): Adjust to use ptid_t.
10232         (clear_symbol_cache): Declare.
10233         * inferiors.c (all_processes): New.
10234         (null_ptid, minus_one_ptid): New.
10235         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10236         (ptid_get_tid, ptid_equal, ptid_is_pid): New.
10237         (add_thread): Change unsigned long to ptid.  Remove gdb_id
10238         parameter.  Adjust.
10239         (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
10240         (gdb_id_to_thread): Rename to ...
10241         (find_thread_pid): ... this.  Change unsigned long to ptid.
10242         (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
10243         (loaded_dll, pull_pid_from_list): Adjust.
10244         (add_process, remove_process, find_process_pid)
10245         (get_thread_process, current_process, initialize_inferiors): New.
10246         * target.h (struct thread_resume) <thread>: Change type to ptid_t.
10247         (struct target_waitstatus) <related_pid>: Ditto.
10248         (struct target_ops) <kill, detach>: Add `pid' argument.  Change
10249         return type to int.
10250         (struct target_ops) <join>: Add `pid' argument.
10251         (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
10252         (struct target_ops) <wait>: Add `ptid' field.  Change return type
10253         to ptid.
10254         (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
10255         (mywait): Add `ptid' argument.  Change return type to ptid_t.
10256         (target_pid_to_str): Declare.
10257         * target.c (set_desired_inferior): Adjust to use ptids.
10258         (mywait): Add new `ptid' argument.  Adjust.
10259         (target_pid_to_str): New.
10260         * mem-break.h (free_all_breakpoints): Declare.
10261         * mem-break.c (breakpoints): Delelete.
10262         (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
10263         (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
10264         to use per-process breakpoint list.
10265         (free_all_breakpoints): New.
10266         * remote-utils.c (struct sym_cache) <name>: Drop `const'.
10267         (symbol_cache, all_symbols_looked_up): Delete.
10268         (hexchars): New.
10269         (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
10270         read_ptid): New.
10271         (prepare_resume_reply): Change ptid argument's type from unsigned
10272         long to ptid_t.  Adjust.  Implement W;process and X;process.
10273         (free_sym_cache, clear_symbol_cache): New.
10274         (look_up_one_symbol): Adjust to per-process symbol cache.  *
10275         * server.c (cont_thread, general_thread, step_thread): Change type
10276         to ptid_t.
10277         (attached): Delete.
10278         (multi_process): New.
10279         (last_ptid): Change type to ptid_t.
10280         (struct vstop_notif) <ptid>: Change type to ptid_t.
10281         (queue_stop_reply, push_event): Change `ptid' argument's type to
10282         ptid_t.
10283         (discard_queued_stop_replies): Add `pid' argument.
10284         (start_inferior): Adjust to use ptids.  Adjust to mywait interface
10285         changes.  Don't reference the `attached' global.
10286         (attach_inferior): Adjust to mywait interface changes.
10287         (handle_query): Adjust to use ptids.  Parse GDB's qSupported
10288         features.  Handle and report "multiprocess+".  Handle
10289         "qAttached:PID".
10290         (handle_v_cont): Adjust to use ptids.  Adjust to mywait interface
10291         changes.
10292         (handle_v_kill): New.
10293         (handle_v_stopped): Adjust to use target_pid_to_str.
10294         (handle_v_requests): Allow multiple attaches and runs when
10295         multiprocess extensions are in effect.  Handle "vKill".
10296         (myresume): Adjust to use ptids.
10297         (queue_stop_reply_callback): Add `arg' parameter.  Handle it.
10298         (handle_status): Adjust to discard_queued_stop_replies interface
10299         change.
10300         (first_thread_of, kill_inferior_callback)
10301         (detach_or_kill_inferior_callback, join_inferiors_callback): New.
10302         (main): Call initialize_inferiors.  Adjust to use ptids, killing
10303         and detaching from all inferiors.  Handle multiprocess packet
10304         variants.
10305         * linux-low.h: Include gdb_proc_service.h.
10306         (struct process_info_private): New.
10307         (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
10308         <lwpid_of>: Use ptid_get_lwp.
10309         (get_lwp_thread): Adjust.
10310         (struct lwp_info): Add `dead' member.
10311         (find_lwp_pid): Declare.
10312         * linux-low.c (thread_db_active): Delete.
10313         (new_inferior): Adjust comment.
10314         (inferior_pid): Delete.
10315         (linux_add_process): New.
10316         (handle_extended_wait): Adjust.
10317         (add_lwp): Change unsigned long to ptid.
10318         (linux_create_inferior): Add process to processes table.  Adjust
10319         to use ptids.  Don't set new_inferior here.
10320         (linux_attach_lwp): Rename to ...
10321         (linux_attach_lwp_1): ... this.  Add `initial' argument.  Handle
10322         it.  Adjust to use ptids.
10323         (linux_attach_lwp): New.
10324         (linux_attach): Add process to processes table.  Don't set
10325         new_inferior here.
10326         (struct counter): New.
10327         (second_thread_of_pid_p, last_thread_of_process_p): New.
10328         (linux_kill_one_lwp): Add `args' parameter.  Handle it.  Adjust to
10329         multiple processes.
10330         (linux_kill): Add `pid' argument.  Handle it.  Adjust to multiple
10331         processes.  Remove process from process table.
10332         (linux_detach_one_lwp): Add `args' parameter.  Handle it.  Adjust
10333         to multiple processes.
10334         (any_thread_of): New.
10335         (linux_detach): Add `pid' argument, and handle it.  Remove process
10336         from processes table.
10337         (linux_join): Add `pid' argument.  Handle it.
10338         (linux_thread_alive): Change unsighed long argument to ptid_t.
10339         Consider dead lwps as not being alive.
10340         (status_pending_p): Rename `dummy' argument to `arg'.  Filter out
10341         threads we're not interested in.
10342         (same_lwp, find_lwp_pid): New.
10343         (linux_wait_for_lwp): Change `pid' argument's type from int to
10344         ptid_t.  Adjust.
10345         (linux_wait_for_event): Rename to ...
10346         (linux_wait_for_event_1): ... this.  Change `pid' argument's type
10347         from int to ptid_t.  Adjust.
10348         (linux_wait_for_event): New.
10349         (linux_wait_1): Add `ptid' argument.  Change return type to
10350         ptid_t.  Adjust.  Use last_thread_of_process_p.  Remove processes
10351         that exit from the process table.
10352         (linux_wait): Add `ptid' argument.  Change return type to ptid_t.
10353         Adjust.
10354         (mark_lwp_dead): New.
10355         (wait_for_sigstop): Adjust to use ptids.  If a process exits while
10356         stopping all threads, mark its main lwp as dead.
10357         (linux_set_resume_request, linux_resume_one_thread): Adjust to use
10358         ptids.
10359         (fetch_register, usr_store_inferior_registers)
10360         (regsets_fetch_inferior_registers)
10361         (regsets_store_inferior_registers, linux_read_memory)
10362         (linux_write_memory): Inline `inferior_pid'.
10363         (linux_look_up_symbols): Adjust to use per-process
10364         `thread_db_active'.
10365         (linux_request_interrupt): Adjust to use ptids.
10366         (linux_read_auxv): Inline `inferior_pid'.
10367         (initialize_low): Don't reference thread_db_active.
10368         * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
10369         * proc-service.c (ps_lgetregs): Use find_lwp_pid.
10370         (ps_getpid): Return the pid of the current inferior.
10371         * thread-db.c (proc_handle, thread_agent): Delete.
10372         (thread_db_create_event, thread_db_enable_reporting): Adjust to
10373         per-process data.
10374         (find_one_thread): Change argument type to ptid_t.  Adjust to
10375         per-process data.
10376         (maybe_attach_thread): Adjust to per-process data and ptids.
10377         (thread_db_find_new_threads): Ditto.
10378         (thread_db_init): Ditto.
10379         * spu-low.c (spu_create_inferior, spu_attach): Add process to
10380         processes table.  Adjust to use ptids.
10381         (spu_kill, spu_detach): Adjust interface.  Remove process from
10382         processes table.
10383         (spu_join, spu_thread_alive): Adjust interface.
10384         (spu_wait): Adjust interface.  Remove process from processes
10385         table.  Adjust to use ptids.
10386         * win32-low.c (current_inferior_tid): Delete.
10387         (current_inferior_ptid): New.
10388         (debug_event_ptid): New.
10389         (thread_rec): Take a ptid.  Adjust.
10390         (child_add_thread): Add `pid' argument.  Adjust to use ptids.
10391         (child_delete_thread): Ditto.
10392         (do_initial_child_stuff): Add `attached' argument.  Add process to
10393         processes table.
10394         (child_fetch_inferior_registers, child_store_inferior_registers):
10395         Adjust.
10396         (win32_create_inferior): Pass 0 to do_initial_child_stuff.
10397         (win32_attach): Pass 1 to do_initial_child_stuff.
10398         (win32_kill): Adjust interface.  Remove process from processes
10399         table.
10400         (win32_detach): Ditto.
10401         (win32_join): Adjust interface.
10402         (win32_thread_alive): Take a ptid.
10403         (win32_resume): Adjust to use ptids.
10404         (get_child_debug_event): Ditto.
10405         (win32_wait): Adjust interface.  Remove exiting process from
10406         processes table.
10407
10408 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
10409
10410         Non-stop mode support.
10411
10412         * server.h (non_stop): Declare.
10413         (gdb_client_data, handler_func): Declare.
10414         (delete_file_handler, add_file_handler, start_event_loop):
10415         Declare.
10416         (handle_serial_event, handle_target_event, push_event)
10417         (putpkt_notif): Declare.
10418         * target.h (enum resume_kind): New.
10419         (struct thread_resume): Replace `step' field by `kind' field.
10420         (TARGET_WNOHANG): Define.
10421         (struct target_ops) <wait>: Add `options' argument.
10422         <supports_non_stop, async, start_non_stop>: New fields.
10423         (target_supports_non_stop, target_async): New.
10424         (start_non_stop): Declare.
10425         (mywait): Add `options' argument.
10426         * target.c (mywait): Add `options' argument.  Print child exit
10427         notifications here.
10428         (start_non_stop): New.
10429         * server.c (non_stop, own_buf, mem_buf): New globals.
10430         (struct vstop_notif): New.
10431         (notif_queue): New global.
10432         (queue_stop_reply, push_event, discard_queued_stop_replies)
10433         (send_next_stop_reply): New.
10434         (start_inferior): Adjust to use resume_kind.  Adjust to mywait
10435         interface changes.
10436         (attach_inferior): In non-stop mode, don't wait for the target
10437         here.
10438         (handle_general_set): Handle QNonStop.
10439         (handle_query): When handling qC, return the current general
10440         thread, instead of the first thread of the list.
10441         (handle_query): If the backend supports non-stop mode, include
10442         QNonStop+ in the qSupported query response.
10443         (handle_v_cont): Adjust to use resume_kind.  Handle resume_stop
10444         and non-stop mode.
10445         (handle_v_attach, handle_v_run): Handle non-stop mode.
10446         (handle_v_stopped): New.
10447         (handle_v_requests): Report support for vCont;t.  Handle vStopped.
10448         (myresume): Adjust to use resume_kind.  Handle non-stop.
10449         (queue_stop_reply_callback): New.
10450         (handle_status): Handle non-stop mode.
10451         (main): Clear non_stop flag on reconnection.  Use the event-loop.
10452         Refactor serial protocol handling from here ...
10453         (process_serial_event): ... to this new function.  When GDB
10454         selects any thread, select one here.  In non-stop mode, wait until
10455         GDB acks all pending events before exiting.
10456         (handle_serial_event, handle_target_event): New.
10457         * remote-utils.c (remote_open): Install remote_desc in the event
10458         loop.
10459         (remote_close): Remove remote_desc from the event loop.
10460         (putpkt_binary): Rename to...
10461         (putpkt_binary_1): ... this.  Add `is_notic' argument.  Handle it.
10462         (putpkt_binary): New as wrapper around putpkt_binary_1.
10463         (putpkt_notif): New.
10464         (prepare_resume_reply): In non-stop mode, don't change the
10465         general_thread.
10466         * event-loop.c: New.
10467         * Makefile.in (OBJ): Add event-loop.o.
10468         (event-loop.o): New rule.
10469
10470         * linux-low.h (pid_of): Moved here.
10471         (lwpid_of): New.
10472         (get_lwp_thread): Use lwpid_of.
10473         (struct lwp_info): Delete `lwpid' field.  Add `suspended' field.
10474         * linux-low.c (pid_of): Delete.
10475         (inferior_pid): Use lwpid_of.
10476         (linux_event_pipe): New.
10477         (target_is_async_p): New.
10478         (delete_lwp): New.
10479         (handle_extended_wait): Use lwpid_of.
10480         (add_lwp): Don't set lwpid field.
10481         (linux_attach_lwp): Adjust debug output.  Use lwpid_of.
10482         (linux_kill_one_lwp): If killing a running lwp, stop it first.
10483         Use lwpid_of.  Adjust to linux_wait_for_event interface changes.
10484         (linux_detach_one_lwp): If detaching from a running lwp, stop it
10485         first.  Adjust to linux_wait_for_event interface changes.  Use
10486         lwpid_of.
10487         (linux_detach): Don't delete the main lwp here.
10488         (linux_join): Use my_waitpid.  Avoid signal_pid.  Use lwpid_of.
10489         (status_pending_p): Don't consider explicitly suspended lwps.
10490         (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
10491         pointer.  Add OPTIONS argument.  Change return type to int.  Use
10492         my_waitpid instead of sleeping.  Handle WNOHANG.  Use lwpid_of.
10493         (linux_wait_for_event): Take an integer pid instead of a lwp_info
10494         pointer.  Add status pointer argument.  Return a pid instead of a
10495         status.  Use lwpid_of.  Adjust to linux_wait_for_lwp interface
10496         changes.  In non-stop mode, don't switch to a random thread.
10497         (linux_wait): Rename to...
10498         (linux_wait_1): ... this.  Add target_options argument, and handle
10499         it.  Adjust to use resume_kind.  Use lwpid_of.  In non-stop mode,
10500         don't handle the continue thread.  Handle TARGET_WNOHANG.  Merge
10501         clean exit and signal exit code.  Don't stop all threads in
10502         non-stop mode.  In all-stop mode, only stop all threads when
10503         reporting a stop to GDB.  Handle explicit thread stop requests.
10504         (async_file_flush, async_file_mark): New.
10505         (linux_wait): New.
10506         (send_sigstop): Use lwpid_of.
10507         (wait_for_sigstop): Use lwpid_of.  Adjust to linux_wait_for_event
10508         interface changes.  In non-stop mode, don't switch to a random
10509         thread.
10510         (linux_resume_one_lwp): Use lwpid_of.
10511         (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
10512         (linux_resume_one_thread): ... this.  Handle resume_stop.  In
10513         non-stop mode, don't look for pending flag in all threads.
10514         (resume_status_pending_p): Don't consider explicitly suspended
10515         threads.
10516         (my_waitpid): Reimplement.  Emulate __WALL.
10517         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10518         Use lwpid_of.
10519         (sigchld_handler, linux_supports_non_stop, linux_async)
10520         (linux_start_non_stop): New.
10521         (linux_target_ops): Register linux_supports_non_stop, linux_async
10522         and linux_start_non_stop.
10523         (initialize_low): Install SIGCHLD handler.
10524         * thread-db.c (thread_db_create_event, find_one_thread)
10525         (thread_db_get_tls_address): Use lwpid_of.
10526         * win32-low.c (win32_detach): Adjust to use resume_kind.
10527         (win32_wait): Add `options' argument.
10528         * spu-low.c (spu_resume): Adjust to use resume_kind.
10529         (spu_wait): Add `options' argument.
10530
10531 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
10532
10533         Decouple target code from remote protocol.
10534
10535         * target.h (enum target_waitkind): New.
10536         (struct target_waitstatus): New.
10537         (struct target_ops) <wait>: Return an unsigned long.  Take a
10538         target_waitstatus pointer instead of a char pointer.
10539         (mywait): Likewise.
10540         * target.c (mywait): Change prototype to return an unsigned long.
10541         Take a target_waitstatus pointer instead of a char pointer.  Adjust.
10542         * server.h (thread_from_wait, old_thread_from_wait): Delete
10543         declarations.
10544         (prepare_resume_reply): Change prototype to take a
10545         target_waitstatus.
10546         * server.c (thread_from_wait, old_thread_from_wait): Delete.
10547         (last_status, last_ptid): New.
10548         (start_inferior): Remove "statusptr" argument.  Adjust.  Return a
10549         pid instead of a signal.
10550         (attach_inferior): Remove "status" and "signal" parameters.
10551         Adjust.
10552         (handle_query): For qGetTLSAddr, parse the thread id with strtol,
10553         not as an address.
10554         (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
10555         (handle_v_requests, myresume): Remove "status" and "signal"
10556         parameters.  Adjust.
10557         (handle_status): New.
10558         (main): Delete local `status'.  Adjust.
10559         * remote-utils.c: Include target.h.
10560         (prepare_resume_reply): Change prototype to take a
10561         target_waitstatus.  Adjust.
10562
10563         * linux-low.c (linux_wait): Adjust to new target_ops->wait
10564         interface.
10565         * spu-low.c (spu_wait): Adjust.
10566         * win32-low.c (enum target_waitkind, struct target_waitstatus):
10567         Delete.
10568         (win32_wait): Adjust.
10569
10570 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
10571
10572         * target.h (struct thread_resume): Delete leave_stopped member.
10573         (struct target_ops): Add a `n' argument to the `resume' callback.
10574         * server.c (start_inferior): Adjust.
10575         (handle_v_cont, myresume): Adjust.
10576         * linux-low.c (check_removed_breakpoint): Adjust to resume
10577         interface change, and to removed leave_stopped field.
10578         (resume_ptr): Delete.
10579         (struct thread_resume_array): New.
10580         (linux_set_resume_request): Add new `arg' parameter.  Adjust to
10581         resume interface change.
10582         (linux_continue_one_thread, linux_queue_one_thread)
10583         (resume_status_pending_p): Check if the resume field is NULL
10584         instead of checking the leave_stopped member.
10585         (linux_resume): Adjust to the target resume interface change.
10586         * spu-low.c (spu_resume): Adjust to the target resume interface
10587         change.
10588         * win32-low.c (win32_detach, win32_resume): Ditto.
10589
10590 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
10591
10592         * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
10593         flag.
10594         (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
10595         pending.
10596         (linux_continue_one_thread): Only preserve the stepping flag if
10597         there's a pending breakpoint.
10598
10599 2009-03-31  Pedro Alves  <pedro@codesourcery.com>
10600
10601         * server.c (main): After the inferior having exited, call
10602         remote_close before exiting gdbserver.
10603
10604 2009-03-25  Thiago Jung Bauermann  <bauerman@br.ibm.com>
10605
10606         Fix size of FPSCR in Power 7 processors.
10607         * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
10608         (PPC_FEATURE_HAS_DFP): New #define.
10609         (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
10610         size of the FPSCR.
10611
10612 2009-03-23  Pedro Alves  <pedro@codesourcery.com>
10613
10614         * server.c (handle_query) Whitespace and formatting.
10615
10616 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
10617
10618         * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10619         linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10620         linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10621         linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10622         regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10623         thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10624         Makefile.in, configure.ac: Fix whitespace throughout.
10625         * configure: Regenerate.
10626
10627 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
10628
10629         * inferiors.c (find_inferior): Make it safe for the callback
10630         function to delete the currently iterated inferior.
10631
10632 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
10633
10634         * Makefile.in (linuw_low_h): Move higher.
10635         (thread-db.o): Depend on $(linux_low_h).
10636
10637 2009-03-17  Pedro Alves  <pedro@codesourcery.com>
10638
10639         Rename "process" to "lwp" throughout.
10640
10641         * linux-low.c (all_processes): Rename to...
10642         (all_lwps): ... this.
10643         (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10644         (add_process): Rename to ...
10645         (add_lwp): ... this.  Adjust.
10646         (linux_create_inferior): Adjust.
10647         (linux_attach_lwp): Adjust.
10648         (linux_attach): Adjust.
10649         (linux_kill_one_process): Rename to ...
10650         (linux_kill_one_lwp): ... this.  Adjust.
10651         (linux_kill): Adjust.
10652         (linux_detach_one_process): Rename to ...
10653         (linux_detach_one_lwp): ... this.  Adjust.
10654         (linux_detach): Adjust.
10655         (check_removed_breakpoint): Adjust.
10656         (status_pending_p): Adjust.
10657         (linux_wait_for_process): Rename to ...
10658         (linux_wait_for_lwp): ... this.  Adjust.
10659         (linux_wait_for_event): Adjust.
10660         (send_sigstop): Adjust.
10661         (wait_for_sigstop): Adjust.
10662         (stop_all_processes): Rename to ...
10663         (stop_all_lwps): ... this.
10664         (linux_resume_one_process): Rename to ...
10665         (linux_resume_one_lwp): ... this.  Adjust.
10666         (linux_set_resume_request, linux_continue_one_thread)
10667         (linux_queue_one_thread, resume_status_pending_p)
10668         (usr_store_inferior_registers, regsets_store_inferior_registers)
10669         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10670         Adjust.
10671         * linux-low.h (get_process): Rename to ...
10672         (get_lwp): ... this.  Adjust.
10673         (get_thread_process): Rename to ...
10674         (get_thread_lwp): ... this.  Adjust.
10675         (get_process_thread): Rename to ...
10676         (get_lwp_thread): ... this.  Adjust.
10677         (struct process_info): Rename to ...
10678         (struct lwp_info): ... this.
10679         (all_processes): Rename to ...
10680         (all_lwps): ... this.
10681         * proc-service.c (ps_lgetregs): Adjust.
10682         * thread-db.c (thread_db_create_event, find_one_thread)
10683         (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10684
10685 2009-03-14  Pedro Alves  <pedro@codesourcery.com>
10686
10687         * server.c (handle_query): Handle "qAttached".
10688
10689 2009-03-13  Nathan Sidwell  <nathan@codesourcery.com>
10690
10691         * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10692         GPLv3, update license URL.
10693
10694 2009-03-01  Doug Evans  <dje@google.com>
10695
10696         * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
10697         (server_h): Add gdb_signals.h.
10698         (signals.o): Update.
10699         * server.h (target_signal_from_host,target_signal_to_host_p)
10700         (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10701
10702 2009-02-14  Pierre Muller  <muller@ics.u-strasbg.fr>
10703
10704         * remote-utils.c (getpkt): Also generate remote-debug
10705         information if noack_mode is set.
10706
10707 2009-02-06  Pedro Alves  <pedro@codesourcery.com>
10708
10709         * server.c (handle_query): Report qXfer:siginfo:read and
10710         qXfer:siginfo:write as supported and handle them.
10711         * target.h (struct target_ops) <qxfer_siginfo>: New field.
10712         * linux-low.c (linux_xfer_siginfo): New.
10713         (linux_target_ops): Set it.
10714
10715 2009-01-26  Pedro Alves  <pedro@codesourcery.com>
10716
10717         * server.c (gdbserver_usage): Mention --remote-debug.
10718         (main): Accept '--remote-debug' switch.
10719
10720 2009-01-18  Doug Evans  <dje@google.com>
10721
10722         * regcache.c (new_register_cache): No need to check result of xcalloc.
10723         * server.c (handle_search_memory): Back out calls to xmalloc,
10724         result is checked and error is returned to user upon failure.
10725         (handle_query): Ditto.  Add more checks for result of malloc.
10726         (handle_v_cont): Check result of malloc, report error back to
10727         user upon failure.
10728         (handle_v_run): Ditto.  Call freeargv.
10729         * server.h (freeargv): Declare.
10730         * utils.c (freeargv): New fn.
10731
10732 2009-01-15  Doug Evans  <dje@google.com>
10733
10734         * gdbreplay.c (perror_with_name): Make arg const char *.
10735         * server.h (target_signal_to_name): Make return type const char *.
10736         * thread-db.c (thread_db_err_str): Make return type const char *.
10737         * utils.c (perror_with_name): Make arg const char *.
10738
10739 2009-01-14  Pedro Alves  <pedro@codesourcery.com>
10740
10741         * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10742         when handling a EXIT_PROCESS_DEBUG_EVENT.
10743
10744 2009-01-06  Joel Brobecker  <brobecker@adacore.com>
10745
10746         * gdbreplay.c (gdbreplay_version): Update copyright year.
10747         * server.c (gdbserver_version): Likewise.
10748
10749 2009-01-05  Doug Evans  <dje@google.com>
10750
10751         * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
10752         (handle_extended_wait): Improve comment.
10753
10754 2008-12-13  Doug Evans  <dje@google.com>
10755
10756         * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10757         * server.h (ATTR_MALLOC): New macro.
10758         (xmalloc,xcalloc,xstrdup): Declare.
10759         * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10760         * inferiors.c: Ditto.
10761         * linux-low.c: Ditto.
10762         * mem-break.c: Ditto.
10763         * regcache.c: Ditto.
10764         * remote-utils.c: Ditto.
10765         * server.c: Ditto.
10766         * target.c: Ditto.
10767         * win32-low.c: Ditto.
10768
10769 2008-12-12  Doug Evans  <dje@google.com>
10770
10771         * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10772         in debugging printf.
10773
10774         * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10775
10776 2008-12-09  Doug Evans  <dje@google.com>
10777
10778         * linux-low.h (struct process_info): Delete member tid, unused.
10779         * thread-db.c (find_one_thread): Update.
10780         (maybe_attach_thread): Update.
10781
10782 2008-12-02  Pedro Alves  <pedro@codesourcery.com>
10783
10784         * target.h (struct target_ops): Add qxfer_osdata member.
10785         * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10786         and dirent.h.
10787         (linux_qxfer_osdata): New functions.
10788         (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10789         callback.
10790         * server.c (handle_query): Handle "qXfer:osdata:read:".
10791         * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10792         (buffer_xml_printf): New functions.
10793         * server.h (struct buffer): New.
10794         (buffer_grow_str, buffer_grow_str0): New macros.
10795         (buffer_grow, buffer_free, buffer_init, buffer_finish)
10796         (buffer_xml_printf): Declare.
10797
10798 2008-11-24  Doug Evans  <dje@google.com>
10799
10800         * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10801
10802 2008-11-24  Daniel Jacobowitz  <dan@codesourcery.com>
10803
10804         * server.c (handle_v_run): Always use the supplied argument list.
10805
10806 2008-11-19  Bob Wilson  <bob.wilson@acm.org>
10807
10808         * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10809         (xtensa_regmap_table): Add entry for scompare1.
10810
10811 2008-11-18  Thiago Jung Bauermann  <bauerman@br.ibm.com>
10812
10813         * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10814         powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10815         powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10816         powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10817         powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10818         powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10819         * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10820         XML target descriptions.
10821         * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10822         when inferior is running on an ISA 2.05 or later processor.  Add
10823         special case to return offset for full 64-bit slot of FPSCR when
10824         in 32-bits.
10825
10826 2008-11-14  Daniel Gutson  <dgutson@codesourcery.com>
10827
10828         * Makefile.in (SFILES, clean): Added sparc64 files.
10829         (reg-sparc64.o, reg-sparc64.c): New.
10830         * configure.srv (sparc*-*-linux*): New configuration.
10831         * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10832         syscall arguments for SPARC.
10833         (regsets_store_inferior_registers): Likewise.
10834         * linux-sparc-low.c: New file.
10835
10836 2008-10-21  Doug Evans  <dje@google.com>
10837
10838         * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10839         (READLINE_DIR,READLINE_DEP): Delete.
10840         (INTERNAL_CFLAGS): Update.
10841         (LINTFLAGS): Update.
10842
10843 2008-10-10  Pedro Alves  <pedro@codesourcery.com>
10844
10845         * server.c (handle_v_run): If GDB didn't specify an argv, use the
10846         whole argv from the last run, not just argv[0].
10847
10848 2008-09-08  Pedro Alves  <pedro@codesourcery.com>
10849
10850         * regcache.c (new_register_cache): Return NULL if the register
10851         cache size isn't known yet.
10852         (free_register_cache): Avoid dereferencing a NULL regcache.
10853
10854 2008-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
10855
10856         * configure.srv: Merge MIPS and MIPS64.
10857
10858 2008-08-24  Maciej W. Rozycki  <macro@linux-mips.org>
10859
10860         * Makefile.in (uninstall): Apply $(EXEEXT) too.
10861
10862 2008-08-18  Luis Machado  <luisgpm@br.ibm.com>
10863
10864         * Makefile.in: Add required vsx dependencies.
10865
10866         * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10867         Declare init_registers_powerpc_vsx32l.
10868         Declare init_registers_powerpc_vsx64l.
10869         Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10870         (ppc_arch_setup): Check for VSX in hwcap.
10871         (ppc_fill_vsxregset): New function.
10872         (ppc_store_vsxregset): New function.
10873         Add new VSX entry in regset_info target_regsets.
10874
10875         * configure.srv: Add new VSX dependencies.
10876
10877 2008-08-12  Pedro Alves  <pedro@codesourcery.com>
10878
10879         * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10880         (remote_open): Set or clear transport_is_reliable.
10881         (putpkt_binary): Don't expect acks in noack mode.
10882         (getpkt): Don't send ack/nac in noack mode.
10883         * server.c (handle_general_set): Handle QStartNoAckMode.
10884         (handle_query): If connected by tcp pass QStartNoAckMode+ in
10885         qSupported.
10886         (main): Reset noack_mode on every connection.
10887         * server.h (noack_mode): Declare.
10888
10889 2008-08-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10890
10891         * Makefile.in (GDBREPLAY_OBS): New variable.
10892         (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10893
10894 2008-08-05  Ulrich Weigand  <uweigand@de.ibm.com>
10895             Daniel Jacobowitz  <dan@codesourcery.com>
10896
10897         * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10898         (usr_store_inferior_registers): Likewise.
10899         (regsets_store_inferior_registers): Likewise.
10900
10901 2008-07-31  Rolf Jansen  <rj@surtec.com>
10902             Pedro Alves  <pedro@codesourcery.com>
10903
10904         * configure.ac: Check for memmem declaration.
10905         * server.c [HAVE_MALLOC_H]: Include malloc.h.
10906         (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10907         (disable_packet_qfThreadInfo): Unconditionally compile.
10908         * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10909         * configure, config.in: Regenerate.
10910
10911 2008-07-28  Doug Kwan  <dougkwan@google.com>
10912
10913         * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10914         (linux_write_memory): Remove declaration of errno.
10915
10916 2008-07-12  Ulrich Weigand  <uweigand@de.ibm.com>
10917
10918         * linux-low.c (handle_extended_wait): Do not use "status"
10919         variable uninitialized.
10920
10921 2008-07-07  Pedro Alves  <pedro@codesourcery.com>
10922
10923         * server.c (handle_v_attach): Inhibit reporting dll changes.
10924
10925 2008-06-27  Pedro Alves  <pedro@codesourcery.com>
10926
10927         * remote-utils.c (prepare_resume_reply): If requested, don't
10928         output "thread:TID" in the T stop reply.
10929
10930         * server.c (disable_packet_vCont, disable_packet_Tthread)
10931         (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10932         (handle_query): If requested, disable support for qC, qfThreadInfo
10933         and qsThreadInfo.
10934         (handle_v_requests): If requested, disable support for vCont.
10935         (gdbserver_show_disableable): New.
10936         (main): Handle --disable-packet and --disable-packet=LIST.
10937
10938         * server.h (disable_packet_vCont, disable_packet_Tthread)
10939         (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10940
10941 2008-06-20  Carlos O'Donell  <carlos@codesourcery.com>
10942
10943         * server.c (gdbserver_usage): Mention --version.
10944
10945 2008-06-06  Daniel Jacobowitz  <dan@codesourcery.com>
10946
10947         * Makefile.in (gdbreplay.o): New rule.
10948
10949 2008-06-06  Joseph Myers  <joseph@codesourcery.com>
10950
10951         * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10952         message, not gdbserver.
10953
10954 2008-06-05  Vladimir Prus  <vladimir@codesourcery.com>
10955             Nathan Sidwell  <nathan@codesourcery.com>
10956             Joseph Myers  <joseph@codesourcery.com>
10957
10958         * acinclude.m4: Include ../../config/acx.m4.
10959         * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10960         * configure, config.in: Regenerate.
10961         * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10962         * server.c (gdbserver_version): Print PKGVERSION.
10963         (gdbsrever_usage): Add stream parameter.  Print REPORT_BUGS_TO.
10964         (main): Adjust gdbserver_usage calls.
10965         * gdbreplay.c (version, host_name): Add declarations.
10966         (gdbreplay_version, gdbreplay_usage): New.
10967         (main): Accept --version and --help options.
10968
10969 2008-06-04  Daniel Jacobowitz  <dan@codesourcery.com>
10970
10971         * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10972         (arm_breakpoint_at): Handle Thumb.
10973         (the_low_target): Add comment.
10974
10975 2008-05-29  Ulrich Weigand  <uweigand@de.ibm.com>
10976
10977         * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10978
10979 2008-05-09  Doug Evans  <dje@google.com>
10980
10981         * server.h (decode_search_memory_packet): Declare.
10982         * remote-utils.c (decode_search_memory_packet): New fn.
10983         * server.c (handle_search_memory_1): New fn.
10984         (handle_search_memory): New fn.
10985         (handle_query): Process qSearch:memory packets.
10986
10987 2008-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
10988
10989         * regcache.c (registers_length): Remove.
10990         (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10991         full register packet.
10992         * regcache.h (registers_length): Remove prototype.
10993         * server.h (PBUFSIZ): Define to 16384.
10994
10995 2008-05-03  Ulrich Weigand  <uweigand@de.ibm.com>
10996
10997         * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10998         powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10999         powerpc-64l.o, and powerpc-altivec64l.o.
11000         Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
11001         rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
11002         rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
11003         rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
11004         rs6000/power-linux.xml, and rs6000/power64-linux.xml
11005         to srv_xmlfiles.
11006
11007         * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
11008         (powerpc-32l.o, powerpc-32l.c): ... these new rules.
11009         (powerpc-32.o, powerpc-32.c): Remove, replace by ...
11010         (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
11011         (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
11012         (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
11013         (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
11014         (powerpc-64l.o, powerpc-64l.c): ... these new rules.
11015         (powerpc-64.o, powerpc-64.c): Remove, replace by ...
11016         (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
11017         (clean): Update.
11018
11019         * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
11020         (init_registers_powerpc_32l): ... this new prototype.
11021         (init_registers_powerpc_32): Remove, replace by ...
11022         (init_registers_powerpc_altivec32l): ... this new prototype.
11023         (init_registers_powerpc_e500): Remove, replace by ...
11024         (init_registers_powerpc_e500l): ... this new prototype.
11025         (init_registers_ppc64): Remove, replace by ...
11026         (init_registers_powerpc_64l): ... this new prototype.
11027         (init_registers_powerpc_64): Remove, replace by ...
11028         (init_registers_powerpc_altivec64l): ... this new prototype.
11029         (ppc_num_regs): Set to 73.
11030         (PT_ORIG_R3, PT_TRAP): Define if necessary.
11031         (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
11032         (ppc_cannot_store_register): Handle orig_r3 and trap.
11033         (ppc_arch_setup): Update init_registers_... calls.
11034         (ppc_fill_gregset): Handle orig_r3 and trap.
11035
11036         * inferiors.c (clear_inferiors): Reset current_inferior.
11037
11038 2008-04-23  Paolo Bonzini  <bonzini@gnu.org>
11039
11040         * acinclude.m4: Add override.m4.
11041         * configure: Regenerate.
11042
11043 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
11044
11045         * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
11046         initial call to init_register_ppc64.
11047
11048 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
11049
11050         * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
11051         single powerpc*-*-linux* case.
11052         (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
11053
11054 2008-04-17  Ulrich Weigand  <uweigand@de.ibm.com>
11055
11056         * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
11057         srv_regobj.  Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
11058         from reg_xmlfiles.
11059         * linux-ppc-low.c: Include <elf.h>.
11060         (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
11061         (ppc_hwcap): New global variable.
11062         (ppc_regmap): Remove __SPE__ #ifdef sections.
11063         (ppc_regmap_e500): New global variable.
11064         (ppc_cannot_store_register): Update __SPE__ special case.
11065         (ppc_get_hwcap): New function.
11066         (ppc_arch_setup): Use it to determine whether inferior supports
11067         AltiVec or SPE registers.  Set the_low_target.regmap if appropriate.
11068         (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
11069         Do not access registers if target does not support AltiVec.
11070         (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
11071         Do not access registers if target does not support SPE.
11072         (target_regsets): Unconditionally include AltiVec and SPE regsets.
11073
11074 2008-04-17  Daniel Jacobowitz  <dan@codesourcery.com>
11075
11076         * linux-low.c (disabled_regsets, num_regsets): New.
11077         (use_regsets_p): Delete.
11078         (linux_wait_for_process): Clear disabled_regsets.
11079         (regsets_fetch_inferior_registers): Check and set it.
11080         (regsets_store_inferior_registers): Likewise.
11081         (linux_fetch_registers, linux_store_registers): Do not use
11082         use_regsets_p.
11083         (initialize_low): Allocate disabled_regsets.
11084
11085 2008-04-14  Daniel Jacobowitz  <dan@codesourcery.com>
11086
11087         * Makefile.in (LIBOBJS): New.
11088         (OBS): Use LIBOBJS.
11089         (memmem.o): New rule.
11090         * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
11091         * configure: Regenerated.
11092
11093 2008-04-04  Ulrich Weigand  <uweigand@de.ibm.com>
11094
11095         * server.c (handle_query): Never return "unsupported" for
11096         qXfer:features:read queries.
11097
11098 2008-03-27  Ulrich Weigand  <uweigand@de.ibm.com>
11099
11100         * server.c (get_features_xml): Fix inverted condition.
11101         (handle_query): Always support qXfer:feature:read.
11102
11103 2008-03-10  Daniel Jacobowitz  <dan@codesourcery.com>
11104
11105         * server.c (wrapper_argv): New.
11106         (start_inferior): Handle wrapper_argv.  If set, expect an extra
11107         trap.
11108         (gdbserver_usage): Document --wrapper.
11109         (main): Parse --wrapper.
11110
11111 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
11112
11113         * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
11114         powerpc-*-linux* to srv_regobj and reg_xmlfiles.
11115         * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
11116         (ppc_set_pc): Likewise.
11117         (ppc_arch_setup): New function.
11118         (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
11119         of collect_register.
11120         (the_low_target): Use ppc_arch_setup as arch_setup initializer.
11121
11122 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
11123
11124         * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
11125         instead of linux-ppc64-low.o.
11126         * linux-ppc64-low.c: Remove file.
11127         * Makefile.in (SFILES): Remove linux-ppc64-low.c.
11128         (linux-ppc64-low.o): Remove rule.
11129
11130         * linux-ppc-low.c (init_registers_ppc64): Add prototype.
11131         (init_registers_powerpc_64): Likewise.
11132         (ppc_regmap): Conditionally define depending on __powerpc64__.
11133         (ppc_cannot_store_register): Do not special-case "fpscr" when
11134         compiled on __powerpc64__.
11135         (ppc_collect_ptrace_register): New function.
11136         (ppc_supply_ptrace_register): New function.
11137         (ppc_breakpoint): Change type to "unsigned int".
11138         (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
11139         (the_low_target): Conditionally provide initializers for the
11140         arch_setup member depending on __powerpc64__.  Install
11141         collect_ptrace_register and supply_ptrace_register members.
11142
11143 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
11144
11145         * regcache.h (gdbserver_xmltarget): Add extern declaration.
11146         * server.c (gdbserver_xmltarget): Define.
11147         (get_features_xml): Use it to replace "target.xml" and arch_string.
11148
11149         * configure.srv: Remove srv_xmltarget.  Add XML files that were
11150         mentioned there to srv_xmlfiles instead.  Remove conditional tests
11151         on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
11152         srv_xmlfiles and srv_regobj to include all possible choices.
11153         * configure.ac (srv_xmltarget): Remove.
11154         (srv_xmlfiles): Do not add "target.xml".
11155         (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
11156         checks for supplementary target information.
11157         * configure: Regenerate.
11158         * Makefile.in (XML_TARGET): Remove.
11159         (target.xml): Remove rule.
11160         (clean): Do not clean up target.xml.
11161         (.PRECIOUS): Do not mention target.xml.
11162
11163         * target.h (struct target_ops): Remove arch_string member.
11164         * linux-low.c (linux_arch_string): Remove.
11165         (linux_target_ops): Remove arch_string initializer.
11166         * linux-low.h (struct linux_target_ops): Remove arch_string member.
11167         * linux-i386-low.c (the_low_target): Remove arch_string initializer.
11168         * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
11169         * spu-low.c (spu_arch_string): Remove.
11170         (spu_target_ops): Remove arch_string initializer.
11171         * win32-low.c (win32_arch_string): Remove.
11172         (win32_target_ops): Remove arch_string initializer.
11173         * win32-low.h (struct win32_target_ops): Remove arch_string member.
11174         * win32-arm-low.c (the_low_target): Remove arch_string initializer.
11175         * win32-i368-low.c (the_low_target): Remove arch_string initializer.
11176
11177 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
11178
11179         * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
11180         by collect_ptrace_register and supply_ptrace_register hooks.
11181         * linux-low.c (fetch_register): Use supply_ptrace_register callback
11182         instead of checking for the_low_target.left_pad_xfer.
11183         (usr_store_inferior_registers): Use collect_ptrace_register callback
11184         instead of checking for the_low_target.left_pad_xfer.
11185
11186         * linux-s390-low.c (s390_collect_ptrace_register): New function.
11187         (s390_supply_ptrace_register): Likewise.
11188         (s390_fill_gregset): Call s390_collect_ptrace_register.
11189         (the_low_target): Update.
11190
11191         * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
11192         (ppc_supply_ptrace_register): Likewise.
11193         (the_low_target): Update.
11194
11195         * linux-i386-low.c (the_low_target): Update.
11196         * linux-x86-64-low.c (the_low_target): Update.
11197
11198 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
11199
11200         * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
11201         reg-s390.o and reg-s390x.o.
11202
11203         * linux-low.c (new_inferior): New global variable.
11204         (linux_create_inferior, linux_attach): Set it.
11205         (linux_wait_for_process): Call the_low_target.arch_setup after the
11206         target has stopped for the first time.
11207         (initialize_low): Do not call the_low_target.arch_setup.
11208
11209         * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
11210         (s390_set_pc): Likewise.
11211         (s390_arch_setup): New function.
11212         (the_low_target): Use s390_arch_setup as arch_setup routine.
11213
11214         * regcache.c (realloc_register_cache): New function.
11215         (set_register_cache): Call it for each existing regcache.
11216
11217 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
11218
11219         * server.h (init_registers): Remove prototype.
11220
11221         * linux-low.h (struct linux_target_ops): Add arch_setup field.
11222         * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
11223         instead of init_registers ().
11224         * linux-arm-low.c (init_registers_arm): Add prototype.
11225         (init_registers_arm_with_iwmmxt): Likewise.
11226         (the_low_target): Add initializer for arch_setup field.
11227         * linux-cris-low.c (init_registers_cris): Add prototype.
11228         (the_low_target): Add initializer for arch_setup field.
11229         * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
11230         (the_low_target): Add initializer for arch_setup field.
11231         * linux-i386-low.c (init_registers_i386_linux): Add prototype.
11232         (the_low_target): Add initializer for arch_setup field.
11233         * linux-ia64-low.c (init_registers_ia64): Add prototype.
11234         (the_low_target): Add initializer for arch_setup field.
11235         * linux-m32r-low.c (init_registers_m32r): Add prototype.
11236         (the_low_target): Add initializer for arch_setup field.
11237         * linux-m68k-low.c (init_registers_m68k): Add prototype.
11238         (the_low_target): Add initializer for arch_setup field.
11239         * linux-mips-low.c (init_registers_mips_linux): Add prototype.
11240         (init_registers_mips64_linux): Likewise.
11241         (the_low_target): Add initializer for arch_setup field.
11242         * linux-ppc-low.c (init_registers_ppc): Add prototype.
11243         (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
11244         (the_low_target): Add initializer for arch_setup field.
11245         * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
11246         (init_registers_powerpc_64): Likewise.
11247         (the_low_target): Add initializer for arch_setup field.
11248         * linux-s390-low.c (init_registers_s390): Add prototype.
11249         (init_registers_s390x): Likewise.
11250         (the_low_target): Add initializer for arch_setup field.
11251         * linux-sh-low.c (init_registers_sh): Add prototype.
11252         (the_low_target): Add initializer for arch_setup field.
11253         * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
11254         (the_low_target): Add initializer for arch_setup field.
11255         * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
11256         (the_low_target): Add initializer for arch_setup field.
11257
11258         * win32-low.h (struct win32_target_ops): Add arch_setup field.
11259         * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
11260         instead of init_registers ().
11261         * win32-arm-low.c (init_registers_arm): Add prototype.
11262         (the_low_target): Add initializer for arch_setup field.
11263         * win32-i386-low.c (init_registers_i386): Add prototype.
11264         (the_low_target): Add initializer for arch_setup field.
11265
11266         * spu-low.c (init_registers_spu): Add prototype.
11267         (initialize_low): Call initialie_registers_spu () instead of
11268         initialize_registers ().
11269
11270 2008-02-19  Pedro Alves  <pedro@codesourcery.com>
11271
11272         * server.c (handle_v_requests): When handling the vRun and vAttach
11273         packets, if already debugging a process, don't kill it.  Return an
11274         error instead.
11275
11276 2008-02-17  Daniel Jacobowitz  <dan@codesourcery.com>
11277
11278         * server.c (handle_query): Correct length check.
11279
11280 2008-02-14  Pedro Alves  <pedro_alves@portugalmail.pt>
11281
11282         * win32-low.c (do_initial_child_stuff): Add process handle
11283         parameter.  Set current_process_handle and current_process_id from the
11284         parameters. Clear globals.
11285         (win32_create_inferior): Don't set current_process_handle and
11286         current_process_id here.  Instead pass them on the call to
11287         do_initial_child_stuff.
11288         (win32_attach): Likewise.
11289         (win32_clear_inferiors): New.
11290         (win32_kill): Don't close the current process handle or the
11291         current thread handle here.  Instead call win32_clear_inferiors.
11292         (win32_detach): Don't open a new handle to the process.  Call
11293         win32_clear_inferiors.
11294         (win32_join): Don't rely on current_process_handle; open a new
11295         handle using the process id.
11296         (win32_wait): Call win32_clear_inferiors when the inferior process
11297         has exited.
11298
11299 2008-02-14  Daniel Jacobowitz  <dan@codesourcery.com>
11300
11301         * server.c (monitor_show_help): Add "exit".
11302
11303 2008-02-11  Maxim Grigoriev  <maxim2405@gmail.com>
11304
11305         * Makefile.in (SFILES): Add linux-xtensa-low.c.
11306         (clean): Add reg-xtensa.c.
11307         (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
11308         * configure.srv (xtensa*-*-linux*) New target.
11309         * linux-xtensa-low.c: New.
11310         * xtensa-xtregs.c: New.
11311
11312 2008-02-01  Pedro Alves  <pedro_alves@portugalmail.pt>
11313
11314         * hostio.c: Don't include errno.h.
11315         (errno_to_fileio_errno): Move to hostio-errno.
11316         * hostio.c: (hostio_error): Remove the error parameter.  Defer the
11317         error number outputting to the target->hostio_last_error callback.
11318         (hostio_packet_error): Use FILEIO_EINVAL directly.
11319         (handle_open, handle_pread, hostio_error, handle_unlink): Update
11320         calls to hostio_error.
11321         * hostio-errno.c: New.
11322         * server.h (hostio_last_error_from_errno): Declare.
11323         * target.h (target_ops): Add hostio_last_error member.
11324         * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
11325         as hostio_last_error handler.
11326         * spu-low.c (spu_target_ops): Likewise.
11327         * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
11328         (wince_hostio_last_error): New functions.
11329         (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
11330         as hostio_last_error handler.
11331         (win32_target_ops) [!_WIN32_WCE]: Register
11332         hostio_last_error_from_errno as hostio_last_error handler.
11333         * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
11334         (hostio-errno.o): New rule.
11335         * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
11336         * configure.srv (srv_hostio_err_objs): New variable.  Default to
11337         hostio-errno.o.
11338         (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
11339         * configure: Regenerate.
11340
11341 2008-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
11342
11343         * linux-low.c (linux_attach_lwp): Do not _exit after errors.
11344         (linux_kill, linux_detach): Clean up the process list.
11345         * remote-utils.c (remote_open): Improve port number parsing.
11346         (putpkt_binary, input_interrupt): Only send interrupts if the target
11347         is running.
11348         * server.c (extended_protocol): Make static.
11349         (attached): Define earlier.
11350         (exit_requested, response_needed, program_argv): New variables.
11351         (target_running): New.
11352         (start_inferior): Clear attached here.
11353         (attach_inferior): Set attached here.
11354         (require_running): Define.
11355         (handle_query): Use require_running and target_running.  Implement
11356         "monitor exit".
11357         (handle_v_attach, handle_v_run): New.
11358         (handle_v_requests): Use require_running.  Handle vAttach and vRun.
11359         (gdbserver_usage): Update.
11360         (main): Redo argument parsing.  Handle --debug and --multi.  Handle
11361         --attach along with other options or after the port.  Save
11362         program_argv.  Support no initial program.  Resynchronize
11363         communication with GDB after an error.  Handle "monitor exit".
11364         Use require_running and target_running.  Always allow the extended
11365         protocol.  Do not error out for Hc0 or Hc-1.  Do not automatically
11366         restart in extended mode.
11367         * README: Refer to the GDB manual.  Update --attach usage.
11368
11369 2007-12-20  Andreas Schwab  <schwab@suse.de>
11370
11371         * linux-low.c (STACK_SIZE): Define.
11372         (linux_tracefork_child): Use it.  Use __clone2 on ia64.
11373         (linux_test_for_tracefork): Likewise.
11374
11375 2007-12-18  Daniel Jacobowitz  <dan@codesourcery.com>
11376
11377         * linux-low.c (linux_wait_for_event): Update messages.  Do not
11378         reinsert auto-delete breakpoints.
11379         * mem-break.c (struct breakpoint): Change return type of handler to
11380         int.
11381         (set_breakpoint_at): Update handler type.
11382         (reinsert_breakpoint_handler): Return 1 instead of calling
11383         delete_breakpoint.
11384         (reinsert_breakpoint_by_bp): Check for the original breakpoint before
11385         setting a new one.
11386         (check_breakpoints): Delete auto-delete breakpoints and return 2.
11387         * mem-break.h (set_breakpoint_at): Update handler type.
11388         * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
11389         * win32-low.c (auto_delete_breakpoint): New.
11390         (get_child_debug_event): Use it.
11391
11392 2007-12-16  Daniel Jacobowitz  <dan@codesourcery.com>
11393
11394         * configure.ac: Check for pread and pwrite.
11395         * hostio.c (handle_pread): Fall back to lseek and read.
11396         (handle_pwrite): Fall back to lseek and write.
11397         * config.in, configure: Regenerated.
11398
11399 2007-12-07  Daniel Jacobowitz  <dan@codesourcery.com>
11400
11401         * server.c (myresume): Add own_buf argument.
11402         (main): Update calls.
11403
11404 2007-12-06  Daniel Jacobowitz  <dan@codesourcery.com>
11405
11406         * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
11407         * remote-utils.c (remote_open): Do not call disable_async_io.
11408         (block_async_io): Delete.
11409         (unblock_async_io): Make static.
11410         (initialize_async_io): New.
11411         * server.c (handle_v_cont): Handle async I/O here.
11412         (myresume): Likewise.  Move other common resume tasks here...
11413         (main): ... from here.  Call initialize_async_io.  Disable async
11414         I/O before the main loop.
11415         * server.h (initialize_async_io): Declare.
11416         (block_async_io, unblock_async_io): Delete prototypes.
11417         * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
11418
11419 2007-12-06  Mick Davis  <mickd@goanna.iinet.net.au>
11420
11421         * remote-utils.c (readchar): Allow binary data in received messages.
11422
11423 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11424
11425         * win32-low.c (attaching): New global.
11426         (win32_create_inferior): Clear the `attaching' global.
11427         (win32_attach): Set the `attaching' global.
11428         (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
11429         attaching.  Only set a breakpoint at the entry point if not
11430         attaching.
11431
11432 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11433
11434         * server.c (main): Don't report dll events on the initial
11435         connection on attaches.
11436
11437 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11438
11439         * server.c (main): Relax numerical bases supported for the pid of
11440         the --attach command line argument.
11441
11442 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11443
11444         * win32-low.c (win32_attach): Call OpenProcess before
11445         DebugActiveProcess, not after.  Add last error output to error
11446         call.
11447
11448 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11449
11450         * win32-low.c (win32_get_thread_context)
11451         (win32_set_thread_context): New functions.
11452         (thread_rec): Use win32_get_thread_context.
11453         (continue_one_thread, win32_resume): Use win32_set_thread_context.
11454         * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
11455         field.
11456
11457 2007-12-03  Leo Zayas
11458             Pedro Alves  <pedro_alves@portugalmail.pt>
11459
11460         * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
11461         global variables.
11462         (child_add_thread): Minor cleanup.
11463         (child_continue): Resume artificially suspended threads before
11464         calling ContinueDebugEvent.
11465         (suspend_one_thread): New.
11466         (fake_breakpoint_event): New.
11467         (get_child_debug_event): Change return type to int.  Check here if
11468         gdb sent an interrupt request.  If a soft interrupt was requested,
11469         fake a breakpoint event.  Return 0 if there is no event to handle,
11470         and 1 otherwise.
11471         (win32_wait): Don't check here if gdb sent an interrupt request.
11472         Ensure there is a valid event to handle.
11473         (win32_request_interrupt): Add soft interruption method as last
11474         resort.
11475
11476 2007-12-03  Leo Zayas
11477             Pedro Alves  <pedro_alves@portugalmail.pt>
11478
11479         * win32-low.h (win32_thread_info): Add descriptions to the
11480         structure members.  Replace `suspend_count' counter by a
11481         `suspended' flag.
11482         * win32-low.c (thread_rec): Update condition of when to get the
11483         context from the inferior.  Rely on ContextFlags being set if it
11484         has already been retrieved.  Only suspend the inferior thread if
11485         we haven't already.  Warn if that fails.
11486         (continue_one_thread): s/suspend_count/suspended/.  Only call
11487         ResumeThread once.  Warn if that fails.
11488
11489 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
11490
11491         * win32-low.c (win32_wait): Don't read from the inferior when it
11492         has already exited.
11493
11494 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
11495
11496         * Makefile.in (win32_low_h): New variable.
11497         (win32-low.o): Add dependency on $(win32_low_h).
11498         (win32-arm-low.o, win32-i386-low.o): New rules.
11499
11500 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
11501
11502         * hostio.c: Correct copyright year.
11503
11504 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
11505
11506         * Makefile.in (OBS): Add hostio.o.
11507         (hostio.o): New rule.
11508         * server.h (handle_vFile): Declare.
11509         * hostio.c: New file.
11510         * server.c (handle_v_requests): Take packet_len and new_packet_len
11511         for binary packets.  Call handle_vFile.
11512         (main): Update call to handle_v_requests.
11513
11514 2007-11-05  Daniel Jacobowitz  <dan@codesourcery.com>
11515
11516         * linux-low.c: Include <sched.h>.
11517
11518 2007-11-01  Daniel Jacobowitz  <dan@codesourcery.com>
11519
11520         * linux-low.c (linux_tracefork_grandchild): New.
11521         (linux_tracefork_child): Use clone.
11522         (linux_test_for_tracefork): Use clone; allocate and free a stack.
11523
11524 2007-10-31  Joel Brobecker  <brobecker@adacore.com>
11525
11526         * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
11527
11528 2007-10-24  Daniel Jacobowitz  <dan@codesourcery.com>
11529
11530         * linux-low.c (handle_extended_wait): Handle unexpected signals.
11531
11532 2007-10-23  Daniel Jacobowitz  <dan@codesourcery.com>
11533
11534         * inferiors.c (change_inferior_id): Delete.
11535         (add_pid_to_list, pull_pid_from_list): New.
11536         * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
11537         (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
11538         (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
11539         (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
11540         (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
11541         (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
11542         (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
11543         (using_threads): Always set to 1.
11544         (handle_extended_wait): New.
11545         (add_process): Do not set TID.
11546         (linux_create_inferior): Set must_set_ptrace_flags.
11547         (linux_attach_lwp): Remove TID argument.  Do not check using_threads.
11548         Use PTRACE_SETOPTIONS.  Call new_thread_notify.  Update all callers.
11549         (linux_thread_alive): Rename TID argument to LWPID.
11550         (linux_wait_for_process): Handle unknown processes.  Do not use TID.
11551         (linux_wait_for_event): Do not use TID or check using_threads.  Update
11552         call to dead_thread_notify.  Call handle_extended_wait.
11553         (linux_create_inferior): Use PTRACE_SETOPTIONS.
11554         (send_sigstop): Delete sigstop_sent.
11555         (wait_for_sigstop): Avoid TID.
11556         (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
11557         (linux_test_for_tracefork): New.
11558         (linux_lookup_signals): Use thread_db_active and
11559         linux_supports_tracefork_flag.
11560         (initialize_low): Use thread_db_active and linux_test_for_tracefork.
11561         * linux-low.h (get_process_thread): Avoid TID.
11562         (struct process_ifo): Move thread_known and tid to the end.  Remove
11563         sigstop_sent.
11564         (linux_attach_lwp, thread_db_init): Update prototypes.
11565         * server.h (change_inferior_id): Delete prototype.
11566         (add_pid_to_list, pull_pid_from_list): New prototypes.
11567         * thread-db.c (thread_db_use_events): New.
11568         (find_first_thread): Rename to...
11569         (find_one_thread): ...this.  Update callers and messages.  Do not
11570         call fatal.  Check thread_db_use_events.  Do not call
11571         change_inferior_id or new_thread_notify.
11572         (maybe_attach_thread): Update.  Do not call new_thread_notify.
11573         (thread_db_init): Set thread_db_use_events.  Check use_events.
11574         * utils.c (fatal, warning): Correct message prefix.
11575
11576 2007-10-15  Daniel Jacobowitz  <dan@codesourcery.com>
11577
11578         * Makefile.in (clean): Remove new files.
11579         (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
11580         (powerpc-64.o, powerpc-64.c): New rules.
11581         * configure.srv: Use alternate register sets for powerpc64-*-linux*
11582         with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
11583         with SPE.
11584         * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
11585         SPE targets.
11586         (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
11587         (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
11588         (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
11589         (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
11590         (target_regsets): Add AltiVec and SPE register sets.
11591         * configure.ac: Check for AltiVec and SPE.
11592         * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
11593         (ppc_fill_vrregset, ppc_store_vrregset): New.
11594         (target_regsets): Add AltiVec register set.
11595         * configure: Regenerated.
11596
11597 2007-09-19  Daniel Jacobowitz  <dan@codesourcery.com>
11598
11599         * linux-low.c (O_LARGEFILE): Define.
11600         (linux_read_memory): Use /proc/PID/mem.
11601         * configure.ac: Use AC_GNU_SOURCE.  Check for pread64.
11602         * configure, config.in: Regenerated.
11603
11604 2007-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
11605
11606         * linux-low.c (linux_wait_for_event): Do not pass signals while
11607         single-stepping.
11608
11609 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11610
11611         * win32-low.c (create_process): New.
11612         (win32_create_inferior): Use create_process instead of
11613         CreateProcess.  If create_process failed retry appending an ".exe"
11614         suffix.  Store the GetLastError result immediatelly after
11615         create_process calls and use it on the call to error.
11616
11617 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11618
11619         * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11620
11621 2007-08-23  Joel Brobecker  <brobecker@adacore.com>
11622
11623         * configure.ac: Switch license to GPLv3.
11624
11625 2007-08-01  Michael Snyder  <msnyder@access-company.com>
11626
11627         * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11628
11629 2007-07-31  Pedro Alves  <pedro_alves@portugalmail.pt>
11630
11631         * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11632         typedef.
11633         (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11634         (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL.  Get
11635         CloseToolhelp32Snapshot.
11636         (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11637         CloseToolhelp32Snapshot.
11638
11639 2007-07-27  Michael Snyder  <michael.snyder@access-company.com>
11640
11641         * server.c (main): Check for inferior exit before main loop.
11642
11643 2007-07-18  Pedro Alves  <pedro_alves@portugalmail.pt>
11644
11645         * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11646         instead of on tmp_desc.
11647
11648 2007-07-17  Pedro Alves  <pedro_alves@portugalmail.pt>
11649             Daniel Jacobowitz  <dan@codesourcery.com>
11650
11651         * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11652         (add_thread): Minor cleanups.
11653         (clear_inferiors): Move lower in the file.  Clear the DLL
11654         list.
11655         (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11656         * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11657         (xml_escape_text): New.
11658         * server.c (handle_query): Handle qXfer:libraries:read.  Report it
11659         for qSupported.
11660         (handle_v_cont): Report errors.
11661         (gdbserver_version): Update.
11662         (main): Correct size of own_buf.  Do not report initial DLL events.
11663         * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11664         (unloaded_dll, xml_escape_text): New.
11665         * win32-low.c (enum target_waitkind): Update comments.
11666         (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11667         (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11668         (win32_EnumProcessModules, win32_GetModuleInformation)
11669         (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11670         (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11671         (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11672         (win32_Module32First, win32_Module32Next, load_toolhelp)
11673         (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11674         (get_child_debug_event): Handle DLL events.
11675         (win32_wait): Likewise.
11676
11677 2007-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
11678
11679         * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11680         * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11681
11682 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
11683
11684         * win32-low.c (handle_output_debug_string): Ignore event if not
11685         waiting.
11686
11687 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
11688
11689         * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11690
11691 2007-07-03  Daniel Jacobowitz  <dan@codesourcery.com>
11692
11693         * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11694
11695 2007-07-02  Daniel Jacobowitz  <dan@codesourcery.com>
11696
11697         * inferiors.c (change_inferior_id): Add comment.
11698         * linux-low.c (check_removed_breakpoint): Add an early
11699         prototype.  Improve debug output.
11700         (linux_attach): Doc update.
11701         (linux_detach_one_process, linux_detach): Clean up before releasing
11702         each process.
11703         (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11704         * linux-low.h (struct process_info): Doc improvement.
11705         * mem-break.c (delete_all_breakpoints): New.
11706         * mem-break.h (delete_all_breakpoints): New prototype.
11707         * thread-db.c (find_first_thread): New.
11708         (thread_db_create_event): Call it instead of
11709         thread_db_find_new_threads.  Clean up unused variables.
11710         (maybe_attach_thread): Remove first thread handling.
11711         (thread_db_find_new_threads): Use find_first_thread.
11712         (thread_db_get_tls_address): Likewise.
11713
11714 2007-06-27  Daniel Jacobowitz  <dan@codesourcery.com>
11715
11716         * thread-db.c (thread_db_find_new_threads): Add prototype.
11717         (thread_db_create_event): Check for the main thread before adding
11718         a new thread.
11719         (maybe_attach_thread): Only enable event reporting if TID == 0.
11720         (thread_db_get_tls_address): Check for new threads.
11721
11722 2007-06-20  Daniel Jacobowitz  <dan@codesourcery.com>
11723
11724         * linux-low.c (linux_create_inferior): Try execv before execvp.
11725         * spu-low.c (spu_create_inferior): Likewise.
11726
11727 2007-06-13  Mike Frysinger  <vapier@gentoo.org>
11728
11729         * linux-low.c (linux_create_inferior): Change execv to execvp.
11730         * spu-low.c (spu_create_inferior): Likewies.
11731
11732 2007-06-13  Daniel Jacobowitz  <dan@codesourcery.com>
11733
11734         * Makefile.in (clean): Clean new files instead of deleted ones.
11735         (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11736         (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11737         rules.
11738         * configure.srv: Specify XML files and new regformats for MIPS and
11739         MIPS64 GNU/Linux.
11740         * linux-mips-low.c (mips_num_regs): Set to only used registers.
11741         (mips_regmap): Do not fetch $0.  Remove unused registers.  Add
11742         an entry for the restart register.
11743         (mips_cannot_fetch_register, mips_cannot_store_register)
11744         (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11745         register names to match the XML descriptions.
11746         (mips_fill_gregset, mips_store_gregset): Likewise.  Handle the
11747         restart register instead of $0.
11748
11749 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
11750             Markus Deuling  <deuling@de.ibm.com>
11751
11752         * remote-utils.c (decode_xfer_write): New function.
11753         * server.h (decode_xfer_write): Add prototype.
11754         * server.c (handle_query): Add PACKET_LEN argument.  Support
11755         qXfer:spu:read and qXfer:spu:write packets.
11756         (main): Pass packet_len to handle_query.
11757         * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11758         * target.h (target_ops): Add qxfer_spu.
11759
11760 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
11761
11762         * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11763         accessing non-seekable spufs files.
11764
11765 2007-05-16  Markus Deuling  <deuling@de.ibm.com>
11766
11767         * server.c (handle_query): Add reply for qC packet.
11768
11769 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
11770             Leo Zayas  <lerele@champenstudios@com>
11771
11772         * server.h (check_remote_input_interrupt_request): New function.
11773         * remote_utils.c (INVALID_DESCRIPTOR): New define.
11774         (remote_desc): Initialize with INVALID_DESCRIPTOR.
11775         (input_interrupt): Expose on USE_WIN32API too.  Fix whitespace.
11776         (check_remote_input_interrupt_request): New function.
11777         * server.h (check_remote_input_interrupt_request): Declare.
11778         * win32-low.c (winapi_DebugBreakProcess,
11779         winapi_GenerateConsoleCtrlEvent): New typedefs.
11780         (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11781         to 250 ms.
11782         (win32_wait): Check for remote interrupt request
11783         with check_remote_input_interrupt_request.
11784         (win32_request_interrupt): New function.
11785         (win32_target_op): Set request_interrupt to win32_request_interrupt.
11786
11787 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
11788
11789         * win32-low.c (debug_registers_changed,
11790         debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11791         CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11792         CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11793         (thread_rec): Get context using the low target.
11794         (child_add_thread): Call thread_added on the low target,
11795         which does the same thing.
11796         (regptr): Delete.
11797         (do_initial_child_stuff): Remove debug registers references.
11798         Set context using the low target.  Resume threads after
11799         setting the contexts.
11800         (child_continue): Remove dead variable.  Remove debug
11801         registers references.
11802         (child_fetch_inferior_registers): Go through the low target.
11803         (do_child_store_inferior_registers): Remove.
11804         (child_store_inferior_registers): Go through the low target.
11805         (win32_resume): Remove debug registers references.
11806         Set context using the low target.
11807         (handle_exception): Change return type to void.  Don't record
11808         context here.  Set status to TARGET_WAITKIND_SPURIOUS on a
11809         first chance exception.
11810         (get_child_debug_event): Change return type to void.  Remove
11811         goto loop.  Always return after waiting for debug event.
11812         (win32_wait): Convert to switch statement.  Handle spurious
11813         events.
11814
11815         * win32-i386-low.c (debug_registers_changed,
11816         debug_registers_used): New.
11817         (initial_stuff): Rename to ...
11818         (i386_initial_stuff): ... this.  Clear debug registers
11819         state variables.
11820         (store_debug_registers): Delete.
11821         (i386_get_thread_context): New.
11822         (load_debug_registers): Delete.
11823         (i386_set_thread_context): New.
11824         (i386_thread_added): New.
11825         (single_step): Rename to ...
11826         (i386_single_step): ... this.
11827         (do_fetch_inferior_registers): Rename to ...
11828         (i386_fetch_inferior_register): ... this.
11829         (i386_store_inferior_register): New.
11830         (the_low_target): Adapt to new interface.
11831
11832         * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11833         (arm_get_thread_context): New.
11834         (arm_set_thread_context): New.
11835         (regptr): New.
11836         (do_fetch_inferior_registers): Rename to ...
11837         (arm_fetch_inferior_register): ... this.
11838         (arm_store_inferior_register): New.
11839         (arm_wince_breakpoint): Reimplement as unsigned long.
11840         (arm_wince_breakpoint_len): Define.
11841         (the_low_target): Adapt to new interface.
11842
11843         * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11844         load_debug_registers.  Add get_thread_context, set_thread_context,
11845         thread_added and store_inferior_register.  Rename
11846         fetch_inferior_registers to fetch_inferior_register.
11847         (regptr): Remove declaration.
11848
11849 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
11850
11851         * linux-low.c (linux_detach): Change return type to int.  Return 0.
11852         * spu-low.c (spu_detach): Likewise.
11853
11854 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
11855
11856         * target.h (target_ops): Change return type of detach to int.
11857         Add join.
11858         (join_inferior): New.
11859         * server.c (main): Don't skip detach support on mingw32.
11860         If the inferior doesn't support detaching return error.
11861         Call join_inferior instead of using waitpid.
11862         * linux-low.c (linux_join): New.
11863         (linux_target_op): Add linux_join.
11864         * spu-low.c (spu_join): New.
11865         (spu_target_ops): Add spu_join.
11866         * win32-low.c (win32_detach): Adapt to new interface.
11867         Reopen current_process_handle before detaching.  Issue a child
11868         resume before detaching.
11869         (win32_join): New.
11870         (win32_target_op): Add win32_join.
11871
11872 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
11873
11874         * win32-low.c (win32-attach): Fix return value.
11875         * target.h (target_ops): Describe ATTACH return values.
11876
11877 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
11878
11879         * win32-low.c (GETPROCADDRESS): Define.
11880         (winapi_DebugActiveProcessStop): Add WINAPI.  typedef as pointer.
11881         (winapi_DebugSetProcessKillOnExit): Likewise.
11882         (win32_create_inferior): Force usage of ansi CreateProcessA.
11883         (win32_attach): Use GETPROCADDRESS.
11884         (win32_detach): Likewise.
11885
11886 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
11887
11888         * win32-low.c (win32_wait): Don't use WSTOPSIG.
11889
11890 2007-03-30  Pedro Alves  <pedro_alves@portugalmail.pt>
11891
11892         * win32-low.c: Commit leftover changes from 2007-03-29.
11893
11894 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
11895
11896         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11897         fields short instead of int.  Add explicit padding.
11898         (i387_cache_to_fsave): Remove unnecessary casts.
11899         (i387_fsave_to_cache): Doc fix.
11900         (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11901
11902 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
11903
11904         * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11905         (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11906
11907 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
11908
11909         * configure.srv (arm*-*-mingw32ce*): Move near the other
11910         arm targets.
11911
11912 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
11913
11914         * configure.ac: Add errno checking.
11915         (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11916         sys/file.h and malloc.h.
11917         (AC_CHECK_DECLS): Add perror.
11918         (srv_mingwce): Handle.
11919         * configure.srv (i[34567]86-*-cygwin*): Add
11920         win32-i386-low.o to srv_tgtobj.
11921         (i[34567]86-*-mingw*): Likewise.
11922         (arm*-*-mingw32ce*): Add case.
11923         * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11924         HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11925         [__MINGW32CE__] (strerror): New function.
11926         [__MINGW32CE__] (errno): Define to GetLastError.
11927         [__MINGW32CE__] (COUNTOF): New macro.
11928         (remote_open): Remove extra close call.
11929         * mem-break.c (delete_breakpoint_at): New function.
11930         * mem-break.h (delete_breakpoint_at): Declare.
11931         * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11932         HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11933         [USE_WIN32API] (read, write): Add char* casts.
11934         * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11935         * server.h: Include wincecompat.h on Windows CE.
11936         [HAVE_ERRNO_H]: Check.
11937         (perror): Declare if not declared.
11938         * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11939         (perror_with_name): Remove errno declaration.
11940         * wincecompat.h: New.
11941         * wincecompat.c: New.
11942         * win32-low.h: New.
11943         * win32-arm-low.c: New.
11944         * win32-i386-low.c: New.
11945         (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11946         (OUTMSG2): Make it safe.
11947         (_T): New macro.
11948         (COUNTOF): New macro.
11949         (NUM_REGS): Get it from the low target.
11950         (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11951         CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11952         (thread_rec): Let low target handle debug registers.
11953         (child_add_thread): Likewise.
11954         (child_init_thread_list): Likewise.
11955         (continue_one_thread): Likewise.
11956         (regptr): New.
11957         (do_child_fetch_inferior_registers): Move to ...
11958         * win32-i386-low.c: ... here, and rename to ...
11959         (do_fetch_inferior_registers): ... this.
11960         * win32-low.c (child_fetch_inferior_registers):
11961         Go through the low target.
11962         (do_child_store_inferior_registers): Use regptr.
11963         (strwinerror): New function.
11964         (win32_create_inferior): Handle Windows CE.
11965         Use strwinerror instead of strerror on Windows error
11966         codes.  Add program to the error output.
11967         Don't close the main thread handle on Windows CE.
11968         (win32_attach): Use coredll.dll on Windows CE.
11969         (win32_kill): Close current process and current
11970         thread handles.
11971         (win32_detach): Use coredll.dll on Windows CE.
11972         (win32_resume): Let low target handle debug registers, and
11973         step request.
11974         (handle_exception): Add/Remove initial breakpoint.  Avoid
11975         non-existant WSTOPSIG on Windows CE.
11976         (win32_read_inferior_memory): Cast to remove warning.
11977         (win32_arch_string): Go through the low target.
11978         (initialize_low): Call set_breakpoint_data with the low
11979         target's breakpoint.
11980         * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11981         FOP_REGNUM, mappings): Move to ...
11982         * win32-i386-low.c: ... here.
11983         * win32-low.c (win32_thread_info): Move to ...
11984         * win32-low.h: ... here.
11985         * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11986         win32-arm-low.c and wincecompat.c.
11987         (all:): Add $EXEEXT.
11988         (install-only:): Likewise.
11989         (gdbserver:): Likewise.
11990         (gdbreplay:): Likewise.
11991         * config.in: Regenerate.
11992         * configure: Regenerate.
11993
11994 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
11995
11996         * win32-low.c: Rename typedef thread_info to
11997         win32_thread_info throughout.
11998
11999 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
12000
12001         * win32-i386-low.c: Rename to ...
12002         * win32-low.c: ... this.
12003         * configure.srv: Replace win32-i386-low.o with win32-low.o.
12004         * Makefile.in: Likewise.
12005
12006 2007-03-27  Pedro Alves  <pedro_alves@portugalmail.pt>
12007
12008         * remote-utils.c (monitor_output): Constify msg parameter.
12009         * server.h (monitor_output): Likewise.
12010         * win32-i386-low.c (handle_output_debug_string): New.
12011         (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
12012         handle_output_debug_string.
12013         (get_child_debug_event): Likewise.
12014
12015 2007-03-27  Mat Hostetter  <mat@lcs.mit.edu>
12016
12017         * server.c (main): Correct strtoul check.
12018
12019 2007-03-27  Jon Ringle  <jon@ringle.org>
12020
12021         * linux-low.c: Check __ARCH_HAS_MMU__ also.
12022
12023 2007-03-27  Brooks Moses  <brooks.moses@codesourcery.com>
12024
12025         * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
12026
12027 2007-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
12028
12029         * terminal.h: Check HAVE_SGTTY_H.
12030
12031 2007-02-27  Mat Hostetter  <mat@lcs.mit.edu>
12032
12033         * remote-utils.c (remote_open): Print out the assigned port number.
12034
12035 2007-02-26  Daniel Jacobowitz  <dan@codesourcery.com>
12036
12037         * remote-utils.c (monitor_output): New function.
12038         * server.c (debug_threads): Define here.
12039         (monitor_show_help): New function.
12040         (handle_query): Handle qRcmd.
12041         (main): Do not handle 'd' packet.
12042         * server.h (debug_threads, remote_debug, monitor_output): Declare.
12043         * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
12044         of debug_threads.
12045
12046 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
12047
12048         * Makefile.in (EXEEXT): New.
12049         (clean): Use $(EXEEXT).
12050
12051 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
12052
12053         * target.h (target_ops): Rename send_signal to request_interrupt,
12054         and remove enum target_signal parameter.
12055         * linux-low.c (linux_request_interrupt): Rename from
12056         linux_send_signal, and always send SIGINT.
12057         * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
12058         and always send SIGINT.
12059         * remote-utils.c (putpkt_binary): Call request_interrupt, instead
12060         of send_signal.
12061         (input_interrupt): Likewise.
12062
12063 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
12064
12065         * server.c (get_features_xml): Check if target implemented
12066         arch_string.
12067         * win32-i386-low.c (win32_arch_string): New.
12068         (win32_target_ops): Add win32_arch_string as arch_string member.
12069
12070 2007-02-22  Markus Deuling  <deuling@de.ibm.com>
12071
12072         * spu-low.c (spu_arch_string): New.
12073         (spu_target_ops): Add spu_arch_string.
12074
12075 2007-02-16  Daniel Jacobowitz  <dan@codesourcery.com>
12076
12077         * remote-utils.c: Remove HAVE_TERMINAL_H check.
12078         * configure.ac: Do not check for terminal.h.
12079         * configure, config.in: Regenerated.
12080
12081 2007-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
12082
12083         * Makefile.in (OBS): Add $(XML_BUILTIN).
12084         (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
12085         (clean): Update.
12086         (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
12087         (arm-with-iwmmxt.c): New.
12088         * config.in, configure: Regenerate.
12089         * configure.ac: Check for iWMMXt.  Handle srv_xmltarget,
12090         srv_xmlbuiltin, and srv_xmlfiles.  Define USE_XML.
12091         * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
12092         (arm*-*-linux*): Add iWMMXt and regset support.
12093         * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
12094         (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
12095         (arm_store_wmmxregset, target_regsets): New.
12096         * server.c (get_features_xml): Take annex argument.  Check builtin
12097         XML documents.
12098         (handle_query): Handle multiple annexes.
12099
12100 2007-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
12101
12102         * remote-utils.c [USE_WIN32API] (read, write): Define.
12103         (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
12104         write.
12105
12106 2007-01-09  Daniel Jacobowitz  <dan@codesourcery.com>
12107
12108         * linux-i386-low.c (the_low_target): Set arch_string.
12109         * linux-x86-64-low.c (the_low_target): Likewise.
12110         * linux-low.c (linux_arch_string): New.
12111         (linux_target_ops): Add it.
12112         * linux-low.h (struct linux_target_ops): Add arch_string.
12113         * server.c (write_qxfer_response): Use const void * for DATA.
12114         (get_features_xml): New.
12115         (handle_query): Handle qXfer:features:read.  Report it for qSupported.
12116         * target.h (struct target_ops): Add arch_string method.
12117
12118 2007-01-03  Denis Pilat  <denis.pilat@st.com>
12119             Daniel Jacobowitz  <dan@codesourcery.com>
12120
12121         * linux-low.c (linux_kill): Handle being called with no threads.
12122         * win32-i386-low.c (win32_kill): Likewise.
12123         (get_child_debug_event): Clear current_process_handle.
12124
12125 2006-12-30  Denis PILAT  <denis.pilat@st.com>
12126             Daniel Jacobowitz  <dan@codesourcery.com>
12127
12128         * remote-utils.c (remote_open): Check the type of specified
12129         serial port devices before opening them.
12130         * server.c (main): Kill the inferior if an error occurs during
12131         the first remote_open.
12132
12133 2006-12-05  Markus Deuling  <deuling@de.ibm.com>
12134
12135         * README: Update supported targets.
12136
12137 2006-11-28  Daniel Jacobowitz  <dan@codesourcery.com>
12138
12139         * Makefile.in (clean): Remove reg-mips64.c.
12140         (reg-mips64.c, reg-mips64.o): New rules.
12141         * configure.srv: Handle mips64.  Include regset support for mips.
12142         * linux-mips-low.c (union mips_register): New.
12143         (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
12144         (mips_breakpoint, mips_breakpoint_at): Use int.
12145         (mips_collect_register, mips_supply_register)
12146         (mips_collect_register_32bit, mips_supply_register_32bit)
12147         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12148         (mips_store_fpregset, target_regsets): New.
12149         * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
12150
12151 2006-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
12152
12153         * configure.srv: Add target "spu*-*-*".
12154         * Makefile.in (clean): Remove reg-spu.c.
12155         (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
12156         * spu-low.c: New file.
12157
12158 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
12159
12160         * configure.ac: Correct td_thr_tls_get_addr test.
12161         * configure: Regenerated.
12162
12163 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
12164
12165         * linux-low.c (linux_wait_for_event): Reformat.  Use the
12166         pass_signals array.
12167         * remote-utils.c (decode_address_to_semicolon): New.
12168         * server.c (pass_signals, handle_general_set): New.
12169         (handle_query): Mention QPassSignals for qSupported.
12170         (main): Call handle_general_set.
12171         * server.h (pass_signals, decode_address_to_semicolon): New.
12172
12173 2006-11-06  Daniel Jacobowitz  <dan@codesourcery.com>
12174
12175         * server.c (handle_query): Correct error handling for read_auxv.
12176
12177 2005-10-19  Ulrich Weigand  <uweigand@de.ibm.com>
12178
12179         * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
12180         and srv_linux_thread_db to yes.
12181         * linux-s390-low.c (s390_fill_gregset): New function.
12182         (target_regsets): Define data structure.
12183
12184 2006-10-17  Daniel Jacobowitz  <dan@codesourcery.com>
12185
12186         * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
12187         * configure.ac: Use it.  Define HAVE_TD_THR_TLS_GET_ADDR.
12188         * config.in, configure: Regenerated.
12189         * inferiors.c (gdb_id_to_thread): New function.
12190         (gdb_id_to_thread_id): Use it.
12191         * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
12192         * linux-low.h (struct process_info): Add th member.
12193         (thread_db_get_tls_address): New prototype.
12194         * remote-utils.c (decode_address): Make non-static.
12195         * server.c (handle_query): Handle qGetTLSAddr.
12196         * server.h (gdb_id_to_thread, decode_address): New prototypes.
12197         * target.h (struct target_ops): Add get_tls_address.
12198         * thread-db.c (maybe_attach_thread): Save the thread handle.
12199         (thread_db_get_tls_address): New.
12200
12201 2006-09-28  Daniel Jacobowitz  <dan@codesourcery.com>
12202
12203         * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
12204         (linux_resume_one_process): Take a siginfo_t *.  Update all
12205         callers.  Queue it if necessary.  Use PTRACE_SETSIGINFO.
12206         (struct pending_signals): Add a siginfo_t.
12207         (linux_wait_for_process): Always set last_status.
12208         (linux_wait_for_event): Use PTRACE_GETSIGINFO.
12209         (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
12210         * linux-low.h (struct process_info): Add last_status.
12211
12212 2006-09-21  Daniel Jacobowitz  <dan@codesourcery.com>
12213
12214         * remote-utils.c (try_rle): New function.
12215         (putpkt_binary): Use it.
12216
12217 2006-08-19  Daniel Jacobowitz  <dan@codesourcery.com>
12218
12219         * Makefile.in (clean): Clean reg-x86-64-linux.c.
12220         (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
12221         * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
12222         * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
12223         (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
12224         point registers.
12225
12226 2006-08-08  Richard Sandiford  <richard@codesourcery.com>
12227
12228         * server.c (terminal_fd): New variable.
12229         (old_foreground_pgrp): Likewise.
12230         (restore_old_foreground_pgrp): New function.
12231         (start_inferior): Record the terminal file descriptor in terminal_fd
12232         and its original foreground group in old_foreground_pgrp.  Register
12233         restore_old_foreground_pgrp with atexit().
12234
12235 2006-07-26  Daniel Jacobowitz  <dan@codesourcery.com>
12236
12237         * server.c (handle_query): Correct qPart to qXfer.
12238
12239 2006-07-22  Daniel Jacobowitz  <dan@codesourcery.com>
12240
12241         * configure.ac: Check for more headers which are missing on
12242         Windows.  Automatically supply -lwsock32 and USE_WIN32API.
12243         * configure.srv: Add Cygwin and mingw32.
12244         * remote-utils.c: Don't include headers unconditionally which
12245         are missing on mingw32.  Include <winsock.h> for mingw32.
12246         (remote_open): Adjust for mingw32 support.  Flush
12247         standard error after writing to it.
12248         (remote_close, putpkt_binary, input_interrupt, block_async_io)
12249         (unblock_async_io, enable_async_io, disable_async_io)
12250         (readchar, getpkt): Update for Winsock support.
12251         (prepare_resume_reply): Expect a protocol signal number.
12252         * server.c: Disable <sys/wait.h> on mingw32.
12253         (start_inferior): Adjust for mingw32 support.  Flush
12254         standard error after writing to it.
12255         (attach_inferior): Likewise.  Use protocol signal
12256         numbers.
12257         (main): Skip 'D' packet on mingw32.  Use protocol signal numbers
12258         and names.
12259         * win32-i386-low.c: New file.
12260         * Makefile.in (XM_CLIBS): Set.
12261         (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
12262         (win32-i386-low.o): New dependency rule.
12263         * linux-low.c (linux_wait): Use target signal numbers.
12264         * target.h (struct target_ops): Doc fix.
12265         * server.h (target_signal_to_name): New prototype.
12266         * gdbreplay.c: Don't include headers unconditionally which
12267         are missing on mingw32.  Include <winsock.h> for mingw32.
12268         (remote_close, remote_open): Adjust for Winsock support.
12269         * configure, config.in: Regenerated.
12270
12271 2006-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
12272
12273         * server.c (decode_xfer_read, write_qxfer_response): New.
12274         (handle_query): Take a packet length argument.  Handle
12275         qXfer:auxv:read instead of qPart:auxv:read.  Mention it in
12276         the qSupported response.
12277         (main): Update call to handle_query.
12278
12279 2006-06-22  Daniel Jacobowitz  <dan@codesourcery.com>
12280
12281         * remote-utils.c (remote_escape_output, remote_unescape_input): New.
12282         (putpkt_binary): Renamed from putpkt and adjusted for binary
12283         data.
12284         (putpkt): New wrapper for putpkt_binary.
12285         (readchar): Don't mask off the high bit.
12286         (decode_X_packet): New function.
12287         * server.c (main): Call putpkt_binary if a handler sets the packet
12288         length.  Save the length of the incoming packet.  Handle 'X'.
12289         * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
12290
12291 2006-06-21  Daniel Jacobowitz  <dan@codesourcery.com>
12292
12293         * server.c (handle_query): Handle qSupported.
12294
12295 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
12296
12297         * remote-utils.c (all_symbols_looked_up): New variable.
12298         (look_up_one_symbol): Check it.
12299         * server.h (look_up_one_symbol): New declaration.
12300         * thread-db.c (thread_db_init): Set all_symbols_looked_up.
12301
12302 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
12303
12304         * Makefile.in (linux-arm-low.o): Update dependencies.
12305         * linux-arm-low.c: Include "gdb_proc_service.h".
12306         (PTRACE_GET_THREAD_AREA): Define.
12307         (ps_get_thread_area): New function.
12308
12309 2006-05-09  Nathan Sidwell  <nathan@codesourcery.com>
12310
12311         * configure.srv (m68k*-*-uclinux*): New target.
12312         * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
12313         (linux_resume_one_process): Remove extraneous cast.
12314         (linux_read_offsets): New.
12315         (linux_target_op): Add linux_read_offsets on mmuless systems.
12316         * server.c (handle_query): Add qOffsets logic.
12317         * target.h (struct target_ops): Add read_offsets.
12318
12319 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
12320
12321         * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
12322         (PTRACE_GET_THREAD_AREA): Define.
12323         (ps_get_thread_area): New function.
12324         * Makefile.in (linux-i386-low.o, linux-mips-low.o)
12325         (linux-x86-64-low.o): Update.
12326
12327 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
12328
12329         * configure.ac: Remove checks for prfpregset_t.
12330         * gdb_proc_service.h: New file.
12331         * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
12332         new "gdb_proc_service.h".
12333         * proc-service.c: Likewise.
12334         (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
12335         (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
12336         * Makefile.in (gdb_proc_service_h): Updated.
12337         * configure, config.in: Regenerated.
12338
12339 2006-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
12340
12341         * remote-utils.c (prepare_resume_reply): Move declaration
12342         of gdb_id_from_wait to the top of the block.
12343
12344 2006-02-15  Daniel Jacobowitz  <dan@codesourcery.com>
12345
12346         * linux-low.c (regsets_store_inferior_registers): Read the regset
12347         from the target before filling it.
12348
12349 2006-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
12350
12351         * server.c (attach_inferior): Return SIGTRAP for a successful
12352         attach.
12353
12354 2006-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
12355
12356         * Makefile.in (OBS): Add version.o.
12357         (STAGESTUFF): Delete.
12358         (version.o): Add dependencies.
12359         (version.c): Replace rule.
12360         (clean): Remove version.c.
12361         * server.c (gdbserver_version): New.
12362         (gdbserver_usage): Use printf.
12363         (main): Handle --version and --help.
12364         * server.h (version, host_name): Add declarations.
12365
12366 2005-12-23  Eli Zaretskii  <eliz@gnu.org>
12367
12368         * linux-arm-low.c:
12369         * linux-arm-low.c:
12370         * inferiors.c:
12371         * i387-fp.h:
12372         * i387-fp.c:
12373         * gdbreplay.c:
12374         * regcache.c:
12375         * proc-service.c:
12376         * mem-break.h:
12377         * mem-break.c:
12378         * linux-x86-64-low.c:
12379         * linux-sh-low.c:
12380         * linux-s390-low.c:
12381         * linux-ppc64-low.c:
12382         * linux-ppc-low.c:
12383         * linux-mips-low.c:
12384         * linux-m68k-low.c:
12385         * linux-m32r-low.c:
12386         * linux-low.h:
12387         * linux-low.c:
12388         * linux-ia64-low.c:
12389         * linux-i386-low.c:
12390         * linux-crisv32-low.c:
12391         * thread-db.c:
12392         * terminal.h:
12393         * target.h:
12394         * target.c:
12395         * server.h:
12396         * server.c:
12397         * remote-utils.c:
12398         * regcache.h:
12399         * utils.c:
12400         * Makefile.in:
12401         * configure.ac:
12402         * gdbserver.1: Add (C) after Copyright.  Update the FSF
12403         address.
12404
12405 2005-11-13  Daniel Jacobowitz  <dan@codesourcery.com>
12406
12407         * linux-arm-low.c (arm_eabi_breakpoint): New variable.
12408         (arm_breakpoint_at): Recognize both breakpoints.
12409         (the_low_target): Use the correct breakpoint instruction.
12410
12411 2005-11-02  Daniel Jacobowitz  <dan@codesourcery.com>
12412
12413         * configure.srv (x86_64-*-linux*): Turn on thread_db support.
12414         * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
12415         (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
12416         (the_low_target): Update.
12417
12418 2005-10-25  Andreas Schwab  <schwab@suse.de>
12419
12420         * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
12421
12422         * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
12423         (ia64_num_regs): Reduce to 462.
12424
12425 2005-09-17  Daniel Jacobowitz  <dan@codesourcery.com>
12426
12427         * acinclude.m4: Correct quoting.
12428         * aclocal.m4: Regenerated.
12429
12430         Suggested by SZOKOVACS Robert <szo@ies.hu>:
12431         * thread-db.c (thread_db_err_str): Handle TD_VERSION.
12432         (thread_db_init): Call thread_db_err_str.
12433         * configure.ac: Check for TD_VERSION.
12434         * config.in, configure: Regenerated.
12435
12436 2005-07-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12437
12438         * server.h (error, fatal, warning): Add ATTR_FORMAT.
12439
12440 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
12441
12442         * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
12443         is not available.  Define HAVE_PTRACE_GETREGS if it is.
12444         * config.in, configure: Regenerated.
12445         * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
12446         * linux-i386-low.c, linux-m68k-low.c: Update to use
12447         HAVE_PTRACE_GETREGS.
12448         * linux-low.c (regsets_fetch_inferior_registers)
12449         (regsets_store_inferior_registers): Only return 0 if we processed
12450         GENERAL_REGS.
12451         * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
12452         * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
12453
12454 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
12455
12456         * inferiors.c (struct thread_info): Add gdb_id.
12457         (add_thread): Add gdb_id argument.
12458         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
12459         * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
12460         calls to add_thread.
12461         * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
12462         * server.c (handle_query): Use thread_to_gdb_id.
12463         (handle_v_cont, main): Use gdb_id_to_thread_id.
12464         * server.h (add_thread): Update prototype.
12465         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
12466         prototypes.
12467
12468 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
12469
12470         * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
12471         left-padded registers.
12472         * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
12473         * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
12474
12475 2005-07-01  Steve Ellcey  <sje@cup.hp.com>
12476
12477         * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
12478         * configure: Regenerate.
12479         * config.in: Regenerate.
12480         * server.h (NEED_DECLARATION_STRERROR):
12481         Replace with !HAVE_DECL_STRERROR.
12482
12483 2005-06-16  Daniel Jacobowitz  <dan@codesourcery.com>
12484
12485         * linux-low.c (linux_wait, linux_send_signal): Don't test
12486         an unsigned long variable for > 0 if it could be MAX_ULONG.
12487         * server.c (myresume): Likewise.
12488         * target.c (set_desired_inferior): Likewise.
12489
12490 2005-06-13  Mark Kettenis  <kettenis@gnu.org>
12491
12492         * configure.ac: Simplify and improve check for socklen_t.
12493         * configure, config.in: Regenerate.
12494
12495 2005-06-12  Daniel Jacobowitz  <dan@codesourcery.com>
12496
12497         * acconfig.h: Remove.
12498         * configure.ac: Add a test for socklen_t.  Use three-argument
12499         AC_DEFINE throughout.
12500         * config.in: Regenerated using autoheader 2.59.
12501         * configure: Regenerated.
12502
12503         * gdbreplay.c (socklen_t): Provide a default.
12504         (remote_open): Use socklen_t.
12505         * remote-utils.c (socklen_t): Provide a default.
12506         (remote_open): Use socklen_t.
12507         (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
12508         unsigned char.
12509
12510         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
12511         char for buffers.
12512         * linux-low.c (linux_read_memory, linux_write_memory)
12513         (linux_read_auxv): Likewise.
12514         * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
12515         (check_mem_write): Likewise.
12516         * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
12517         Likewise.
12518         * regcache.c (struct inferior_rgcache_data, registers_to_string)
12519         (registers_from_string, register_data): Likewise.
12520         * server.c (handle_query, main): Likewise.
12521         * server.h (convert_ascii_to_int, convert_int_to_ascii)
12522         (decode_M_packet): Likewise.
12523         * target.c (read_inferior_memory, write_inferior_memory): Likewise.
12524         * target.h (struct target_ops): Update read_memory, write_memory,
12525         and read_auxv.
12526         (read_inferior_memory, write_inferior_memory): Update.
12527         * linux-low.h (struct linux_target_ops): Change type of breakpoint
12528         to unsigned char *.
12529         * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
12530         linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
12531         linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
12532         linux-s390-low.c, linux-sh-low.c: Update for changes in
12533         read_inferior_memory and the_low_target->breakpoint.
12534
12535 2005-05-28  Daniel Jacobowitz  <dan@codesourcery.com>
12536
12537         * Makefile.in (SFILES): Add linux-ppc64-low.c.
12538         (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
12539         * configure.srv: Add powerpc64-*-linux*.
12540         * linux-ppc64-low.c: New file.
12541
12542 2005-05-23  Orjan Friberg  <orjanf@axis.com>
12543
12544         * linux-cris-low.c: New file with support for CRIS.
12545         * linux-crisv32-low.c: Ditto for CRISv32.
12546         * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
12547         (clean): Add reg-cris.c and reg-crisv32.c.
12548         Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
12549         reg-crisv32.o, and reg-crisv32.c to make rules.
12550         * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
12551         recognized targets.
12552
12553 2005-05-16  Ulrich Weigand  <uweigand@de.ibm.com>
12554
12555         * linux-low.c (fetch_register): Ensure buffer size is a multiple
12556         of sizeof (PTRACE_XFER_TYPE).
12557         (usr_store_inferior_registers): Likewise.  Zero out excess bytes.
12558
12559 2005-05-12  Orjan Friberg  <orjanf@axis.com>
12560
12561         * target.h (struct target_ops): Add insert_watchpoint,
12562         remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
12563         pointers for hardware watchpoint support.
12564         * linux-low.h (struct linux_target_ops): Ditto.
12565         * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
12566         (linux_stopped_by_watchpoint, linux_stopped_data_address): New.  Add
12567         to linux_target_ops.
12568         * remote-utils.c (prepare_resume_reply): Add watchpoint information to
12569         reply packet.
12570         * server.c (main): Recognize 'Z' and 'z' packets.
12571
12572 2005-05-10  Ulrich Weigand  <uweigand@de.ibm.com>
12573
12574         * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
12575         (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
12576         (the_low_target): Add new members.
12577
12578 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
12579
12580         * proc-service.c (ps_lgetregs): Search all_processes instead of
12581         all_threads.
12582
12583 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
12584
12585         * server.c (start_inferior): Change return type to int.
12586         (attach_inferior): Change sigptr to int *.
12587         (handle_v_cont, handle_v_requests): Change signal to int *.
12588         (main): Change signal to int.
12589
12590 2005-04-15  Kei Sakamoto  <sakamoto.kei@renesas.com>
12591
12592         * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
12593         * configure.srv: Add m32r*-*-linux*.
12594         * linux-m32r-low.c: New file.
12595
12596 2005-03-04  Daniel Jacobowitz  <dan@codesourcery.com>
12597
12598         * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
12599
12600 2005-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
12601
12602         * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
12603         Take unsigned long arguments for PIDs.
12604         * linux-low.c (add_process, linux_attach_lwp, linux_attach)
12605         (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
12606         (wait_for_sigstop, linux_resume_one_process)
12607         (regsets_fetch_inferior_registers, linux_send_signal)
12608         (linux_read_auxv): Likewise.  Update the types of variables holding
12609         PIDs.  Update format string specifiers.
12610         * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
12611         * remote-utils.c (prepare_resume_reply): Likewise.
12612         * server.c (cont_thread, general_thread, step_thread)
12613         (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
12614         unsigned long.
12615         (handle_query): Update format specifiers.
12616         (handle_v_cont, main): Use strtoul for thread IDs.
12617         * server.h (struct inferior_list_entry): Use unsigned long for ID.
12618         (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12619         (general_thread, step_thread, thread_from_wait)
12620         (old_thread_from_wait): Update.
12621         * target.h (struct thread_resume): Use unsigned long for THREAD.
12622         (struct target_ops): Use unsigned long for arguments to attach and
12623         thread_alive.
12624
12625 2005-02-24  Daniel Jacobowitz  <dan@codesourcery.com>
12626
12627         * acinclude.m4: Include bfd/bfd.m4 directly.
12628         * configure.ac: Use AC_ARG_PROGRAM.  Suggested by Aron Griffis
12629         <agriffis@toolchain.org>.
12630         * aclocal.m4, configure: Regenerated.
12631
12632 2005-01-07  Andrew Cagney  <cagney@gnu.org>
12633
12634         * configure.ac: Rename configure.in, require autoconf 2.59.
12635         * configure: Re-generate.
12636
12637 2004-12-08  Daniel Jacobowitz  <dan@debian.org>
12638
12639         * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area.  Reset
12640         LIBS when finished.
12641         * aclocal.m4: Regenerated.
12642         * configure: Regenerated.
12643
12644 2004-11-21  Andreas Schwab  <schwab@suse.de>
12645
12646         * linux-m68k-low.c (m68k_num_gregs): Define.
12647         (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12648         (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12649         (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12650         (m68k_breakpoint_at): New.  Add to the_low_target.
12651
12652         * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12653         srv_linux_thread_db to yes.
12654
12655 2004-10-20  Joel Brobecker  <brobecker@gnat.com>
12656
12657         * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12658         (ARCH_SET_FS): Likewise.
12659         (ARCH_GET_FS): Likewise.
12660         (ARCH_GET_GS): Likewise.
12661
12662 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
12663
12664         * linux-i386-low.c (ps_get_thread_area): New.
12665         * linux-x86-64-low.c (ps_get_thread_area): New.
12666         * linux-low.c: Include <sys/syscall.h>.
12667         (linux_kill_one_process): Don't kill the first thread here.
12668         (linux_kill): Kill the first thread here.
12669         (kill_lwp): New function.
12670         (send_sigstop, linux_send_signal): Use it.
12671         * proc-service.c: Clean up #ifdefs.
12672         (fpregset_info): Delete.
12673         (ps_lgetregs): Update and enable implementation.
12674         (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12675         implementations.
12676         * remote-utils.c (struct sym_cache, symbol_cache): New.
12677         (input_interrupt): Print a clearer message.
12678         (async_io_enabled): New variable.
12679         (enable_async_io, disable_async_io): Use it.  Update comments.
12680         (look_up_one_symbol): Use the symbol cache.
12681         * thread-db.c (thread_db_look_up_symbols): New function.
12682         (thread_db_init): Update comments.  Call thread_db_look_up_symbols.
12683
12684 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
12685
12686         * configure.in: Test for -rdynamic.
12687         * configure: Regenerated.
12688         * Makefile (INTERNAL_LDFLAGS): New.
12689         (gdbserver, gdbreplay): Use it.
12690
12691 2004-09-02  Andrew Cagney  <cagney@gnu.org>
12692
12693         * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12694
12695 2004-03-23  Daniel Jacobowitz  <drow@mvista.com>
12696
12697         * linux-low.c (linux_wait): Clear all_processes list also.
12698
12699 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
12700
12701         * linux-low.c: Include <errno.h>.  Remove extern declaration of
12702         errno.
12703
12704 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
12705
12706         * gdbreplay.c, server.h, utils.c: Update copyright years.
12707
12708 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
12709
12710         * server.c (main): Print child status or termination signal from
12711         variable 'signal', not 'sig'.
12712
12713 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
12714
12715         * linux-low.c (linux_read_memory): Change return type to
12716         int.  Check for and return error from ptrace().
12717         * target.c (read_inferior_memory): Change return type to int.  Pass
12718         back return status from the_target->read_memory().
12719         * target.h (struct target_ops): Adapt *read_memory() prototype.
12720         Update comment.
12721         (read_inferior_memory): Adapt prototype.
12722         * server.c (main): Return an error packet if
12723         read_inferior_memory() returns an error.
12724
12725 2004-03-04  Daniel Jacobowitz  <drow@mvista.com>
12726
12727         * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12728         Unify with other clean targets.
12729
12730 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
12731
12732         * server.c (handle_v_cont): Call set_desired_inferior.
12733
12734 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
12735
12736         * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12737
12738 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
12739
12740         * linux-low.c (linux_wait): Unblock async I/O.
12741         (linux_resume): Block and enable async I/O.
12742         * remote-utils.c (block_async_io, unblock_async_io): New functions.
12743         * server.h (block_async_io, unblock_async_io): Add prototypes.
12744
12745 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
12746
12747         * remote-utils.c (remote_open): Print a status notice after
12748         opening a TCP port.
12749         * server.c (attach_inferior): Print a status notice after
12750         attaching.
12751
12752 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
12753
12754         * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12755
12756 2004-02-26  Daniel Jacobowitz  <drow@mvista.com>
12757
12758         * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12759         error packet.
12760         * server.c, target.h: Update copyright years.
12761
12762 2004-02-25  Roland McGrath  <roland@redhat.com>
12763
12764         * target.h (struct target_ops): New member `read_auxv'.
12765         * server.c (handle_query): Handle qPart:auxv:read: query using that.
12766         * linux-low.c (linux_read_auxv): New function.
12767         (linux_target_ops): Initialize `read_auxv' member to that.
12768
12769 2004-02-17  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12770
12771         Committed by Jim Blandy  <jimb@redhat.com>.
12772
12773         * linux-s390-low.c (s390_num_regs): Update.
12774         (s390_regmap): Remove control registers.  Use __s390x__ predefine
12775         instead of GPR_SIZE to distiguish s390 and s390x targets.
12776
12777 2004-01-31  Daniel Jacobowitz  <drow@mvista.com>
12778
12779         * linux-low.c: Update copyright year.
12780         (check_removed_breakpoint): Clear pending_is_breakpoint.
12781         (linux_set_resume_request, linux_queue_one_thread)
12782         (resume_status_pending_p): New functions.
12783         (linux_continue_one_thread): Use process->resume.
12784         (linux_resume): Only resume threads if there are no pending events.
12785         * linux-low.h (struct process_info): Add resume request
12786         pointer.
12787
12788 2004-01-30  Daniel Jacobowitz  <drow@mvista.com>
12789
12790         * regcache.c (new_register_cache): Clear the allocated register
12791         buffer.  Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12792
12793 2003-10-13  Daniel Jacobowitz  <drow@mvista.com>
12794
12795         * linux-low.c (linux_resume): Take a struct thread_resume *
12796         argument.
12797         (linux_wait): Update call.
12798         (resume_ptr): New static variable.
12799         (linux_continue_one_thread): Renamed from
12800         linux_continue_one_process.  Use resume_ptr.
12801         (linux_resume): Use linux_continue_one_thread.
12802         * server.c (handle_v_cont, handle_v_requests): New functions.
12803         (myresume): New function.
12804         (main): Handle 'v' case.
12805         * target.h (struct thread_resume): New type.
12806         (struct target_ops): Change argument of "resume" to struct
12807         thread_resume *.
12808         (myresume): Delete macro.
12809
12810 2003-08-08  H.J. Lu  <hongjiu.lu@intel.com>
12811
12812         * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12813         (uninstall): Support DESTDIR.
12814
12815 Mon Jul 21 20:09:34 UTC 2003  Brendan Conoboy  <blc@redhat.com>
12816
12817         * configure.srv: Add xscale*linux copy of arm*linux entry.
12818
12819 2003-07-24  Daniel Jacobowitz  <drow@mvista.com>
12820
12821         * linux-arm-low.c (arm_reinsert_addr): New function.
12822         (the_low_target): Add arm_reinsert_addr.
12823
12824 2003-07-08  Mark Kettenis  <kettenis@gnu.org>
12825
12826         * mem-break.c: Remove whitespace at end of file.
12827
12828 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
12829
12830         * configure.in: Check whether we need to prototype strerror.
12831         * server.h: Optionally prototype strerror.
12832         * gdbreplay.c (perror_with_name): Use strerror.
12833         * linux-low.c (linux_attach_lwp): Use strerror.
12834         * utils.c (perror_with_name): Use strerror.
12835         * config.in, configure: Regenerated.
12836
12837 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
12838
12839         * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12840         SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12841
12842 2003-06-20  Daniel Jacobowitz  <drow@mvista.com>
12843
12844         * Makefile.in (SFILES): Update.
12845         * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12846         low-sun3.c: Remove files.
12847
12848 2003-06-17  Daniel Jacobowitz  <drow@mvista.com>
12849
12850         * linux-low.c: Move comment to linux_thread_alive where it belonged.
12851         (linux_detach_one_process, linux_detach): New functions.
12852         (linux_target_ops): Add linux_detach.
12853         * server.c (main): Handle 'D' packet.
12854         * target.h (struct target_ops): Add "detach" member.
12855         (detach_inferior): Define.
12856
12857 2003-06-13  Mark Kettenis  <kettenis@gnu.org>
12858
12859         From Kelley Cook  <kelleycook@wideopenwest.com>:
12860         * configure.srv: Accept i[34567]86 variants.
12861
12862 2003-06-05  Daniel Jacobowitz  <drow@mvista.com>
12863
12864         * linux-low.c (linux_wait_for_event): Correct comment typos.
12865         (linux_resume_one_process): Call check_removed_breakpoint.
12866         (linux_send_signal): New function.
12867         (linux_target_ops): Add linux_send_signal.
12868         * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12869         of kill.
12870         * target.h (struct target_ops): Add send_signal.
12871
12872 2003-05-29  Jim Blandy  <jimb@redhat.com>
12873
12874         * linux-low.c (usr_store_inferior_registers): Transfer buf in
12875         PTRACE_XFER_TYPE-sized chunks, not int-sized chunks.  Otherwise,
12876         if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12877         away part of the register's value.
12878
12879 2003-03-26  Daniel Jacobowitz  <drow@mvista.com>
12880
12881         * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12882         (linux_wait_for_event, linux_init_signals): Likewise.
12883
12884 2003-03-17  Daniel Jacobowitz  <drow@mvista.com>
12885
12886         * configure.in: Check for stdlib.h.
12887         * configure: Regenerated.
12888         * config.in: Regenerated.
12889
12890 2003-01-04  Andreas Schwab  <schwab@suse.de>
12891
12892         * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12893
12894 2003-01-02  Andrew Cagney  <ac131313@redhat.com>
12895
12896         * Makefile.in: Remove obsolete code.
12897
12898 2002-11-20  Daniel Jacobowitz  <drow@mvista.com>
12899
12900         * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12901         defined(PT_FPR0_HI).
12902
12903 2002-11-17  Stuart Hughes  <seh@zee2.com>
12904
12905         * linux-arm-low.c (arm_num_regs): Increase.
12906         (arm_regmap): Include status register.
12907
12908 2002-11-17  Daniel Jacobowitz  <drow@mvista.com>
12909
12910         * linux-low.c (register_addr): Remove incorrect -1 check.
12911
12912 2002-08-29  Daniel Jacobowitz  <drow@mvista.com>
12913
12914         * linux-low.c (linux_create_inferior): Call setpgid.  Return
12915         the new PID.
12916         (unstopped_p, linux_signal_pid): Remove.
12917         (linux_target_ops): Remove linux_signal_pid.
12918         * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12919         global instead of target method.
12920         * target.h (struct target_ops): Remove signal_pid.  Update comment
12921         for create_inferior.
12922         * server.c (signal_pid): New variable.
12923         (create_inferior): Set signal_pid.  Block SIGTTOU and SIGTTIN in
12924         gdbserver.  Set the child to be the foreground process group.
12925         (attach_inferior): Set signal_pid.
12926
12927 2002-08-23  Daniel Jacobowitz  <drow@mvista.com>
12928
12929         * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12930
12931 2002-08-20  Jim Blandy  <jimb@redhat.com>
12932
12933         * Makefile.in (LDFLAGS): Allow the configure script to establish a
12934         default for this.
12935
12936 2002-08-01  Andrew Cagney  <cagney@redhat.com>
12937
12938         * Makefile.in: Make chill references obsolete.
12939
12940 2002-07-24  Kevin Buettner  <kevinb@redhat.com>
12941
12942         * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12943         * configure: Regenerate.
12944         * config.in: Regenerate.
12945
12946 2002-07-09  David O'Brien  <obrien@FreeBSD.org>
12947
12948         * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12949         (perror_with_name, remote_close, remote_open, expect, play): Static.
12950
12951 2002-07-04  Michal Ludvig  <mludvig@suse.cz>
12952
12953         * linux-x86-64-low.c (x86_64_regmap): Make it an array of
12954         byte offsets instead of an array of indexes.
12955         (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12956
12957 2002-06-13  Daniel Jacobowitz  <drow@mvista.com>
12958
12959         * regcache.c: Add comment.
12960
12961 2002-06-11  Daniel Jacobowitz  <drow@mvista.com>
12962
12963         * thread-db.c: New file.
12964         * proc-service.c: New file.
12965         * acinclude.m4: New file.
12966         * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12967         proc-service.o, and thread-db.o.
12968         (linux-low.o): Add USE_THREAD_DB.
12969         * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12970         HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12971         * aclocal.m4: Regenerated.
12972         * config.in: Regenerated.
12973         * configure: Regenerated.
12974         * configure.in: Check for proc_service.h, sys/procfs.h,
12975         thread_db.h, and linux/elf.h headrs.
12976         Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12977         PRFPREGSET_T_BROKEN.  Introduce srv_thread_depfiles and USE_THREAD_DB.
12978         Check for -lthread_db and thread support.
12979         * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12980         PowerPC, and SuperH.
12981         * i387-fp.c: Constify arguments.
12982         * i387-fp.h: Likewise.
12983         * inferiors.c: (struct thread_info): Renamed from
12984         `struct inferior_info'.  Remove PID member.  Use generic inferior
12985         list header.  All uses updated.
12986         (inferiors, signal_pid): Removed.
12987         (all_threads): New variable.
12988         (get_thread): Define.
12989         (add_inferior_to_list): New function.
12990         (for_each_inferior): New function.
12991         (change_inferior_id): New function.
12992         (add_inferior): Removed.
12993         (remove_inferior): New function.
12994         (add_thread): New function.
12995         (free_one_thread): New function.
12996         (remove_thread): New function.
12997         (clear_inferiors): Use for_each_inferior and free_one_thread.
12998         (find_inferior): New function.
12999         (find_inferior_id): New function.
13000         (inferior_target_data): Update argument type.
13001         (set_inferior_target_data): Likewise.
13002         (inferior_regcache_data): Likewise.
13003         (set_inferior_regcache_data): Likewise.
13004         * linux-low.c (linux_bp_reinsert): Remove.
13005         (all_processes, stopping_threads, using_thrads)
13006         (struct pending_signals, debug_threads, pid_of): New.
13007         (inferior_pid): Replace with macro.
13008         (struct inferior_linux_data): Remove.
13009         (get_stop_pc, add_process): New functions.
13010         (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
13011         Use add_process and add_thread.
13012         (linux_attach_lwp): New function, based on old linux_attach.  Use
13013         add_process and add_thread.  Set stop_expected for new threads.
13014         (linux_attach): New function.
13015         (linux_kill_one_process): New function.
13016         (linux_kill): Kill all LWPs.
13017         (linux_thread_alive): Use find_inferior_id.
13018         (check_removed_breakpoints, status_pending_p): New functions.
13019         (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
13020         Update.  Use WNOHANG.  Wait for cloned processes also.  Update process
13021         struct for the found process.
13022         (linux_wait_for_event): New function.
13023         (linux_wait): Use it.  Support LWPs.
13024         (send_sigstop, wait_for_sigstop, stop_all_processes)
13025         (linux_resume_one_process, linux_continue_one_process): New functions.
13026         (linux_resume): Support LWPs.
13027         (REGISTER_RAW_SIZE): Remove.
13028         (fetch_register): Use register_size instead.  Call supply_register.
13029         (usr_store_inferior_registers): Likewise.  Call collect_register.
13030         Fix recursive case.
13031         (regsets_fetch_inferior_registers): Improve error message.
13032         (regsets_store_inferior_registers): Add debugging.
13033         (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
13034         (unstopped_p, linux_signal_pid): New functions.
13035         (linux_target_ops): Add linux_signal_pid.
13036         (linux_init_signals): New function.
13037         (initialize_low): Call it.  Initialize using_threads.
13038         * regcache.c (inferior_regcache_data): Add valid
13039         flag.
13040         (get_regcache): Fetch registers lazily.  Add fetch argument
13041         and update all callers.
13042         (regcache_invalidate_one, regcache_invalidate): New
13043         functions.
13044         (new_register_cache): Renamed from create_register_cache.
13045         Return the new regcache.
13046         (free_register_cache): Change argument to a void *.
13047         (registers_to_string, registers_from_string): Call get_regcache
13048         with fetch flag set.
13049         (register_data): Make static.  Pass fetch flag to get_regcache.
13050         (supply_register): Call get_regcache with fetch flag clear.
13051         (collect_register): Call get_regcache with fetch flag set.
13052         (collect_register_as_string): New function.
13053         * regcache.h: Update.
13054         * remote-utils.c (putpkt): Flush after debug output and use
13055         stderr.
13056         Handle input interrupts while waiting for an ACK.
13057         (input_interrupt): Use signal_pid method.
13058         (getpkt): Flush after debug output and use stderr.
13059         (outreg): Use collect_register_as_string.
13060         (new_thread_notify, dead_thread_notify): New functions.
13061         (prepare_resume_reply): Check using_threads.  Set thread_from_wait
13062         and general_thread.
13063         (look_up_one_symbol): Flush after debug output.
13064         * server.c (step_thread, server_waiting): New variables.
13065         (start_inferior): Don't use signal_pid.  Update call to mywait.
13066         (attach_inferior): Update call to mywait.
13067         (handle_query): Handle qfThreadInfo and qsThreadInfo.
13068         (main): Don't fetch/store registers explicitly.  Use
13069         set_desired_inferior.  Support proposed ``Hs'' packet.  Update
13070         calls to mywait.
13071         * server.h: Update.
13072         (struct inferior_list, struct_inferior_list_entry): New.
13073         * target.c (set_desired_inferior): New.
13074         (write_inferior_memory): Constify.
13075         (mywait): New function.
13076         * target.h: Update.
13077         (struct target_ops): New signal_pid method.
13078         (mywait): Removed macro, added prototype.
13079
13080         * linux-low.h (regset_func): Removed.
13081         (regset_fill_func, regset_store_func): New.
13082         (enum regset_type): New.
13083         (struct regset_info): Add type field.  Use new operation types.
13084         (struct linux_target_ops): stop_pc renamed to get_pc.
13085         Add decr_pc_after_break and breakpoint_at.
13086         (get_process, get_thread_proess, get_process_thread)
13087         (strut process_info, all_processes, linux_attach_lwp)
13088         (thread_db_init): New.
13089
13090         * linux-arm-low.c (arm_get_pc, arm_set_pc,
13091         arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
13092         (the_low_target): Add new members.
13093         * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
13094         (i386_store_fpxregset): Constify.
13095         (target_regsets): Add new kind identifier.
13096         (i386_get_pc): Renamed from i386_stop_pc.  Simplify.
13097         (i386_set_pc): Add debugging.
13098         (i386_breakpoint_at): New function.
13099         (the_low_target): Add new members.
13100         * linux-mips-low.c (mips_get_pc, mips_set_pc)
13101         (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
13102         (mips_breakpoint_at): New.
13103         (the_low_target): Add new members.
13104         * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
13105         (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
13106         (the_low_target): Add new members.
13107         * linux-sh-low.c (sh_get_pc, sh_set_pc)
13108         (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
13109         (the_low_target): Add new members.
13110         * linux-x86-64-low.c (target_regsets): Add new kind
13111         identifier.
13112
13113 2002-05-15  Daniel Jacobowitz  <drow@mvista.com>
13114
13115         From Martin Pool <mbp@samba.org>:
13116         * server.c (gdbserver_usage): New function.
13117         (main): Call it.
13118
13119 2002-05-14  Daniel Jacobowitz  <drow@mvista.com>
13120
13121         * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
13122         stop_at -> stop_pc.
13123
13124 2002-05-04  Andrew Cagney  <ac131313@redhat.com>
13125
13126         * Makefile.in: Remove obsolete code.
13127
13128 2002-04-24  Michal Ludvig  <mludvig@suse.cz>
13129
13130         * linux-low.c (regsets_fetch_inferior_registers),
13131         (regsets_store_inferior_registers): Removed cast to int from
13132         ptrace() calls.
13133         * regcache.h: Added declaration of struct inferior_info.
13134
13135 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
13136
13137         * inferiors.c (struct inferior_info): Add regcache_data.
13138         (add_inferior): Call create_register_cache.
13139         (clear_inferiors): Call free_register_cache.
13140         (inferior_regcache_data, set_inferior_regcache_data): New functions.
13141         * regcache.c (struct inferior_regcache_data): New.
13142         (registers): Remove.
13143         (get_regcache): New function.
13144         (create_register_cache, free_register_cache): New functions.
13145         (set_register_cache): Don't initialize the register cache here.
13146         (registers_to_string, registers_from_string, register_data): Call
13147         get_regcache.
13148         * regcache.h: Add prototypes.
13149         * server.h: Likewise.
13150
13151 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
13152
13153         * mem-break.c: New file.
13154         * mem-break.h: New file.
13155         * Makefile.in: Add mem-break.o rule; update server.h
13156         dependencies.
13157         * inferiors.c (struct inferior_info): Add target_data
13158         member.
13159         (clear_inferiors): Free target_data member if set.
13160         (inferior_target_data, set_inferior_target_data): New functions.
13161         * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
13162         (i386_stop_pc, i386_set_pc): New.  Add to the_low_target.
13163         * linux-low.c (linux_bp_reinsert): New variable.
13164         (struct inferior_linux_data): New.
13165         (linux_create_inferior): Use set_inferior_target_data.
13166         (linux_attach): Likewise.  Call add_inferior.
13167         (linux_wait_for_one_inferior): New function.
13168         (linux_wait): Call it.
13169         (linux_write_memory): Add const.
13170         (initialize_low): Call set_breakpoint_data.
13171         * linux-low.h (struct linux_target_ops): Add breakpoint
13172         handling members.
13173         * server.c (attach_inferior): Remove extra add_inferior
13174         call.
13175         * server.h: Include mem-break.h.  Update inferior.c
13176         prototypes.
13177         * target.c (read_inferior_memory)
13178         (write_inferior_memory): New functions.
13179         * target.h (read_inferior_memory)
13180         (write_inferior_memory): Change macros to prototypes.
13181         (struct target_ops): Update comments.  Add const to write_memory
13182         definition.
13183
13184 2002-04-11  Daniel Jacobowitz  <drow@mvista.com>
13185
13186         * linux-low.c (usr_store_inferior_registers): Support
13187         registers which are allowed to fail to store.
13188         * linux-low.h (linux_target_ops): Likewise.
13189         * linux-ppc-low.c (ppc_regmap): Support FPSCR.
13190         (ppc_cannot_store_register): FPSCR may not be storable.
13191
13192 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13193
13194         * server.h: Include <string.h> if HAVE_STRING_H.
13195         * ChangeLog: Correct paths in last ChangeLog entry.
13196
13197 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13198
13199         * linux-low.h: Remove obsolete prototypes.
13200         (struct linux_target_ops): New.
13201         (extern the_low_target): New.
13202         * linux-low.c (num_regs, regmap): Remove declarations.
13203         (register_addr): Use the_low_target explicitly.
13204         (fetch_register): Likewise.
13205         (usr_fetch_inferior_registers): Likewise.
13206         (usr_store_inferior_registers): Likewise.
13207         * linux-arm-low.c (num_regs): Remove.
13208         (arm_num_regs): Define.
13209         (arm_regmap): Renamed from regmap, made static.
13210         (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
13211         made static.
13212         (arm_cannot_store_register): Renamed from cannot_store_register,
13213         made static.
13214         (the_low_target): New.
13215         * linux-i386-low.c (num_regs): Remove.
13216         (i386_num_regs): Define.
13217         (i386_regmap): Renamed from regmap, made static.
13218         (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
13219         made static.
13220         (i386_cannot_store_register): Renamed from cannot_store_register,
13221         made static.
13222         (the_low_target): New.
13223         * linux-ia64-low.c (num_regs): Remove.
13224         (ia64_num_regs): Define.
13225         (ia64_regmap): Renamed from regmap, made static.
13226         (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
13227         made static.
13228         (ia64_cannot_store_register): Renamed from cannot_store_register,
13229         made static.
13230         (the_low_target): New.
13231         * linux-m68k-low.c (num_regs): Remove.
13232         (m68k_num_regs): Define.
13233         (m68k_regmap): Renamed from regmap, made static.
13234         (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
13235         made static.
13236         (m68k_cannot_store_register): Renamed from cannot_store_register,
13237         made static.
13238         (the_low_target): New.
13239         * linux-mips-low.c (num_regs): Remove.
13240         (mips_num_regs): Define.
13241         (mips_regmap): Renamed from regmap, made static.
13242         (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
13243         made static.
13244         (mips_cannot_store_register): Renamed from cannot_store_register,
13245         made static.
13246         (the_low_target): New.
13247         * linux-ppc-low.c (num_regs): Remove.
13248         (ppc_num_regs): Define.
13249         (ppc_regmap): Renamed from regmap, made static.
13250         (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
13251         made static.
13252         (ppc_cannot_store_register): Renamed from cannot_store_register,
13253         made static.
13254         (the_low_target): New.
13255         * linux-s390-low.c (num_regs): Remove.
13256         (s390_num_regs): Define.
13257         (s390_regmap): Renamed from regmap, made static.
13258         (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
13259         made static.
13260         (s390_cannot_store_register): Renamed from cannot_store_register,
13261         made static.
13262         (the_low_target): New.
13263         * linux-sh-low.c (num_regs): Remove.
13264         (sh_num_regs): Define.
13265         (sh_regmap): Renamed from regmap, made static.
13266         (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
13267         made static.
13268         (sh_cannot_store_register): Renamed from cannot_store_register,
13269         made static.
13270         (the_low_target): New.
13271         * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
13272         (the_low_target): New.
13273
13274 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13275
13276         * Makefile.in: Add stamp-h target.
13277         * configure.in: Create stamp-h.
13278         * configure: Regenerated.
13279
13280 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13281
13282         * inferiors.c: New file.
13283         * target.c: New file.
13284         * target.h: New file.
13285         * Makefile.in:  Add target.o and inferiors.o.  Update
13286         dependencies.
13287         * linux-low.c (inferior_pid): New static variable,
13288         moved from server.c.
13289         (linux_create_inferior): Renamed from create_inferior.
13290         Call add_inferior.  Return 0 on success instead of a PID.
13291         (linux_attach): Renamed from myattach.
13292         (linux_kill): Renamed from kill_inferior.  Call clear_inferiors ().
13293         (linux_thread_alive): Renamed from mythread_alive.
13294         (linux_wait): Renamed from mywait.  Call clear_inferiors () if the
13295         child dies.
13296         (linux_resume): Renamed from myresume.  Add missing ``return 0''.
13297         (regsets_store_inferior_registers): Correct error message.
13298         Add missing ``return 0''.
13299         (linux_fetch_registers): Renamed from fetch_inferior_registers.
13300         (linux_store_registers): Renamed from store_inferior_registers.
13301         (linux_read_memory): Renamed from read_inferior_memory.
13302         (linux_write_memory): Renamed from write_inferior_memory.
13303         (linux_target_ops): New structure.
13304         (initialize_low): Call set_target_ops ().
13305         * remote-utils.c (unhexify): New function.
13306         (hexify): New function.
13307         (input_interrupt): Send signals to ``signal_pid''.
13308         * server.c (inferior_pid): Remove.
13309         (start_inferior): Update create_inferior call.
13310         (attach_inferior): Call add_inferior.
13311         (handle_query): New function.
13312         (main): Call handle_query for `q' packets.
13313         * server.h: Include "target.h".  Remove obsolete prototypes.
13314         Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
13315
13316 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13317
13318         * Makefile.in: Add WARN_CFLAGS.  Update configury
13319         dependencies.
13320         * configure.in: Check for <string.h>
13321         * configure: Regenerate.
13322         * config.in: Regenerate.
13323         * gdbreplay.c: Include needed system headers.
13324         (remote_open): Remove strchr prototype.
13325         * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
13326         * regcache.c (supply_register): Change buf argument to const void *.
13327         (supply_register_by_name): Likewise.
13328         (collect_register): Change buf argument to void *.
13329         (collect_register_by_name): Likewise.
13330         * regcache.h: Add missing prototypes.
13331         * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
13332         * server.c (handle_query): New function.
13333         (attached): New static variable, moved out of main.
13334         (main): Quiet longjmp clobber warnings.
13335         * server.h: Add ATTR_NORETURN and ATTR_FORMAT.  Update prototypes.
13336         * utils.c (error): Remove NORETURN.
13337         (fatal): Likewise.