Remove new_thread_notify and dead_thread_notify
[external/binutils.git] / gdb / gdbserver / ChangeLog
1 2016-01-25  Yao Qi  <yao.qi@linaro.org>
2
3         * remote-utils.c (new_thread_notify): Remove.
4         (dead_thread_notify): Likewise.
5         * remote-utils.h (new_thread_notify): Remove declaration.
6         (dead_thread_notify): Likewise.
7
8 2016-01-23  Marcin Koƛcielnicki  <koriakin@0x04.net>
9
10         * gdb.trace/pending.exp: Fix expected message on continue.
11
12 2016-01-22  Marcin Koƛcielnicki  <koriakin@0x04.net>
13
14         * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
15         it works properly on big-endian machines where sizeof (CORE_ADDR)
16         != sizeof (void *).
17
18 2016-01-21  Pedro Alves  <palves@redhat.com>
19
20         * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
21         (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
22         * configure: Regenerate.
23
24 2016-01-21  Yao Qi  <yao.qi@linaro.org>
25
26         * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
27         is_thumb and set it according to CPSR saved on the stack.
28         (get_next_pcs_syscall_next_pc): Pass is_thumb to
29         arm_sigreturn_next_pc.
30
31 2016-01-18  Yao Qi  <yao.qi@linaro.org>
32
33         * linux-low.c (linux_set_pc_64bit): New function.
34         (linux_get_pc_64bit): New function.
35         * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
36         Declare.
37         * linux-sparc-low.c (debug_threads): Remove declaration.
38         (sparc_get_pc): Remove.
39         (the_low_target): Use linux_get_pc_64bit instead of
40         sparc_get_pc.
41         * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
42         (the_low_target): Use linux_get_pc_64bit and
43         linux_set_pc_64bit.
44
45 2016-01-18  Yao Qi  <yao.qi@linaro.org>
46
47         * linux-arm-low.c (debug_threads): Remove declaration.
48         (arm_get_pc, arm_set_pc): Remove.
49         (the_low_target): Use linux_get_pc_32bit and
50         linux_set_pc_32bit.
51         * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
52         (the_low_target): Use linux_get_pc_32bit and
53         linux_set_pc_32bit.
54         * linux-cris-low.c (debug_threads): Remove declaration.
55         (cris_get_pc, cris_set_pc,): Remove.
56         (the_low_target): Use linux_get_pc_32bit and
57         linux_set_pc_32bit.
58         * linux-crisv32-low.c (debug_threads): Remove declaration.
59         (cris_get_pc, cris_set_pc): Remove.
60         (the_low_target): Use linux_get_pc_32bit and
61         linux_set_pc_32bit.
62         * linux-low.c: Include inttypes.h.
63         (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
64         * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
65         * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
66         (the_low_target): Use linux_get_pc_32bit and
67         linux_set_pc_32bit.
68         * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
69         (the_low_target): Use linux_get_pc_32bit and
70         linux_set_pc_32bit.
71         * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
72         (the_low_target): Use linux_get_pc_32bit and
73         linux_set_pc_32bit.
74         * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
75         (the_low_target): Use linux_get_pc_32bit and
76         linux_set_pc_32bit.
77         * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
78         (the_low_target): Use linux_get_pc_32bit and
79         linux_set_pc_32bit.
80
81 2016-01-18  Gary Benson  <gbenson@redhat.com>
82
83         * configure.ac (AC_FUNC_FORK): New check.
84         * config.in: Regenerate.
85         * configure: Likewise.
86
87 2016-01-14  Yao Qi  <yao.qi@linaro.org>
88
89         * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
90         * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
91         * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
92         arm_get_next_pcs_ctor.
93
94 2016-01-12  Josh Stone  <jistone@redhat.com>
95             Philippe Waroquiers  <philippe.waroquiers@skynet.be>
96
97         * inferiors.h: Include "gdb_vecs.h".
98         (struct process_info): Add syscalls_to_catch.
99         * inferiors.c (remove_process): Free syscalls_to_catch.
100         * remote-utils.c (prepare_resume_reply): Report syscall_entry and
101         syscall_return stops.
102         * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
103         * server.c (handle_general_set): Handle QCatchSyscalls.
104         (handle_query): Report support for QCatchSyscalls.
105         * target.h (struct target_ops): Add supports_catch_syscall.
106         (target_supports_catch_syscall): New macro.
107         * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
108         (struct lwp_info): Add syscall_state.
109         * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
110         Maintain syscall_state and syscalls_to_catch across exec.
111         (get_syscall_trapinfo): New function, proxy to the_low_target.
112         (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
113         (linux_low_filter_event): Toggle syscall_state entry/return for
114         syscall traps, and set it ignored for all others.
115         (gdb_catching_syscalls_p): New function.
116         (gdb_catch_this_syscall_p): New function.
117         (linux_wait_1): Handle SYSCALL_SIGTRAP.
118         (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
119         (linux_supports_catch_syscall): New function.
120         (linux_target_ops): Install it.
121         * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
122         (the_low_target): Install it.
123
124 2016-01-12  Mike Frysinger  <vapier@gentoo.org>
125
126         * acinclude.m4: Include new ../warning.m4 file.
127         * configure: Regenerated.
128         * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
129
130 2016-01-12  Mike Frysinger  <vapier@gentoo.org>
131
132         * ax.c (is_goto_target): Mark static.
133         * linux-low.c (register_addr): Likewise.
134         (linux_fetch_registers, linux_store_registers): Likewise.
135         * mem-break.c (any_persistent_commands): Fix old prototype.
136         (add_commands_to_breakpoint): Mark static.
137         * regcache.c (find_register_by_name): Delete unused func.
138         * remote-utils.c (hex_or_minus_one): Mark static.
139         * server.c (monitor_show_help): Mark static.
140         (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
141         handle_v_requests): Likewise.
142
143 2016-01-12  Pedro Alves  <palves@redhat.com>
144
145         Remove use of the registered trademark symbol throughout.
146
147 2016-01-08  Yao Qi  <yao.qi@linaro.org>
148
149         * remote-utils.c (getpkt): If c is '\003', call target hook
150         request_interrupt.
151
152 2016-01-06  Yao Qi  <yao.qi@linaro.org>
153
154         * linux-aarch32-low.h (arm_abi_breakpoint): Move to
155         linux-aarch32-low.c.
156         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
157         (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
158         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
159         (thumb2_breakpoint): Declare.
160         * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
161         linux-aarch32-low.h.
162         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
163         (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
164         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
165
166 2016-01-01  Joel Brobecker  <brobecker@adacore.com>
167
168         * gdbreplay.c (gdbreplay_version): Change copyright year in
169         version message.
170         * server.c (gdbserver_version): Likewise.
171
172 2015-12-28  Patrick Palka  <patrick@parcs.ath.cx>
173
174         * server.c (crc32_table): Delete.
175         (crc32): Use libiberty's xcrc32 function.
176
177 2015-12-22  Joel Brobecker  <brobecker@adacore.com>
178
179         * lynx-low.c (lynx_delete_thread_callback): New function.
180         (lynx_mourn): Properly delete our process and all of its
181         threads.  Remove call to clear_inferiors.
182
183 2015-12-22  Joel Brobecker  <brobecker@adacore.com>
184
185         * target.c (thread_search_callback): Add check that
186         the thread_stopped target callback is not NULL before
187         calling it.
188
189 2015-12-21  Yao Qi  <yao.qi@linaro.org>
190
191         * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
192         arm breakpoint.
193
194 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
195
196         * server.c (handle_query): Call target_supports_software_single_step.
197
198 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
199
200         * linux-low.c (single_step): New function.
201         (linux_resume_one_lwp_throw): Call single_step.
202         (start_step_over): Likewise.
203
204 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
205
206         * Makefile.in (SFILES): Append arch/arm-linux.c,
207         arch/arm-get-next-pcs.c.
208         (arm-linux.o): New rule.
209         (arm-get-next-pcs.o): New rule.
210         * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
211         arm-linux.o.
212         * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro.  Moved
213         to linux-aarch32-low.c.
214         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
215         (arm_breakpoint_len, thumb_breakpoint): Likewise.
216         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
217         (thumb2_breakpoint_len): Likewise.
218         (arm_is_thumb_mode): Make non-static.
219         * linux-aarch32-low.h (arm_abi_breakpoint): New macro.  Moved
220         from linux-aarch32-low.c.
221         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
222         (arm_breakpoint_len, thumb_breakpoint): Likewise.
223         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
224         (thumb2_breakpoint_len): Likewise.
225         (arm_is_thumb_mode): New declaration.
226         * linux-arm-low.c: Include arch/arm-linux.h
227         aarch/arm-get-next-pcs.h, sys/syscall.h.
228         (get_next_pcs_ops): New struct.
229         (get_next_pcs_addr_bits_remove): New function.
230         (get_next_pcs_is_thumb): New function.
231         (get_next_pcs_read_memory_unsigned_integer): Likewise.
232         (arm_sigreturn_next_pc): Likewise.
233         (get_next_pcs_syscall_next_pc): Likewise.
234         (arm_gdbserver_get_next_pcs): Likewise.
235         (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
236         Initialize.
237         * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
238         * server.h: Include gdb_vecs.h.
239
240 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
241
242         * Makefile.in (SFILES): Append common/common-regcache.c.
243         (OBS): Append common-regcache.o.
244         (common-regcache.o): New rule.
245         * regcache.c (init_register_cache): Initialize cache to
246         REG_UNAVAILABLE.
247         (regcache_raw_read_unsigned): New function.
248         * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
249         register_status enum.
250
251 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
252
253         * linux-aarch64-low.c (the_low_targets): Rename
254         breakpoint_reinsert_addr to get_next_pcs.
255         * linux-arm-low.c (the_low_targets): Likewise.
256         * linux-bfin-low.c (the_low_targets): Likewise.
257         * linux-cris-low.c (the_low_targets): Likewise.
258         * linux-crisv32-low.c (the_low_targets): Likewise.
259         * linux-low.c (can_software_single_step): Likewise.
260         (install_software_single_step_breakpoints): New function.
261         (start_step_over): Use install_software_single_step_breakpoints.
262         * linux-low.h: New CORE_ADDR vector.
263         (struct linux_target_ops) Rename breakpoint_reinsert_addr to
264         get_next_pcs.
265         * linux-mips-low.c (the_low_targets): Likewise.
266         * linux-nios2-low.c (the_low_targets): Likewise.
267         * linux-sparc-low.c (the_low_targets): Likewise.
268
269 2015-12-17  Pedro Alves  <palves@redhat.com>
270
271         * linux-low.c (linux_kill_one_lwp): Remove references to
272         LinuxThreads.
273         (kill_lwp): Remove HAVE_TKILL_SYSCALL check.  No longer fall back
274         to 'kill'.
275         (linux_init_signals): Delete.
276         (initialize_low): Adjust.
277         * thread-db.c (thread_db_init): Remove LinuxThreads reference.
278
279 2015-12-16  Pedro Alves  <palves@redhat.com>
280
281         * configure.ac (compiler warning flags): When testing a
282         -Wno-foo option, check whether -Wfoo works instead.
283         * configure: Regenerate.
284
285 2015-12-11  Don Breazeal  <donb@codesourcery.com>
286
287         * server.c (process_serial_event): Don't exit from gdbserver
288         in remote mode if there are still active inferiors.
289
290 2015-12-11  Yao Qi  <yao.qi@linaro.org>
291
292         * linux-aarch64-low.c (aarch64_breakpoint_at): Call
293         arm_breakpoint_at if the process is 32-bit.
294
295 2015-12-11  Yao Qi  <yao.qi@linaro.org>
296
297         * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
298         arm breakpoint.
299
300 2015-12-07  Yao Qi  <yao.qi@linaro.org>
301
302         * configure.srv: Append arm.o to srv_tgtobj for
303         aarch64*-*-linux* target.
304         * linux-aarch32-low.c (arm_abi_breakpoint): New macro.  Moved
305         from linux-arm-low.c.
306         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
307         (arm_breakpoint_len, thumb_breakpoint): Likewise.
308         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
309         (thumb2_breakpoint_len): Likewise.
310         (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
311         (arm_breakpoint_kinds): Likewise.
312         (arm_breakpoint_kind_from_pc): Likewise.
313         (arm_sw_breakpoint_from_kind): Likewise.
314         (arm_breakpoint_kind_from_current_state): Likewise.
315         * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
316         (arm_sw_breakpoint_from_kind): Declare.
317         (arm_breakpoint_kind_from_current_state): Declare.
318         (arm_breakpoint_at): Declare.
319         * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
320         arm_sw_breakpoint_from_kind if process is 32-bit.
321         (aarch64_breakpoint_kind_from_pc): New function.
322         (aarch64_breakpoint_kind_from_current_state): New function.
323         (the_low_target): Initialize fields breakpoint_kind_from_pc
324         and breakpoint_kind_from_current_state.
325         * linux-arm-low.c (arm_breakpoint_kinds): Move to
326         linux-aarch32-low.c.
327         (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
328         (arm_breakpoint, arm_breakpoint_len): Likewise.
329         (thumb_breakpoint, thumb_breakpoint_len): Likewise.
330         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
331         (arm_is_thumb_mode): Likewise.
332         (arm_breakpoint_at): Likewise.
333         (arm_breakpoint_kind_from_pc): Likewise.
334         (arm_sw_breakpoint_from_kind): Likewise.
335         (arm_breakpoint_kind_from_current_state): Likewise.
336
337         Revert:
338         2015-08-04  Yao Qi  <yao.qi@linaro.org>
339
340         * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
341         0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
342         * server.c (extended_protocol): Remove "static".
343         * server.h (extended_protocol): Declare it.
344
345 2015-12-04  Josh Stone  <jistone@redhat.com>
346
347         * target.h (struct target_ops) <arch_setup>: Rename to ...
348         (struct target_ops) <post_create_inferior>: ... this.
349         (target_arch_setup): Rename to ...
350         (target_post_create_inferior): ... this, calling post_create_inferior.
351         * server.c (start_inferior): Update target_arch_setup calls to
352         target_post_create_inferior.
353         * linux-low.c (linux_low_ptrace_options): Forward declare.
354         (linux_arch_setup): Update its comment for general use.
355         (linux_post_create_inferior): New, run arch_setup and setup ptrace.
356         (struct linux_target_ops): Use linux_post_create_inferior.
357         * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
358         to post_create_inferior.
359         * nto-low.c (struct nto_target_ops): Likewise.
360         * spu-low.c (struct spu_target_ops): Likewise.
361         * win32-low.c (struct win32_target_ops): Likewise.
362
363 2015-12-03  Antoine Tremblay  <antoine.tremblay@ericsson.com>
364
365         * linux-arm-low.c: Remove duplicate arch/arm.h include.
366
367 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
368
369         * linux-arm-low.c (arm_reinsert_addr): Remove function.
370         (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
371         * linux-cris-low.c (cris_reinsert_addr> Remove function.
372         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
373         * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
374         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
375         * linux-mips-low.c (mips_reinsert_addr): Remove function.
376         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
377         * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
378         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
379         * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
380         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
381
382 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
383
384         * linux-low.c (linux_look_up_symbols): Don't call
385         linux_supports_traceclone.
386         * linux-low.h (thread_db_init): Remove use_events argument.
387         * thread-db.c (thread_db_use_event): Remove global variable.
388         (struct thread_db) <td_thr_event_enable_p>: Remove field.
389         (struct thread_db) <td_create_bp>: Remove field.
390         (thread_db_create_event): Remove function.
391         (thread_db_enable_reporting): Likewise.
392         (find_one_thread): Don't check for thread_db_use_events.
393         (attach_thread): Likewise.
394         (thread_db_load_search): Remove td_thr_event_enable_p initialization.
395         (try_thread_db_load_1): Don't check for thread_db_use_events.
396         (thread_db_init): Remove use_events argument and thread events
397         handling.
398         (remove_thread_event_breakpoints): Remove function.
399         (thread_db_detach): Remove call to remove_thred_event_breakpoints.
400
401 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
402
403         * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
404         New function.
405         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
406         * linux-arm-low.c (arm_supports_hardware_single_step): New function.
407         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
408         * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
409         (struct linux_target_ops) <bfin_supports_hardware_single_step>:
410         Initialize.
411         * linux-crisv32-low.c (cris_supports_hardware_single_step):
412         New function.
413         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
414         * linux-low.c (can_hardware_single_step): Use
415         supports_hardware_single_step.
416         (can_software_single_step): New function.
417         (start_step_over): Call can_software_single_step.
418         (linux_supports_hardware_single_step): New function.
419         (struct target_ops) <supports_software_single_step>: Initialize.
420         * linux-low.h (struct linux_target_ops)
421         <supports_hardware_single_step>: Initialize.
422         * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
423         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
424         * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
425         (struct linux_target_ops) <supports_hardware_single_step> Initialize.
426         * linux-s390-low.c (s390_supports_hardware_single_step): New function.
427         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
428         * linux-sh-low.c (sh_supports_hardware_single_step): New function.
429         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
430         * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
431         (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
432         Initialize.
433         * linux-tile-low.c (tile_supports_hardware_single_step): New function.
434         (struct linux_target_ops) <tile_supports_hardware_single_step>:
435         Initialize.
436         * linux-x86-low.c (x86_supports_hardware_single_step) New function.
437         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
438         * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
439         New function.
440         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
441         * target.h (struct target_ops): <supports_software_single_step>:
442         New field.
443         (target_supports_software_single_step): New macro.
444
445 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
446
447         * linux-low.c (linux_wait_1): Fix pc advance condition.
448         * mem-break.c (reinsert_breakpoint_inserted_here): New function.
449         * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
450
451 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
452
453         * linux-arm-low.c (arm_is_thumb_mode): New function.
454         (arm_breakpoint_at): Use arm_is_thumb_mode.
455         (arm_breakpoint_kind_from_current_state): New function.
456         (struct linux_target_ops) <breakpoint_kind_from_current_state>:
457         Initialize.
458         * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
459         (linux_breakpoint_kind_from_current_state): New function.
460         (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
461         * linux-low.h (struct linux_target_ops)
462         <breakpoint_kind_from_current_state>: New field.
463         * target.h (struct target_ops): Likewise.
464         (target_breakpoint_kind_from_current_state): New macro.
465
466 2015-11-30  Pedro Alves  <palves@redhat.com>
467
468         * linux-low.c (linux_resume): Wake up the event loop before
469         returning.
470
471 2015-11-30  Pedro Alves  <palves@redhat.com>
472
473         * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
474         check.
475         (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
476         to -1.
477         * target.c (struct thread_search): New structure.
478         (thread_search_callback): New function.
479         (prev_general_thread): New global.
480         (prepare_to_access_memory, done_accessing_memory): New functions.
481         * target.h (prepare_to_access_memory, done_accessing_memory):
482         Replace macros with function declarations.
483
484 2015-11-30  Pedro Alves  <palves@redhat.com>
485
486         PR 14618
487         * linux-low.c (linux_wait_1): If the last resumed thread is gone,
488         report TARGET_WAITKIND_NO_RESUMED.
489         * remote-utils.c (prepare_resume_reply): Handle
490         TARGET_WAITKIND_NO_RESUMED.
491         * server.c (report_no_resumed): New global.
492         (handle_query) <qSupported>: Handle "no-resumed+".  Report
493         "no-resumed+" support.
494         (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
495         return error if the client doesn't support no-resumed events.
496         (push_stop_notification): New function.
497         (handle_target_event): Use it.  Report TARGET_WAITKIND_NO_RESUMED
498         events if the client supports them.
499
500 2015-11-30  Pedro Alves  <palves@redhat.com>
501
502         * linux-low.c (thread_still_has_status_pending_p): Don't check
503         vCont;t here.
504         (lwp_resumed): New function.
505         (status_pending_p_callback): Return early if the LWP is not
506         supposed to be resumed.
507
508 2015-11-30  Pedro Alves  <palves@redhat.com>
509
510         * linux-low.c (handle_extended_wait): Assert that the LWP's
511         waitstatus is TARGET_WAITKIND_IGNORE.  If GDB wants to hear about
512         thread create events, leave the new child's status pending.
513         (linux_low_filter_event): If GDB wants to hear about thread exit
514         events, leave the LWP marked dead and don't delete it.
515         (linux_wait_for_event_filtered): Don't check for thread exit.
516         (filter_exit_event): New function.
517         (linux_wait_1): Use it, when returning an exit event.
518         (linux_resume_one_lwp_throw): Assert that the LWP's
519         waitstatus is TARGET_WAITKIND_IGNORE.
520         * remote-utils.c (prepare_resume_reply): Handle
521         TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
522         * server.c (report_thread_events): New global.
523         (handle_general_set): Handle QThreadEvents.
524         (handle_query) <qSupported>: Handle and report QThreadEvents+;
525         (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
526         TARGET_WAITKIND_THREAD_EXITED.
527         * server.h (report_thread_events): Declare.
528
529 2015-11-30  Pedro Alves  <palves@redhat.com>
530
531         * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
532         the thread's last_resume_kind was resume_stop.
533
534 2015-11-30  Pedro Alves  <palves@redhat.com>
535
536         * linux-low.c (linux_attach): In non-stop mode, wait for one stop
537         before returning.
538
539 2015-11-30  Pedro Alves  <palves@redhat.com>
540
541         * server.c (handle_v_requests): Handle vCtrlC.
542
543 2015-11-30  Pedro Alves  <palves@redhat.com>
544
545         * gdbthread.h (find_any_thread_of_pid): Declare.
546         * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
547         functions.
548         * server.c (handle_query): If current_thread is NULL, look for
549         another thread of the selected process.
550
551 2015-11-26  Daniel Colascione  <dancol@dancol.org>
552             Simon Marchi  <simon.marchi@ericsson.com>
553
554         * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
555         * server.c (handle_qxfer_threads_worker): Refactor to include thread
556         name in reply.
557         * target.h (struct target_ops) <thread_name>: New field.
558         (target_thread_name): New macro.
559
560 2015-11-23  Joel Brobecker  <brobecker@adacore.com>
561
562         * regcache.h (regcache_invalidate_pid): Add declaration.
563         * regcache.c (regcache_invalidate_pid): New function, extracted
564         from regcache_invalidate.
565         (regcache_invalidate): Reimplement using regcache_invalidate_pid.
566         Add trivial documentation comment.
567         * lynx-low.c: Use regcache_invalidate_pid instead of
568         regcache_invalidate.
569
570 2015-11-23  Joel Brobecker  <brobecker@adacore.com>
571
572         * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
573         and Elf64_auxv_t if the target is Android.
574
575 2015-11-22  Doug Evans  <xdje42@gmail.com>
576
577         * target.h: #include <sys/types.h>.
578
579 2015-11-19  Pedro Alves  <palves@redhat.com>
580
581         * linux-low.c (linux_process_qsupported): Change prototype.
582         Adjust.
583         * linux-low.h (struct linux_target_ops) <process_qsupported>:
584         Change prototype.
585         * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
586         and adjust to loop over all features.
587         * server.c (handle_query) <qSupported>: Adjust to call
588         target_process_qsupported once, passing it a vector of unprocessed
589         features.
590         * target.h (struct target_ops) <process_qsupported>: Change
591         prototype.
592         (target_process_qsupported): Adjust.
593
594 2015-11-19  Pedro Alves  <palves@redhat.com>
595
596         * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
597         mode.
598         * configure: Regenerate.
599
600 2015-11-19  Pedro Alves  <palves@redhat.com>
601
602         * configure: Regenerate.
603
604 2015-11-19  Yao Qi  <yao.qi@linaro.org>
605
606         * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
607         type to uint32_t.
608
609 2015-11-19  Yao Qi  <yao.qi@linaro.org>
610
611         * linux-aarch64-low.c (enum aarch64_operand_type): New.
612         (struct aarch64_operand): Move enum out.
613
614 2015-11-19  Yao Qi  <yao.qi@linaro.org>
615
616         * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
617         struct user_fpsimd_state *.
618         (aarch64_store_fpregset): Likewise.
619
620 2015-11-19  Yao Qi  <yao.qi@linaro.org>
621
622         * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
623         struct user_pt_regs *.
624         (aarch64_store_gregset): Likewise.
625
626 2015-11-18  Pedro Alves  <palves@redhat.com>
627
628         * Makefile.in (all_object_files): Add $IPA_OBJS.
629
630 2015-11-17  Pedro Alves  <palves@redhat.com>
631
632         * win32-low.c (win32_resume): Use gdb_signal_from_host,
633         GDB_SIGNAL_0 and gdb_signal_to_string.
634
635 2015-11-17  Pedro Alves  <palves@redhat.com>
636
637         * win32-low.c (handle_output_debug_string): Remove parameter.
638         (win32_kill): Remove our_status local and adjust call to
639         handle_output_debug_string.
640         (get_child_debug_event): Adjust call to
641         handle_output_debug_string.
642
643 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
644
645         * linux-mips-low.c (mips_fill_gregset): Add cast.
646         (mips_store_gregset): Likewise.
647         (mips_fill_fpregset): Likewise.
648         (mips_store_fpregset): Likewise.
649
650 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
651
652         * linux-mips-low.c (mips_add_watchpoint): Rename private to
653         priv.
654
655 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
656
657         * linux-mips-low.c (mips_linux_new_thread): Change type of
658         watch_type to enum target_hw_bp_type.
659
660 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
661
662                 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
663                 Change return type to arm_hwbp_type.
664
665 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
666
667         * linux-aarch32-low.c (arm_fill_gregset): Add cast.
668         (arm_store_gregset): Likewise.
669         * linux-arm-low.c (arm_get_hwcap): Likewise.
670         (arm_read_description): Likewise.
671
672 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
673
674         * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
675
676 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
677
678         * linux-ppc-low.c (ppc_get_hwcap): Add cast.
679         (ppc_fill_vsxregset): Likewise.
680         (ppc_store_vsxregset): Likewise.
681         (ppc_fill_vrregset): Likewise.
682         (ppc_store_vrregset): Likewise.
683         (ppc_fill_evrregset): Likewise.
684         (ppc_store_evrregset): Likewise.
685
686 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
687
688         * linux-ppc-low.c (ppc_usrregs_info): Remove
689         forward-declaration.
690         (ppc_arch_setup): Move lower in file.
691
692 2015-10-30  Simon Marchi  <simon.marchi@ericsson.com>
693
694         * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
695         (ps_pdwrite): Likewise.
696
697 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
698
699         * linux-arm-low.c (arm_new_thread): Move pointer dereference
700         to after assert checks.
701
702 2015-10-29  Simon Marchi  <simon.marchi@ericsson.com>
703
704         * proc-service.c (ps_pdread): Add/adjust casts.
705         (ps_pdwrite): Add/adjust casts.
706
707 2015-10-29  Simon Marchi  <simon.marchi@polymtl.ca>
708
709         * server.c (handle_search_memory_1): Cast return value of
710         memmem.
711
712 2015-10-29  Simon Marchi  <simon.marchi@polymtl.ca>
713
714         * server.c (write_qxfer_response): Change type of data to
715         gdb_byte *.
716
717 2015-10-29  Pedro Alves  <palves@redhat.com>
718
719         * mem-break.c (Z_packet_to_bkpt_type): Add cast.
720
721 2015-10-29  Pedro Alves  <palves@redhat.com>
722
723         * tracepoint.c (clear_installed_tracepoints): Add casts.
724
725 2015-10-29  Pedro Alves  <palves@redhat.com>
726
727         * server.c (handle_v_cont, process_serial_event): Add enum
728         gdb_signal casts to signal parsing code.
729
730 2015-10-29  Pedro Alves  <palves@redhat.com>
731
732         * linux-low.h (NULL_REGSET): Define.
733         * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
734         * linux-arm-low.c (arm_regsets): Likewise.
735         * linux-crisv32-low.c (cris_regsets): Likewise.
736         * linux-m68k-low.c (m68k_regsets): Likewise.
737         * linux-mips-low.c (mips_regsets): Likewise.
738         * linux-nios2-low.c (nios2_regsets): Likewise.
739         * linux-ppc-low.c (ppc_regsets): Likewise.
740         * linux-s390-low.c (s390_regsets): Likewise.
741         * linux-sh-low.c (sh_regsets): Likewise.
742         * linux-sparc-low.c (sparc_regsets): Likewise.
743         * linux-tic6x-low.c (tic6x_regsets): Likewise.
744         * linux-tile-low.c (tile_regsets): Likewise.
745         * linux-x86-low.c (x86_regsets): Likewise.
746         * linux-xtensa-low.c (xtensa_regsets): Likewise.
747
748 2015-10-29  Pedro Alves  <palves@redhat.com>
749
750         * linux-low.h (NULL_REGSET): Define.
751         * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
752         * linux-arm-low.c (arm_regsets): Likewise.
753         * linux-crisv32-low.c (cris_regsets): Likewise.
754         * linux-m68k-low.c (m68k_regsets): Likewise.
755         * linux-mips-low.c (mips_regsets): Likewise.
756         * linux-nios2-low.c (nios2_regsets): Likewise.
757         * linux-ppc-low.c (ppc_regsets): Likewise.
758         * linux-s390-low.c (s390_regsets): Likewise.
759         * linux-sh-low.c (sh_regsets): Likewise.
760         * linux-sparc-low.c (sparc_regsets): Likewise.
761         * linux-tic6x-low.c (tic6x_regsets): Likewise.
762         * linux-tile-low.c (tile_regsets): Likewise.
763         * linux-x86-low.c (x86_regsets): Likewise.
764         * linux-xtensa-low.c (xtensa_regsets): Likewise.
765
766 2015-10-26  Doug Evans  <dje@google.com>
767
768         * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
769
770 2015-10-26  Doug Evans  <dje@google.com>
771
772         * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
773
774 2015-10-26  Doug Evans  <dje@google.com>
775
776         * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
777         for debug_printf.
778         (attach_thread, find_new_threads_callback): Ditto.
779
780 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
781
782         * mem-break.h (set_breakpoint_data): Remove.
783
784 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
785
786         * nto-low.c (nto_sw_breakpoint_from_kind): New function.
787         (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
788         (initialize_low): Remove set_breakpoint_data call.
789         * spu-low.c (spu_sw_breakpoint_from_kind): New function.
790         (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
791         (initialize_low): Remove set_breakpoint_data call.
792         * win32-low.c (win32_sw_breakpoint_from_kind): New function.
793         (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
794         (initialize_low): Remove set_breakpoint_data call.
795
796 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
797
798         * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
799         * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
800         * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
801         * target.h (target_breakpoint_kind_from_pc): New macro.
802
803 2015-10-22  Antoine Tremblay  <antoine.tremblay@ericsson.com>
804
805         * linux-low.c (default_breakpoint_kind_from_pc): New function.
806         (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
807         the default breakpoint kind.
808
809 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
810
811         * linux-arm-low.c (arm_supports_z_point_type): Add software
812         breakpoint support.
813
814 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
815
816         * linux-arm-low.c: Refactor breakpoint definitions.
817         (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
818         (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
819
820 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
821
822         * Makefile.in: Add arm.c/o.
823         * configure.srv: Likewise.
824         * linux-arm-low.c (arm_breakpoint_kinds): New enum.
825         (arm_breakpoint_kind_from_pc): New function.
826         (arm_sw_breakpoint_from_kind): Return proper kind.
827         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
828
829 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
830
831         * linux-low.c (initialize_low): Ajdust for breakpoint global variables
832         removal.
833         * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
834         (struct raw_breakpoint) <size>: Remove.
835         (struct raw_breakpoint) <kind>: Add.
836         (bp_size): New function.
837         (bp_opcode): Likewise.
838         (find_raw_breakpoint_at): Adjust for kind.
839         (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
840         (remove_memory_breakpoint): Adjust for kind call bp_size.
841         (set_raw_breakpoint_at): Adjust for kind.
842         (set_breakpoint): Likewise.
843         (set_breakpoint_at): Call breakpoint_kind_from_pc.
844         (delete_raw_breakpoint): Adjust for kind.
845         (delete_breakpoint): Likewise.
846         (find_gdb_breakpoint): Likewise.
847         (set_gdb_breakpoint_1): Likewise.
848         (set_gdb_breakpoint): Likewise.
849         (delete_gdb_breakpoint_1): Likewise.
850         (delete_gdb_breakpoint): Likewise.
851         (uninsert_raw_breakpoint): Likewise.
852         (reinsert_raw_breakpoint): Likewise.
853         (set_breakpoint_data): Remove.
854         (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
855         (check_mem_read): Adjust for kind call bp_size.
856         (check_mem_write): Adjust for kind call bp_size,bp_opcode.
857         (clone_one_breakpoint): Adjust for kind.
858         * mem-break.h (set_gdb_breakpoint): Likewise.
859         (delete_gdb_breakpoint): Likewise.
860         * server.c (process_serial_event): Likewise.
861
862 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
863
864         * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
865         (struct linux_target_ops) <breakpoint>: Remove.
866         (struct linux_target_ops) <breakpoint_len>: Remove.
867         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
868         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
869         * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
870         (arm_sw_breakpoint_from_kind): New function.
871         * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
872         (struct linux_target_ops) <breakpoint>: Remove.
873         (struct linux_target_ops) <breakpoint_len>: Remove.
874         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
875         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
876         * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
877         (struct linux_target_ops) <breakpoint>: Remove.
878         (struct linux_target_ops) <breakpoint_len>: Remove.
879         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
880         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
881         * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
882         (struct linux_target_ops) <breakpoint>: Remove.
883         (struct linux_target_ops) <breakpoint_len>: Remove.
884         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
885         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
886         * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
887         and sw_breakpoint_from_kind to increment the pc.
888         (linux_breakpoint_kind_from_pc): New function.
889         (linux_sw_breakpoint_from_kind): New function.
890         (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
891         (initialize_low): Call breakpoint_kind_from_pc and
892         sw_breakpoint_from_kind to replace breakpoint_data/len.
893         * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
894         New field.
895         (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
896         * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
897         (struct linux_target_ops) <breakpoint>: Remove.
898         (struct linux_target_ops) <breakpoint_len>: Remove.
899         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
900         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
901         * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
902         (struct linux_target_ops) <breakpoint>: Remove.
903         (struct linux_target_ops) <breakpoint_len>: Remove.
904         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
905         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
906         * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
907         (struct linux_target_ops) <breakpoint>: Remove.
908         (struct linux_target_ops) <breakpoint_len>: Remove.
909         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
910         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
911         * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
912         (struct linux_target_ops) <breakpoint>: Remove.
913         (struct linux_target_ops) <breakpoint_len>: Remove.
914         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
915         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
916         * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
917         (struct linux_target_ops) <breakpoint>: Remove.
918         (struct linux_target_ops) <breakpoint_len>: Remove.
919         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
920         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
921         * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
922         (struct linux_target_ops) <breakpoint>: Remove.
923         (struct linux_target_ops) <breakpoint_len>: Remove.
924         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
925         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
926         * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
927         (struct linux_target_ops) <breakpoint>: Remove.
928         (struct linux_target_ops) <breakpoint_len>: Remove.
929         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
930         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
931         * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
932         (struct linux_target_ops) <breakpoint>: Remove.
933         (struct linux_target_ops) <breakpoint_len>: Remove.
934         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
935         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
936         * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
937         (struct linux_target_ops) <breakpoint>: Remove.
938         (struct linux_target_ops) <breakpoint_len>: Remove.
939         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
940         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
941         * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
942         * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
943         (struct linux_target_ops) <breakpoint>: Remove.
944         (struct linux_target_ops) <breakpoint_len>: Remove.
945         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
946         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
947         * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
948         (struct linux_target_ops) <breakpoint>: Remove.
949         (struct linux_target_ops) <breakpoint_len>: Remove.
950         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
951         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
952
953 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
954
955         * linux-cris-low.c (cris_get_pc): Remove void arg.
956
957 2015-10-16  Aleksandar Ristovski  <aristovski@qnx.com>
958
959         * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
960         variable name.
961
962 2015-10-16  Aleksandar Ristovski  <aristovski@qnx.com>
963
964         * inferiors.c (thread_pid_matches_callback): New function.
965         (find_thread_process): New function.
966         (remove_thread): Reset current_thread.
967         (remove_process): Assert threads have been removed first.
968
969 2015-10-15  Yao Qi  <yao.qi@linaro.org>
970
971         * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
972         if it is 3.
973         (aarch64_remove_point): Likewise.
974         * regcache.c (regcache_register_size): New function.
975
976 2015-10-12  Yao Qi  <yao.qi@linaro.org>
977
978         * linux-aarch64-low.c: Update all callers as emit_load_store
979         is renamed to aarch64_emit_load_store.
980
981 2015-10-12  Yao Qi  <yao.qi@linaro.org>
982
983         * linux-aarch64-low.c: Update all callers of function renaming
984         from emit_insn to aarch64_emit_insn.
985
986 2015-10-12  Yao Qi  <yao.qi@linaro.org>
987
988         * linux-aarch64-low.c (enum aarch64_opcodes): Move to
989         arch/aarch64-insn.h.
990         (struct aarch64_memory_operand): Likewise.
991         (ENCODE): Likewise.
992         (emit_insn): Move to arch/aarch64-insn.c.
993         (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
994         (emit_load_store): Move to arch/aarch64-insn.c.
995         (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
996         (can_encode_int32): Remove.
997
998 2015-10-12  Yao Qi  <yao.qi@linaro.org>
999
1000         * linux-aarch64-low.c (extract_signed_bitfield): Remove.
1001         (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
1002         (aarch64_relocate_instruction): Likewise.
1003         (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
1004         (struct aarch64_insn_visitor): Likewise.
1005
1006 2015-10-12  Yao Qi  <yao.qi@linaro.org>
1007
1008         * linux-aarch64-low.c (struct aarch64_insn_data): New.
1009         (struct aarch64_insn_visitor): New.
1010         (struct aarch64_insn_relocation_data): New.
1011         (aarch64_ftrace_insn_reloc_b): New function.
1012         (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1013         (aarch64_ftrace_insn_reloc_cb): Likewise.
1014         (aarch64_ftrace_insn_reloc_tb): Likewise.
1015         (aarch64_ftrace_insn_reloc_adr): Likewise.
1016         (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
1017         (aarch64_ftrace_insn_reloc_others): Likewise.
1018         (visitor): New.
1019         (aarch64_relocate_instruction): Use visitor.
1020
1021 2015-10-12  Yao Qi  <yao.qi@linaro.org>
1022
1023         * linux-aarch64-low.c (aarch64_relocate_instruction): Return
1024         int.  Add argument buf.
1025         (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
1026         aarch64_relocate_instruction.
1027
1028 2015-10-12  Yao Qi  <yao.qi@linaro.org>
1029
1030         * linux-aarch64-low.c (aarch64_relocate_instruction): Add
1031         argument insn.  Remove local variable insn.  Don't call
1032         target_read_uint32.
1033         (aarch64_install_fast_tracepoint_jump_pad): Call
1034         target_read_uint32.
1035
1036 2015-09-30  Yao Qi  <yao.qi@linaro.org>
1037
1038         * linux-aarch64-low.c (emit_movk): Shorten a long line.
1039         (emit_load_store_pair): Likewise.
1040
1041 2015-09-25  Simon Marchi  <simon.marchi@ericsson.com>
1042
1043         * dll.c (match_dll): Add cast(s).
1044         (unloaded_dll): Likewise.
1045         * linux-low.c (second_thread_of_pid_p): Likewise.
1046         (delete_lwp_callback): Likewise.
1047         (count_events_callback): Likewise.
1048         (select_event_lwp_callback): Likewise.
1049         (linux_set_resume_request): Likewise.
1050         * server.c (accumulate_file_name_length): Likewise.
1051         (emit_dll_description): Likewise.
1052         (handle_qxfer_threads_worker): Likewise.
1053         (visit_actioned_threads): Likewise.
1054         * thread-db.c (any_thread_of): Likewise.
1055         * tracepoint.c (same_process_p): Likewise.
1056         (match_blocktype): Likewise.
1057         (build_traceframe_info_xml): Likewise.
1058
1059 2015-09-25  Simon Marchi  <simon.marchi@ericsson.com>
1060
1061         * ax.c (gdb_parse_agent_expr): Add cast to allocation result
1062         assignment.
1063         (gdb_unparse_agent_expr): Likewise.
1064         * hostio.c (require_data): Likewise.
1065         (handle_pread): Likewise.
1066         * linux-low.c (disable_regset): Likewise.
1067         (fetch_register): Likewise.
1068         (store_register): Likewise.
1069         (get_dynamic): Likewise.
1070         (linux_qxfer_libraries_svr4): Likewise.
1071         * mem-break.c (delete_fast_tracepoint_jump): Likewise.
1072         (set_fast_tracepoint_jump): Likewise.
1073         (uninsert_fast_tracepoint_jumps_at): Likewise.
1074         (reinsert_fast_tracepoint_jumps_at): Likewise.
1075         (validate_inserted_breakpoint): Likewise.
1076         (clone_agent_expr): Likewise.
1077         * regcache.c (init_register_cache): Likewise.
1078         * remote-utils.c (putpkt_binary_1): Likewise.
1079         (decode_M_packet): Likewise.
1080         (decode_X_packet): Likewise.
1081         (look_up_one_symbol): Likewise.
1082         (relocate_instruction): Likewise.
1083         (monitor_output): Likewise.
1084         * server.c (handle_search_memory): Likewise.
1085         (handle_qxfer_exec_file): Likewise.
1086         (handle_qxfer_libraries): Likewise.
1087         (handle_qxfer): Likewise.
1088         (handle_query): Likewise.
1089         (handle_v_cont): Likewise.
1090         (handle_v_run): Likewise.
1091         (captured_main): Likewise.
1092         * target.c (write_inferior_memory): Likewise.
1093         * thread-db.c (try_thread_db_load_from_dir): Likewise.
1094         * tracepoint.c (init_trace_buffer): Likewise.
1095         (add_tracepoint_action): Likewise.
1096         (add_traceframe): Likewise.
1097         (add_traceframe_block): Likewise.
1098         (cmd_qtdpsrc): Likewise.
1099         (cmd_qtdv): Likewise.
1100         (cmd_qtstatus): Likewise.
1101         (response_source): Likewise.
1102         (response_tsv): Likewise.
1103         (cmd_qtnotes): Likewise.
1104         (gdb_collect): Likewise.
1105         (initialize_tracepoint): Likewise.
1106
1107 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
1108
1109         * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
1110         (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
1111         <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
1112         <NOP>: New.
1113         (enum aarch64_condition_codes): New enum.
1114         (w0): New static global.
1115         (fp): Likewise.
1116         (lr): Likewise.
1117         (struct aarch64_memory_operand) <type>: New
1118         MEMORY_OPERAND_POSTINDEX type.
1119         (postindex_memory_operand): New helper function.
1120         (emit_ret): New function.
1121         (emit_load_store_pair): New function, factored out of emit_stp
1122         with support for MEMORY_OPERAND_POSTINDEX.
1123         (emit_stp): Rewrite using emit_load_store_pair.
1124         (emit_ldp): New function.
1125         (emit_load_store): Likewise.
1126         (emit_ldr): Mention post-index instruction in comment.
1127         (emit_ldrh): New function.
1128         (emit_ldrb): New function.
1129         (emit_ldrsw): Mention post-index instruction in comment.
1130         (emit_str): Likewise.
1131         (emit_subs): New function.
1132         (emit_cmp): Likewise.
1133         (emit_and): Likewise.
1134         (emit_orr): Likewise.
1135         (emit_orn): Likewise.
1136         (emit_eor): Likewise.
1137         (emit_mvn): Likewise.
1138         (emit_lslv): Likewise.
1139         (emit_lsrv): Likewise.
1140         (emit_asrv): Likewise.
1141         (emit_mul): Likewise.
1142         (emit_sbfm): Likewise.
1143         (emit_sbfx): Likewise.
1144         (emit_ubfm): Likewise.
1145         (emit_ubfx): Likewise.
1146         (emit_csinc): Likewise.
1147         (emit_cset): Likewise.
1148         (emit_nop): Likewise.
1149         (emit_ops_insns): New helper function.
1150         (emit_pop): Likewise.
1151         (emit_push): Likewise.
1152         (aarch64_emit_prologue): New function.
1153         (aarch64_emit_epilogue): Likewise.
1154         (aarch64_emit_add): Likewise.
1155         (aarch64_emit_sub): Likewise.
1156         (aarch64_emit_mul): Likewise.
1157         (aarch64_emit_lsh): Likewise.
1158         (aarch64_emit_rsh_signed): Likewise.
1159         (aarch64_emit_rsh_unsigned): Likewise.
1160         (aarch64_emit_ext): Likewise.
1161         (aarch64_emit_log_not): Likewise.
1162         (aarch64_emit_bit_and): Likewise.
1163         (aarch64_emit_bit_or): Likewise.
1164         (aarch64_emit_bit_xor): Likewise.
1165         (aarch64_emit_bit_not): Likewise.
1166         (aarch64_emit_equal): Likewise.
1167         (aarch64_emit_less_signed): Likewise.
1168         (aarch64_emit_less_unsigned): Likewise.
1169         (aarch64_emit_ref): Likewise.
1170         (aarch64_emit_if_goto): Likewise.
1171         (aarch64_emit_goto): Likewise.
1172         (aarch64_write_goto_address): Likewise.
1173         (aarch64_emit_const): Likewise.
1174         (aarch64_emit_call): Likewise.
1175         (aarch64_emit_reg): Likewise.
1176         (aarch64_emit_pop): Likewise.
1177         (aarch64_emit_stack_flush): Likewise.
1178         (aarch64_emit_zero_ext): Likewise.
1179         (aarch64_emit_swap): Likewise.
1180         (aarch64_emit_stack_adjust): Likewise.
1181         (aarch64_emit_int_call_1): Likewise.
1182         (aarch64_emit_void_call_2): Likewise.
1183         (aarch64_emit_eq_goto): Likewise.
1184         (aarch64_emit_ne_goto): Likewise.
1185         (aarch64_emit_lt_goto): Likewise.
1186         (aarch64_emit_le_goto): Likewise.
1187         (aarch64_emit_gt_goto): Likewise.
1188         (aarch64_emit_ge_got): Likewise.
1189         (aarch64_emit_ops_impl): New static global variable.
1190         (aarch64_emit_ops): New target function, return
1191         &aarch64_emit_ops_impl.
1192         (struct linux_target_ops): Install it.
1193
1194 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
1195
1196         * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
1197         * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
1198         aarch64-ipa.o.
1199         * linux-aarch64-ipa.c: New file.
1200         * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
1201         and endian.h.
1202         (aarch64_get_thread_area): New target method.
1203         (extract_signed_bitfield): New helper function.
1204         (aarch64_decode_ldr_literal): New function.
1205         (enum aarch64_opcodes): New enum.
1206         (struct aarch64_register): New struct.
1207         (struct aarch64_operand): New struct.
1208         (x0): New static global.
1209         (x1): Likewise.
1210         (x2): Likewise.
1211         (x3): Likewise.
1212         (x4): Likewise.
1213         (w2): Likewise.
1214         (ip0): Likewise.
1215         (sp): Likewise.
1216         (xzr): Likewise.
1217         (aarch64_register): New helper function.
1218         (register_operand): Likewise.
1219         (immediate_operand): Likewise.
1220         (struct aarch64_memory_operand): New struct.
1221         (offset_memory_operand): New helper function.
1222         (preindex_memory_operand): Likewise.
1223         (enum aarch64_system_control_registers): New enum.
1224         (ENCODE): New macro.
1225         (emit_insn): New helper function.
1226         (emit_b): New function.
1227         (emit_bcond): Likewise.
1228         (emit_cb): Likewise.
1229         (emit_tb): Likewise.
1230         (emit_blr): Likewise.
1231         (emit_stp): Likewise.
1232         (emit_ldp_q_offset): Likewise.
1233         (emit_stp_q_offset): Likewise.
1234         (emit_load_store): Likewise.
1235         (emit_ldr): Likewise.
1236         (emit_ldrsw): Likewise.
1237         (emit_str): Likewise.
1238         (emit_ldaxr): Likewise.
1239         (emit_stxr): Likewise.
1240         (emit_stlr): Likewise.
1241         (emit_data_processing_reg): Likewise.
1242         (emit_data_processing): Likewise.
1243         (emit_add): Likewise.
1244         (emit_sub): Likewise.
1245         (emit_mov): Likewise.
1246         (emit_movk): Likewise.
1247         (emit_mov_addr): Likewise.
1248         (emit_mrs): Likewise.
1249         (emit_msr): Likewise.
1250         (emit_sevl): Likewise.
1251         (emit_wfe): Likewise.
1252         (append_insns): Likewise.
1253         (can_encode_int32_in): New helper function.
1254         (aarch64_relocate_instruction): New function.
1255         (aarch64_install_fast_tracepoint_jump_pad): Likewise.
1256         (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
1257         (struct linux_target_ops): Install aarch64_get_thread_area,
1258         aarch64_install_fast_tracepoint_jump_pad and
1259         aarch64_get_min_fast_tracepoint_insn_len.
1260
1261 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
1262
1263         * Makefile.in (aarch64-insn.o): New rule.
1264         * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
1265
1266 2015-09-21  Yao Qi  <yao.qi@linaro.org>
1267
1268         * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
1269
1270 2015-09-21  Yao Qi  <yao.qi@linaro.org>
1271
1272         * tracepoint.c (max_jump_pad_size): Remove.
1273
1274 2015-09-18  Yao Qi  <yao.qi@linaro.org>
1275
1276         * linux-aarch64-low.c: Don't include sys/uio.h.
1277         (ps_get_thread_area): Call aarch64_ps_get_thread_area.
1278
1279 2015-09-16  Wei-cheng Wang  <cole945@gmail.com>
1280
1281         * tracepoint.c (eval_result_type): Change prototype.
1282         (condition_true_at_tracepoint): Fix argument to compiled_cond.
1283
1284 2015-09-15  Pedro Alves  <palves@redhat.com>
1285
1286         * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
1287         Check whether to report exec events instead of checking whether
1288         multiprocess is enabled.
1289
1290 2015-09-15  Pedro Alves  <palves@redhat.com>
1291
1292         PR remote/18965
1293         * remote-utils.c (prepare_resume_reply): Merge
1294         TARGET_WAITKIND_VFORK_DONE switch case with the
1295         TARGET_WAITKIND_FORKED case.
1296
1297 2015-09-15  Yao Qi  <yao.qi@linaro.org>
1298
1299         * server.c (handle_query): Check string comparison using
1300         "else if" instead of "if".
1301
1302 2015-09-15  Yao Qi  <yao.qi@linaro.org>
1303
1304         * server.c (vCont_supported): New global variable.
1305         (handle_query): Set vCont_supported to 1 if "vContSupported+"
1306         matches.  Append ";vContSupported+" to own_buf.
1307         (handle_v_requests): Append ";s;S" to own_buf if target supports
1308         hardware single step or vCont_supported is false.
1309         (capture_main): Set vCont_supported to zero.
1310
1311 2015-09-15  Yao Qi  <yao.qi@linaro.org>
1312
1313         * linux-low.c (linux_supports_conditional_breakpoints): Rename
1314         it to ...
1315         (linux_supports_hardware_single_step): ... New function.
1316         (linux_target_ops): Update.
1317         * lynx-low.c (lynx_target_ops): Set field
1318         supports_hardware_single_step to target_can_do_hardware_single_step.
1319         * nto-low.c (nto_target_ops): Likewise.
1320         * spu-low.c (spu_target_ops): Likewise.
1321         * win32-low.c (win32_target_ops): Likewise.
1322         * target.c (target_can_do_hardware_single_step): New function.
1323         * target.h (struct target_ops) <supports_conditional_breakpoints>:
1324         Remove.  <supports_hardware_single_step>: New field.
1325         (target_supports_conditional_breakpoints): Remove.
1326         (target_supports_hardware_single_step): New macro.
1327         (target_can_do_hardware_single_step): Declare.
1328         * server.c (handle_query): Use target_supports_hardware_single_step
1329         instead of target_supports_conditional_breakpoints.
1330
1331 2015-09-15  Yao Qi  <yao.qi@linaro.org>
1332
1333         * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
1334         function.
1335         (struct linux_target_ops the_low_target): Install
1336         aarch64_linux_siginfo_fixup.
1337
1338 2015-09-11  Don Breazeal  <donb@codesourcery.com>
1339             Luis Machado  <lgustavo@codesourcery.com>
1340
1341         * linux-low.c (linux_mourn): Static declaration.
1342         (linux_arch_setup): Move in front of
1343         handle_extended_wait.
1344         (linux_arch_setup_thread): New function.
1345         (handle_extended_wait): Handle exec events.  Call
1346         linux_arch_setup_thread.  Make event_lwp argument a
1347         pointer-to-a-pointer.
1348         (check_zombie_leaders): Do not check stopped threads.
1349         (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
1350         (linux_low_filter_event): Add lwp and thread for exec'ing
1351         non-leader thread if leader thread has been deleted.
1352         Refactor code into linux_arch_setup_thread and call it.
1353         Pass child lwp pointer by reference to handle_extended_wait.
1354         (linux_wait_for_event_filtered): Update comment.
1355         (linux_wait_1): Prevent clobbering exec event status.
1356         (linux_supports_exec_events): New function.
1357         (linux_target_ops) <supports_exec_events>: Initialize new member.
1358         * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
1359         new member.
1360         * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
1361         * server.c (report_exec_events): New global variable.
1362         (handle_query): Handle qSupported query for exec-events feature.
1363         (captured_main): Initialize report_exec_events.
1364         * server.h (report_exec_events): Declare new global variable.
1365         * target.h (struct target_ops) <supports_exec_events>: New
1366         member.
1367         (target_supports_exec_events): New macro.
1368         * win32-low.c (win32_target_ops) <supports_exec_events>:
1369         Initialize new member.
1370
1371 2015-09-09  Markus Metzger  <markus.t.metzger@intel.com>
1372
1373         * linux-low.c (linux_low_enable_btrace): Remove.
1374         (linux_target_ops): Replace linux_low_enable_btrace with
1375         linux_enable_btrace.
1376
1377 2015-09-03  Yao Qi  <yao.qi@linaro.org>
1378
1379         * linux-aarch64-low.c (aarch64_insert_point): Call
1380         aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
1381         returns true.
1382
1383 2015-08-27  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1384
1385         * linux-low.c (check_stopped_by_breakpoint): Use
1386         GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
1387
1388 2015-08-27  Pedro Alves  <palves@redhat.com>
1389
1390         * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
1391
1392 2015-08-26  Simon Marchi  <simon.marchi@ericsson.com>
1393
1394         * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
1395         the XNEW-family equivalent.
1396         (compile_bytecodes): Likewise.
1397         * dll.c (loaded_dll): Likewise.
1398         * event-loop.c (append_callback_event): Likewise.
1399         (create_file_handler): Likewise.
1400         (create_file_event): Likewise.
1401         * hostio.c (handle_open): Likewise.
1402         * inferiors.c (add_thread): Likewise.
1403         (add_process): Likewise.
1404         * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
1405         * linux-arm-low.c (arm_new_process): Likewise.
1406         (arm_new_thread): Likewise.
1407         * linux-low.c (add_to_pid_list): Likewise.
1408         (linux_add_process): Likewise.
1409         (handle_extended_wait): Likewise.
1410         (add_lwp): Likewise.
1411         (enqueue_one_deferred_signal): Likewise.
1412         (enqueue_pending_signal): Likewise.
1413         (linux_resume_one_lwp_throw): Likewise.
1414         (linux_resume_one_thread): Likewise.
1415         (linux_read_memory): Likewise.
1416         (linux_write_memory): Likewise.
1417         * linux-mips-low.c (mips_linux_new_process): Likewise.
1418         (mips_linux_new_thread): Likewise.
1419         (mips_add_watchpoint): Likewise.
1420         * linux-x86-low.c (initialize_low_arch): Likewise.
1421         * lynx-low.c (lynx_add_process): Likewise.
1422         * mem-break.c (set_raw_breakpoint_at): Likewise.
1423         (set_breakpoint): Likewise.
1424         (add_condition_to_breakpoint): Likewise.
1425         (add_commands_to_breakpoint): Likewise.
1426         (clone_agent_expr): Likewise.
1427         (clone_one_breakpoint): Likewise.
1428         * regcache.c (new_register_cache): Likewise.
1429         * remote-utils.c (look_up_one_symbol): Likewise.
1430         * server.c (queue_stop_reply): Likewise.
1431         (start_inferior): Likewise.
1432         (queue_stop_reply_callback): Likewise.
1433         (handle_target_event): Likewise.
1434         * spu-low.c (fetch_ppc_memory): Likewise.
1435         (store_ppc_memory): Likewise.
1436         * target.c (set_target_ops): Likewise.
1437         * thread-db.c (thread_db_load_search): Likewise.
1438         (try_thread_db_load_1): Likewise.
1439         * tracepoint.c (add_tracepoint): Likewise.
1440         (add_tracepoint_action): Likewise.
1441         (create_trace_state_variable): Likewise.
1442         (cmd_qtdpsrc): Likewise.
1443         (cmd_qtro): Likewise.
1444         (add_while_stepping_state): Likewise.
1445         * win32-low.c (child_add_thread): Likewise.
1446         (get_image_name): Likewise.
1447
1448 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1449
1450         * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
1451
1452 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1453
1454         * Makefile.in (aarch64-linux.o): New rule.
1455         * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
1456         srv_tgtobj.
1457         * linux-aarch64-low.c: Include nat/aarch64-linux.h.
1458         (aarch64_init_debug_reg_state): Make it extern.
1459         (aarch64_linux_prepare_to_resume): Remove.
1460
1461 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1462
1463         * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
1464         lwp_arch_private_info and ptid_of_lwp.
1465
1466 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1467
1468         * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
1469         Find proc_info by find_process_pid.  All callers updated.
1470
1471 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1472
1473         * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
1474         Remove.
1475         (debug_reg_change_callback): Remove.
1476         (aarch64_notify_debug_reg_change): Remove.
1477
1478 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1479
1480         * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
1481         Call current_lwp_ptid.
1482
1483 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1484
1485         * linux-aarch64-low.c (debug_reg_change_callback): Use
1486         debug_printf.
1487
1488 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1489
1490         * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
1491
1492 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1493
1494         * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
1495
1496 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1497
1498         * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
1499         the code.
1500
1501 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1502
1503         * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
1504         Remove.
1505         (debug_reg_change_callback): Remove argument entry and add argument
1506         lwp.  Remove local variable thread.  Don't print thread id in the
1507         debugging output.  Don't check whether pid of thread equals to pid.
1508         (aarch64_notify_debug_reg_change): Don't set param.pid.  Call
1509         iterate_over_lwps instead find_inferior.
1510
1511 2015-08-24  Pedro Alves  <palves@redhat.com>
1512
1513         * inferiors.c (get_first_process): New function.
1514         * inferiors.h (get_first_process): New declaration.
1515         * remote-utils.c (read_ptid): Default to the first process in the
1516         list, instead of to the current thread's process.
1517
1518 2015-08-24  Pedro Alves  <palves@redhat.com>
1519
1520         * debug.c: Include gdb_sys_time.h instead of sys/time.h.
1521         * event-loop.c: Likewise.
1522         * remote-utils.c: Likewise.
1523         * tracepoint.c: Likewise.
1524
1525 2015-08-24  Pedro Alves  <palves@redhat.com>
1526
1527         * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
1528         ptid_get_lwp.
1529
1530 2015-08-21  Pedro Alves  <palves@redhat.com>
1531
1532         * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
1533         instead of literal 1.
1534
1535 2015-08-21  Pedro Alves  <palves@redhat.com>
1536
1537         * tdesc.c (default_description): Explicitly zero-initialize.
1538
1539 2015-08-21  Pedro Alves  <palves@redhat.com>
1540
1541         PR gdb/18749
1542         * inferiors.c (remove_thread): Discard any pending stop reply for
1543         this thread.
1544         * server.c (remove_all_on_match_pid): Rename to ...
1545         (remove_all_on_match_ptid): ... this.  Work with a filter ptid
1546         instead of a pid.
1547         (discard_queued_stop_replies): Change parameter to a ptid.  Now
1548         extern.
1549         (handle_v_kill, kill_inferior_callback, captured_main)
1550         (process_serial_event): Adjust.
1551         * server.h (discard_queued_stop_replies): Declare.
1552
1553 2015-08-21  Pedro Alves  <palves@redhat.com>
1554
1555         * linux-low.c (wait_for_sigstop): Always switch to no thread
1556         selected if the previously current thread dies.
1557         * lynx-low.c (lynx_request_interrupt): Use the first thread's
1558         process instead of the current thread's.
1559         * remote-utils.c (input_interrupt): Don't check if there's no
1560         current thread.
1561         * server.c (gdb_read_memory, gdb_write_memory): If setting the
1562         current thread to the general thread fails, error out.
1563         (handle_qxfer_auxv, handle_qxfer_libraries)
1564         (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
1565         (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
1566         (handle_query): Check if there's a thread selected instead of
1567         checking whether there's any thread in the thread list.
1568         (handle_qxfer_threads, handle_qxfer_btrace)
1569         (handle_qxfer_btrace_conf): Don't error out early if there's no
1570         thread in the thread list.
1571         (handle_v_cont, myresume): Don't set the current thread to the
1572         continue thread.
1573         (process_serial_event) <Hg handling>: Also set thread_id if the
1574         previous general thread is still alive.
1575         (process_serial_event) <g/G handling>: If setting the current
1576         thread to the general thread fails, error out.
1577         * spu-low.c (spu_resume, spu_request_interrupt): Use the first
1578         thread's lwp instead of the current thread's.
1579         * target.c (set_desired_thread): If the desired thread was not
1580         found, leave the current thread pointing to NULL.  Return an int
1581         (boolean) indicating success.
1582         * target.h (set_desired_thread): Change return type to int.
1583
1584 2015-08-20  Max Filippov  <jcmvbkbc@gmail.com>
1585
1586         * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
1587         * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
1588         #includes.
1589         (ps_get_thread_area): New function.
1590
1591 2015-08-19  Gary Benson  <gbenson@redhat.com>
1592
1593         * hostio.c (handle_pread): Do not attempt to read more data
1594         than hostio_reply_with_data can fit in a packet.
1595
1596 2015-08-18  Joel Brobecker  <brobecker@adacore.com>
1597
1598         * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
1599
1600 2015-08-14  Matthew Fortune  <matthew.fortune@imgtec.com>
1601
1602         * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
1603
1604 2015-08-06  Pedro Alves  <palves@redhat.com>
1605
1606         * tracepoint.c (expr_eval_result): Now an int.
1607
1608 2015-08-06  Pedro Alves  <palves@redhat.com>
1609
1610         * gdbthread.h (struct regcache): Forward declare.
1611         (struct thread_info) <regcache_data>: Now a struct regcache
1612         pointer.
1613         * inferiors.c (inferior_regcache_data)
1614         (set_inferior_regcache_data): Now work with struct regcache
1615         pointers.
1616         * inferiors.h (struct regcache): Forward declare.
1617         (inferior_regcache_data, set_inferior_regcache_data): Now work
1618         with struct regcache pointers.
1619         * regcache.c (get_thread_regcache, regcache_invalidate_thread)
1620         (free_register_cache_thread): Remove struct regcache pointer
1621         casts.
1622
1623 2015-08-06  Pedro Alves  <palves@redhat.com>
1624
1625         * server.c (captured_main): On error, print the exception message
1626         to stderr, and if run_once is set, throw a quit.
1627
1628 2015-08-06  Pedro Alves  <palves@redhat.com>
1629
1630         * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
1631         the current thread.
1632
1633 2015-08-06  Pedro Alves  <palves@redhat.com>
1634
1635         * linux-low.c (linux_write_memory): Rewrite debug output to avoid
1636         reading beyond the passed in buffer length.
1637
1638 2015-08-06  Pierre Langlois  <pierre.langlois@arm.com>
1639
1640         * tracepoint.c (symbol_list) <required>: Remove.
1641
1642 2015-08-06  Pedro Alves  <palves@redhat.com>
1643
1644         * linux-low.c (handle_extended_wait): Set the fork child's suspend
1645         count if stopping and suspending threads.
1646         (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1647         stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1648         (linux_detach): Complete an ongoing step-over.
1649         (lwp_suspended_inc, lwp_suspended_decr): New functions.  Use
1650         throughout.
1651         (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1652         (linux_wait_1): If passing a signal to the inferior after
1653         finishing a step-over, unsuspend and re-resume all lwps.  If we
1654         see a single-step event but the thread should be continuing, don't
1655         pass the trap to gdb.
1656         (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1657         internal_error instead of gdb_assert.
1658         (enqueue_pending_signal): New function.
1659         (check_ptrace_stopped_lwp_gone): Add debug output.
1660         (start_step_over): Use internal_error instead of gdb_assert.
1661         (complete_ongoing_step_over): New function.
1662         (linux_resume_one_thread): Don't resume a suspended thread.
1663         (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1664         it stepping.
1665
1666 2015-08-06  Pedro Alves  <palves@redhat.com>
1667
1668         * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1669         (linux_thread_alive): Use lwp_is_marked_dead.
1670         (extended_event_reported): Delete.
1671         (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1672         instead of extended_event_reported.
1673         (mark_lwp_dead): Don't set the 'dead' flag.  Store the waitstatus
1674         as well.
1675         (lwp_is_marked_dead): New function.
1676         (lwp_running): Use lwp_is_marked_dead.
1677         * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1678         comment.
1679
1680 2015-08-06  Pedro Alves  <palves@redhat.com>
1681
1682         * linux-low.c (linux_wait_1): Move fork event output out of the
1683         !report_to_gdb check.  Pass event_child->waitstatus to
1684         target_waitstatus_to_string instead of ourstatus.
1685
1686 2015-08-04  Yao Qi  <yao.qi@linaro.org>
1687
1688         * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1689         if current_thread is 32 bit.
1690
1691 2015-08-04  Yao Qi  <yao.qi@linaro.org>
1692
1693         * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1694         0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1695         * server.c (extended_protocol): Remove "static".
1696         * server.h (extended_protocol): Declare it.
1697
1698 2015-08-04  Yao Qi  <yao.qi@linaro.org>
1699
1700         * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1701         both aarch64 and aarch32.
1702         (aarch64_set_pc): Likewise.
1703
1704 2015-08-04  Yao Qi  <yao.qi@linaro.org>
1705
1706         * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1707         to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1708         arm-with-neon.xml to srv_xmlfiles.
1709         * linux-aarch64-low.c: Include linux-aarch32-low.h.
1710         (is_64bit_tdesc): New function.
1711         (aarch64_linux_read_description): New function.
1712         (aarch64_arch_setup): Call aarch64_linux_read_description.
1713         (regs_info): Rename to regs_info_aarch64.
1714         (aarch64_regs_info): Return right regs_info.
1715         (initialize_low_arch): Call initialize_low_arch_aarch32.
1716
1717 2015-08-04  Yao Qi  <yao.qi@linaro.org>
1718
1719         * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1720         * linux-aarch32-low.c: New file.
1721         * linux-aarch32-low.h: New file.
1722         * linux-arm-low.c (arm_fill_gregset): Move it to
1723         linux-aarch32-low.c.
1724         (arm_store_gregset): Likewise.
1725         (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1726         (arm_store_vfpregset): Call arm_store_vfpregset_num.
1727         (arm_arch_setup): Check if PTRACE_GETREGSET works.
1728         (regs_info): Rename to regs_info_arm.
1729         (arm_regs_info): Return regs_info_aarch32 if
1730         have_ptrace_getregset is 1 and target description is
1731         arm_with_neon or arm_with_vfpv3.
1732         (initialize_low_arch): Don't call init_registers_arm_with_neon.
1733         Call initialize_low_arch_aarch32 instead.
1734
1735 2015-08-04  Yao Qi  <yao.qi@linaro.org>
1736
1737         * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1738         * linux-low.c: ... here.
1739         * linux-low.h (have_ptrace_getregset): Declare it.
1740
1741 2015-08-04  Pedro Alves  <palves@redhat.com>
1742
1743         * thread-db.c (struct thread_db): Use new typedefs.
1744         (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1745         CHK calls.
1746         (disable_thread_event_reporting): Cast result of dlsym to
1747         destination function pointer type.
1748         (thread_db_mourn): Use td_ta_delete_ftype.
1749
1750 2015-08-03  Sandra Loosemore  <sandra@codesourcery.com>
1751
1752         * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1753         arch variant.
1754         (CDX_BREAKPOINT): Define for R2.
1755         (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1756         (the_low_target): Add comments.
1757
1758 2015-07-30  Yao Qi  <yao.qi@linaro.org>
1759
1760         * linux-arm-low.c (arm_hwcap): Remove it.
1761         (arm_read_description): New local variable arm_hwcap.  Don't
1762         set arm_hwcap to zero.
1763
1764 2015-07-30  Yao Qi  <yao.qi@linaro.org>
1765
1766         * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1767         Use regcache->tdesc instead.
1768         (arm_store_wmmxregset): Likewise.
1769         (arm_fill_vfpregset): Likewise.
1770         (arm_store_vfpregset): Likewise.
1771
1772 2015-07-30  Yao Qi  <yao.qi@linaro.org>
1773
1774         * linux-arm-low.c: Include arch/arm.h.
1775         (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1776         (arm_store_gregset): Likewise.
1777
1778 2015-07-29  Simon Marchi  <simon.marchi@ericsson.com>
1779
1780         * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1781         ptrace's 4th parameter.
1782
1783 2015-07-27  Yao Qi  <yao.qi@linaro.org>
1784
1785         * configure.srv (case aarch64*-*-linux*): Don't set
1786         srv_linux_usrregs.
1787
1788 2015-07-24  Pedro Alves  <palves@redhat.c: Likewise.om>
1789
1790         * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1791         sys/ptrace.h.
1792         * linux-arm-low.c: Likewise.
1793         * linux-cris-low.c: Likewise.
1794         * linux-crisv32-low.c: Likewise.
1795         * linux-low.c: Likewise.
1796         * linux-m68k-low.c: Likewise.
1797         * linux-mips-low.c: Likewise.
1798         * linux-nios2-low.c: Likewise.
1799         * linux-s390-low.c: Likewise.
1800         * linux-sparc-low.c: Likewise.
1801         * linux-tic6x-low.c: Likewise.
1802         * linux-tile-low.c: Likewise.
1803         * linux-x86-low.c: Likewise.
1804
1805 2015-07-24  Pedro Alves  <palves@redhat.com>
1806
1807         * config.in: Regenerate.
1808         * configure: Regenerate.
1809
1810 2015-07-24  Pedro Alves  <palves@redhat.com>
1811
1812         * acinclude.m4: Include ../ptrace.m4.
1813         * configure.ac: Call GDB_AC_PTRACE.
1814         * config.in, configure: Regenerate.
1815
1816 2015-07-24  Yao Qi  <yao.qi@linaro.org>
1817
1818         * linux-low.c (linux_create_inferior): Remove setting to
1819         proc->priv->new_inferior.
1820         (linux_attach): Likewise.
1821         (linux_low_filter_event): Likewise.
1822         * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1823
1824 2015-07-24  Yao Qi  <yao.qi@linaro.org>
1825
1826         * linux-low.c (linux_arch_setup): New function.
1827         (linux_low_filter_event): If proc->tdesc is NULL and
1828         proc->attached is true, call the_low_target.arch_setup.
1829         Otherwise, keep status pending, and return.
1830         (linux_resume_one_lwp_throw): Don't call get_pc if
1831         thread->while_stepping isn't NULL.  Don't call
1832         get_thread_regcache if proc->tdesc is NULL.
1833         (need_step_over_p): Return 0 if proc->tdesc is NULL.
1834         (linux_target_ops): Install arch_setup.
1835         * server.c (start_inferior): Call the_target->arch_setup.
1836         * target.h (struct target_ops) <arch_setup>: New field.
1837         (target_arch_setup): New marco.
1838         * lynx-low.c (lynx_target_ops): Update.
1839         * nto-low.c (nto_target_ops): Update.
1840         * spu-low.c (spu_target_ops): Update.
1841         * win32-low.c (win32_target_ops): Update.
1842
1843 2015-07-24  Yao Qi  <yao.qi@linaro.org>
1844
1845         * linux-low.c (linux_add_process): Don't set
1846         proc->priv->new_inferior.
1847         (linux_create_inferior): Set proc->priv->new_inferior to 1.
1848         (linux_attach): Likewise.
1849
1850 2015-07-24  Yao Qi  <yao.qi@linaro.org>
1851
1852         * server.c (start_inferior): Code refactor.
1853
1854 2015-07-24  Yao Qi  <yao.qi@linaro.org>
1855
1856         * server.c (process_serial_event): Set general_thread.
1857
1858 2015-07-21  Yao Qi  <yao.qi@linaro.org>
1859
1860         * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1861         aarch64_linux_get_debug_reg_capacity.
1862
1863 2015-07-17  Yao Qi  <yao.qi@linaro.org>
1864
1865         * Makefile.in (aarch64-linux-hw-point.o): New rule.
1866         * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1867         * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1868         (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1869         (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1870         (AARCH64_HWP_ALIGNMENT): Likewise.
1871         (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1872         (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1873         (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1874         (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1875         (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1876         (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1877         (struct aarch64_debug_reg_state): Likewise.
1878         (struct arch_lwp_info): Likewise.
1879         (aarch64_align_watchpoint): Likewise.
1880         (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1881         (aarch64_watchpoint_length): Likewise.
1882         (aarch64_point_encode_ctrl_reg): Likewise
1883         (aarch64_point_is_aligned): Likewise.
1884         (aarch64_align_watchpoint): Likewise.
1885         (aarch64_linux_set_debug_regs):
1886         (aarch64_dr_state_insert_one_point): Likewise.
1887         (aarch64_dr_state_remove_one_point): Likewise.
1888         (aarch64_handle_breakpoint): Likewise.
1889         (aarch64_handle_aligned_watchpoint): Likewise.
1890         (aarch64_handle_unaligned_watchpoint): Likewise.
1891         (aarch64_handle_watchpoint): Likewise.
1892
1893 2015-07-17  Yao Qi  <yao.qi@linaro.org>
1894
1895         * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1896         and don't aarch64_get_debug_reg_state.  All callers update.
1897         (aarch64_handle_aligned_watchpoint): Likewise.
1898         (aarch64_handle_unaligned_watchpoint): Likewise.
1899         (aarch64_handle_watchpoint): Likewise.
1900         (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1901         (aarch64_remove_point): Likewise.
1902
1903 2015-07-17  Yao Qi  <yao.qi@linaro.org>
1904
1905         * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1906         debug_printf.
1907         (aarch64_handle_unaligned_watchpoint): Likewise.
1908
1909 2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
1910
1911         Revert the previous 3 commits:
1912         Move gdb_regex* to common/
1913         Move linux_find_memory_regions_full & co.
1914         gdbserver build-id attribute generator
1915
1916 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
1917             Jan Kratochvil  <jan.kratochvil@redhat.com>
1918
1919         gdbserver build-id attribute generator.
1920         * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1921         (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1922         (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1923         (find_phdr): New.
1924         (get_dynamic): Use find_pdhr to traverse program headers.
1925         (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1926         (compare_mapping_entry_range, struct find_memory_region_callback_data)
1927         (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1928         (get_hex_build_id): New.
1929         (linux_qxfer_libraries_svr4): Add optional build-id attribute
1930         to reply XML document.
1931
1932 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
1933             Jan Kratochvil  <jan.kratochvil@redhat.com>
1934
1935         * target.c: Include target/target-utils.h and fcntl.h.
1936         (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1937         (target_fileio_read_stralloc): New functions.
1938
1939 2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
1940
1941         * Makefile.in (OBS): Add gdb_regex.o.
1942         (gdb_regex.o): New.
1943         * config.in: Rebuilt.
1944         * configure: Rebuilt.
1945
1946 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
1947             Jan Kratochvil  <jan.kratochvil@redhat.com>
1948
1949         Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1950         * Makefile.in (OBS): Add target-utils.o.
1951         (linux-maps.o, target-utils.o): New.
1952         * configure.srv (srv_linux_obj): Add linux-maps.o.
1953
1954 2015-07-15  Pierre Langlois  <pierre.langlois@arm.com>
1955
1956         * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1957         function, return 1.
1958         (the_low_target): Install it.
1959
1960 2015-07-14  Pedro Alves  <palves@redhat.com>
1961
1962         * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1963         Instead, ignore ECHILD, and throw an error for other errnos.
1964
1965 2015-07-10  Pedro Alves  <palves@redhat.com>
1966
1967         * event-loop.c (struct callback_event) <data>: Change type to
1968         gdb_client_data instance instead of gdb_client_data pointer.
1969         (append_callback_event): Adjust.
1970
1971 2015-07-10  Pierre Langlois  <pierre.langlois@arm.com>
1972
1973         * linux-aarch64-low.c: Add comments for each linux_target_ops
1974         method.  Remove comments already covered in target_ops and
1975         linux_target_ops definitions.
1976         (the_low_target): Add comments for each unimplemented method.
1977
1978 2015-07-09  Yao Qi  <yao.qi@linaro.org>
1979
1980         * linux-aarch64-low.c (aarch64_regmap): Remove.
1981         (aarch64_usrregs_info): Remove.
1982         (regs_info): Set field usrregs to NULL.
1983
1984 2015-07-02  Markus Metzger  <markus.t.metzger@intel.com>
1985
1986         * linux-low.c: Include "rsp-low.h"
1987         (linux_low_encode_pt_config, linux_low_encode_raw): New.
1988         (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1989         (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1990         (handle_btrace_enable_pt): New.
1991         (handle_btrace_general_set): Support "pt".
1992         (handle_btrace_conf_general_set): Support "pt:size".
1993
1994 2015-06-29  Pierre Langlois  <pierre.langlois@arm.com>
1995
1996         * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1997         Z_PACKET_SW_BP.
1998
1999 2015-06-29  Pierre Langlois  <pierre.langlois@arm.com>
2000
2001         * linux-aarch64-low.c: Remove comment about endianness.
2002         (aarch64_breakpoint): Change type to gdb_byte[].  Set to "brk #0".
2003         (aarch64_breakpoint_at): Change type of insn to gdb_byte[].  Use
2004         memcmp.
2005
2006 2015-06-24  Gary Benson  <gbenson@redhat.com>
2007
2008         * linux-i386-ipa.c (stdint.h): Do not include.
2009         * lynx-i386-low.c (stdint.h): Likewise.
2010         * lynx-ppc-low.c (stdint.h): Likewise.
2011         * mem-break.c (stdint.h): Likewise.
2012         * thread-db.c (stdint.h): Likewise.
2013         * tracepoint.c (stdint.h): Likewise.
2014         * win32-low.c (stdint.h): Likewise.
2015
2016 2015-06-18  Simon Marchi  <simon.marchi@ericsson.com>
2017
2018         * server.c (write_qxfer_response): Update call to
2019         remote_escape_output.
2020
2021 2015-06-15  Aleksandar Ristovski  <aristovski@qnx.com
2022             Jan Kratochvil  <jan.kratochvil@redhat.com>
2023
2024         Merge multiple hex conversions.
2025         * gdbreplay.c (tohex): Rename to 'fromhex'.
2026         (logchar): Use fromhex.
2027
2028 2015-06-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
2029
2030         * server.c (handle_qxfer_libraries): Set `version' attribute for
2031         <library-list>.
2032
2033 2015-06-10  Gary Benson  <gbenson@redhat.com>
2034
2035         * target.h (struct target_ops) <multifs_open>: New field.
2036         <multifs_unlink>: Likewise.
2037         <multifs_readlink>: Likewise.
2038         * linux-low.c (nat/linux-namespaces.h): New include.
2039         (linux_target_ops): Initialize the_target->multifs_open,
2040         the_target->multifs_unlink and the_target->multifs_readlink.
2041         * hostio.h (hostio_handle_new_gdb_connection): New declaration.
2042         * hostio.c (hostio_fs_pid): New static variable.
2043         (hostio_handle_new_gdb_connection): New function.
2044         (handle_setfs): Likewise.
2045         (handle_open): Use the_target->multifs_open as appropriate.
2046         (handle_unlink): Use the_target->multifs_unlink as appropriate.
2047         (handle_readlink): Use the_target->multifs_readlink as
2048         appropriate.
2049         (handle_vFile): Handle vFile:setfs packets.
2050         * server.c (handle_query): Call hostio_handle_new_gdb_connection
2051         after target_handle_new_gdb_connection.
2052
2053 2015-06-10  Gary Benson  <gbenson@redhat.com>
2054
2055         * configure.ac (AC_CHECK_FUNCS): Add setns.
2056         * config.in: Regenerate.
2057         * configure: Likewise.
2058         * Makefile.in (SFILES): Add nat/linux-namespaces.c.
2059         (linux-namespaces.o): New rule.
2060         * configure.srv (srv_linux_obj): Add linux-namespaces.o.
2061
2062 2015-06-09  Gary Benson <gbenson@redhat.com>
2063
2064         * hostio.c (handle_open): Process mode argument with
2065         fileio_to_host_mode.
2066
2067 2015-06-01  Yao Qi  <yao.qi@linaro.org>
2068
2069         * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
2070         * linux-x86-low.c: Likewise.
2071
2072 2015-05-28  Don Breazeal  <donb@codesourcery.com>
2073
2074         * linux-low.c (handle_extended_wait): Initialize
2075         thread_info.last_resume_kind for new fork children.
2076
2077 2015-05-15  Pedro Alves  <palves@redhat.com>
2078
2079         * target.h (target_handle_new_gdb_connection): Rewrite using if
2080         wrapped in do/while.
2081
2082 2015-05-14  Joel Brobecker  <brobecker@adacore.com>
2083
2084         * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
2085         * configure, config.in: Regenerate.
2086         * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
2087         Declare typedef.
2088
2089 2015-05-12  Don Breazeal  <donb@codesourcery.com>
2090
2091         * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
2092         PTRACE_EVENT_VFORK_DONE.
2093         (linux_low_ptrace_options, extended_event_reported): Add vfork
2094         events.
2095         * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
2096         and "vforkdone" for RSP 'T' Stop Reply Packet.
2097         * server.h (report_vfork_events): Declare
2098         global variable.
2099
2100 2015-05-12  Don Breazeal  <donb@codesourcery.com>
2101
2102         * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
2103         (the_low_target) <new_fork>: Initialize new member.
2104         * linux-arm-low.c (arm_new_fork): New function.
2105         (the_low_target) <new_fork>: Initialize new member.
2106         * linux-low.c (handle_extended_wait): Call new target function
2107         new_fork.
2108         * linux-low.h (struct linux_target_ops) <new_fork>: New member.
2109         * linux-mips-low.c (mips_add_watchpoint): New function
2110         extracted from mips_insert_point.
2111         (the_low_target) <new_fork>: Initialize new member.
2112         (mips_linux_new_fork): New function.
2113         (mips_insert_point): Call mips_add_watchpoint.
2114         * linux-x86-low.c (x86_linux_new_fork): New function.
2115         (the_low_target) <new_fork>: Initialize new member.
2116
2117 2015-05-12  Don Breazeal  <donb@codesourcery.com>
2118
2119         * linux-low.c (handle_extended_wait): Implement return value,
2120         rename argument 'event_child' to 'event_lwp', handle
2121         PTRACE_EVENT_FORK, call internal_error for unrecognized event.
2122         (linux_low_ptrace_options): New function.
2123         (linux_low_filter_event): Call linux_low_ptrace_options,
2124         use different argument fo linux_enable_event_reporting,
2125         use return value from handle_extended_wait.
2126         (extended_event_reported): New function.
2127         (linux_wait_1): Call extended_event_reported and set
2128         status to report fork events.
2129         (linux_write_memory): Add pid to debug message.
2130         (reset_lwp_ptrace_options_callback): New function.
2131         (linux_handle_new_gdb_connection): New function.
2132         (linux_target_ops): Initialize new structure member.
2133         * linux-low.h (struct lwp_info) <waitstatus>: New member.
2134         * lynx-low.c: Initialize new structure member.
2135         * remote-utils.c (prepare_resume_reply): Implement stop reason
2136         "fork" for "T" stop message.
2137         * server.c (handle_query): Call handle_new_gdb_connection.
2138         * server.h (report_fork_events): Declare global flag.
2139         * target.h (struct target_ops) <handle_new_gdb_connection>:
2140         New member.
2141         (target_handle_new_gdb_connection): New macro.
2142         * win32-low.c: Initialize new structure member.
2143
2144 2015-05-12  Don Breazeal  <donb@codesourcery.com>
2145
2146         * mem-break.c (APPEND_TO_LIST): Define macro.
2147         (clone_agent_expr): New function.
2148         (clone_one_breakpoint): New function.
2149         (clone_all_breakpoints): New function.
2150         * mem-break.h: Declare new functions.
2151
2152 2015-05-12  Don Breazeal  <donb@codesourcery.com>
2153
2154         * linux-low.c (linux_supports_fork_events): New function.
2155         (linux_supports_vfork_events): New function.
2156         (linux_target_ops): Initialize new structure members.
2157         (initialize_low): Call linux_check_ptrace_features.
2158         * lynx-low.c (lynx_target_ops): Initialize new structure
2159         members.
2160         * server.c (report_fork_events, report_vfork_events):
2161         New global flags.
2162         (handle_query): Add new features to qSupported packet and
2163         response.
2164         (captured_main): Initialize new global variables.
2165         * target.h (struct target_ops) <supports_fork_events>:
2166         New member.
2167         <supports_vfork_events>: New member.
2168         (target_supports_fork_events): New macro.
2169         (target_supports_vfork_events): New macro.
2170         * win32-low.c (win32_target_ops): Initialize new structure
2171         members.
2172
2173 2015-05-12  Gary Benson <gbenson@redhat.com>
2174
2175         * server.c (handle_qxfer_exec_file): Use current process
2176         if annex is empty.
2177
2178 2015-05-08  Sandra Loosemore  <sandra@codesourcery.com>
2179
2180         * linux-nios2-low.c: Include elf/common.h.  Adjust comments.
2181         Remove HAVE_PTRACE_GETREGS conditionals.
2182         (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
2183         instead of PTRACE_GETREGS and PTRACE_SETREGS.
2184
2185 2015-05-08  Yao Qi  <yao.qi@linaro.org>
2186
2187         * linux-low.c (linux_supports_conditional_breakpoints): New
2188         function.
2189         (linux_target_ops): Install new target method.
2190         * lynx-low.c (lynx_target_ops): Install NULL hook for
2191         supports_conditional_breakpoints.
2192         * nto-low.c (nto_target_ops): Likewise.
2193         * spu-low.c (spu_target_ops): Likewise.
2194         * win32-low.c (win32_target_ops): Likewise.
2195         * server.c (handle_query): Check
2196         target_supports_conditional_breakpoints.
2197         * target.h (struct target_ops) <supports_conditional_breakpoints>:
2198         New field.
2199         (target_supports_conditional_breakpoints): New macro.
2200
2201 2015-05-06  Pedro Alves  <palves@redhat.com>
2202
2203         PR server/18081
2204         * server.c (start_inferior): If the process exits, mourn it.
2205
2206 2015-04-21  Gary Benson <gbenson@redhat.com>
2207
2208         * hostio.c (fileio_open_flags_to_host): Factored out to
2209         fileio_to_host_openflags in common/fileio.c.  Single use
2210         updated.
2211
2212 2015-04-17  Max Filippov  <jcmvbkbc@gmail.com>
2213
2214         * linux-xtensa-low.c (xtensa_fill_gregset)
2215         (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
2216         XCHAL_HAVE_LOOP.
2217
2218 2015-04-17  Max Filippov  <jcmvbkbc@gmail.com>
2219
2220         * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
2221         (regs_info): Replace usrregs pointer with NULL.
2222
2223 2015-04-17  Gary Benson  <gbenson@redhat.com>
2224
2225         * target.h (struct target_ops) <pid_to_exec_file>: New field.
2226         * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
2227         * server.c (handle_qxfer_exec_file): New function.
2228         (qxfer_packets): Add exec-file entry.
2229         (handle_query): Report qXfer:exec-file:read as supported packet.
2230
2231 2015-04-14  Romain Naour <romain.naour@openwide.fr>  (tiny change)
2232
2233         * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
2234
2235 2015-04-09  Gary Benson <gbenson@redhat.com>
2236
2237         * hostio-errno.c (errno_to_fileio_error): Remove function.
2238         Update caller to use remote_fileio_to_fio_error.
2239
2240 2015-04-09  Yao Qi  <yao.qi@linaro.org>
2241
2242         * linux-low.c (linux_insert_point): Call
2243         insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
2244         (linux_remove_point): Call remove_memory_breakpoint if type is
2245         raw_bkpt_type_sw.
2246         * linux-x86-low.c (x86_insert_point): Don't call
2247         insert_memory_breakpoint.
2248         (x86_remove_point): Don't call remove_memory_breakpoint.
2249
2250 2015-04-01  Pedro Alves  <palves@redhat.com>
2251             Cleber Rosa  <crosa@redhat.com>
2252
2253         * server.c (gdbserver_usage): Reorganize and extend the usage
2254         message.
2255
2256 2015-03-24  Pedro Alves  <palves@redhat.com>
2257
2258         * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
2259         output.  Also dump TRAP_TRACE.
2260         (linux_low_filter_event): In debug output, distinguish a
2261         resume_stop SIGSTOP from a delayed SIGSTOP.
2262
2263 2015-03-24  Gary Benson  <gbenson@redhat.com>
2264
2265         * linux-x86-low.c (x86_linux_new_thread): Moved to
2266         nat/x86-linux.c.
2267         (x86_linux_prepare_to_resume): Likewise.
2268
2269 2015-03-24  Gary Benson  <gbenson@redhat.com>
2270
2271         * Makefile.in (x86-linux-dregs.o): New rule.
2272         * configure.srv: Add x86-linux-dregs.o to relevant targets.
2273         * linux-x86-low.c: Include nat/x86-linux-dregs.h.
2274         (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
2275         (x86_linux_dr_get): Likewise.
2276         (x86_linux_dr_set): Likewise.
2277         (update_debug_registers_callback): Likewise.
2278         (x86_linux_dr_set_addr): Likewise.
2279         (x86_linux_dr_get_addr): Likewise.
2280         (x86_linux_dr_set_control): Likewise.
2281         (x86_linux_dr_get_control): Likewise.
2282         (x86_linux_dr_get_status): Likewise.
2283         (x86_linux_update_debug_registers): Likewise.
2284
2285 2015-03-24  Gary Benson  <gbenson@redhat.com>
2286
2287         * linux-x86-low.c (x86_linux_update_debug_registers):
2288         New function, factored out from...
2289         (x86_linux_prepare_to_resume): ...this.
2290
2291 2015-03-24  Gary Benson  <gbenson@redhat.com>
2292
2293         * linux-x86-low.c (x86_linux_dr_get): Update comments.
2294         (x86_linux_dr_set): Likewise.
2295         (update_debug_registers_callback): Likewise.
2296         (x86_linux_dr_set_addr): Likewise.
2297         (x86_linux_dr_get_addr): Likewise.
2298         (x86_linux_dr_set_control): Likewise.
2299         (x86_linux_dr_get_control): Likewise.
2300         (x86_linux_dr_get_status): Likewise.
2301         (x86_linux_prepare_to_resume): Likewise.
2302
2303 2015-03-24  Gary Benson  <gbenson@redhat.com>
2304
2305         * linux-x86-low.c (x86_linux_dr_get): Add assertion.
2306         Use perror_with_name.  Pass string through gettext.
2307         (x86_linux_dr_set): Likewise.
2308
2309 2015-03-24  Gary Benson  <gbenson@redhat.com>
2310
2311         * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
2312         (x86_linux_dr_set_addr): ...this.
2313         (x86_dr_low_get_addr): Rename to...
2314         (x86_linux_dr_get_addr): ...this.
2315         (x86_dr_low_set_control): Rename to...
2316         (x86_linux_dr_set_control): ...this.
2317         (x86_dr_low_get_control): Rename to...
2318         (x86_linux_dr_get_control): ...this.
2319         (x86_dr_low_get_status): Rename to...
2320         (x86_linux_dr_get_status): ...this.
2321         (x86_dr_low): Update with new function names.
2322
2323 2015-03-24  Gary Benson  <gbenson@redhat.com>
2324
2325         * Makefile.in (x86-linux.o): New rule.
2326         * configure.srv: Add x86-linux.o to relevant targets.
2327         * linux-low.c (lwp_set_arch_private_info): New function.
2328         (lwp_arch_private_info): Likewise.
2329         * linux-x86-low.c: Include nat/x86-linux.h.
2330         (arch_lwp_info): Removed structure.
2331         (update_debug_registers_callback):
2332         Use lwp_set_debug_registers_changed.
2333         (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
2334         and lwp_set_debug_registers_changed.
2335         (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
2336
2337 2015-03-24  Gary Benson  <gbenson@redhat.com>
2338
2339         * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
2340         * linux-arm-low.c (arm_new_thread): Likewise.
2341         * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
2342         * linux-mips-low.c (mips_linux_new_thread): Likewise.
2343         * linux-x86-low.c (x86_linux_new_thread): Likewise.
2344         * linux-low.c (add_lwp): Update the_low_target.new_thread call.
2345
2346 2015-03-24  Gary Benson  <gbenson@redhat.com>
2347
2348         * linux-low.c (ptid_of_lwp): New function.
2349         (lwp_is_stopped): Likewise.
2350         (lwp_stop_reason): Likewise.
2351         * linux-x86-low.c (update_debug_registers_callback):
2352         Use lwp_is_stopped.
2353         (x86_linux_prepare_to_resume): Use ptid_of_lwp and
2354         lwp_stop_reason.
2355
2356 2015-03-24  Gary Benson  <gbenson@redhat.com>
2357
2358         * linux-low.h (linux_stop_lwp): Remove declaration.
2359
2360 2015-03-24  Gary Benson  <gbenson@redhat.com>
2361
2362         * linux-low.h: Include nat/linux-nat.h.
2363         * linux-low.c (iterate_over_lwps_args): New structure.
2364         (iterate_over_lwps_filter): New function.
2365         (iterate_over_lwps): Likewise.
2366         * linux-x86-low.c (update_debug_registers_callback):
2367         Update signature to what iterate_over_lwps expects.
2368         Remove PID check that iterate_over_lwps now performs.
2369         (x86_dr_low_set_addr): Use iterate_over_lwps.
2370         (x86_dr_low_set_control): Likewise.
2371
2372 2015-03-24  Gary Benson  <gbenson@redhat.com>
2373
2374         * linux-x86-low.c (x86_debug_reg_state): New function.
2375         (x86_linux_prepare_to_resume): Use the above.
2376
2377 2015-03-24  Gary Benson  <gbenson@redhat.com>
2378
2379         * linux-low.c (current_lwp_ptid): New function.
2380         * linux-x86-low.c: Include nat/linux-nat.h.
2381         (x86_dr_low_get_addr): Use current_lwp_ptid.
2382         (x86_dr_low_get_control): Likewise.
2383         (x86_dr_low_get_status): Likewise.
2384
2385 2015-03-20  Pedro Alves  <palves@redhat.com>
2386
2387         * tracepoint.c (cmd_qtstatus): Make "str" const.
2388
2389 2015-03-20  Pedro Alves  <palves@redhat.com>
2390
2391         * server.c (handle_general_set): Make "req_str" const.
2392
2393 2015-03-19  Pedro Alves  <palves@redhat.com>
2394
2395         * linux-low.c (linux_resume_one_lwp): Rename to ...
2396         (linux_resume_one_lwp_throw): ... this.  Don't handle ESRCH here,
2397         instead call perror_with_name.
2398         (check_ptrace_stopped_lwp_gone): New function.
2399         (linux_resume_one_lwp): Reimplement as wrapper around
2400         linux_resume_one_lwp_throw that swallows errors if the LWP is
2401         gone.
2402
2403 2015-03-19  Pedro Alves  <palves@redhat.com>
2404
2405         * linux-low.c (count_events_callback, select_event_lwp_callback):
2406         No longer check whether the thread has resume_stop as last resume
2407         kind.
2408
2409 2015-03-19 Pedro Alves  <palves@redhat.com>
2410
2411         * linux-low.c (count_events_callback, select_event_lwp_callback):
2412         Use the lwp's status_pending_p field, not the thread's.
2413
2414 2015-03-19  Pedro Alves  <palves@redhat.com>
2415
2416         * linux-low.c (select_event_lwp_callback): Update comments to
2417         no longer mention SIGTRAP.
2418
2419 2015-03-18  Gary Benson  <gbenson@redhat.com>
2420
2421         * server.c (handle_query): Do not report vFile:fstat as supported.
2422
2423 2015-03-11  Gary Benson  <gbenson@redhat.com>
2424
2425         * hostio.c (sys/types.h): New include.
2426         (sys/stat.h): Likewise.
2427         (common-remote-fileio.h): Likewise.
2428         (handle_fstat): New function.
2429         (handle_vFile): Handle vFile:fstat packets.
2430
2431 2015-03-11  Gary Benson  <gbenson@redhat.com>
2432
2433         * configure.ac (AC_CHECK_MEMBERS): Add checks for
2434         struct stat.st_blocks and struct stat.st_blksize.
2435         * configure: Regenerate.
2436         * config.in: Likewise.
2437         * Makefile.in (SFILES): Add common/common-remote-fileio.c.
2438         (OBS): Add common-remote-fileio.o.
2439         (common-remote-fileio.o): New rule.
2440
2441 2015-03-09  Pedro Alves  <palves@redhat.com>
2442
2443         * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
2444         'struct sockaddr' pointer in 'accept' call.
2445
2446 2015-03-09  Pedro Alves  <palves@redhat.com>
2447
2448         Revert:
2449         2015-03-07  Pedro Alves  <palves@redhat.com>
2450         * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2451         or <winsock2.h> here.  Instead include "gdb_socket.h".
2452         (remote_open): Use union gdb_sockaddr_u.
2453         * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2454         or <winsock2.h> here.  Instead include "gdb_socket.h".
2455         (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2456         * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2457         or <sys/un.h>.
2458         (init_named_socket, gdb_agent_helper_thread): Use union
2459         gdb_sockaddr_u.
2460
2461 2015-03-07  Pedro Alves  <palves@redhat.com>
2462
2463         * configure.ac (build_warnings): Move
2464         -Wdeclaration-after-statement to the C-specific set.
2465         * configure: Regenerate.
2466
2467 2015-03-07  Pedro Alves  <palves@redhat.com>
2468
2469         * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2470         or <winsock2.h> here.  Instead include "gdb_socket.h".
2471         (remote_open): Use union gdb_sockaddr_u.
2472         * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2473         or <winsock2.h> here.  Instead include "gdb_socket.h".
2474         (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2475         * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2476         or <sys/un.h>.
2477         (init_named_socket, gdb_agent_helper_thread): Use union
2478         gdb_sockaddr_u.
2479
2480 2015-03-07  Pedro Alves  <palves@redhat.com>
2481
2482         Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
2483         instead.
2484
2485 2015-03-06  Yao Qi  <yao.qi@linaro.org>
2486
2487         * linux-aarch64-low.c (aarch64_insert_point): Use
2488         show_debug_regs as a boolean.
2489         (aarch64_remove_point): Likewise.
2490
2491 2015-03-05  Pedro Alves  <palves@redhat.com>
2492
2493         * lynx-low.c (lynx_target_ops): Install NULL hooks for
2494         stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2495         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
2496         * nto-low.c (nto_target_ops): Likewise.
2497         * spu-low.c (spu_target_ops): Likewise.
2498         * win32-low.c (win32_target_ops): Likewise.
2499
2500 2015-03-04  Pedro Alves  <palves@redhat.com>
2501
2502         * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
2503         Decide whether a breakpoint triggered based on the SIGTRAP's
2504         siginfo.si_code.
2505         (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
2506         breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
2507         (linux_low_filter_event): Check for breakpoints before checking
2508         watchpoints.
2509         (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
2510         siginfo.si_code.
2511         (linux_stopped_by_sw_breakpoint)
2512         (linux_supports_stopped_by_sw_breakpoint)
2513         (linux_stopped_by_hw_breakpoint)
2514         (linux_supports_stopped_by_hw_breakpoint): New functions.
2515         (linux_target_ops): Install new target methods.
2516
2517 2015-03-04  Pedro Alves  <palves@redhat.com>
2518
2519         * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
2520         * server.c (swbreak_feature, hwbreak_feature): New globals.
2521         (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
2522         (captured_main): Clear swbreak_feature and hwbreak_feature.
2523         * server.h (swbreak_feature, hwbreak_feature): Declare.
2524         * target.h (struct target_ops) <stopped_by_sw_breakpoint,
2525         supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
2526         supports_stopped_by_hw_breakpoint>: New fields.
2527         (target_supports_stopped_by_sw_breakpoint)
2528         (target_stopped_by_sw_breakpoint)
2529         (target_supports_stopped_by_hw_breakpoint)
2530         (target_stopped_by_hw_breakpoint): Declare.
2531
2532 2015-03-04  Pedro Alves  <palves@redhat.com>
2533
2534         enum lwp_stop_reason -> enum target_stop_reason
2535         * linux-low.c (check_stopped_by_breakpoint): Adjust.
2536         (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
2537         (linux_wait_1, stuck_in_jump_pad_callback)
2538         (move_out_of_jump_pad_callback, linux_resume_one_lwp)
2539         (linux_stopped_by_watchpoint):
2540         * linux-low.h (enum lwp_stop_reason): Delete.
2541         (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
2542         * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2543
2544 2015-03-04  Yao Qi  <yao.qi@linaro.org>
2545
2546         * Makefile.in (SFILES): Add linux-aarch64-low.c.
2547
2548 2015-03-03  Gary Benson  <gbenson@redhat.com>
2549
2550         * hostio.c (handle_vFile): Fix prefix lengths.
2551
2552 2015-03-03  Markus Metzger  <markus.t.metzger@intel.com>
2553
2554         * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
2555         ptr_bits.
2556
2557 2015-03-02  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2558
2559         * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
2560         (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
2561         (clean): Add "rm -f" for above C files.
2562         * configure.srv (srv_regobj): Add s390-vx-linux64.o,
2563         s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
2564         (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
2565         s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
2566         * linux-s390-low.c (HWCAP_S390_VX): New macro.
2567         (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
2568         (init_registers_s390x_vx_linux64)
2569         (init_registers_s390x_tevx_linux64)
2570         (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
2571         (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
2572         declarations.
2573         (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
2574         (s390_store_vxrs_high): New functions.
2575         (s390_regsets): Add entries for NT_S390_VXRS_LOW and
2576         NT_S390_VXRS_HIGH.
2577         (s390_arch_setup): Add logic for selecting one of the new target
2578         descriptions.  Activate the new vector regsets if applicable.
2579         (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
2580         init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
2581         and init_registers_s390x_tevx_linux64.
2582
2583 2015-03-01  Pedro Alves  <palves@redhat.com>
2584
2585         * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
2586         parameter.
2587
2588 2015-02-27  Pedro Alves  <palves@redhat.com>
2589
2590         * linux-x86-low.c (u_debugreg_offset): New function.
2591         (x86_linux_dr_get, x86_linux_dr_set): Use it.
2592
2593 2015-02-27  Pedro Alves  <palves@redhat.com>
2594
2595         * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
2596         [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
2597         [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
2598         ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2599         (ps_lsetfpregs, ps_getpid)
2600         (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
2601         (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
2602         (ps_lsetxregs, ps_plog): Declare.
2603
2604 2015-02-27  Pedro Alves  <palves@redhat.com>
2605
2606         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
2607         IP_AGENT_EXPORT_FUNC.
2608         * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
2609         IP_AGENT_EXPORT_FUNC.
2610         * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
2611         (IP_AGENT_EXPORT): Delete.
2612         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2613         (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2614         (gdb_trampoline_buffer_error, collecting, gdb_collect)
2615         (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
2616         (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
2617         (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
2618         (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
2619         (traceframe_read_count, traceframe_write_count)
2620         (traceframes_created, trace_state_variables, get_raw_reg)
2621         (get_trace_state_variable_value, set_trace_state_variable_value)
2622         (ust_loaded, helper_thread_id, cmd_buf): Use
2623         IPA_SYM_EXPORTED_NAME.
2624         (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
2625         (tracepoints) Use IP_AGENT_EXPORT_VAR.
2626         (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
2627         IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2628         (last_tracepoint): Move into !IN_PROCESS_AGENT block.
2629         (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
2630         EXTERN_C_PUSH/EXTERN_C_POP.
2631         (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
2632         (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
2633         wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2634         (trace_buffer_ctrl, trace_buffer_ctrl_curr)
2635         (traceframe_write_count, traceframe_read_count)
2636         (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
2637         (about_to_request_buffer_space, get_trace_state_variable_value)
2638         (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
2639         (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
2640         EXTERN_C_PUSH/EXTERN_C_POP.
2641         (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2642         (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2643         (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2644         and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2645         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2646         (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2647         (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2648         * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2649         Define.
2650         (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2651         (IP_AGENT_EXPORT_VAR_DECL): Define.
2652         (tracing): Declare.
2653         (gdb_agent_get_raw_reg): Declare.
2654
2655 2015-02-27  Tom Tromey  <tromey@redhat.com>
2656             Pedro Alves  <palves@redhat.com>
2657
2658         Rename symbols whose names are reserved C++ keywords throughout.
2659
2660 2015-02-27  Pedro Alves  <palves@redhat.com>
2661
2662         * Makefile.in (COMPILER): New, get it from autoconf.
2663         (CXX): Get from autoconf instead.
2664         (COMPILE.pre): Use COMPILER.
2665         (CC-LD): Rename to ...
2666         (CC_LD): ... this.  Use COMPILER.
2667         (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2668         (CXX_FOR_TARGET): Default to g++ instead of gcc.
2669         * acinclude.m4: Include build-with-cxx.m4.
2670         * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2671         Disable -Werror by default if building in C++ mode.
2672         (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2673         -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2674         the C++ compiler.  Save/restore CXXFLAGS too.
2675         * configure: Regenerate.
2676
2677 2015-02-27  Pedro Alves  <palves@redhat.com>
2678
2679         * acinclude.m4: Include libiberty.m4.
2680         * configure.ac: Call libiberty_INIT.
2681         * config.in, configure: Regenerate.
2682
2683 2015-02-26  Pedro Alves  <palves@redhat.com>
2684
2685         * linux-low.c (linux_wait_1): When incrementing the PC past a
2686         program breakpoint always use the_low_target.breakpoint_len as
2687         increment, rather than the maximum between that and
2688         the_low_target.decr_pc_after_break.
2689
2690 2015-02-23  Pedro Alves  <palves@redhat.com>
2691
2692         * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2693         thread was doing a step-over; always adjust the PC if
2694         we stepped over a permanent breakpoint.
2695         (linux_wait_1): If we stepped over breakpoint that was on top of a
2696         permanent breakpoint, manually advance the PC past it.
2697
2698 2015-02-23  Pedro Alves  <palves@redhat.com>
2699
2700         * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2701         modes.
2702         (x86_fill_gregset, x86_store_gregset): Use it when handling
2703         $orig_eax.
2704
2705 2015-02-20  Pedro Alves  <palves@redhat.com>
2706
2707         * thread-db.c: Include "nat/linux-procfs.h".
2708         (thread_db_init): Skip listing new threads if the kernel supports
2709         PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2710
2711 2015-02-20  Pedro Alves  <palves@redhat.com>
2712
2713         * linux-low.c (status_pending_p_callback): Use ptid_match.
2714
2715 2015-02-19  Antoine Tremblay  <antoine.tremblay@ericsson.com>
2716
2717         PR breakpoints/16812
2718         * linux-low.c (wstatus_maybe_breakpoint): Remove.
2719         (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2720         (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2721
2722 2015-02-10  Antoine Tremblay <antoine.tremblay@ericsson.com>
2723
2724         PR breakpoints/15956
2725         * tracepoint.c (cmd_qtinit): Add check for current_thread.
2726
2727 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
2728
2729         * linux-low.c (linux_low_btrace_conf): Print size.
2730         * server.c (handle_btrace_conf_general_set): New.
2731         (hanle_general_set): Call handle_btrace_conf_general_set.
2732         (handle_query): Report Qbtrace-conf:bts:size as supported.
2733
2734 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
2735
2736         * linux-low.c (linux_low_enable_btrace): Update parameters.
2737         (linux_low_btrace_conf): New.
2738         (linux_target_ops)<to_btrace_conf>: Initialize.
2739         * server.c (current_btrace_conf): New.
2740         (handle_btrace_enable): Rename to ...
2741         (handle_btrace_enable_bts): ... this.  Pass &current_btrace_conf
2742         to target_enable_btrace.  Update comment.  Update users.
2743         (handle_qxfer_btrace_conf): New.
2744         (qxfer_packets): Add btrace-conf entry.
2745         (handle_query): Report qXfer:btrace-conf:read as supported packet.
2746         * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2747         (target_ops)<read_btrace_conf>: New.
2748         (target_enable_btrace): Update parameters.
2749         (target_read_btrace_conf): New.
2750
2751 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
2752
2753         * server.c (handle_btrace_general_set): Remove call to
2754         target_supports_btrace.
2755         (supported_btrace_packets): New.
2756         (handle_query): Call supported_btrace_packets.
2757         * target.h: include btrace-common.h.
2758         (btrace_target_info): Removed.
2759         (supports_btrace, target_supports_btrace): Update parameters.
2760
2761 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
2762
2763         * Makefile.in (SFILES): Add common/btrace-common.c.
2764         (OBS): Add common/btrace-common.o.
2765         (btrace-common.o): Add build rules.
2766         * linux-low: Include btrace-common.h.
2767         (linux_low_read_btrace): Use struct btrace_data.  Call
2768         btrace_data_init and btrace_data_fini.
2769
2770 2015-02-06  Pedro Alves  <palves@redhat.com>
2771
2772         * thread-db.c (find_new_threads_callback): Add debug output.
2773
2774 2015-02-04  Pedro Alves  <palves@redhat.com>
2775
2776         * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2777         (resume_stopped_resumed_lwps): New function.
2778         (linux_wait_for_event_filtered): Use it.
2779
2780 2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
2781
2782         * Makefile.in (SFILES): Add linux-personality.c.
2783         (linux-personality.o): New rule.
2784         * configure.srv (srv_linux_obj): Add linux-personality.o to the
2785         list of objects to be built.
2786         * linux-low.c: Include nat/linux-personality.h.
2787         (linux_create_inferior): Remove code to disable address space
2788         randomization (moved to ../nat/linux-personality.c).  Create
2789         cleanup to disable address space randomization.
2790
2791 2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
2792
2793         * Makefile.in (posix-strerror.o): New rule.
2794         (mingw-strerror.o): Likewise.
2795         * configure: Regenerated.
2796         * configure.ac: Source file ../common/common.host.  Initialize new
2797         variable srv_host_obs.  Add srv_host_obs to GDBSERVER_DEPFILES.
2798
2799 2015-01-14  Yao Qi  <yao@codesourcery.com>
2800
2801         * Makefile.in (SFILES): Add nat/ppc-linux.c.
2802         (ppc-linux.o): New rule.
2803         * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2804         * configure.ac: AC_CHECK_FUNCS(getauxval).
2805         * config.in: Re-generated.
2806         * configure: Re-generated.
2807         * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2808         ppc64_64bit_inferior_p
2809
2810 2015-01-14  Yao Qi  <yao@codesourcery.com>
2811
2812         * linux-ppc-low.c: Include "nat/ppc-linux.h".
2813          (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2814         (PPC_FEATURE_HAS_ALTIVEC,  PPC_FEATURE_HAS_SPE): Likewise.
2815         (PT_ORIG_R3, PT_TRAP): Likewise.
2816         (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2817         (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2818         (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2819
2820 2015-01-10  Joel Brobecker  <brobecker@adacore.com>
2821
2822         * i387-fp.c (i387_cache_to_xsave): In look over
2823         num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2824         zmmh_low_space field by use of zmmh_high_space.
2825
2826 2015-01-09  Pedro Alves  <palves@redhat.com>
2827
2828         * linux-low.c (step_over_bkpt): Move higher up in the file.
2829         (handle_extended_wait): Don't store the stop_pc here.
2830         (get_stop_pc): Adjust comments and rename to ...
2831         (check_stopped_by_breakpoint): ... this.  Record whether the LWP
2832         stopped for a software breakpoint or hardware breakpoint.
2833         (thread_still_has_status_pending_p): New function.
2834         (status_pending_p_callback): Use
2835         thread_still_has_status_pending_p.  If the event is no longer
2836         interesting, resume the LWP.
2837         (handle_tracepoints): Add assert.
2838         (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2839         (wstatus_maybe_breakpoint): New function.
2840         (cancel_breakpoint): Delete function.
2841         (check_stopped_by_watchpoint): New function, factored out from
2842         linux_low_filter_event.
2843         (lp_status_maybe_breakpoint): Delete function.
2844         (linux_low_filter_event): Remove filter_ptid argument.
2845         Leave thread group exits pending here.  Store the LWP's stop PC.
2846         Always leave events pending.
2847         (linux_wait_for_event_filtered): Pull all events out of the
2848         kernel, and leave them all pending.
2849         (count_events_callback, select_event_lwp_callback): Consider all
2850         events.
2851         (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2852         (select_event_lwp): Only give preference to the stepping LWP in
2853         all-stop mode.  Adjust comments.
2854         (ignore_event): New function.
2855         (linux_wait_1): Delete 'retry' label.  Use ignore_event.  Remove
2856         references to cancel_breakpoints.  Adjust to renames.  Also give
2857         equal priority to all LWPs that have had events in non-stop mode.
2858         If reporting a software breakpoint event, unadjust the LWP's PC.
2859         (linux_wait): If linux_wait_1 returned an ignored event, retry.
2860         (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2861         Adjust.
2862         (linux_resume_one_lwp): Store the LWP's PC.  Adjust.
2863         (resume_status_pending_p): Use thread_still_has_status_pending_p.
2864         (linux_stopped_by_watchpoint): Adjust.
2865         (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2866         * linux-low.h (enum lwp_stop_reason): New.
2867         (struct lwp_info) <stop_pc>: Adjust comment.
2868         <stopped_by_watchpoint>: Delete field.
2869         <stop_reason>: New field.
2870         * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2871         * mem-break.c (software_breakpoint_inserted_here)
2872         (hardware_breakpoint_inserted_here): New function.
2873         * mem-break.h (software_breakpoint_inserted_here)
2874         (hardware_breakpoint_inserted_here): Declare.
2875         * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2876         (cancel_breakpoints): Delete.
2877         * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2878         (upload_fast_traceframes): Remove references to
2879         cancel_breakpoints.
2880
2881 2015-01-09  Pedro Alves  <palves@redhat.com>
2882
2883         * thread-db.c (find_new_threads_callback): Ignore thread if the
2884         kernel thread ID is -1.
2885
2886 2015-01-09  Pedro Alves  <palves@redhat.com>
2887
2888         * linux-low.c (linux_attach_fail_reason_string): Move to
2889         nat/linux-ptrace.c, and rename.
2890         (linux_attach_lwp): Update comment.
2891         (attach_proc_task_lwp_callback): New function.
2892         (linux_attach): Adjust to rename and use
2893         linux_proc_attach_tgid_threads.
2894         (linux_attach_fail_reason_string): Delete declaration.
2895
2896 2015-01-01  Joel Brobecker  <brobecker@adacore.com>
2897
2898         * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2899         * server.c (gdbserver_version): Likewise.
2900
2901 2014-12-29  Sergio Durigan Junior  <sergiodj@redhat.com>
2902
2903         * remote-utils.c: Include ctype.h.
2904         (input_interrupt): Explicitly handle the case when the char
2905         received is the NUL byte.  Improve the printing of non-ASCII
2906         characters.
2907
2908 2014-12-16  Joel Brobecker  <brobecker@adacore.com>
2909
2910         * linux-low.c (linux_low_filter_event): Update call to
2911         linux_enable_event_reporting following the addition of
2912         a new parameter to that function.
2913
2914 2014-12-16  Catalin Udma  <catalin.udma@freescale.com>
2915
2916         PR server/17457
2917         * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2918         (AARCH64_FPCR_REGNO): Likewise.
2919         (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2920         (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2921         (aarch64_store_fpregset): Likewise.
2922
2923 2014-12-15  Joel Brobecker  <brobecker@adacore.com>
2924
2925         * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2926         Remove FIXME comment about assumption about N.
2927
2928 2014-12-13  Joel Brobecker  <brobecker@adacore.com>
2929
2930         * configure.ac: If large-file support is disabled in GDBserver,
2931         pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2932         * configure: Regenerate.
2933
2934 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2935
2936         * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2937         warning upon ENODATA from ptrace.
2938         * linux-s390-low.c (s390_store_tdb): New.
2939         (s390_regsets): Add regset for NT_S390_TDB.
2940
2941 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2942
2943         * linux-low.c (regsets_store_inferior_registers): Skip regsets
2944         without a fill_function.
2945         * linux-s390-low.c (s390_fill_last_break): Remove.
2946         (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2947         (s390_arch_setup): Use regset's size instead of fill_function for
2948         loop end condition.
2949
2950 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2951
2952         * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2953         the regset's store function when ptrace returned an error.
2954         * regcache.c (get_thread_regcache): Invalidate register cache
2955         before fetching inferior's registers.
2956
2957 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2958
2959         * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2960         while-loop as for-loop.
2961         (regsets_store_inferior_registers): Likewise.
2962
2963 2014-11-28  Yao Qi  <yao@codesourcery.com>
2964
2965         * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2966         * config.in, configure: Re-generate.
2967         * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2968         is defined.
2969
2970 2014-11-21  Yao Qi  <yao@codesourcery.com>
2971
2972         * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2973         (AC_CHECK_HEADERS): Remove malloc.h.
2974         * configure: Re-generated.
2975         * config.in: Re-generated.
2976         * server.h: Don't include alloca.h and malloc.h.
2977         * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2978         Don't include malloc.h.
2979
2980 2014-11-17  Joel Brobecker  <brobecker@adacore.com>
2981
2982         * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2983         corresponding ERRNO check in same block.
2984
2985 2014-11-12  Pedro Alves  <palves@redhat.com>
2986
2987         * server.c (cont_thread): Update comment.
2988         (start_inferior, attach_inferior): No longer clear cont_thread.
2989         (handle_v_cont): No longer set cont_thread.
2990         (captured_main): Clear cont_thread each time a GDB connects.
2991
2992 2014-11-12  Pedro Alves  <palves@redhat.com>
2993
2994         * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2995         thread, and don't resume all threads if the Hc thread has exited.
2996
2997 2014-11-12  Pedro Alves  <palves@redhat.com>
2998
2999         * linux-low.c (linux_request_interrupt): Always send a SIGINT to
3000         the process group instead of to a specific LWP.
3001
3002 2014-10-15  Pedro Alves  <palves@redhat.com>
3003
3004         PR server/17487
3005         * win32-arm-low.c (arm_set_thread_context): Remove current_event
3006         parameter.
3007         (arm_set_thread_context): Delete.
3008         (the_low_target): Adjust.
3009         * win32-i386-low.c (debug_registers_changed)
3010         (debug_registers_used): Delete.
3011         (update_debug_registers_callback): New function.
3012         (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
3013         needing to update their debug registers.
3014         (win32_get_current_dr): New function.
3015         (x86_dr_low_get_addr, x86_dr_low_get_control)
3016         (x86_dr_low_get_status): Fetch the debug register from the thread
3017         record's context.
3018         (i386_initial_stuff): Adjust.
3019         (i386_get_thread_context): Remove current_event parameter.  Don't
3020         clear debug_registers_changed nor copy DR values to
3021         debug_reg_state.
3022         (i386_set_thread_context): Delete.
3023         (i386_prepare_to_resume): New function.
3024         (i386_thread_added): Mark the thread as needing to update irs
3025         debug registers.
3026         (the_low_target): Remove i386_set_thread_context and install
3027         i386_prepare_to_resume.
3028         * win32-low.c (win32_get_thread_context): Adjust.
3029         (win32_set_thread_context): Use SetThreadContext
3030         directly.
3031         (win32_prepare_to_resume): New function.
3032         (win32_require_context): New function, factored out from ...
3033         (thread_rec): ... this.
3034         (continue_one_thread): Call win32_prepare_to_resume on each thread
3035         we're about to continue.
3036         (win32_resume): Call win32_prepare_to_resume on the event thread.
3037         * win32-low.h (struct win32_thread_info)
3038         <debug_registers_changed>: New field.
3039         (struct win32_target_ops): Change prototype of set_thread_context,
3040         delete set_thread_context and add prepare_to_resume.
3041         (win32_require_context): New declaration.
3042
3043 2014-10-08  Gary Benson  <gbenson@redhat.com>
3044
3045         * server.h: Do not include common-exceptions.h.
3046
3047 2014-10-08  Gary Benson  <gbenson@redhat.com>
3048
3049         * server.h: Do not include cleanups.h.
3050
3051 2014-09-30  James Hogan  <james.hogan@imgtec.com>
3052
3053         * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
3054         mips64-dsp-linux.c.
3055
3056 2014-09-23  Yao Qi  <yao@codesourcery.com>
3057
3058         * linux-low.c (lp_status_maybe_breakpoint): New function.
3059         (linux_low_filter_event): Call lp_status_maybe_breakpoint.
3060         (count_events_callback): Likewise.
3061         (select_event_lwp_callback): Likewise.
3062         (cancel_breakpoints_callback): Likewise.
3063
3064 2014-09-19  Don Breazeal  <donb@codesourcery.com>
3065
3066         * linux-low.c (handle_extended_wait): Call
3067         linux_ptrace_get_extended_event.
3068         (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
3069         linux_is_extended_waitstatus.
3070
3071 2014-09-16  Joel Brobecker  <brobecker@adacore.com>
3072
3073         * Makefile.in (CPPFLAGS): Define.
3074         (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
3075         (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
3076
3077 2014-09-16  Gary Benson  <gbenson@redhat.com>
3078
3079         * inferiors.h (current_inferior): Renamed as...
3080         (current_thread): New variable.  All uses updated.
3081         * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
3082         (maybe_move_out_of_jump_pad): Likewise.
3083         (cancel_breakpoint): Likewise.
3084         (linux_low_filter_event): Likewise.
3085         (wait_for_sigstop): Likewise.
3086         (linux_resume_one_lwp): Likewise.
3087         (need_step_over_p): Likewise.
3088         (start_step_over): Likewise.
3089         (linux_stabilize_threads): Renamed save_inferior as saved_thread.
3090         * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
3091         * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
3092         and save_inferior as saved_thread.
3093         * regcache.c (get_thread_regcache): Renamed saved_inferior as
3094         saved_thread.
3095         (regcache_invalidate_thread): Likewise.
3096         * remote-utils.c (prepare_resume_reply): Likewise.
3097         * thread-db.c (thread_db_get_tls_address): Likewise.
3098         (disable_thread_event_reporting): Likewise.
3099         (remove_thread_event_breakpoints): Likewise.
3100         * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
3101         as saved_thread.
3102         * target.h (set_desired_inferior): Renamed as...
3103         (set_desired_thread): New declaration.  All uses updated.
3104         * server.c (myresume): Updated comment to reference thread instead
3105         of inferior.
3106         (handle_serial_event): Likewise.
3107         (handle_target_event): Likewise.
3108
3109 2014-09-12  Tom Tromey  <tromey@redhat.com>
3110             Gary Benson  <gbenson@redhat.com>
3111
3112         * regcache.h: Include common-regcache.h.
3113         (regcache_read_pc): Don't declare.
3114         * regcache.c (get_thread_regcache_for_ptid): New function.
3115
3116 2014-09-11  Tom Tromey  <tromey@redhat.com>
3117             Gary Benson  <gbenson@redhat.com>
3118
3119         * symbol.c: New file.
3120         * Makefile.in (SFILES): Add symbol.c.
3121         (OBS): Add symbol.o.
3122
3123 2014-09-11  Gary Benson  <gbenson@redhat.com>
3124
3125         * target.c (target_stop_ptid, target_continue_ptid): New
3126         functions.
3127
3128 2014-09-11  Tom Tromey  <tromey@redhat.com>
3129             Gary Benson  <gbenson@redhat.com>
3130
3131         * target.h: Include target/target.h.
3132         * target.c (target_read_memory, target_read_uint32)
3133         (target_write_memory): New functions.
3134
3135 2014-09-11  Gary Benson  <gbenson@redhat.com>
3136
3137         * server.h (debug_hw_points): Don't declare.
3138         * server.c (debug_hw_points): Don't define.  Replace all uses
3139         with show_debug_regs.
3140         * linux-aarch64-low.c (debug_hw_points): Don't define.  Replace
3141         all uses with show_debug_regs.
3142
3143 2014-09-08  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
3144
3145         * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
3146         endianness into account.
3147         (ppc_supply_ptrace_register): Likewise.
3148
3149 2014-09-03  James Hogan  <james.hogan@imgtec.com>
3150
3151         * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
3152         to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
3153
3154 2014-09-03  Gary Benson  <gbenson@redhat.com>
3155
3156         * linux-x86-low.c (x86_linux_prepare_to_resume): Use
3157         ALL_DEBUG_ADDRESS_REGISTERS.
3158
3159 2014-09-02  Gary Benson  <gbenson@redhat.com>
3160
3161         * i386-low.h: Renamed as...
3162         * x86-low.h: New file.  All type, function and variable name
3163         prefixes changed from "i386_" to "x86_".  All references updated.
3164         * i386-low.c: Renamed as...
3165         * x86-low.c: New file.  All type, function and variable name
3166         prefixes changed from "i386_" to "x86_".  All references updated.
3167
3168 2014-09-02  Gary Benson  <gbenson@redhat.com>
3169
3170         * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
3171         (x86_linux_new_thread): Likewise.
3172
3173 2014-08-29  Gary Benson  <gbenson@redhat.com>
3174
3175         * server.h (setjmp.h): Do not include.
3176         (toplevel): Do not declare.
3177         (common-exceptions.h): Include.
3178         (cleanups.h): Likewise.
3179         * server.c (toplevel): Do not define.
3180         (exit_code): New static global.
3181         (detach_or_kill_for_exit_cleanup): New function.
3182         (main): New function.  Original main renamed to...
3183         (captured_main): New function.
3184         * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
3185
3186 2014-08-29  Gary Benson  <gbenson@redhat.com>
3187
3188         * Makefile.in (SFILES): Add common/common-exceptions.c.
3189         (OBS): Add common-exceptions.o.
3190         (common-exceptions.o): New rule.
3191         * utils.c (prepare_to_throw_exception): New function.
3192
3193 2014-08-29  Gary Benson  <gbenson@redhat.com>
3194
3195         * config.in: Regenerate.
3196         * configure: Likewise.
3197
3198 2014-08-29  Gary Benson  <gbenson@redhat.com>
3199
3200         * Makefile.in (SFILES): Add common/cleanups.c.
3201         (OBS): cleanups.o.
3202         (cleanups.o): New rule.
3203
3204 2014-08-29  Gary Benson  <gbenson@redhat.com>
3205
3206         * utils.c (internal_vwarning): New function.
3207
3208 2014-08-28  Gary Benson  <gbenson@redhat.com>
3209
3210         * utils.h (fatal): Remove declaration.
3211         * utils.c (fatal): Remove function.
3212
3213 2014-08-28  Gary Benson  <gbenson@redhat.com>
3214
3215         * tracepoint.c (gdb_agent_init): Replace fatal with
3216         perror_with_name.
3217         (initialize_tracepoint): Likewise.
3218
3219 2014-08-28  Gary Benson  <gbenson@redhat.com>
3220
3221         * remote-utils.c (remote_prepare): Replace fatal with error.
3222
3223 2014-08-28  Gary Benson  <gbenson@redhat.com>
3224
3225         * linux-low.c (linux_async): Replace fatal with warning.
3226         Tidy up and return.
3227         (linux_start_non_stop): Return -1 if linux_async failed.
3228
3229 2014-08-28  Gary Benson  <gbenson@redhat.com>
3230
3231         * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
3232         gdb_assert.
3233         (i386_dr_low_get_addr): Remove vague comment.
3234         * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
3235         gdb_assert.
3236
3237 2014-08-28  Gary Benson  <gbenson@redhat.com>
3238
3239         * inferiors.c (get_thread_process): Replace check with gdb_assert.
3240         * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
3241         internal_error.
3242         (linux_resume_one_lwp): Likewise.
3243         * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
3244         gdb_assert.
3245         * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
3246         with internal_error.
3247         * regcache.c (get_thread_regcache): Replace check with gdb_assert.
3248         (init_register_cache): Replace fatal with gdb_assert_not_reached.
3249         (find_register_by_name): Replace fatal with internal_error.
3250         (find_regno): Likewise.
3251         * tdesc.c (init_target_desc): Replace check with gdb_assert.
3252         * thread-db.c (thread_db_create_event): Likewise.
3253         (thread_db_load_search): Likewise.
3254         (try_thread_db_load_1): Likewise.
3255         * tracepoint.c (get_jump_space_head): Replace fatal with
3256         internal_error.
3257         (claim_trampoline_space): Likewise.
3258         (have_fast_tracepoint_trampoline_buffer): Likewise.
3259         (cmd_qtstart): Likewise.
3260         (stop_tracing): Likewise.
3261         (fast_tracepoint_collecting): Likewise.
3262         (target_malloc): Likewise.
3263         (download_tracepoint): Likewise.
3264         (download_trace_state_variables): Replace check with gdb_assert.
3265         (upload_fast_traceframes): Replace fatal with internal_error.
3266
3267 2014-08-19  Tom Tromey  <tromey@redhat.com>
3268             Gary Benson  <gbenson@redhat.com>
3269
3270         * Makefile.in (SFILES): Add common/common-debug.c.
3271         (OBS): Add common-debug.o.
3272         (common-debug.o): New rule.
3273         * debug.h (debug_printf): Don't declare.
3274         * debug.c (debug_printf): Renamed and rewritten as...
3275         (debug_vprintf): New function.
3276
3277 2014-08-19  Gary Benson  <gbenson@redhat.com>
3278
3279         * utils.h: Do not include print-utils.h.
3280
3281 2014-08-19  Tom Tromey  <tromey@redhat.com>
3282             Gary Benson  <gbenson@redhat.com>
3283
3284         * server.h: Add static assertion.
3285         (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
3286
3287 2014-08-19  Tom Tromey  <tromey@redhat.com>
3288             Gary Benson  <gbenson@redhat.com>
3289
3290         * Makefile.in (SFILES): Add common/errors.c.
3291         (OBS): Add errors.o.
3292         (IPA_OBS): Add errors-ipa.o.
3293         (errors.o): New rule.
3294         (errors-ipa.o): Likewise.
3295         * utils.h (perror_with_name, error, warning): Don't declare.
3296         * utils.c (warning): Renamed and rewritten as...
3297         (vwarning): New function.
3298         (error): Renamed and rewritten as...
3299         (verror): New function.
3300         (internal_error): Renamed and rewritten as...
3301         (internal_verror): New function.
3302
3303 2014-08-07  Gary Benson  <gbenson@redhat.com>
3304
3305         * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
3306         * configure: Regenerate.
3307         * config.in: Likewise.
3308         * server.h: Do not include errno.h.
3309         * event-loop.c: Likewise.
3310         * hostio-errno.c: Likewise.
3311         * linux-low.c: Likewise.
3312         * remote-utils.c: Likewise.
3313         * spu-low.c: Likewise.
3314         * utils.c: Likewise.
3315         * gdbreplay.c: Unconditionally include errno.h.
3316
3317 2014-08-07  Gary Benson  <gbenson@redhat.com>
3318
3319         * server.h: Do not include string.h.
3320         * event-loop.c: Likewise.
3321         * linux-low.c: Likewise.
3322         * regcache.c: Likewise.
3323         * remote-utils.c: Likewise.
3324         * spu-low.c: Likewise.
3325         * utils.c: Likewise.
3326
3327 2014-08-07  Gary Benson  <gbenson@redhat.com>
3328
3329         * server.h: Do not include gdb_assert.h.
3330
3331 2014-08-07  Gary Benson  <gbenson@redhat.com>
3332
3333         * server.h: Do not include common-utils.h.
3334
3335 2014-08-07  Gary Benson  <gbenson@redhat.com>
3336
3337         * server.h: Do not include ptid.h.
3338         * notif.h: Likewise.
3339
3340 2014-08-07  Gary Benson  <gbenson@redhat.com>
3341
3342         * server.h: Do not include gdb_locale.h.
3343
3344 2014-08-07  Gary Benson  <gbenson@redhat.com>
3345
3346         * server.h: Do not include gdb/signals.h.
3347         * win32-low.c: Likewise.
3348
3349 2014-08-07  Gary Benson  <gbenson@redhat.com>
3350
3351         * server.h: Do not include pathmax.h.
3352
3353 2014-08-07  Gary Benson  <gbenson@redhat.com>
3354
3355         * server.h: Do not include libiberty.h.
3356         * linux-bfin-low.c: Likewise.
3357
3358 2014-08-07  Gary Benson  <gbenson@redhat.com>
3359
3360         * server.h: Do not include ansidecl.h.
3361
3362 2014-08-07  Gary Benson  <gbenson@redhat.com>
3363
3364         * linux-x86-low.c: Do not include stddef.h.
3365         * lynx-ppc-low.c: Likewise.
3366         * tracepoint.c: Likewise.
3367
3368 2014-08-07  Gary Benson  <gbenson@redhat.com>
3369
3370         * server.h: Do not include stdarg.h.
3371         * nto-low.c: Likewise.
3372
3373 2014-08-07  Gary Benson  <gbenson@redhat.com>
3374
3375         * server.h: Do not include stdlib.h.
3376         * inferiors.c: Likewise.
3377         * linux-low.c: Likewise.
3378         * regcache.c: Likewise.
3379         * spu-low.c: Likewise.
3380         * tracepoint.c: Likewise.
3381         * utils.c: Likewise.
3382
3383 2014-08-07  Gary Benson  <gbenson@redhat.com>
3384
3385         * server.h: Do not include stdio.h.
3386         * linux-low.c: Likewise.
3387         * remote-utils.c: Likewise.
3388         * spu-low.c: Likewise.
3389         * utils.c: Likewise.
3390         * wincecompat.c: Likewise.
3391
3392 2014-08-06  Gary Benson  <gbenson@redhat.com>
3393
3394         * regcache.c (init_register_cache): Move conditionals inside if.
3395
3396 2014-08-06  Gary Benson  <gbenson@redhat.com>
3397
3398         * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
3399
3400 2014-07-31  Gary Benson  <gbenson@redhat.com>
3401
3402         * ax.h: Do not include server.h.
3403         * gdbthread.h: Likewise.
3404         * lynx-low.h: Likewise.
3405         * notif.h: Likewise.
3406
3407 2014-07-30  Gary Benson  <gbenson@redhat.com>
3408
3409         * server.h: Include common-defs.h.
3410         Do not include config.h or build-gnulib-gdbserver/config.h.
3411
3412 2014-07-30  Gary Benson  <gbenson@redhat.com>
3413
3414         * hostio-errno.c: Move server.h to top of includes list.
3415         * inferiors.c: Likewise.
3416         * linux-x86-low.c: Likewise.
3417         * notif.c: Include server.h.
3418
3419 2014-07-24  Tom Tromey  <tromey@redhat.com>
3420             Gary Benson  <gbenson@redhat.com>
3421
3422         * server.h (CORE_ADDR): Now unsigned.
3423
3424 2014-07-16  Pedro Alves  <palves@redhat.com>
3425
3426         * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
3427
3428 2014-07-15  Pedro Alves  <palves@redhat.com>
3429
3430         * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
3431         copy.
3432
3433 2014-07-11  Pedro Alves  <palves@redhat.com>
3434
3435         * linux-low.c (kill_wait_lwp): New function, based on
3436         kill_one_lwp_callback, but use my_waitpid directly.
3437         (kill_one_lwp_callback, linux_kill): Use it.
3438
3439 2014-06-23  Pedro Alves  <palves@redhat.com>
3440
3441         * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
3442         before setting DR0..DR3.
3443
3444 2014-06-20  Gary Benson  <gbenson@redhat.com>
3445
3446         * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
3447         * configure: Regenerated.
3448         * config.in: Likewise.
3449
3450 2014-06-20  Gary Benson  <gbenson@redhat.com>
3451
3452         * Makefile.in (SFILES): Update locations for files moved
3453         from common to nat.
3454         (object file files): Reordered.
3455
3456 2014-06-20  Gary Benson  <gbenson@redhat.com>
3457
3458         * i386-low.h (i386_dr_low_can_set_addr): Removed.
3459         (i386_dr_low_set_addr): Likewise.
3460         (i386_dr_low_get_addr): Likewise.
3461         (i386_dr_low_can_set_control): Likewise.
3462         (i386_dr_low_set_control): Likewise.
3463         (i386_dr_low_get_control): Likewise.
3464         (i386_dr_low_get_status): Likewise.
3465         (i386_get_debug_register_length): Likewise.
3466         * linux-x86-low.c (i386_dr_low_set_addr):
3467         Changed signature.  Made static.
3468         (i386_dr_low_get_addr): Likewise.
3469         (i386_dr_low_set_control): Likewise.
3470         (i386_dr_low_get_control): Likewise.
3471         (i386_dr_low_get_status): Likewise.
3472         (i386_dr_low): New global variable.
3473         * win32-i386-low.c (i386_dr_low_set_addr):
3474         Changed signature.  Made static.
3475         (i386_dr_low_get_addr): Likewise.
3476         (i386_dr_low_set_control): Likewise.
3477         (i386_dr_low_get_control): Likewise.
3478         (i386_dr_low_get_status): Likewise.
3479         (i386_dr_low): New global variable.
3480
3481 2014-06-20  Marcus Shawcroft  <marcus.shawcroft@arm.com>
3482
3483         * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
3484         * Makefile.in (AR, AR_FLAGS): Define.
3485         * configure: Regenerate.
3486
3487 2014-06-19  Gary Benson  <gbenson@redhat.com>
3488
3489         * Makefile.in (i386-dregs.o): New rule.
3490         * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
3491         * i386-low.c (target.h): Remove include.
3492         (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
3493         (DR_CONTROL_SHIFT): Likewise.
3494         (DR_CONTROL_SIZE): Likewise.
3495         (DR_RW_EXECUTE): Likewise.
3496         (DR_RW_WRITE): Likewise.
3497         (DR_RW_READ): Likewise.
3498         (DR_RW_IORW): Likewise.
3499         (DR_LEN_1): Likewise.
3500         (DR_LEN_2): Likewise.
3501         (DR_LEN_4): Likewise.
3502         (DR_LEN_8): Likewise.
3503         (DR_LOCAL_ENABLE_SHIFT): Likewise.
3504         (DR_GLOBAL_ENABLE_SHIFT): Likewise.
3505         (DR_ENABLE_SIZE): Likewise.
3506         (DR_LOCAL_SLOWDOWN): Likewise.
3507         (DR_GLOBAL_SLOWDOWN): Likewise.
3508         (DR_CONTROL_RESERVED): Likewise.
3509         (I386_DR_CONTROL_MASK): Likewise.
3510         (I386_DR_VACANT): Likewise.
3511         (I386_DR_LOCAL_ENABLE): Likewise.
3512         (I386_DR_GLOBAL_ENABLE): Likewise.
3513         (I386_DR_DISABLE): Likewise.
3514         (I386_DR_SET_RW_LEN): Likewise.
3515         (I386_DR_GET_RW_LEN): Likewise.
3516         (I386_DR_WATCH_HIT): Likewise.
3517         (i386_wp_op_t): Likewise.
3518         (i386_show_dr): Likewise.
3519         (i386_length_and_rw_bits): Likewise.
3520         (i386_insert_aligned_watchpoint): Likewise.
3521         (i386_remove_aligned_watchpoint): Likewise.
3522         (i386_handle_nonaligned_watchpoint): Likewise.
3523         i386_update_inferior_debug_regs(): Likewise.
3524         (i386_dr_insert_watchpoint): Likewise.
3525         (i386_dr_remove_watchpoint): Likewise.
3526         (i386_dr_region_ok_for_watchpoint): Likewise.
3527         (i386_dr_stopped_data_address): Likewise.
3528         (i386_dr_stopped_by_watchpoint): Likewise.
3529
3530 2014-06-19  Gary Benson  <gbenson@redhat.com>
3531
3532         * i386-low.c (i386_dr_show): Renamed to
3533         i386_show_dr and made static.  All uses updated.
3534         (i386_dr_length_and_rw_bits): Renamed to
3535         i386_length_and_rw_bits and made static.
3536         All uses updated.
3537         (i386_dr_insert_aligned_watchpoint): Renamed to
3538         i386_insert_aligned_watchpoint and made static.
3539         All uses updated.
3540         (i386_dr_remove_aligned_watchpoint): Renamed to
3541         i386_remove_aligned_watchpoint and made static.
3542         All uses updated.
3543         (i386_dr_update_inferior_debug_regs): Renamed to
3544         i386_update_inferior_debug_regs and made static.
3545         All uses updated.
3546
3547 2014-06-18  Gary Benson  <gbenson@redhat.com>
3548
3549         * i386-low.h (i386_dr_low_can_set_addr): New macro.
3550         (i386_dr_low_can_set_control): Likewise.
3551         (i386_get_debug_register_length): Likewise.
3552         * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
3553         (i386_dr_low_can_set_control): Likewise.
3554         (i386_get_debug_register_length): Likewise.
3555
3556 2014-06-17  Gary Benson  <gbenson@redhat.com>
3557
3558         * i386-low.h (i386-dregs.h): New include.
3559         (DR_FIRSTADDR): Now in i386-dregs.h.
3560         (DR_LASTADDR): Likewise.
3561         (DR_NADDR): Likewise.
3562         (DR_STATUS): Likewise.
3563         (DR_CONTROL): Likewise.
3564         (i386_debug_reg_state): Likewise.
3565         (i386_dr_insert_watchpoint): Likewise.
3566         (i386_dr_remove_watchpoint): Likewise.
3567         (i386_dr_region_ok_for_watchpoint): Likewise.
3568         (i386_dr_stopped_data_address): Likewise.
3569         (i386_dr_stopped_by_watchpoint): Likewise.
3570         * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
3571
3572 2014-06-18  Gary Benson  <gbenson@redhat.com>
3573
3574         * i386-low.h (i386_low_insert_watchpoint): Renamed to
3575         i386_dr_insert_watchpoint.
3576         (i386_low_remove_watchpoint): Renamed to
3577         i386_dr_remove_watchpoint.
3578         (i386_low_region_ok_for_watchpoint): Renamed to
3579         i386_dr_region_ok_for_watchpoint.
3580         (i386_low_stopped_data_address): Renamed to
3581         i386_dr_stopped_data_address.
3582         (i386_low_stopped_by_watchpoint): Renamed to
3583         i386_dr_stopped_by_watchpoint.
3584         * i386-low.c (i386_show_dr): Renamed to
3585         i386_dr_show and made nonstatic.  All uses updated.
3586         (i386_length_and_rw_bits): Renamed to
3587         i386_dr_length_and_rw_bits and made nonstatic.
3588         All uses updated.
3589         (i386_insert_aligned_watchpoint): Renamed to
3590         i386_dr_insert_aligned_watchpoint and made nonstatic.
3591         All uses updated.
3592         (i386_remove_aligned_watchpoint): Renamed to
3593         i386_dr_remove_aligned_watchpoint and made nonstatic.
3594         All uses updated.
3595         (i386_update_inferior_debug_regs): Renamed to
3596         i386_dr_update_inferior_debug_regs and made nonstatic.
3597         All uses updated.
3598         (i386_low_insert_watchpoint): Renamed to
3599         i386_dr_insert_watchpoint.  All uses updated.
3600         (i386_low_remove_watchpoint): Renamed to
3601         i386_dr_remove_watchpoint.  All uses updated.
3602         (i386_low_region_ok_for_watchpoint): Renamed to
3603         i386_dr_region_ok_for_watchpoint.  All uses updated.
3604         (i386_low_stopped_data_address): Renamed to
3605         i386_dr_stopped_data_address.  All uses updated.
3606         (i386_low_stopped_by_watchpoint): Renamed to
3607         i386_dr_stopped_by_watchpoint.  All uses updated.
3608
3609 2014-06-18  Gary Benson  <gbenson@redhat.com>
3610
3611         * i386-low.c (i386_dr_low_can_set_addr): New macro.
3612         (i386_dr_low_can_set_control): Likewise.
3613         (i386_insert_aligned_watchpoint): New check.
3614
3615 2014-06-18  Gary Benson  <gbenson@redhat.com>
3616
3617         * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
3618         Renamed to state.
3619
3620 2014-06-18  Gary Benson  <gbenson@redhat.com>
3621
3622         * i386-low.c (i386_length_and_rw_bits): Use internal_error
3623         instead of fatal and error.
3624         (i386_handle_nonaligned_watchpoint): Likewise.
3625
3626 2014-06-18  Gary Benson  <gbenson@redhat.com>
3627
3628         * i386-low.c (i386_get_debug_register_length): New macro.
3629         (TARGET_HAS_DR_LEN_8): Remove conditional.  Use above macro.
3630         (i386_show_dr): Use debug_printf instead of fprintf.  Use
3631         phex to format values.
3632
3633 2014-06-18  Gary Benson  <gbenson@redhat.com>
3634
3635         * i386-low.h: Comment changes.
3636         * i386-low.c: Likewise.
3637
3638 2014-06-18  Gary Benson  <gbenson@redhat.com>
3639
3640         * i386-low.c: Whitespace changes.
3641
3642 2014-06-12  Tom Tromey  <tromey@redhat.com>
3643
3644         * utils.c (freeargv): Remove.
3645
3646 2014-06-12  Tom Tromey  <tromey@redhat.com>
3647
3648         * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3649         * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3650         (parse_debug_format_options): Likewise.
3651         (gdbserver_usage): Likewise.
3652         * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3653         (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3654         (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3655         against libiberty.
3656         ($(LIBGNU)): Depend on libiberty.
3657         (all-lib): Recurse into all subdirs.
3658         (install-only): Invoke "install" target in subdirs.
3659         (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3660         targets.
3661         * configure: Rebuild.
3662         * configure.ac: Add ACX_CONFIGURE_DIR for libiberty.  Don't check
3663         for vasprintf, vsnprintf, or gettimeofday.
3664         * configure.srv: Don't add safe-ctype.o or lbasename.o to
3665         srv_tgtobj.
3666
3667 2014-06-05  Joel Brobecker  <brobecker@adacore.com>
3668
3669         * development.sh: Delete.
3670         * Makefile.in (config.status): Adjust dependency on development.sh.
3671         * configure.ac: Adjust development.sh source call.
3672         * configure: Regenerate.
3673
3674 2014-06-02  Pedro Alves  <palves@redhat.com>
3675
3676         * ax.c (gdb_free_agent_expr): New function.
3677         * ax.h (gdb_free_agent_expr): New declaration.
3678         * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3679         list.
3680         (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3681         static.
3682         (clear_breakpoint_conditions_and_commands): New function.
3683         * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3684         (clear_breakpoint_conditions_and_commands): New declaration.
3685
3686 2014-05-23  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
3687
3688         * linux-aarch64-low.c (asm/ptrace.h): Include.
3689
3690 2014-05-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
3691
3692         Fix TLS access for -static -pthread.
3693         * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3694         (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3695         (thread_db_load_search, try_thread_db_load_1): Initialize it.
3696
3697 2014-05-20  Pedro Alves  <palves@redhat.com>
3698
3699         * linux-aarch64-low.c (aarch64_insert_point)
3700         (aarch64_remove_point): No longer check whether the type is
3701         supported here.  Adjust to new interface.
3702         (the_low_target): Install aarch64_supports_z_point_type as
3703         supports_z_point_type method.
3704         * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3705         (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3706         instead of a Z packet char.  Adjust.
3707         (arm_supports_z_point_type): New function.
3708         (arm_insert_point, arm_remove_point): Adjust to new interface.
3709         (the_low_target): Install arm_supports_z_point_type.
3710         * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3711         (cris_insert_point, cris_remove_point): Adjust to new interface.
3712         Don't check whether the type is supported here.
3713         (the_low_target): Install cris_supports_z_point_type.
3714         * linux-low.c (linux_supports_z_point_type): New function.
3715         (linux_insert_point, linux_remove_point): Adjust to new interface.
3716         * linux-low.h (struct linux_target_ops) <insert_point,
3717         remove_point>: Take an enum raw_bkpt_type instead of a char.  Add
3718         raw_breakpoint pointer parameter.
3719         <supports_z_point_type>: New method.
3720         * linux-mips-low.c (mips_supports_z_point_type): New function.
3721         (mips_insert_point, mips_remove_point): Adjust to new interface.
3722         Use mips_supports_z_point_type.
3723         (the_low_target): Install mips_supports_z_point_type.
3724         * linux-ppc-low.c (the_low_target): Install NULL as
3725         supports_z_point_type method.
3726         * linux-s390-low.c (the_low_target): Install NULL as
3727         supports_z_point_type method.
3728         * linux-sparc-low.c (the_low_target): Install NULL as
3729         supports_z_point_type method.
3730         * linux-x86-low.c (x86_supports_z_point_type): New function.
3731         (x86_insert_point): Adjust to new insert_point interface.  Use
3732         insert_memory_breakpoint.  Adjust to new
3733         i386_low_insert_watchpoint interface.
3734         (x86_remove_point): Adjust to remove_point interface.  Use
3735         remove_memory_breakpoint.  Adjust to new
3736         i386_low_remove_watchpoint interface.
3737         (the_low_target): Install x86_supports_z_point_type.
3738         * lynx-low.c (lynx_target_ops): Install NULL as
3739         supports_z_point_type callback.
3740         * nto-low.c (nto_supports_z_point_type): New.
3741         (nto_insert_point, nto_remove_point): Adjust to new interface.
3742         (nto_target_ops): Install nto_supports_z_point_type.
3743         * mem-break.c: Adjust intro comment.
3744         (struct raw_breakpoint) <raw_type, size>: New fields.
3745         <inserted>: Update comment.
3746         <shlib_disabled>: Delete field.
3747         (enum bkpt_type) <gdb_breakpoint>: Delete value.
3748         <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3749         gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3750         (raw_bkpt_type_to_target_hw_bp_type): New function.
3751         (find_enabled_raw_code_breakpoint_at): New function.
3752         (find_raw_breakpoint_at): New type and size parameters.  Use them.
3753         (insert_memory_breakpoint): New function, based off
3754         set_raw_breakpoint_at.
3755         (remove_memory_breakpoint): New function.
3756         (set_raw_breakpoint_at): Reimplement.
3757         (set_breakpoint): New, based on set_breakpoint_at.
3758         (set_breakpoint_at): Reimplement.
3759         (delete_raw_breakpoint): Go through the_target->remove_point
3760         instead of assuming memory breakpoints.
3761         (find_gdb_breakpoint_at): Delete.
3762         (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3763         (find_gdb_breakpoint): New function.
3764         (set_gdb_breakpoint_at): Delete.
3765         (z_type_supported): New function.
3766         (set_gdb_breakpoint_1): New function, loosely based off
3767         set_gdb_breakpoint_at.
3768         (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3769         (delete_gdb_breakpoint_at): Delete.
3770         (delete_gdb_breakpoint_1): New function, loosely based off
3771         delete_gdb_breakpoint_at.
3772         (delete_gdb_breakpoint): New function.
3773         (clear_gdb_breakpoint_conditions): Rename to ...
3774         (clear_breakpoint_conditions): ... this.  Don't handle a NULL
3775         breakpoint.
3776         (add_condition_to_breakpoint): Make static.
3777         (add_breakpoint_condition): Take a struct breakpoint pointer
3778         instead of an address.  Adjust.
3779         (gdb_condition_true_at_breakpoint): Rename to ...
3780         (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3781         z_type parameter.
3782         (gdb_condition_true_at_breakpoint): Reimplement.
3783         (add_breakpoint_commands): Take a struct breakpoint pointer
3784         instead of an address.  Adjust.
3785         (gdb_no_commands_at_breakpoint): Rename to ...
3786         (gdb_no_commands_at_breakpoint_z_type): ... this.  Add z_type
3787         parameter.  Return true if no breakpoint was found.  Change debug
3788         output.
3789         (gdb_no_commands_at_breakpoint): Reimplement.
3790         (run_breakpoint_commands): Rename to ...
3791         (run_breakpoint_commands_z_type): ... this.  Add z_type parameter,
3792         and change return type to boolean.
3793         (run_breakpoint_commands): New function.
3794         (gdb_breakpoint_here): Also check for Z1 breakpoints.
3795         (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3796         breakpoint.  Go through the_target->remove_point instead of
3797         assuming memory breakpoint.
3798         (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3799         software and hardware breakpoints.
3800         (reinsert_raw_breakpoint): Go through the_target->insert_point
3801         instead of assuming memory breakpoint.
3802         (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3803         software and hardware breakpoints.
3804         (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3805         Check both software and hardware breakpoints.
3806         (validate_inserted_breakpoint): Assert the breakpoint is a
3807         software breakpoint.  Set the inserted flag to -1 instead of
3808         setting shlib_disabled.
3809         (delete_disabled_breakpoints): Adjust.
3810         (validate_breakpoints): Only validate software breakpoints.
3811         Adjust to inserted flag change.
3812         (check_mem_read, check_mem_write): Skip breakpoint types other
3813         than software breakpoints.  Adjust to inserted flag change.
3814         * mem-break.h (enum raw_bkpt_type): New enum.
3815         (raw_breakpoint, struct process_info): Forward declare.
3816         (Z_packet_to_target_hw_bp_type): Delete declaration.
3817         (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3818         (set_gdb_breakpoint, delete_gdb_breakpoint)
3819         (clear_breakpoint_conditions): New declarations.
3820         (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3821         (breakpoint_inserted_here): Update comment.
3822         (add_breakpoint_condition, add_breakpoint_commands): Replace
3823         address parameter with a breakpoint pointer parameter.
3824         (gdb_breakpoint_here): Update comment.
3825         (delete_gdb_breakpoint_at): Delete.
3826         (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3827         * server.c (process_point_options): Take a struct breakpoint
3828         pointer instead of an address.  Adjust.
3829         (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3830         delete_gdb_breakpoint.
3831         * spu-low.c (spu_target_ops): Install NULL as
3832         supports_z_point_type method.
3833         * target.h: Include mem-break.h.
3834         (struct target_ops) <prepare_to_access_memory>: Update comment.
3835         <supports_z_point_type>: New field.
3836         <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3837         instead of a char.  Also take a raw breakpoint pointer.
3838         * win32-arm-low.c (the_low_target): Install NULL as
3839         supports_z_point_type.
3840         * win32-i386-low.c (i386_supports_z_point_type): New function.
3841         (i386_insert_point, i386_remove_point): Adjust to new interface.
3842         (the_low_target): Install i386_supports_z_point_type.
3843         * win32-low.c (win32_supports_z_point_type): New function.
3844         (win32_insert_point, win32_remove_point): Adjust to new interface.
3845         (win32_target_ops): Install win32_supports_z_point_type.
3846         * win32-low.h (struct win32_target_ops):
3847         <supports_z_point_type>: New method.
3848         <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3849         instead of a char.  Also take a raw breakpoint pointer.
3850
3851 2014-05-20  Pedro Alves  <palves@redhat.com>
3852
3853         * mem-break.h: Include break-common.h.
3854         (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3855         (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3856         (Z_packet_to_target_hw_bp_type): New declaration.
3857         * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3858         * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3859         (Z_PACKET_ACCESS_WP): Delete macros.
3860         (Z_packet_to_hw_type): Delete function.
3861         * i386-low.h: Don't include break-common.h here.
3862         (Z_packet_to_hw_type): Delete declaration.
3863         * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3864         Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3865         * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3866         Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3867         * linux-aarch64-low.c: Don't include break-common.h here.
3868         (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3869         (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3870         (Z_packet_to_target_hw_bp_type): Delete function.
3871         * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3872         function.
3873         (mips_insert_point, mips_remove_point): Use
3874         Z_packet_to_target_hw_bp_type.
3875
3876 2014-05-20  Pedro Alves  <palves@redhat.com>
3877
3878         * linux-aarch64-low.c: Include break-common.h.
3879         (enum target_point_type): Delete.
3880         (Z_packet_to_point_type): Rename to ...
3881         (Z_packet_to_target_hw_bp_type): ... this, and return a
3882         target_hw_bp_type instead.
3883         (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3884         instead of an enum target_point_type.
3885         (aarch64_point_encode_ctrl_reg): Likewise.  Compute type mask from
3886         breakpoint type.
3887         (aarch64_dr_state_insert_one_point)
3888         (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3889         (aarch64_handle_aligned_watchpoint)
3890         (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3891         Take an enum target_hw_bp_type instead of an enum
3892         target_point_type.
3893         (aarch64_supports_z_point_type): New function.
3894         (aarch64_insert_point, aarch64_remove_point): Use it.  Adjust to
3895         use Z_packet_to_target_hw_bp_type.
3896
3897 2014-05-20  Joel Brobecker  <brobecker@adacore.com>
3898
3899         * configure.ac: Only use -Werror by default when DEVELOPMENT
3900         is true.
3901         * configure: Regenerate.
3902
3903 2014-05-19  Jan Kratochvil  <jan.kratochvil@redhat.com>
3904
3905         Fix gdbserver qGetTLSAddr for x86_64 -m32.
3906         * linux-x86-low.c (X86_64_USER_REGS): New.
3907         (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3908
3909 2014-04-28  Yao Qi  <yao@codesourcery.com>
3910
3911         * Makefile.in (i386-avx512.c): Fix the typo of generated file
3912         name.
3913
3914 2014-04-25  Pedro Alves  <palves@redhat.com>
3915
3916         PR server/16255
3917         * linux-low.c (linux_attach_fail_reason_string): New function.
3918         (linux_attach_lwp): Delete.
3919         (linux_attach_lwp_1): Rename to ...
3920         (linux_attach_lwp): ... this.  Take a ptid instead of a pid as
3921         argument.  Remove "initial" parameter.  Return int instead of
3922         void.  Don't error or warn here.
3923         (linux_attach): Adjust to call linux_attach_lwp.  Call error on
3924         failure to attach to the tgid.  Call warning when failing to
3925         attach to an lwp.
3926         * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3927         argument.  Remove "initial" parameter.  Return int instead of
3928         void.  Don't error or warn here.
3929         (linux_attach_fail_reason_string): New declaration.
3930         * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3931         interface change.  Use linux_attach_fail_reason_string.
3932
3933 2014-04-24  Michael Sturm  <michael.sturm@mintel.com>
3934             Walfred Tedeschi  <walfred.tedeschi@intel.com>
3935
3936         * Makefile.in: Added rules to handle new files
3937         i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3938         amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3939         * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3940         (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3941         (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3942         (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3943         x32-avx512-linux.o.
3944         (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3945         (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3946         (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3947         i386/x32-avx512.xml.
3948         (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3949         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3950         i386/x32-avx512-linux.xml.
3951         * i387-fp.c (num_avx512_k_registers): New constant for number
3952         of K registers.
3953         (num_avx512_zmmh_low_registers): New constant for number of
3954         lower ZMM registers (0-15).
3955         (num_avx512_zmmh_high_registers): New constant for number of
3956         higher ZMM registers (16-31).
3957         (num_avx512_ymmh_registers): New contant for number of higher
3958         YMM registers (ymm16-31 added by avx521 on x86_64).
3959         (num_avx512_xmm_registers): New constant for number of higher
3960         XMM registers (xmm16-31 added by AVX512 on x86_64).
3961         (struct i387_xsave): Add space for AVX512 registers.
3962         (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3963         Add code to handle AVX512 registers.
3964         (i387_xsave_to_cache): Add code to handle AVX512 registers.
3965         * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3966         prototypei from generated file.
3967         (tdesc_amd64_avx512_linux): Likewise.
3968         (init_registers_x32_avx512_linux): Likewise.
3969         (tdesc_x32_avx512_linux): Likewise.
3970         (init_registers_i386_avx512_linux): Likewise.
3971         (tdesc_i386_avx512_linux): Likewise.
3972         (x86_64_regmap): Add AVX512 registers.
3973         (x86_linux_read_description): Add code to handle AVX512 XSTATE
3974         mask.
3975         (initialize_low_arch): Add code to initialize AVX512 registers.
3976
3977 2014-04-23  Pedro Alves  <palves@redhat.com>
3978
3979         * mem-break.c (find_gdb_breakpoint_at): Make static.
3980         * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3981
3982 2014-04-23  Pedro Alves  <palves@redhat.com>
3983
3984         * i386-low.c: Don't include break-common.h here.
3985         (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3986         prototype to take target_hw_bp_type as argument instead of a Z
3987         packet char.
3988         * i386-low.h: Include break-common.h here.
3989         (Z_packet_to_hw_type): Declare.
3990         (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3991         prototypes.
3992         * linux-x86-low.c (x86_insert_point): Convert the packet number to
3993         a target_hw_bp_type before calling i386_low_insert_watchpoint.
3994         (x86_remove_point): Convert the packet number to a
3995         target_hw_bp_type before calling i386_low_remove_watchpoint.
3996         * win32-i386-low.c (i386_insert_point): Convert the packet number
3997         to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3998         (i386_remove_point): Convert the packet number to a
3999         target_hw_bp_type before calling i386_low_remove_watchpoint.
4000
4001 2014-04-23  Pedro Alves  <palves@redhat.com>
4002
4003         * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
4004
4005 2014-04-10  Pedro Alves  <palves@redhat.com>
4006
4007         * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4008         Check if the condition or command is NULL before checking if the
4009         breakpoint is known.  On success, return true.
4010         * mem-break.h (add_breakpoint_condition): Document return.
4011         (add_breakpoint_commands): Add describing comment.
4012         * server.c (skip_to_semicolon): New function.
4013         (process_point_options): Use it.
4014
4015 2014-04-09  Pedro Alves  <palves@redhat.com>
4016
4017         * linux-low.c (linux_read_loadmap): Pass current_inferior directly
4018         to lwpid_of.
4019
4020 2014-02-27  Pedro Alves  <palves@redhat.com>
4021
4022         PR 12702
4023         * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
4024         macros.
4025         * linux-low.c (delete_lwp, handle_extended_wait): Add debug
4026         output.
4027         (last_thread_of_process_p): Take a PID argument instead of a
4028         thread pointer.
4029         (linux_wait_for_lwp): Delete.
4030         (num_lwps, check_zombie_leaders, not_stopped_callback): New
4031         functions.
4032         (linux_low_filter_event): New function, party factored out from
4033         linux_wait_for_event.
4034         (linux_wait_for_event): Rename to ...
4035         (linux_wait_for_event_filtered): ... this.  Add new filter ptid
4036         argument.  Partly rewrite.  Always use waitpid(-1, WNOHANG) and
4037         sigsuspend.  Check for zombie leaders.
4038         (linux_wait_for_event): Reimplement as wrapper around
4039         linux_wait_for_event_filtered.
4040         (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED.  Assume that if
4041         a normal or signal exit is seen, it's the whole process exiting.
4042         (wait_for_sigstop): No longer a for_each_inferior callback.
4043         Rewrite on top of linux_wait_for_event_filtered.
4044         (stop_all_lwps): Call wait_for_sigstop directly.
4045         * server.c (resume, handle_target_event): Handle
4046         TARGET_WAITKIND_NO_RESUMED.
4047
4048 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
4049
4050         * win32-low.c (psapi_get_dll_name,
4051         * win32_CreateToolhelp32Snapshot): Delete.
4052         (win32_CreateToolhelp32Snapshot, win32_Module32First)
4053         (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
4054         Delete.
4055         (handle_load_dll): Add function description.
4056         Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
4057
4058 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
4059
4060         * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
4061         Add comment.
4062         (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
4063         base address when calling win32_add_one_solib.
4064         (handle_load_dll): Delete local variable load_addr.
4065         Remove 0x1000 offset applied to DLL base address when calling
4066         win32_add_one_solib.
4067         (handle_unload_dll): Add comment.
4068
4069 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
4070
4071         * win32-low.c (win32_add_all_dlls): Renames
4072         win32_ensure_ntdll_loaded.  Rewrite function documentation.
4073         Adjust implementation to always load all DLLs.
4074         Add 0x1000 offset to DLL base address when calling
4075         win32_add_one_solib.
4076         (child_initialization_done): New static global.
4077         (do_initial_child_stuff): Set child_initialization_done to
4078         zero during child initialization, and 1 after.  Replace call
4079         to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
4080         Add comment.
4081         (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
4082         (handle_unload_dll): Add function documentation.
4083         (get_child_debug_event): Ignore load and unload DLL events
4084         during child initialization.
4085
4086 2014-02-20  Doug Evans  <dje@google.com>
4087
4088         Remove global all_lwps.
4089         * inferiors.h (ptid_of): Move here from linux-low.h.
4090         (pid_of, lwpid_of): Ditto.
4091         * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
4092         parameter is a struct thread_info * now.
4093         (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
4094         directly.  Pass &all_threads to find_inferior instead of &all_lwps.
4095         (aarch64_stopped_data_address): Fetch lwpid from current_inferior
4096         directly.
4097         (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
4098         (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
4099         * linux-arm-low.c (update_registers_callback): Update, "entry"
4100         parameter is a struct thread_info * now.
4101         Fetch lwpid from current_inferior directly.
4102         (arm_insert_point): Pass &all_threads to find_inferior instead of
4103         &all_lwps.
4104         (arm_remove_point): Ditto.
4105         (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
4106         (arm_prepare_to_resume): Fetch pid from thread.
4107         (arm_read_description): Fetch lwpid from current_inferior directly.
4108         * linux-low.c (all_lwps): Delete.
4109         (delete_lwp): Delete call to remove_inferior.
4110         (handle_extended_wait): Fetch lwpid from thread.
4111         (add_lwp): Don't set lwp->entry.id.  Remove call to
4112         add_inferior_to_list.
4113         (linux_attach_lwp_1): Fetch pid from current_inferior directly.
4114         (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
4115         (kill_one_lwp_callback): Ditto.
4116         (linux_kill): Don't dereference NULL pointer.
4117         Fetch ptid,lwpid from thread.
4118         (get_detach_signal): Fetch ptid from thread.
4119         (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
4120         Simplify call to regcache_invalidate_thread.
4121         (delete_lwp_callback): Update, "entry" parameter is a
4122         struct thread_info * now.  Fetch pid from thread.
4123         (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
4124         (status_pending_p_callback): Update, "entry" parameter is a
4125         struct thread_info * now.  Fetch ptid from thread.
4126         (find_lwp_pid): Update, "entry" parameter is a
4127         struct thread_info * now.
4128         (linux_wait_for_lwp): Fetch pid from thread.
4129         (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
4130         (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
4131         (enqueue_one_deferred_signal): Fetch lwpid from thread.
4132         (dequeue_one_deferred_signal): Ditto.
4133         (cancel_breakpoint): Fetch ptid from current_inferior.
4134         (linux_wait_for_event): Pass &all_threads to find_inferior,
4135         not &all_lwps.  Fetch ptid, lwpid from thread.
4136         (count_events_callback): Update, "entry" parameter is a
4137         struct thread_info * now.
4138         (select_singlestep_lwp_callback): Ditto.
4139         (select_event_lwp_callback): Ditto.
4140         (cancel_breakpoints_callback): Ditto.
4141         (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
4142         not &all_lwps.
4143         (select_event_lwp): Ditto.  Fetch ptid from event_thread.
4144         (unsuspend_one_lwp): Update, "entry" parameter is a
4145         struct thread_info * now.
4146         (unsuspend_all_lwps): Pass &all_threads to find_inferior,
4147         not &all_lwps.
4148         (linux_stabilize_threads): Ditto.  And for for_each_inferior.
4149         Fetch lwpid from thread, not lwp.
4150         (linux_wait_1): Fetch ptid, lwpid from current_inferior.
4151         Pass &all_threads to find_inferior, not &all_lwps.
4152         (send_sigstop): Fetch lwpid from thread, not lwp.
4153         (send_sigstop_callback): Update, "entry" parameter is a
4154         struct thread_info * now.
4155         (suspend_and_send_sigstop_callback): Ditto.
4156         (wait_for_sigstop): Ditto.  Fetch ptid, lwpid from thread, lwp.
4157         (stuck_in_jump_pad_callback): Update, "entry" parameter is a
4158         struct thread_info * now.
4159         (move_out_of_jump_pad_callback): Ditto.  Fetch ptid, lwpid
4160         from thread, lwp.
4161         (lwp_running): Update, "entry" parameter is a
4162         struct thread_info * now.
4163         (stop_all_lwps): Fetch ptid from thread.
4164         Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
4165         (linux_resume_one_lwp): Fetch lwpid from thread.
4166         (linux_set_resume_request): Update, "entry" parameter is a
4167         struct thread_info * now.  Fetch pid, lwpid from thread.
4168         (resume_status_pending_p): Update, "entry" parameter is a
4169         struct thread_info * now.
4170         (need_step_over_p): Ditto.  Fetch lwpid from thread.
4171         (start_step_over): Fetch lwpid from thread.
4172         (linux_resume_one_thread): Update, "entry" parameter is a
4173         struct thread_info * now.  Fetch lwpid from thread.
4174         (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
4175         (proceed_one_lwp): Update, "entry" parameter is a
4176         struct thread_info * now.  Fetch lwpid from thread.
4177         (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
4178         struct thread_info * now.
4179         (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
4180         (unstop_all_lwps): Ditto.  Fetch lwpid from thread.
4181         (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
4182         directly.
4183         (regsets_store_inferior_registers): Ditto.
4184         (fetch_register, store_register): Ditto.
4185         (linux_read_memory, linux_write_memory): Ditto.
4186         (linux_request_interrupt): Ditto.
4187         (linux_read_auxv): Ditto.
4188         (linux_xfer_siginfo): Ditto.
4189         (linux_qxfer_spu): Ditto.
4190         (linux_qxfer_libraries_svr4): Ditto.
4191         * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
4192         moved to inferiors.h.
4193         (get_lwp): Delete.
4194         (get_thread_lwp): Update.
4195         (struct lwp_info): Delete member "entry".  Simplify comment for
4196         member "thread".
4197         (all_lwps): Delete.
4198         * linux-mips-low.c (mips_read_description): Fetch lwpid from
4199         current_inferior directly.
4200         (update_watch_registers_callback): Update, "entry" parameter is a
4201         struct thread_info * now.  Fetch pid from thread.
4202         (mips_linux_prepare_to_resume): Fetch ptid from thread.
4203         (mips_insert_point): Fetch lwpid from current_inferior.
4204         Pass &all_threads to find_inferior, not &all_lwps.
4205         (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
4206         (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
4207         directly.
4208         (mips_stopped_data_address): Ditto.
4209         * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
4210         directly.
4211         * linux-tile-low.c (tile_arch_setup): Ditto.
4212         * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
4213         (update_debug_registers_callback): Update, "entry" parameter is a
4214         struct thread_info * now.  Fetch pid from thread.
4215         (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
4216         Pass &all_threads to find_inferior, not &all_lwps.
4217         (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
4218         (i386_dr_low_set_control): Fetch pid from current_inferior directly.
4219         Pass &all_threads to find_inferior, not &all_lwps.
4220         (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
4221         (i386_dr_low_get_status): Ditto.
4222         (x86_linux_prepare_to_resume): Fetch ptid from thread.
4223         (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
4224         (x86_linux_read_description): Ditto.
4225         * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
4226
4227 2014-02-20  Doug Evans  <dje@google.com>
4228
4229         * inferiors.c (get_first_inferior): Fix buglet.
4230
4231 2014-02-19  Doug Evans  <dje@google.com>
4232
4233         * gdbthread.h (add_thread): Change result type to struct thread_info *.
4234         * inferiors.c (add_thread): Change result type to struct thread_info *.
4235         All callers updated.
4236         (add_lwp): Call add_thread here instead of in callers.
4237         All callers updated.
4238         * linux-low.h (get_lwp_thread): Rewrite.
4239         (struct lwp_info): New member "thread".
4240
4241 2014-02-19  Doug Evans  <dje@google.com>
4242
4243         * linux-low.c (add_lwp): Change result to struct lwp_info *.
4244         All callers updated.
4245
4246 2014-02-19  Doug Evans  <dje@google.com>
4247
4248         * inferiors.c (add_thread): Fix whitespace.
4249
4250 2014-02-19  Doug Evans  <dje@google.com>
4251
4252         * dll.c (clear_dlls): Replace accessing list implemention details
4253         with API function.
4254         * gdbthread.h (get_first_thread): Declare.
4255         * inferiors.c (for_each_inferior_with_data): New function.
4256         (get_first_thread): New function.
4257         (find_thread_ptid): Simplify.
4258         (get_first_inferior): New function.
4259         (clear_list): Delete.
4260         (one_inferior_p): New function.
4261         (clear_inferior_list): New function.
4262         (clear_inferiors): Update.
4263         * inferiors.h (for_each_inferior_with_data): Declare.
4264         (clear_inferior_list): Declare.
4265         (one_inferior_p): Declare.
4266         (get_first_inferior): Declare.
4267         * linux-low.c (linux_wait_for_event): Replace accessing list
4268         implemention details with API function.
4269         * server.c (target_running): Ditto.
4270         (accumulate_file_name_length): New function.
4271         (emit_dll_description): New function.
4272         (handle_qxfer_libraries): Replace accessing list implemention
4273         details with API function.
4274         (handle_qxfer_threads_worker): New function.
4275         (handle_qxfer_threads_proper): Replace accessing list implemention
4276         details with API function.
4277         (handle_query): Ditto.
4278         (visit_actioned_threads_callback_ftype): New typedef.
4279         (visit_actioned_threads_data): New struct.
4280         (visit_actioned_threads): Rewrite to be find_inferior callback.
4281         (resume): Call find_inferior.
4282         (handle_status): Replace accessing list implemention
4283         details with API function.
4284         (process_serial_event): Replace accessing list implemention details
4285         with API function.
4286         * target.c (set_desired_inferior): Replace accessing list implemention
4287         details with API function.
4288         * tracepoint.c (same_process_p): New function.
4289         (gdb_agent_about_to_close): Replace accessing list implemention
4290         details with API function.
4291         * win32-low.c (child_delete_thread): Replace accessing list
4292         implemention details with API function.
4293         (match_dll_by_basename): New function.
4294         (dll_is_loaded_by_basename): New function.
4295         (win32_ensure_ntdll_loaded): Replace accessing list implemention
4296         details call to dll_is_loaded_by_basename.
4297
4298 2014-02-19  Doug Evans  <dje@google.com>
4299
4300         * dll.h (struct dll_info): Add comment.
4301         * gdbthread.h (struct thread_info): Add comment.
4302         (current_ptid): Simplify.
4303         * inferiors.c (add_process): Update.
4304         (remove_process): Update.
4305         * inferiors.h (struct process_info): Rename member "head" to "entry".
4306         * linux-low.c (delete_lwp): Update.
4307         (add_lwp): Update.
4308         (last_thread_of_process_p): Update.
4309         (kill_one_lwp_callback, linux_kill): Update.
4310         (status_pending_p_callback): Update.
4311         (wait_for_sigstop): Update.  Simplify read of ptid.
4312         (start_step_over): Update.
4313         * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
4314         (get_lwp_thread): Update.
4315         (struct lwp_info): Rename member "head" to "entry".
4316         * regcache.h (inferior_list_entry): Delete.
4317         * server.c (kill_inferior_callback): Update.
4318         (detach_or_kill_inferior_callback): Update.
4319         (print_started_pid): Update.
4320         (print_attached_pid): Update.
4321         (process_serial_event): Simplify read of ptid.
4322         * thread-db.c (thread_db_create_event): Update.
4323         (thread_db_get_tls_address): Update.
4324         * win32-low.c (current_inferior_ptid): Simplify.
4325
4326 2014-02-19  Tom Tromey  <tromey@redhat.com>
4327
4328         * target.h (struct target_ops) <supports_btrace>: Add target_ops
4329         argument.
4330         (target_supports_btrace): Update.
4331
4332 2014-02-14  Yao Qi  <yao@codesourcery.com>
4333
4334         * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
4335         (rsp-low-ipa.o): New target.
4336
4337 2014-02-12  Tom Tromey  <tromey@redhat.com>
4338
4339         * ax.c (gdb_parse_agent_expr): Use hex2bin, not
4340         convert_ascii_to_int.
4341         * regcache.c (registers_to_string): Likewise.
4342         * remote-utils.c (decode_M_packet): Likewise.
4343         * server.c (process_serial_event): Likewise.
4344
4345 2014-02-12  Tom Tromey  <tromey@redhat.com>
4346
4347         * server.c (handle_query, handle_v_run): Use hex2bin, not
4348         unhexify.
4349         * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
4350
4351 2014-02-12  Tom Tromey  <tromey@redhat.com>
4352
4353         * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
4354         convert_int_to_ascii.
4355         * regcache.c (registers_to_string, collect_register_as_string):
4356         Likewise.
4357         * remote-utils.c (look_up_one_symbol, relocate_instruction):
4358         Likewise.
4359         * server.c (process_serial_event): Likewise.
4360         * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
4361         (cmd_qtbuffer, cstr_to_hexstr): Likewise.
4362
4363 2014-02-12  Tom Tromey  <tromey@redhat.com>
4364
4365         * remote-utils.c (look_up_one_symbol, monitor_output): Use
4366         bin2hex, not hexify.
4367         * tracepoint.c (cmd_qtstatus): Likewise.
4368
4369 2014-02-12  Tom Tromey  <tromey@redhat.com>
4370
4371         * remote-utils.c (monitor_output): Pass explicit length to
4372         hexify.
4373
4374 2014-02-12  Tom Tromey  <tromey@redhat.com>
4375
4376         * tracepoint.c: Include rsp-low.h.
4377         * server.c: Include rsp-low.h.
4378         * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
4379         (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
4380         declare.
4381         * remote-utils.c: Include rsp-low.h.
4382         (fromhex, hexchars, ishex, unhexify, tohex, hexify)
4383         (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
4384         (convert_int_to_ascii, convert_ascii_to_int): Move to
4385         common/rsp-low.c.
4386         * regcache.c: Include rsp-low.h.
4387         * ax.c: Include rsp-low.h.
4388         * Makefile.in (SFILES): Add common/rsp-low.c.
4389         (OBS): Add rsp-low.o.
4390         (rsp-low.o): New target.
4391
4392 2014-02-12  Tom Tromey  <tromey@redhat.com>
4393
4394         * utils.h (pulongest, plongest, phex_nz): Don't declare.
4395         Include print-utils.h.
4396         * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
4397         (plongest, thirty_two, phex_nz): Remove.
4398         * Makefile.in (SFILES): Add common/print-utils.c.
4399         (OBS): Add print-utils.o.
4400         (print-utils-ipa.o): New target.
4401         (print-utils.o): New target.
4402         (IPA_OBJS): Add print-utils-ipa.o.
4403
4404 2014-02-06  Tom Tromey  <tromey@redhat.com>
4405
4406         * Makefile.in (SFILES): Fix indentation.
4407
4408 2014-02-05  Doug Evans  <dje@google.com>
4409
4410         * linux-low.c (linux_wait_for_event): Improve comment.
4411         (linux_wait_1): Keep current_inferior in sync with event_child.
4412
4413 2014-01-22  Doug Evans  <dje@google.com>
4414
4415         * gdbthread.h (gdb_id_to_thread): Delete, unused.
4416
4417 2014-01-22  Doug Evans  <dje@google.com>
4418
4419         * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
4420         * configure: Regenerate.
4421         * config.in: Regenerate.
4422         * Makefile.in (SFILES): Add debug.c.
4423         (OBS): Add debug.o.
4424         * debug.c: New file.
4425         * debug.h: New file.
4426         * linux-aarch64-low.c (*): Update all debugging printfs to use
4427         debug_printf instead of fprintf.
4428         * linux-arm-low.c (*): Ditto.
4429         * linux-cris-low.c (*): Ditto.
4430         * linux-crisv32-low.c (*): Ditto.
4431         * linux-m32r-low.c (*): Ditto.
4432         * linux-sparc-low.c (*): Ditto.
4433         * linux-x86.c (*): Ditto.
4434         * linux-low.c (*): Ditto.
4435         (linux_wait_1): Add calls to debug_enter, debug_exit.
4436         (linux_wait): Remove redundant debugging printf.
4437         (stop_all_lwps): Add calls to debug_enter, debug_exit.
4438         (linux_resume, unstop_all_lwps): Ditto.
4439         * mem-break.c (*): Update all debugging printfs to use
4440         debug_printf instead of fprintf.
4441         * remote-utils.c (*): Ditto.
4442         * thread-db.c (*): Ditto.
4443         * server.c #include <ctype.h>, "gdb_vecs.h".
4444         (debug_threads): Moved to debug.c.
4445         (*): Update all debugging printfs to use debug_printf instead of
4446         fprintf.
4447         (start_inferior): Replace call to fflush with call to debug_flush.
4448         (monitor_show_help): Mention set debug-format.
4449         (parse_debug_format_options): New function.
4450         (handle_monitor_command): Handle "monitor set debug-format".
4451         (gdbserver_usage): Mention --debug-format.
4452         (main): Parse --debug-format.
4453         * server.h (debug_threads): Declaration moved to debug.h.
4454         #include "debug.h".
4455         * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
4456         trace_debug_1 that uses debug_printf.
4457         (tracepoint_look_up_symbols): Update all debugging printfs to use
4458         debug_printf instead of fprintf.
4459
4460 2014-01-20  Baruch Siach  <baruch@tkos.co.il>
4461
4462         * linux-xtensa-low.c: Include asm/ptrace.h instead of
4463         sys/ptrace.h.
4464
4465 2014-01-17  Pedro Alves  <palves@redhat.com>
4466
4467         PR build/16445
4468         * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
4469         defined after including gdb_proc_service.h.
4470
4471 2014-01-16  Doug Evans  <dje@google.com>
4472
4473         * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
4474         (match_dll): Use it.
4475
4476 2014-01-16  Markus Metzger  <markus.t.metzger@intel.com>
4477
4478         * target.h (target_ops) <read_btrace>: Change parameters and
4479         return type to allow error reporting.
4480         * server.c (handle_qxfer_btrace): Support delta reads.  Pass
4481         trace reading errors on.
4482         * linux-low.c (linux_low_read_btrace): Pass trace reading
4483         errors on.
4484         (linux_low_disable_btrace): New.
4485
4486 2014-01-15  Doug Evans  <dje@google.com>
4487
4488         * inferiors.c (thread_id_to_gdb_id): Delete.
4489         * inferiors.h (thread_id_to_gdb_id): Delete.
4490
4491 2014-01-13  Eli Zaretskii  <eliz@gnu.org>
4492
4493         * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
4494         "-I$(srcdir)/../".  Fixes MinGW compilation errors with old GCC
4495         versions.
4496
4497 2014-01-08  Pedro Alves  <palves@redhat.com>
4498
4499         * server.c (handle_status): Don't discard previous queued stop
4500         replies or thread's pending status here.
4501         (main) <disconnection>: Do it here instead.
4502
4503 2014-01-08  Pedro Alves  <palves@redhat.com>
4504
4505         * gdbthread.h (struct thread_info) <status_pending_p>: New field.
4506         * server.c (visit_actioned_threads, handle_pending_status): New
4507         function.
4508         (handle_v_cont): Factor out parts to ...
4509         (resume): ... this new function.  If in all-stop, and a thread
4510         being resumed has a pending status, report it without actually
4511         resuming.
4512         (myresume): Adjust to use the new 'resume' function.
4513         (clear_pending_status_callback, set_pending_status_callback)
4514         (find_status_pending_thread_callback): New functions.
4515         (handle_status): Handle the case of multiple threads having
4516         interesting statuses to report.  Report threads' real last signal
4517         instead of always reporting GDB_SIGNAL_TRAP.  Look for a thread
4518         with an interesting thread to report the status for, instead of
4519         always reporting the status of the first thread.
4520
4521 2014-01-01  Joel Brobecker  <brobecker@adacore.com>
4522
4523         * gdbserver.c (gdbserver_version): Set copyright year to 2014.
4524         * gdbreplay.c (gdbreplay_version): Likewise.
4525
4526 2013-12-18  Yufeng Zhang  <yufeng.zhang@arm.com>
4527
4528         * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
4529         iov.iov_len with the real length in use.
4530
4531 2013-12-13  Joel Brobecker  <brobecker@adacore.com>
4532
4533         * Makefile.in (safe-ctype.o, lbasename.o): New rules.
4534         * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
4535         for all targets that use win32-low.c.
4536         * win32-low.c (win32_ensure_ntdll_loaded): New function.
4537         (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
4538
4539 2013-12-13  Pedro Alves  <palves@redhat.com>
4540
4541         * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
4542         if equal to TARGET_WAITKIND_LOADED.
4543         * win32-low.c (cached_status): New static global.
4544         (win32_wait): Add declaration.
4545         (do_initial_child_stuff): Flush all initial pending debug events
4546         up to the initial breakpoint.
4547         (win32_wait): If CACHED_STATUS was set, return that instead
4548         of doing a real wait.  Remove the code resuming the execution
4549         of the inferior after receiving a TARGET_WAITKIND_LOADED event
4550         during the initial phase.  Also remove the code changing
4551         OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
4552         TARGET_WAITKIND_STOPPED.
4553
4554 2013-12-11  Yao Qi  <yao@codesourcery.com>
4555
4556         * notif.c (handle_notif_ack): Return 0 if no notification
4557         matches.
4558
4559 2013-11-20  Doug Evans  <dje@google.com>
4560
4561         * linux-low.c (linux_set_resume_request): Fix comment.
4562
4563 2013-11-20  Doug Evans  <dje@google.com>
4564
4565         * linux-low.c (resume_status_pending_p): Tweak comment.
4566
4567 2013-11-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4568
4569         * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
4570         amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
4571         * configure.srv (srv_i386_regobj): Add i386-mpx.o.
4572         (srv_i386_linux_regobj): Add i386-mpx-linux.o.
4573         (srv_amd64_regobj): Add amd64-mpx.o.
4574         (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
4575         (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
4576         (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
4577         * i387-fp.c (num_pl_bnd_register) Added constant.
4578         (num_pl_bnd_cfg_registers) Added constant.
4579         (struct i387_xsave) Added reserved area and MPX fields.
4580         (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
4581         * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
4582         function.
4583         (tdesc_i386_mpx_linux): Add MPX amd64 target.
4584         (init_registers_amd64_mpx_linux): Declare new function.
4585         (tdesc_amd64_mpx_linux): Add MPX amd64 target.
4586         (x86_64_regmap): Add MPX registers.
4587         (x86_linux_read_description): Add MPX case.
4588         (initialize_low_arch): Initialize MPX targets.
4589
4590 2013-11-18  Tom Tromey  <tromey@redhat.com>
4591
4592         * configure: Rebuild.
4593         * configure.ac: Don't check for stdlib.h.
4594         * gdbreplay.c: Unconditionally include stdlib.h.
4595
4596 2013-11-18  Tom Tromey  <tromey@redhat.com>
4597
4598         * config.in: Rebuild.
4599         * configure: Rebuild.
4600         * configure.ac: Don't use AC_HEADER_DIRENT.
4601
4602 2013-11-18  Tom Tromey  <tromey@redhat.com>
4603
4604         * server.h: Don't check HAVE_STRING_H.
4605         * gdbreplay.c: Don't check HAVE_STRING_H.
4606         * configure: Rebuild.
4607
4608 2013-11-18  Tom Tromey  <tromey@redhat.com>
4609
4610         * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
4611         LIBGNU.
4612
4613 2013-11-08  Tom Tromey  <tromey@redhat.com>
4614
4615         * configure, config.in: Rebuild.
4616         * configure.ac: Remove unused configury.
4617
4618 2013-11-08  Tom Tromey  <tromey@redhat.com>
4619
4620         * acinclude.m4: Include common.m4, codeset.m4.
4621         * configure, config.in: Rebuild.
4622         * configure.ac: Use GDB_AC_COMMON.
4623
4624 2013-11-06  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4625
4626         * linux-s390-low.c (HWCAP_S390_TE): New define.
4627         (s390_arch_setup): Consider the TE field in the HWCAP for
4628         determining 'have_regset_tdb'.
4629
4630 2013-10-16  Sergio Durigan Junior  <sergiodj@redhat.com>
4631
4632         PR gdb/16014
4633         * tracepoint.c (download_tracepoint_1): Remove unnecessary double
4634         call to sizeof.
4635
4636 2013-10-02  Pedro Alves  <palves@redhat.com>
4637
4638         * server.c (process_serial_event): Don't output "GDBserver
4639         exiting" if GDB is connected through stdio.
4640         * target.c (mywait): Likewise, be silent if GDB is connected
4641         through stdio.
4642
4643 2013-10-01  Joel Brobecker  <brobecker@adacore.com>
4644
4645         * lynx-low.c (lynx_add_threads_after_attach): New function.
4646         (lynx_attach): Remove call to add_thread.  Add call to
4647         lynx_add_threads_after_attach instead.
4648
4649 2013-09-28  Mike Frysinger  <vapier@gentoo.org>
4650
4651         * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4652         * config.in, configure: Regenerated.
4653
4654 2013-09-18  Yao Qi  <yao@codesourcery.com>
4655
4656         PR server/15959
4657         * server.c (start_inferior): Clear 'resume_info'.
4658
4659 2013-09-16  Jiong Wang  <jiwang@tilera.com>
4660
4661         * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4662         for each register.
4663
4664 2013-09-16  Jiong Wang  <jiwang@tilera.com>
4665
4666         * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4667         linux-tile-low.o to srv_tgtobj.
4668
4669 2013-09-16  Will Newton  <will.newton@linaro.org>
4670
4671         * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4672         out regs.
4673
4674 2013-09-06  Pedro Alves  <palves@redhat.com>
4675
4676         * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4677         (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4678         (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4679         (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4680         (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4681         (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4682
4683 2013-09-06  Pedro Alves  <palves@redhat.com>
4684
4685         * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4686         explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4687
4688 2013-09-06  Pedro Alves  <palves@redhat.com>
4689
4690         * linux-amd64-ipa.c: Include tracepoint.h.
4691         * linux-i386-ipa.c: Include tracepoint.h.
4692
4693 2013-09-06  Ricard Wanderlof  <ricardw@axis.com>
4694
4695         * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4696         (ps_get_thread_area): New function.
4697
4698 2013-09-06  Ricard Wanderlof  <ricardw@axis.com>
4699
4700         * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4701         (initialize_low_arch): Call init_registers_crisv32 rather than
4702         init_register_crisv32.
4703
4704 2013-09-05  Pedro Alves  <palves@redhat.com>
4705
4706         * server.h (handle_vFile, hostio_last_error_from_errno): Move
4707         to ...
4708         * hostio.h: ... this new file.
4709         * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4710         win32-low.c: Include hostio.h.
4711
4712 2013-09-05  Pedro Alves  <palves@redhat.com>
4713
4714         * server.h (gdb_client_data, handler_func, callback_handler_func)
4715         (delete_file_handler, add_file_handler, append_callback_event)
4716         (delete_callback_event, start_event_loop, initialize_event_loop):
4717         Move to event-loop.h and include it.
4718         * event-loop.h: New file.
4719
4720 2013-09-05  Pedro Alves  <palves@redhat.com>
4721
4722         * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4723         * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4724         (loaded_dll, unloaded_dll): Move to ...
4725         * dll.h: ... this new file.
4726         * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4727
4728 2013-09-05  Pedro Alves  <palves@redhat.com>
4729
4730         * server.h (current_process, get_thread_process, all_processes)
4731         (add_inferior_to_list, for_each_inferior, current_inferior)
4732         (remove_inferior, add_process, remove_process, find_process_pid)
4733         (have_started_inferiors_p, have_attached_inferiors_p)
4734         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4735         (clear_inferiors, find_inferior, find_inferior_id)
4736         (inferior_target_data, set_inferior_target_data)
4737         (inferior_regcache_data, set_inferior_regcache_data): Move to
4738         inferiors.h, and include it.
4739         * inferiors.h: New file.
4740
4741 2013-09-05  Pedro Alves  <palves@redhat.com>
4742
4743         * server.h (struct emit_ops, current_insn_ptr, emit_error):
4744         Move ...
4745         * ax.h: ... here.
4746
4747 2013-09-05  Pedro Alves  <palves@redhat.com>
4748
4749         * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4750         tracepoint.h.
4751         * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4752         (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4753         (handle_tracepoint_general_set, handle_tracepoint_query)
4754         (tracepoint_finished_step, tracepoint_was_hit)
4755         (release_while_stepping_state_list, current_traceframe)
4756         (in_readonly_region, traceframe_read_mem)
4757         (fetch_traceframe_registers, traceframe_read_sdata)
4758         (traceframe_read_info, struct fast_tpoint_collect_status)
4759         (fast_tracepoint_collecting, force_unlock_trace_buffer)
4760         (handle_tracepoit_bkpts, initialize_low_tracepoint)
4761         (supply_fast_tracepoint_registers)
4762         (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4763         (ipa_tdesc, claim_trampoline_space)
4764         (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4765         (agent_mem_read, agent_get_trace_state_variable_value)
4766         (agent_set_trace_state_variable_value, agent_tsv_read)
4767         (agent_mem_read_string, get_raw_reg_func_addr)
4768         (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4769         * tracepoint.h: ... this new file.
4770
4771 2013-09-05  Pedro Alves  <palves@redhat.com>
4772
4773         * server.h (perror_with_name, error, fatal, warning, paddress)
4774         (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4775         include it.
4776         * utils.h: New file.
4777
4778 2013-09-05  Pedro Alves  <palves@redhat.com>
4779
4780         * server.h (remote_debug, noack_mode, transport_is_reliable)
4781         (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4782         (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4783         (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4784         (write_enn, initialize_async_io, enable_async_io)
4785         (disable_async_io, check_remote_input_interrupt_request)
4786         (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4787         (dead_thread_notify, prepare_resume_reply)
4788         (decode_address_to_semicolon, decode_address, decode_m_packet)
4789         (decode_M_packet, decode_X_packet, decode_xfer_write)
4790         (decode_search_memory_packet, unhexify, hexify)
4791         (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4792         (look_up_one_symbol, relocate_instruction)
4793         (monitor_output): Move to remote-utils.h, and include it.
4794         * remote-utils.h: New file.
4795
4796 2013-09-05  Pedro Alves  <palves@redhat.com>
4797
4798         * server.h (_): Delete.
4799
4800 2013-09-02  Pedro Alves  <palves@redhat.com>
4801
4802         * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4803         (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4804         allocated.
4805         (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4806
4807 2013-09-02  Pierre Muller  <muller@sourceware.org>
4808
4809         * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4810         or WriteProcessMemory complete successfully and handle
4811         ERROR_PARTIAL_COPY error.
4812
4813 2013-09-02  Pedro Alves  <palves@redhat.com>
4814
4815         * server.c (gdb_read_memory): Return -1 on traceframe memory read
4816         error instead of EIO.
4817
4818 2013-08-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
4819
4820         PR server/15604
4821         * linux-low.c: Include filestuff.h.
4822         (linux_create_inferior) <pid == 0>: Call close_most_fds.
4823         * lynx-low.c: Include filestuff.h.
4824         (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4825         * server.c: Include filestuff.h.
4826         (main): Call notice_open_fds.
4827         * spu-low.c: Include filestuff.h.
4828         (spu_create_inferior) <pid == 0>: Call close_most_fds.
4829
4830 2013-08-22  Luis Machado  <lgustavo@codesourcery.com>
4831
4832         * Makefile.in: Explain why ../target and ../nat are not
4833         listed as include file search paths.
4834         (linux-waitpid.o): New object file rule.
4835         * configure.srv (srv_native_linux_obj): New variable.
4836         Replace all occurrences of linux native object files with
4837         $srv_native_linux_obj.
4838         * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4839         (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4840         (linux_enable_event_reporting): Remove declaration.
4841         (my_waitpid): Moved to common/linux-waitpid.c.
4842         (linux_wait_for_event): Pass ptid when calling
4843         linux_enable_event_reporting.
4844         (linux_supports_tracefork_flag): Remove.
4845         (linux_enable_event_reporting): Likewise.
4846         (linux_tracefork_grandchild): Remove.
4847         (STACK_SIZE): Moved to common/linux-ptrace.c.
4848         (linux_tracefork_child): Remove.
4849         (linux_test_for_tracefork): Remove.
4850         (linux_look_up_symbols): Call linux_supports_traceclone.
4851         (initialize_low): Remove call to linux_test_for_tracefork.
4852         * linux-low.h (PTRACE_TYPE_ARG3): Move to
4853         common/linux-ptrace.h.
4854         (PTRACE_TYPE_ARG4): Likewise.
4855         Include linux-ptrace.h.
4856
4857 2013-08-21  Pedro Alves  <palves@redhat.com>
4858
4859         * config.in: Renegerate.
4860
4861 2013-08-19  Luis Machado  <lgustavo@codesourcery.com>
4862
4863         * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4864         (SFILES): Remove $(srcdir)/common/target-common.c and
4865         add $(srcdir)/target/waitstatus.c.
4866         (OBS): Remove target-common.o and add waitstatus.o.
4867         (server_h): Remove $(srcdir)/../common/target-common.h and
4868         add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4869         and $(srcdir)/../target/waitstatus.h.
4870         (target-common.o): Remove.
4871         (waitstatus.o): New target object file.
4872         * target.h: Do not include target-common.h and
4873         include target/resume.h, target/wait.h and
4874         target/waitstatus.h.
4875
4876 2013-08-13  Luis Machado  <lgustavo@codesourcery.com>
4877
4878         * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4879         to PTRACE_TYPE_ARG3.
4880         * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4881         to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4882         PTRACE_TYPE_ARG4.
4883         * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4884         (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4885
4886 2013-07-27  Jie Zhang  <jie@codesourcery.com>
4887             Daniel Jacobowitz  <dan@codesourcery.com>
4888             Yao Qi  <yao@codesourcery.com>
4889
4890         * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4891         (mips-linux-watch.o): New rule.
4892         (mips_linux_watch_h): New variable.
4893         * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4894         srv_tgtobj.
4895         * linux-mips-low.c: Include mips-linux-watch.h.
4896         (struct arch_process_info, struct arch_lwp_info): New.
4897         (update_watch_registers_callback): New function.
4898         (mips_linux_new_process, mips_linux_new_thread) New functions.
4899         (mips_linux_prepare_to_resume, mips_insert_point): New
4900         functions.
4901         (mips_remove_point, mips_stopped_by_watchpoint): New
4902         functions.
4903         (rsp_bp_type_to_target_hw_bp_type): New function.
4904         (mips_stopped_data_address): New function.
4905         (the_low_target): Add watchpoint support functions.
4906
4907 2013-07-27  Yao Qi  <yao@codesourcery.com>
4908
4909         * i386-low.c: Include break-common.h.
4910         (enum target_hw_bp_type): Remove.
4911
4912 2013-07-24  Luis Machado  <lgustavo@codesourcery.com>
4913
4914         * Makefile.in (SFILES): /common/target-common.c.
4915         (OBS): Add target-common.o.
4916         (server_h): Add $(srcdir)/../common/target-common.h.
4917         (target-common.o): New target.
4918         * server.c (queue_stop_reply_callback): Free
4919         status string after use.
4920         * target.c (target_waitstatus_to_string): Remove.
4921         * target.h: Include target-common.h.
4922         (resume_kind): Likewise.
4923         (target_waitkind): Likewise.
4924         (target_waitstatus): Likewise.
4925         (TARGET_WNOHANG): Likewise.
4926
4927 2013-07-04  Yao Qi  <yao@codesourcery.com>
4928
4929         * Makefile.in (host_alias): Use @host_noncanonical@.
4930         (target_alias): Use @target_noncanonical@.
4931         * configure.ac: Use ACX_NONCANONICAL_TARGET and
4932         ACX_NONCANONICAL_HOST.
4933         * configure: Regenerated.
4934
4935         Revert:
4936         2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>
4937
4938         * configure.ac (version_host, version_target): Set and AC_SUBST them.
4939         * configure: Rebuild.
4940         * Makefile.in (version_host, version_target): Get from configure.
4941         (version.c): Use $(version_host) and $(version_target).
4942
4943 2013-07-03  Pedro Alves  <palves@redhat.com>
4944
4945         * Makefile.in (config.status): Depend on development.sh.
4946         * acinclude.m4: Include libmcheck.m4.
4947         * configure: Regenerate.
4948
4949 2013-07-02  Mircea Gherzan  <mircea.gherzan@intel.com>
4950
4951         * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4952         attribute inside the parentheses.
4953         (winapi_DebugSetProcessKillOnExit): Ditto.
4954         (winapi_DebugBreakProcess): Ditto.
4955         (winapi_GenerateConsoleCtrlEvent): Ditto.
4956
4957 2013-07-02  Mircea Gherzan  <mircea.gherzan@intel.com>
4958
4959         * notif.h (notif_event): Add a dummy member to avoid compiler
4960         errors.
4961
4962 2013-07-01  Pedro Alves  <palves@redhat.com>
4963
4964         * hostio.c (HOSTIO_PATH_MAX): Define.
4965         (require_filename, handle_open, handle_unlink, handle_readlink):
4966         Use it.
4967
4968 2013-07-01  Pedro Alves  <palves@redhat.com>
4969
4970         * server.h: Include "pathmax.h".
4971         * linux-low.c: Don't include sys/param.h.
4972         (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4973         MAXPATHLEN.
4974         * win32-low.c: Don't include sys/param.h.
4975         (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4976
4977 2013-07-01  Pedro Alves  <palves@redhat.com>
4978
4979         * event-loop.c: Don't check HAVE_UNISTD_H before including
4980         <unistd.h>.
4981         * gdbreplay.c: Likewise.
4982         * remote-utils.c: Likewise.
4983         * server.c: Likewise.
4984         * configure.ac: Don't check for unistd.h.
4985         * configure: Regenerate.
4986
4987 2013-06-28  Tom Tromey  <tromey@redhat.com>
4988
4989         * Makefile.in (version.c): Use version.in, not
4990         common/version.in.
4991
4992 2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>
4993
4994         * configure.ac (version_host, version_target): Set and AC_SUBST them.
4995         * configure: Rebuild.
4996         * Makefile.in (version_host, version_target): Get from configure.
4997         (version.c): Use $(version_host) and $(version_target).
4998
4999 2013-06-10  Dmitry Kozlov <ddk@codesourcery.com>
5000
5001         Fix trace-status to output user name without trailing colon.
5002         * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
5003
5004 2013-06-10  Dmitry Kozlov <ddk@codesourcery.com>
5005
5006         Fix trace-status to output proper start-time and stop-time.
5007         * tracepoint.c (cmd_qtstatus): Modify trace-status output to
5008         output start time and stop time in hex as gdb expects.
5009
5010 2013-06-26  Pedro Alves  <pedro@codesourcery.com>
5011
5012         * tracepoint.c (build_traceframe_info_xml): Output trace state
5013         variables present in the trace buffer.
5014
5015 2013-06-24  Tom Tromey  <tromey@redhat.com>
5016
5017         * Makefile.in (version.c): Use bfd/version.h, common/version.in,
5018         create-version.sh.
5019         (version.o): Remove.
5020         * gdbreplay.c: Include version.h.
5021         (version, host_name): Don't declare.
5022         * server.h: Include version.h.
5023         (version, host_name): Don't declare.
5024
5025 2013-06-12  Pedro Alves  <palves@redhat.com>
5026
5027         * linux-x86-low.c (linux_is_elf64): Delete global.
5028         (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
5029         with local linux_pid_exe_is_elf_64_file use.
5030
5031 2013-06-11  Pedro Alves  <palves@redhat.com>
5032
5033         * linux-low.c (regset_disabled, disable_regset): New functions.
5034         (regsets_fetch_inferior_registers)
5035         (regsets_store_inferior_registers): Use them.
5036         (initialize_regsets_info); Don't allocate the disabled_regsets
5037         array here.
5038         * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
5039         comment.
5040
5041 2013-06-11  Pedro Alves  <palves@redhat.com>
5042
5043         * linux-low.c (initialize_regsets_info): Use xcalloc instead of
5044         xmalloc.
5045
5046 2013-06-11  Pedro Alves  <palves@redhat.com>
5047
5048         * linux-x86-low.c (initialize_low_arch): Call
5049         init_registers_x32_avx_linux.
5050
5051 2013-06-09  Jan Kratochvil  <jan.kratochvil@redhat.com>
5052
5053         Fix compatibility with Android Bionic.
5054         * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
5055         it is not empty.
5056
5057 2013-06-07  Pedro Alves  <palves@redhat.com>
5058
5059         PR server/14823
5060         * Makefile.in (OBS): Add tdesc.o.
5061         (IPA_OBJS): Add tdesc-ipa.o.
5062         (tdesc-ipa.o): New rule.
5063         * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
5064         interface.
5065         * linux-low.c (new_inferior): Delete.
5066         (disabled_regsets, num_regsets): Delete.
5067         (linux_add_process): Adjust to set the new per-process
5068         new_inferior flag.
5069         (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
5070         (linux_wait_for_lwp): Adjust.  Only call arch_setup if the event
5071         was a stop.  When calling arch_setup, switch the current inferior
5072         to the thread that got an event.
5073         (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
5074         (regsets_fetch_inferior_registers)
5075         (regsets_store_inferior_registers): New regsets_info parameter.
5076         Adjust to use it.
5077         (linux_register_in_regsets): New regs_info parameter.  Adjust to
5078         use it.
5079         (register_addr, fetch_register, store_register): New usrregs_info
5080         parameter.  Adjust to use it.
5081         (usr_fetch_inferior_registers, usr_store_inferior_registers): New
5082         parameter regs_info.  Adjust to use it.
5083         (linux_fetch_registers): Get the current inferior's regs_info, and
5084         adjust to use it.
5085         (linux_store_registers): Ditto.
5086         [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
5087         (initialize_low): Don't initialize the target_regsets here.  Call
5088         initialize_low_arch.
5089         * linux-low.h (target_regsets): Delete declaration.
5090         (struct regsets_info): New.
5091         (struct usrregs_info): New.
5092         (struct regs_info): New.
5093         (struct process_info_private) <new_inferior>: New field.
5094         (struct linux_target_ops): Delete the num_regs, regmap, and
5095         regset_bitmap fields.  New field regs_info.
5096         [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
5097         * i387-fp.c (num_xmm_registers): Delete.
5098         (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
5099         calls to new interface.
5100         (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
5101         (i387_xsave_to_cache): Adjust find_regno calls to new interface.
5102         Infer the number of xmm registers from the regcache's target
5103         description.
5104         * i387-fp.h (num_xmm_registers): Delete.
5105         * inferiors.c (add_thread): Don't install the thread's regcache
5106         here.
5107         * proc-service.c (gregset_info): Fetch the current inferior's
5108         regs_info.  Adjust to use it.
5109         * regcache.c: Include tdesc.h.
5110         (register_bytes, reg_defs, num_registers)
5111         (gdbserver_expedite_regs): Delete.
5112         (get_thread_regcache): If the thread doesn't have a regcache yet,
5113         create one, instead of aborting gdbserver.
5114         (regcache_invalidate_one): Rename to ...
5115         (regcache_invalidate_thread): ... this.
5116         (regcache_invalidate_one): New.
5117         (regcache_invalidate): Only invalidate registers of the current
5118         process.
5119         (init_register_cache): Add target_desc parameter, and use it.
5120         (new_register_cache): Ditto.  Assert the target description has a
5121         non zero registers_size.
5122         (regcache_cpy): Add assertions.  Adjust.
5123         (realloc_register_cache, set_register_cache): Delete.
5124         (registers_to_string, registers_from_string): Adjust.
5125         (find_register_by_name, find_regno, find_register_by_number)
5126         (register_cache_size): Add target_desc parameter, and use it.
5127         (free_register_cache_thread, free_register_cache_thread_one)
5128         (regcache_release, register_cache_size): New.
5129         (register_size): Add target_desc parameter, and use it.
5130         (register_data, supply_register, supply_register_zeroed)
5131         (supply_regblock, supply_register_by_name, collect_register)
5132         (collect_register_as_string, collect_register_by_name): Adjust.
5133         * regcache.h (struct target_desc): Forward declare.
5134         (struct regcache) <tdesc>: New field.
5135         (init_register_cache, new_register_cache): Add target_desc
5136         parameter.
5137         (regcache_invalidate_thread): Declare.
5138         (regcache_invalidate_one): Delete declaration.
5139         (regcache_release): Declare.
5140         (find_register_by_number, register_cache_size, register_size)
5141         (find_regno): Add target_desc parameter.
5142         (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
5143         declarations.
5144         * remote-utils.c: Include tdesc.h.
5145         (outreg, prepare_resume_reply): Adjust.
5146         * server.c: Include tdesc.h.
5147         (gdbserver_xmltarget): Delete declaration.
5148         (get_features_xml, process_serial_event): Adjust.
5149         * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
5150         declare.
5151         (struct process_info) <tdesc>: New field.
5152         (ipa_tdesc): Declare.
5153         * tdesc.c: New file.
5154         * tdesc.h: New file.
5155         * tracepoint.c: Include tdesc.h.
5156         [IN_PROCESS_AGENT] (ipa_tdesc): Define.
5157         (get_context_regcache): Adjust to pass ipa_tdesc down.
5158         (do_action_at_tracepoint): Adjust to get the register cache size
5159         from the context regcache's description.
5160         (traceframe_walk_blocks): Adjust to get the register cache size
5161         from the current trace frame's description.
5162         (traceframe_get_pc): Adjust to get current trace frame's
5163         description and pass it down.
5164         (gdb_collect): Adjust to get the register cache size from the
5165         IPA's description.
5166         * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
5167         (gdbserver_xmltarget): Delete.
5168         (initialize_low_tracepoint): Set the ipa's target description.
5169         * linux-i386-ipa.c (tdesc_i386_linux): Declare.
5170         (initialize_low_tracepoint): Set the ipa's target description.
5171         * linux-x86-low.c: Include tdesc.h.
5172         [__x86_64__] (is_64bit_tdesc): New.
5173         (ps_get_thread_area, x86_get_thread_area): Use it.
5174         (i386_cannot_store_register): Rename to ...
5175         (x86_cannot_store_register): ... this.  Use is_64bit_tdesc.
5176         (i386_cannot_fetch_register): Rename to ...
5177         (x86_cannot_fetch_register): ... this.  Use is_64bit_tdesc.
5178         (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
5179         to new interface.
5180         (target_regsets): Rename to ...
5181         (x86_regsets): ... this.
5182         (x86_get_pc, x86_set_pc): Adjust register_size calls to new
5183         interface.
5184         (x86_siginfo_fixup): Use is_64bit_tdesc.
5185         [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
5186         (tdesc_x32_avx_linux, tdesc_x32_linux)
5187         (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
5188         Declare.
5189         (x86_linux_update_xmltarget): Delete.
5190         (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
5191         (have_ptrace_getfpxregs, have_ptrace_getregset): New.
5192         (AMD64_LINUX_USER64_CS): New.
5193         (x86_linux_read_description): New, based on
5194         x86_linux_update_xmltarget.
5195         (same_process_callback): New.
5196         (x86_arch_setup_process_callback): New.
5197         (x86_linux_update_xmltarget): New.
5198         (x86_regsets_info): New.
5199         (amd64_linux_regs_info): New.
5200         (i386_linux_usrregs_info): New.
5201         (i386_linux_regs_info): New.
5202         (x86_linux_regs_info): New.
5203         (x86_arch_setup): Reimplement.
5204         (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
5205         (x86_emit_ops): Ditto.
5206         (the_low_target): Adjust.  Install x86_linux_regs_info,
5207         x86_cannot_fetch_register, and x86_cannot_store_register.
5208         (initialize_low_arch): New.
5209         * linux-ia64-low.c (tdesc_ia64): Declare.
5210         (ia64_fetch_register): Adjust.
5211         (ia64_usrregs_info, regs_info): New globals.
5212         (ia64_regs_info): New function.
5213         (the_low_target): Adjust.
5214         (initialize_low_arch): New function.
5215         * linux-sparc-low.c (tdesc_sparc64): Declare.
5216         (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
5217         Adjust.
5218         (sparc_arch_setup): New function.
5219         (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
5220         (the_low_target): Adjust.
5221         (initialize_low_arch): New function.
5222         * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
5223         (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
5224         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
5225         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
5226         (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
5227         (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
5228         (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
5229         (tdesc_powerpc_isa205_vsx64l): Declare.
5230         (ppc_cannot_store_register, ppc_collect_ptrace_register)
5231         (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
5232         (ppc_set_pc, ppc_get_hwcap): Adjust.
5233         (ppc_usrregs_info): Forward declare.
5234         (!__powerpc64__) ppc_regmap_adjusted: New global.
5235         (ppc_arch_setup): Adjust to the current process'es target
5236         description.
5237         (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
5238         (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
5239         (ppc_store_evrregset): Adjust.
5240         (target_regsets): Rename to ...
5241         (ppc_regsets): ... this, and make static.
5242         (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
5243         (ppc_regs_info): New function.
5244         (the_low_target): Adjust.
5245         (initialize_low_arch): New function.
5246         * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
5247         (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
5248         (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
5249         (tdesc_s390x_linux64v2): Declare.
5250         (s390_collect_ptrace_register, s390_supply_ptrace_register)
5251         (s390_fill_gregset, s390_store_last_break): Adjust.
5252         (target_regsets): Rename to ...
5253         (s390_regsets): ... this, and make static.
5254         (s390_get_pc, s390_set_pc): Adjust.
5255         (s390_get_hwcap): New target_desc parameter, and use it.
5256         [__s390x__] (have_hwcap_s390_high_gprs): New global.
5257         (s390_arch_setup): Adjust to set the current process'es target
5258         description.  Don't adjust the regmap.
5259         (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
5260         [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
5261         (regs_info_3264): New globals.
5262         (s390_regs_info): New function.
5263         (the_low_target): Adjust.
5264         (initialize_low_arch): New function.
5265         * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
5266         (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
5267         [__mips64] (init_registers_mips_linux)
5268         (init_registers_mips_dsp_linux): Delete defines.
5269         [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
5270         (have_dsp): New global.
5271         (mips_read_description): New, based on mips_arch_setup.
5272         (mips_arch_setup): Reimplement.
5273         (get_usrregs_info): New function.
5274         (mips_cannot_fetch_register, mips_cannot_store_register)
5275         (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
5276         (mips_fill_fpregset, mips_store_fpregset): Adjust.
5277         (target_regsets): Rename to ...
5278         (mips_regsets): ... this, and make static.
5279         (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
5280         (dsp_regs_info, regs_info): New globals.
5281         (mips_regs_info): New function.
5282         (the_low_target): Adjust.
5283         (initialize_low_arch): New function.
5284         * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
5285         (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
5286         Declare.
5287         (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
5288         (arm_read_description): New, with bits factored from
5289         arm_arch_setup.
5290         (arm_arch_setup): Reimplement.
5291         (target_regsets): Rename to ...
5292         (arm_regsets): ... this, and make static.
5293         (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
5294         (arm_regs_info): New function.
5295         (the_low_target): Adjust.
5296         (initialize_low_arch): New function.
5297         * linux-m68k-low.c (tdesc_m68k): Declare.
5298         (target_regsets): Rename to ...
5299         (m68k_regsets): ... this, and make static.
5300         (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
5301         (m68k_regs_info): New function.
5302         (m68k_arch_setup): New function.
5303         (the_low_target): Adjust.
5304         (initialize_low_arch): New function.
5305         * linux-sh-low.c (tdesc_sharch): Declare.
5306         (target_regsets): Rename to ...
5307         (sh_regsets): ... this, and make static.
5308         (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
5309         (sh_regs_info, sh_arch_setup): New functions.
5310         (the_low_target): Adjust.
5311         (initialize_low_arch): New function.
5312         * linux-bfin-low.c (tdesc_bfin): Declare.
5313         (bfin_arch_setup): New function.
5314         (bfin_usrregs_info, regs_info): New globals.
5315         (bfin_regs_info): New function.
5316         (the_low_target): Adjust.
5317         (initialize_low_arch): New function.
5318         * linux-cris-low.c (tdesc_cris): Declare.
5319         (cris_arch_setup): New function.
5320         (cris_usrregs_info, regs_info): New globals.
5321         (cris_regs_info): New function.
5322         (the_low_target): Adjust.
5323         (initialize_low_arch): New function.
5324         * linux-cris-low.c (tdesc_crisv32): Declare.
5325         (cris_arch_setup): New function.
5326         (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
5327         (cris_regs_info): New function.
5328         (the_low_target): Adjust.
5329         (initialize_low_arch): New function.
5330         * linux-m32r-low.c (tdesc_m32r): Declare.
5331         (m32r_arch_setup): New function.
5332         (m32r_usrregs_info, regs_info): New globals.
5333         (m32r_regs_info): Adjust.
5334         (initialize_low_arch): New function.
5335         * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
5336         (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
5337         (tic6x_usrregs_info): Forward declare.
5338         (tic6x_read_description): New function, based on ...
5339         (tic6x_arch_setup): ... this.  Reimplement.
5340         (target_regsets): Rename to ...
5341         (tic6x_regsets): ... this, and make static.
5342         (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
5343         (tic6x_regs_info): New function.
5344         (the_low_target): Adjust.
5345         (initialize_low_arch): New function.
5346         * linux-xtensa-low.c (tdesc_xtensa): Declare.
5347         (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
5348         (target_regsets): Rename to ...
5349         (xtensa_regsets): ... this, and make static.
5350         (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
5351         globals.
5352         (xtensa_arch_setup, xtensa_regs_info): New functions.
5353         (the_low_target): Adjust.
5354         (initialize_low_arch): New function.
5355         * linux-nios2-low.c (tdesc_nios2_linux): Declare.
5356         (nios2_arch_setup): Set the current process'es tdesc.
5357         (target_regsets): Rename to ...
5358         (nios2_regsets): ... this.
5359         (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
5360         (nios2_regs_info): New function.
5361         (the_low_target): Adjust.
5362         (initialize_low_arch): New function.
5363         * linux-aarch64-low.c (tdesc_aarch64): Declare.
5364         (aarch64_arch_setup): Set the current process'es tdesc.
5365         (target_regsets): Rename to ...
5366         (aarch64_regsets): ... this.
5367         (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
5368         (aarch64_regs_info): New function.
5369         (the_low_target): Adjust.
5370         (initialize_low_arch): New function.
5371         * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
5372         globals.
5373         (target_regsets): Rename to ...
5374         (tile_regsets): ... this.
5375         (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
5376         (tile_regs_info): New function.
5377         (tile_arch_setup): Set the current process'es tdesc.
5378         (the_low_target): Adjust.
5379         (initialize_low_arch): New function.
5380         * spu-low.c (tdesc_spu): Declare.
5381         (spu_create_inferior, spu_attach): Set the new process'es tdesc.
5382         * win32-arm-low.c (tdesc_arm): Declare.
5383         (arm_arch_setup): New function.
5384         (the_low_target): Install arm_arch_setup instead of
5385         init_registers_arm.
5386         * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
5387         (init_windows_x86): Rename to ...
5388         (i386_arch_setup): ... this.  Set `win32_tdesc'.
5389         (the_low_target): Adjust.
5390         * win32-low.c (win32_tdesc): New global.
5391         (child_add_thread): Don't create the thread cache here.
5392         (do_initial_child_stuff): Set the new process'es tdesc.
5393         * win32-low.h (struct target_desc): Forward declare.
5394         (win32_tdesc): Declare.
5395         * lynx-i386-low.c (tdesc_i386): Declare global.
5396         (lynx_i386_arch_setup): Set `lynx_tdesc'.
5397         * lynx-low.c (lynx_tdesc): New global.
5398         (lynx_add_process): Set the new process'es tdesc.
5399         * lynx-low.h (struct target_desc): Forward declare.
5400         (lynx_tdesc): Declare global.
5401         * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
5402         (lynx_ppc_arch_setup): Set `lynx_tdesc'.
5403         * nto-low.c (nto_tdesc): New global.
5404         (do_attach): Set the new process'es tdesc.
5405         * nto-low.h (struct target_desc): Forward declare.
5406         (nto_tdesc): Declare.
5407         * nto-x86-low.c (tdesc_i386): Declare.
5408         (nto_x86_arch_setup): Set `nto_tdesc'.
5409
5410 2013-06-04  Gary Benson  <gbenson@redhat.com>
5411
5412         * server.c (handle_query): Add "augmented-libraries-svr4-read+"
5413         to qSupported response when appropriate.
5414         (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
5415         with nonzero-length annex.
5416         * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
5417         arguments supplied in annex.
5418
5419 2013-05-31  Doug Evans  <dje@google.com>
5420
5421         PR server/15594
5422         * linux-x86-low.c (ps_get_thread_area): Properly extend address to
5423         64 bits in 64-cross-32 environment.
5424
5425 2013-05-28  Pedro Alves  <palves@redhat.com>
5426
5427         * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
5428         (aarch64-without-fpu.c): Delete rule.
5429         * configure.srv (aarch64*-*-linux*): Remove references to
5430         aarch64-without-fpu.o and aarch64-without-fpu.xml.
5431         * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
5432         declaration.
5433
5434 2013-05-24  Pedro Alves  <palves@redhat.com>
5435
5436         * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
5437         instead of strchr/decode_address.  Error if the range isn't split
5438         with a ','.  Don't assume there's be a ':' in the action.
5439
5440 2013-05-23  Yao Qi  <yao@codesourcery.com>
5441             Pedro Alves  <palves@redhat.com>
5442
5443         * linux-low.c (lwp_in_step_range): New function.
5444         (linux_wait_1): If the thread was range stepping and stopped
5445         outside the stepping range, report the stop to GDB.  Otherwise,
5446         continue stepping.  Add range stepping debug output.
5447         (linux_set_resume_request): Copy the step range from the resume
5448         request to the lwp.
5449         (linux_supports_range_stepping): New.
5450         (linux_target_ops) <supports_range_stepping>: Set to
5451         linux_supports_range_stepping.
5452         * linux-low.h (struct linux_target_ops)
5453         <supports_range_stepping>: New field.
5454         (struct lwp_info) <step_range_start, step_range_end>: New fields.
5455         * linux-x86-low.c (x86_supports_range_stepping): New.
5456         (the_low_target) <supports_range_stepping>: Set to
5457         x86_supports_range_stepping.
5458         * server.c (handle_v_cont): Handle 'r' action.
5459         (handle_v_requests): Append ";r" if the target supports range
5460         stepping.
5461         * target.h (struct thread_resume) <step_range_start,
5462         step_range_end>: New fields.
5463         (struct target_ops) <supports_range_stepping>:
5464         New field.
5465         (target_supports_range_stepping): New macro.
5466
5467 2013-05-17  Joel Brobecker  <brobecker@adacore.com>
5468
5469         * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
5470         confusion in comment.
5471
5472 2013-05-17  Joel Brobecker  <brobecker@adacore.com>
5473
5474         * lynx-low.c (struct process_info_private): New type.
5475         (lynx_add_process): New function.
5476         (lynx_create_inferior, lynx_attach): Replace calls to
5477         add_process by calls to lynx_add_process.
5478         (lynx_resume): If PTID is null, then try using
5479         current_process()->private->last_wait_event_ptid.
5480         Add comments.
5481         (lynx_clear_inferiors): Delete.  The contents of that function
5482         has been inlined in lynx_mourn;
5483         (lynx_wait_1): Save the ptid in the process's private data.
5484         (lynx_mourn): Free the process' private data.  Replace call
5485         to lynx_clear_inferiors by call to clear_inferiors.
5486
5487 2013-05-17  Yao Qi  <yao@codesourcery.com>
5488
5489         * i386-low.c (i386_length_and_rw_bits): Move the comment to
5490         the right place.
5491
5492 2013-05-16  Luis Machado  <lgustavo@codesourcery.com>
5493
5494         * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
5495         PT_DATA_ADDR and PT_TEXT_END_ADDR.  Update comments.
5496         (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
5497         PT_TEXT_END_ADDR guards.  Update comments.
5498         (linux_target_op) <read_offsets>: Conditionally define to
5499         linux_read_offsets if the target is UCLIBC and if it defines
5500         PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
5501
5502 2013-05-06  Sandra Loosemore  <sandra@codesourcery.com>
5503             Andrew Jenner  <andrew@codesourcery.com>
5504
5505         * Makefile.in (SFILES): Add linux-nios2-low.c.
5506         (clean): Add action to delete nios2-linux.c.
5507         (nios2-linux.c): New rule.
5508         * configure.srv: Add nios2*-*-linux*.
5509         * linux-nios2-low.c: New.
5510
5511 2013-05-03  Hafiz Abid Qadeer  <abidh@codesourcery.com>
5512
5513         * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
5514
5515 2013-04-25  Hui Zhu  <hui@codesourcery.com>
5516
5517         PR gdb/15186
5518         * ax.c (ax_printf): Add fflush.
5519
5520 2013-04-22  Tom Tromey  <tromey@redhat.com>
5521
5522         * Makefile.in (SFILES): Add filestuff.c.
5523         (OBS): Add filestuff.o.
5524         (filestuff.o): New target.
5525         * config.in, configure: Rebuild.
5526         * configure.ac: Check for fdwalk, pipe2.
5527
5528 2013-04-17  Pedro Alves  <palves@redhat.com>
5529
5530         * configure.ac (USE_THREAD_DB): Delete variable.
5531         (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
5532         Don't AC_SUBST USE_THREAD_DB.
5533         * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
5534         * config.in, configure: Regenerate.
5535
5536 2013-04-16  Pedro Alves  <palves@redhat.com>
5537
5538         * linux-low.h (struct lwp_info) <thread_known>: Move under
5539         the USE_THREAD_DB #ifdef.
5540
5541 2013-04-16  Pedro Alves  <palves@redhat.com>
5542
5543         * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
5544         (linux-low.o): Delete rule.
5545         * linux-low.h: Always include "gdb_thread_db.h" instead of
5546         conditionally including thread_db.h.
5547         (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
5548         HAVE_THREAD_DB_H.
5549
5550 2013-04-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
5551
5552         * Makefile.in (install-only): Fix make install regression.
5553
5554 2013-04-05  Jan Kratochvil  <jan.kratochvil@redhat.com>
5555
5556         Convert man pages to texinfo, new gdbinit.5 texinfo page.
5557         * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
5558         installation.
5559         * gdbserver.1: Remove.
5560
5561 2013-03-22  Pedro Alves  <palves@redhat.com>
5562
5563         * linux-low.c (handle_extended_wait): Don't call
5564         linux_enable_event_reporting.
5565
5566 2013-03-15  Tony Theodore  <tonyt@logyst.com>
5567
5568         PR build/9098:
5569         * Makefile.in (SHELL): Use @SHELL@.
5570
5571 2013-03-14  Sergio Durigan Junior  <sergiodj@redhat.com>
5572
5573         * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
5574         compiler warning.
5575
5576 2013-03-13  Joel Brobecker  <brobecker@adacore.com>
5577
5578         * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
5579         Remove extraneous NULL element.
5580
5581 2013-03-13  Yao Qi  <yao@codesourcery.com>
5582
5583         * tracepoint.c (traceframe_read_tsv): Look for the last matched
5584         'V' block in trace frame.
5585
5586 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
5587
5588         * target.h (struct target_ops): Add btrace ops.
5589         (target_supports_btrace): New macro.
5590         (target_enable_btrace): New macro.
5591         (target_disable_btrace): New macro.
5592         (target_read_btrace): New macro.
5593         * gdbthread.h (struct thread_info): Add btrace field.
5594         * server.c: Include btrace-common.h.
5595         (handle_btrace_general_set): New function.
5596         (handle_btrace_enable): New function.
5597         (handle_btrace_disable): New function.
5598         (handle_general_set): Call handle_btrace_general_set.
5599         (handle_qxfer_btrace): New function.
5600         (struct qxfer qxfer_packets[]): Add btrace entry.
5601         * inferiors.c (remove_thread): Disable btrace.
5602         * linux-low: Include linux-btrace.h.
5603         (linux_low_enable_btrace): New function.
5604         (linux_low_read_btrace): New function.
5605         (linux_target_ops): Add btrace ops.
5606         * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
5607         Add srv_linux_btrace=yes.
5608         (x86_64-*-linux*): Add linux-btrace.o.
5609         Add srv_linux_btrace=yes.
5610         * configure.ac: Define HAVE_LINUX_BTRACE.
5611         * config.in: Regenerated.
5612         * configure: Regenerated.
5613
5614 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
5615
5616         * server.c (handle_qxfer): Preserve error message if -3 is
5617         returned.
5618         (qxfer): Document the -3 return value.
5619
5620 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
5621
5622         * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
5623         (linux_btrace_h): New variable.
5624         (linux-btrace.o): New rule.
5625
5626 2013-03-08  Stan Shebs  <stan@codesourcery.com>
5627             Hafiz Abid Qadeer  <abidh@codesourcery.com>
5628
5629         * tracepoint.c (trace_buffer_size): New global.
5630         (DEFAULT_TRACE_BUFFER_SIZE): New define.
5631         (init_trace_buffer): Change to one-argument function. Allocate
5632         trace buffer memory.
5633         (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
5634         handle QTBuffer:size packet.
5635         (cmd_bigqtbuffer_size): New function.
5636         (initialize_tracepoint): Call init_trace_buffer with
5637         DEFAULT_TRACE_BUFFER_SIZE.
5638         * server.c (handle_query): Add QTBuffer:size in the
5639         supported packets.
5640
5641 2013-03-07  Yao Qi  <yao@codesourcery.com>
5642
5643         * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5644         (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5645         of -1.
5646         (cmd_qtsp): Adjust condition.  Do post increment.
5647         Set cur_action and cur_step_action back to 0.
5648
5649 2013-03-07  Jeremy Bennett  <jeremy.bennett@embecosm.com>
5650
5651         PR server/15236
5652         * linux-low.c (linux_write_memory): Return early success if LEN is
5653         zero.
5654
5655 2013-03-05  Corinna Vinschen  <vinschen@redhat.de>
5656
5657         * configure.srv: Add x86_64-*-cygwin* as target.
5658
5659 2013-02-28  Tom Tromey  <tromey@redhat.com>
5660
5661         * configure.ac: Invoke AC_SYS_LARGEFILE.
5662         * configure, config.in: Rebuild.
5663
5664 2013-02-28  Corinna Vinschen  <vinschen@redhat.com>
5665
5666         * win32-low.c: Throughout, fix format strings and casts of
5667         printf-like functions to avoid type related warnings on all
5668         platforms.
5669         (get_child_debug_event): Print dwDebugEventCode as hex since
5670         that's how it's usually documented.
5671
5672 2013-02-28  Yao Qi  <yao@codesourcery.com>
5673
5674         * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5675         pulongest.
5676
5677 2013-02-27  Jiong Wang  <jiwang@tilera.com>
5678
5679         * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5680         (reg-tilegx32.c): New rule.
5681         * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5682         * linux-tile-low.c (tile_arch_setup): New function.  Invoke
5683         different register info initializer according to elf class.
5684         (init_registers_tilgx32): New function.  The tilegx32 register info
5685         initializer.
5686         (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5687         (tile_store_gregset): Likewise.
5688
5689 2013-02-27  Yao Qi  <yao@codesourcery.com>
5690
5691         * server.c (process_point_options): Print debug message when
5692         debug_threads is true.
5693
5694 2013-02-26  Yao Qi  <yao@codesourcery.com>
5695
5696         * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5697
5698 2013-02-19  Pedro Alves  <palves@redhat.com>
5699             Kai Tietz <ktietz@redhat.com>
5700
5701         PR gdb/15161
5702
5703         * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5704         instead of strtoul to extract address from packet.
5705         (process_serial_event) <'z'>: Likewise.
5706
5707 2013-02-18  Yao Qi  <yao@codesourcery.com>
5708
5709         * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5710
5711 2013-02-14  Pedro Alves  <palves@redhat.com>
5712
5713         Plug memory leak.
5714
5715         * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5716         TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5717
5718 2013-02-14  Pedro Alves  <palves@redhat.com>
5719
5720         * tracepoint.c (cmd_qtdpsrc): Use savestring.
5721
5722 2013-02-14  Pedro Alves  <palves@redhat.com>
5723
5724         * tracepoint.c (save_string): Delete.
5725         (add_tracepoint_action): Use savestring instead of save_string.
5726
5727 2013-02-12  Pedro Alves  <palves@redhat.com>
5728
5729         * linux-xtensa-low.c: Ditto.
5730         * xtensa-xtregs.c: Ditto.
5731
5732 2013-02-12  Sanimir Agovic  <sanimir.agovic@intel.com>
5733
5734         * thread-db.c (thread_db_get_tls_address): NULL pointer check
5735         thread_db.
5736
5737 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
5738
5739         * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5740         aarch64_num_wp_regs and aarch64_num_bp_regs to
5741         AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5742
5743 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
5744
5745         * linux-aarch64-low.c (ps_get_thread_area): Replace
5746         PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5747
5748 2013-02-04  Jim MacArthur  <jim.macarthur@arm.com>
5749             Marcus Shawcroft  <marcus.shawcroft@arm.com>
5750             Nigel Stephens  <nigel.stephens@arm.com>
5751             Yufeng Zhang  <yufeng.zhang@arm.com>
5752
5753         * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5754         (aarch64.c, aarch64-without-fpu.c): New targets.
5755         * configure.srv (aarch64*-*-linux*): New.
5756         * linux-aarch64-low.c: New file.
5757
5758 2013-02-04  Marcus Shawcroft  <marcus.shawcroft@arm.com>
5759
5760         * linux-low.c (handle_extended_wait, linux_create_inferior)
5761         (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5762         (dequeue_one_deferred_signal, linux_resume_one_thread)
5763         (fetch_register, linux_write_memory, linux_enable_event_reporting)
5764         (linux_tracefork_grandchild, linux_test_for_tracefork)
5765         (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5766         PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5767         where the argument is 0.
5768
5769 2013-01-25  Yao Qi  <yao@codesourcery.com>
5770
5771         * event-loop.c: Include "queue.h".
5772         (gdb_event_p): New typedef.
5773         (struct gdb_event) <next_event>: Remove.
5774         (event_queue): Change to QUEUE(gdb_event_p).
5775         (async_queue_event): Remove.
5776         (gdb_event_xfree): New.
5777         (initialize_event_loop): New.
5778         (process_event): Use API from QUEUE.
5779         (wait_for_event): Likewise.
5780         * server.c (main): Call initialize_event_loop.
5781         * server.h (initialize_event_loop): Declare.
5782
5783 2013-01-18  Yao Qi  <yao@codesourcery.com>
5784
5785         * ax.h (struct eval_agent_expr_context): New.
5786         (gdb_eval_agent_expr): Update declaration.
5787         * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5788         TFRAME.  Add new argument CTX.
5789         * server.h (struct eval_agent_expr_context): Declare.
5790         (agent_mem_read, agent_tsv_read): Update declaration.
5791         (agent_mem_read_string): Likewise.
5792         * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5793         (add_traceframe_block): Add new argument TPOINT.
5794         Increase TPOINT->traceframe_usage.
5795         (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5796         eval_tracepoint_agent_expr.
5797         (condition_true_at_tracepoint): Likewise.
5798         (agent_mem_read): Remove argument TFRAME.  Add argument CTX.
5799         (agent_mem_read_string, agent_tsv_read): Likewise.
5800
5801 2013-01-16  Yao Qi  <yao@codesourcery.com>
5802
5803         * linux-low.c (linux_resume_one_lwp): Don't check
5804         'lwp->bp_reinsert != 0'.
5805
5806 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
5807             Pedro Alves  <palves@redhat.com>
5808
5809         * lynx-low.c (ptrace_request_to_str): Define a temporary
5810         macro and use it to simplify this function's implementation.
5811
5812 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
5813
5814         * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5815         sets errno.
5816
5817 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
5818
5819         * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5820
5821 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
5822
5823         * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5824
5825 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
5826
5827         * lynx-low.c (lynx_resume): Use the resume_info parameter
5828         to determine the ptid for the lynx_ptrace call, unless
5829         it is equal to minus_one_ptid, in which case we use the
5830         ptid of the current_inferior.
5831         (lynx_wait_1): After having received a thread create/exit
5832         event, resume the inferior's execution using the signaling
5833         thread's ptid, rather than the old ptid.
5834
5835 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
5836
5837         * lynx-low.c (lynx_resume): Delete variable ret.
5838
5839 2013-01-01  Joel Brobecker  <brobecker@adacore.com>
5840
5841         * gdbreplay.c (gdbreplay_version): Update copyright year.
5842         * server.c (gdbserver_version): Likewise.
5843
5844 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
5845
5846         * lynx-low.c (lynx_wait_1): Add debug trace before adding
5847         new thread.
5848
5849 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
5850
5851         * lynx-low.c (ptrace_request_to_str): Add handling for
5852         PTRACE_GETTRACESIG.
5853
5854 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
5855
5856         * lynx-low.c (lynx_attach): Delete variable new_process.
5857
5858 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
5859
5860         * lynx-low.c (lynx_create_inferior): Delete variable
5861         new_process.
5862
5863 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
5864
5865         * lynx-low.c (ptrace_request_to_str): Do not handle
5866         PTRACE_GETTHREADLIST if this macro does not exist.
5867
5868 2012-12-15  Yao Qi  <yao@codesourcery.com>
5869
5870         * Makefile.in (OBS): Add notif.o.
5871         * notif.c, notif.h: New.
5872         * server.c: Include "notif.h".
5873         (struct vstop_notif) <next>: Remove.
5874         <base>: New field.
5875         (queue_stop_reply): Update.
5876         (push_event, send_next_stop_reply): Remove.
5877         (discard_queued_stop_replies): Update.
5878         (notif_stop): New variable.
5879         (handle_v_stopped): Remove.
5880         (handle_v_requests): Don't call handle_v_stopped.  Call
5881         handle_ack_notif instead.
5882         (queue_stop_reply_callback): Call notif_event_enque instead
5883         of queue_stop_reply.
5884         (handle_status): Don't call send_next_stop_reply, call
5885         notif_write_event instead.
5886         (kill_inferior_callback): Likewise.
5887         (detach_or_kill_inferior_callback): Likewise.
5888         (main): Call initialize_notif.
5889         (process_serial_event): Call QUEUE_is_empty.
5890         (handle_target_event): Call notif_push instead of push event.
5891         * server.h (push_event): Remove declaration.
5892
5893 2012-12-10  Tom Tromey  <tromey@redhat.com>
5894
5895         * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5896         (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5897         macros.
5898         (.c.o): Rewrite.
5899         (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5900         (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5901         (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5902         (amd64-linux-ipa.o, ax.o): Rewrite.
5903         (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5904         (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5905         (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5906         (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5907         (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5908         (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5909         (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5910         (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5911         (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5912         (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5913         (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5914         (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5915         (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5916         (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5917         (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5918         (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5919         (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5920         (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5921         (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5922         (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5923         (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5924         (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5925         (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5926         (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5927         (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5928         (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5929         (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5930         (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5931         (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5932         (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5933         (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5934         (reg-tilegx.o): Remove.
5935         (all_object_files): New macro.
5936         Include .deps files.
5937         * aclocal.m4, configure: Rebuild.
5938         * acinclude.m4: Include depstand.m4, lead-dot.m4.
5939         * configure.ac: Invoke ZW_CREATE_DEPDIR,
5940         ZW_PROG_COMPILER_DEPENDENCIES.  Compute GMAKE condition.
5941
5942 2012-12-05  Tom Tromey  <tromey@redhat.com>
5943
5944         PR gdb/14917:
5945         * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5946
5947 2012-11-28  Markus Metzger  <markus.t.metzger@intel.com>
5948
5949         * configure.ac: Check for linux/perf_event.h.
5950         * config.in: Regenerated.
5951         * configure: Regenerated.
5952
5953 2012-11-26  Maxime Villard  <rustyBSD@gmx.fr>
5954
5955         * hostio.c (handle_readlink): Decrease buffer size
5956         parameter passed to readlink by one byte.
5957
5958 2012-11-26  Yao Qi  <yao@codesourcery.com>
5959
5960         * configure.ac (build_warnings): Append '-Wempty-body'.
5961         * configure: Regenerated.
5962         * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5963         body.
5964
5965 2012-11-15  Pierre Muller  <muller@sourceware.org>
5966
5967         * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5968         * config.in: Regenerate.
5969         * configure: Regenerate.
5970         * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5971         Use "gdb_wait.h" header instead of <sys/wait.h> header.
5972         * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5973         * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5974         header.
5975         * server.c: Remove HAVE_WAIT_H conditional.  Use "gdb_wait.h" header
5976         instead of <sys/wait.h> header.
5977         * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5978
5979 2012-11-13 Markus Metzger  <markus.t.metzger@intel.com>
5980
5981         * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5982         (various make rules): Remove -DGDBSERVER
5983
5984 2012-11-09  Yao Qi  <yao@codesourcery.com>
5985
5986         * spu-low.c (current_ptid): Move it to ..
5987         * gdbthread.h: ... here.  New.
5988         * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5989         * server.c (myresume, process_serial_event): Likewise.
5990         * thread-db.c (thread_db_find_new_threads): Likewise.
5991         * tracepoint.c (run_inferior_command): Likewise.
5992
5993 2012-10-01  Andrew Burgess  <aburgess@broadcom.com>
5994
5995         * server.c (handle_search_memory_1): Include access length in
5996         warning message.
5997
5998 2012-09-05  Michael Brandt  <michael.brandt@axis.com>
5999
6000         * linux-crisv32-low.c: Fix compile errors.
6001
6002 2012-09-04  Yao Qi  <yao@codesourcery.com>
6003
6004         * tracepoint.c (cmd_qtsv): Adjust debug message.
6005         Don't check CUR_TPOINT.
6006
6007 2012-08-28  Yao Qi  <yao@codesourcery.com>
6008
6009         * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
6010         * server.h: Include 'libiberty.h' and 'ansidecl.h'.
6011         (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
6012         Remove declarations of xmalloc, xreallloc, xstrdup and
6013         freeargv.
6014         * Makefile.in (libiberty_h): New.
6015         (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
6016         (linux-bfin-low.o): Append dependency 'libiberty.h'.
6017
6018 2012-08-23  Yao Qi  <yao@codesourcery.com>
6019
6020         * server.h: Remove declaration of 'xsnprintf'.
6021
6022 2012-08-22  Keith Seitz  <keiths@redhat.com>
6023
6024         * server.h: Include build-gnulib-gbserver/config.h.
6025         * gdbreplay.c: Likewise.
6026
6027 2012-08-08  Doug Evans  <dje@google.com>
6028
6029         * Makefile.in (SFILES): Add gdb_vecs.c.
6030         (OBS): Add gdb_vecs.o.
6031         (gdb_vecs_h, host_defs_h): New variables.
6032         (thread-db.o): Add $(gdb_vecs_h) dependency.
6033         (gdb_vecs.o): New rule.
6034         * thread-db.c: #include "gdb_vecs.h".
6035         (thread_db_load_search): Use a vector to iterate over path elements.
6036         Handle text appearing after "$pdir".
6037
6038         * configure.ac: Add check for strstr.
6039         * config.in: Regenerate.
6040         * configure: Regenerate.
6041
6042 2012-08-02  Ulrich Weigand  <ulrich.weigand@linaro.org>
6043
6044         * hostio.c (handle_pread): If pread fails, fall back to attempting
6045         lseek/read.
6046         (handle_pwrite): Likewise for pwrite.
6047
6048 2012-08-01  Ulrich Weigand  <ulrich.weigand@linaro.org>
6049
6050         * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
6051         between unsupported TYPE and unimplementable ADDR/LEN combination.
6052         (arm_insert_point): Act on new return value.
6053
6054 2012-07-31  Pedro Alves  <palves@redhat.com>
6055
6056         * server.c (process_point_options): Only skip tokens if we find
6057         one that is unrecognized.  Don't treat 'X' specially while
6058         skipping unrecognized tokens.
6059
6060 2012-07-30  Ulrich Weigand  <ulrich.weigand@linaro.org>
6061
6062         * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
6063         to 4-byte-align HW breakpoint addresses for Thumb.
6064
6065 2012-07-27  Yao Qi  <yao@codesourcery.com>
6066
6067         PR remote/14161.
6068
6069         * server.h: Declare gdb_agent_about_to_close.
6070         * target.c (kill_inferior): Include "agent.h".
6071         New.  Send command 'kill'.
6072         * target.h (kill_inferior): Removed macro.
6073         * tracepoint.c (gdb_agent_about_to_close): New.
6074         (gdb_agent_helper_thread): Handle command 'close'.
6075         Wait endlessly until the inferior stops.
6076         Install gdb_agent_remove_socket to atexit hook.
6077         (agent_socket_name): New static variable.
6078         (gdb_agent_socket_init): Replace local variable 'name' with
6079         'agent_socket_name'.
6080         (gdb_agent_remove_socket): New.
6081
6082 2012-07-27  Yao Qi  <yao@codesourcery.com>
6083
6084         * server.c (process_point_options): Stop at 'X' when parsing.
6085
6086 2012-07-19  Michael Eager  <eager@eagercon.com>
6087
6088         * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
6089         to hw_execute.
6090         * linux-x86-low.c (x86_insert_point, x86_remove_point):
6091         Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
6092         hardware breakpoint.
6093
6094 2012-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
6095
6096         * gdbserver/linux-low.c (initialize_low): Call
6097         linux_ptrace_init_warnings.
6098
6099 2012-07-02  Doug Evans  <dje@google.com>
6100
6101         * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
6102         pointer to int.
6103
6104 2012-07-02  Stan Shebs  <stan@codesourcery.com>
6105
6106         * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
6107         (ax.o): Add it to build rule.
6108         (ax-ipa.o): Ditto.
6109         (OBS): Add format.o.
6110         (IPA_OBS): Add format.o.
6111         * server.c (handle_query): Claim support for breakpoint commands.
6112         (process_point_options): Add command case.
6113         (process_serial_event): Leave running if there are printfs in
6114         effect.
6115         * mem-break.h (any_persistent_commands): Declare.
6116         (add_breakpoint_commands): Declare.
6117         (gdb_no_commands_at_breakpoint): Declare.
6118         (run_breakpoint_commands): Declare.
6119         * mem-break.c (struct point_command_list): New struct.
6120         (struct breakpoint): New field command_list.
6121         (any_persistent_commands): New function.
6122         (add_commands_to_breakpoint): New function.
6123         (add_breakpoint_commands): New function.
6124         (gdb_no_commands_at_breakpoint): New function.
6125         (run_breakpoint_commands): New function.
6126         * linux-low.c (linux_wait_1): Test for and run breakpoint commands
6127         locally.
6128         * ax.c: Include format.h.
6129         (ax_printf): New function.
6130         (gdb_eval_agent_expr): Add printf opcode.
6131
6132 2012-06-13  Yao Qi  <yao@codesourcery.com>
6133
6134         * server.c (start_inferior): Remove duplicated writes to fields
6135         'last_resume_kind' and 'last_status' of 'current_inferior'.
6136
6137 2012-06-12  Yao Qi  <yao@codesourcery.com>
6138             Pedro Alves  <palves@redhat.com>
6139
6140         * linux-low.c (linux_set_resume_request): Simplify predicate.  Add
6141         comment.
6142         * server.c (handle_v_cont): Extend comment.
6143
6144 2012-06-11  Yao Qi  <yao@codesourcery.com>
6145
6146         * linux-low.c (linux_attach): Add 'static'.
6147
6148 2012-06-06  Yao Qi  <yao@codesourcery.com>
6149
6150         * ax.c (gdb_eval_agent_expr): Print `top' in hex.
6151
6152 2012-06-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
6153
6154         Fix gcc -flto compilation warning.
6155         * server.c (main): Make variable multi_mode and attach volatile.
6156
6157 2012-05-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
6158
6159         * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
6160         if the platform doesn't know about it.
6161
6162 2012-05-30  Jeff Kenton  <jkenton@tilera.com>
6163
6164         * Makefile.in (SFILES): Add linux-tile-low.c.
6165         (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
6166         * configure.srv: Handle tilegx-*-linux*.
6167         * linux-tile-low.c: New file.
6168
6169 2012-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
6170
6171         * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
6172
6173 2012-05-24  Pedro Alves  <palves@redhat.com>
6174
6175         PR gdb/7205
6176
6177         Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
6178
6179 2012-05-24  Pedro Alves  <palves@redhat.com>
6180
6181         PR gdb/7205
6182
6183         Replace target_signal with gdb_signal throughout.
6184
6185 2012-05-22  Maciej W. Rozycki  <macro@codesourcery.com>
6186
6187         * linux-low.c (linux_store_registers): Avoid the copying sequence
6188         when no data has been retrieved by ptrace.
6189
6190 2012-05-22  Will Deacon  <will.deacon@arm.com>
6191
6192         * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
6193         Include asm/ptrace.h.
6194         (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
6195         already defined.
6196
6197 2012-05-21  Maciej W. Rozycki  <macro@codesourcery.com>
6198
6199         * linux-low.c (linux_store_registers): Don't re-retrieve data
6200         with ptrace that has already been obtained from /proc.  Always
6201         copy any data retrieved with ptrace to the buffer supplied.
6202
6203 2012-05-11  Yao Qi  <yao@codesourcery.com>
6204             Pedro Alves  <palves@redhat.com>
6205
6206         * linux-low.c (enum stopping_threads_kind): New.
6207         (stopping_threads): Change type to `enum stopping_threads_kind'.
6208         (handle_extended_wait): If stopping and suspending threads, leave
6209         the new_lwp suspended too.
6210         (linux_wait_for_event): Adjust.
6211         (stop_all_lwps): Set `stopping_threads' to
6212         STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
6213         whether we're suspending threads or just stopping them.  Assert no
6214         recursion happens.
6215
6216 2012-04-29  Yao Qi  <yao@codesourcery.com>
6217
6218         * server.h: Move some code to ...
6219         * gdbthread.h: ... here.  New.
6220         * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
6221         (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
6222         (nto-low.o, win32-low.o): Likewise.
6223         * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
6224         * regcache.c, remote-utils.c, server.c: Likewise.
6225         * target.c, tracepoint.c, win32-low.c: Likewise.
6226
6227 2012-04-24  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
6228
6229         * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
6230         (PTRACE_ARG4_TYPE): Likewise.
6231         (PTRACE_XFER_TYPE): Likewise.
6232         * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
6233         ptrace to PTRACE_ARG3_TYPE.
6234         * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
6235         (PTRACE_ARG4_TYPE): Likewise.
6236         (PTRACE_XFER_TYPE): Likewise.
6237         (linux_detach_one_lwp): Cast fourth argument of
6238         ptrace to long then PTRACE_ARG4_TYPE.
6239         (regsets_fetch_inferior_registers): Cast third argument of
6240         ptrace to long then PTRACE_ARG3_TYPE.
6241         (regsets_store_inferior_registers): Likewise.
6242
6243 2012-04-20  Pedro Alves  <palves@redhat.com>
6244
6245         * configure: Regenerate.
6246
6247 2012-04-19  Pedro Alves  <palves@redhat.com>
6248
6249         * Makefile.in (GNULIB_BUILDDIR): New.
6250         (LIBGNU, INCGNU, GNULIB_H): Adjust.
6251         (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
6252         (all, install-only, uninstall, clean-info, all-lib, clean): No
6253         longer pass GNULIB_FLAGS_TO_PASS.  Use subdir_do.
6254         (maintainer-clean realclean distclean): Use subdir_do.
6255         (subdir_do): New.
6256         (gnulib/import/Makefile): Adjust.  Replace gnulib/import with
6257         $(GNULIB_BUILDDIR).  Don't pass argument to config.status.
6258         * acinclude.m4: Include acx_configure_dir.m4.
6259         * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
6260         calls.  Call AC_PROG_RANLIB.  Configure gnulib using
6261         ACX_CONFIGURE_DIR.
6262         (GNULIB): New.
6263         (GNULIB_STDINT_H): Adjust.
6264         (AC_OUTPUT): Don't output gnulib/Makefile anymore.
6265         * gdbreplay.c: Include build-gnulib/config.h.
6266         * server.h: Likewise.
6267         * aclocal.m4: Regenerate.
6268         * config.in: Regenerate.
6269         * configure: Regenerate.
6270
6271 2012-04-19  Pedro Alves  <palves@redhat.com>
6272
6273         * Makefile.in (LIBGNU, INCGNU): Adjust.
6274         (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
6275         (all, install-only, uninstall, clean-info, all-lib, clean)
6276         (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
6277         * configure.ac: Adjust AC_OUTPUT output.
6278         * aclocal.m4: Regenerate.
6279         * configure: Regenerate.
6280
6281 2012-04-19  Pedro Alves  <palves@redhat.com>
6282
6283         * Makefile.in (generated_files): New.
6284         (server_h): Remove the explicit dependency on config.h, and depend
6285         on $generated_files.
6286
6287 2012-04-19  Pedro Alves  <palves@redhat.com>
6288
6289         * Makefile.in (INCGNU): Add -Ignulib.
6290
6291 2012-04-19  Pedro Alves  <palves@redhat.com>
6292
6293         * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
6294         (INCGNU): ... this, and spell out -I here.
6295         (GNULIB_LIB): Rename to ...
6296         (LIBGNU): ... this.
6297         (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
6298
6299 2012-04-19  Pedro Alves  <palves@redhat.com>
6300
6301         * config.in: Regenerate.
6302
6303 2012-04-19  Pedro Alves  <palves@redhat.com>
6304
6305         * configure.ac: Remove AC_CHECK_DECLS check for memmem.
6306         * server.h (memmem): Remove declaration.
6307         * config.in: Regenerate.
6308         * configure: Regenerate.
6309
6310 2012-04-19  Yao Qi  <yao@codesourcery.com>
6311
6312         * Makefile.in (SFILES): Add common/vec.c.
6313         (OBS): Add vec.o.
6314         (vec.o): New rule.
6315
6316 2012-04-19  Yao Qi  <yao@codesourcery.com>
6317
6318         * remote-utils.c (prepare_resume_reply): Replace with macro
6319         target_core_of_thread.
6320         * server.c (handle_qxfer_threads_proper): Likewise.
6321         * target.h (traget_core_of_thread): New macro.
6322
6323 2012-04-18  Pedro Alves  <palves@redhat.com>
6324
6325         * aclocal.m4: Regenerate.
6326         * configure: Regenerate.
6327
6328 2012-04-16  Yao Qi  <yao@codesourcery.com>
6329
6330         * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
6331         duplicated on address.
6332
6333 2012-04-16  Yao Qi  <yao@codesourcery.com>
6334
6335         * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
6336         (struct tracepoint_action_ops) <send>: New field.
6337         (m_tracepoint_action_send, r_tracepoint_action_send): New.
6338         (agent_expr_send, x_tracepoint_action_send): New.
6339         (l_tracepoint_action_send): New.
6340         (cmd_qtdp): Download and install tracepoint
6341         according to `use_agent'.
6342         (run_inferior_command): Add one more parameter `len'.
6343         Update callers.
6344         (tracepoint_send_agent): New.
6345         (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
6346
6347 2012-04-16  Yao Qi  <yao@codesourcery.com>
6348
6349         * tracepoint.c (download_tracepoints): Moved to ...
6350         (cmd_qtstart): ... here.
6351
6352 2012-04-14  Yao Qi  <yao@codesourcery.com>
6353
6354         * tracepoint.c: Include inttypes.h.
6355         (struct collect_memory_action): Use sized types.
6356         (struct tracepoint): Likewise.
6357         (cmd_qtdp, stop_tracing): Update print specifiers.
6358         (cmd_qtp, response_tracepoint): Likewise.
6359         (collect_data_at_tracepoint): Likewise.
6360         (collect_data_at_step): Likewise.
6361
6362 2012-04-14  Yao Qi  <yao@codesourcery.com>
6363
6364         Import gnulib module inttypes.
6365         * aclocal.m4, config.in, configure: Regenerated.
6366
6367 2012-04-14  Yao Qi  <yao@codesourcery.com>
6368
6369         * Makefile.in (maintainer-clean, realclean, distclean): Remove
6370         Makefile and config.status at last.
6371
6372 2012-04-13  Yao Qi  <yao@codesourcery.com>
6373
6374         * tracepoint.c: Include stdint.h unconditionally.
6375
6376 2012-04-13  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
6377
6378         * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
6379         on BFD_HAVE_SYS_PROCFS_TYPE.
6380         * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
6381         * configure: Regenerate.
6382         * config.in: Likewise.
6383
6384 2012-04-13  H.J. Lu  <hongjiu.lu@intel.com>
6385
6386         * Makefile.in (clean): Also remove x32.c x32-linux.c
6387         x32-avx.c x32-avx-linux.c.
6388         (x32.o): New target.
6389         (x32.c): Likewise.
6390         (x32-linux.o): Likewise.
6391         (x32-linux.c): Likewise.
6392         (x32-avx.o): Likewise.
6393         (x32-avx.c): Likewise.
6394         (x32-avx-linux.o): Likewise.
6395         (x32-avx-linux.c): Likewise.
6396
6397         * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
6398         (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
6399         (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
6400         (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
6401         (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
6402         i386/x32-avx-linux.xml.
6403
6404         * linux-x86-low.c (init_registers_x32_linux): New prototype.
6405         (init_registers_x32_avx_linux): Likwise.
6406         (x86_linux_update_xmltarget): Call init_registers_x32_linux
6407         or init_registers_x32_avx_linux if linux_is_elf64 is false.
6408
6409 2012-04-13  Pedro Alves  <palves@redhat.com>
6410
6411         * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
6412         (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
6413         (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
6414         (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
6415         the sub-make.
6416
6417 2012-04-12  H.J. Lu  <hongjiu.lu@intel.com>
6418
6419         * linux-x86-low.c (compat_x32_clock_t): New.
6420         (compat_x32_siginfo_t): Likewise.
6421         (compat_x32_siginfo_from_siginfo): Likewise.
6422         (siginfo_from_compat_x32_siginfo): Likewise.
6423         (linux_is_elf64): Likewise.
6424         (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
6425         and siginfo_from_compat_x32_siginfo for x32.
6426         (x86_arch_setup): Set linux_is_elf64.
6427
6428 2012-04-12  H.J. Lu  <hongjiu.lu@intel.com>
6429
6430         PR gdb/13969
6431         * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
6432         e_machine field.
6433         (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
6434         * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
6435         * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
6436         compatible with process.
6437
6438 2012-04-12  Yao Qi  <yao@codesourcery.com>
6439
6440         * Makefile.in: Define abs_top_srcdir and abs_srcdir.
6441         (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
6442         (install-only, install-info, clean): Handle sub dir gnulib.
6443         (all-lib, am--refresh): New targets.
6444         (memmem.o): Remove target.
6445         * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
6446         Invoke gl_EARLY.  Invoke AC_CHECK_PROGS for make.
6447         (AC_REPLACE_FUNCS): Remove memmem.
6448         Invoke gl_INIT and AM_INIT_AUTOMAKE.
6449         (AC_OUTPUT): Generate Makefile in gnulib/.
6450         * aclocal.m4, config.in, configure: Regenerated.
6451
6452 2012-04-10  Maciej W. Rozycki  <macro@codesourcery.com>
6453
6454         * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
6455
6456 2012-04-05  Pedro Alves  <palves@redhat.com>
6457
6458         -Werror=strict-aliasing
6459
6460         * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
6461         pointer.
6462
6463 2012-04-04  Pedro Alves  <palves@redhat.com>
6464
6465         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6466         (sparc_store_gregset_from_stack, sparc_store_gregset)
6467         (sparc_breakpoint_at): Fix formatting.
6468
6469 2012-03-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
6470
6471         * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
6472         are available.
6473         * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
6474         [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
6475         * config.in: Regenerate.
6476         * configure: Likewise.
6477
6478 2012-03-29  Pedro Alves  <palves@redhat.com>
6479
6480         * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
6481         Correct ptrace arguments.
6482
6483 2012-03-28  Pedro Alves  <palves@redhat.com>
6484
6485         * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
6486         (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
6487         (IA64_FR1_REGNUM): New defines.
6488         (ia64_fetch_register): New.
6489         (the_low_target): Install it.
6490         * linux-low.h (struct linux_target_ops) <fetch_register>: New
6491         field.
6492         * linux-low.c (linux_fetch_registers): Try the
6493         the_low_target.fetch_register hook first.
6494
6495         * linux-arm-low.c (the_low_target): Adjust.
6496         * linux-bfin-low.c (the_low_target): Adjust.
6497         * linux-cris-low.c (the_low_target): Adjust.
6498         * linux-crisv32-low.c (the_low_target): Adjust.
6499         * linux-m32r-low.c (the_low_target): Adjust.
6500         * linux-m68k-low.c (the_low_target): Adjust.
6501         * linux-mips-low.c (the_low_target): Adjust.
6502         * linux-ppc-low.c (the_low_target): Adjust.
6503         * linux-s390-low.c (the_low_target): Adjust.
6504         * linux-sh-low.c (the_low_target): Adjust.
6505         * linux-sparc-low.c (the_low_target): Adjust.
6506         * linux-tic6x-low.c (the_low_target): Adjust.
6507         * linux-x86-low.c (the_low_target): Adjust.
6508         * linux-xtensa-low.c (the_low_target): Adjust.
6509
6510 2012-03-26  Pedro Alves  <palves@redhat.com>
6511
6512         * server.c (handle_qxfer_libraries): Don't bail early if
6513         the_target->qxfer_libraries_svr4 is not NULL.
6514
6515 2012-03-26  Pedro Alves  <palves@redhat.com>
6516
6517         * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
6518
6519 2012-03-23  Pedro Alves  <palves@redhat.com>
6520
6521         * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
6522         "library-list-svr4" element's start tag when the the DSO list is
6523         empty.
6524
6525 2012-03-23  Pedro Alves  <palves@redhat.com>
6526
6527         * linux-low.c (read_one_ptr): Read the inferior's pointer through
6528         a variable whose type size is the same as the inferior's pointer
6529         size.
6530
6531 2012-03-21  Thomas Schwinge  <thomas@codesourcery.com>
6532
6533         * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
6534         struct siginfo.
6535         * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
6536         * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6537         * linux-low.h: Include <signal.h>.
6538         (struct siginfo): Remove forward declaration.
6539         (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
6540         struct siginfo.
6541
6542 2012-03-21  Mike Frysinger  <vapier@gentoo.org>
6543
6544         * .gitignore: Ignore more files.
6545
6546 2012-03-19  Pedro Alves  <palves@redhat.com>
6547             Jan Kratochvil  <jan.kratochvil@redhat.com>
6548
6549         * server.c (cont_thread, general_thread): Add describing comments.
6550         (start_inferior): Clear `cont_thread'.
6551         (handle_v_cont): Don't set `cont_thread' if resuming all threads
6552         of a process.
6553
6554 2012-03-15  Yao Qi  <yao@codesourcery.com>
6555
6556         * tracepoint.c (install_tracepoint): Move duplicated tracepoint
6557         handling to ...
6558         (cmd_qtdp): ... here.
6559
6560 2012-03-15  Yao Qi  <yao@codesourcery.com>
6561
6562         * tracepoint.c (struct tracepoint_action_ops): New.
6563         (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
6564         (m_tracepoint_action_download): New.
6565         (r_tracepoint_action_download): New.
6566         (x_tracepoint_action_download): New.
6567         (l_tracepoint_action_download): New.
6568         (add_tracepoint_action): Install `action->ops' according type.
6569         (download_tracepoint_1): Move code `download' function pointer
6570         of various tracepoint_action_ops.
6571
6572 2012-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
6573
6574         * linux-low.c (linux_attach_lwp_1): New variable buffer.  Call
6575         linux_ptrace_attach_warnings.
6576
6577 2012-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
6578
6579         * Makefile.in (linux-ptrace.o): New.
6580         * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
6581         (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
6582         (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
6583         (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
6584         (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
6585         of these targets.
6586         * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
6587
6588 2012-03-08  Yao Qi  <yao@codesourcery.com>
6589             Pedro Alves  <palves@redhat.com>
6590
6591         Fix PR server/13392.
6592         * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
6593         offset of JMP insn.
6594         * tracepoint.c (remove_tracepoint): New.
6595         (cmd_qtdp): Call remove_tracepoint when failed to install.
6596
6597 2012-03-07  Pedro Alves  <palves@redhat.com>
6598
6599         * linux-low.c (get_detach_signal): New.
6600         (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
6601         Pass on pending signals to PTRACE_DETACH.  Check the result of the
6602         ptrace call.
6603         * server.c (program_signals, program_signals_p): New.
6604         (handle_general_set): Handle QProgramSignals.
6605         * server.h (program_signals, program_signals_p): Declare.
6606
6607 2012-03-05  Pedro Alves  <palves@redhat.com>
6608             Jan Kratochvil  <jan.kratochvil@redhat.com>
6609
6610         * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
6611         New comment why.
6612
6613 2012-03-03  Yao Qi  <yao@codesourcery.com>
6614
6615         * tracepoint.c (tracepoint_look_up_symbols): Update call to
6616         agent_look_up_symbols.
6617
6618 2012-03-03  Yao Qi  <yao@codesourcery.com>
6619
6620         * Makefile.in (linux-low.o): Keep dependence on agent.h.
6621         (linux-x86-low.o): Likewise.
6622         * server.h: Remove in_process_agent_loaded.
6623         * tracepoint.c (in_process_agent_loaded): Removed.  Moved it
6624         common/agent.c.
6625         Update callers.
6626
6627 2012-03-03  Yao Qi  <yao@codesourcery.com>
6628
6629         * tracepoint.c (gdb_agent_capability): New global.
6630         (in_process_agent_loaded_ust): Renamed to
6631         `in_process_agent_supports_ust'.
6632         Update callers.
6633         (in_process_agent_supports_ust): Call agent_capability_check.
6634         (clear_installed_tracepoints): Assert that agent supports
6635         agent.
6636
6637 2012-03-03  Yao Qi  <yao@codesourcery.com>
6638
6639         * linux-low.c (linux_supports_agent): New.
6640         (linux_target_ops): Initialize field `supports_agent' with
6641         linux_supports_agent.
6642         * target.h (struct target_ops) <supports_agent>: New.
6643         (target_supports_agent): New macro.
6644         * server.c (handle_general_set): Handle packet 'QAgent'.
6645         (handle_query): Send `QAgent+'.
6646         * Makefile.in (server.o): Depends on agent.h.
6647
6648 2012-03-03  Yao Qi  <yao@codesourcery.com>
6649
6650         * Makefile.in (OBS): Add agent.o.
6651         Add new rule for agent.o.
6652         Track dependence of tracepoint.c on agent.h.
6653         * tracepoint.c (run_inferior_command_1):
6654         (run_inferior_command): Call agent_run_command.
6655         (gdb_ust_connect_sync_socket): Deleted.  Move it to
6656         common/agent.c.
6657         (resume_thread, stop_thread): Likewise.
6658         (gdb_ust_socket_init): Renamed to ...
6659         (gdb_agent_socket_init): ... New.
6660         (gdb_ust_thread): Renamed to ...
6661         (gdb_agent_helper_thread): ... New.
6662         (gdb_ust_init): Move some code to ...
6663         (gdb_agent_init): ... here.  New.
6664         [HAVE_UST]: Call gdb_ust_init.
6665         (initialize_tracepoint_ftlib):  Call gdb_agent_init.
6666         * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6667         * config.in, configure: Regenerated.
6668
6669 2012-03-02  Pedro Alves  <palves@redhat.com>
6670
6671         * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6672         * linux-low.c (struct simple_pid_list): New.
6673         (stopped_pids): New a struct simple_pid_list pointer.
6674         (add_to_pid_list, pull_pid_from_list): New.
6675         (handle_extended_wait): Don't assume the first signal new children
6676         report is SIGSTOP.  Adjust call to pull_pid_from_list.
6677         (linux_wait_for_lwp): Adjust.
6678
6679 2012-03-02  Yao Qi  <yao@codesourcery.com>
6680
6681         * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6682         debug log.
6683
6684 2012-03-02  Yao Qi  <yao@codesourcery.com>
6685
6686         * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6687         `stop_pc' and `tpoint'.  Update caller.
6688
6689 2012-03-01  Maciej W. Rozycki  <macro@codesourcery.com>
6690
6691         * linux-low.h (linux_target_ops): Add regset_bitmap member.
6692         * linux-low.c (use_linux_regsets): New macro.
6693         [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6694         [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6695         (linux_register_in_regsets): New function.
6696         (usr_fetch_inferior_registers): Skip registers covered by
6697         regsets.
6698         (usr_store_inferior_registers): Likewise.
6699         (usr_fetch_inferior_registers): New macro.
6700         (usr_store_inferior_registers): Likewise.
6701         (linux_fetch_registers): Handle mixed regset/non-regset targets.
6702         (linux_store_registers): Likewise.
6703         * linux-mips-low.c (init_registers_mips_dsp_linux): New
6704         prototype.
6705         (init_registers_mips64_dsp_linux): Likewise.
6706         (init_registers_mips_linux): New macro.
6707         (init_registers_mips_dsp_linux): Likewise.
6708         (mips_dsp_num_regs): Likewise.
6709         (DSP_BASE, DSP_CONTROL): New fallback macros.
6710         (mips_base_regs): New macro.
6711         (mips_regmap): Use it.  Fix the size.
6712         (mips_dsp_regmap): New variable.
6713         (mips_dsp_regset_bitmap): Likewise.
6714         (mips_arch_setup): New function.
6715         (mips_cannot_fetch_register): Use the_low_target.regmap rather
6716         than mips_regmap.
6717         (mips_cannot_store_register): Likewise.
6718         (the_low_target): Update .arch_setup, .num_regs and .regmap
6719         initializers.  Add .regset_bitmap initializer.
6720         * linux-arm-low.c (the_low_target): Add .regset_bitmap
6721         initializer.
6722         * linux-bfin-low.c (the_low_target): Likewise.
6723         * linux-cris-low.c (the_low_target): Likewise.
6724         * linux-crisv32-low.c (the_low_target): Likewise.
6725         * linux-ia64-low.c (the_low_target): Likewise.
6726         * linux-m32r-low.c (the_low_target): Likewise.
6727         * linux-m68k-low.c (the_low_target): Likewise.
6728         * linux-ppc-low.c (the_low_target): Likewise.
6729         * linux-s390-low.c (the_low_target): Likewise.
6730         * linux-sh-low.c (the_low_target): Likewise.
6731         * linux-sparc-low.c (the_low_target): Likewise.
6732         * linux-tic6x-low.c (the_low_target): Likewise.
6733         * linux-x86-low.c (the_low_target): Likewise.
6734         * linux-xtensa-low.c (the_low_target): Likewise.
6735         * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6736         mips64-dsp-linux.o to srv_regobj.  Add mips-dsp-linux.xml,
6737         mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6738         srv_xmlfiles.
6739         * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6740         (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6741
6742 2012-02-29  Yao Qi  <yao@codesourcery.com>
6743             Pedro Alves  <palves@redhat.com>
6744
6745         * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6746         `step_over_finished' is true.
6747
6748 2012-02-27  Pedro Alves  <palves@redhat.com>
6749
6750         * linux-low.c (pid_is_stopped): Delete, moved to common/.
6751         (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6752
6753 2012-02-27  Pedro Alves  <palves@redhat.com>
6754
6755         PR server/9684
6756         * linux-low.c (pid_is_stopped): New.
6757         (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6758
6759 2012-02-25  Luis Machado  <lgustavo@codesourcery.com>
6760
6761         * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6762         of conditions.
6763
6764 2012-02-24  Maciej W. Rozycki  <macro@codesourcery.com>
6765
6766         * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6767
6768 2012-02-24  Luis Machado  <lgustavo@codesourcery>
6769
6770         * server.c (handle_query): Advertise support for target-side
6771         breakpoint condition evaluation.
6772         (process_point_options): New function.
6773         (process_serial_event): When inserting a breakpoint, check for
6774         a target-side condition that should be evaluated.
6775
6776         * mem-break.c: Include regcache.h and ax.h.
6777         (point_cond_list_t): New data structure.
6778         (breakpoint) <cond_list>: New field.
6779         (find_gdb_breakpoint_at): Make non-static.
6780         (delete_gdb_breakpoint_at): Clear any target-side
6781         conditions.
6782         (clear_gdb_breakpoint_conditions): New function.
6783         (add_condition_to_breakpoint): Likewise.
6784         (add_breakpoint_condition): Likewise.
6785         (gdb_condition_true_at_breakpoint): Likewise.
6786         (gdb_breakpoint_here): Return result directly instead
6787         of going through a local variable.
6788
6789         * mem-break.h (find_gdb_breakpoint_at): New prototype.
6790         (clear_gdb_breakpoint_conditions): Likewise.
6791         (add_breakpoint_condition): Likewise.
6792         (gdb_condition_true_at_breakpoint): Likewise.
6793
6794         * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6795         (need_step_over_p): Take target-side breakpoint condition into
6796         consideration.
6797
6798 2012-02-24  Luis Machado  <lgustavo@codesourcery>
6799
6800         * server.h: Include tracepoint.h.
6801         (agent_mem_read, agent_get_trace_state_variable_value,
6802         agent_set_trace_state_variable_value,
6803         agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6804         get_set_tsv_func_addr): New prototypes.
6805
6806         * ax.h: New include file.
6807         * ax.c: New source file.
6808
6809         * tracepoint.c: Include ax.h.
6810         (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6811         agent_expr, eval_result_type): Move to ax.h.
6812         (parse_agent_expr): Rename to ...
6813         (gdb_parse_agent_expr): ... this, make it non-static and move
6814         to ax.h.
6815         (unparse_agent_expr) Rename to ...
6816         (gdb_unparse_agent_expr): ... this, make it non-static and move
6817         to ax.h.
6818         (eval_agent_expr): Rename to ...
6819         (eval_tracepoint_agent_expr): ... this.
6820         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6821         forward declarations.
6822         (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6823         (agent_get_trace_state_variable_value): New function.
6824         (agent_set_trace_state_variable_value): New function.
6825         (cmd_qtdp): Call gdb_parse_agent_expr (...).
6826         (response_tracepoint): Call gdb_unparse_agent_expr (...).
6827         (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6828         (condition_true_at_tracepoint): Likewise.
6829         (parse_agent_expr): Rename to ...
6830         (gdb_parse_agent_expr): ... this and move to ax.c.
6831         (unparse_agent_expr): Rename to ...
6832         (gdb_unparse_agent_expr): ... this and move to ax.c.
6833         (gdb_agent_op_name): Move to ax.c.
6834         (eval_agent_expr): Rename to ...
6835         (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6836         and move to ax.c.
6837         (eval_tracepoint_agent_expr): New function.
6838         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
6839         non-static.
6840         (current_insn_ptr, emit_error, struct bytecode_address): Move to
6841         ax.c.
6842         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6843         emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6844         emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6845         emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6846         emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6847         emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6848         emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6849         emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6850         (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6851         (compile_bytecodes): Remove forward declaration.
6852         (is_goto_target): Move to ax.c.
6853         (compile_bytecodes): Move to ax.c and call
6854         agent_get_trace_state_variable_value (...) and
6855         agent_set_trace_state_variable_value (...).
6856
6857         * Makefile.in: Update ax.c and IPA dependencies.
6858
6859 2012-02-24  Pedro Alves  <palves@redhat.com>
6860
6861         * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6862         (cmd_bigqtbuffer_circular): ... this.  Only handle
6863         'QTBuffer:circular:'.
6864         (handle_tracepoint_general_set): Adjust.
6865
6866 2012-02-16  Yao Qi  <yao@codesourcery.com>
6867
6868         * inferiors.c: Move code to ...
6869         * dll.c: .... here.  New.
6870         * server.h: Declare clear_dlls.
6871         * Makefile.in (SFILES): Add dll.c.
6872         (OBS): Add dll.o
6873         (dll.o): New rule.
6874
6875 2012-02-11  Yao Qi  <yao@codesourcery.com>
6876
6877         * server.c: (handle_monitor_command): Add a new parameter
6878         `own_buf'.
6879         (handle_query): Update caller.
6880
6881 2012-02-09  Joel Brobecker  <brobecker@adacore.com>
6882
6883         * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6884         * configure, config.in: Regenerate.
6885         * hostio.c: Provide an alternate implementation if HAVE_READLINK
6886         is not defined.
6887
6888 2012-02-02  Pedro Alves  <palves@redhat.com>
6889
6890         Try SIGKILL first, then PTRACE_KILL.
6891         * linux-low.c (linux_kill_one_lwp): New.
6892         (linux_kill_one_lwp): Rename to ...
6893         (kill_one_lwp_callback): ... this.  Use the new
6894         linux_kill_one_lwp.
6895
6896 2012-02-02  Pedro Alves  <palves@redhat.com>
6897
6898         * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6899         inferior.
6900
6901 2012-01-27  Pedro Alves  <palves@redhat.com>
6902
6903         * linux-low.c (linux_child_pid_to_exec_file): Delete.
6904         (elf_64_file_p): Make static.
6905         (linux_pid_exe_is_elf_64_file): New.
6906         * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6907         Delete declarations.
6908         (linux_pid_exe_is_elf_64_file): Declare.
6909         * linux-x86-low.c (x86_arch_setup): Use
6910         linux_pid_exe_is_elf_64_file.
6911
6912 2012-01-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
6913
6914         * linux-low.c (linux_wait_for_event_1): Rename to ...
6915         (linux_wait_for_event): ... here and merge it with former
6916         linux_wait_for_event - new variable wait_ptid, use it.
6917         (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6918
6919 2012-01-23  Pedro Alves  <palves@redhat.com>
6920
6921         * server.c (main): Avoid yet another case of infinite loop while
6922         detaching/killing after a longjmp.
6923
6924 2012-01-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
6925
6926         Code cleanup.
6927         * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6928
6929 2012-01-20  Ulrich Weigand  <ulrich.weigand@linaro.org>
6930
6931         * hostio.c (handle_readlink): New function.
6932         (handle_vFile): Call it to handle "vFile:readlink" packets.
6933
6934 2012-01-20  Pedro Alves  <palves@redhat.com>
6935             Ulrich Weigand  <ulrich.weigand@linaro.org>
6936
6937         * server.c (handle_v_requests): Only support vAttach and vRun to
6938         start multiple processes when in extended protocol mode.
6939
6940 2012-01-17  Pedro Alves  <palves@redhat.com>
6941
6942         * tracepoint.c (initialize_tracepoint): Use mmap instead of
6943         memalign plus mprotect to allocate the scratch buffer.
6944
6945 2012-01-13  Pedro Alves  <palves@redhat.com>
6946
6947         * server.c (attach_inferior): Clear `cont_thread'.
6948
6949 2012-01-13  Pedro Alves  <palves@redhat.com>
6950
6951         * server.c (main): Avoid infinite loop while detaching/killing
6952         after a longjmp.
6953
6954 2012-01-09  Doug Evans  <dje@google.com>
6955
6956         * server.c (start_inferior): Set last_ptid in --wrapper case.
6957
6958 2012-01-06  Yao Qi  <yao@codesourcery.com>
6959
6960         * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6961         defined.
6962         [IN_PROCESS_AGENT] (debug_agent): New global variable.
6963
6964 2012-01-04  Yao Qi  <yao@codesourcery.com>
6965
6966         * tracepoint.c (cmd_qtdp): Print debug message
6967         for static tracepoint.
6968
6969 2012-01-04  Yao Qi  <yao@codesourcery.com>
6970
6971         * tracepoint.c (trace_vdebug): Differentiate debug message
6972         between gdbserver and IPA.
6973
6974 2012-01-03  Yao Qi  <yao@codesourcery.com>
6975
6976         * tracepoint.c (tracepoint_was_hit): Don't collect for
6977         static tracepoint.
6978
6979 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
6980
6981         * terminal.h: Reformat copyright header.
6982
6983 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
6984
6985         * server.c (gdbserver_version): Update copyright year.
6986         * gdbreplay.c (gdbreplay_version): Likewise.
6987
6988 2011-12-18  Jan Kratochvil  <jan.kratochvil@redhat.com>
6989
6990         * linux-low.c (linux_create_inferior): Put empty if clause for write.
6991
6992         Revert:
6993         2011-12-18  Hui Zhu  <teawater@gmail.com>
6994         * linux-low.c (linux_create_inferior): Save return value to ret.
6995
6996 2011-12-18  Hui Zhu  <teawater@gmail.com>
6997
6998         * linux-low.c (linux_create_inferior): Save return value to ret.
6999
7000 2011-12-16  Doug Evans  <dje@google.com>
7001
7002         * linux-low.c (linux_create_inferior): If stdio connection,
7003         redirect stdin from /dev/null, stdout to stderr.
7004         * remote-utils.c (remote_is_stdio): New static global.
7005         (remote_connection_is_stdio): New function.
7006         (remote_prepare): Handle stdio connection.
7007         (remote_open): Ditto.
7008         (remote_close): Don't close stdin for stdio connections.
7009         (read_prim,write_prim): New functions.  Replace all calls to
7010         read/write to these.
7011         * server.c (main): Watch for "-" argument.  Move call to
7012         remote_prepare before start_inferior.
7013         * server.h (STDIO_CONNECTION_NAME): New macro.
7014         (remote_connection_is_stdio): Declare.
7015
7016         * remote-utils.c (prepare_resume_reply): Remove extraneous \n
7017         in debugging output.
7018
7019 2011-12-15  Yao Qi  <yao@codesourcery.com>
7020
7021         * tracepoint.c: Include sys/syscall.h.
7022         (gdb_ust_thread): Remove preprocessor conditional.
7023
7024 2011-12-14  Pedro Alves  <pedro@codesourcery.com>
7025
7026         * linux-low.c (linux_detach_one_lwp): Call
7027         the_low_target.prepare_to_resume before detaching.
7028
7029 2011-12-14  Yao Qi  <yao@codesourcery.com>
7030
7031         * tracepoint.c (gdb_ust_thread): Don't ignore return value
7032         of write.
7033
7034 2011-12-14  Yao Qi  <yao@codesourcery.com>
7035
7036         * i386-low.c (i386_low_stopped_data_address): Initialize local
7037         variable `control'.
7038
7039 2011-12-13  Pedro Alves  <pedro@codesourcery.com>
7040
7041         PR remote/13492
7042
7043         * i386-low.c (i386_low_stopped_data_address): Avoid fetching
7044         DR_CONTROL unless necessary.  Extend comments.
7045         * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
7046         DR0-3 if not used.  If any watchpoint was set, clear DR_STATUS.
7047
7048 2011-12-13  Yao Qi  <yao@codesourcery.com>
7049
7050         * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
7051         macros.
7052         (upload_fast_traceframes, upload_fast_traceframes): Likewise.
7053
7054 2011-12-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
7055
7056         * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
7057         Print new debug message for such case.
7058
7059 2011-12-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
7060
7061         Fix overlapping memcpy.
7062         * mem-break.c (set_raw_breakpoint_at): New variable buf.  Use it for
7063         the read_inferior_memory transfer.
7064         (delete_fast_tracepoint_jump): New variable buf.  Use it for the
7065         write_inferior_memory transfer.
7066         (set_fast_tracepoint_jump): New variable buf.  Use it for the
7067         read_inferior_memory and write_inferior_memory transfers.
7068         (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
7069         (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
7070         Use it for the write_inferior_memory transfer.
7071         (check_mem_read, check_mem_write): New gdb_asserts for overlapping
7072         buffers.
7073
7074 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
7075
7076         * linux-low.c (fetch_register, store_register): Make code
7077         consistent, fix formatting.
7078
7079 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
7080
7081         * linux-low.c (usr_store_inferior_registers): Factor out code
7082         to handle individual registers into...
7083         (store_register): ... this new function.
7084
7085 2011-12-06  Ulrich Weigand  <uweigand@de.ibm.com>
7086
7087         * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
7088         (s390-linux32v2.o, s390-linux32v2.c): Likewise.
7089         (s390-linux64v1.o, s390-linux64v1.c): Likewise.
7090         (s390-linux64v2.o, s390-linux64v2.c): Likewise.
7091         (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
7092         (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
7093         * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
7094         (srv_xmlfiles): Add new XML files.
7095
7096         * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
7097         and <sys/uio.h>.
7098         (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
7099         (init_registers_s390_linux32v1): Add prototype.
7100         (init_registers_s390_linux32v2): Likewise.
7101         (init_registers_s390_linux64v1): Likewise.
7102         (init_registers_s390_linux64v2): Likewise.
7103         (init_registers_s390x_linux64v1): Likewise.
7104         (init_registers_s390x_linux64v2): Likewise.
7105         (s390_num_regs): Increment to 52.
7106         (s390_regmap): Add orig_r2 register.
7107         (s390_num_regs_3264): Increment to 68.
7108         (s390_regmap_3264): Add orig_r2 register.
7109         (s390_collect_ptrace_register): Handle orig_r2 register.
7110         (s390_supply_ptrace_register): Likewise.
7111         (s390_fill_last_break): New function.
7112         (s390_store_last_break): Likewise.
7113         (s390_fill_system_call): New function.
7114         (s390_store_system_call): Likewise.
7115         (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
7116         register sets.
7117         (s390_check_regset): New function.
7118         (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
7119         NT_S390_SYSTEM_CALL regsets and use appropriate description.
7120         Update target_regsets for available register sets.
7121
7122 2011-12-02  Paul Pluzhnikov  <ppluzhnikov@google.com>
7123             Jan Kratochvil  <jan.kratochvil@redhat.com>
7124
7125         * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
7126         (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
7127         New.
7128         (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
7129         * linux-low.h (struct process_info_private): New member r_debug.
7130         * server.c (handle_qxfer_libraries): Call
7131         the_target->qxfer_libraries_svr4.
7132         (handle_qxfer_libraries_svr4): New function.
7133         (qxfer_packets): New entry "libraries-svr4".
7134         (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
7135         * target.h (struct target_ops): New member qxfer_libraries_svr4.
7136         * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
7137         PACKET_qXfer_libraries_svr4.
7138
7139 2011-11-30  Ulrich Weigand  <uweigand@de.ibm.com>
7140
7141         * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
7142         PSW address/mask between 8-byte and 16-byte formats.
7143         (s390_supply_ptrace_register): Likewise.
7144         (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
7145         basic addressing mode bit.
7146
7147 2011-11-24  Stan Shebs  <stan@codesourcery.com>
7148
7149         * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
7150
7151 2011-11-17  Stan Shebs  <stan@codesourcery.com>
7152
7153         * tracepoint.c (struct tracepoint): New field traceframe_usage.
7154         (tracing_start_time): New global.
7155         (tracing_stop_time): New global.
7156         (tracing_user_name): New global.
7157         (tracing_notes): New global.
7158         (tracing_stop_note): New global.
7159         (cmd_qtstart): Set traceframe_usage, start_time.
7160         (stop_tracing): Set stop_time.
7161         (cmd_qtstatus): Report additional status.
7162         (cmd_qtp): New function.
7163         (handle_tracepoint_query): Call it.
7164         (cmd_qtnotes): New function.
7165         (handle_tracepoint_general_set): Call it.
7166         (get_timestamp): Rename from tsv_get_timestamp.
7167
7168 2011-11-14  Stan Shebs  <stan@codesourcery.com>
7169             Kwok Cheung Yeung  <kcy@codesourcery.com>
7170
7171         * linux-x86-low.c (small_jump_insn): New.
7172         (i386_install_fast_tracepoint_jump_pad): Add arguments for
7173         trampoline and error message, build a trampoline and issue a small
7174         jump instruction to it.
7175         (x86_install_fast_tracepoint_jump_pad): Add arguments for
7176         trampoline and error message.
7177         (x86_get_min_fast_tracepoint_insn_len): New.
7178         (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
7179         * linux-low.h (struct linux_target_ops): Add arguments to
7180         install_fast_tracepoint_jump_pad operation, add new operation.
7181         * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
7182         arguments.
7183         (linux_get_min_fast_tracepoint_insn_len): New function.
7184         (linux_target_op): Add new operation.
7185         * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
7186         (gdb_trampoline_buffer_end): Ditto.
7187         (gdb_trampoline_buffer_error): Ditto.
7188         (struct ipa_sym_addresses): Add fields for new IPA variables.
7189         (symbol_list): Add entries for new IPA variables.
7190         (struct tracepoint): Add fields to hold the address range of the
7191         trampoline used by the tracepoint.
7192         (trampoline_buffer_head): New static variable.
7193         (trampoline_buffer_tail): Ditto.
7194         (claim_trampoline_space): New function.
7195         (have_fast_tracepoint_trampoline_buffer): New function.
7196         (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
7197         structure.
7198         (install_fast_tracepoint): Ditto, also add error buffer argument.
7199         (cmd_qtminftpilen): New function.
7200         (handle_tracepoint_query): Add response to qTMinFTPILen packet.
7201         (fast_tracepoint_from_trampoline_address): New function.
7202         (fast_tracepoint_collecting): Handle trampoline as part of jump
7203         pad space.
7204         (set_trampoline_buffer_space): New function.
7205         (initialize_tracepoint): Initialize new IPA variables.
7206         * target.h (struct target_ops): Add arguments to
7207         install_fast_tracepoint_jump_pad operation, add new
7208         get_min_fast_tracepoint_insn_len operation.
7209         (target_get_min_fast_tracepoint_insn_len): New.
7210         (install_fast_tracepoint_jump_pad): Add arguments.
7211         * server.h (IPA_BUFSIZ): Define.
7212         * linux-i386-ipa.c: Include extra header files.
7213         (initialize_fast_tracepoint_trampoline_buffer): New function.
7214         (initialize_low_tracepoint): Call it.
7215         * server.h (set_trampoline_buffer_space): Declare.
7216         (claim_trampoline_space): Ditto.
7217         (have_fast_tracepoint_trampoline_buffer): Ditto.
7218
7219 2011-11-14  Yao Qi  <yao@codesourcery.com>
7220
7221         * server.c (handle_query): Handle InstallInTrace for qSupported.
7222         * tracepoint.c (add_tracepoint): Sort list.
7223         (install_tracepoint, download_tracepoint): New.
7224         (cmd_qtdp): Call them to install and download tracepoints.
7225         (sort_tracepoints): Removed.
7226         (cmd_qtstart): Update.
7227
7228 2011-11-14  Yao Qi  <yao@codesourcery.com>
7229
7230         * mem-break.c (inc_ref_fast_tracepoint_jump): New.
7231         * mem-break.h: Declare.
7232         * tracepoint.c (cmd_qtstart): Move some code to ...
7233         (clone_fast_tracepoint, install_fast_tracepoint): ... here.
7234         New.
7235         (download_tracepoints): Move some code to ...
7236         (download_tracepoint_1): ... here.  New.
7237
7238 2011-11-08  Yao Qi  <yao@codesourcery.com>
7239
7240         * remote-utils.c (relocate_instruction): A comment fix.
7241
7242 2011-11-07  Joel Brobecker  <brobecker@adacore.com>
7243
7244         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
7245         (i386_dr_low_get_control, i386_dr_low_get_status): Use
7246         dr_status_mirror and dr_control_mirror from debug_reg_state.
7247         (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
7248         (i386_initial_stuff): Remove use of deleted globals.
7249         (i386_get_thread_context, i386_set_thread_context,
7250         i386_thread_added): Use dr_status_mirror and dr_control_mirror
7251         from debug_reg_state.
7252
7253 2011-11-05  Yao Qi  <yao@codesourcery.com>
7254
7255         * tracepoint.c (gdb_collect): Loop over tracepoints of same
7256         address as TPOINT's.
7257
7258 2011-11-02  Stan Shebs  <stan@codesourcery.com>
7259
7260         * tracepoint.c (agent_mem_read_string): New function.
7261         (eval_agent_expr): Call it for tracenz.
7262         * server.c (handle_query): Report support for tracenz.
7263
7264 2011-11-02  Yao Qi  <yao@codesourcery.com>
7265
7266         * tracepoint.c (cmd_qtstart): Remove unused local variables.
7267
7268 2011-11-02  Yao Qi  <yao@codesourcery.com>
7269
7270         * target.h: Fix a typo in comment.
7271
7272 2011-10-31  Pedro Alves  <pedro@codesourcery.com>
7273
7274         * mem-break.c (check_mem_write): Add `myaddr' parameter.  Don't
7275         clobber the breakpoints' shadows with fast tracepoint jumps.
7276         * mem-break.h (check_mem_write): Add `myaddr' parameter.
7277         * target.c (write_inferior_memory): Also pass MYADDR down to
7278         check_mem_write.
7279
7280 2011-10-07  Ulrich Weigand  <ulrich.weigand@linaro.org>
7281
7282         * configure.ac: Check support for personality routine.
7283         * configure: Regenerate.
7284         * config.in: Likewise.
7285         * linux-low.c: Include <sys/personality.h>.
7286         Define ADDR_NO_RANDOMIZE if necessary.
7287         (linux_create_inferior): Disable address space randomization when
7288         forking inferior, if requested.
7289         (linux_supports_disable_randomization): New function.
7290         (linux_target_ops): Install it.
7291         * server.h (disable_randomization): Declare.
7292         * server.c (disable_randomization): New global variable.
7293         (handle_general_set): Handle QDisableRandomization.
7294         (handle_query): Likewise for qSupported.
7295         (main): Support --disable-randomization and --no-disable-randomization
7296         command line arguments.
7297         * target.h (struct target_ops): Add supports_disable_randomization.
7298         (target_supports_disable_randomization): New macro.
7299
7300 2011-09-29  Mike Frysinger  <vapier@gentoo.org>
7301
7302         * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
7303         ifdef check.
7304         [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
7305         [!PT_GETDSBT] (target_loadmap): New definition.
7306         (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
7307         (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
7308         LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
7309         and PT_GETDSBT to LINUX_LOADMAP.
7310         [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
7311         (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
7312
7313 2011-09-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
7314
7315         * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
7316         (arm_linux_hwbp_cap): New static variable.
7317         (arm_linux_get_hwbp_cap): Replace by ...
7318         (arm_linux_init_hwbp_cap): ... this new function.
7319         (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
7320         (arm_linux_get_hw_watchpoint_count): Likewise.
7321         (arm_linux_get_hw_watchpoint_max_length): Likewise.
7322         (arm_arch_setup): Call arm_linux_init_hwbp_cap.
7323         (arm_prepare_to_resume): Use perror_with_name instead of error.
7324
7325 2011-09-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
7326
7327         * linux-arm-low.c: Include <signal.h>.
7328         (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
7329         (struct arm_linux_hwbp_cap): New data type.
7330         (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
7331         (struct arm_linux_hw_breakpoint): New data type.
7332         (MAX_BPTS, MAX_WPTS): Define.
7333         (struct arch_process_info, struct arch_lwp_info): New data types.
7334         (arm_linux_get_hwbp_cap): New function.
7335         (arm_linux_get_hw_breakpoint_count): Likewise.
7336         (arm_linux_get_hw_watchpoint_count): Likewise.
7337         (arm_linux_get_hw_watchpoint_max_length): Likewise.
7338         (arm_hwbp_control_initialize): Likewise.
7339         (arm_hwbp_control_is_enabled): Likewise.
7340         (arm_hwbp_control_is_initialized): Likewise.
7341         (arm_hwbp_control_disable): Likewise.
7342         (arm_linux_hw_breakpoint_equal): Likewise.
7343         (arm_linux_hw_point_initialize): Likewise.
7344         (struct update_registers_data): New data structure.
7345         (update_registers_callback: New function.
7346         (arm_insert_point): Likewise.
7347         (arm_remove_point): Likewise.
7348         (arm_stopped_by_watchpoint): Likewise.
7349         (arm_stopped_data_address): Likewise.
7350         (arm_new_process): Likewise.
7351         (arm_new_thread): Likewise.
7352         (arm_prepare_to_resume): Likewise.
7353         (the_low_target): Register arm_insert_point, arm_remove_point,
7354         arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
7355         arm_new_thread, and arm_prepare_to_resume.
7356
7357 2011-09-15  Stan Shebs  <stan@codesourcery.com>
7358
7359         * server.h (struct emit_ops): Add compare-goto fields.
7360         * tracepoint.c (gdb_agent_op_sizes): New table.
7361         (emit_eq_goto): New function.
7362         (emit_ne_goto): New function.
7363         (emit_lt_goto): New function.
7364         (emit_le_goto): New function.
7365         (emit_gt_goto): New function.
7366         (emit_ge_goto): New function.
7367         (is_goto_target): New function.
7368         (compile_bytecodes): Recognize special cases of compare-goto
7369         combinations and call specialized emitters for them.
7370         * linux-x86-low.c (amd64_emit_eq_goto): New function.
7371         (amd64_emit_ne_goto): New function.
7372         (amd64_emit_lt_goto): New function.
7373         (amd64_emit_le_goto): New function.
7374         (amd64_emit_gt_goto): New function.
7375         (amd64_emit_ge_goto): New function.
7376         (amd64_emit_ops): Add the new functions.
7377         (i386_emit_eq_goto): New function.
7378         (i386_emit_ne_goto): New function.
7379         (i386_emit_lt_goto): New function.
7380         (i386_emit_le_goto): New function.
7381         (i386_emit_gt_goto): New function.
7382         (i386_emit_ge_goto): New function.
7383         (i386_emit_ops): Add the new functions.
7384
7385 2011-09-08  Stan Shebs  <stan@codesourcery.com>
7386
7387         * linux-x86-low.c (i386_emit_prologue): Save %ebx.
7388         (i386_emit_epilogue): Restore %ebx.
7389
7390 2011-08-31  Jie Zhang  <jzhang918@gmail.com>
7391
7392         * server.c (step_thread): Remove definition.
7393         (process_serial_event): Don't handle Hs.
7394         * server.h (step_thread): Remove declaration.
7395         * target.c (set_desired_inferior): Remove use of step_thread.
7396
7397 2011-08-24  Luis Machado  <lgustavo@codesourcery.com>
7398
7399         * linux-low.c: Include linux-procfs.h.
7400         (linux_attach_lwp_1): Update comments.
7401         (linux_attach): Scan for existing threads when attaching to a
7402         process that is the tgid.
7403         * Makefile.in: Update dependencies.
7404
7405 2011-08-24  Luis Machado  <lgustavo@codesourcery.com>
7406
7407         * configure.srv: Add linux-procfs.o dependencies.
7408
7409 2011-08-14  Yao Qi  <yao@codesourcery.com>
7410
7411         * target.h (struct target_ops): Fix indent.
7412         * win32-low.c (win32_target_ops): Fix comment.
7413
7414 2011-08-14  Andrew Jenner  <andrew@codesourcery.com>
7415             Yao Qi  <yao@codesourcery.com>
7416
7417         * Makefile.in (clean): Remove tic6x-*.c files.
7418         (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
7419         (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
7420         (tic6x-c64xp-linux.c): Likewise.
7421         * configure.srv: Add support for tic6x-*-uclinux.
7422         * linux-tic6x-low.c: New.
7423         * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
7424
7425 2011-08-14  Andrew Stubbs <ams@codesourcery.com>
7426             Yao Qi  <yao@codesourcery.com>
7427
7428         * target.h (struct target_ops): Add read_loadmap.
7429         * linux-low.c (struct target_loadseg): New type.
7430         (struct target_loadmap): New type.
7431         (linux_read_loadmap): New function.
7432         (linux_target_ops): Add linux_read_loadmap.
7433         * server.c (handle_query): Support qXfer:fdpic:read packet.
7434         * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
7435         to NULL.
7436
7437 2011-08-05  Eli Zaretskii  <eliz@gnu.org>
7438
7439         * win32-low.c: Include <stdint.h>.
7440
7441 2011-07-22  Pedro Alves  <pedro@codesourcery.com>
7442
7443         * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
7444         to the inferior here.
7445         (i386_remove_aligned_watchpoint): Ditto.
7446         (i386_handle_nonaligned_watchpoint): Return immediate on fail to
7447         fit part of the watchpoint in the debug registers.
7448         (i386_update_inferior_debug_regs): New.
7449         (i386_low_insert_watchpoint): Work on a local mirror of the debug
7450         registers, and only update the inferior on success.
7451         (i386_low_remove_watchpoint): Ditto.
7452
7453 2011-07-22  Kwok Cheung Yeung  <kcy@codesourcery.com>
7454
7455         * linux-low.c (compare_ints, unique, list_threads, show_process,
7456         linux_core_of_thread): Delete.
7457         (linux_target_ops): Change linux_core_of_thread to
7458         linux_common_core_of_thread.
7459         (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
7460         * utils.c (malloc_failure): Change type of argument.
7461         (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
7462         * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
7463         common/linux-osdata.c, common/ptid.c and common/buffer.c.
7464         (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
7465         (IPA_OBJS): Add common-utils-ipa.o.
7466         (ptid_h, linux_osdata_h): New macros.
7467         (server_h): Add common/common-utils.h, common/xml-utils.h,
7468         common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
7469         common/ptid.h.
7470         (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
7471         ptid.o, buffer.o): New rules.
7472         (linux-low.o): Add common/linux-osdata.h as a dependency.
7473         * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
7474         * configure.ac: Add AC_HEADER_DIRENT check.
7475         * config.in: Regenerate.
7476         * configure: Regenerate.
7477         * remote-utils.c (xml_escape_text): Delete.
7478         (buffer_grow, buffer_free, buffer_init, buffer_finish,
7479         buffer_xml_printf): Move to common/buffer.c.
7480         * server.c (main): Remove call to initialize_inferiors.
7481         * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
7482         ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
7483         ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
7484         internal_error, gdb_assert, gdb_assert_fail): Delete.
7485         (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
7486         buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
7487         common/buffer.h.
7488         * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
7489         ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
7490         initialize_inferiors): Delete.
7491
7492 2011-07-20  Pedro Alves  <pedro@codesourcery.com>
7493
7494         * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
7495         symbol error.
7496
7497 2011-05-31  Pedro Alves  <pedro@codesourcery.com>
7498
7499         * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
7500         assertion.
7501         * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
7502
7503 2011-05-26  Yao Qi  <yao@codesourcery.com>
7504
7505         * Makefile.in (thread-db.o): Track dependence to
7506         common/gdb_thread_db.h.
7507         * thread-db.c: include gdb_thread_db.h from right place.
7508
7509 2011-05-16  Adrian Cornish  <gnu@bluedreamer.com>
7510
7511         * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
7512         __FILE__ and __LINE__ to internal_error.
7513
7514 2011-05-13  Doug Evans  <dje@google.com>
7515
7516         * thread-db.c (try_thread_db_load_from_sdir): New function.
7517         (try_thread_db_load_from_dir): New function.
7518         (thread_db_load_search): Handle $sdir, ignore $pdir.
7519         Remove trying of system directories if search of
7520         libthread-db-search-path fails, that is now done via $sdir.
7521
7522 2011-05-12  Kwok Cheung Yeung  <kcy@codesourcery.com>
7523
7524         * server.c (handle_query): Add EnableDisableTracepoints to the list
7525         of supported features.
7526         * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
7527         tracepoints.
7528         (cmd_qtenable_disable): New.
7529         (cmd_qtstart): Install tracepoints even if disabled.
7530         (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
7531         receiving a QTEnable or QTDisable packet.
7532         (gdb_collect): Skip data collection if fast tracepoint is disabled.
7533         (ust_marker_to_static_tracepoint): Do not ignore disabled static
7534         tracepoints.
7535         (gdb_probe): Skip data collection if static tracepoint is disabled.
7536
7537 2011-05-10  Doug Evans  <dje@google.com>
7538
7539         * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
7540
7541 2011-05-04  Doug Evans  <dje@google.com>
7542
7543         * linux-low.c (linux_join): Skip process lookup.
7544         * spu-low.c (spu_join): Ditto.
7545         * server.c (join_inferiors_callback): Delete.
7546         (process_serial_event): For 'D' packet (detach) call join_inferior
7547         directly.
7548
7549 2011-05-04  Joseph Myers  <joseph@codesourcery.com>
7550
7551         * README: Don't mention xscale*-*-linux*.
7552         * configure.srv (xscale*-*-linux*): Don't handle target.
7553
7554 2011-04-27  Nathan Froyd  <froydnj@codesourcery.com>
7555
7556         * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
7557         casting pointers.
7558         (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
7559         (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
7560         (i386_emit_void_call_2): Likewise.
7561
7562 2011-04-26  Yao Qi  <yao@codesourcery.com>
7563
7564         * linux-low.c: Move common macros to linux-ptrace.h.
7565         Include linux-ptrace.h.
7566         * Makefile.in (linux_ptrace_h): New.
7567         (linux-low.o): Depends on linux-ptrace.h.
7568
7569 2011-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
7570
7571         * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
7572         RUN_ONCE.  Comment for the LISTEN_DESC delete_file_handler call.
7573         (remote_prepare): New function with most of the TCP code from ...
7574         (remote_open): ... here.  Detect PORT here unconditionally.  Move also
7575         setting transport_is_reliable.
7576         * server.c (run_once): New variable.
7577         (gdbserver_usage): Document it.
7578         (main): Set run_once for `--once'.  Call remote_prepare.  Exit after
7579         the first run if RUN_ONCE.
7580         * server.h (run_once, remote_prepare): New declarations.
7581
7582 2011-04-19  Tom Tromey  <tromey@redhat.com>
7583
7584         * win32-low.c (handle_load_dll): Remove duplicate "the".
7585
7586 2011-04-07  Pierre Muller  <muller@ics.u-strasbg.fr>
7587
7588         Remove support for old Cygwin 1.5 versions.
7589         * win32-low.c (win32_create_inferior): Use new cygwin_path_list
7590         function to avoid warning.
7591         (win32_add_one_solib): Use cygwin_conv_path function to avoid
7592         warning.
7593
7594 2011-03-18  Pierre Muller  <muller@ics.u-strasbg.fr>
7595
7596         * gdbserver/server.h (Macro _): Define it if not available.
7597
7598 2011-03-14  Michael Snyder  <msnyder@vmware.com>
7599
7600         * hostio.c (handle_close): Remove unnecessary null test.
7601
7602 2011-03-10  Joel Brobecker  <brobecker@adacore.com>
7603
7604         * Makefile.in (maintainer-clean realclean distclean): Remove
7605         "make ...  subdir_do" command.
7606
7607 2011-03-10  Michael Snyder  <msnyder@vmware.com>
7608
7609         * tracepoint.c (tracepoint_finish_step): Fix loop variable.
7610
7611         * server.c (handle_v_run): Free alloced buffer on early return.
7612
7613 2011-03-09  Yao Qi  <yao@codesourcery.com>
7614
7615         Revert:
7616         2011-03-04  Yao Qi  <yao@codesourcery.com>
7617
7618         * Makefile.in: Remove GNU make feature --directory.
7619
7620         2011-03-05  Yao Qi  <yao@codesourcery.com>
7621
7622         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7623         (subdir_do): New make target.  Copied from gdb/Makefile.
7624         (maintainer-clean, realclean, distclean, clean): Call corresponding
7625         make targets in common/Makefile.
7626
7627         2011-02-11  Yao Qi  <yao@codesourcery.com>
7628
7629         * configure.ac: Call AC_PROG_RANLIB.
7630         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
7631         * configure: Regenerate.
7632
7633 2011-03-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
7634
7635         * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
7636
7637 2011-03-06  Yao Qi  <yao@codesourcery.com>
7638
7639         * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
7640
7641 2011-03-05  Yao Qi  <yao@codesourcery.com>
7642
7643         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7644         (subdir_do): New make target.  Copied from gdb/Makefile.
7645         (maintainer-clean, realclean, distclean, clean): Call corresponding
7646         make targets in common/Makefile.
7647
7648 2011-03-04  Yao Qi  <yao@codesourcery.com>
7649
7650         * Makefile.in: Remove GNU make feature --directory.
7651
7652 2011-03-04  Michael Snyder  <msnyder@vmware.com>
7653
7654         * server.c (queue_stop_reply): Call xmalloc not malloc.
7655
7656 2011-03-02  Michael Snyder  <msnyder@vmware.com>
7657
7658         * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7659
7660 2011-02-28  Michael Snyder  <msnyder@vmware.com>
7661
7662         * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7663         (cmd_qtframe): Ditto.
7664         (cmd_qtbuffer): Ditto.
7665         (cmd_bigqtbuffer): Ditto.
7666
7667         * utils.c (decimal2str): Initialize 'width' to nine, then
7668         don't mess with it.
7669
7670 2011-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
7671
7672         * hostio.c (require_data): Free *data, not data.
7673
7674 2011-02-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
7675
7676         * hostio.c (require_data): Use free, not xfree.
7677
7678 2011-02-27  Michael Snyder  <msnyder@vmware.com>
7679
7680         * server.c (handle_query): Discard unused value.
7681
7682         * hostio.c (require_data): Free malloc memory before returning
7683         error.
7684
7685 2011-02-26  Michael Snyder  <msnyder@vmware.com>
7686
7687         * linux-low.c (list_threads): Call closedir for dirent.
7688
7689 2011-02-27  Michael Snyder  <msnyder@vmware.com>
7690
7691         * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7692         a case statement falls through.
7693
7694         * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7695
7696         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7697         in comparison.
7698
7699 2011-02-26  Michael Snyder  <msnyder@vmware.com>
7700
7701         * utils.c (decimal2str): Eliminate dead code and dead param.
7702         (pulongest): Drop dead param from call to decimal2str.
7703         (plongest): Ditto.
7704
7705 2011-02-24  Joel Brobecker  <brobecker@adacore.com>
7706
7707         Revert the following patch (not approved yet):
7708         2011-02-21  Hui Zhu  <teawater@gmail.com>
7709         * tracepoint.c (tp_printf): New function.
7710         (eval_agent_expr): Handle gdb_agent_op_printf.
7711
7712 2011-02-21  Hui Zhu  <teawater@gmail.com>
7713
7714         * tracepoint.c (tp_printf): New function.
7715         (eval_agent_expr): Handle gdb_agent_op_printf.
7716
7717 2011-02-18  Tom Tromey  <tromey@redhat.com>
7718
7719         * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7720         (tracepoint.o): Likewise.
7721         * tracepoint.c (enum gdb_agent_op): Use ax.def.
7722         (gdb_agent_op_names): Likewise.
7723
7724 2011-02-18  Tom Tromey  <tromey@redhat.com>
7725
7726         * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7727         gdb_agent_op_rot>: New constants.
7728         (gdb_agent_op_names): Add pick and roll.
7729         (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7730         cases.
7731
7732 2011-02-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
7733
7734         * aclocal.m4: Regenerated with aclocal-1.11.1.
7735
7736 2011-02-14  Pedro Alves  <pedro@codesourcery.com>
7737
7738         * server.c (handle_qxfer_traceframe_info): New.
7739         (qxfer_packets): Register "traceframe-info".
7740         (handle_query): Report support for qXfer:traceframe-info:read+.
7741         * tracepoint.c (match_blocktype): New.
7742         (traceframe_find_block_type): Rename to ...
7743         (traceframe_walk_blocks): ... this.  Add callback filter argument,
7744         and use it.
7745         (traceframe_find_block_type): New, reimplemented on top of
7746         traceframe_walk_blocks.
7747         (build_traceframe_info_xml): New.
7748         (traceframe_read_info): New.
7749         * server.h (traceframe_read_info): Declare.
7750
7751 2011-02-11  Yao Qi  <yao@codesourcery.com>
7752
7753         * configure.ac: Call AC_PROG_RANLIB.
7754         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
7755         * configure: Regenerate.
7756
7757 2011-02-07  Pedro Alves  <pedro@codesourcery.com>
7758
7759         * server.c (gdb_read_memory): Change return semantics to allow
7760         partial transfers.
7761         (handle_search_memory_1): Adjust.
7762         (process_serial_event) <'m' packet>: Handle partial transfers.
7763         * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7764
7765 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
7766
7767         * regcache.c (init_register_cache): Initialize
7768         regcache->register_status.
7769         (free_register_cache): Release regcache->register_status.
7770         (regcache_cpy): Copy register_status.
7771         (registers_to_string): Print 'x's for unavailable registers.
7772         (supply_register): Mark the register's status valid or
7773         unavailable, depending on whether a buffer was passed in or not.
7774         (supply_register_zeroed): New.
7775         (supply_regblock): Mark the registers' status valid or
7776         unavailable, depending on whether a buffer was passed in or not.
7777         * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7778         (struct regcache): New `register_status' field.
7779         (supply_register_zeroed): Declare.
7780         * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7781         supply_register_zeroed, rather than passing a NULL buffer to
7782         supply_register.
7783         * tracepoint.c (fetch_traceframe_registers): Update comment.
7784
7785 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
7786
7787         * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7788         buffer explicit.
7789
7790 2011-01-25  Pedro Alves  <pedro@codesourcery.com>
7791
7792         * server.h (decode_xfer_write): Change prototype.
7793         * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7794         and don't extract the annex here.
7795         * server.c (decode_xfer_read): Remove `annex' parameter,
7796         and don't extract the annex here.
7797         (decode_xfer): New.
7798         (struct qxfer): New.
7799         (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7800         (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7801         (handle_qxfer_statictrace): New functions, abstracted out from
7802         handle_query, and made to use the struct qxfer interface.
7803         (handle_threads_qxfer_proper): Rename to ...
7804         (handle_qxfer_threads_proper): ... this.
7805         (handle_threads_qxfer): Rename to ...
7806         (handle_qxfer_threads): ... this.  Adjust.
7807         (qxfer_packets): New array.
7808         (handle_qxfer): New function.
7809         (handle_query): Use handle_qxfer.
7810
7811 2011-01-05  Michael Snyder  <msnyder@msnyder-server.eng.vmware.com>
7812
7813         * gdbreplay.c: Shorten lines of >= 80 columns.
7814         * linux-low.c: Ditto.
7815         * linux-ppc-low.c: Ditto.
7816         * linux-s390-low.c: Ditto.
7817         * linux-sparc-low.c: Ditto.
7818         * linux-x86-low.c: Ditto.
7819         * linux-xtensa-low.c: Ditto.
7820         * mem-break.c: Ditto.
7821         * nto-low.c: Ditto.
7822         * regcache.h: Ditto.
7823         * remote-utils.c: Ditto.
7824         * server.c: Ditto.
7825         * server.h: Ditto.
7826         * thread-db.c: Ditto.
7827         * tracepoint.c: Ditto.
7828         * utils.c: Ditto.
7829         * win32-low.h: Ditto.
7830
7831 2011-01-05  Joel Brobecker  <brobecker@adacore.com>
7832
7833         * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7834         update.
7835
7836 2011-01-01  Joel Brobecker  <brobecker@adacore.com>
7837
7838         * server.c (gdbserver_version): Update copyright year in version
7839         output.
7840         * gdbreplay.c (gdbreplay_version): Ditto.
7841
7842 2010-12-29  Jie Zhang  <jie.zhang@analog.com>
7843
7844         * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7845         * linux-bfin-low.c: New file.
7846         * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7847         PT_DATA_ADDR for BFIN targets.
7848         * Makefile.in (SFILES): Add linux-bfin-low.c.
7849         (clean): Remove reg-bfin.c.
7850         (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7851         * README: Mention supported Blackfin targets.
7852
7853 2010-12-23  Mike Frysinger  <vapier@gentoo.org>
7854
7855         * .gitignore: New file.
7856
7857 2010-11-16  Mike Frysinger  <vapier@gentoo.org>
7858
7859         * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7860
7861 2010-10-22  Jie Zhang  <jie@codesourcery.com>
7862
7863         * Makefile.in: Add FLAGS_TO_PASS variable.
7864         (install): Remove dependency of install-only and recursively
7865         invoke make for install-only.
7866
7867 2010-10-04  Doug Evans  <dje@google.com>
7868
7869         * Makefile.in (uninstall): Use $(DESTDIR).
7870
7871 2010-09-24  Pedro Alves  <pedro@codesourcery.com>
7872
7873         PR gdb/11842
7874
7875         * linux-x86-low.c (compat_siginfo_from_siginfo)
7876         (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7877         si_code is < 0.  Check for si_code == SI_TIMER before checking for
7878         si_code < 0.
7879
7880 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
7881
7882         * lynx-i386-low.c: New file.
7883         * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7884
7885 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
7886
7887         * lynx-low.c (ptrace_request_to_str): Remove handling for
7888         request values that have been removed in LynxOS 5.x.
7889
7890 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
7891
7892         * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7893         <ptrace.h>
7894
7895 2010-09-09  Nathan Sidwell  <nathan@codesourcery.com>
7896
7897         * configure.ac: Add --enable-inprocess-agent option.
7898         * configure: Rebuilt.
7899
7900 2010-09-06  Yao Qi  <yao@codesourcery.com>
7901
7902         * linux-low.c (linux_kill): Remove unused variable.
7903         (linux_stabilize_threads): Likewise.
7904         * server.c (start_inferior): Likewise.
7905         (queue_stop_reply_callback): Likewise.
7906         * tracepoint.c (do_action_at_tracepoint): Likewise.
7907
7908 2010-09-06  Yao Qi  <yao@codesourcery.com>
7909
7910         * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7911         on return.
7912
7913 2010-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
7914
7915         * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7916
7917 2010-09-06  Pedro Alves  <pedro@codesourcery.com>
7918
7919         * Makefile.in (install-only): Replace $IPA_DEPFILES with
7920         "$(IPA_DEPFILES)".
7921
7922 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
7923
7924         * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7925         gdbserver/lynx-ppc-low.c: New files.
7926         * Makefile.in (lynx_low_h): New variable.
7927         (lynx-low.o, lynx-ppc-low.o): New rules.
7928         * configure.ac: On LynxOS, link with -lnetinet.
7929         * configure.srv: Add handling of powerpc-*-lynxos* targets.
7930         * configure: regenerate.
7931
7932 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
7933
7934         * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7935         * configure.ac: Add check for vasprintf and vsnprintf.
7936         * configure, config.in: Regenerate.
7937         * server.h (vasprintf, vsnprintf): Add conditional declarations.
7938
7939 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
7940
7941         * gdbreplay.c: Move include of alloca.h up, next to include of
7942         malloc.h.
7943         * server.h: Add include of malloc.h.
7944         * mem-break.c: Remove include of malloc.h.
7945         * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7946
7947 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
7948
7949         * Makefile.in (memmem.o): Build with -Wno-error.
7950
7951 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
7952
7953         * utils.c (xsnprintf): Make non-static.
7954         * server.h: Add xsnprintf declaration.
7955         * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7956         replace calls to snprintf by calls to xsnprintf throughout.
7957
7958 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
7959
7960         * configure.ac: Add configure check for alloca.
7961         * configure, config.in: Regenerate.
7962         * server.h: Include alloca.h if it exists.
7963         * gdbreplay.c: Include alloca.h if it exists.
7964
7965 2010-08-28  Pedro Alves  <pedro@codesourcery.com>
7966
7967         * linux-low.c (__SIGRTMIN): Define if not already defined.
7968         (linux_create_inferior): Check for __ANDROID__ rather than
7969         __SIGRTMIN.
7970         (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7971         are already deferred.
7972         (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7973         (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7974         stopped and already has a pending signal to report.
7975         (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7976         a pending signal to report or is moving out of a jump pad.
7977         (linux_init_signals): Check for __ANDROID__ rather than
7978         __SIGRTMIN.
7979
7980 2010-08-28  Pedro Alves  <pedro@codesourcery.com>
7981
7982         * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7983         debug_threads check.  Avoid a linear search when not doing debug
7984         output.
7985
7986 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
7987
7988         * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7989         (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7990         (struct file_handler) <fd>: Change type to gdb_fildes_t.
7991         (process_event): Change local fd's type to gdb_fildes_t.
7992         (create_file_handler): Adjust prototype.
7993         (delete_file_handler): Adjust prototype.
7994         (handle_file_event): Adjust prototype.  Use pfildes.
7995         (create_file_event): Adjsut prototype.
7996         * remote-utils.c (remote_desc, listen_desc): Change type to
7997         gdb_fildes_t.
7998         * server.h: New gdb_fildes_t typedef.
7999         [USE_WIN32API]: Include winsock2.h.
8000         (delete_file_handler, add_file_handler): Adjust prototypes.
8001         (pfildes): Declare.
8002         * utils.c (pfildes): New.
8003
8004 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
8005
8006         * configure.ac (build_warnings): Add -Wno-char-subscripts.
8007         * configure: Regenerate.
8008
8009 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
8010
8011         * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
8012         (linux_done_accessing_memory): ... this.
8013         (linux_target_ops): Adjust.
8014         * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
8015         * nto-low.c (nto_target_ops): Adjust comment.
8016         * server.c (gdb_read_memory, gdb_write_memory): Adjust.
8017         * spu-low.c (spu_target_ops): Adjust comment.
8018         * target.h (target_ops): Rename unprepare_to_access_memory field
8019         to done_accessing_memory.
8020         (unprepare_to_access_memory): Rename to ...
8021         (done_accessing_memory): ... this.
8022
8023 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
8024
8025         * linux-low.c (linux_prepare_to_access_memory): New.
8026         (linux_unprepare_to_access_memory): New.
8027         (linux_target_ops): Install them.
8028         * server.c (read_memory): Rename to ...
8029         (gdb_read_memory): ... this.  Use
8030         prepare_to_access_memory/prepare_to_access_memory.
8031         (write_memory): Rename to ...
8032         (gdb_write_memory): ... this.  Use
8033         prepare_to_access_memory/prepare_to_access_memory.
8034         (handle_search_memory_1): Adjust.
8035         (process_serial_event): Adjust.
8036         * target.h (struct target_ops): New fields
8037         prepare_to_access_memory and unprepare_to_access_memory.
8038         (prepare_to_access_memory, unprepare_to_access_memory): New.
8039         * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
8040         prepare_to_access_memory/prepare_to_access_memory.
8041         * nto-low.c (nto_target_ops): Adjust.
8042         * spu-low.c (spu_target_ops): Adjust.
8043         * win32-low.c (win32_target_ops): Adjust.
8044
8045 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
8046
8047         * Makefile.in (WARN_CFLAGS): Get it from configure.
8048         (WERROR_CFLAGS): New.
8049         (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
8050         * configure.ac: Introduce --enable-werror, which adds -Werror to
8051         the compiler command line.  Enabled by default.  Disable with
8052         --disable-werror.  Add -Wdeclaration-after-statement
8053         Wpointer-arith and -Wformat-nonliteral to warning flags.
8054         * configure: Regenerate.
8055
8056 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
8057
8058         * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
8059
8060 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
8061
8062         * gdbreplay.c (remote_error): New.
8063         (gdbchar): New.
8064         (expect): Use gdbchar.  Check for error reading from GDB.
8065         Clarify sync error output.
8066         (play): Check for errors writing to GDB.
8067         * linux-low.c (sigchld_handler): Really ignore `write' errors.
8068         * remote-utils.c (getpkt): Check for errors writing to the remote
8069         descriptor.
8070
8071 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
8072
8073         * linux-low.c (linux_wait_1): Move non-debugging code out of
8074         `debug_threads' control.
8075
8076 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
8077
8078         * linux-low.c (linux_wait_1): Don't set last_status here.
8079         * server.c (push_event, queue_stop_reply_callback): Assert we're
8080         not pushing a TARGET_WAITKIND_IGNORE event.
8081         (start_inferior, start_inferior, attach_inferior, handle_v_cont)
8082         (myresume, handle_target_event): Set the thread's last_resume_kind
8083         and last_status from the target returned status.
8084
8085 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
8086
8087         PR threads/10729
8088
8089         * linux-x86-low.c (update_debug_registers_callback): New.
8090         (i386_dr_low_set_addr): Use it.
8091         (i386_dr_low_get_addr): New.
8092         (i386_dr_low_set_control): Use update_debug_registers_callback.
8093         (i386_dr_low_get_control): New.
8094         (i386_dr_low_get_status): Adjust.
8095         * linux-low.c (linux_stop_lwp): New.
8096         * linux-low.h (linux_stop_lwp): Declare.
8097
8098         * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
8099         argument instead of a i386_debug_reg_state.
8100         (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
8101         a i386_debug_reg_state.
8102         (i386_insert_aligned_watchpoint): Adjust.
8103         (i386_remove_aligned_watchpoint): Adjust.
8104         (i386_low_stopped_data_address): Read the debug registers from the
8105         inferior instead of from the mirrors.
8106         * i386-low.h (struct i386_debug_reg_state): Extend comment.
8107         (i386_dr_low_get_addr): Declare.
8108         (i386_dr_low_get_control): Declare.
8109         (i386_dr_low_get_status): Change prototype.
8110
8111         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
8112         (i386_dr_low_get_addr): New.
8113         (i386_dr_low_get_control): New.
8114         (i386_dr_low_get_status): Adjust prototype.  Return
8115         dr_status_mirror.
8116         (i386_initial_stuff): Clear dr_status_mirror and
8117         dr_control_mirror.
8118         (i386_get_thread_context): Adjust.
8119         (i386_set_thread_context): Adjust.
8120         (i386_thread_added): Adjust.
8121
8122 2010-08-24  Pedro Alves  <pedro@codesourcery.com>
8123
8124         * linux-low.h (linux_thread_area): Delete declaration.
8125
8126 2010-08-11  Thomas Schwinge  <thomas@codesourcery.com>
8127
8128         * linux-low.c (linux_wait_1): Correctly return the ptid of the child
8129         after its termination.
8130
8131 2010-08-09  Pedro Alves  <pedro@codesourcery.com>
8132
8133         * linux-low.c (gdb_wants_lwp_stopped): Delete.
8134         (gdb_wants_all_stopped): Delete.
8135         (linux_wait_1): Don't call them.
8136         * server.c (handle_v_cont): Tag all threads as want-stopped.
8137         (gdb_wants_thread_stopped): Fix comments.  Tag the thread that
8138         stopped as "client-wants-stopped".
8139
8140 2010-07-31  Pedro Alves  <pedro@codesourcery.com>
8141
8142         * Makefile.in (signals_h): New.
8143         (server_h): Depend on it.
8144         (server.o): Don't depend on $(signals_def).
8145         (signals.o): Depend on $(signals_def).
8146
8147 2010-07-31  Jan Kratochvil  <jan.kratochvil@redhat.com>
8148
8149         * Makefile.in (signals_def): New.
8150         (server_h): Append include/gdb/signals.h and signals_def.
8151         (server.o): Append signals_def.
8152
8153 2010-07-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
8154
8155         * server.c (handle_target_event): Use target_signal_to_host for
8156         resume_info.sig initialization.
8157         * target.h (struct thread_resume) <sig>: New comment.
8158
8159 2010-07-20  Ozkan Sezer  <sezeroz@gmail.com>
8160
8161         * server.c (handle_query): strcpy() the returned string from paddress()
8162         instead of sprintf().
8163         * utils.c (paddress): Return phex_nz().
8164
8165 2010-07-07  Joel Brobecker  <brobecker@adacore.com>
8166
8167         * server.c (handle_v_cont): Call mourn_inferior if process
8168         just exited.
8169         (myresume): Likewise.
8170
8171 2010-07-01  Pedro Alves  <pedro@codesourcery.com>
8172
8173         Static tracepoints, and integration with UST.
8174
8175         * configure.ac: Handle --with-ust.  substitute ustlibs and ustinc.
8176         * mem-break.c (uninsert_all_breakpoints)
8177         (reinsert_all_breakpoints): New.
8178         * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
8179         * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
8180         (gdb_agent_ust_loaded, helper_thread_id)
8181         (gdb_agent_helper_thread_id): New macros.
8182         (struct ipa_sym_addresses): Add addr_ust_loaded,
8183         addr_helper_thread_id, addr_cmd_buf.
8184         (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
8185         (in_process_agent_loaded_ust): New.
8186         (write_e_ust_not_loaded): New.
8187         (maybe_write_ipa_ust_not_loaded): New.
8188         (struct collect_static_trace_data_action): New.
8189         (enum tracepoint_type) <static_tracepoint>: New.
8190         (struct tracepoint) <handle>: Mention static tracepoints.
8191         (struct static_tracepoint_ctx): New.
8192         (CMD_BUF_SIZE): New.
8193         (add_tracepoint_action): Handle static tracepoint actions.
8194         (unprobe_marker_at): New.
8195         (clear_installed_tracepoints): Handle static tracepoints.
8196         (cmd_qtdp): Handle static tracepoints.
8197         (probe_marker_at): New.
8198         (cmd_qtstart): Handle static tracepoints.
8199         (response_tracepoint): Handle static tracepoints.
8200         (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
8201         (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
8202         (get_context_regcache): Handle static tracepoints.
8203         (do_action_at_tracepoint): Handle static tracepoint actions.
8204         (traceframe_find_block_type): Handle static trace data blocks.
8205         (traceframe_read_sdata): New.
8206         (download_tracepoints): Download static tracepoint actions.
8207         [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
8208         (GDB_PROBE_NAME): New.
8209         (ust_ops): New.
8210         (GET_UST_SYM): New.
8211         (USTF): New.
8212         (dlsym_ust): New.
8213         (ust_marker_to_static_tracepoint): New.
8214         (gdb_probe): New.
8215         (collect_ust_data_at_tracepoint): New.
8216         (gdb_ust_probe): New.
8217         (UNIX_PATH_MAX, SOCK_DIR): New.
8218         (gdb_ust_connect_sync_socket): New.
8219         (resume_thread, stop_thread): New.
8220         (run_inferior_command): New.
8221         (init_named_socket): New.
8222         (gdb_ust_socket_init): New.
8223         (cstr_to_hexstr): New.
8224         (next_st): New.
8225         (first_marker, next_marker): New.
8226         (response_ust_marker): New.
8227         (cmd_qtfstm, cmd_qtsstm): New.
8228         (unprobe_marker_at, probe_marker_at): New.
8229         (cmd_qtstmat, gdb_ust_thread): New.
8230         (gdb_ust_init): New.
8231         (initialize_tracepoint_ftlib): Call gdb_ust_init.
8232         * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
8233         (ST_REGENTRY): New.
8234         (x86_64_st_collect_regmap): New.
8235         (X86_64_NUM_ST_COLLECT_GREGS): New.
8236         (AMD64_RIP_REGNUM): New.
8237         (supply_static_tracepoint_registers): New.
8238         * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
8239         (ST_REGENTRY): New.
8240         (i386_st_collect_regmap): New.
8241         (i386_NUM_ST_COLLECT_GREGS): New.
8242         (supply_static_tracepoint_registers): New.
8243         * server.c (handle_query): Handle qXfer:statictrace:read.
8244         <qSupported>: Report support for StaticTracepoints, and
8245         qXfer:statictrace:read features.
8246         * server.h (traceframe_read_sdata)
8247         (supply_static_tracepoint_registers): Declare.
8248         * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
8249         (unpack_varlen_hex): Include in IPA build.
8250         * Makefile.in (ustlibs, ustinc): New.
8251         (IPA_OBJS): Add remote-utils-ipa.o.
8252         ($(IPA_LIB)): Link -ldl and -lpthread.
8253         (UST_CFLAGS): New.
8254         (IPAGENT_CFLAGS): Add UST_CFLAGS.
8255         * config.in, configure: Regenerate.
8256
8257 2010-06-20  Ian Lance Taylor  <iant@google.com>
8258             Pedro Alves  <pedro@codesourcery.com>
8259
8260         * linux-x86-low.c (always_true): Delete.
8261         (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
8262         trying to fool the compiler with always_true.
8263
8264 2010-06-20  Pedro Alves  <pedro@codesourcery.com>
8265
8266         * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
8267         conditions in gdbserver.
8268
8269 2010-06-19  Ulrich Weigand  <uweigand@de.ibm.com>
8270
8271         * spu-low.c (spu_read_memory): Wrap around local store limit.
8272         (spu_write_memory): Likewise.
8273
8274 2010-06-15  Pedro Alves  <pedro@codesourcery.com>
8275
8276         * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
8277         (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
8278         LONGEST uses.
8279         * server.h (struct emit_ops): Replace int64_t uses with LONGEST
8280         uses.
8281         * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
8282         uses with LONGEST uses.
8283
8284 2010-06-14  Stan Shebs  <stan@codesourcery.com>
8285             Pedro Alves  <pedro@codesourcery.com>
8286
8287         Bytecode compiler.
8288
8289         * linux-x86-low.c: Include limits.h.
8290         (add_insns): New.
8291         (always_true): New.
8292         (EMIT_ASM): New.
8293         (EMIT_ASM32): New.
8294         (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
8295         (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
8296         (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
8297         (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
8298         (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
8299         (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
8300         (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
8301         (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
8302         (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
8303         (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
8304         (amd64_emit_void_call_2): New.
8305         (amd64_emit_ops): New.
8306         (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
8307         (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
8308         (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
8309         (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
8310         (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
8311         (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
8312         (i386_emit_goto, i386_write_goto_address, i386_emit_const)
8313         (i386_emit_call, i386_emit_reg, i386_emit_pop)
8314         (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
8315         (i386_emit_stack_adjust, i386_emit_int_call_1)
8316         (i386_emit_void_call_2): New.
8317         (i386_emit_ops): New.
8318         (x86_emit_ops): New.
8319         (the_low_target): Install x86_emit_ops.
8320         * server.h (struct emit_ops): New.
8321         (get_raw_reg_func_addr): Declare.
8322         (current_insn_ptr, emit_error): Declare.
8323         * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
8324         (set_trace_state_variable_value): New defines.
8325         (struct ipa_sym_addresses): New fields addr_get_raw_reg,
8326         addr_get_trace_state_variable_value and
8327         addr_set_trace_state_variable_value.
8328         (symbol_list): New fields for get_raw_reg,
8329         get_trace_state_variable_value and set_trace_state_variable_value.
8330         (condfn): New typedef.
8331         (struct tracepoint): New field `compiled_cond'.
8332         (do_action_at_tracepoint): Clear compiled_cond.
8333         (get_trace_state_variable_value, set_trace_state_variable_value):
8334         Export in the IPA.
8335         (condition_true_at_tracepoint): If there's a compiled condition,
8336         run that.
8337         (current_insn_ptr, emit_error): New globals.
8338         (struct bytecode_address): New.
8339         (get_raw_reg_func_addr): New.
8340         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
8341         (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
8342         (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
8343         (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
8344         (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
8345         (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
8346         (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
8347         (compile_tracepoint_condition, compile_bytecodes): New.
8348         * target.h (emit_ops): Forward declare.
8349         (struct target_ops): New field emit_ops.
8350         (target_emit_ops): New.
8351         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
8352         * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
8353         * linux-low.c (linux_emit_ops): New.
8354         (linux_target_ops): Install it.
8355         * linux-low.h (struct linux_target_ops): New field emit_ops.
8356
8357 2010-06-14  Ulrich Weigand  <uweigand@de.ibm.com>
8358
8359         * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
8360         * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
8361
8362 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
8363             Stan Shebs  <stan@codesourcery.com>
8364
8365         * Makefile.in (IPA_DEPFILES, extra_libraries): New.
8366         (all): Depend on $(extra_libraries).
8367         (install-only): Install the IPA.
8368         (IPA_OBJS, IPA_LIB): New.
8369         (clean): Remove the IPA lib.
8370         (IPAGENT_CFLAGS): New.
8371         (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
8372         (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
8373         (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
8374         * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
8375         * configure.ac: Check for atomic builtins support in the compiler.
8376         (IPA_DEPFILES, extra_libraries): Define.
8377         * configure.srv (ipa_obj): Add description.
8378         (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
8379         (i[34567]86-*-linux*): Set ipa_obj.
8380         (x86_64-*-linux*): Set ipa_obj.
8381         * linux-low.c (stabilizing_threads): New.
8382         (supports_fast_tracepoints): New.
8383         (linux_detach): Stabilize threads before detaching.
8384         (handle_tracepoints): Handle internal tracing breakpoints.  Assert
8385         the lwp is either not stabilizing, or is moving out of a jump pad.
8386         (linux_fast_tracepoint_collecting): New.
8387         (maybe_move_out_of_jump_pad): New.
8388         (enqueue_one_deferred_signal): New.
8389         (dequeue_one_deferred_signal): New.
8390         (linux_wait_for_event_1): If moving out of a jump pad, defer
8391         pending signals to later.
8392         (linux_stabilize_threads): New.
8393         (linux_wait_1): Check if threads need moving out of jump pads, and
8394         do it if so.
8395         (stuck_in_jump_pad_callback): New.
8396         (move_out_of_jump_pad_callback): New.
8397         (lwp_running): New.
8398         (linux_resume_one_lwp): Handle moving out of jump pads.
8399         (linux_set_resume_request): Dequeue deferred signals.
8400         (need_step_over_p): Also step over fast tracepoint jumps.
8401         (start_step_over): Also uninsert fast tracepoint jumps.
8402         (finish_step_over): Also reinsert fast tracepoint jumps.
8403         (linux_install_fast_tracepoint_jump): New.
8404         (linux_target_ops): Install linux_stabilize_threads and
8405         linux_install_fast_tracepoint_jump_pad.
8406         * linux-low.h (linux_target_ops) <get_thread_area,
8407         install_fast_tracepoint_jump_pad>: New fields.
8408         (struct lwp_info) <collecting_fast_tracepoint,
8409         pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
8410         (linux_get_thread_area): Declare.
8411         * linux-x86-low.c (jump_insn): New.
8412         (x86_get_thread_area): New.
8413         (append_insns): New.
8414         (push_opcode): New.
8415         (amd64_install_fast_tracepoint_jump_pad): New.
8416         (i386_install_fast_tracepoint_jump_pad): New.
8417         (x86_install_fast_tracepoint_jump_pad): New.
8418         (the_low_target): Install x86_get_thread_area and
8419         x86_install_fast_tracepoint_jump_pad.
8420         * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
8421         (struct fast_tracepoint_jump): New.
8422         (fast_tracepoint_jump_insn): New.
8423         (fast_tracepoint_jump_shadow): New.
8424         (find_fast_tracepoint_jump_at): New.
8425         (fast_tracepoint_jump_here): New.
8426         (delete_fast_tracepoint_jump): New.
8427         (set_fast_tracepoint_jump): New.
8428         (uninsert_fast_tracepoint_jumps_at): New.
8429         (reinsert_fast_tracepoint_jumps_at): New.
8430         (set_breakpoint_at): Use write_inferior_memory.
8431         (uninsert_raw_breakpoint): Use write_inferior_memory.
8432         (check_mem_read): Mask out fast tracepoint jumps.
8433         (check_mem_write): Mask out fast tracepoint jumps.
8434         * mem-break.h (struct fast_tracepoint_jump): Forward declare.
8435         (set_fast_tracepoint_jump): Declare.
8436         (delete_fast_tracepoint_jump)
8437         (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
8438         (reinsert_fast_tracepoint_jumps_at): Declare.
8439         * regcache.c: Don't compile many functions when building the
8440         in-process agent library.
8441         (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
8442         the register buffer in the heap.
8443         (free_register_cache): If the register buffer isn't owned by the
8444         regcache, don't free it.
8445         (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
8446         pre-existing register caches.
8447         * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
8448         type.
8449         (convert_ascii_to_int): : Constify `from' parameter type.
8450         (decode_M_packet, decode_X_packet): Replace the `to' parameter by
8451         a `to_p' pointer to pointer parameter.  If TO_P is NULL, malloc
8452         the needed buffer in-place.
8453         (relocate_instruction): New.
8454         * server.c (handle_query) <qSymbols>: If the target supports
8455         tracepoints, give it a chance of looking up symbols.  Report
8456         support for fast tracepoints.
8457         (handle_status): Stabilize threads.
8458         (process_serial_event): Adjust.
8459         * server.h (struct fast_tracepoint_jump): Forward declare.
8460         (struct process_info) <fast_tracepoint_jumps>: New field.
8461         (convert_ascii_to_int, convert_int_to_ascii): Adjust.
8462         (decode_X_packet, decode_M_packet): Adjust.
8463         (relocate_instruction): Declare.
8464         (in_process_agent_loaded): Declare.
8465         (tracepoint_look_up_symbols): Declare.
8466         (struct fast_tpoint_collect_status): Declare.
8467         (fast_tracepoint_collecting): Declare.
8468         (force_unlock_trace_buffer): Declare.
8469         (handle_tracepoint_bkpts): Declare.
8470         (initialize_low_tracepoint)
8471         (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
8472         * target.h (struct target_ops) <stabilize_threads,
8473         install_fast_tracepoint_jump_pad>: New fields.
8474         (stabilize_threads, install_fast_tracepoint_jump_pad): New.
8475         * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
8476         [HAVE_STDINT_H]: Include stdint.h.
8477         (trace_debug_1): Rename to ...
8478         (trace_vdebug): ... this.
8479         (trace_debug): Rename to ...
8480         (trace_debug_1): ... this.  Add `level' parameter.
8481         (trace_debug): New.
8482         (ATTR_USED, ATTR_NOINLINE): New.
8483         (IP_AGENT_EXPORT): New.
8484         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8485         (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
8486         (about_to_request_buffer_space, trace_buffer_is_full)
8487         (stopping_tracepoint, expr_eval_result, error_tracepoint)
8488         (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
8489         (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
8490         (traceframe_write_count, traceframes_created)
8491         (trace_state_variables)
8492         New renaming defines.
8493         (struct ipa_sym_addresses): New.
8494         (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
8495         (symbol_list): New.
8496         (ipa_sym_addrs): New.
8497         (all_tracepoint_symbols_looked_up): New.
8498         (in_process_agent_loaded): New.
8499         (write_e_ipa_not_loaded): New.
8500         (maybe_write_ipa_not_loaded): New.
8501         (tracepoint_look_up_symbols): New.
8502         (debug_threads) [IN_PROCESS_AGENT]: New.
8503         (read_inferior_memory) [IN_PROCESS_AGENT]: New.
8504         (UNKNOWN_SIDE_EFFECTS): New.
8505         (stop_tracing): New.
8506         (flush_trace_buffer): New.
8507         (stop_tracing_bkpt): New.
8508         (flush_trace_buffer_bkpt): New.
8509         (read_inferior_integer): New.
8510         (read_inferior_uinteger): New.
8511         (read_inferior_data_pointer): New.
8512         (write_inferior_data_pointer): New.
8513         (write_inferior_integer): New.
8514         (write_inferior_uinteger): New.
8515         (struct collect_static_trace_data_action): Delete.
8516         (enum tracepoint_type): New.
8517         (struct tracepoint) <type>: New field `type'.
8518         <actions_str, step_actions, step_actions_str>: Only include in
8519         GDBserver.
8520         <orig_size, obj_addr_on_target, adjusted_insn_addr>
8521         <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
8522         (tracepoints): Use IP_AGENT_EXPORT.
8523         (last_tracepoint): Don't include in the IPA.
8524         (stopping_tracepoint): Use IP_AGENT_EXPORT.
8525         (trace_buffer_is_full): Use IP_AGENT_EXPORT.
8526         (alloced_trace_state_variables): New.
8527         (trace_state_variables): Use IP_AGENT_EXPORT.
8528         (traceframe_t): Delete unused variable.
8529         (circular_trace_buffer): Don't include in the IPA.
8530         (trace_buffer_start): Delete.
8531         (struct trace_buffer_control): New.
8532         (trace_buffer_free): Delete.
8533         (struct ipa_trace_buffer_control): New.
8534         (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
8535         (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
8536         New.
8537         (trace_buffer_ctrl): New.
8538         (TRACE_BUFFER_CTRL_CURR): New.
8539         (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
8540         Reimplement as macros.
8541         (trace_buffer_wrap): Delete.
8542         (traceframe_write_count, traceframe_read_count)
8543         (traceframes_created, tracing): Use IP_AGENT_EXPORT.
8544         (struct tracepoint_hit_ctx) <type>: New field.
8545         (struct fast_tracepoint_ctx): New.
8546         (memory_barrier): New.
8547         (cmpxchg): New.
8548         (record_tracepoint_error): Update atomically in the IPA.
8549         (clear_inferior_trace_buffer): New.
8550         (about_to_request_buffer_space): New.
8551         (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
8552         updating the same buffer.
8553         (add_tracepoint): Default the tracepoint's type to trap
8554         tracepoint, and orig_size to -1.
8555         (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
8556         internal variables.
8557         (create_trace_state_variable): New parameter `gdb'.  Handle it.
8558         (clear_installed_tracepoints): Clear fast tracepoint jumps.
8559         (cmd_qtdp): Handle fast tracepoints.
8560         (cmd_qtdv): Adjust.
8561         (max_jump_pad_size): New.
8562         (gdb_jump_pad_head): New.
8563         (get_jump_space_head): New.
8564         (claim_jump_space): New.
8565         (sort_tracepoints): New.
8566         (MAX_JUMP_SIZE): New.
8567         (cmd_qtstart): Handle fast tracepoints.  Sync tracepoints with the
8568         IPA.
8569         (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
8570         support.  Upload fast traceframes, and delete internal IPA
8571         breakpoints.
8572         (stop_tracing_handler): New.
8573         (flush_trace_buffer_handler): New.
8574         (cmd_qtstop): Upload fast tracepoints.
8575         (response_tracepoint): Handle fast tracepoints.
8576         (tracepoint_finished_step): Upload fast traceframes.  Set the
8577         tracepoint hit context's tracepoint type.
8578         (handle_tracepoint_bkpts): New.
8579         (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
8580         type.  Add comment about fast tracepoints.
8581         (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
8582         non-existing action_str field.
8583         (get_context_regcache): Handle fast tracepoints.
8584         (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
8585         to the regcache.
8586         (fast_tracepoint_from_jump_pad_address): New.
8587         (fast_tracepoint_from_ipa_tpoint_address): New.
8588         (collecting_t): New.
8589         (force_unlock_trace_buffer): New.
8590         (fast_tracepoint_collecting): New.
8591         (collecting): New.
8592         (gdb_collect): New.
8593         (write_inferior_data_ptr): New.
8594         (target_tp_heap): New.
8595         (target_malloc): New.
8596         (download_agent_expr): New.
8597         (UALIGN): New.
8598         (download_tracepoints): New.
8599         (download_trace_state_variables): New.
8600         (upload_fast_traceframes): New.
8601         (IPA_FIRST_TRACEFRAME): New.
8602         (IPA_NEXT_TRACEFRAME_1): New.
8603         (IPA_NEXT_TRACEFRAME): New.
8604         [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
8605         [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
8606         (gdb_jump_pad_buffer_end): New.
8607         [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
8608         (initialize_tracepoint): Adjust.
8609         [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
8610         buffer.  Initialize the low module.
8611         * utils.c (PREFIX, TOOLNAME): New.
8612         (malloc_failure): Use PREFIX.
8613         (error): In the IPA, an error causes an exit.
8614         (fatal, warning): Use PREFIX.
8615         (internal_error): Use TOOLNAME.
8616         (NUMCELLS): Increase to 10.
8617         * configure, config.in: Regenerate.
8618
8619 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
8620
8621         * server.c (handle_query) <qSupported>: Do two passes over the
8622         qSupported string to avoid nesting strtok.
8623
8624 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
8625
8626         * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
8627         (CDEPS): New.
8628         * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping.  Test also
8629         -Wl,--dynamic-list.
8630         * configure: Regenerate.
8631         * proc-service.list: New.
8632
8633 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
8634
8635         * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
8636         New comment.
8637
8638 2010-05-26  Ozkan Sezer  <sezeroz@gmail.com>
8639
8640         * gdbreplay.c (remote_open): Check error return from socket() call by
8641         its equality to -1 not by it being negative.
8642         * remote-utils.c (remote_open): Likewise.
8643
8644 2010-05-23  Pedro Alves  <pedro@codesourcery.com>
8645
8646         * config.h: Regenerate.
8647
8648 2010-05-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
8649
8650         * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8651         doesn't provide PTRACE_GET_THREAD_AREA.
8652
8653 2010-05-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
8654
8655         * linux-m68k-low.c: Include <asm/ptrace.h>
8656         (ps_get_thread_area): Implement.
8657
8658 2010-05-03  Doug Evans  <dje@google.com>
8659
8660         * event-loop.c (struct callback_event): New struct.
8661         (callback_list): New global.
8662         (append_callback_event, delete_callback_event): New functions.
8663         (process_callback): New function.
8664         (start_event_loop): Call it.
8665         * remote-utils.c (NOT_SCHEDULED): Define.
8666         (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8667         moved out of readchar.
8668         (readchar): Rewrite.  Call reschedule before returning.
8669         (reset_readchar): New function.
8670         (remote_close): Call it.
8671         (process_remaining, reschedule): New functions.
8672         * server.h (callback_handler_func): New typedef.
8673         (append_callback_event, delete_callback_event): Declare.
8674
8675 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
8676
8677         * proc-service.c (ps_pglobal_lookup): Use
8678         thread_db_look_up_one_symbol.
8679         * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8680         parameter.  Use it instead of all_symbols_looked_up.
8681         * server.h (struct process_info) <all_symbols_looked_up>: Delete
8682         field.
8683         (all_symbols_looked_up): Don't declare.
8684         (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8685         * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8686         field.
8687         (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8688         Set all_symbols_looked_up here.
8689         (thread_db_look_up_one_symbol): New.
8690         (thread_db_get_tls_address): Adjust.
8691         (thread_db_load_search, try_thread_db_load_1): Always allocate the
8692         thread_db object on the heap, and tentatively set it in the
8693         process structure.
8694         (thread_db_init): Don't set all_symbols_looked_up here.
8695         * linux-low.h (thread_db_look_up_one_symbol): Declare.
8696
8697 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
8698
8699         * linux-low.c (linux_kill, linux_detach): Adjust.
8700         (status_pending_p_callback): Remove redundant statement.  Check
8701         for !TARGET_WAITIKIND_IGNORE, instead of
8702         TARGET_WAITKIND_STOPPED.
8703         (handle_tracepoints): Make sure LWP is locked.  Adjust.
8704         (linux_wait_for_event_1): Adjust.
8705         (linux_cancel_breakpoints): New.
8706         (unsuspend_one_lwp): New.
8707         (unsuspend_all_lwps): New.
8708         (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8709         (send_sigstop_callback): Change return type to int, add new
8710         `except' parameter and handle it.
8711         (suspend_and_send_sigstop_callback): New.
8712         (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8713         pass them down.  If SUSPEND, also increment the lwp's suspend
8714         count.
8715         (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8716         (need_step_over_p): Don't consider suspended LWPs.
8717         (start_step_over): Adjust.
8718         (proceed_one_lwp): Change return type to int, add new `except'
8719         parameter and handle it.
8720         (unsuspend_and_proceed_one_lwp): New.
8721         (proceed_all_lwps): Use find_inferior instead of
8722         for_each_inferior.
8723         (unstop_all_lwps): Add `unsuspend' parameter.  If UNSUSPEND, them
8724         also decrement the suspend count of LWPs.  Pass `except' down,
8725         instead of hacking its suspend count.
8726         (linux_pause_all): Add `freeze' parameter.  Adjust.
8727         (linux_unpause_all): New.
8728         (linux_target_ops): Install linux_unpause_all.
8729         * server.c (handle_status): Adjust.
8730         * target.h (struct target_ops): New fields `unpause_all' and
8731         `cancel_breakpoints'.  Add new parameter to `pause_all'.
8732         (pause_all): Add new `freeze' parameter.
8733         (unpause_all): New.
8734         (cancel_breakpoints): New.
8735         * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8736         cancel breakpoints.
8737         (cmd_qtstart): Pause threads.
8738         (stop_tracing): Pause threads, and cancel breakpoints.
8739         * win32-low.c (win32_target_ops): Adjust.
8740
8741 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
8742
8743         * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8744         the inferior right away from here...
8745         (linux_wait_1): ... to here, and adjust to check the thread's
8746         last_resume_kind instead of the lwp's step or stop_expected flags.
8747
8748 2010-05-02  Pedro Alves  <pedro@codesourcery.com>
8749
8750         * README: Use consistent `GDB' and `GDBserver' spellings.
8751
8752 2010-05-02  Pedro Alves  <pedro@codesourcery.com>
8753
8754         * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8755         (linux_kill): Stop all lwps here.  Don't delete the main lwp here.
8756         (linux_detach_one_lwp): Assume the lwp is stopped.
8757         (any_thread_of): Delete.
8758         (linux_detach): Stop all lwps here.  Don't blindly delete all
8759         breakpoints.
8760         (delete_lwp_callback): New.
8761         (linux_mourn): Delete all lwps of the process that is gone.
8762         (linux_wait_1): Don't delete the last lwp of the process here.
8763         * mem-break.h (mark_breakpoints_out): Declare.
8764         * mem-break.c (mark_breakpoints_out): New.
8765         (free_all_breakpoints): Use it.
8766         * server.c (handle_target_event): If the process is gone, mark
8767         breakpoints out.
8768         * thread-db.c (struct thread_db) <create_bp>: New field.
8769         (thread_db_enable_reporting): Fix prototype.  Store a thread event
8770         breakpoint reference in the thread_db struct.
8771         (thread_db_load_search): Clear the thread_db object.
8772         (try_thread_db_load_1): Ditto.
8773         (switch_to_process): New.
8774         (disable_thread_event_reporting): Use it.
8775         (remove_thread_event_breakpoints): New.
8776         (thread_db_detach, thread_db_mourn): Use it.
8777
8778 2010-05-01  Pedro Alves  <pedro@codesourcery.com>
8779
8780         * linux-low.c (linux_enable_event_reporting): New.
8781         (linux_wait_for_event_1, handle_extended_wait): Use it.
8782
8783 2010-04-30  Pedro Alves  <pedro@codesourcery.com>
8784
8785         * linux-low.c (linux_kill_one_lwp, linux_kill)
8786         (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8787         (send_sigstop): Take an lwp_info as parameter instead.  Queue a
8788         SIGSTOP even if the LWP is stopped.
8789         (send_sigstop_callback): New.
8790         (stop_all_lwps): Use send_sigstop_callback instead.
8791         (linux_resume_one_thread): Adjust.
8792         (proceed_one_lwp): Still proceed an LWP that the client has
8793         requested to stop, if we haven't reported it as stopped yet.  Make
8794         sure that LWPs the client want stopped, have a pending SIGSTOP.
8795
8796 2010-04-26  Doug Evans  <dje@google.com>
8797
8798         * server.c (handle_general_set): Make static.
8799
8800         * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8801         Print received char after testing for error/eof instead of before.
8802         (input_interrupt): Tweak comment.
8803
8804 2010-04-23  Doug Evans  <dje@google.com>
8805
8806         * server.c (start_inferior): Print inferior argv if --debug.
8807
8808 2010-04-21  Aleksandar Ristovski  <aristovski@qnx.com>
8809
8810         * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8811         * nto-x86-low.c: Include server.h
8812
8813 2010-04-20  Pierre Muller  <muller@ics.u-strasbg.fr>
8814
8815         * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8816         be consistent with other sources of this directory.
8817         (init_registers_amd64): Correct name of source file of this function
8818         in the comment.
8819
8820 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
8821
8822         * configure.srv (x86_64-*-mingw*): New configuration for Windows
8823         64-bit executables.
8824
8825 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
8826
8827         * win32-i386-low.c: Add 64-bit support.
8828         (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8829         (init_registers_amd64): Declare.
8830         (mappings): Add 64-bit version of array.
8831         (init_windows_x86): New function.
8832         (the_low_target): Change init_arch field to init_windows_x86.
8833
8834 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
8835
8836         * win32-low.c: Adapt to support also 64-bit architecture.
8837         (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8838         (get_image_name): Use SIZE_T type for local variable `done'.
8839         (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8840         (toolhelp_get_dll_name): Idem.
8841         (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8842         Use uintptr_t typecast to avoid warning.
8843         (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8844         (handle_exception): Use phex_nz to avoid warning.
8845         (win32_wait): Remove unused local variable `process'.
8846
8847 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
8848
8849         * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8850         `amd64-avx.o'.
8851
8852 2010-04-17  Pierre Muller  <muller@ics.u-strasbg.fr>
8853
8854         * configure.ac: Use `ws2_32' library for srv_mingw.
8855         * configure: Regenerate.
8856         * gdbreplay.c: Include winsock2.h instead of winsock.h.
8857         * remote-utils.c: Likewise.
8858
8859 2010-04-17  H.J. Lu  <hongjiu.lu@intel.com>
8860
8861         * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8862         if __x86_64__ is defined.
8863
8864 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
8865
8866         * configure: Regenerate.
8867
8868 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
8869
8870         * server.c (handle_query): Handle 'qGetTIBAddr' query.
8871         * target.h (target_ops): New get_tib_address field.
8872         * win32-low.h (win32_thread_info): Add thread_local_base field.
8873         * win32-low.c (child_add_thread): Add tlb argument.
8874         Set thread_local_base field to TLB.
8875         (get_child_debug_event): Adapt to child_add_thread change.
8876         (win32_get_tib_address): New function.
8877         (win32_target_ops): Set get_tib_address field to
8878         win32_get_tib_address.
8879         * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8880
8881 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
8882
8883         * linux-low.c (linux_mourn): Also remove the process.
8884         * server.c (handle_target_event): Don't remove the process here.
8885         * nto-low.c (nto_mourn): New.
8886         (nto_target_ops): Install it.
8887         * spu-low.c (spu_mourn): New.
8888         (spu_target_ops): Install it.
8889         * win32-low.c (win32_mourn): New.
8890         (win32_target_ops): Install it.
8891
8892 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
8893
8894         * server.h (buffer_xml_printf): Remove redundant `;'.
8895
8896 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
8897
8898         * regcache.c (set_register_cache): Invalidate regcaches before
8899         changing the register cache layout.
8900         (regcache_invalidate_one): Allow a NULL regcache.
8901         * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8902         regcaches before changing the register cache layout or the target
8903         regsets.
8904
8905 2010-04-12  H.J. Lu  <hongjiu.lu@intel.com>
8906
8907         * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8908         variable warning on Linux/x86-64.
8909
8910 2010-04-11  Pedro Alves  <pedro@codesourcery.com>
8911
8912         GDBserver disconnected tracing support.
8913
8914         * linux-low.c (linux_remove_process): Delete.
8915         (add_lwp): Don't set last_resume_kind here.
8916         (linux_kill): Use `mourn'.
8917         (linux_detach): Use `thread_db_detach', and `mourn'.
8918         (linux_mourn): New.
8919         (linux_attach_lwp_1): Adjust comment.
8920         (linux_attach): last_resume_kind moved the thread_info; adjust.
8921         (status_pending_p_callback): Adjust.
8922         (linux_wait_for_event_1): Adjust.
8923         (count_events_callback, select_singlestep_lwp_callback)
8924         (select_event_lwp_callback, cancel_breakpoints_callback)
8925         (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8926         (proceed_one_lwp): Adjust.
8927         (linux_async): Add debug output.
8928         (linux_thread_stopped): New.
8929         (linux_pause_all): New.
8930         (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8931         linux_pause_all.
8932         * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8933         (thread_db_free): Delete declaration.
8934         (thread_db_detach, thread_db_mourn): Declare.
8935         * thread-db.c (thread_db_init): Use thread_db_mourn.
8936         (thread_db_free): Delete, split in two.
8937         (disable_thread_event_reporting): New.
8938         (thread_db_detach): New.
8939         (thread_db_mourn): New.
8940
8941         * server.h (struct thread_info) <last_resume_kind>: New field.
8942         <attached>: Add comment.
8943         <gdb_detached>: New field.
8944         (handler_func): Change return type to int.
8945         (handle_serial_event, handle_target_event): Ditto.
8946         (gdb_connected): Declare.
8947         (tracing): Delete.
8948         (disconnected_tracing): Declare.
8949         (stop_tracing): Declare.
8950
8951         * server.c (handle_query) <qSupported>: Report support for
8952         disconnected tracing.
8953         (queue_stop_reply_callback): Account for running threads.
8954         (gdb_wants_thread_stopped): New.
8955         (gdb_wants_all_threads_stopped): New.
8956         (gdb_reattached_process): New.
8957         (handle_status): Clear the `gdb_detached' flag of all processes.
8958         In all-stop, stop all threads.
8959         (main): Be sure to leave tfind mode.  Handle disconnected tracing.
8960         (process_serial_event): If the remote connection breaks, or if an
8961         exit was forced with "monitor exit", force an event loop exit.
8962         Handle disconnected tracing on detach.
8963         (handle_serial_event): Adjust.
8964         (handle_target_event): If GDB isn't connected, forward events back
8965         to the inferior, unless the last process exited, in which case,
8966         exit gdbserver.  Adjust interface.
8967
8968         * remote-utils.c (remote_open): Don't block in accept.  Instead
8969         register an event loop source on the listen socket file
8970         descriptor.  Refactor bits into ...
8971         (listen_desc): ... this new global.
8972         (gdb_connected): ... this new function.
8973         (enable_async_notification): ... this new function.
8974         (handle_accept_event): ... this new function.
8975         (remote_close): Clear remote_desc.
8976
8977         * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8978
8979         * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8980         New fields.
8981         (mourn_inferior): Define.
8982         (target_process_qsupported): Avoid the dangling else problem.
8983         (thread_stopped): Define.
8984         (pause_all): Define.
8985         (target_waitstatus_to_string): Declare.
8986         * target.c (target_waitstatus_to_string): New.
8987
8988         * tracepoint.c (tracing): Make extern.
8989         (disconnected_tracing): New.
8990         (stop_tracing): Make extern.  Handle tracing stops due to GDB
8991         disconnecting.
8992         (cmd_qtdisconnected): New.
8993         (cmd_qtstatus): Report disconnected tracing status in trace reply.
8994         (handle_tracepoint_general_set): Handle QTDisconnected.
8995
8996         * event-loop.c (event_handler_func): Change return type to int.
8997         (process_event): Bail out if the event handler wants the event
8998         loop to stop.
8999         (handle_file_event): Ditto.
9000         (start_event_loop): Bail out if the event handler wants the event
9001         loop to stop.
9002
9003         * nto-low.c (nto_target_ops): Adjust.
9004         * spu-low.c (spu_wait): Don't remove the process here.
9005         (spu_target_ops): Adjust.
9006         * win32-low.c (win32_wait): Don't remove the process here.
9007         (win32_target_ops): Adjust.
9008
9009 2010-04-11  Pedro Alves  <pedro@codesourcery.com>
9010
9011         * regcache.c (realloc_register_cache): Invalidate inferior's
9012         regcache before recreating it.
9013
9014 2010-04-09  Pedro Alves  <pedro@codesourcery.com>
9015
9016         * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
9017
9018 2010-04-09  Stan Shebs  <stan@codesourcery.com>
9019             Pedro Alves  <pedro@codesourcery.com>
9020
9021         * server.h (LONGEST): New.
9022         (struct thread_info) <while_stepping>: New field.
9023         (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
9024         Declare.
9025         (initialize_tracepoint, handle_tracepoint_general_set)
9026         (handle_tracepoint_query, tracepoint_finished_step)
9027         (tracepoint_was_hit, release_while_stepping_state_list):
9028         (current_traceframe): Declare.
9029         * server.c (handle_general_set): Handle tracepoint packets.
9030         (read_memory): New.
9031         (write_memory): New.
9032         (handle_search_memory_1): Use read_memory.
9033         (handle_query): Report support for conditional tracepoints, trace
9034         state variables, and tracepoint sources.  Handle tracepoint
9035         queries.
9036         (main): Initialize the tracepoints module.
9037         (process_serial_event): Handle traceframe reads/writes.
9038
9039         * linux-low.c (handle_tracepoints): New.
9040         (linux_wait_1): Call it.
9041         (linux_resume_one_lwp): Handle while-stepping.
9042         (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
9043         (linux_target_ops): Install them.
9044         * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
9045         New field.
9046         * linux-x86-low.c (x86_supports_tracepoints): New.
9047         (the_low_target). Install it.
9048
9049         * mem-break.h (delete_breakpoint): Declare.
9050         * mem-break.c (delete_breakpoint): Make external.
9051
9052         * target.h (struct target_ops): Add `supports_tracepoints',
9053         `read_pc', and `write_pc' fields.
9054         (target_supports_tracepoints): Define.
9055         * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
9056         (phex_nz): New.
9057
9058         * regcache.h (struct regcache) <registers_owned>: New field.
9059         (init_register_cache, regcache_cpy): Declare.
9060         (regcache_read_pc, regcache_write_pc): Declare.
9061         (register_cache_size): Declare.
9062         (supply_regblock): Declare.
9063         * regcache.c (init_register_cache): New.
9064         (new_register_cache): Use it.
9065         (regcache_cpy): New.
9066         (register_cache_size): New.
9067         (supply_regblock): New.
9068         (regcache_read_pc, regcache_write_pc): New.
9069
9070         * tracepoint.c: New.
9071
9072         * Makefile.in (OBS): Add tracepoint.o.
9073         (tracepoint.o): New rule.
9074
9075 2010-04-08  H.J. Lu  <hongjiu.lu@intel.com>
9076
9077         * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
9078         (i386-mmx.o): New.
9079         (i386-mmx.c): Likewise.
9080         (i386-mmx-linux.o): Likewise.
9081         (i386-mmx-linux.c): Likewise.
9082
9083         * configure.srv (srv_i386_regobj): Add i386-mmx.o.
9084         (srv_i386_linux_regobj): Add i386-mmx-linux.o.
9085         (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
9086         (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
9087
9088         * linux-x86-low.c (init_registers_i386_mmx_linux): New.
9089         (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
9090         and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
9091
9092 2010-04-07  H.J. Lu  <hongjiu.lu@intel.com>
9093
9094         * Makefile.in (clean): Updated.
9095         (i386-avx.o): New.
9096         (i386-avx.c): Likewise.
9097         (i386-avx-linux.o): Likewise.
9098         (i386-avx-linux.c): Likewise.
9099         (amd64-avx.o): Likewise.
9100         (amd64-avx.c): Likewise.
9101         (amd64-avx-linux.o): Likewise.
9102         (amd64-avx-linux.c): Likewise.
9103
9104         * configure.srv (srv_i386_regobj): Add i386-avx.o.
9105         (srv_i386_linux_regobj): Add i386-avx-linux.o.
9106         (srv_amd64_regobj): Add amd64-avx.o.
9107         (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
9108         (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
9109         (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
9110         (srv_i386_xmlfiles): Add i386/i386-avx.xml.
9111         (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
9112         (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
9113         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
9114
9115         * i387-fp.c: Include "i386-xstate.h".
9116         (i387_xsave): New.
9117         (i387_cache_to_xsave): Likewise.
9118         (i387_xsave_to_cache): Likewise.
9119         (x86_xcr0): Likewise.
9120
9121         * i387-fp.h (i387_cache_to_xsave): Likewise.
9122         (i387_xsave_to_cache): Likewise.
9123         (x86_xcr0): Likewise.
9124
9125         * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
9126         * linux-crisv32-low.c (target_regsets): Likewise.
9127         * linux-m68k-low.c (target_regsets): Likewise.
9128         * linux-mips-low.c (target_regsets): Likewise.
9129         * linux-ppc-low.c (target_regsets): Likewise.
9130         * linux-s390-low.c (target_regsets): Likewise.
9131         * linux-sh-low.c (target_regsets): Likewise.
9132         * linux-sparc-low.c (target_regsets): Likewise.
9133         * linux-xtensa-low.c (target_regsets): Likewise.
9134
9135         * linux-low.c: Include <sys/uio.h>.
9136         (regsets_fetch_inferior_registers): Support nt_type.
9137         (regsets_store_inferior_registers): Likewise.
9138         (linux_process_qsupported): New.
9139         (linux_target_ops): Add linux_process_qsupported.
9140
9141         * linux-low.h (regset_info): Add nt_type.
9142         (linux_target_ops): Add process_qsupported.
9143
9144         * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
9145         and <sys/uio.h>.
9146         (init_registers_i386_avx_linux): New.
9147         (init_registers_amd64_avx_linux): Likewise.
9148         (xmltarget_i386_linux_no_xml): Likewise.
9149         (xmltarget_amd64_linux_no_xml): Likewise.
9150         (PTRACE_GETREGSET): Likewise.
9151         (PTRACE_SETREGSET): Likewise.
9152         (x86_fill_xstateregset): Likewise.
9153         (x86_store_xstateregset): Likewise.
9154         (use_xml): Likewise.
9155         (x86_linux_update_xmltarget): Likewise.
9156         (x86_linux_process_qsupported): Likewise.
9157         (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
9158         (x86_arch_setup): Don't call init_registers_amd64_linux nor
9159         init_registers_i386_linux here.  Call
9160         x86_linux_update_xmltarget.
9161         (the_low_target): Add x86_linux_process_qsupported.
9162
9163         * server.c (handle_query): Call target_process_qsupported.
9164
9165         * target.h (target_ops): Add process_qsupported.
9166         (target_process_qsupported): New.
9167
9168 2010-04-03  Pedro Alves  <pedro@codesourcery.com>
9169
9170         * inferiors.c (add_thread): Set last_status kind to
9171         TARGET_WAITKIND_IGNORE.
9172         * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
9173         fetch.  Use ptid_of.  Avoid unnecessary get_lwp_thread calls.
9174         (linux_wait_1): Move `thread' local definition to block that uses
9175         it.  Don't NULL initialize `event_child'.
9176         (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
9177         Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
9178         * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
9179
9180 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
9181
9182         * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
9183         an extended waitstatus, or by a watchpoint.
9184         (cancel_breakpoints_callback): Don't cancel a breakpoint if the
9185         thread was stepping or has been stopped by a watchpoint.
9186
9187 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
9188
9189         * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
9190         (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
9191         of another, then delete the previous, and validate all
9192         breakpoints.
9193         (validate_inserted_breakpoint): New.
9194         (delete_disabled_breakpoints): New.
9195         (validate_breakpoints): New.
9196         (check_mem_read): Validate breakpoints before trusting their
9197         shadow.  Delete disabled breakpoints.
9198         (check_mem_write): Validate breakpoints before trusting they
9199         should be inserted.  Delete disabled breakpoints.
9200         * mem-break.h (validate_breakpoints):
9201         * server.c (handle_query): Validate breakpoints when we see a
9202         qSymbol query.
9203
9204 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
9205
9206         * linux-low.c (linux_wait_1): Avoid setting need_step_over is
9207         there's a GDB breakpoint at stop_pc.  Always report a trap to GDB
9208         if we could tell there's a GDB breakpoint at stop_pc.
9209         (need_step_over_p): Don't do a step over if we find a GDB
9210         breakpoint at the resume PC.
9211
9212         * mem-break.c (struct raw_breakpoint): New.
9213         (enum bkpt_type): New type `gdb_breakpoint'.
9214         (struct breakpoint): Delete the `PC', `old_data' and `inserted'
9215         fields.  New field `raw'.
9216         (find_raw_breakpoint_at): New.
9217         (set_raw_breakpoint_at): Handle refcounting.  Create a raw
9218         breakpoint instead.
9219         (set_breakpoint_at): Adjust.
9220         (delete_raw_breakpoint): New.
9221         (release_breakpoint): New.
9222         (delete_breakpoint): Rename to...
9223         (delete_breakpoint_1): ... this.  Add proc parameter.  Use
9224         release_breakpoint.  Return ENOENT.
9225         (delete_breakpoint): Reimplement.
9226         (find_breakpoint_at): Delete.
9227         (find_gdb_breakpoint_at): New.
9228         (delete_breakpoint_at): Delete.
9229         (set_gdb_breakpoint_at): New.
9230         (delete_gdb_breakpoint_at): New.
9231         (gdb_breakpoint_here): New.
9232         (set_reinsert_breakpoint): Use release_breakpoint.
9233         (uninsert_breakpoint): Rename to ...
9234         (uninsert_raw_breakpoint): ... this.
9235         (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
9236         (reinsert_raw_breakpoint): Change parameter type to
9237         raw_breakpoint.
9238         (reinsert_breakpoints_at): Adjust to handle raw breakpoints
9239         instead.
9240         (check_breakpoints): Adjust.  Use release_breakpoint.
9241         (breakpoint_here): Rewrite using find_raw_breakpoint_at.
9242         (breakpoint_inserted_here): Ditto.
9243         (check_mem_read): Adjust to iterate over raw breakpoints instead.
9244         Don't trust the breakpoint's shadow if it is not inserted.
9245         (check_mem_write): Adjust to iterate over raw breakpoints instead.
9246         (delete_all_breakpoints): Adjust.
9247         (free_all_breakpoints): Mark all breakpoints as uninserted, and
9248         use delete_breakpoint_1.
9249
9250         * mem-break.h (breakpoints_supported): Delete declaration.
9251         (set_gdb_breakpoint_at): Declare.
9252         (gdb_breakpoint_here): Declare.
9253         (delete_breakpoint_at): Delete.
9254         (delete_gdb_breakpoint_at): Declare.
9255
9256         * server.h (struct raw_breakpoint): Forward declare.
9257         (struct process_info): New field `raw_breakpoints'.
9258
9259         * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
9260         breakpoints.
9261
9262 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
9263
9264         * linux-low.c (status_pending_p_callback): Fix comment.
9265         (linux_wait_for_event_1): Move most of the internal breakpoint
9266         handling from here...
9267         (linux_wait_1): ... to here.
9268         (count_events_callback): New.
9269         (select_singlestep_lwp_callback): New.
9270         (select_event_lwp_callback): New.
9271         (cancel_breakpoints_callback): New.
9272         (select_event_lwp): New.
9273         (linux_wait_1): Simplify internal breakpoint handling.  Give equal
9274         priority to all LWPs that have had events that should be reported
9275         to the client.  Cancel breakpoints when about to reporting the
9276         event to the client, not while stopping lwps.  No longer cancel
9277         finished single-steps here.
9278         (cancel_finished_single_step): Delete.
9279         (cancel_finished_single_steps): Delete.
9280
9281 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
9282
9283         * mem-break.c (enum bkpt_type): New.
9284         (struct breakpoint): New field `type'.
9285         (set_breakpoint_at): Change return type to struct breakpoint
9286         pointer.  Set type to `other_breakpoint' by default.
9287         (delete_breakpoint): Rewrite, supporting more than one breakpoint
9288         in the breakpoint list.
9289         (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
9290         (reinsert_breakpoint): Rename to ...
9291         (reinsert_raw_breakpoint): ... this.
9292         (reinsert_breakpoints_at): Adjust.
9293         * mem-break.h (struct breakpoint): Declare.
9294         (set_breakpoint_at): Change return type to struct breakpoint
9295         pointer.
9296
9297 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
9298
9299         * server.c (handle_query): Assign, not compare.
9300
9301 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
9302
9303         Teach linux gdbserver to step-over-breakpoints.
9304
9305         * linux-low.c (can_hardware_single_step): New.
9306         (supports_breakpoints): New.
9307         (handle_extended_wait): If stopping threads, read the stop pc of
9308         the new cloned LWP.
9309         (get_pc): New.
9310         (get_stop_pc): Add `lwp' parameter.  Handle it.  Bail out if the
9311         low target doesn't support retrieving the PC.
9312         (add_lwp): Set last_resume_kind to resume_continue.
9313         (linux_attach_lwp_1): Adjust comments.  Always set stop_expected.
9314         (linux_attach): Don't clear stop_expected.  Set the lwp's
9315         last_resume_kind to resume_stop.
9316         (linux_detach_one_lwp): Don't check for removed breakpoints.
9317         (check_removed_breakpoint): Delete.
9318         (status_pending_p): Rename to ...
9319         (status_pending_p_callback): ... this.  Don't check for removed
9320         breakpoints.  Don't consider threads that are stopped from GDB's
9321         perspective.
9322         (linux_wait_for_lwp): Always read the stop_pc here.
9323         (cancel_breakpoint): New.
9324         (step_over_bkpt): New global.
9325         (linux_wait_for_event_1): Implement stepping over breakpoints.
9326         (gdb_wants_lwp_stopped): New.
9327         (gdb_wants_all_stopped): New.
9328         (linux_wait_1): Tag threads as gdb-wants-stopped.  Cancel finished
9329         single-step traps here.  Store the thread's last reported target
9330         wait status.
9331         (send_sigstop): Don't clear stop_expected.  Always set it,
9332         instead.
9333         (mark_lwp_dead): Remove reference to pending_is_breakpoint.
9334         (cancel_finished_single_step): New.
9335         (cancel_finished_single_steps): New.
9336         (wait_for_sigstop): Don't cancel finished single-step traps here.
9337         (linux_resume_one_lwp): Don't check for removed breakpoints.
9338         Don't set `step' on non-hardware step archs.
9339         (linux_set_resume_request): Ignore resume_stop requests if already
9340         stopping or stopped.  Set the lwp's last_resume_kind.
9341         (resume_status_pending_p): Don't check for removed breakpoints.
9342         (need_step_over_p): New.
9343         (start_step_over): New.
9344         (finish_step_over): New.
9345         (linux_resume_one_thread): Always queue a sigstop for resume_stop
9346         requests.  Clear the thread's last reported target waitstatus.
9347         Don't use the `suspended' flag.  Don't consider pending breakpoints.
9348         (linux_resume): Start a step-over if necessary.
9349         (proceed_one_lwp): New.
9350         (proceed_all_lwps): New.
9351         (unstop_all_lwps): New.
9352         * linux-low.h (struct lwp_info): Rewrite comment for the
9353         `suspended' flag.  Add the `stop_pc' field.  Delete the
9354         `pending_stop_pc' field.  Tweak the `stepping' flag's comment.
9355         Add `'last_resume_kind' and `need_step_over' fields.
9356         * inferiors.c (struct thread_info): Delete, moved elsewhere.
9357         * mem-break.c (struct breakpoint): Delete `reinserting' flag.
9358         Delete `breakpoint_to_reinsert' field.  New flag `inserted'.
9359         (set_raw_breakpoint_at): New.
9360         (set_breakpoint_at): Rewrite to use it.
9361         (reinsert_breakpoint_handler): Delete.
9362         (set_reinsert_breakpoint): New.
9363         (reinsert_breakpoint_by_bp): Delete.
9364         (delete_reinsert_breakpoints): New.
9365         (uninsert_breakpoint): Rewrite.
9366         (uninsert_breakpoints_at): New.
9367         (reinsert_breakpoint): Rewrite.
9368         (reinsert_breakpoints_at): New.
9369         (check_breakpoints): Rewrite.
9370         (breakpoint_here): New.
9371         (breakpoint_inserted_here): New.
9372         (check_mem_read): Adjust.
9373         * mem-break.h (breakpoints_supported, breakpoint_here)
9374         (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
9375         (reinsert_breakpoint_by_bp): Delete declaration.
9376         (delete_reinsert_breakpoints): Declare.
9377         (reinsert_breakpoint): Delete declaration.
9378         (reinsert_breakpoints_at): Declare.
9379         (uninsert_breakpoint): Delete declaration.
9380         (uninsert_breakpoints_at): Declare.
9381         (check_breakpoints): Adjust prototype.
9382         * server.h: Adjust include order.
9383         (struct thread_info): Declare here.  Add a `last_status' field.
9384
9385 2010-03-23  Michael Snyder  <msnyder@vmware.com>
9386
9387         * server.c (crc32): New function.
9388         (handle_query): Add handling for 'qCRC:' request.
9389
9390 2010-03-23  Pedro Alves  <pedro@codesourcery.com>
9391
9392         * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
9393         lwp had been stopped by a watchpoint.
9394
9395 2010-03-16  Pedro Alves  <pedro@codesourcery.com>
9396
9397         * server.h (internal_error): Declare.
9398         (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
9399         * utils.c (internal_error): New function.
9400
9401 2010-03-15  Andreas Schwab  <schwab@redhat.com>
9402
9403         * configure.srv: Fix typo setting srv_regobj.
9404
9405 2010-03-15  Pedro Alves  <pedro@codesourcery.com>
9406
9407         * linux-low.c (fetch_register): Avoid passing a non string literal
9408         format to `error'.
9409         (usr_store_inferior_registers): Ditto.
9410
9411 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
9412
9413         * linux-low.c (linux_write_memory): Bail out early if peeking
9414         memory failed.
9415
9416 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
9417
9418         * linux-low.h (struct lwp_info): New fields
9419         `stopped_by_watchpoint' and `stopped_data_address'.
9420         * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
9421         here, and cache them in the lwp object.
9422         (wait_for_sigstop): Check stopped_by_watchpoint lwp field
9423         directly.
9424         (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
9425         field.
9426         (linux_stopped_by_watchpoint): Rewrite.
9427         (linux_stopped_data_address): Rewrite.
9428
9429 2010-03-06  Simo Melenius  <simo.melenius@iki.fi>
9430
9431         * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
9432         switching the current inferior, not before.
9433
9434 2010-03-01  H.J. Lu  <hongjiu.lu@intel.com>
9435
9436         * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
9437         reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
9438         i386-linux.c and amd64-linux.c.
9439         (reg-i386.o): Removed.
9440         (reg-i386.c): Likewise.
9441         (reg-i386-linux.o): Likewise.
9442         (reg-i386-linux.c): Likewise.
9443         (reg-x86-64.o): Likewise.
9444         (reg-x86-64.c): Likewise.
9445         (reg-x86-64-linux.o): Likewise.
9446         (reg-x86-64-linux.c): Likewise.
9447         (i386.o): New.
9448         (i386.c): Likewise.
9449         (i386-linux.o): Likewise.
9450         (i386-linux.c): Likewise.
9451         (amd64.o): Likewise.
9452         (amd64.c): Likewise.
9453         (amd64-linux.o): Likewise.
9454         (amd64-linux.c): Likewise.
9455
9456         * configure.srv (srv_i386_regobj): New.
9457         (srv_i386_linux_regobj): Likewise.
9458         (srv_amd64_regobj): Likewise.
9459         (srv_amd64_linux_regobj): Likewise.
9460         (srv_i386_32bit_xmlfiles): Likewise.
9461         (srv_i386_64bit_xmlfiles): Likewise.
9462         (srv_i386_xmlfiles): Likewise.
9463         (srv_amd64_xmlfiles): Likewise.
9464         (srv_i386_linux_xmlfiles): Likewise.
9465         (srv_amd64_linux_xmlfiles): Likewise.
9466         (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj.  Set
9467         srv_xmlfiles to $srv_i386_xmlfiles.
9468         (i[34567]86-*-mingw32ce*): Likewise.
9469         (i[34567]86-*-mingw*): Likewise.
9470         (i[34567]86-*-nto*): Likewise.
9471         (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
9472         and $srv_amd64_linux_regobj.  Set srv_xmlfiles to
9473         $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
9474         (x86_64-*-linux*): Likewise.
9475
9476         * linux-x86-low.c (init_registers_x86_64_linux): Removed.
9477         (init_registers_amd64_linux): New.
9478         (x86_arch_setup): Replace init_registers_x86_64_linux with
9479         init_registers_amd64_linux.
9480
9481 2010-02-23  Maxim Kuvyrkov  <maxim@codesourcery.com>
9482
9483         * configure.ac: Check for libdl.  If it is not available link against
9484         static libthread_db.
9485         * configure: Regenerate.
9486
9487 2010-02-22  Pedro Alves  <pedro@codesourcery.com>
9488
9489         PR9605
9490
9491         * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
9492         handing a read watchpoint.
9493         (i386_low_insert_watchpoint): Read watchpoints aren't supported.
9494
9495 2010-02-12  Doug Evans  <dje@google.com>
9496
9497         * linux-low.c (linux_supports_tracefork_flag): Document.
9498         (linux_look_up_symbols): Add comment.
9499
9500 2010-02-03  H.J. Lu  <hongjiu.lu@intel.com>
9501
9502         * regcache.c (supply_register): Clear regcache if buf is NULL.
9503
9504 2010-02-02  Nicolas Roche  <roche@sourceware.org>
9505             Joel Brobecker  <brobecker@adacore.com>
9506
9507         * inferiors.c (find_inferior): Add function documentation.
9508         (unloaded_dll): Handle the case where the unloaded dll has not
9509         been previously registered in the dll list.
9510
9511 2010-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
9512
9513         * linux-arm-low.c (thumb_breakpoint_len): Delete.
9514         (thumb2_breakpoint): New.
9515         (arm_breakpoint_at): Check for Thumb-2 breakpoints.
9516
9517 2010-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
9518
9519         * linux-low.c (get_stop_pc): Check for SIGTRAP.
9520         (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
9521         breakpoints.
9522
9523 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
9524
9525         * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
9526
9527 2010-01-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
9528
9529         * linux-s390-low.c (s390_collect_ptrace_register)
9530         (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
9531
9532 2010-01-21  Doug Evans  <dje@google.com>
9533
9534         * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
9535         (PTRACE_ARG4_TYPE): New macro.
9536         (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
9537         (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
9538         (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
9539         (usr_store_inferior_registers): Ditto.
9540         (linux_read_memory, linux_write_memory): Ditto.
9541         (linux_test_for_tracefork): Ditto.
9542
9543         * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
9544         Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
9545
9546 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
9547
9548         * proc-service.c (ps_lgetregs): Don't refetch registers from the
9549         target.
9550
9551 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
9552
9553         * spu-low.c (spu_fetch_registers, spu_store_registers): Change
9554         prototype to take a regcache.  Adjust.
9555
9556 2010-01-20  Pedro Alves  <pedro@codesourcery.com>
9557
9558         * regcache.h (struct thread_info): Forward declare.
9559         (struct regcache): New.
9560         (new_register_cache): Adjust prototype.
9561         (get_thread_regcache): Declare.
9562         (free_register_cache): Adjust prototype.
9563         (registers_to_string, registers_from_string): Ditto.
9564         (supply_register, supply_register_by_name, collect_register)
9565         (collect_register_as_string, collect_register_by_name): Ditto.
9566         * regcache.c (struct inferior_regcache_data): Delete.
9567         (get_regcache): Rename to ...
9568         (get_thread_regcache): ... this.  Adjust.  Switch inferior before
9569         fetching registers.
9570         (regcache_invalidate_one): Adjust.
9571         (regcache_invalidate): Fix prototype.
9572         (new_register_cache): Return the new register cache.
9573         (free_register_cache): Change prototype.
9574         (realloc_register_cache): Adjust.
9575         (registers_to_string): Change prototype to take a regcache.  Adjust.
9576         (registers_from_string): Ditto.
9577         (register_data): Ditto.
9578         (supply_register): Ditto.
9579         (supply_register_by_name): Ditto.
9580         (collect_register): Ditto.
9581         (collect_register_as_string): Ditto.
9582         (collect_register_by_name): Ditto.
9583         * server.c (process_serial_event): Adjust.
9584         * linux-low.h (regset_fill_func, regset_store_func): Change
9585         prototype.
9586         (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
9587         Change prototype.
9588         * linux-low.c (get_stop_pc): Adjust.
9589         (check_removed_breakpoint): Adjust.
9590         (linux_wait_for_event): Adjust.
9591         (linux_resume_one_lwp): Adjust.
9592         (fetch_register): Add regcache parameter.  Adjust.
9593         (usr_store_inferior_registers): Ditto.
9594         (regsets_fetch_inferior_registers): Ditto.
9595         (regsets_store_inferior_registers): Ditto.
9596         (linux_fetch_registers, linux_store_registers): Ditto.
9597         * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
9598         regcache.  Adjust.
9599         (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
9600         Ditto.
9601         * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
9602         prototype to take a regcache.
9603         (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
9604         * remote-utils.c (convert_ascii_to_int, outreg)
9605         (prepare_resume_reply): Change prototype to take a regcache.
9606         Adjust.
9607         * target.h (struct target_ops) <fetch_registers, store_registers>:
9608         Change prototype to take a regcache.
9609         (fetch_inferior_registers, store_inferior_registers): Change
9610         prototype to take a regcache.  Adjust.
9611         * proc-service.c (ps_lgetregs): Adjust.
9612         * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
9613         (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
9614         (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
9615         take a regcache.  Adjust.
9616         * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
9617         (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
9618         (arm_store_vfpregset, arm_get_pc, arm_set_pc):
9619         (arm_breakpoint_at): Change prototype to take a regcache.  Adjust.
9620         * linux-cris-low.c (cris_get_pc, cris_set_pc)
9621         (cris_cannot_fetch_register):
9622         (cris_breakpoint_at): Change prototype to take a regcache.
9623         Adjust.
9624         * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
9625         cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
9626         to take a regcache.  Adjust.
9627         (cris_breakpoint_at, cris_insert_point, cris_remove_point):
9628         Adjust.
9629         * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
9630         take a regcache.  Adjust.
9631         * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
9632         (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
9633         (m68k_set_pc): Change prototype to take a regcache.  Adjust.
9634         * linux-mips-low.c (mips_get_pc):
9635         (mips_set_pc): Change prototype to take a regcache.  Adjust.
9636         (mips_reinsert_addr): Adjust.
9637         (mips_collect_register): Change prototype to take a regcache.
9638         Adjust.
9639         (mips_supply_register):
9640         (mips_collect_register_32bit, mips_supply_register_32bit)
9641         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9642         (mips_store_fpregset): Ditto.
9643         * linux-ppc-low.c (ppc_supply_ptrace_register)
9644         (ppc_supply_ptrace_register): Ditto.
9645         (parse_spufs_run): Adjust.
9646         (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9647         (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9648         (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9649         take a regcache.  Adjust.
9650         * linux-s390-low.c (s390_collect_ptrace_register)
9651         (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9652         (s390_set_pc): Change prototype to take a regcache.  Adjust.
9653         (s390_arch_setup): Adjust.
9654         * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9655         (sh_fill_gregset): Change prototype to take a regcache.  Adjust.
9656         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9657         (sparc_fill_gregset, sparc_store_gregset_from_stack)
9658         (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9659         regcache.  Adjust.
9660         (sparc_breakpoint_at): Adjust.
9661         * linux-xtensa-low.c (xtensa_fill_gregset):
9662         (xtensa_store_gregset):
9663         (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9664         (xtensa_set_pc): Change prototype to take a regcache.  Adjust.
9665         * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9666         prototype to take a regcache.  Adjust.
9667         * win32-arm-low.c (arm_fetch_inferior_register)
9668         (arm_store_inferior_register): Change prototype to take a
9669         regcache.  Adjust.
9670         * win32-i386-low.c (i386_fetch_inferior_register)
9671         (i386_store_inferior_register): Change prototype to take a
9672         regcache.  Adjust.
9673         * win32-low.c (child_fetch_inferior_registers)
9674         (child_store_inferior_registers): Change prototype to take a
9675         regcache.  Adjust.
9676         (win32_wait): Adjust.
9677         (win32_fetch_inferior_registers): Change prototype to take a
9678         regcache.  Adjust.
9679         (win32_store_inferior_registers): Adjust.
9680         * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9681         store_inferior_register>: Change prototype to take a regcache.
9682
9683 2010-01-20  Doug Evans  <dje@google.com>
9684
9685         * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9686         #ifdef.
9687         (linux_wait_for_event1, linux_init_signals): Ditto.
9688         (W_STOPCODE): Provide definition if missing.
9689
9690 2010-01-13  Vladimir Prus  <vladimir@codesourcery.com>
9691
9692         * linux-low.c (linux_core_of_thread): New.
9693         (compare_ints, show_process, list_threads): New.
9694         (linux_qxfer_osdata): Report threads and cores.
9695         (linux_target_op): Register linux_core_of_thread.
9696         * remote-utils.c (prepare_resume_reply): Report the core.
9697         (buffer_xml_printf): Support %d specifier.
9698         * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9699         New.
9700         (handle_query): Handle qXfer:threads.  Announce availability
9701         thereof.
9702         * target.h (struct target_ops): New field core_of_thread.
9703
9704 2010-01-04  Ulrich Weigand  <uweigand@de.ibm.com>
9705
9706         * Makefile.in (clean): Remove new generated files.
9707         (reg-s390.o, reg-s390.c): Remove rules.
9708         (reg-s390x.o, reg-s390x.c): Likewise.
9709         (s390-linux32.o, s390-linux32.c): Add rules.
9710         (s390-linux64.o, s390-linux64.c): Likewise.
9711         (s390x-linux64.o, s390x-linux64.c): Likewise.
9712         * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9713         * linux-s390-low.c: Include <elf.h>.
9714         (HWCAP_S390_HIGH_GPRS): Define if undefined.
9715         (init_registers_s390): Remove prototype.
9716         (init_registers_s390x): Likewise.
9717         (init_registers_s390_linux32): Add prototype.
9718         (init_registers_s390_linux64): Likewise.
9719         (init_registers_s390x_linux64): Likewise.
9720         (s390_num_regs_3264): New define.
9721         (s390_regmap_3264): New global variable.
9722         (s390_cannot_fetch_register): Remove obsolete check.
9723         (s390_cannot_store_register): Likewise.
9724         (s390_collect_ptrace_register): Handle upper/lower register halves.
9725         (s390_supply_ptrace_register): Likewise.
9726         (s390_fill_gregset): Update to register number changes.
9727         (s390_get_hwcap): New routine.
9728         (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9729         Install appropriate regmap and register set.
9730
9731 2010-01-01  Joel Brobecker  <brobecker@adacore.com>
9732
9733         * server.c (gdbserver_version): Update copyright year to 2010.
9734         * gdbreplay.c (gdbreplay_version): Likewise.
9735
9736 2009-12-28  Doug Evans  <dje@google.com>
9737
9738         * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9739         elf/external.h.  Include <elf.h> instead but only if necessary.
9740
9741 2009-12-28  Pedro Alves  <pedro@codesourcery.com>
9742
9743         * linux-low.c (linux_remove_process): Remove `detaching'
9744         parameter.  Don't release/detach from thread_db here.
9745         (linux_kill): Release/detach from thread_db here, ...
9746         (linux_detach): ... and here, before actually detaching.
9747         (linux_wait_1): ... and here, when a process exits.
9748         * thread-db.c (any_thread_of): New.
9749         (thread_db_free): Switch the current inferior to a thread of the
9750         passed in process.
9751
9752 2009-12-21  Doug Evans  <dje@google.com>
9753
9754         * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9755
9756         * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9757         Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9758         warning ifndef __NR_tkill.  Move setting of errno there too.
9759         Delete unnecessary resetting of errno after syscall.
9760         Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9761
9762         * configure.ac: Check for dladdr.
9763         * config.in: Regenerate.
9764         * configure: Regenerate.
9765         * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9766         (try_thread_db_load): Update.
9767
9768         * linux-low.c (my_waitpid): Delete unnecessary prototype.
9769
9770 2009-12-18  Doug Evans  <dje@google.com>
9771
9772         * event-loop.c: Include unistd.h if it exists.
9773
9774         * linux-low.c (my_waitpid): Move definition away from being in
9775         between linux_tracefork_child/linux_test_for_tracefork.
9776
9777         * gdb_proc_service.h (psaddr_t): Fix type.
9778         * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9779         signature to match glibc.
9780
9781 2009-12-16  Doug Evans  <dje@google.com>
9782
9783         * linux-low.c (linux_read_memory): Fix argument to read.
9784
9785 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
9786
9787         * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9788         events, don't leave current_inferior pointing at null.
9789
9790 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
9791
9792         * win32-low.c (LOG): Delete.
9793         (OUTMSG): Output to stderr.
9794         (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9795         on compile time LOG macro.
9796         (win32_wait): Fix debug output.
9797
9798 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
9799
9800         * win32-low.c (win32_add_one_solib): If the dll name is
9801         "ntdll.dll", prepend the system directory to the dll path.
9802
9803 2009-11-17  Daniel Jacobowitz  <dan@codesourcery.com>
9804
9805         * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9806
9807 2009-11-17  Nathan Sidwell  <nathan@codesourcery.com>
9808             Vladimir Prus  <vladimir@codesourcery.com>
9809
9810         * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9811         * configure.ac: Check for __mcoldfire__ and set
9812         gdb_cv_m68k_is_coldfire.
9813         * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9814         reg-cf.o and reg-m68k.o.
9815         * configure: Regenerated.
9816
9817 2009-11-16  Pedro Alves  <pedro@codesourcery.com>
9818
9819         * linux-low.c (linux_remove_process): Add `detaching' parameter.
9820         Pass it to thread_db_free.
9821         (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9822         proper `detaching' argument to linux_remove_process.
9823         * linux-low.h (thread_db_free): Add `detaching' parameter.
9824         * thread-db.c (thread_db_init): Pass false as `detaching' argument
9825         to thread_db_free.
9826         (thread_db_free): Add `detaching' parameter.  Only
9827         call td_ta_clear_event if detaching from process.
9828
9829 2009-11-12  Maxim Kuvyrkov  <maxim@codesourcery.com>
9830
9831         * thread-db.c (thread_db_free): Fix typo.
9832
9833 2009-11-11  Paul Pluzhnikov  <ppluzhnikov@google.com>
9834
9835         PR gdb/10838
9836         * thread-db.c (thread_db_free): Call td_ta_clear_event.
9837
9838 2009-11-03  Nathan Sidwell  <nathan@codesourcery.com>
9839
9840         * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9841         with an i686 compiler.
9842         * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9843         needed.
9844         * configure: Rebuilt.
9845
9846 2009-10-29  Sandra Loosemore  <sandra@codesourcery.com>
9847
9848         PR gdb/10783
9849
9850         * server.c (handle_search_memory_1): Correct read_addr initialization
9851         in loop for searching subsequent chunks.
9852
9853 2009-10-29  Paul Pluzhnikov  <ppluzhnikov@google.com>
9854
9855         * configure.ac: New --with-libthread-db option.
9856         * thread-db.c: Allow direct dependence on libthread_db.
9857         (thread_db_free): Adjust.
9858         * config.in: Regenerate.
9859         * configure: Likewise.
9860
9861 2009-10-28  Paul Pluzhnikov  <ppluzhnikov@google.com>
9862
9863         PR gdb/10757
9864         * thread-db.c (attach_thread): New function.
9865         (maybe_attach_thread): Return success/failure.
9866         (find_new_threads_callback): Adjust.
9867         (thread_db_find_new_threads): Loop until no new threads.
9868
9869 2009-10-13  Pedro Alves  <pedro@codesourcery.com>
9870
9871         * proc-service.c (ps_lgetregs): Formatting.
9872
9873 2009-10-08  Paul Pluzhnikov  <ppluzhnikov@google.com>
9874
9875         * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9876         * configure.ac: Adjust.
9877         * linux-low.h (struct process_info_private): Move members to struct
9878         thread_db.
9879         (thread_db_free, thread_db_handle_monitor_command): New prototype.
9880         * linux-low.c (linux_remove_process): Adjust.
9881         (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9882         * server.c (handle_query): Move code ...
9883         (handle_monitor_command): ... here. New function.
9884         * target.h (struct target_ops): New member.
9885         * thread-db.c (struct thread_db): New.
9886         (libthread_db_search_path): New variable.
9887         (thread_db_create_event, thread_db_enable_reporting)
9888         (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9889         (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9890         (try_thread_db_load_1, dladdr_to_soname): New functions.
9891         (try_thread_db_load, thread_db_load_search): New functions.
9892         (thread_db_init): Search for libthread_db.
9893         (thread_db_free): New function.
9894         (thread_db_handle_monitor_command): Likewise.
9895         * config.in: Regenerate.
9896         * configure: Regenerate.
9897
9898 2009-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
9899
9900         * spu-low.c (spu_kill): Wait for inferior to terminate.
9901         Call clear_inferiors.
9902         (spu_detach): Call clear_inferiors.
9903
9904 2009-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9905
9906         * aclocal.m4: Regenerate.
9907         * config.in: Likewise.
9908         * configure: Likewise.
9909
9910 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
9911
9912         * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9913         (parse_spufs_run): New function.
9914         (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9915         (ppc_breakpoint_at): Handle SPU breakpoints.
9916
9917 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
9918
9919         * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9920         (SPUFS_MAGIC): Define.
9921         (spu_enumerate_spu_ids): New function.
9922         (linux_qxfer_spu): New function.
9923         (linux_target_ops): Install linux_qxfer_spu.
9924
9925 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
9926
9927         * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9928         and powerpc-cell64l.o to srv_regobj.  Add rs6000/powerpc-cell32l.xml
9929         and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9930         * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9931         (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9932         (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9933         * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9934         (init_registers_powerpc_cell32l): Add prototype.
9935         (init_registers_powerpc_cell64l): Likewise.
9936         (ppc_arch_setup): Detect Cell/B.E. architecture.
9937
9938 2009-07-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9939
9940         * Makefile.in (datarootdir): New variable.
9941
9942 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
9943
9944         * linux-low.c (linux_write_memory): Update debugging output.
9945         * Makefile.in (clean): Add new descriptions.
9946         (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9947         (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9948         * configure.srv: Add new files for arm*-*-linux*.
9949         * linux-arm-low.c: Add new declarations.
9950         (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9951         (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9952         (HWCAP_VFPv3D16): New.
9953         (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9954         instead of __IWMMXT__.
9955         (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9956         (arm_arch_setup): New.
9957         (target_regsets): Remove #ifdef.  Add VFP regset.
9958         (the_low_target): Use arm_arch_setup.
9959
9960 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
9961
9962         * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9963         the main thread again.
9964
9965 2009-07-06  Aleksandar Ristovski  <aristovski@qnx.com>
9966
9967         Adding Neutrino gdbserver.
9968         * configure: Regenerated.
9969         * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9970         * configure.srv (i[34567]86-*-nto*): New target.
9971         * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9972         * remote-utils.c [__QNX__]: Include sys/iomgr.h
9973         (nto_comctrl) [__QNX__]: New function.
9974         (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9975
9976 2009-07-05  Danny Backx  <dannybackx@users.sourceforge.net>
9977
9978         * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9979         srv_tgtobj.
9980
9981 2009-07-04  Danny Backx  <dannybackx@users.sourceforge.net>
9982             Pedro Alves  <pedro@codesourcery.com>
9983
9984         * win32-i386-low.c (i386_get_thread_context): Handle systems that
9985         don't support CONTEXT_EXTENDED_REGISTERS.
9986         (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9987         (the_low_target): Install them.
9988         * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9989         failing with ERROR_PIPE_NOT_CONNECTED.
9990
9991 2009-06-30  Doug Evans  <dje@google.com>
9992             Pierre Muller  <muller@ics.u-strasbg.fr>
9993
9994         Add h/w watchpoint support to x86-linux, win32-i386.
9995         * Makefile.in (SFILES): Add i386-low.c
9996         (i386_low_h): Define.
9997         (i386-low.o): Add dependencies.
9998         (linux-x86-low.o): Add i386-low.h dependency.
9999         (win32-i386-low.o): Ditto.
10000         * i386-low.c: New file.
10001         * i386-low.h: New file.
10002         * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
10003         (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
10004         * linux-low.c (linux_add_process): Initialize arch_private.
10005         (linux_remove_process): Free arch_private.
10006         (add_lwp): Initialize arch_private.
10007         (delete_lwp): Free arch_private.
10008         (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
10009         provided.
10010         * linux-low.h (process_info_private): New member arch_private.
10011         (lwp_info): New member arch_private.
10012         (linux_target_ops): New members new_process, new_thread,
10013         prepare_to_resume.
10014         (ptid_of): New macro.
10015         * linux-x86-low.c: Include stddef.h, i386-low.h.
10016         (arch_process_info): New struct.
10017         (arch_lwp_info): New struct.
10018         (x86_linux_dr_get, x86_linux_dr_set): New functions.
10019         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10020         (i386_dr_low_get_status): New function.
10021         (x86_insert_point, x86_remove_point): New functions.
10022         (x86_stopped_by_watchpoint): New function.
10023         (x86_stopped_data_address): New function.
10024         (x86_linux_new_process, x86_linux_new_thread): New functions.
10025         (x86_linux_prepare_to_resume): New function.
10026         (the_low_target): Add entries for insert_point, remove_point,
10027         stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
10028         prepare_to_resume.
10029         * server.c (debug_hw_points): New global.
10030         (monitor_show_help): Document set debug-hw-points.
10031         (handle_query): Process "set debug-hw-points".
10032         * server.h (debug_hw_points): Declare.
10033         (paddress): Declare.
10034         * utils.c (NUMCELLS, CELLSIZE): New macros.
10035         (get_sell, xsnprintf, paddress): New functions.
10036         * win32-arm-low.c (the_low_target): Add entries for insert_point,
10037         remove_point, stopped_by_watchpoint, stopped_data_address.
10038         * win32-i386-low.c: Include i386-low.h.
10039         (debug_reg_state): Replaces dr.
10040         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10041         (i386_dr_low_get_status): New function.
10042         (i386_insert_point, i386_remove_point): New functions.
10043         (i386_stopped_by_watchpoint): New function.
10044         (i386_stopped_data_address): New function.
10045         (i386_initial_stuff): Update.
10046         (get_thread_context,set_thread_context,i386_thread_added): Update.
10047         (the_low_target): Add entries for insert_point,
10048         remove_point, stopped_by_watchpoint, stopped_data_address.
10049         * win32-low.c (win32_insert_watchpoint): New function.
10050         (win32_remove_watchpoint): New function.
10051         (win32_stopped_by_watchpoint): New function.
10052         (win32_stopped_data_address): New function.
10053         (win32_target_ops): Add entries for insert_watchpoint,
10054         remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
10055         * win32-low.h (win32_target_ops): New members insert_point,
10056         remove_point, stopped_by_watchpoint, stopped_data_address.
10057
10058 2009-06-25  Pedro Alves  <pedro@codesourcery.com>
10059
10060         * server.c (process_serial_event): Re-return unsupported, not
10061         error, if the type isn't recognized.  Re-allow supporting only
10062         insert or remove packets.  Also call require_running for
10063         breakpoints.  Add missing break statement to default case.  Tidy.
10064         * target.h (struct target_ops): Rename insert_watchpoint to
10065         insert_point, and remove_watchpoint to remove_point.
10066
10067         * linux-low.h (struct linux_target_ops): Likewise.
10068         * linux-low.c (linux_insert_watchpoint): Rename to ...
10069         (linux_insert_point): ... this.  Adjust.
10070         (linux_remove_watchpoint): Rename to ...
10071         (linux_remove_point): ... this.  Adjust.
10072         (linux_target_ops): Adjust.
10073         * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
10074         (cris_insert_point): ... this.
10075         (cris_remove_watchpoint): Rename to ...
10076         (cris_remove_point): ... this.
10077         (the_low_target): Adjust.
10078
10079 2009-06-24  Pierre Muller  <muller@ics.u-strasbg.fr>
10080
10081         * server.c (handle_v_kill): Pass signal_pid to
10082         kill_inferior if multi_process is zero.
10083
10084 2009-06-23  Aleksandar Ristovski  <aristovski@qnx.com>
10085
10086         * server.c (process_serial_event): Add support for Z0 and Z1 packet.
10087         * target.h (target_ops): Comment for *_watchpoint to make it clear
10088         the functions can get types '0' and '1'.
10089
10090 2009-06-22  Aleksandar Ristovski  <aristovski@qnx.com>
10091
10092         * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
10093         * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
10094         * regcache.c (get_regcache): Likewise.
10095         * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
10096         * win32-low.c (child_fetch_inferior_registers): Remove check for
10097         regno 0.
10098
10099 2009-06-19  Aleksandar Ristovski  <aristovski@qnx.com>
10100             Pedro Alves <pedro@codesourcery.com>
10101
10102         * target.h (struct target_ops) <supports_multi_process>: New
10103         callback.
10104         (target_supports_multi_process): New.
10105         * server.c (handle_query): Even if GDB reports support, only
10106         enable multi-process if the target also supports it.  Report
10107         multi-process support only if the target backend supports it.
10108         * linux-low.c (linux_supports_multi_process): New function.
10109         (linux_target_ops): Install it as target_supports_multi_process
10110         callback.
10111
10112 2009-05-24  Doug Evans  <dje@google.com>
10113
10114         Global renaming of find_thread_pid to find_thread_ptid.
10115         * server.h (find_thread_ptid): Renamed from find_thread_pid.
10116         * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
10117         All callers updated.
10118
10119         * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
10120         to resume the newly created thread, don't call ptrace (PTRACE_CONT)
10121         directly.
10122
10123         * linux-low.c (get_stop_pc): Print pc if debug_threads.
10124         (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
10125         (linux_resume_one_lwp): Ditto.
10126
10127 2009-05-23  Doug Evans  <dje@google.com>
10128
10129         * linux-low.c (linux_resume_one_lwp): Change type of first arg
10130         from struct inferior_list_entry * to struct lwp_info *.
10131         All callers updated.
10132
10133 2009-05-13  Doug Evans  <dje@google.com>
10134
10135         * linux-x86-low.c: Don't include assert.h.
10136         (x86_siginfo_fixup): Use fatal, not assert.
10137         (x86_arch_setup): Fix comment.
10138
10139 2009-05-12  Doug Evans  <dje@google.com>
10140
10141         Biarch support for i386/amd64 gdbserver.
10142         * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
10143         Add linux-x86-low.c.
10144         (linux-i386-low.o, linux-x86-64-low.o): Delete.
10145         (linux-x86-low.o): Add.
10146         * linux-x86-64-low.c: Delete.
10147         * linux-i386-low.c: Delete.
10148         * linux-x86-low.c: New file.
10149         * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
10150         linux-x86-low.o.
10151         (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
10152         linux-x86-low.o.
10153         (x86_64-linux srv_regobj): Add reg-i386-linux.o.
10154         * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
10155         (linux_child_pid_to_exec_file): New function.
10156         (elf_64_header_p, elf_64_file_p): New functions.
10157         (siginfo_fixup): New function.
10158         (linux_xfer_siginfo): New local inf_siginfo.  Call siginfo_fixup to
10159         give target a chance to convert layout.
10160         * linux-low.h (linux_target_ops): New member siginfo_fixup.
10161         (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
10162
10163 2009-05-07  Doug Evans  <dje@google.com>
10164
10165         * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
10166         (regsets_store_inferior_registers): Ditto.
10167
10168 2009-05-06  Pedro Alves  <pedro@codesourcery.com>
10169
10170         PR server/10048
10171
10172         * linux-low.c (must_set_ptrace_flags): Delete.
10173         (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
10174         of the global.
10175         (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here.  Set
10176         `lwp->must_set_ptrace_flags' instead.
10177         (linux_wait_for_event_1): Set ptrace options here.
10178         (linux_wait_1): ... not here.
10179
10180 2009-04-30  Doug Evans  <dje@google.com>
10181
10182         * inferiors.c (started_inferior_callback): New function.
10183         (attached_inferior_callback): New function.
10184         (have_started_inferiors_p, have_attached_inferiors_p): New functions.
10185         * server.c (print_started_pid, print_attached_pid): New functions.
10186         (detach_or_kill_for_exit): New function.
10187         (main): Call it instead of for_each_inferior (kill_inferior_callback).
10188         * server.h (have_started_inferiors_p): Declare.
10189         (have_attached_inferiors_p): Declare.
10190
10191         * inferiors.c (remove_process): Fix memory leak, free process.
10192         * linux-low.c (linux_remove_process): New function.
10193         (linux_kill): Call it instead of remove_process.
10194         (linux_detach, linux_wait_1): Ditto.
10195
10196 2009-04-19  Danny Backx  <dannybackx@users.sourceforge.net>
10197
10198         * configure.srv: Add x86 Windows CE target.
10199
10200 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
10201
10202         * inferiors.c (get_thread_process): Make global.
10203         * server.h (get_thread_process): Add prototype.
10204         * thread-db.c (find_one_thread): Use get_thread_process
10205         instead of current_process.
10206         (thread_db_get_tls_address): Do not crash if called when
10207         thread layer is not yet initialized.
10208
10209 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
10210
10211         * remote-utils.c (prepare_resume_reply): Null-terminate packet.
10212         * spu-low.c (current_tid): Rename to ...
10213         (current_ptid): ... this.
10214         (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
10215         spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
10216         ptid_get_lwp (current_ptid) instead of current_tid.
10217         (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
10218         instead of current_tid.  Use find_process_pid to verify pid
10219         argument is valid.  Pass proper argument to remove_process.
10220         (spu_thread_alive): Compare current_ptid instead of current_tid.
10221         (spu_resume): Likewise.
10222
10223 2009-04-02  Pedro Alves  <pedro@codesourcery.com>
10224
10225         * linux-low.c (usr_store_inferior_registers): Declare local `pid'
10226         variable.
10227
10228 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
10229
10230         Implement the multiprocess extensions, and add linux multiprocess
10231         support.
10232
10233         * server.h (ULONGEST): Declare.
10234         (struct ptid, ptid_t): New.
10235         (minus_one_ptid, null_ptid): Declare.
10236         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10237         (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
10238         (struct inferior_list_entry): Change `id' type from unsigned from
10239         to ptid_t.
10240         (struct sym_cache, struct breakpoint, struct
10241         process_info_private): Forward declare.
10242         (struct process_info): Declare.
10243         (current_process): Declare.
10244         (all_processes): Declare.
10245         (initialize_inferiors): Declare.
10246         (add_thread): Adjust to use ptid_t.
10247         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
10248         (add_process, remove_process, find_thread_pid): Declare.
10249         (find_inferior_id): Adjust to use ptid_t.
10250         (cont_thread, general_thread, step_thread): Change type to ptid_t.
10251         (multi_process): Declare.
10252         (push_event): Adjust to use ptid_t.
10253         (read_ptid, write_ptid): Declare.
10254         (prepare_resume_reply): Adjust to use ptid_t.
10255         (clear_symbol_cache): Declare.
10256         * inferiors.c (all_processes): New.
10257         (null_ptid, minus_one_ptid): New.
10258         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10259         (ptid_get_tid, ptid_equal, ptid_is_pid): New.
10260         (add_thread): Change unsigned long to ptid.  Remove gdb_id
10261         parameter.  Adjust.
10262         (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
10263         (gdb_id_to_thread): Rename to ...
10264         (find_thread_pid): ... this.  Change unsigned long to ptid.
10265         (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
10266         (loaded_dll, pull_pid_from_list): Adjust.
10267         (add_process, remove_process, find_process_pid)
10268         (get_thread_process, current_process, initialize_inferiors): New.
10269         * target.h (struct thread_resume) <thread>: Change type to ptid_t.
10270         (struct target_waitstatus) <related_pid>: Ditto.
10271         (struct target_ops) <kill, detach>: Add `pid' argument.  Change
10272         return type to int.
10273         (struct target_ops) <join>: Add `pid' argument.
10274         (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
10275         (struct target_ops) <wait>: Add `ptid' field.  Change return type
10276         to ptid.
10277         (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
10278         (mywait): Add `ptid' argument.  Change return type to ptid_t.
10279         (target_pid_to_str): Declare.
10280         * target.c (set_desired_inferior): Adjust to use ptids.
10281         (mywait): Add new `ptid' argument.  Adjust.
10282         (target_pid_to_str): New.
10283         * mem-break.h (free_all_breakpoints): Declare.
10284         * mem-break.c (breakpoints): Delelete.
10285         (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
10286         (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
10287         to use per-process breakpoint list.
10288         (free_all_breakpoints): New.
10289         * remote-utils.c (struct sym_cache) <name>: Drop `const'.
10290         (symbol_cache, all_symbols_looked_up): Delete.
10291         (hexchars): New.
10292         (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
10293         read_ptid): New.
10294         (prepare_resume_reply): Change ptid argument's type from unsigned
10295         long to ptid_t.  Adjust.  Implement W;process and X;process.
10296         (free_sym_cache, clear_symbol_cache): New.
10297         (look_up_one_symbol): Adjust to per-process symbol cache.  *
10298         * server.c (cont_thread, general_thread, step_thread): Change type
10299         to ptid_t.
10300         (attached): Delete.
10301         (multi_process): New.
10302         (last_ptid): Change type to ptid_t.
10303         (struct vstop_notif) <ptid>: Change type to ptid_t.
10304         (queue_stop_reply, push_event): Change `ptid' argument's type to
10305         ptid_t.
10306         (discard_queued_stop_replies): Add `pid' argument.
10307         (start_inferior): Adjust to use ptids.  Adjust to mywait interface
10308         changes.  Don't reference the `attached' global.
10309         (attach_inferior): Adjust to mywait interface changes.
10310         (handle_query): Adjust to use ptids.  Parse GDB's qSupported
10311         features.  Handle and report "multiprocess+".  Handle
10312         "qAttached:PID".
10313         (handle_v_cont): Adjust to use ptids.  Adjust to mywait interface
10314         changes.
10315         (handle_v_kill): New.
10316         (handle_v_stopped): Adjust to use target_pid_to_str.
10317         (handle_v_requests): Allow multiple attaches and runs when
10318         multiprocess extensions are in effect.  Handle "vKill".
10319         (myresume): Adjust to use ptids.
10320         (queue_stop_reply_callback): Add `arg' parameter.  Handle it.
10321         (handle_status): Adjust to discard_queued_stop_replies interface
10322         change.
10323         (first_thread_of, kill_inferior_callback)
10324         (detach_or_kill_inferior_callback, join_inferiors_callback): New.
10325         (main): Call initialize_inferiors.  Adjust to use ptids, killing
10326         and detaching from all inferiors.  Handle multiprocess packet
10327         variants.
10328         * linux-low.h: Include gdb_proc_service.h.
10329         (struct process_info_private): New.
10330         (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
10331         <lwpid_of>: Use ptid_get_lwp.
10332         (get_lwp_thread): Adjust.
10333         (struct lwp_info): Add `dead' member.
10334         (find_lwp_pid): Declare.
10335         * linux-low.c (thread_db_active): Delete.
10336         (new_inferior): Adjust comment.
10337         (inferior_pid): Delete.
10338         (linux_add_process): New.
10339         (handle_extended_wait): Adjust.
10340         (add_lwp): Change unsigned long to ptid.
10341         (linux_create_inferior): Add process to processes table.  Adjust
10342         to use ptids.  Don't set new_inferior here.
10343         (linux_attach_lwp): Rename to ...
10344         (linux_attach_lwp_1): ... this.  Add `initial' argument.  Handle
10345         it.  Adjust to use ptids.
10346         (linux_attach_lwp): New.
10347         (linux_attach): Add process to processes table.  Don't set
10348         new_inferior here.
10349         (struct counter): New.
10350         (second_thread_of_pid_p, last_thread_of_process_p): New.
10351         (linux_kill_one_lwp): Add `args' parameter.  Handle it.  Adjust to
10352         multiple processes.
10353         (linux_kill): Add `pid' argument.  Handle it.  Adjust to multiple
10354         processes.  Remove process from process table.
10355         (linux_detach_one_lwp): Add `args' parameter.  Handle it.  Adjust
10356         to multiple processes.
10357         (any_thread_of): New.
10358         (linux_detach): Add `pid' argument, and handle it.  Remove process
10359         from processes table.
10360         (linux_join): Add `pid' argument.  Handle it.
10361         (linux_thread_alive): Change unsighed long argument to ptid_t.
10362         Consider dead lwps as not being alive.
10363         (status_pending_p): Rename `dummy' argument to `arg'.  Filter out
10364         threads we're not interested in.
10365         (same_lwp, find_lwp_pid): New.
10366         (linux_wait_for_lwp): Change `pid' argument's type from int to
10367         ptid_t.  Adjust.
10368         (linux_wait_for_event): Rename to ...
10369         (linux_wait_for_event_1): ... this.  Change `pid' argument's type
10370         from int to ptid_t.  Adjust.
10371         (linux_wait_for_event): New.
10372         (linux_wait_1): Add `ptid' argument.  Change return type to
10373         ptid_t.  Adjust.  Use last_thread_of_process_p.  Remove processes
10374         that exit from the process table.
10375         (linux_wait): Add `ptid' argument.  Change return type to ptid_t.
10376         Adjust.
10377         (mark_lwp_dead): New.
10378         (wait_for_sigstop): Adjust to use ptids.  If a process exits while
10379         stopping all threads, mark its main lwp as dead.
10380         (linux_set_resume_request, linux_resume_one_thread): Adjust to use
10381         ptids.
10382         (fetch_register, usr_store_inferior_registers)
10383         (regsets_fetch_inferior_registers)
10384         (regsets_store_inferior_registers, linux_read_memory)
10385         (linux_write_memory): Inline `inferior_pid'.
10386         (linux_look_up_symbols): Adjust to use per-process
10387         `thread_db_active'.
10388         (linux_request_interrupt): Adjust to use ptids.
10389         (linux_read_auxv): Inline `inferior_pid'.
10390         (initialize_low): Don't reference thread_db_active.
10391         * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
10392         * proc-service.c (ps_lgetregs): Use find_lwp_pid.
10393         (ps_getpid): Return the pid of the current inferior.
10394         * thread-db.c (proc_handle, thread_agent): Delete.
10395         (thread_db_create_event, thread_db_enable_reporting): Adjust to
10396         per-process data.
10397         (find_one_thread): Change argument type to ptid_t.  Adjust to
10398         per-process data.
10399         (maybe_attach_thread): Adjust to per-process data and ptids.
10400         (thread_db_find_new_threads): Ditto.
10401         (thread_db_init): Ditto.
10402         * spu-low.c (spu_create_inferior, spu_attach): Add process to
10403         processes table.  Adjust to use ptids.
10404         (spu_kill, spu_detach): Adjust interface.  Remove process from
10405         processes table.
10406         (spu_join, spu_thread_alive): Adjust interface.
10407         (spu_wait): Adjust interface.  Remove process from processes
10408         table.  Adjust to use ptids.
10409         * win32-low.c (current_inferior_tid): Delete.
10410         (current_inferior_ptid): New.
10411         (debug_event_ptid): New.
10412         (thread_rec): Take a ptid.  Adjust.
10413         (child_add_thread): Add `pid' argument.  Adjust to use ptids.
10414         (child_delete_thread): Ditto.
10415         (do_initial_child_stuff): Add `attached' argument.  Add process to
10416         processes table.
10417         (child_fetch_inferior_registers, child_store_inferior_registers):
10418         Adjust.
10419         (win32_create_inferior): Pass 0 to do_initial_child_stuff.
10420         (win32_attach): Pass 1 to do_initial_child_stuff.
10421         (win32_kill): Adjust interface.  Remove process from processes
10422         table.
10423         (win32_detach): Ditto.
10424         (win32_join): Adjust interface.
10425         (win32_thread_alive): Take a ptid.
10426         (win32_resume): Adjust to use ptids.
10427         (get_child_debug_event): Ditto.
10428         (win32_wait): Adjust interface.  Remove exiting process from
10429         processes table.
10430
10431 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
10432
10433         Non-stop mode support.
10434
10435         * server.h (non_stop): Declare.
10436         (gdb_client_data, handler_func): Declare.
10437         (delete_file_handler, add_file_handler, start_event_loop):
10438         Declare.
10439         (handle_serial_event, handle_target_event, push_event)
10440         (putpkt_notif): Declare.
10441         * target.h (enum resume_kind): New.
10442         (struct thread_resume): Replace `step' field by `kind' field.
10443         (TARGET_WNOHANG): Define.
10444         (struct target_ops) <wait>: Add `options' argument.
10445         <supports_non_stop, async, start_non_stop>: New fields.
10446         (target_supports_non_stop, target_async): New.
10447         (start_non_stop): Declare.
10448         (mywait): Add `options' argument.
10449         * target.c (mywait): Add `options' argument.  Print child exit
10450         notifications here.
10451         (start_non_stop): New.
10452         * server.c (non_stop, own_buf, mem_buf): New globals.
10453         (struct vstop_notif): New.
10454         (notif_queue): New global.
10455         (queue_stop_reply, push_event, discard_queued_stop_replies)
10456         (send_next_stop_reply): New.
10457         (start_inferior): Adjust to use resume_kind.  Adjust to mywait
10458         interface changes.
10459         (attach_inferior): In non-stop mode, don't wait for the target
10460         here.
10461         (handle_general_set): Handle QNonStop.
10462         (handle_query): When handling qC, return the current general
10463         thread, instead of the first thread of the list.
10464         (handle_query): If the backend supports non-stop mode, include
10465         QNonStop+ in the qSupported query response.
10466         (handle_v_cont): Adjust to use resume_kind.  Handle resume_stop
10467         and non-stop mode.
10468         (handle_v_attach, handle_v_run): Handle non-stop mode.
10469         (handle_v_stopped): New.
10470         (handle_v_requests): Report support for vCont;t.  Handle vStopped.
10471         (myresume): Adjust to use resume_kind.  Handle non-stop.
10472         (queue_stop_reply_callback): New.
10473         (handle_status): Handle non-stop mode.
10474         (main): Clear non_stop flag on reconnection.  Use the event-loop.
10475         Refactor serial protocol handling from here ...
10476         (process_serial_event): ... to this new function.  When GDB
10477         selects any thread, select one here.  In non-stop mode, wait until
10478         GDB acks all pending events before exiting.
10479         (handle_serial_event, handle_target_event): New.
10480         * remote-utils.c (remote_open): Install remote_desc in the event
10481         loop.
10482         (remote_close): Remove remote_desc from the event loop.
10483         (putpkt_binary): Rename to...
10484         (putpkt_binary_1): ... this.  Add `is_notic' argument.  Handle it.
10485         (putpkt_binary): New as wrapper around putpkt_binary_1.
10486         (putpkt_notif): New.
10487         (prepare_resume_reply): In non-stop mode, don't change the
10488         general_thread.
10489         * event-loop.c: New.
10490         * Makefile.in (OBJ): Add event-loop.o.
10491         (event-loop.o): New rule.
10492
10493         * linux-low.h (pid_of): Moved here.
10494         (lwpid_of): New.
10495         (get_lwp_thread): Use lwpid_of.
10496         (struct lwp_info): Delete `lwpid' field.  Add `suspended' field.
10497         * linux-low.c (pid_of): Delete.
10498         (inferior_pid): Use lwpid_of.
10499         (linux_event_pipe): New.
10500         (target_is_async_p): New.
10501         (delete_lwp): New.
10502         (handle_extended_wait): Use lwpid_of.
10503         (add_lwp): Don't set lwpid field.
10504         (linux_attach_lwp): Adjust debug output.  Use lwpid_of.
10505         (linux_kill_one_lwp): If killing a running lwp, stop it first.
10506         Use lwpid_of.  Adjust to linux_wait_for_event interface changes.
10507         (linux_detach_one_lwp): If detaching from a running lwp, stop it
10508         first.  Adjust to linux_wait_for_event interface changes.  Use
10509         lwpid_of.
10510         (linux_detach): Don't delete the main lwp here.
10511         (linux_join): Use my_waitpid.  Avoid signal_pid.  Use lwpid_of.
10512         (status_pending_p): Don't consider explicitly suspended lwps.
10513         (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
10514         pointer.  Add OPTIONS argument.  Change return type to int.  Use
10515         my_waitpid instead of sleeping.  Handle WNOHANG.  Use lwpid_of.
10516         (linux_wait_for_event): Take an integer pid instead of a lwp_info
10517         pointer.  Add status pointer argument.  Return a pid instead of a
10518         status.  Use lwpid_of.  Adjust to linux_wait_for_lwp interface
10519         changes.  In non-stop mode, don't switch to a random thread.
10520         (linux_wait): Rename to...
10521         (linux_wait_1): ... this.  Add target_options argument, and handle
10522         it.  Adjust to use resume_kind.  Use lwpid_of.  In non-stop mode,
10523         don't handle the continue thread.  Handle TARGET_WNOHANG.  Merge
10524         clean exit and signal exit code.  Don't stop all threads in
10525         non-stop mode.  In all-stop mode, only stop all threads when
10526         reporting a stop to GDB.  Handle explicit thread stop requests.
10527         (async_file_flush, async_file_mark): New.
10528         (linux_wait): New.
10529         (send_sigstop): Use lwpid_of.
10530         (wait_for_sigstop): Use lwpid_of.  Adjust to linux_wait_for_event
10531         interface changes.  In non-stop mode, don't switch to a random
10532         thread.
10533         (linux_resume_one_lwp): Use lwpid_of.
10534         (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
10535         (linux_resume_one_thread): ... this.  Handle resume_stop.  In
10536         non-stop mode, don't look for pending flag in all threads.
10537         (resume_status_pending_p): Don't consider explicitly suspended
10538         threads.
10539         (my_waitpid): Reimplement.  Emulate __WALL.
10540         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10541         Use lwpid_of.
10542         (sigchld_handler, linux_supports_non_stop, linux_async)
10543         (linux_start_non_stop): New.
10544         (linux_target_ops): Register linux_supports_non_stop, linux_async
10545         and linux_start_non_stop.
10546         (initialize_low): Install SIGCHLD handler.
10547         * thread-db.c (thread_db_create_event, find_one_thread)
10548         (thread_db_get_tls_address): Use lwpid_of.
10549         * win32-low.c (win32_detach): Adjust to use resume_kind.
10550         (win32_wait): Add `options' argument.
10551         * spu-low.c (spu_resume): Adjust to use resume_kind.
10552         (spu_wait): Add `options' argument.
10553
10554 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
10555
10556         Decouple target code from remote protocol.
10557
10558         * target.h (enum target_waitkind): New.
10559         (struct target_waitstatus): New.
10560         (struct target_ops) <wait>: Return an unsigned long.  Take a
10561         target_waitstatus pointer instead of a char pointer.
10562         (mywait): Likewise.
10563         * target.c (mywait): Change prototype to return an unsigned long.
10564         Take a target_waitstatus pointer instead of a char pointer.  Adjust.
10565         * server.h (thread_from_wait, old_thread_from_wait): Delete
10566         declarations.
10567         (prepare_resume_reply): Change prototype to take a
10568         target_waitstatus.
10569         * server.c (thread_from_wait, old_thread_from_wait): Delete.
10570         (last_status, last_ptid): New.
10571         (start_inferior): Remove "statusptr" argument.  Adjust.  Return a
10572         pid instead of a signal.
10573         (attach_inferior): Remove "status" and "signal" parameters.
10574         Adjust.
10575         (handle_query): For qGetTLSAddr, parse the thread id with strtol,
10576         not as an address.
10577         (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
10578         (handle_v_requests, myresume): Remove "status" and "signal"
10579         parameters.  Adjust.
10580         (handle_status): New.
10581         (main): Delete local `status'.  Adjust.
10582         * remote-utils.c: Include target.h.
10583         (prepare_resume_reply): Change prototype to take a
10584         target_waitstatus.  Adjust.
10585
10586         * linux-low.c (linux_wait): Adjust to new target_ops->wait
10587         interface.
10588         * spu-low.c (spu_wait): Adjust.
10589         * win32-low.c (enum target_waitkind, struct target_waitstatus):
10590         Delete.
10591         (win32_wait): Adjust.
10592
10593 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
10594
10595         * target.h (struct thread_resume): Delete leave_stopped member.
10596         (struct target_ops): Add a `n' argument to the `resume' callback.
10597         * server.c (start_inferior): Adjust.
10598         (handle_v_cont, myresume): Adjust.
10599         * linux-low.c (check_removed_breakpoint): Adjust to resume
10600         interface change, and to removed leave_stopped field.
10601         (resume_ptr): Delete.
10602         (struct thread_resume_array): New.
10603         (linux_set_resume_request): Add new `arg' parameter.  Adjust to
10604         resume interface change.
10605         (linux_continue_one_thread, linux_queue_one_thread)
10606         (resume_status_pending_p): Check if the resume field is NULL
10607         instead of checking the leave_stopped member.
10608         (linux_resume): Adjust to the target resume interface change.
10609         * spu-low.c (spu_resume): Adjust to the target resume interface
10610         change.
10611         * win32-low.c (win32_detach, win32_resume): Ditto.
10612
10613 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
10614
10615         * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
10616         flag.
10617         (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
10618         pending.
10619         (linux_continue_one_thread): Only preserve the stepping flag if
10620         there's a pending breakpoint.
10621
10622 2009-03-31  Pedro Alves  <pedro@codesourcery.com>
10623
10624         * server.c (main): After the inferior having exited, call
10625         remote_close before exiting gdbserver.
10626
10627 2009-03-25  Thiago Jung Bauermann  <bauerman@br.ibm.com>
10628
10629         Fix size of FPSCR in Power 7 processors.
10630         * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
10631         (PPC_FEATURE_HAS_DFP): New #define.
10632         (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
10633         size of the FPSCR.
10634
10635 2009-03-23  Pedro Alves  <pedro@codesourcery.com>
10636
10637         * server.c (handle_query) Whitespace and formatting.
10638
10639 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
10640
10641         * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10642         linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10643         linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10644         linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10645         regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10646         thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10647         Makefile.in, configure.ac: Fix whitespace throughout.
10648         * configure: Regenerate.
10649
10650 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
10651
10652         * inferiors.c (find_inferior): Make it safe for the callback
10653         function to delete the currently iterated inferior.
10654
10655 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
10656
10657         * Makefile.in (linuw_low_h): Move higher.
10658         (thread-db.o): Depend on $(linux_low_h).
10659
10660 2009-03-17  Pedro Alves  <pedro@codesourcery.com>
10661
10662         Rename "process" to "lwp" throughout.
10663
10664         * linux-low.c (all_processes): Rename to...
10665         (all_lwps): ... this.
10666         (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10667         (add_process): Rename to ...
10668         (add_lwp): ... this.  Adjust.
10669         (linux_create_inferior): Adjust.
10670         (linux_attach_lwp): Adjust.
10671         (linux_attach): Adjust.
10672         (linux_kill_one_process): Rename to ...
10673         (linux_kill_one_lwp): ... this.  Adjust.
10674         (linux_kill): Adjust.
10675         (linux_detach_one_process): Rename to ...
10676         (linux_detach_one_lwp): ... this.  Adjust.
10677         (linux_detach): Adjust.
10678         (check_removed_breakpoint): Adjust.
10679         (status_pending_p): Adjust.
10680         (linux_wait_for_process): Rename to ...
10681         (linux_wait_for_lwp): ... this.  Adjust.
10682         (linux_wait_for_event): Adjust.
10683         (send_sigstop): Adjust.
10684         (wait_for_sigstop): Adjust.
10685         (stop_all_processes): Rename to ...
10686         (stop_all_lwps): ... this.
10687         (linux_resume_one_process): Rename to ...
10688         (linux_resume_one_lwp): ... this.  Adjust.
10689         (linux_set_resume_request, linux_continue_one_thread)
10690         (linux_queue_one_thread, resume_status_pending_p)
10691         (usr_store_inferior_registers, regsets_store_inferior_registers)
10692         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10693         Adjust.
10694         * linux-low.h (get_process): Rename to ...
10695         (get_lwp): ... this.  Adjust.
10696         (get_thread_process): Rename to ...
10697         (get_thread_lwp): ... this.  Adjust.
10698         (get_process_thread): Rename to ...
10699         (get_lwp_thread): ... this.  Adjust.
10700         (struct process_info): Rename to ...
10701         (struct lwp_info): ... this.
10702         (all_processes): Rename to ...
10703         (all_lwps): ... this.
10704         * proc-service.c (ps_lgetregs): Adjust.
10705         * thread-db.c (thread_db_create_event, find_one_thread)
10706         (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10707
10708 2009-03-14  Pedro Alves  <pedro@codesourcery.com>
10709
10710         * server.c (handle_query): Handle "qAttached".
10711
10712 2009-03-13  Nathan Sidwell  <nathan@codesourcery.com>
10713
10714         * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10715         GPLv3, update license URL.
10716
10717 2009-03-01  Doug Evans  <dje@google.com>
10718
10719         * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
10720         (server_h): Add gdb_signals.h.
10721         (signals.o): Update.
10722         * server.h (target_signal_from_host,target_signal_to_host_p)
10723         (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10724
10725 2009-02-14  Pierre Muller  <muller@ics.u-strasbg.fr>
10726
10727         * remote-utils.c (getpkt): Also generate remote-debug
10728         information if noack_mode is set.
10729
10730 2009-02-06  Pedro Alves  <pedro@codesourcery.com>
10731
10732         * server.c (handle_query): Report qXfer:siginfo:read and
10733         qXfer:siginfo:write as supported and handle them.
10734         * target.h (struct target_ops) <qxfer_siginfo>: New field.
10735         * linux-low.c (linux_xfer_siginfo): New.
10736         (linux_target_ops): Set it.
10737
10738 2009-01-26  Pedro Alves  <pedro@codesourcery.com>
10739
10740         * server.c (gdbserver_usage): Mention --remote-debug.
10741         (main): Accept '--remote-debug' switch.
10742
10743 2009-01-18  Doug Evans  <dje@google.com>
10744
10745         * regcache.c (new_register_cache): No need to check result of xcalloc.
10746         * server.c (handle_search_memory): Back out calls to xmalloc,
10747         result is checked and error is returned to user upon failure.
10748         (handle_query): Ditto.  Add more checks for result of malloc.
10749         (handle_v_cont): Check result of malloc, report error back to
10750         user upon failure.
10751         (handle_v_run): Ditto.  Call freeargv.
10752         * server.h (freeargv): Declare.
10753         * utils.c (freeargv): New fn.
10754
10755 2009-01-15  Doug Evans  <dje@google.com>
10756
10757         * gdbreplay.c (perror_with_name): Make arg const char *.
10758         * server.h (target_signal_to_name): Make return type const char *.
10759         * thread-db.c (thread_db_err_str): Make return type const char *.
10760         * utils.c (perror_with_name): Make arg const char *.
10761
10762 2009-01-14  Pedro Alves  <pedro@codesourcery.com>
10763
10764         * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10765         when handling a EXIT_PROCESS_DEBUG_EVENT.
10766
10767 2009-01-06  Joel Brobecker  <brobecker@adacore.com>
10768
10769         * gdbreplay.c (gdbreplay_version): Update copyright year.
10770         * server.c (gdbserver_version): Likewise.
10771
10772 2009-01-05  Doug Evans  <dje@google.com>
10773
10774         * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
10775         (handle_extended_wait): Improve comment.
10776
10777 2008-12-13  Doug Evans  <dje@google.com>
10778
10779         * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10780         * server.h (ATTR_MALLOC): New macro.
10781         (xmalloc,xcalloc,xstrdup): Declare.
10782         * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10783         * inferiors.c: Ditto.
10784         * linux-low.c: Ditto.
10785         * mem-break.c: Ditto.
10786         * regcache.c: Ditto.
10787         * remote-utils.c: Ditto.
10788         * server.c: Ditto.
10789         * target.c: Ditto.
10790         * win32-low.c: Ditto.
10791
10792 2008-12-12  Doug Evans  <dje@google.com>
10793
10794         * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10795         in debugging printf.
10796
10797         * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10798
10799 2008-12-09  Doug Evans  <dje@google.com>
10800
10801         * linux-low.h (struct process_info): Delete member tid, unused.
10802         * thread-db.c (find_one_thread): Update.
10803         (maybe_attach_thread): Update.
10804
10805 2008-12-02  Pedro Alves  <pedro@codesourcery.com>
10806
10807         * target.h (struct target_ops): Add qxfer_osdata member.
10808         * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10809         and dirent.h.
10810         (linux_qxfer_osdata): New functions.
10811         (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10812         callback.
10813         * server.c (handle_query): Handle "qXfer:osdata:read:".
10814         * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10815         (buffer_xml_printf): New functions.
10816         * server.h (struct buffer): New.
10817         (buffer_grow_str, buffer_grow_str0): New macros.
10818         (buffer_grow, buffer_free, buffer_init, buffer_finish)
10819         (buffer_xml_printf): Declare.
10820
10821 2008-11-24  Doug Evans  <dje@google.com>
10822
10823         * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10824
10825 2008-11-24  Daniel Jacobowitz  <dan@codesourcery.com>
10826
10827         * server.c (handle_v_run): Always use the supplied argument list.
10828
10829 2008-11-19  Bob Wilson  <bob.wilson@acm.org>
10830
10831         * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10832         (xtensa_regmap_table): Add entry for scompare1.
10833
10834 2008-11-18  Thiago Jung Bauermann  <bauerman@br.ibm.com>
10835
10836         * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10837         powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10838         powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10839         powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10840         powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10841         powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10842         * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10843         XML target descriptions.
10844         * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10845         when inferior is running on an ISA 2.05 or later processor.  Add
10846         special case to return offset for full 64-bit slot of FPSCR when
10847         in 32-bits.
10848
10849 2008-11-14  Daniel Gutson  <dgutson@codesourcery.com>
10850
10851         * Makefile.in (SFILES, clean): Added sparc64 files.
10852         (reg-sparc64.o, reg-sparc64.c): New.
10853         * configure.srv (sparc*-*-linux*): New configuration.
10854         * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10855         syscall arguments for SPARC.
10856         (regsets_store_inferior_registers): Likewise.
10857         * linux-sparc-low.c: New file.
10858
10859 2008-10-21  Doug Evans  <dje@google.com>
10860
10861         * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10862         (READLINE_DIR,READLINE_DEP): Delete.
10863         (INTERNAL_CFLAGS): Update.
10864         (LINTFLAGS): Update.
10865
10866 2008-10-10  Pedro Alves  <pedro@codesourcery.com>
10867
10868         * server.c (handle_v_run): If GDB didn't specify an argv, use the
10869         whole argv from the last run, not just argv[0].
10870
10871 2008-09-08  Pedro Alves  <pedro@codesourcery.com>
10872
10873         * regcache.c (new_register_cache): Return NULL if the register
10874         cache size isn't known yet.
10875         (free_register_cache): Avoid dereferencing a NULL regcache.
10876
10877 2008-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
10878
10879         * configure.srv: Merge MIPS and MIPS64.
10880
10881 2008-08-24  Maciej W. Rozycki  <macro@linux-mips.org>
10882
10883         * Makefile.in (uninstall): Apply $(EXEEXT) too.
10884
10885 2008-08-18  Luis Machado  <luisgpm@br.ibm.com>
10886
10887         * Makefile.in: Add required vsx dependencies.
10888
10889         * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10890         Declare init_registers_powerpc_vsx32l.
10891         Declare init_registers_powerpc_vsx64l.
10892         Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10893         (ppc_arch_setup): Check for VSX in hwcap.
10894         (ppc_fill_vsxregset): New function.
10895         (ppc_store_vsxregset): New function.
10896         Add new VSX entry in regset_info target_regsets.
10897
10898         * configure.srv: Add new VSX dependencies.
10899
10900 2008-08-12  Pedro Alves  <pedro@codesourcery.com>
10901
10902         * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10903         (remote_open): Set or clear transport_is_reliable.
10904         (putpkt_binary): Don't expect acks in noack mode.
10905         (getpkt): Don't send ack/nac in noack mode.
10906         * server.c (handle_general_set): Handle QStartNoAckMode.
10907         (handle_query): If connected by tcp pass QStartNoAckMode+ in
10908         qSupported.
10909         (main): Reset noack_mode on every connection.
10910         * server.h (noack_mode): Declare.
10911
10912 2008-08-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10913
10914         * Makefile.in (GDBREPLAY_OBS): New variable.
10915         (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10916
10917 2008-08-05  Ulrich Weigand  <uweigand@de.ibm.com>
10918             Daniel Jacobowitz  <dan@codesourcery.com>
10919
10920         * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10921         (usr_store_inferior_registers): Likewise.
10922         (regsets_store_inferior_registers): Likewise.
10923
10924 2008-07-31  Rolf Jansen  <rj@surtec.com>
10925             Pedro Alves  <pedro@codesourcery.com>
10926
10927         * configure.ac: Check for memmem declaration.
10928         * server.c [HAVE_MALLOC_H]: Include malloc.h.
10929         (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10930         (disable_packet_qfThreadInfo): Unconditionally compile.
10931         * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10932         * configure, config.in: Regenerate.
10933
10934 2008-07-28  Doug Kwan  <dougkwan@google.com>
10935
10936         * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10937         (linux_write_memory): Remove declaration of errno.
10938
10939 2008-07-12  Ulrich Weigand  <uweigand@de.ibm.com>
10940
10941         * linux-low.c (handle_extended_wait): Do not use "status"
10942         variable uninitialized.
10943
10944 2008-07-07  Pedro Alves  <pedro@codesourcery.com>
10945
10946         * server.c (handle_v_attach): Inhibit reporting dll changes.
10947
10948 2008-06-27  Pedro Alves  <pedro@codesourcery.com>
10949
10950         * remote-utils.c (prepare_resume_reply): If requested, don't
10951         output "thread:TID" in the T stop reply.
10952
10953         * server.c (disable_packet_vCont, disable_packet_Tthread)
10954         (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10955         (handle_query): If requested, disable support for qC, qfThreadInfo
10956         and qsThreadInfo.
10957         (handle_v_requests): If requested, disable support for vCont.
10958         (gdbserver_show_disableable): New.
10959         (main): Handle --disable-packet and --disable-packet=LIST.
10960
10961         * server.h (disable_packet_vCont, disable_packet_Tthread)
10962         (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10963
10964 2008-06-20  Carlos O'Donell  <carlos@codesourcery.com>
10965
10966         * server.c (gdbserver_usage): Mention --version.
10967
10968 2008-06-06  Daniel Jacobowitz  <dan@codesourcery.com>
10969
10970         * Makefile.in (gdbreplay.o): New rule.
10971
10972 2008-06-06  Joseph Myers  <joseph@codesourcery.com>
10973
10974         * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10975         message, not gdbserver.
10976
10977 2008-06-05  Vladimir Prus  <vladimir@codesourcery.com>
10978             Nathan Sidwell  <nathan@codesourcery.com>
10979             Joseph Myers  <joseph@codesourcery.com>
10980
10981         * acinclude.m4: Include ../../config/acx.m4.
10982         * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10983         * configure, config.in: Regenerate.
10984         * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10985         * server.c (gdbserver_version): Print PKGVERSION.
10986         (gdbsrever_usage): Add stream parameter.  Print REPORT_BUGS_TO.
10987         (main): Adjust gdbserver_usage calls.
10988         * gdbreplay.c (version, host_name): Add declarations.
10989         (gdbreplay_version, gdbreplay_usage): New.
10990         (main): Accept --version and --help options.
10991
10992 2008-06-04  Daniel Jacobowitz  <dan@codesourcery.com>
10993
10994         * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10995         (arm_breakpoint_at): Handle Thumb.
10996         (the_low_target): Add comment.
10997
10998 2008-05-29  Ulrich Weigand  <uweigand@de.ibm.com>
10999
11000         * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
11001
11002 2008-05-09  Doug Evans  <dje@google.com>
11003
11004         * server.h (decode_search_memory_packet): Declare.
11005         * remote-utils.c (decode_search_memory_packet): New fn.
11006         * server.c (handle_search_memory_1): New fn.
11007         (handle_search_memory): New fn.
11008         (handle_query): Process qSearch:memory packets.
11009
11010 2008-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
11011
11012         * regcache.c (registers_length): Remove.
11013         (set_register_cache): Verify that PBUFSIZ is large enough to hold a
11014         full register packet.
11015         * regcache.h (registers_length): Remove prototype.
11016         * server.h (PBUFSIZ): Define to 16384.
11017
11018 2008-05-03  Ulrich Weigand  <uweigand@de.ibm.com>
11019
11020         * configure.srv (powerpc*-*-linux*): Set srv_regobj to
11021         powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
11022         powerpc-64l.o, and powerpc-altivec64l.o.
11023         Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
11024         rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
11025         rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
11026         rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
11027         rs6000/power-linux.xml, and rs6000/power64-linux.xml
11028         to srv_xmlfiles.
11029
11030         * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
11031         (powerpc-32l.o, powerpc-32l.c): ... these new rules.
11032         (powerpc-32.o, powerpc-32.c): Remove, replace by ...
11033         (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
11034         (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
11035         (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
11036         (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
11037         (powerpc-64l.o, powerpc-64l.c): ... these new rules.
11038         (powerpc-64.o, powerpc-64.c): Remove, replace by ...
11039         (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
11040         (clean): Update.
11041
11042         * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
11043         (init_registers_powerpc_32l): ... this new prototype.
11044         (init_registers_powerpc_32): Remove, replace by ...
11045         (init_registers_powerpc_altivec32l): ... this new prototype.
11046         (init_registers_powerpc_e500): Remove, replace by ...
11047         (init_registers_powerpc_e500l): ... this new prototype.
11048         (init_registers_ppc64): Remove, replace by ...
11049         (init_registers_powerpc_64l): ... this new prototype.
11050         (init_registers_powerpc_64): Remove, replace by ...
11051         (init_registers_powerpc_altivec64l): ... this new prototype.
11052         (ppc_num_regs): Set to 73.
11053         (PT_ORIG_R3, PT_TRAP): Define if necessary.
11054         (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
11055         (ppc_cannot_store_register): Handle orig_r3 and trap.
11056         (ppc_arch_setup): Update init_registers_... calls.
11057         (ppc_fill_gregset): Handle orig_r3 and trap.
11058
11059         * inferiors.c (clear_inferiors): Reset current_inferior.
11060
11061 2008-04-23  Paolo Bonzini  <bonzini@gnu.org>
11062
11063         * acinclude.m4: Add override.m4.
11064         * configure: Regenerate.
11065
11066 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
11067
11068         * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
11069         initial call to init_register_ppc64.
11070
11071 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
11072
11073         * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
11074         single powerpc*-*-linux* case.
11075         (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
11076
11077 2008-04-17  Ulrich Weigand  <uweigand@de.ibm.com>
11078
11079         * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
11080         srv_regobj.  Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
11081         from reg_xmlfiles.
11082         * linux-ppc-low.c: Include <elf.h>.
11083         (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
11084         (ppc_hwcap): New global variable.
11085         (ppc_regmap): Remove __SPE__ #ifdef sections.
11086         (ppc_regmap_e500): New global variable.
11087         (ppc_cannot_store_register): Update __SPE__ special case.
11088         (ppc_get_hwcap): New function.
11089         (ppc_arch_setup): Use it to determine whether inferior supports
11090         AltiVec or SPE registers.  Set the_low_target.regmap if appropriate.
11091         (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
11092         Do not access registers if target does not support AltiVec.
11093         (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
11094         Do not access registers if target does not support SPE.
11095         (target_regsets): Unconditionally include AltiVec and SPE regsets.
11096
11097 2008-04-17  Daniel Jacobowitz  <dan@codesourcery.com>
11098
11099         * linux-low.c (disabled_regsets, num_regsets): New.
11100         (use_regsets_p): Delete.
11101         (linux_wait_for_process): Clear disabled_regsets.
11102         (regsets_fetch_inferior_registers): Check and set it.
11103         (regsets_store_inferior_registers): Likewise.
11104         (linux_fetch_registers, linux_store_registers): Do not use
11105         use_regsets_p.
11106         (initialize_low): Allocate disabled_regsets.
11107
11108 2008-04-14  Daniel Jacobowitz  <dan@codesourcery.com>
11109
11110         * Makefile.in (LIBOBJS): New.
11111         (OBS): Use LIBOBJS.
11112         (memmem.o): New rule.
11113         * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
11114         * configure: Regenerated.
11115
11116 2008-04-04  Ulrich Weigand  <uweigand@de.ibm.com>
11117
11118         * server.c (handle_query): Never return "unsupported" for
11119         qXfer:features:read queries.
11120
11121 2008-03-27  Ulrich Weigand  <uweigand@de.ibm.com>
11122
11123         * server.c (get_features_xml): Fix inverted condition.
11124         (handle_query): Always support qXfer:feature:read.
11125
11126 2008-03-10  Daniel Jacobowitz  <dan@codesourcery.com>
11127
11128         * server.c (wrapper_argv): New.
11129         (start_inferior): Handle wrapper_argv.  If set, expect an extra
11130         trap.
11131         (gdbserver_usage): Document --wrapper.
11132         (main): Parse --wrapper.
11133
11134 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
11135
11136         * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
11137         powerpc-*-linux* to srv_regobj and reg_xmlfiles.
11138         * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
11139         (ppc_set_pc): Likewise.
11140         (ppc_arch_setup): New function.
11141         (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
11142         of collect_register.
11143         (the_low_target): Use ppc_arch_setup as arch_setup initializer.
11144
11145 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
11146
11147         * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
11148         instead of linux-ppc64-low.o.
11149         * linux-ppc64-low.c: Remove file.
11150         * Makefile.in (SFILES): Remove linux-ppc64-low.c.
11151         (linux-ppc64-low.o): Remove rule.
11152
11153         * linux-ppc-low.c (init_registers_ppc64): Add prototype.
11154         (init_registers_powerpc_64): Likewise.
11155         (ppc_regmap): Conditionally define depending on __powerpc64__.
11156         (ppc_cannot_store_register): Do not special-case "fpscr" when
11157         compiled on __powerpc64__.
11158         (ppc_collect_ptrace_register): New function.
11159         (ppc_supply_ptrace_register): New function.
11160         (ppc_breakpoint): Change type to "unsigned int".
11161         (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
11162         (the_low_target): Conditionally provide initializers for the
11163         arch_setup member depending on __powerpc64__.  Install
11164         collect_ptrace_register and supply_ptrace_register members.
11165
11166 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
11167
11168         * regcache.h (gdbserver_xmltarget): Add extern declaration.
11169         * server.c (gdbserver_xmltarget): Define.
11170         (get_features_xml): Use it to replace "target.xml" and arch_string.
11171
11172         * configure.srv: Remove srv_xmltarget.  Add XML files that were
11173         mentioned there to srv_xmlfiles instead.  Remove conditional tests
11174         on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
11175         srv_xmlfiles and srv_regobj to include all possible choices.
11176         * configure.ac (srv_xmltarget): Remove.
11177         (srv_xmlfiles): Do not add "target.xml".
11178         (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
11179         checks for supplementary target information.
11180         * configure: Regenerate.
11181         * Makefile.in (XML_TARGET): Remove.
11182         (target.xml): Remove rule.
11183         (clean): Do not clean up target.xml.
11184         (.PRECIOUS): Do not mention target.xml.
11185
11186         * target.h (struct target_ops): Remove arch_string member.
11187         * linux-low.c (linux_arch_string): Remove.
11188         (linux_target_ops): Remove arch_string initializer.
11189         * linux-low.h (struct linux_target_ops): Remove arch_string member.
11190         * linux-i386-low.c (the_low_target): Remove arch_string initializer.
11191         * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
11192         * spu-low.c (spu_arch_string): Remove.
11193         (spu_target_ops): Remove arch_string initializer.
11194         * win32-low.c (win32_arch_string): Remove.
11195         (win32_target_ops): Remove arch_string initializer.
11196         * win32-low.h (struct win32_target_ops): Remove arch_string member.
11197         * win32-arm-low.c (the_low_target): Remove arch_string initializer.
11198         * win32-i368-low.c (the_low_target): Remove arch_string initializer.
11199
11200 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
11201
11202         * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
11203         by collect_ptrace_register and supply_ptrace_register hooks.
11204         * linux-low.c (fetch_register): Use supply_ptrace_register callback
11205         instead of checking for the_low_target.left_pad_xfer.
11206         (usr_store_inferior_registers): Use collect_ptrace_register callback
11207         instead of checking for the_low_target.left_pad_xfer.
11208
11209         * linux-s390-low.c (s390_collect_ptrace_register): New function.
11210         (s390_supply_ptrace_register): Likewise.
11211         (s390_fill_gregset): Call s390_collect_ptrace_register.
11212         (the_low_target): Update.
11213
11214         * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
11215         (ppc_supply_ptrace_register): Likewise.
11216         (the_low_target): Update.
11217
11218         * linux-i386-low.c (the_low_target): Update.
11219         * linux-x86-64-low.c (the_low_target): Update.
11220
11221 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
11222
11223         * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
11224         reg-s390.o and reg-s390x.o.
11225
11226         * linux-low.c (new_inferior): New global variable.
11227         (linux_create_inferior, linux_attach): Set it.
11228         (linux_wait_for_process): Call the_low_target.arch_setup after the
11229         target has stopped for the first time.
11230         (initialize_low): Do not call the_low_target.arch_setup.
11231
11232         * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
11233         (s390_set_pc): Likewise.
11234         (s390_arch_setup): New function.
11235         (the_low_target): Use s390_arch_setup as arch_setup routine.
11236
11237         * regcache.c (realloc_register_cache): New function.
11238         (set_register_cache): Call it for each existing regcache.
11239
11240 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
11241
11242         * server.h (init_registers): Remove prototype.
11243
11244         * linux-low.h (struct linux_target_ops): Add arch_setup field.
11245         * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
11246         instead of init_registers ().
11247         * linux-arm-low.c (init_registers_arm): Add prototype.
11248         (init_registers_arm_with_iwmmxt): Likewise.
11249         (the_low_target): Add initializer for arch_setup field.
11250         * linux-cris-low.c (init_registers_cris): Add prototype.
11251         (the_low_target): Add initializer for arch_setup field.
11252         * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
11253         (the_low_target): Add initializer for arch_setup field.
11254         * linux-i386-low.c (init_registers_i386_linux): Add prototype.
11255         (the_low_target): Add initializer for arch_setup field.
11256         * linux-ia64-low.c (init_registers_ia64): Add prototype.
11257         (the_low_target): Add initializer for arch_setup field.
11258         * linux-m32r-low.c (init_registers_m32r): Add prototype.
11259         (the_low_target): Add initializer for arch_setup field.
11260         * linux-m68k-low.c (init_registers_m68k): Add prototype.
11261         (the_low_target): Add initializer for arch_setup field.
11262         * linux-mips-low.c (init_registers_mips_linux): Add prototype.
11263         (init_registers_mips64_linux): Likewise.
11264         (the_low_target): Add initializer for arch_setup field.
11265         * linux-ppc-low.c (init_registers_ppc): Add prototype.
11266         (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
11267         (the_low_target): Add initializer for arch_setup field.
11268         * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
11269         (init_registers_powerpc_64): Likewise.
11270         (the_low_target): Add initializer for arch_setup field.
11271         * linux-s390-low.c (init_registers_s390): Add prototype.
11272         (init_registers_s390x): Likewise.
11273         (the_low_target): Add initializer for arch_setup field.
11274         * linux-sh-low.c (init_registers_sh): Add prototype.
11275         (the_low_target): Add initializer for arch_setup field.
11276         * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
11277         (the_low_target): Add initializer for arch_setup field.
11278         * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
11279         (the_low_target): Add initializer for arch_setup field.
11280
11281         * win32-low.h (struct win32_target_ops): Add arch_setup field.
11282         * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
11283         instead of init_registers ().
11284         * win32-arm-low.c (init_registers_arm): Add prototype.
11285         (the_low_target): Add initializer for arch_setup field.
11286         * win32-i386-low.c (init_registers_i386): Add prototype.
11287         (the_low_target): Add initializer for arch_setup field.
11288
11289         * spu-low.c (init_registers_spu): Add prototype.
11290         (initialize_low): Call initialie_registers_spu () instead of
11291         initialize_registers ().
11292
11293 2008-02-19  Pedro Alves  <pedro@codesourcery.com>
11294
11295         * server.c (handle_v_requests): When handling the vRun and vAttach
11296         packets, if already debugging a process, don't kill it.  Return an
11297         error instead.
11298
11299 2008-02-17  Daniel Jacobowitz  <dan@codesourcery.com>
11300
11301         * server.c (handle_query): Correct length check.
11302
11303 2008-02-14  Pedro Alves  <pedro_alves@portugalmail.pt>
11304
11305         * win32-low.c (do_initial_child_stuff): Add process handle
11306         parameter.  Set current_process_handle and current_process_id from the
11307         parameters. Clear globals.
11308         (win32_create_inferior): Don't set current_process_handle and
11309         current_process_id here.  Instead pass them on the call to
11310         do_initial_child_stuff.
11311         (win32_attach): Likewise.
11312         (win32_clear_inferiors): New.
11313         (win32_kill): Don't close the current process handle or the
11314         current thread handle here.  Instead call win32_clear_inferiors.
11315         (win32_detach): Don't open a new handle to the process.  Call
11316         win32_clear_inferiors.
11317         (win32_join): Don't rely on current_process_handle; open a new
11318         handle using the process id.
11319         (win32_wait): Call win32_clear_inferiors when the inferior process
11320         has exited.
11321
11322 2008-02-14  Daniel Jacobowitz  <dan@codesourcery.com>
11323
11324         * server.c (monitor_show_help): Add "exit".
11325
11326 2008-02-11  Maxim Grigoriev  <maxim2405@gmail.com>
11327
11328         * Makefile.in (SFILES): Add linux-xtensa-low.c.
11329         (clean): Add reg-xtensa.c.
11330         (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
11331         * configure.srv (xtensa*-*-linux*) New target.
11332         * linux-xtensa-low.c: New.
11333         * xtensa-xtregs.c: New.
11334
11335 2008-02-01  Pedro Alves  <pedro_alves@portugalmail.pt>
11336
11337         * hostio.c: Don't include errno.h.
11338         (errno_to_fileio_errno): Move to hostio-errno.
11339         * hostio.c: (hostio_error): Remove the error parameter.  Defer the
11340         error number outputting to the target->hostio_last_error callback.
11341         (hostio_packet_error): Use FILEIO_EINVAL directly.
11342         (handle_open, handle_pread, hostio_error, handle_unlink): Update
11343         calls to hostio_error.
11344         * hostio-errno.c: New.
11345         * server.h (hostio_last_error_from_errno): Declare.
11346         * target.h (target_ops): Add hostio_last_error member.
11347         * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
11348         as hostio_last_error handler.
11349         * spu-low.c (spu_target_ops): Likewise.
11350         * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
11351         (wince_hostio_last_error): New functions.
11352         (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
11353         as hostio_last_error handler.
11354         (win32_target_ops) [!_WIN32_WCE]: Register
11355         hostio_last_error_from_errno as hostio_last_error handler.
11356         * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
11357         (hostio-errno.o): New rule.
11358         * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
11359         * configure.srv (srv_hostio_err_objs): New variable.  Default to
11360         hostio-errno.o.
11361         (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
11362         * configure: Regenerate.
11363
11364 2008-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
11365
11366         * linux-low.c (linux_attach_lwp): Do not _exit after errors.
11367         (linux_kill, linux_detach): Clean up the process list.
11368         * remote-utils.c (remote_open): Improve port number parsing.
11369         (putpkt_binary, input_interrupt): Only send interrupts if the target
11370         is running.
11371         * server.c (extended_protocol): Make static.
11372         (attached): Define earlier.
11373         (exit_requested, response_needed, program_argv): New variables.
11374         (target_running): New.
11375         (start_inferior): Clear attached here.
11376         (attach_inferior): Set attached here.
11377         (require_running): Define.
11378         (handle_query): Use require_running and target_running.  Implement
11379         "monitor exit".
11380         (handle_v_attach, handle_v_run): New.
11381         (handle_v_requests): Use require_running.  Handle vAttach and vRun.
11382         (gdbserver_usage): Update.
11383         (main): Redo argument parsing.  Handle --debug and --multi.  Handle
11384         --attach along with other options or after the port.  Save
11385         program_argv.  Support no initial program.  Resynchronize
11386         communication with GDB after an error.  Handle "monitor exit".
11387         Use require_running and target_running.  Always allow the extended
11388         protocol.  Do not error out for Hc0 or Hc-1.  Do not automatically
11389         restart in extended mode.
11390         * README: Refer to the GDB manual.  Update --attach usage.
11391
11392 2007-12-20  Andreas Schwab  <schwab@suse.de>
11393
11394         * linux-low.c (STACK_SIZE): Define.
11395         (linux_tracefork_child): Use it.  Use __clone2 on ia64.
11396         (linux_test_for_tracefork): Likewise.
11397
11398 2007-12-18  Daniel Jacobowitz  <dan@codesourcery.com>
11399
11400         * linux-low.c (linux_wait_for_event): Update messages.  Do not
11401         reinsert auto-delete breakpoints.
11402         * mem-break.c (struct breakpoint): Change return type of handler to
11403         int.
11404         (set_breakpoint_at): Update handler type.
11405         (reinsert_breakpoint_handler): Return 1 instead of calling
11406         delete_breakpoint.
11407         (reinsert_breakpoint_by_bp): Check for the original breakpoint before
11408         setting a new one.
11409         (check_breakpoints): Delete auto-delete breakpoints and return 2.
11410         * mem-break.h (set_breakpoint_at): Update handler type.
11411         * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
11412         * win32-low.c (auto_delete_breakpoint): New.
11413         (get_child_debug_event): Use it.
11414
11415 2007-12-16  Daniel Jacobowitz  <dan@codesourcery.com>
11416
11417         * configure.ac: Check for pread and pwrite.
11418         * hostio.c (handle_pread): Fall back to lseek and read.
11419         (handle_pwrite): Fall back to lseek and write.
11420         * config.in, configure: Regenerated.
11421
11422 2007-12-07  Daniel Jacobowitz  <dan@codesourcery.com>
11423
11424         * server.c (myresume): Add own_buf argument.
11425         (main): Update calls.
11426
11427 2007-12-06  Daniel Jacobowitz  <dan@codesourcery.com>
11428
11429         * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
11430         * remote-utils.c (remote_open): Do not call disable_async_io.
11431         (block_async_io): Delete.
11432         (unblock_async_io): Make static.
11433         (initialize_async_io): New.
11434         * server.c (handle_v_cont): Handle async I/O here.
11435         (myresume): Likewise.  Move other common resume tasks here...
11436         (main): ... from here.  Call initialize_async_io.  Disable async
11437         I/O before the main loop.
11438         * server.h (initialize_async_io): Declare.
11439         (block_async_io, unblock_async_io): Delete prototypes.
11440         * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
11441
11442 2007-12-06  Mick Davis  <mickd@goanna.iinet.net.au>
11443
11444         * remote-utils.c (readchar): Allow binary data in received messages.
11445
11446 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11447
11448         * win32-low.c (attaching): New global.
11449         (win32_create_inferior): Clear the `attaching' global.
11450         (win32_attach): Set the `attaching' global.
11451         (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
11452         attaching.  Only set a breakpoint at the entry point if not
11453         attaching.
11454
11455 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11456
11457         * server.c (main): Don't report dll events on the initial
11458         connection on attaches.
11459
11460 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11461
11462         * server.c (main): Relax numerical bases supported for the pid of
11463         the --attach command line argument.
11464
11465 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11466
11467         * win32-low.c (win32_attach): Call OpenProcess before
11468         DebugActiveProcess, not after.  Add last error output to error
11469         call.
11470
11471 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11472
11473         * win32-low.c (win32_get_thread_context)
11474         (win32_set_thread_context): New functions.
11475         (thread_rec): Use win32_get_thread_context.
11476         (continue_one_thread, win32_resume): Use win32_set_thread_context.
11477         * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
11478         field.
11479
11480 2007-12-03  Leo Zayas
11481             Pedro Alves  <pedro_alves@portugalmail.pt>
11482
11483         * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
11484         global variables.
11485         (child_add_thread): Minor cleanup.
11486         (child_continue): Resume artificially suspended threads before
11487         calling ContinueDebugEvent.
11488         (suspend_one_thread): New.
11489         (fake_breakpoint_event): New.
11490         (get_child_debug_event): Change return type to int.  Check here if
11491         gdb sent an interrupt request.  If a soft interrupt was requested,
11492         fake a breakpoint event.  Return 0 if there is no event to handle,
11493         and 1 otherwise.
11494         (win32_wait): Don't check here if gdb sent an interrupt request.
11495         Ensure there is a valid event to handle.
11496         (win32_request_interrupt): Add soft interruption method as last
11497         resort.
11498
11499 2007-12-03  Leo Zayas
11500             Pedro Alves  <pedro_alves@portugalmail.pt>
11501
11502         * win32-low.h (win32_thread_info): Add descriptions to the
11503         structure members.  Replace `suspend_count' counter by a
11504         `suspended' flag.
11505         * win32-low.c (thread_rec): Update condition of when to get the
11506         context from the inferior.  Rely on ContextFlags being set if it
11507         has already been retrieved.  Only suspend the inferior thread if
11508         we haven't already.  Warn if that fails.
11509         (continue_one_thread): s/suspend_count/suspended/.  Only call
11510         ResumeThread once.  Warn if that fails.
11511
11512 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
11513
11514         * win32-low.c (win32_wait): Don't read from the inferior when it
11515         has already exited.
11516
11517 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
11518
11519         * Makefile.in (win32_low_h): New variable.
11520         (win32-low.o): Add dependency on $(win32_low_h).
11521         (win32-arm-low.o, win32-i386-low.o): New rules.
11522
11523 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
11524
11525         * hostio.c: Correct copyright year.
11526
11527 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
11528
11529         * Makefile.in (OBS): Add hostio.o.
11530         (hostio.o): New rule.
11531         * server.h (handle_vFile): Declare.
11532         * hostio.c: New file.
11533         * server.c (handle_v_requests): Take packet_len and new_packet_len
11534         for binary packets.  Call handle_vFile.
11535         (main): Update call to handle_v_requests.
11536
11537 2007-11-05  Daniel Jacobowitz  <dan@codesourcery.com>
11538
11539         * linux-low.c: Include <sched.h>.
11540
11541 2007-11-01  Daniel Jacobowitz  <dan@codesourcery.com>
11542
11543         * linux-low.c (linux_tracefork_grandchild): New.
11544         (linux_tracefork_child): Use clone.
11545         (linux_test_for_tracefork): Use clone; allocate and free a stack.
11546
11547 2007-10-31  Joel Brobecker  <brobecker@adacore.com>
11548
11549         * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
11550
11551 2007-10-24  Daniel Jacobowitz  <dan@codesourcery.com>
11552
11553         * linux-low.c (handle_extended_wait): Handle unexpected signals.
11554
11555 2007-10-23  Daniel Jacobowitz  <dan@codesourcery.com>
11556
11557         * inferiors.c (change_inferior_id): Delete.
11558         (add_pid_to_list, pull_pid_from_list): New.
11559         * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
11560         (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
11561         (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
11562         (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
11563         (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
11564         (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
11565         (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
11566         (using_threads): Always set to 1.
11567         (handle_extended_wait): New.
11568         (add_process): Do not set TID.
11569         (linux_create_inferior): Set must_set_ptrace_flags.
11570         (linux_attach_lwp): Remove TID argument.  Do not check using_threads.
11571         Use PTRACE_SETOPTIONS.  Call new_thread_notify.  Update all callers.
11572         (linux_thread_alive): Rename TID argument to LWPID.
11573         (linux_wait_for_process): Handle unknown processes.  Do not use TID.
11574         (linux_wait_for_event): Do not use TID or check using_threads.  Update
11575         call to dead_thread_notify.  Call handle_extended_wait.
11576         (linux_create_inferior): Use PTRACE_SETOPTIONS.
11577         (send_sigstop): Delete sigstop_sent.
11578         (wait_for_sigstop): Avoid TID.
11579         (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
11580         (linux_test_for_tracefork): New.
11581         (linux_lookup_signals): Use thread_db_active and
11582         linux_supports_tracefork_flag.
11583         (initialize_low): Use thread_db_active and linux_test_for_tracefork.
11584         * linux-low.h (get_process_thread): Avoid TID.
11585         (struct process_ifo): Move thread_known and tid to the end.  Remove
11586         sigstop_sent.
11587         (linux_attach_lwp, thread_db_init): Update prototypes.
11588         * server.h (change_inferior_id): Delete prototype.
11589         (add_pid_to_list, pull_pid_from_list): New prototypes.
11590         * thread-db.c (thread_db_use_events): New.
11591         (find_first_thread): Rename to...
11592         (find_one_thread): ...this.  Update callers and messages.  Do not
11593         call fatal.  Check thread_db_use_events.  Do not call
11594         change_inferior_id or new_thread_notify.
11595         (maybe_attach_thread): Update.  Do not call new_thread_notify.
11596         (thread_db_init): Set thread_db_use_events.  Check use_events.
11597         * utils.c (fatal, warning): Correct message prefix.
11598
11599 2007-10-15  Daniel Jacobowitz  <dan@codesourcery.com>
11600
11601         * Makefile.in (clean): Remove new files.
11602         (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
11603         (powerpc-64.o, powerpc-64.c): New rules.
11604         * configure.srv: Use alternate register sets for powerpc64-*-linux*
11605         with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
11606         with SPE.
11607         * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
11608         SPE targets.
11609         (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
11610         (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
11611         (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
11612         (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
11613         (target_regsets): Add AltiVec and SPE register sets.
11614         * configure.ac: Check for AltiVec and SPE.
11615         * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
11616         (ppc_fill_vrregset, ppc_store_vrregset): New.
11617         (target_regsets): Add AltiVec register set.
11618         * configure: Regenerated.
11619
11620 2007-09-19  Daniel Jacobowitz  <dan@codesourcery.com>
11621
11622         * linux-low.c (O_LARGEFILE): Define.
11623         (linux_read_memory): Use /proc/PID/mem.
11624         * configure.ac: Use AC_GNU_SOURCE.  Check for pread64.
11625         * configure, config.in: Regenerated.
11626
11627 2007-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
11628
11629         * linux-low.c (linux_wait_for_event): Do not pass signals while
11630         single-stepping.
11631
11632 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11633
11634         * win32-low.c (create_process): New.
11635         (win32_create_inferior): Use create_process instead of
11636         CreateProcess.  If create_process failed retry appending an ".exe"
11637         suffix.  Store the GetLastError result immediatelly after
11638         create_process calls and use it on the call to error.
11639
11640 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11641
11642         * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11643
11644 2007-08-23  Joel Brobecker  <brobecker@adacore.com>
11645
11646         * configure.ac: Switch license to GPLv3.
11647
11648 2007-08-01  Michael Snyder  <msnyder@access-company.com>
11649
11650         * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11651
11652 2007-07-31  Pedro Alves  <pedro_alves@portugalmail.pt>
11653
11654         * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11655         typedef.
11656         (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11657         (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL.  Get
11658         CloseToolhelp32Snapshot.
11659         (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11660         CloseToolhelp32Snapshot.
11661
11662 2007-07-27  Michael Snyder  <michael.snyder@access-company.com>
11663
11664         * server.c (main): Check for inferior exit before main loop.
11665
11666 2007-07-18  Pedro Alves  <pedro_alves@portugalmail.pt>
11667
11668         * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11669         instead of on tmp_desc.
11670
11671 2007-07-17  Pedro Alves  <pedro_alves@portugalmail.pt>
11672             Daniel Jacobowitz  <dan@codesourcery.com>
11673
11674         * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11675         (add_thread): Minor cleanups.
11676         (clear_inferiors): Move lower in the file.  Clear the DLL
11677         list.
11678         (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11679         * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11680         (xml_escape_text): New.
11681         * server.c (handle_query): Handle qXfer:libraries:read.  Report it
11682         for qSupported.
11683         (handle_v_cont): Report errors.
11684         (gdbserver_version): Update.
11685         (main): Correct size of own_buf.  Do not report initial DLL events.
11686         * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11687         (unloaded_dll, xml_escape_text): New.
11688         * win32-low.c (enum target_waitkind): Update comments.
11689         (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11690         (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11691         (win32_EnumProcessModules, win32_GetModuleInformation)
11692         (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11693         (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11694         (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11695         (win32_Module32First, win32_Module32Next, load_toolhelp)
11696         (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11697         (get_child_debug_event): Handle DLL events.
11698         (win32_wait): Likewise.
11699
11700 2007-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
11701
11702         * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11703         * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11704
11705 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
11706
11707         * win32-low.c (handle_output_debug_string): Ignore event if not
11708         waiting.
11709
11710 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
11711
11712         * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11713
11714 2007-07-03  Daniel Jacobowitz  <dan@codesourcery.com>
11715
11716         * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11717
11718 2007-07-02  Daniel Jacobowitz  <dan@codesourcery.com>
11719
11720         * inferiors.c (change_inferior_id): Add comment.
11721         * linux-low.c (check_removed_breakpoint): Add an early
11722         prototype.  Improve debug output.
11723         (linux_attach): Doc update.
11724         (linux_detach_one_process, linux_detach): Clean up before releasing
11725         each process.
11726         (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11727         * linux-low.h (struct process_info): Doc improvement.
11728         * mem-break.c (delete_all_breakpoints): New.
11729         * mem-break.h (delete_all_breakpoints): New prototype.
11730         * thread-db.c (find_first_thread): New.
11731         (thread_db_create_event): Call it instead of
11732         thread_db_find_new_threads.  Clean up unused variables.
11733         (maybe_attach_thread): Remove first thread handling.
11734         (thread_db_find_new_threads): Use find_first_thread.
11735         (thread_db_get_tls_address): Likewise.
11736
11737 2007-06-27  Daniel Jacobowitz  <dan@codesourcery.com>
11738
11739         * thread-db.c (thread_db_find_new_threads): Add prototype.
11740         (thread_db_create_event): Check for the main thread before adding
11741         a new thread.
11742         (maybe_attach_thread): Only enable event reporting if TID == 0.
11743         (thread_db_get_tls_address): Check for new threads.
11744
11745 2007-06-20  Daniel Jacobowitz  <dan@codesourcery.com>
11746
11747         * linux-low.c (linux_create_inferior): Try execv before execvp.
11748         * spu-low.c (spu_create_inferior): Likewise.
11749
11750 2007-06-13  Mike Frysinger  <vapier@gentoo.org>
11751
11752         * linux-low.c (linux_create_inferior): Change execv to execvp.
11753         * spu-low.c (spu_create_inferior): Likewies.
11754
11755 2007-06-13  Daniel Jacobowitz  <dan@codesourcery.com>
11756
11757         * Makefile.in (clean): Clean new files instead of deleted ones.
11758         (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11759         (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11760         rules.
11761         * configure.srv: Specify XML files and new regformats for MIPS and
11762         MIPS64 GNU/Linux.
11763         * linux-mips-low.c (mips_num_regs): Set to only used registers.
11764         (mips_regmap): Do not fetch $0.  Remove unused registers.  Add
11765         an entry for the restart register.
11766         (mips_cannot_fetch_register, mips_cannot_store_register)
11767         (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11768         register names to match the XML descriptions.
11769         (mips_fill_gregset, mips_store_gregset): Likewise.  Handle the
11770         restart register instead of $0.
11771
11772 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
11773             Markus Deuling  <deuling@de.ibm.com>
11774
11775         * remote-utils.c (decode_xfer_write): New function.
11776         * server.h (decode_xfer_write): Add prototype.
11777         * server.c (handle_query): Add PACKET_LEN argument.  Support
11778         qXfer:spu:read and qXfer:spu:write packets.
11779         (main): Pass packet_len to handle_query.
11780         * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11781         * target.h (target_ops): Add qxfer_spu.
11782
11783 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
11784
11785         * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11786         accessing non-seekable spufs files.
11787
11788 2007-05-16  Markus Deuling  <deuling@de.ibm.com>
11789
11790         * server.c (handle_query): Add reply for qC packet.
11791
11792 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
11793             Leo Zayas  <lerele@champenstudios@com>
11794
11795         * server.h (check_remote_input_interrupt_request): New function.
11796         * remote_utils.c (INVALID_DESCRIPTOR): New define.
11797         (remote_desc): Initialize with INVALID_DESCRIPTOR.
11798         (input_interrupt): Expose on USE_WIN32API too.  Fix whitespace.
11799         (check_remote_input_interrupt_request): New function.
11800         * server.h (check_remote_input_interrupt_request): Declare.
11801         * win32-low.c (winapi_DebugBreakProcess,
11802         winapi_GenerateConsoleCtrlEvent): New typedefs.
11803         (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11804         to 250 ms.
11805         (win32_wait): Check for remote interrupt request
11806         with check_remote_input_interrupt_request.
11807         (win32_request_interrupt): New function.
11808         (win32_target_op): Set request_interrupt to win32_request_interrupt.
11809
11810 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
11811
11812         * win32-low.c (debug_registers_changed,
11813         debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11814         CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11815         CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11816         (thread_rec): Get context using the low target.
11817         (child_add_thread): Call thread_added on the low target,
11818         which does the same thing.
11819         (regptr): Delete.
11820         (do_initial_child_stuff): Remove debug registers references.
11821         Set context using the low target.  Resume threads after
11822         setting the contexts.
11823         (child_continue): Remove dead variable.  Remove debug
11824         registers references.
11825         (child_fetch_inferior_registers): Go through the low target.
11826         (do_child_store_inferior_registers): Remove.
11827         (child_store_inferior_registers): Go through the low target.
11828         (win32_resume): Remove debug registers references.
11829         Set context using the low target.
11830         (handle_exception): Change return type to void.  Don't record
11831         context here.  Set status to TARGET_WAITKIND_SPURIOUS on a
11832         first chance exception.
11833         (get_child_debug_event): Change return type to void.  Remove
11834         goto loop.  Always return after waiting for debug event.
11835         (win32_wait): Convert to switch statement.  Handle spurious
11836         events.
11837
11838         * win32-i386-low.c (debug_registers_changed,
11839         debug_registers_used): New.
11840         (initial_stuff): Rename to ...
11841         (i386_initial_stuff): ... this.  Clear debug registers
11842         state variables.
11843         (store_debug_registers): Delete.
11844         (i386_get_thread_context): New.
11845         (load_debug_registers): Delete.
11846         (i386_set_thread_context): New.
11847         (i386_thread_added): New.
11848         (single_step): Rename to ...
11849         (i386_single_step): ... this.
11850         (do_fetch_inferior_registers): Rename to ...
11851         (i386_fetch_inferior_register): ... this.
11852         (i386_store_inferior_register): New.
11853         (the_low_target): Adapt to new interface.
11854
11855         * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11856         (arm_get_thread_context): New.
11857         (arm_set_thread_context): New.
11858         (regptr): New.
11859         (do_fetch_inferior_registers): Rename to ...
11860         (arm_fetch_inferior_register): ... this.
11861         (arm_store_inferior_register): New.
11862         (arm_wince_breakpoint): Reimplement as unsigned long.
11863         (arm_wince_breakpoint_len): Define.
11864         (the_low_target): Adapt to new interface.
11865
11866         * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11867         load_debug_registers.  Add get_thread_context, set_thread_context,
11868         thread_added and store_inferior_register.  Rename
11869         fetch_inferior_registers to fetch_inferior_register.
11870         (regptr): Remove declaration.
11871
11872 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
11873
11874         * linux-low.c (linux_detach): Change return type to int.  Return 0.
11875         * spu-low.c (spu_detach): Likewise.
11876
11877 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
11878
11879         * target.h (target_ops): Change return type of detach to int.
11880         Add join.
11881         (join_inferior): New.
11882         * server.c (main): Don't skip detach support on mingw32.
11883         If the inferior doesn't support detaching return error.
11884         Call join_inferior instead of using waitpid.
11885         * linux-low.c (linux_join): New.
11886         (linux_target_op): Add linux_join.
11887         * spu-low.c (spu_join): New.
11888         (spu_target_ops): Add spu_join.
11889         * win32-low.c (win32_detach): Adapt to new interface.
11890         Reopen current_process_handle before detaching.  Issue a child
11891         resume before detaching.
11892         (win32_join): New.
11893         (win32_target_op): Add win32_join.
11894
11895 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
11896
11897         * win32-low.c (win32-attach): Fix return value.
11898         * target.h (target_ops): Describe ATTACH return values.
11899
11900 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
11901
11902         * win32-low.c (GETPROCADDRESS): Define.
11903         (winapi_DebugActiveProcessStop): Add WINAPI.  typedef as pointer.
11904         (winapi_DebugSetProcessKillOnExit): Likewise.
11905         (win32_create_inferior): Force usage of ansi CreateProcessA.
11906         (win32_attach): Use GETPROCADDRESS.
11907         (win32_detach): Likewise.
11908
11909 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
11910
11911         * win32-low.c (win32_wait): Don't use WSTOPSIG.
11912
11913 2007-03-30  Pedro Alves  <pedro_alves@portugalmail.pt>
11914
11915         * win32-low.c: Commit leftover changes from 2007-03-29.
11916
11917 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
11918
11919         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11920         fields short instead of int.  Add explicit padding.
11921         (i387_cache_to_fsave): Remove unnecessary casts.
11922         (i387_fsave_to_cache): Doc fix.
11923         (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11924
11925 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
11926
11927         * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11928         (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11929
11930 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
11931
11932         * configure.srv (arm*-*-mingw32ce*): Move near the other
11933         arm targets.
11934
11935 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
11936
11937         * configure.ac: Add errno checking.
11938         (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11939         sys/file.h and malloc.h.
11940         (AC_CHECK_DECLS): Add perror.
11941         (srv_mingwce): Handle.
11942         * configure.srv (i[34567]86-*-cygwin*): Add
11943         win32-i386-low.o to srv_tgtobj.
11944         (i[34567]86-*-mingw*): Likewise.
11945         (arm*-*-mingw32ce*): Add case.
11946         * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11947         HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11948         [__MINGW32CE__] (strerror): New function.
11949         [__MINGW32CE__] (errno): Define to GetLastError.
11950         [__MINGW32CE__] (COUNTOF): New macro.
11951         (remote_open): Remove extra close call.
11952         * mem-break.c (delete_breakpoint_at): New function.
11953         * mem-break.h (delete_breakpoint_at): Declare.
11954         * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11955         HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11956         [USE_WIN32API] (read, write): Add char* casts.
11957         * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11958         * server.h: Include wincecompat.h on Windows CE.
11959         [HAVE_ERRNO_H]: Check.
11960         (perror): Declare if not declared.
11961         * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11962         (perror_with_name): Remove errno declaration.
11963         * wincecompat.h: New.
11964         * wincecompat.c: New.
11965         * win32-low.h: New.
11966         * win32-arm-low.c: New.
11967         * win32-i386-low.c: New.
11968         (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11969         (OUTMSG2): Make it safe.
11970         (_T): New macro.
11971         (COUNTOF): New macro.
11972         (NUM_REGS): Get it from the low target.
11973         (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11974         CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11975         (thread_rec): Let low target handle debug registers.
11976         (child_add_thread): Likewise.
11977         (child_init_thread_list): Likewise.
11978         (continue_one_thread): Likewise.
11979         (regptr): New.
11980         (do_child_fetch_inferior_registers): Move to ...
11981         * win32-i386-low.c: ... here, and rename to ...
11982         (do_fetch_inferior_registers): ... this.
11983         * win32-low.c (child_fetch_inferior_registers):
11984         Go through the low target.
11985         (do_child_store_inferior_registers): Use regptr.
11986         (strwinerror): New function.
11987         (win32_create_inferior): Handle Windows CE.
11988         Use strwinerror instead of strerror on Windows error
11989         codes.  Add program to the error output.
11990         Don't close the main thread handle on Windows CE.
11991         (win32_attach): Use coredll.dll on Windows CE.
11992         (win32_kill): Close current process and current
11993         thread handles.
11994         (win32_detach): Use coredll.dll on Windows CE.
11995         (win32_resume): Let low target handle debug registers, and
11996         step request.
11997         (handle_exception): Add/Remove initial breakpoint.  Avoid
11998         non-existant WSTOPSIG on Windows CE.
11999         (win32_read_inferior_memory): Cast to remove warning.
12000         (win32_arch_string): Go through the low target.
12001         (initialize_low): Call set_breakpoint_data with the low
12002         target's breakpoint.
12003         * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
12004         FOP_REGNUM, mappings): Move to ...
12005         * win32-i386-low.c: ... here.
12006         * win32-low.c (win32_thread_info): Move to ...
12007         * win32-low.h: ... here.
12008         * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
12009         win32-arm-low.c and wincecompat.c.
12010         (all:): Add $EXEEXT.
12011         (install-only:): Likewise.
12012         (gdbserver:): Likewise.
12013         (gdbreplay:): Likewise.
12014         * config.in: Regenerate.
12015         * configure: Regenerate.
12016
12017 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
12018
12019         * win32-low.c: Rename typedef thread_info to
12020         win32_thread_info throughout.
12021
12022 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
12023
12024         * win32-i386-low.c: Rename to ...
12025         * win32-low.c: ... this.
12026         * configure.srv: Replace win32-i386-low.o with win32-low.o.
12027         * Makefile.in: Likewise.
12028
12029 2007-03-27  Pedro Alves  <pedro_alves@portugalmail.pt>
12030
12031         * remote-utils.c (monitor_output): Constify msg parameter.
12032         * server.h (monitor_output): Likewise.
12033         * win32-i386-low.c (handle_output_debug_string): New.
12034         (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
12035         handle_output_debug_string.
12036         (get_child_debug_event): Likewise.
12037
12038 2007-03-27  Mat Hostetter  <mat@lcs.mit.edu>
12039
12040         * server.c (main): Correct strtoul check.
12041
12042 2007-03-27  Jon Ringle  <jon@ringle.org>
12043
12044         * linux-low.c: Check __ARCH_HAS_MMU__ also.
12045
12046 2007-03-27  Brooks Moses  <brooks.moses@codesourcery.com>
12047
12048         * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
12049
12050 2007-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
12051
12052         * terminal.h: Check HAVE_SGTTY_H.
12053
12054 2007-02-27  Mat Hostetter  <mat@lcs.mit.edu>
12055
12056         * remote-utils.c (remote_open): Print out the assigned port number.
12057
12058 2007-02-26  Daniel Jacobowitz  <dan@codesourcery.com>
12059
12060         * remote-utils.c (monitor_output): New function.
12061         * server.c (debug_threads): Define here.
12062         (monitor_show_help): New function.
12063         (handle_query): Handle qRcmd.
12064         (main): Do not handle 'd' packet.
12065         * server.h (debug_threads, remote_debug, monitor_output): Declare.
12066         * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
12067         of debug_threads.
12068
12069 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
12070
12071         * Makefile.in (EXEEXT): New.
12072         (clean): Use $(EXEEXT).
12073
12074 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
12075
12076         * target.h (target_ops): Rename send_signal to request_interrupt,
12077         and remove enum target_signal parameter.
12078         * linux-low.c (linux_request_interrupt): Rename from
12079         linux_send_signal, and always send SIGINT.
12080         * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
12081         and always send SIGINT.
12082         * remote-utils.c (putpkt_binary): Call request_interrupt, instead
12083         of send_signal.
12084         (input_interrupt): Likewise.
12085
12086 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
12087
12088         * server.c (get_features_xml): Check if target implemented
12089         arch_string.
12090         * win32-i386-low.c (win32_arch_string): New.
12091         (win32_target_ops): Add win32_arch_string as arch_string member.
12092
12093 2007-02-22  Markus Deuling  <deuling@de.ibm.com>
12094
12095         * spu-low.c (spu_arch_string): New.
12096         (spu_target_ops): Add spu_arch_string.
12097
12098 2007-02-16  Daniel Jacobowitz  <dan@codesourcery.com>
12099
12100         * remote-utils.c: Remove HAVE_TERMINAL_H check.
12101         * configure.ac: Do not check for terminal.h.
12102         * configure, config.in: Regenerated.
12103
12104 2007-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
12105
12106         * Makefile.in (OBS): Add $(XML_BUILTIN).
12107         (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
12108         (clean): Update.
12109         (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
12110         (arm-with-iwmmxt.c): New.
12111         * config.in, configure: Regenerate.
12112         * configure.ac: Check for iWMMXt.  Handle srv_xmltarget,
12113         srv_xmlbuiltin, and srv_xmlfiles.  Define USE_XML.
12114         * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
12115         (arm*-*-linux*): Add iWMMXt and regset support.
12116         * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
12117         (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
12118         (arm_store_wmmxregset, target_regsets): New.
12119         * server.c (get_features_xml): Take annex argument.  Check builtin
12120         XML documents.
12121         (handle_query): Handle multiple annexes.
12122
12123 2007-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
12124
12125         * remote-utils.c [USE_WIN32API] (read, write): Define.
12126         (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
12127         write.
12128
12129 2007-01-09  Daniel Jacobowitz  <dan@codesourcery.com>
12130
12131         * linux-i386-low.c (the_low_target): Set arch_string.
12132         * linux-x86-64-low.c (the_low_target): Likewise.
12133         * linux-low.c (linux_arch_string): New.
12134         (linux_target_ops): Add it.
12135         * linux-low.h (struct linux_target_ops): Add arch_string.
12136         * server.c (write_qxfer_response): Use const void * for DATA.
12137         (get_features_xml): New.
12138         (handle_query): Handle qXfer:features:read.  Report it for qSupported.
12139         * target.h (struct target_ops): Add arch_string method.
12140
12141 2007-01-03  Denis Pilat  <denis.pilat@st.com>
12142             Daniel Jacobowitz  <dan@codesourcery.com>
12143
12144         * linux-low.c (linux_kill): Handle being called with no threads.
12145         * win32-i386-low.c (win32_kill): Likewise.
12146         (get_child_debug_event): Clear current_process_handle.
12147
12148 2006-12-30  Denis PILAT  <denis.pilat@st.com>
12149             Daniel Jacobowitz  <dan@codesourcery.com>
12150
12151         * remote-utils.c (remote_open): Check the type of specified
12152         serial port devices before opening them.
12153         * server.c (main): Kill the inferior if an error occurs during
12154         the first remote_open.
12155
12156 2006-12-05  Markus Deuling  <deuling@de.ibm.com>
12157
12158         * README: Update supported targets.
12159
12160 2006-11-28  Daniel Jacobowitz  <dan@codesourcery.com>
12161
12162         * Makefile.in (clean): Remove reg-mips64.c.
12163         (reg-mips64.c, reg-mips64.o): New rules.
12164         * configure.srv: Handle mips64.  Include regset support for mips.
12165         * linux-mips-low.c (union mips_register): New.
12166         (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
12167         (mips_breakpoint, mips_breakpoint_at): Use int.
12168         (mips_collect_register, mips_supply_register)
12169         (mips_collect_register_32bit, mips_supply_register_32bit)
12170         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12171         (mips_store_fpregset, target_regsets): New.
12172         * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
12173
12174 2006-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
12175
12176         * configure.srv: Add target "spu*-*-*".
12177         * Makefile.in (clean): Remove reg-spu.c.
12178         (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
12179         * spu-low.c: New file.
12180
12181 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
12182
12183         * configure.ac: Correct td_thr_tls_get_addr test.
12184         * configure: Regenerated.
12185
12186 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
12187
12188         * linux-low.c (linux_wait_for_event): Reformat.  Use the
12189         pass_signals array.
12190         * remote-utils.c (decode_address_to_semicolon): New.
12191         * server.c (pass_signals, handle_general_set): New.
12192         (handle_query): Mention QPassSignals for qSupported.
12193         (main): Call handle_general_set.
12194         * server.h (pass_signals, decode_address_to_semicolon): New.
12195
12196 2006-11-06  Daniel Jacobowitz  <dan@codesourcery.com>
12197
12198         * server.c (handle_query): Correct error handling for read_auxv.
12199
12200 2005-10-19  Ulrich Weigand  <uweigand@de.ibm.com>
12201
12202         * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
12203         and srv_linux_thread_db to yes.
12204         * linux-s390-low.c (s390_fill_gregset): New function.
12205         (target_regsets): Define data structure.
12206
12207 2006-10-17  Daniel Jacobowitz  <dan@codesourcery.com>
12208
12209         * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
12210         * configure.ac: Use it.  Define HAVE_TD_THR_TLS_GET_ADDR.
12211         * config.in, configure: Regenerated.
12212         * inferiors.c (gdb_id_to_thread): New function.
12213         (gdb_id_to_thread_id): Use it.
12214         * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
12215         * linux-low.h (struct process_info): Add th member.
12216         (thread_db_get_tls_address): New prototype.
12217         * remote-utils.c (decode_address): Make non-static.
12218         * server.c (handle_query): Handle qGetTLSAddr.
12219         * server.h (gdb_id_to_thread, decode_address): New prototypes.
12220         * target.h (struct target_ops): Add get_tls_address.
12221         * thread-db.c (maybe_attach_thread): Save the thread handle.
12222         (thread_db_get_tls_address): New.
12223
12224 2006-09-28  Daniel Jacobowitz  <dan@codesourcery.com>
12225
12226         * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
12227         (linux_resume_one_process): Take a siginfo_t *.  Update all
12228         callers.  Queue it if necessary.  Use PTRACE_SETSIGINFO.
12229         (struct pending_signals): Add a siginfo_t.
12230         (linux_wait_for_process): Always set last_status.
12231         (linux_wait_for_event): Use PTRACE_GETSIGINFO.
12232         (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
12233         * linux-low.h (struct process_info): Add last_status.
12234
12235 2006-09-21  Daniel Jacobowitz  <dan@codesourcery.com>
12236
12237         * remote-utils.c (try_rle): New function.
12238         (putpkt_binary): Use it.
12239
12240 2006-08-19  Daniel Jacobowitz  <dan@codesourcery.com>
12241
12242         * Makefile.in (clean): Clean reg-x86-64-linux.c.
12243         (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
12244         * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
12245         * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
12246         (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
12247         point registers.
12248
12249 2006-08-08  Richard Sandiford  <richard@codesourcery.com>
12250
12251         * server.c (terminal_fd): New variable.
12252         (old_foreground_pgrp): Likewise.
12253         (restore_old_foreground_pgrp): New function.
12254         (start_inferior): Record the terminal file descriptor in terminal_fd
12255         and its original foreground group in old_foreground_pgrp.  Register
12256         restore_old_foreground_pgrp with atexit().
12257
12258 2006-07-26  Daniel Jacobowitz  <dan@codesourcery.com>
12259
12260         * server.c (handle_query): Correct qPart to qXfer.
12261
12262 2006-07-22  Daniel Jacobowitz  <dan@codesourcery.com>
12263
12264         * configure.ac: Check for more headers which are missing on
12265         Windows.  Automatically supply -lwsock32 and USE_WIN32API.
12266         * configure.srv: Add Cygwin and mingw32.
12267         * remote-utils.c: Don't include headers unconditionally which
12268         are missing on mingw32.  Include <winsock.h> for mingw32.
12269         (remote_open): Adjust for mingw32 support.  Flush
12270         standard error after writing to it.
12271         (remote_close, putpkt_binary, input_interrupt, block_async_io)
12272         (unblock_async_io, enable_async_io, disable_async_io)
12273         (readchar, getpkt): Update for Winsock support.
12274         (prepare_resume_reply): Expect a protocol signal number.
12275         * server.c: Disable <sys/wait.h> on mingw32.
12276         (start_inferior): Adjust for mingw32 support.  Flush
12277         standard error after writing to it.
12278         (attach_inferior): Likewise.  Use protocol signal
12279         numbers.
12280         (main): Skip 'D' packet on mingw32.  Use protocol signal numbers
12281         and names.
12282         * win32-i386-low.c: New file.
12283         * Makefile.in (XM_CLIBS): Set.
12284         (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
12285         (win32-i386-low.o): New dependency rule.
12286         * linux-low.c (linux_wait): Use target signal numbers.
12287         * target.h (struct target_ops): Doc fix.
12288         * server.h (target_signal_to_name): New prototype.
12289         * gdbreplay.c: Don't include headers unconditionally which
12290         are missing on mingw32.  Include <winsock.h> for mingw32.
12291         (remote_close, remote_open): Adjust for Winsock support.
12292         * configure, config.in: Regenerated.
12293
12294 2006-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
12295
12296         * server.c (decode_xfer_read, write_qxfer_response): New.
12297         (handle_query): Take a packet length argument.  Handle
12298         qXfer:auxv:read instead of qPart:auxv:read.  Mention it in
12299         the qSupported response.
12300         (main): Update call to handle_query.
12301
12302 2006-06-22  Daniel Jacobowitz  <dan@codesourcery.com>
12303
12304         * remote-utils.c (remote_escape_output, remote_unescape_input): New.
12305         (putpkt_binary): Renamed from putpkt and adjusted for binary
12306         data.
12307         (putpkt): New wrapper for putpkt_binary.
12308         (readchar): Don't mask off the high bit.
12309         (decode_X_packet): New function.
12310         * server.c (main): Call putpkt_binary if a handler sets the packet
12311         length.  Save the length of the incoming packet.  Handle 'X'.
12312         * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
12313
12314 2006-06-21  Daniel Jacobowitz  <dan@codesourcery.com>
12315
12316         * server.c (handle_query): Handle qSupported.
12317
12318 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
12319
12320         * remote-utils.c (all_symbols_looked_up): New variable.
12321         (look_up_one_symbol): Check it.
12322         * server.h (look_up_one_symbol): New declaration.
12323         * thread-db.c (thread_db_init): Set all_symbols_looked_up.
12324
12325 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
12326
12327         * Makefile.in (linux-arm-low.o): Update dependencies.
12328         * linux-arm-low.c: Include "gdb_proc_service.h".
12329         (PTRACE_GET_THREAD_AREA): Define.
12330         (ps_get_thread_area): New function.
12331
12332 2006-05-09  Nathan Sidwell  <nathan@codesourcery.com>
12333
12334         * configure.srv (m68k*-*-uclinux*): New target.
12335         * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
12336         (linux_resume_one_process): Remove extraneous cast.
12337         (linux_read_offsets): New.
12338         (linux_target_op): Add linux_read_offsets on mmuless systems.
12339         * server.c (handle_query): Add qOffsets logic.
12340         * target.h (struct target_ops): Add read_offsets.
12341
12342 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
12343
12344         * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
12345         (PTRACE_GET_THREAD_AREA): Define.
12346         (ps_get_thread_area): New function.
12347         * Makefile.in (linux-i386-low.o, linux-mips-low.o)
12348         (linux-x86-64-low.o): Update.
12349
12350 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
12351
12352         * configure.ac: Remove checks for prfpregset_t.
12353         * gdb_proc_service.h: New file.
12354         * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
12355         new "gdb_proc_service.h".
12356         * proc-service.c: Likewise.
12357         (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
12358         (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
12359         * Makefile.in (gdb_proc_service_h): Updated.
12360         * configure, config.in: Regenerated.
12361
12362 2006-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
12363
12364         * remote-utils.c (prepare_resume_reply): Move declaration
12365         of gdb_id_from_wait to the top of the block.
12366
12367 2006-02-15  Daniel Jacobowitz  <dan@codesourcery.com>
12368
12369         * linux-low.c (regsets_store_inferior_registers): Read the regset
12370         from the target before filling it.
12371
12372 2006-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
12373
12374         * server.c (attach_inferior): Return SIGTRAP for a successful
12375         attach.
12376
12377 2006-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
12378
12379         * Makefile.in (OBS): Add version.o.
12380         (STAGESTUFF): Delete.
12381         (version.o): Add dependencies.
12382         (version.c): Replace rule.
12383         (clean): Remove version.c.
12384         * server.c (gdbserver_version): New.
12385         (gdbserver_usage): Use printf.
12386         (main): Handle --version and --help.
12387         * server.h (version, host_name): Add declarations.
12388
12389 2005-12-23  Eli Zaretskii  <eliz@gnu.org>
12390
12391         * linux-arm-low.c:
12392         * linux-arm-low.c:
12393         * inferiors.c:
12394         * i387-fp.h:
12395         * i387-fp.c:
12396         * gdbreplay.c:
12397         * regcache.c:
12398         * proc-service.c:
12399         * mem-break.h:
12400         * mem-break.c:
12401         * linux-x86-64-low.c:
12402         * linux-sh-low.c:
12403         * linux-s390-low.c:
12404         * linux-ppc64-low.c:
12405         * linux-ppc-low.c:
12406         * linux-mips-low.c:
12407         * linux-m68k-low.c:
12408         * linux-m32r-low.c:
12409         * linux-low.h:
12410         * linux-low.c:
12411         * linux-ia64-low.c:
12412         * linux-i386-low.c:
12413         * linux-crisv32-low.c:
12414         * thread-db.c:
12415         * terminal.h:
12416         * target.h:
12417         * target.c:
12418         * server.h:
12419         * server.c:
12420         * remote-utils.c:
12421         * regcache.h:
12422         * utils.c:
12423         * Makefile.in:
12424         * configure.ac:
12425         * gdbserver.1: Add (C) after Copyright.  Update the FSF
12426         address.
12427
12428 2005-11-13  Daniel Jacobowitz  <dan@codesourcery.com>
12429
12430         * linux-arm-low.c (arm_eabi_breakpoint): New variable.
12431         (arm_breakpoint_at): Recognize both breakpoints.
12432         (the_low_target): Use the correct breakpoint instruction.
12433
12434 2005-11-02  Daniel Jacobowitz  <dan@codesourcery.com>
12435
12436         * configure.srv (x86_64-*-linux*): Turn on thread_db support.
12437         * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
12438         (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
12439         (the_low_target): Update.
12440
12441 2005-10-25  Andreas Schwab  <schwab@suse.de>
12442
12443         * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
12444
12445         * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
12446         (ia64_num_regs): Reduce to 462.
12447
12448 2005-09-17  Daniel Jacobowitz  <dan@codesourcery.com>
12449
12450         * acinclude.m4: Correct quoting.
12451         * aclocal.m4: Regenerated.
12452
12453         Suggested by SZOKOVACS Robert <szo@ies.hu>:
12454         * thread-db.c (thread_db_err_str): Handle TD_VERSION.
12455         (thread_db_init): Call thread_db_err_str.
12456         * configure.ac: Check for TD_VERSION.
12457         * config.in, configure: Regenerated.
12458
12459 2005-07-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12460
12461         * server.h (error, fatal, warning): Add ATTR_FORMAT.
12462
12463 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
12464
12465         * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
12466         is not available.  Define HAVE_PTRACE_GETREGS if it is.
12467         * config.in, configure: Regenerated.
12468         * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
12469         * linux-i386-low.c, linux-m68k-low.c: Update to use
12470         HAVE_PTRACE_GETREGS.
12471         * linux-low.c (regsets_fetch_inferior_registers)
12472         (regsets_store_inferior_registers): Only return 0 if we processed
12473         GENERAL_REGS.
12474         * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
12475         * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
12476
12477 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
12478
12479         * inferiors.c (struct thread_info): Add gdb_id.
12480         (add_thread): Add gdb_id argument.
12481         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
12482         * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
12483         calls to add_thread.
12484         * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
12485         * server.c (handle_query): Use thread_to_gdb_id.
12486         (handle_v_cont, main): Use gdb_id_to_thread_id.
12487         * server.h (add_thread): Update prototype.
12488         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
12489         prototypes.
12490
12491 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
12492
12493         * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
12494         left-padded registers.
12495         * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
12496         * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
12497
12498 2005-07-01  Steve Ellcey  <sje@cup.hp.com>
12499
12500         * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
12501         * configure: Regenerate.
12502         * config.in: Regenerate.
12503         * server.h (NEED_DECLARATION_STRERROR):
12504         Replace with !HAVE_DECL_STRERROR.
12505
12506 2005-06-16  Daniel Jacobowitz  <dan@codesourcery.com>
12507
12508         * linux-low.c (linux_wait, linux_send_signal): Don't test
12509         an unsigned long variable for > 0 if it could be MAX_ULONG.
12510         * server.c (myresume): Likewise.
12511         * target.c (set_desired_inferior): Likewise.
12512
12513 2005-06-13  Mark Kettenis  <kettenis@gnu.org>
12514
12515         * configure.ac: Simplify and improve check for socklen_t.
12516         * configure, config.in: Regenerate.
12517
12518 2005-06-12  Daniel Jacobowitz  <dan@codesourcery.com>
12519
12520         * acconfig.h: Remove.
12521         * configure.ac: Add a test for socklen_t.  Use three-argument
12522         AC_DEFINE throughout.
12523         * config.in: Regenerated using autoheader 2.59.
12524         * configure: Regenerated.
12525
12526         * gdbreplay.c (socklen_t): Provide a default.
12527         (remote_open): Use socklen_t.
12528         * remote-utils.c (socklen_t): Provide a default.
12529         (remote_open): Use socklen_t.
12530         (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
12531         unsigned char.
12532
12533         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
12534         char for buffers.
12535         * linux-low.c (linux_read_memory, linux_write_memory)
12536         (linux_read_auxv): Likewise.
12537         * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
12538         (check_mem_write): Likewise.
12539         * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
12540         Likewise.
12541         * regcache.c (struct inferior_rgcache_data, registers_to_string)
12542         (registers_from_string, register_data): Likewise.
12543         * server.c (handle_query, main): Likewise.
12544         * server.h (convert_ascii_to_int, convert_int_to_ascii)
12545         (decode_M_packet): Likewise.
12546         * target.c (read_inferior_memory, write_inferior_memory): Likewise.
12547         * target.h (struct target_ops): Update read_memory, write_memory,
12548         and read_auxv.
12549         (read_inferior_memory, write_inferior_memory): Update.
12550         * linux-low.h (struct linux_target_ops): Change type of breakpoint
12551         to unsigned char *.
12552         * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
12553         linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
12554         linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
12555         linux-s390-low.c, linux-sh-low.c: Update for changes in
12556         read_inferior_memory and the_low_target->breakpoint.
12557
12558 2005-05-28  Daniel Jacobowitz  <dan@codesourcery.com>
12559
12560         * Makefile.in (SFILES): Add linux-ppc64-low.c.
12561         (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
12562         * configure.srv: Add powerpc64-*-linux*.
12563         * linux-ppc64-low.c: New file.
12564
12565 2005-05-23  Orjan Friberg  <orjanf@axis.com>
12566
12567         * linux-cris-low.c: New file with support for CRIS.
12568         * linux-crisv32-low.c: Ditto for CRISv32.
12569         * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
12570         (clean): Add reg-cris.c and reg-crisv32.c.
12571         Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
12572         reg-crisv32.o, and reg-crisv32.c to make rules.
12573         * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
12574         recognized targets.
12575
12576 2005-05-16  Ulrich Weigand  <uweigand@de.ibm.com>
12577
12578         * linux-low.c (fetch_register): Ensure buffer size is a multiple
12579         of sizeof (PTRACE_XFER_TYPE).
12580         (usr_store_inferior_registers): Likewise.  Zero out excess bytes.
12581
12582 2005-05-12  Orjan Friberg  <orjanf@axis.com>
12583
12584         * target.h (struct target_ops): Add insert_watchpoint,
12585         remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
12586         pointers for hardware watchpoint support.
12587         * linux-low.h (struct linux_target_ops): Ditto.
12588         * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
12589         (linux_stopped_by_watchpoint, linux_stopped_data_address): New.  Add
12590         to linux_target_ops.
12591         * remote-utils.c (prepare_resume_reply): Add watchpoint information to
12592         reply packet.
12593         * server.c (main): Recognize 'Z' and 'z' packets.
12594
12595 2005-05-10  Ulrich Weigand  <uweigand@de.ibm.com>
12596
12597         * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
12598         (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
12599         (the_low_target): Add new members.
12600
12601 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
12602
12603         * proc-service.c (ps_lgetregs): Search all_processes instead of
12604         all_threads.
12605
12606 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
12607
12608         * server.c (start_inferior): Change return type to int.
12609         (attach_inferior): Change sigptr to int *.
12610         (handle_v_cont, handle_v_requests): Change signal to int *.
12611         (main): Change signal to int.
12612
12613 2005-04-15  Kei Sakamoto  <sakamoto.kei@renesas.com>
12614
12615         * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
12616         * configure.srv: Add m32r*-*-linux*.
12617         * linux-m32r-low.c: New file.
12618
12619 2005-03-04  Daniel Jacobowitz  <dan@codesourcery.com>
12620
12621         * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
12622
12623 2005-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
12624
12625         * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
12626         Take unsigned long arguments for PIDs.
12627         * linux-low.c (add_process, linux_attach_lwp, linux_attach)
12628         (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
12629         (wait_for_sigstop, linux_resume_one_process)
12630         (regsets_fetch_inferior_registers, linux_send_signal)
12631         (linux_read_auxv): Likewise.  Update the types of variables holding
12632         PIDs.  Update format string specifiers.
12633         * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
12634         * remote-utils.c (prepare_resume_reply): Likewise.
12635         * server.c (cont_thread, general_thread, step_thread)
12636         (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
12637         unsigned long.
12638         (handle_query): Update format specifiers.
12639         (handle_v_cont, main): Use strtoul for thread IDs.
12640         * server.h (struct inferior_list_entry): Use unsigned long for ID.
12641         (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12642         (general_thread, step_thread, thread_from_wait)
12643         (old_thread_from_wait): Update.
12644         * target.h (struct thread_resume): Use unsigned long for THREAD.
12645         (struct target_ops): Use unsigned long for arguments to attach and
12646         thread_alive.
12647
12648 2005-02-24  Daniel Jacobowitz  <dan@codesourcery.com>
12649
12650         * acinclude.m4: Include bfd/bfd.m4 directly.
12651         * configure.ac: Use AC_ARG_PROGRAM.  Suggested by Aron Griffis
12652         <agriffis@toolchain.org>.
12653         * aclocal.m4, configure: Regenerated.
12654
12655 2005-01-07  Andrew Cagney  <cagney@gnu.org>
12656
12657         * configure.ac: Rename configure.in, require autoconf 2.59.
12658         * configure: Re-generate.
12659
12660 2004-12-08  Daniel Jacobowitz  <dan@debian.org>
12661
12662         * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area.  Reset
12663         LIBS when finished.
12664         * aclocal.m4: Regenerated.
12665         * configure: Regenerated.
12666
12667 2004-11-21  Andreas Schwab  <schwab@suse.de>
12668
12669         * linux-m68k-low.c (m68k_num_gregs): Define.
12670         (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12671         (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12672         (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12673         (m68k_breakpoint_at): New.  Add to the_low_target.
12674
12675         * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12676         srv_linux_thread_db to yes.
12677
12678 2004-10-20  Joel Brobecker  <brobecker@gnat.com>
12679
12680         * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12681         (ARCH_SET_FS): Likewise.
12682         (ARCH_GET_FS): Likewise.
12683         (ARCH_GET_GS): Likewise.
12684
12685 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
12686
12687         * linux-i386-low.c (ps_get_thread_area): New.
12688         * linux-x86-64-low.c (ps_get_thread_area): New.
12689         * linux-low.c: Include <sys/syscall.h>.
12690         (linux_kill_one_process): Don't kill the first thread here.
12691         (linux_kill): Kill the first thread here.
12692         (kill_lwp): New function.
12693         (send_sigstop, linux_send_signal): Use it.
12694         * proc-service.c: Clean up #ifdefs.
12695         (fpregset_info): Delete.
12696         (ps_lgetregs): Update and enable implementation.
12697         (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12698         implementations.
12699         * remote-utils.c (struct sym_cache, symbol_cache): New.
12700         (input_interrupt): Print a clearer message.
12701         (async_io_enabled): New variable.
12702         (enable_async_io, disable_async_io): Use it.  Update comments.
12703         (look_up_one_symbol): Use the symbol cache.
12704         * thread-db.c (thread_db_look_up_symbols): New function.
12705         (thread_db_init): Update comments.  Call thread_db_look_up_symbols.
12706
12707 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
12708
12709         * configure.in: Test for -rdynamic.
12710         * configure: Regenerated.
12711         * Makefile (INTERNAL_LDFLAGS): New.
12712         (gdbserver, gdbreplay): Use it.
12713
12714 2004-09-02  Andrew Cagney  <cagney@gnu.org>
12715
12716         * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12717
12718 2004-03-23  Daniel Jacobowitz  <drow@mvista.com>
12719
12720         * linux-low.c (linux_wait): Clear all_processes list also.
12721
12722 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
12723
12724         * linux-low.c: Include <errno.h>.  Remove extern declaration of
12725         errno.
12726
12727 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
12728
12729         * gdbreplay.c, server.h, utils.c: Update copyright years.
12730
12731 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
12732
12733         * server.c (main): Print child status or termination signal from
12734         variable 'signal', not 'sig'.
12735
12736 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
12737
12738         * linux-low.c (linux_read_memory): Change return type to
12739         int.  Check for and return error from ptrace().
12740         * target.c (read_inferior_memory): Change return type to int.  Pass
12741         back return status from the_target->read_memory().
12742         * target.h (struct target_ops): Adapt *read_memory() prototype.
12743         Update comment.
12744         (read_inferior_memory): Adapt prototype.
12745         * server.c (main): Return an error packet if
12746         read_inferior_memory() returns an error.
12747
12748 2004-03-04  Daniel Jacobowitz  <drow@mvista.com>
12749
12750         * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12751         Unify with other clean targets.
12752
12753 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
12754
12755         * server.c (handle_v_cont): Call set_desired_inferior.
12756
12757 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
12758
12759         * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12760
12761 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
12762
12763         * linux-low.c (linux_wait): Unblock async I/O.
12764         (linux_resume): Block and enable async I/O.
12765         * remote-utils.c (block_async_io, unblock_async_io): New functions.
12766         * server.h (block_async_io, unblock_async_io): Add prototypes.
12767
12768 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
12769
12770         * remote-utils.c (remote_open): Print a status notice after
12771         opening a TCP port.
12772         * server.c (attach_inferior): Print a status notice after
12773         attaching.
12774
12775 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
12776
12777         * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12778
12779 2004-02-26  Daniel Jacobowitz  <drow@mvista.com>
12780
12781         * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12782         error packet.
12783         * server.c, target.h: Update copyright years.
12784
12785 2004-02-25  Roland McGrath  <roland@redhat.com>
12786
12787         * target.h (struct target_ops): New member `read_auxv'.
12788         * server.c (handle_query): Handle qPart:auxv:read: query using that.
12789         * linux-low.c (linux_read_auxv): New function.
12790         (linux_target_ops): Initialize `read_auxv' member to that.
12791
12792 2004-02-17  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12793
12794         Committed by Jim Blandy  <jimb@redhat.com>.
12795
12796         * linux-s390-low.c (s390_num_regs): Update.
12797         (s390_regmap): Remove control registers.  Use __s390x__ predefine
12798         instead of GPR_SIZE to distiguish s390 and s390x targets.
12799
12800 2004-01-31  Daniel Jacobowitz  <drow@mvista.com>
12801
12802         * linux-low.c: Update copyright year.
12803         (check_removed_breakpoint): Clear pending_is_breakpoint.
12804         (linux_set_resume_request, linux_queue_one_thread)
12805         (resume_status_pending_p): New functions.
12806         (linux_continue_one_thread): Use process->resume.
12807         (linux_resume): Only resume threads if there are no pending events.
12808         * linux-low.h (struct process_info): Add resume request
12809         pointer.
12810
12811 2004-01-30  Daniel Jacobowitz  <drow@mvista.com>
12812
12813         * regcache.c (new_register_cache): Clear the allocated register
12814         buffer.  Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12815
12816 2003-10-13  Daniel Jacobowitz  <drow@mvista.com>
12817
12818         * linux-low.c (linux_resume): Take a struct thread_resume *
12819         argument.
12820         (linux_wait): Update call.
12821         (resume_ptr): New static variable.
12822         (linux_continue_one_thread): Renamed from
12823         linux_continue_one_process.  Use resume_ptr.
12824         (linux_resume): Use linux_continue_one_thread.
12825         * server.c (handle_v_cont, handle_v_requests): New functions.
12826         (myresume): New function.
12827         (main): Handle 'v' case.
12828         * target.h (struct thread_resume): New type.
12829         (struct target_ops): Change argument of "resume" to struct
12830         thread_resume *.
12831         (myresume): Delete macro.
12832
12833 2003-08-08  H.J. Lu  <hongjiu.lu@intel.com>
12834
12835         * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12836         (uninstall): Support DESTDIR.
12837
12838 Mon Jul 21 20:09:34 UTC 2003  Brendan Conoboy  <blc@redhat.com>
12839
12840         * configure.srv: Add xscale*linux copy of arm*linux entry.
12841
12842 2003-07-24  Daniel Jacobowitz  <drow@mvista.com>
12843
12844         * linux-arm-low.c (arm_reinsert_addr): New function.
12845         (the_low_target): Add arm_reinsert_addr.
12846
12847 2003-07-08  Mark Kettenis  <kettenis@gnu.org>
12848
12849         * mem-break.c: Remove whitespace at end of file.
12850
12851 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
12852
12853         * configure.in: Check whether we need to prototype strerror.
12854         * server.h: Optionally prototype strerror.
12855         * gdbreplay.c (perror_with_name): Use strerror.
12856         * linux-low.c (linux_attach_lwp): Use strerror.
12857         * utils.c (perror_with_name): Use strerror.
12858         * config.in, configure: Regenerated.
12859
12860 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
12861
12862         * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12863         SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12864
12865 2003-06-20  Daniel Jacobowitz  <drow@mvista.com>
12866
12867         * Makefile.in (SFILES): Update.
12868         * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12869         low-sun3.c: Remove files.
12870
12871 2003-06-17  Daniel Jacobowitz  <drow@mvista.com>
12872
12873         * linux-low.c: Move comment to linux_thread_alive where it belonged.
12874         (linux_detach_one_process, linux_detach): New functions.
12875         (linux_target_ops): Add linux_detach.
12876         * server.c (main): Handle 'D' packet.
12877         * target.h (struct target_ops): Add "detach" member.
12878         (detach_inferior): Define.
12879
12880 2003-06-13  Mark Kettenis  <kettenis@gnu.org>
12881
12882         From Kelley Cook  <kelleycook@wideopenwest.com>:
12883         * configure.srv: Accept i[34567]86 variants.
12884
12885 2003-06-05  Daniel Jacobowitz  <drow@mvista.com>
12886
12887         * linux-low.c (linux_wait_for_event): Correct comment typos.
12888         (linux_resume_one_process): Call check_removed_breakpoint.
12889         (linux_send_signal): New function.
12890         (linux_target_ops): Add linux_send_signal.
12891         * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12892         of kill.
12893         * target.h (struct target_ops): Add send_signal.
12894
12895 2003-05-29  Jim Blandy  <jimb@redhat.com>
12896
12897         * linux-low.c (usr_store_inferior_registers): Transfer buf in
12898         PTRACE_XFER_TYPE-sized chunks, not int-sized chunks.  Otherwise,
12899         if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12900         away part of the register's value.
12901
12902 2003-03-26  Daniel Jacobowitz  <drow@mvista.com>
12903
12904         * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12905         (linux_wait_for_event, linux_init_signals): Likewise.
12906
12907 2003-03-17  Daniel Jacobowitz  <drow@mvista.com>
12908
12909         * configure.in: Check for stdlib.h.
12910         * configure: Regenerated.
12911         * config.in: Regenerated.
12912
12913 2003-01-04  Andreas Schwab  <schwab@suse.de>
12914
12915         * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12916
12917 2003-01-02  Andrew Cagney  <ac131313@redhat.com>
12918
12919         * Makefile.in: Remove obsolete code.
12920
12921 2002-11-20  Daniel Jacobowitz  <drow@mvista.com>
12922
12923         * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12924         defined(PT_FPR0_HI).
12925
12926 2002-11-17  Stuart Hughes  <seh@zee2.com>
12927
12928         * linux-arm-low.c (arm_num_regs): Increase.
12929         (arm_regmap): Include status register.
12930
12931 2002-11-17  Daniel Jacobowitz  <drow@mvista.com>
12932
12933         * linux-low.c (register_addr): Remove incorrect -1 check.
12934
12935 2002-08-29  Daniel Jacobowitz  <drow@mvista.com>
12936
12937         * linux-low.c (linux_create_inferior): Call setpgid.  Return
12938         the new PID.
12939         (unstopped_p, linux_signal_pid): Remove.
12940         (linux_target_ops): Remove linux_signal_pid.
12941         * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12942         global instead of target method.
12943         * target.h (struct target_ops): Remove signal_pid.  Update comment
12944         for create_inferior.
12945         * server.c (signal_pid): New variable.
12946         (create_inferior): Set signal_pid.  Block SIGTTOU and SIGTTIN in
12947         gdbserver.  Set the child to be the foreground process group.
12948         (attach_inferior): Set signal_pid.
12949
12950 2002-08-23  Daniel Jacobowitz  <drow@mvista.com>
12951
12952         * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12953
12954 2002-08-20  Jim Blandy  <jimb@redhat.com>
12955
12956         * Makefile.in (LDFLAGS): Allow the configure script to establish a
12957         default for this.
12958
12959 2002-08-01  Andrew Cagney  <cagney@redhat.com>
12960
12961         * Makefile.in: Make chill references obsolete.
12962
12963 2002-07-24  Kevin Buettner  <kevinb@redhat.com>
12964
12965         * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12966         * configure: Regenerate.
12967         * config.in: Regenerate.
12968
12969 2002-07-09  David O'Brien  <obrien@FreeBSD.org>
12970
12971         * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12972         (perror_with_name, remote_close, remote_open, expect, play): Static.
12973
12974 2002-07-04  Michal Ludvig  <mludvig@suse.cz>
12975
12976         * linux-x86-64-low.c (x86_64_regmap): Make it an array of
12977         byte offsets instead of an array of indexes.
12978         (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12979
12980 2002-06-13  Daniel Jacobowitz  <drow@mvista.com>
12981
12982         * regcache.c: Add comment.
12983
12984 2002-06-11  Daniel Jacobowitz  <drow@mvista.com>
12985
12986         * thread-db.c: New file.
12987         * proc-service.c: New file.
12988         * acinclude.m4: New file.
12989         * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12990         proc-service.o, and thread-db.o.
12991         (linux-low.o): Add USE_THREAD_DB.
12992         * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12993         HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12994         * aclocal.m4: Regenerated.
12995         * config.in: Regenerated.
12996         * configure: Regenerated.
12997         * configure.in: Check for proc_service.h, sys/procfs.h,
12998         thread_db.h, and linux/elf.h headrs.
12999         Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
13000         PRFPREGSET_T_BROKEN.  Introduce srv_thread_depfiles and USE_THREAD_DB.
13001         Check for -lthread_db and thread support.
13002         * configure.srv: Enable thread_db support for ARM, i386, MIPS,
13003         PowerPC, and SuperH.
13004         * i387-fp.c: Constify arguments.
13005         * i387-fp.h: Likewise.
13006         * inferiors.c: (struct thread_info): Renamed from
13007         `struct inferior_info'.  Remove PID member.  Use generic inferior
13008         list header.  All uses updated.
13009         (inferiors, signal_pid): Removed.
13010         (all_threads): New variable.
13011         (get_thread): Define.
13012         (add_inferior_to_list): New function.
13013         (for_each_inferior): New function.
13014         (change_inferior_id): New function.
13015         (add_inferior): Removed.
13016         (remove_inferior): New function.
13017         (add_thread): New function.
13018         (free_one_thread): New function.
13019         (remove_thread): New function.
13020         (clear_inferiors): Use for_each_inferior and free_one_thread.
13021         (find_inferior): New function.
13022         (find_inferior_id): New function.
13023         (inferior_target_data): Update argument type.
13024         (set_inferior_target_data): Likewise.
13025         (inferior_regcache_data): Likewise.
13026         (set_inferior_regcache_data): Likewise.
13027         * linux-low.c (linux_bp_reinsert): Remove.
13028         (all_processes, stopping_threads, using_thrads)
13029         (struct pending_signals, debug_threads, pid_of): New.
13030         (inferior_pid): Replace with macro.
13031         (struct inferior_linux_data): Remove.
13032         (get_stop_pc, add_process): New functions.
13033         (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
13034         Use add_process and add_thread.
13035         (linux_attach_lwp): New function, based on old linux_attach.  Use
13036         add_process and add_thread.  Set stop_expected for new threads.
13037         (linux_attach): New function.
13038         (linux_kill_one_process): New function.
13039         (linux_kill): Kill all LWPs.
13040         (linux_thread_alive): Use find_inferior_id.
13041         (check_removed_breakpoints, status_pending_p): New functions.
13042         (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
13043         Update.  Use WNOHANG.  Wait for cloned processes also.  Update process
13044         struct for the found process.
13045         (linux_wait_for_event): New function.
13046         (linux_wait): Use it.  Support LWPs.
13047         (send_sigstop, wait_for_sigstop, stop_all_processes)
13048         (linux_resume_one_process, linux_continue_one_process): New functions.
13049         (linux_resume): Support LWPs.
13050         (REGISTER_RAW_SIZE): Remove.
13051         (fetch_register): Use register_size instead.  Call supply_register.
13052         (usr_store_inferior_registers): Likewise.  Call collect_register.
13053         Fix recursive case.
13054         (regsets_fetch_inferior_registers): Improve error message.
13055         (regsets_store_inferior_registers): Add debugging.
13056         (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
13057         (unstopped_p, linux_signal_pid): New functions.
13058         (linux_target_ops): Add linux_signal_pid.
13059         (linux_init_signals): New function.
13060         (initialize_low): Call it.  Initialize using_threads.
13061         * regcache.c (inferior_regcache_data): Add valid
13062         flag.
13063         (get_regcache): Fetch registers lazily.  Add fetch argument
13064         and update all callers.
13065         (regcache_invalidate_one, regcache_invalidate): New
13066         functions.
13067         (new_register_cache): Renamed from create_register_cache.
13068         Return the new regcache.
13069         (free_register_cache): Change argument to a void *.
13070         (registers_to_string, registers_from_string): Call get_regcache
13071         with fetch flag set.
13072         (register_data): Make static.  Pass fetch flag to get_regcache.
13073         (supply_register): Call get_regcache with fetch flag clear.
13074         (collect_register): Call get_regcache with fetch flag set.
13075         (collect_register_as_string): New function.
13076         * regcache.h: Update.
13077         * remote-utils.c (putpkt): Flush after debug output and use
13078         stderr.
13079         Handle input interrupts while waiting for an ACK.
13080         (input_interrupt): Use signal_pid method.
13081         (getpkt): Flush after debug output and use stderr.
13082         (outreg): Use collect_register_as_string.
13083         (new_thread_notify, dead_thread_notify): New functions.
13084         (prepare_resume_reply): Check using_threads.  Set thread_from_wait
13085         and general_thread.
13086         (look_up_one_symbol): Flush after debug output.
13087         * server.c (step_thread, server_waiting): New variables.
13088         (start_inferior): Don't use signal_pid.  Update call to mywait.
13089         (attach_inferior): Update call to mywait.
13090         (handle_query): Handle qfThreadInfo and qsThreadInfo.
13091         (main): Don't fetch/store registers explicitly.  Use
13092         set_desired_inferior.  Support proposed ``Hs'' packet.  Update
13093         calls to mywait.
13094         * server.h: Update.
13095         (struct inferior_list, struct_inferior_list_entry): New.
13096         * target.c (set_desired_inferior): New.
13097         (write_inferior_memory): Constify.
13098         (mywait): New function.
13099         * target.h: Update.
13100         (struct target_ops): New signal_pid method.
13101         (mywait): Removed macro, added prototype.
13102
13103         * linux-low.h (regset_func): Removed.
13104         (regset_fill_func, regset_store_func): New.
13105         (enum regset_type): New.
13106         (struct regset_info): Add type field.  Use new operation types.
13107         (struct linux_target_ops): stop_pc renamed to get_pc.
13108         Add decr_pc_after_break and breakpoint_at.
13109         (get_process, get_thread_proess, get_process_thread)
13110         (strut process_info, all_processes, linux_attach_lwp)
13111         (thread_db_init): New.
13112
13113         * linux-arm-low.c (arm_get_pc, arm_set_pc,
13114         arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
13115         (the_low_target): Add new members.
13116         * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
13117         (i386_store_fpxregset): Constify.
13118         (target_regsets): Add new kind identifier.
13119         (i386_get_pc): Renamed from i386_stop_pc.  Simplify.
13120         (i386_set_pc): Add debugging.
13121         (i386_breakpoint_at): New function.
13122         (the_low_target): Add new members.
13123         * linux-mips-low.c (mips_get_pc, mips_set_pc)
13124         (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
13125         (mips_breakpoint_at): New.
13126         (the_low_target): Add new members.
13127         * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
13128         (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
13129         (the_low_target): Add new members.
13130         * linux-sh-low.c (sh_get_pc, sh_set_pc)
13131         (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
13132         (the_low_target): Add new members.
13133         * linux-x86-64-low.c (target_regsets): Add new kind
13134         identifier.
13135
13136 2002-05-15  Daniel Jacobowitz  <drow@mvista.com>
13137
13138         From Martin Pool <mbp@samba.org>:
13139         * server.c (gdbserver_usage): New function.
13140         (main): Call it.
13141
13142 2002-05-14  Daniel Jacobowitz  <drow@mvista.com>
13143
13144         * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
13145         stop_at -> stop_pc.
13146
13147 2002-05-04  Andrew Cagney  <ac131313@redhat.com>
13148
13149         * Makefile.in: Remove obsolete code.
13150
13151 2002-04-24  Michal Ludvig  <mludvig@suse.cz>
13152
13153         * linux-low.c (regsets_fetch_inferior_registers),
13154         (regsets_store_inferior_registers): Removed cast to int from
13155         ptrace() calls.
13156         * regcache.h: Added declaration of struct inferior_info.
13157
13158 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
13159
13160         * inferiors.c (struct inferior_info): Add regcache_data.
13161         (add_inferior): Call create_register_cache.
13162         (clear_inferiors): Call free_register_cache.
13163         (inferior_regcache_data, set_inferior_regcache_data): New functions.
13164         * regcache.c (struct inferior_regcache_data): New.
13165         (registers): Remove.
13166         (get_regcache): New function.
13167         (create_register_cache, free_register_cache): New functions.
13168         (set_register_cache): Don't initialize the register cache here.
13169         (registers_to_string, registers_from_string, register_data): Call
13170         get_regcache.
13171         * regcache.h: Add prototypes.
13172         * server.h: Likewise.
13173
13174 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
13175
13176         * mem-break.c: New file.
13177         * mem-break.h: New file.
13178         * Makefile.in: Add mem-break.o rule; update server.h
13179         dependencies.
13180         * inferiors.c (struct inferior_info): Add target_data
13181         member.
13182         (clear_inferiors): Free target_data member if set.
13183         (inferior_target_data, set_inferior_target_data): New functions.
13184         * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
13185         (i386_stop_pc, i386_set_pc): New.  Add to the_low_target.
13186         * linux-low.c (linux_bp_reinsert): New variable.
13187         (struct inferior_linux_data): New.
13188         (linux_create_inferior): Use set_inferior_target_data.
13189         (linux_attach): Likewise.  Call add_inferior.
13190         (linux_wait_for_one_inferior): New function.
13191         (linux_wait): Call it.
13192         (linux_write_memory): Add const.
13193         (initialize_low): Call set_breakpoint_data.
13194         * linux-low.h (struct linux_target_ops): Add breakpoint
13195         handling members.
13196         * server.c (attach_inferior): Remove extra add_inferior
13197         call.
13198         * server.h: Include mem-break.h.  Update inferior.c
13199         prototypes.
13200         * target.c (read_inferior_memory)
13201         (write_inferior_memory): New functions.
13202         * target.h (read_inferior_memory)
13203         (write_inferior_memory): Change macros to prototypes.
13204         (struct target_ops): Update comments.  Add const to write_memory
13205         definition.
13206
13207 2002-04-11  Daniel Jacobowitz  <drow@mvista.com>
13208
13209         * linux-low.c (usr_store_inferior_registers): Support
13210         registers which are allowed to fail to store.
13211         * linux-low.h (linux_target_ops): Likewise.
13212         * linux-ppc-low.c (ppc_regmap): Support FPSCR.
13213         (ppc_cannot_store_register): FPSCR may not be storable.
13214
13215 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13216
13217         * server.h: Include <string.h> if HAVE_STRING_H.
13218         * ChangeLog: Correct paths in last ChangeLog entry.
13219
13220 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13221
13222         * linux-low.h: Remove obsolete prototypes.
13223         (struct linux_target_ops): New.
13224         (extern the_low_target): New.
13225         * linux-low.c (num_regs, regmap): Remove declarations.
13226         (register_addr): Use the_low_target explicitly.
13227         (fetch_register): Likewise.
13228         (usr_fetch_inferior_registers): Likewise.
13229         (usr_store_inferior_registers): Likewise.
13230         * linux-arm-low.c (num_regs): Remove.
13231         (arm_num_regs): Define.
13232         (arm_regmap): Renamed from regmap, made static.
13233         (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
13234         made static.
13235         (arm_cannot_store_register): Renamed from cannot_store_register,
13236         made static.
13237         (the_low_target): New.
13238         * linux-i386-low.c (num_regs): Remove.
13239         (i386_num_regs): Define.
13240         (i386_regmap): Renamed from regmap, made static.
13241         (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
13242         made static.
13243         (i386_cannot_store_register): Renamed from cannot_store_register,
13244         made static.
13245         (the_low_target): New.
13246         * linux-ia64-low.c (num_regs): Remove.
13247         (ia64_num_regs): Define.
13248         (ia64_regmap): Renamed from regmap, made static.
13249         (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
13250         made static.
13251         (ia64_cannot_store_register): Renamed from cannot_store_register,
13252         made static.
13253         (the_low_target): New.
13254         * linux-m68k-low.c (num_regs): Remove.
13255         (m68k_num_regs): Define.
13256         (m68k_regmap): Renamed from regmap, made static.
13257         (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
13258         made static.
13259         (m68k_cannot_store_register): Renamed from cannot_store_register,
13260         made static.
13261         (the_low_target): New.
13262         * linux-mips-low.c (num_regs): Remove.
13263         (mips_num_regs): Define.
13264         (mips_regmap): Renamed from regmap, made static.
13265         (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
13266         made static.
13267         (mips_cannot_store_register): Renamed from cannot_store_register,
13268         made static.
13269         (the_low_target): New.
13270         * linux-ppc-low.c (num_regs): Remove.
13271         (ppc_num_regs): Define.
13272         (ppc_regmap): Renamed from regmap, made static.
13273         (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
13274         made static.
13275         (ppc_cannot_store_register): Renamed from cannot_store_register,
13276         made static.
13277         (the_low_target): New.
13278         * linux-s390-low.c (num_regs): Remove.
13279         (s390_num_regs): Define.
13280         (s390_regmap): Renamed from regmap, made static.
13281         (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
13282         made static.
13283         (s390_cannot_store_register): Renamed from cannot_store_register,
13284         made static.
13285         (the_low_target): New.
13286         * linux-sh-low.c (num_regs): Remove.
13287         (sh_num_regs): Define.
13288         (sh_regmap): Renamed from regmap, made static.
13289         (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
13290         made static.
13291         (sh_cannot_store_register): Renamed from cannot_store_register,
13292         made static.
13293         (the_low_target): New.
13294         * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
13295         (the_low_target): New.
13296
13297 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13298
13299         * Makefile.in: Add stamp-h target.
13300         * configure.in: Create stamp-h.
13301         * configure: Regenerated.
13302
13303 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13304
13305         * inferiors.c: New file.
13306         * target.c: New file.
13307         * target.h: New file.
13308         * Makefile.in:  Add target.o and inferiors.o.  Update
13309         dependencies.
13310         * linux-low.c (inferior_pid): New static variable,
13311         moved from server.c.
13312         (linux_create_inferior): Renamed from create_inferior.
13313         Call add_inferior.  Return 0 on success instead of a PID.
13314         (linux_attach): Renamed from myattach.
13315         (linux_kill): Renamed from kill_inferior.  Call clear_inferiors ().
13316         (linux_thread_alive): Renamed from mythread_alive.
13317         (linux_wait): Renamed from mywait.  Call clear_inferiors () if the
13318         child dies.
13319         (linux_resume): Renamed from myresume.  Add missing ``return 0''.
13320         (regsets_store_inferior_registers): Correct error message.
13321         Add missing ``return 0''.
13322         (linux_fetch_registers): Renamed from fetch_inferior_registers.
13323         (linux_store_registers): Renamed from store_inferior_registers.
13324         (linux_read_memory): Renamed from read_inferior_memory.
13325         (linux_write_memory): Renamed from write_inferior_memory.
13326         (linux_target_ops): New structure.
13327         (initialize_low): Call set_target_ops ().
13328         * remote-utils.c (unhexify): New function.
13329         (hexify): New function.
13330         (input_interrupt): Send signals to ``signal_pid''.
13331         * server.c (inferior_pid): Remove.
13332         (start_inferior): Update create_inferior call.
13333         (attach_inferior): Call add_inferior.
13334         (handle_query): New function.
13335         (main): Call handle_query for `q' packets.
13336         * server.h: Include "target.h".  Remove obsolete prototypes.
13337         Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
13338
13339 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
13340
13341         * Makefile.in: Add WARN_CFLAGS.  Update configury
13342         dependencies.
13343         * configure.in: Check for <string.h>
13344         * configure: Regenerate.
13345         * config.in: Regenerate.
13346         * gdbreplay.c: Include needed system headers.
13347         (remote_open): Remove strchr prototype.
13348         * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
13349         * regcache.c (supply_register): Change buf argument to const void *.
13350         (supply_register_by_name): Likewise.
13351         (collect_register): Change buf argument to void *.
13352         (collect_register_by_name): Likewise.
13353         * regcache.h: Add missing prototypes.
13354         * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
13355         * server.c (handle_query): New function.
13356         (attached): New static variable, moved out of main.
13357         (main): Quiet longjmp clobber warnings.
13358         * server.h: Add ATTR_NORETURN and ATTR_FORMAT.  Update prototypes.
13359         * utils.c (error): Remove NORETURN.
13360         (fatal): Likewise.