Extended-remote Linux follow fork
[external/binutils.git] / gdb / gdbserver / ChangeLog
1 2015-05-12  Don Breazeal  <donb@codesourcery.com>
2
3         * linux-low.c (handle_extended_wait): Implement return value,
4         rename argument 'event_child' to 'event_lwp', handle
5         PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6         (linux_low_ptrace_options): New function.
7         (linux_low_filter_event): Call linux_low_ptrace_options,
8         use different argument fo linux_enable_event_reporting,
9         use return value from handle_extended_wait.
10         (extended_event_reported): New function.
11         (linux_wait_1): Call extended_event_reported and set
12         status to report fork events.
13         (linux_write_memory): Add pid to debug message.
14         (reset_lwp_ptrace_options_callback): New function.
15         (linux_handle_new_gdb_connection): New function.
16         (linux_target_ops): Initialize new structure member.
17         * linux-low.h (struct lwp_info) <waitstatus>: New member.
18         * lynx-low.c: Initialize new structure member.
19         * remote-utils.c (prepare_resume_reply): Implement stop reason
20         "fork" for "T" stop message.
21         * server.c (handle_query): Call handle_new_gdb_connection.
22         * server.h (report_fork_events): Declare global flag.
23         * target.h (struct target_ops) <handle_new_gdb_connection>:
24         New member.
25         (target_handle_new_gdb_connection): New macro.
26         * win32-low.c: Initialize new structure member.
27
28 2015-05-12  Don Breazeal  <donb@codesourcery.com>
29
30         * mem-break.c (APPEND_TO_LIST): Define macro.
31         (clone_agent_expr): New function.
32         (clone_one_breakpoint): New function.
33         (clone_all_breakpoints): New function.
34         * mem-break.h: Declare new functions.
35
36 2015-05-12  Don Breazeal  <donb@codesourcery.com>
37
38         * linux-low.c (linux_supports_fork_events): New function.
39         (linux_supports_vfork_events): New function.
40         (linux_target_ops): Initialize new structure members.
41         (initialize_low): Call linux_check_ptrace_features.
42         * lynx-low.c (lynx_target_ops): Initialize new structure
43         members.
44         * server.c (report_fork_events, report_vfork_events):
45         New global flags.
46         (handle_query): Add new features to qSupported packet and
47         response.
48         (captured_main): Initialize new global variables.
49         * target.h (struct target_ops) <supports_fork_events>:
50         New member.
51         <supports_vfork_events>: New member.
52         (target_supports_fork_events): New macro.
53         (target_supports_vfork_events): New macro.
54         * win32-low.c (win32_target_ops): Initialize new structure
55         members.
56
57 2015-05-12  Gary Benson <gbenson@redhat.com>
58
59         * server.c (handle_qxfer_exec_file): Use current process
60         if annex is empty.
61
62 2015-05-08  Sandra Loosemore  <sandra@codesourcery.com>
63
64         * linux-nios2-low.c: Include elf/common.h.  Adjust comments.
65         Remove HAVE_PTRACE_GETREGS conditionals.
66         (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
67         instead of PTRACE_GETREGS and PTRACE_SETREGS.
68
69 2015-05-08  Yao Qi  <yao.qi@linaro.org>
70
71         * linux-low.c (linux_supports_conditional_breakpoints): New
72         function.
73         (linux_target_ops): Install new target method.
74         * lynx-low.c (lynx_target_ops): Install NULL hook for
75         supports_conditional_breakpoints.
76         * nto-low.c (nto_target_ops): Likewise.
77         * spu-low.c (spu_target_ops): Likewise.
78         * win32-low.c (win32_target_ops): Likewise.
79         * server.c (handle_query): Check
80         target_supports_conditional_breakpoints.
81         * target.h (struct target_ops) <supports_conditional_breakpoints>:
82         New field.
83         (target_supports_conditional_breakpoints): New macro.
84
85 2015-05-06  Pedro Alves  <palves@redhat.com>
86
87         PR server/18081
88         * server.c (start_inferior): If the process exits, mourn it.
89
90 2015-04-21  Gary Benson <gbenson@redhat.com>
91
92         * hostio.c (fileio_open_flags_to_host): Factored out to
93         fileio_to_host_openflags in common/fileio.c.  Single use
94         updated.
95
96 2015-04-17  Max Filippov  <jcmvbkbc@gmail.com>
97
98         * linux-xtensa-low.c (xtensa_fill_gregset)
99         (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
100         XCHAL_HAVE_LOOP.
101
102 2015-04-17  Max Filippov  <jcmvbkbc@gmail.com>
103
104         * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
105         (regs_info): Replace usrregs pointer with NULL.
106
107 2015-04-17  Gary Benson  <gbenson@redhat.com>
108
109         * target.h (struct target_ops) <pid_to_exec_file>: New field.
110         * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
111         * server.c (handle_qxfer_exec_file): New function.
112         (qxfer_packets): Add exec-file entry.
113         (handle_query): Report qXfer:exec-file:read as supported packet.
114
115 2015-04-14  Romain Naour <romain.naour@openwide.fr>  (tiny change)
116
117         * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
118
119 2015-04-09  Gary Benson <gbenson@redhat.com>
120
121         * hostio-errno.c (errno_to_fileio_error): Remove function.
122         Update caller to use remote_fileio_to_fio_error.
123
124 2015-04-09  Yao Qi  <yao.qi@linaro.org>
125
126         * linux-low.c (linux_insert_point): Call
127         insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
128         (linux_remove_point): Call remove_memory_breakpoint if type is
129         raw_bkpt_type_sw.
130         * linux-x86-low.c (x86_insert_point): Don't call
131         insert_memory_breakpoint.
132         (x86_remove_point): Don't call remove_memory_breakpoint.
133
134 2015-04-01  Pedro Alves  <palves@redhat.com>
135             Cleber Rosa  <crosa@redhat.com>
136
137         * server.c (gdbserver_usage): Reorganize and extend the usage
138         message.
139
140 2015-03-24  Pedro Alves  <palves@redhat.com>
141
142         * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
143         output.  Also dump TRAP_TRACE.
144         (linux_low_filter_event): In debug output, distinguish a
145         resume_stop SIGSTOP from a delayed SIGSTOP.
146
147 2015-03-24  Gary Benson  <gbenson@redhat.com>
148
149         * linux-x86-low.c (x86_linux_new_thread): Moved to
150         nat/x86-linux.c.
151         (x86_linux_prepare_to_resume): Likewise.
152
153 2015-03-24  Gary Benson  <gbenson@redhat.com>
154
155         * Makefile.in (x86-linux-dregs.o): New rule.
156         * configure.srv: Add x86-linux-dregs.o to relevant targets.
157         * linux-x86-low.c: Include nat/x86-linux-dregs.h.
158         (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
159         (x86_linux_dr_get): Likewise.
160         (x86_linux_dr_set): Likewise.
161         (update_debug_registers_callback): Likewise.
162         (x86_linux_dr_set_addr): Likewise.
163         (x86_linux_dr_get_addr): Likewise.
164         (x86_linux_dr_set_control): Likewise.
165         (x86_linux_dr_get_control): Likewise.
166         (x86_linux_dr_get_status): Likewise.
167         (x86_linux_update_debug_registers): Likewise.
168
169 2015-03-24  Gary Benson  <gbenson@redhat.com>
170
171         * linux-x86-low.c (x86_linux_update_debug_registers):
172         New function, factored out from...
173         (x86_linux_prepare_to_resume): ...this.
174
175 2015-03-24  Gary Benson  <gbenson@redhat.com>
176
177         * linux-x86-low.c (x86_linux_dr_get): Update comments.
178         (x86_linux_dr_set): Likewise.
179         (update_debug_registers_callback): Likewise.
180         (x86_linux_dr_set_addr): Likewise.
181         (x86_linux_dr_get_addr): Likewise.
182         (x86_linux_dr_set_control): Likewise.
183         (x86_linux_dr_get_control): Likewise.
184         (x86_linux_dr_get_status): Likewise.
185         (x86_linux_prepare_to_resume): Likewise.
186
187 2015-03-24  Gary Benson  <gbenson@redhat.com>
188
189         * linux-x86-low.c (x86_linux_dr_get): Add assertion.
190         Use perror_with_name.  Pass string through gettext.
191         (x86_linux_dr_set): Likewise.
192
193 2015-03-24  Gary Benson  <gbenson@redhat.com>
194
195         * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
196         (x86_linux_dr_set_addr): ...this.
197         (x86_dr_low_get_addr): Rename to...
198         (x86_linux_dr_get_addr): ...this.
199         (x86_dr_low_set_control): Rename to...
200         (x86_linux_dr_set_control): ...this.
201         (x86_dr_low_get_control): Rename to...
202         (x86_linux_dr_get_control): ...this.
203         (x86_dr_low_get_status): Rename to...
204         (x86_linux_dr_get_status): ...this.
205         (x86_dr_low): Update with new function names.
206
207 2015-03-24  Gary Benson  <gbenson@redhat.com>
208
209         * Makefile.in (x86-linux.o): New rule.
210         * configure.srv: Add x86-linux.o to relevant targets.
211         * linux-low.c (lwp_set_arch_private_info): New function.
212         (lwp_arch_private_info): Likewise.
213         * linux-x86-low.c: Include nat/x86-linux.h.
214         (arch_lwp_info): Removed structure.
215         (update_debug_registers_callback):
216         Use lwp_set_debug_registers_changed.
217         (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
218         and lwp_set_debug_registers_changed.
219         (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
220
221 2015-03-24  Gary Benson  <gbenson@redhat.com>
222
223         * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
224         * linux-arm-low.c (arm_new_thread): Likewise.
225         * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
226         * linux-mips-low.c (mips_linux_new_thread): Likewise.
227         * linux-x86-low.c (x86_linux_new_thread): Likewise.
228         * linux-low.c (add_lwp): Update the_low_target.new_thread call.
229
230 2015-03-24  Gary Benson  <gbenson@redhat.com>
231
232         * linux-low.c (ptid_of_lwp): New function.
233         (lwp_is_stopped): Likewise.
234         (lwp_stop_reason): Likewise.
235         * linux-x86-low.c (update_debug_registers_callback):
236         Use lwp_is_stopped.
237         (x86_linux_prepare_to_resume): Use ptid_of_lwp and
238         lwp_stop_reason.
239
240 2015-03-24  Gary Benson  <gbenson@redhat.com>
241
242         * linux-low.h (linux_stop_lwp): Remove declaration.
243
244 2015-03-24  Gary Benson  <gbenson@redhat.com>
245
246         * linux-low.h: Include nat/linux-nat.h.
247         * linux-low.c (iterate_over_lwps_args): New structure.
248         (iterate_over_lwps_filter): New function.
249         (iterate_over_lwps): Likewise.
250         * linux-x86-low.c (update_debug_registers_callback):
251         Update signature to what iterate_over_lwps expects.
252         Remove PID check that iterate_over_lwps now performs.
253         (x86_dr_low_set_addr): Use iterate_over_lwps.
254         (x86_dr_low_set_control): Likewise.
255
256 2015-03-24  Gary Benson  <gbenson@redhat.com>
257
258         * linux-x86-low.c (x86_debug_reg_state): New function.
259         (x86_linux_prepare_to_resume): Use the above.
260
261 2015-03-24  Gary Benson  <gbenson@redhat.com>
262
263         * linux-low.c (current_lwp_ptid): New function.
264         * linux-x86-low.c: Include nat/linux-nat.h.
265         (x86_dr_low_get_addr): Use current_lwp_ptid.
266         (x86_dr_low_get_control): Likewise.
267         (x86_dr_low_get_status): Likewise.
268
269 2015-03-20  Pedro Alves  <palves@redhat.com>
270
271         * tracepoint.c (cmd_qtstatus): Make "str" const.
272
273 2015-03-20  Pedro Alves  <palves@redhat.com>
274
275         * server.c (handle_general_set): Make "req_str" const.
276
277 2015-03-19  Pedro Alves  <palves@redhat.com>
278
279         * linux-low.c (linux_resume_one_lwp): Rename to ...
280         (linux_resume_one_lwp_throw): ... this.  Don't handle ESRCH here,
281         instead call perror_with_name.
282         (check_ptrace_stopped_lwp_gone): New function.
283         (linux_resume_one_lwp): Reimplement as wrapper around
284         linux_resume_one_lwp_throw that swallows errors if the LWP is
285         gone.
286
287 2015-03-19  Pedro Alves  <palves@redhat.com>
288
289         * linux-low.c (count_events_callback, select_event_lwp_callback):
290         No longer check whether the thread has resume_stop as last resume
291         kind.
292
293 2015-03-19 Pedro Alves  <palves@redhat.com>
294
295         * linux-low.c (count_events_callback, select_event_lwp_callback):
296         Use the lwp's status_pending_p field, not the thread's.
297
298 2015-03-19  Pedro Alves  <palves@redhat.com>
299
300         * linux-low.c (select_event_lwp_callback): Update comments to
301         no longer mention SIGTRAP.
302
303 2015-03-18  Gary Benson  <gbenson@redhat.com>
304
305         * server.c (handle_query): Do not report vFile:fstat as supported.
306
307 2015-03-11  Gary Benson  <gbenson@redhat.com>
308
309         * hostio.c (sys/types.h): New include.
310         (sys/stat.h): Likewise.
311         (common-remote-fileio.h): Likewise.
312         (handle_fstat): New function.
313         (handle_vFile): Handle vFile:fstat packets.
314
315 2015-03-11  Gary Benson  <gbenson@redhat.com>
316
317         * configure.ac (AC_CHECK_MEMBERS): Add checks for
318         struct stat.st_blocks and struct stat.st_blksize.
319         * configure: Regenerate.
320         * config.in: Likewise.
321         * Makefile.in (SFILES): Add common/common-remote-fileio.c.
322         (OBS): Add common-remote-fileio.o.
323         (common-remote-fileio.o): New rule.
324
325 2015-03-09  Pedro Alves  <palves@redhat.com>
326
327         * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
328         'struct sockaddr' pointer in 'accept' call.
329
330 2015-03-09  Pedro Alves  <palves@redhat.com>
331
332         Revert:
333         2015-03-07  Pedro Alves  <palves@redhat.com>
334         * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
335         or <winsock2.h> here.  Instead include "gdb_socket.h".
336         (remote_open): Use union gdb_sockaddr_u.
337         * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
338         or <winsock2.h> here.  Instead include "gdb_socket.h".
339         (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
340         * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
341         or <sys/un.h>.
342         (init_named_socket, gdb_agent_helper_thread): Use union
343         gdb_sockaddr_u.
344
345 2015-03-07  Pedro Alves  <palves@redhat.com>
346
347         * configure.ac (build_warnings): Move
348         -Wdeclaration-after-statement to the C-specific set.
349         * configure: Regenerate.
350
351 2015-03-07  Pedro Alves  <palves@redhat.com>
352
353         * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
354         or <winsock2.h> here.  Instead include "gdb_socket.h".
355         (remote_open): Use union gdb_sockaddr_u.
356         * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
357         or <winsock2.h> here.  Instead include "gdb_socket.h".
358         (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
359         * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
360         or <sys/un.h>.
361         (init_named_socket, gdb_agent_helper_thread): Use union
362         gdb_sockaddr_u.
363
364 2015-03-07  Pedro Alves  <palves@redhat.com>
365
366         Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
367         instead.
368
369 2015-03-06  Yao Qi  <yao.qi@linaro.org>
370
371         * linux-aarch64-low.c (aarch64_insert_point): Use
372         show_debug_regs as a boolean.
373         (aarch64_remove_point): Likewise.
374
375 2015-03-05  Pedro Alves  <palves@redhat.com>
376
377         * lynx-low.c (lynx_target_ops): Install NULL hooks for
378         stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
379         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
380         * nto-low.c (nto_target_ops): Likewise.
381         * spu-low.c (spu_target_ops): Likewise.
382         * win32-low.c (win32_target_ops): Likewise.
383
384 2015-03-04  Pedro Alves  <palves@redhat.com>
385
386         * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
387         Decide whether a breakpoint triggered based on the SIGTRAP's
388         siginfo.si_code.
389         (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
390         breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
391         (linux_low_filter_event): Check for breakpoints before checking
392         watchpoints.
393         (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
394         siginfo.si_code.
395         (linux_stopped_by_sw_breakpoint)
396         (linux_supports_stopped_by_sw_breakpoint)
397         (linux_stopped_by_hw_breakpoint)
398         (linux_supports_stopped_by_hw_breakpoint): New functions.
399         (linux_target_ops): Install new target methods.
400
401 2015-03-04  Pedro Alves  <palves@redhat.com>
402
403         * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
404         * server.c (swbreak_feature, hwbreak_feature): New globals.
405         (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
406         (captured_main): Clear swbreak_feature and hwbreak_feature.
407         * server.h (swbreak_feature, hwbreak_feature): Declare.
408         * target.h (struct target_ops) <stopped_by_sw_breakpoint,
409         supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
410         supports_stopped_by_hw_breakpoint>: New fields.
411         (target_supports_stopped_by_sw_breakpoint)
412         (target_stopped_by_sw_breakpoint)
413         (target_supports_stopped_by_hw_breakpoint)
414         (target_stopped_by_hw_breakpoint): Declare.
415
416 2015-03-04  Pedro Alves  <palves@redhat.com>
417
418         enum lwp_stop_reason -> enum target_stop_reason
419         * linux-low.c (check_stopped_by_breakpoint): Adjust.
420         (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
421         (linux_wait_1, stuck_in_jump_pad_callback)
422         (move_out_of_jump_pad_callback, linux_resume_one_lwp)
423         (linux_stopped_by_watchpoint):
424         * linux-low.h (enum lwp_stop_reason): Delete.
425         (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
426         * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
427
428 2015-03-04  Yao Qi  <yao.qi@linaro.org>
429
430         * Makefile.in (SFILES): Add linux-aarch64-low.c.
431
432 2015-03-03  Gary Benson  <gbenson@redhat.com>
433
434         * hostio.c (handle_vFile): Fix prefix lengths.
435
436 2015-03-03  Markus Metzger  <markus.t.metzger@intel.com>
437
438         * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
439         ptr_bits.
440
441 2015-03-02  Andreas Arnez  <arnez@linux.vnet.ibm.com>
442
443         * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
444         (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
445         (clean): Add "rm -f" for above C files.
446         * configure.srv (srv_regobj): Add s390-vx-linux64.o,
447         s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
448         (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
449         s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
450         * linux-s390-low.c (HWCAP_S390_VX): New macro.
451         (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
452         (init_registers_s390x_vx_linux64)
453         (init_registers_s390x_tevx_linux64)
454         (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
455         (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
456         declarations.
457         (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
458         (s390_store_vxrs_high): New functions.
459         (s390_regsets): Add entries for NT_S390_VXRS_LOW and
460         NT_S390_VXRS_HIGH.
461         (s390_arch_setup): Add logic for selecting one of the new target
462         descriptions.  Activate the new vector regsets if applicable.
463         (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
464         init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
465         and init_registers_s390x_tevx_linux64.
466
467 2015-03-01  Pedro Alves  <palves@redhat.com>
468
469         * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
470         parameter.
471
472 2015-02-27  Pedro Alves  <palves@redhat.com>
473
474         * linux-x86-low.c (u_debugreg_offset): New function.
475         (x86_linux_dr_get, x86_linux_dr_set): Use it.
476
477 2015-02-27  Pedro Alves  <palves@redhat.com>
478
479         * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
480         [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
481         [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
482         ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
483         (ps_lsetfpregs, ps_getpid)
484         (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
485         (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
486         (ps_lsetxregs, ps_plog): Declare.
487
488 2015-02-27  Pedro Alves  <palves@redhat.com>
489
490         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
491         IP_AGENT_EXPORT_FUNC.
492         * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
493         IP_AGENT_EXPORT_FUNC.
494         * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
495         (IP_AGENT_EXPORT): Delete.
496         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
497         (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
498         (gdb_trampoline_buffer_error, collecting, gdb_collect)
499         (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
500         (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
501         (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
502         (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
503         (traceframe_read_count, traceframe_write_count)
504         (traceframes_created, trace_state_variables, get_raw_reg)
505         (get_trace_state_variable_value, set_trace_state_variable_value)
506         (ust_loaded, helper_thread_id, cmd_buf): Use
507         IPA_SYM_EXPORTED_NAME.
508         (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
509         (tracepoints) Use IP_AGENT_EXPORT_VAR.
510         (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
511         IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
512         (last_tracepoint): Move into !IN_PROCESS_AGENT block.
513         (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
514         EXTERN_C_PUSH/EXTERN_C_POP.
515         (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
516         (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
517         wrap in EXTERN_C_PUSH/EXTERN_C_POP.
518         (trace_buffer_ctrl, trace_buffer_ctrl_curr)
519         (traceframe_write_count, traceframe_read_count)
520         (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
521         (about_to_request_buffer_space, get_trace_state_variable_value)
522         (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
523         (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
524         EXTERN_C_PUSH/EXTERN_C_POP.
525         (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
526         (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
527         (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
528         and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
529         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
530         (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
531         (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
532         * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
533         Define.
534         (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
535         (IP_AGENT_EXPORT_VAR_DECL): Define.
536         (tracing): Declare.
537         (gdb_agent_get_raw_reg): Declare.
538
539 2015-02-27  Tom Tromey  <tromey@redhat.com>
540             Pedro Alves  <palves@redhat.com>
541
542         Rename symbols whose names are reserved C++ keywords throughout.
543
544 2015-02-27  Pedro Alves  <palves@redhat.com>
545
546         * Makefile.in (COMPILER): New, get it from autoconf.
547         (CXX): Get from autoconf instead.
548         (COMPILE.pre): Use COMPILER.
549         (CC-LD): Rename to ...
550         (CC_LD): ... this.  Use COMPILER.
551         (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
552         (CXX_FOR_TARGET): Default to g++ instead of gcc.
553         * acinclude.m4: Include build-with-cxx.m4.
554         * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
555         Disable -Werror by default if building in C++ mode.
556         (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
557         -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
558         the C++ compiler.  Save/restore CXXFLAGS too.
559         * configure: Regenerate.
560
561 2015-02-27  Pedro Alves  <palves@redhat.com>
562
563         * acinclude.m4: Include libiberty.m4.
564         * configure.ac: Call libiberty_INIT.
565         * config.in, configure: Regenerate.
566
567 2015-02-26  Pedro Alves  <palves@redhat.com>
568
569         * linux-low.c (linux_wait_1): When incrementing the PC past a
570         program breakpoint always use the_low_target.breakpoint_len as
571         increment, rather than the maximum between that and
572         the_low_target.decr_pc_after_break.
573
574 2015-02-23  Pedro Alves  <palves@redhat.com>
575
576         * linux-low.c (check_stopped_by_breakpoint): Don't check if the
577         thread was doing a step-over; always adjust the PC if
578         we stepped over a permanent breakpoint.
579         (linux_wait_1): If we stepped over breakpoint that was on top of a
580         permanent breakpoint, manually advance the PC past it.
581
582 2015-02-23  Pedro Alves  <palves@redhat.com>
583
584         * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
585         modes.
586         (x86_fill_gregset, x86_store_gregset): Use it when handling
587         $orig_eax.
588
589 2015-02-20  Pedro Alves  <palves@redhat.com>
590
591         * thread-db.c: Include "nat/linux-procfs.h".
592         (thread_db_init): Skip listing new threads if the kernel supports
593         PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
594
595 2015-02-20  Pedro Alves  <palves@redhat.com>
596
597         * linux-low.c (status_pending_p_callback): Use ptid_match.
598
599 2015-02-19  Antoine Tremblay  <antoine.tremblay@ericsson.com>
600
601         PR breakpoints/16812
602         * linux-low.c (wstatus_maybe_breakpoint): Remove.
603         (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
604         (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
605
606 2015-02-10  Antoine Tremblay <antoine.tremblay@ericsson.com>
607
608         PR breakpoints/15956
609         * tracepoint.c (cmd_qtinit): Add check for current_thread.
610
611 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
612
613         * linux-low.c (linux_low_btrace_conf): Print size.
614         * server.c (handle_btrace_conf_general_set): New.
615         (hanle_general_set): Call handle_btrace_conf_general_set.
616         (handle_query): Report Qbtrace-conf:bts:size as supported.
617
618 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
619
620         * linux-low.c (linux_low_enable_btrace): Update parameters.
621         (linux_low_btrace_conf): New.
622         (linux_target_ops)<to_btrace_conf>: Initialize.
623         * server.c (current_btrace_conf): New.
624         (handle_btrace_enable): Rename to ...
625         (handle_btrace_enable_bts): ... this.  Pass &current_btrace_conf
626         to target_enable_btrace.  Update comment.  Update users.
627         (handle_qxfer_btrace_conf): New.
628         (qxfer_packets): Add btrace-conf entry.
629         (handle_query): Report qXfer:btrace-conf:read as supported packet.
630         * target.h (target_ops)<enable_btrace>: Update parameters and comment.
631         (target_ops)<read_btrace_conf>: New.
632         (target_enable_btrace): Update parameters.
633         (target_read_btrace_conf): New.
634
635 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
636
637         * server.c (handle_btrace_general_set): Remove call to
638         target_supports_btrace.
639         (supported_btrace_packets): New.
640         (handle_query): Call supported_btrace_packets.
641         * target.h: include btrace-common.h.
642         (btrace_target_info): Removed.
643         (supports_btrace, target_supports_btrace): Update parameters.
644
645 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
646
647         * Makefile.in (SFILES): Add common/btrace-common.c.
648         (OBS): Add common/btrace-common.o.
649         (btrace-common.o): Add build rules.
650         * linux-low: Include btrace-common.h.
651         (linux_low_read_btrace): Use struct btrace_data.  Call
652         btrace_data_init and btrace_data_fini.
653
654 2015-02-06  Pedro Alves  <palves@redhat.com>
655
656         * thread-db.c (find_new_threads_callback): Add debug output.
657
658 2015-02-04  Pedro Alves  <palves@redhat.com>
659
660         * linux-low.c (handle_extended_wait): Don't resume LWPs here.
661         (resume_stopped_resumed_lwps): New function.
662         (linux_wait_for_event_filtered): Use it.
663
664 2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
665
666         * Makefile.in (SFILES): Add linux-personality.c.
667         (linux-personality.o): New rule.
668         * configure.srv (srv_linux_obj): Add linux-personality.o to the
669         list of objects to be built.
670         * linux-low.c: Include nat/linux-personality.h.
671         (linux_create_inferior): Remove code to disable address space
672         randomization (moved to ../nat/linux-personality.c).  Create
673         cleanup to disable address space randomization.
674
675 2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
676
677         * Makefile.in (posix-strerror.o): New rule.
678         (mingw-strerror.o): Likewise.
679         * configure: Regenerated.
680         * configure.ac: Source file ../common/common.host.  Initialize new
681         variable srv_host_obs.  Add srv_host_obs to GDBSERVER_DEPFILES.
682
683 2015-01-14  Yao Qi  <yao@codesourcery.com>
684
685         * Makefile.in (SFILES): Add nat/ppc-linux.c.
686         (ppc-linux.o): New rule.
687         * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
688         * configure.ac: AC_CHECK_FUNCS(getauxval).
689         * config.in: Re-generated.
690         * configure: Re-generated.
691         * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
692         ppc64_64bit_inferior_p
693
694 2015-01-14  Yao Qi  <yao@codesourcery.com>
695
696         * linux-ppc-low.c: Include "nat/ppc-linux.h".
697          (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
698         (PPC_FEATURE_HAS_ALTIVEC,  PPC_FEATURE_HAS_SPE): Likewise.
699         (PT_ORIG_R3, PT_TRAP): Likewise.
700         (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
701         (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
702         (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
703
704 2015-01-10  Joel Brobecker  <brobecker@adacore.com>
705
706         * i387-fp.c (i387_cache_to_xsave): In look over
707         num_avx512_zmmh_high_registers, replace use of struct i387_xsave
708         zmmh_low_space field by use of zmmh_high_space.
709
710 2015-01-09  Pedro Alves  <palves@redhat.com>
711
712         * linux-low.c (step_over_bkpt): Move higher up in the file.
713         (handle_extended_wait): Don't store the stop_pc here.
714         (get_stop_pc): Adjust comments and rename to ...
715         (check_stopped_by_breakpoint): ... this.  Record whether the LWP
716         stopped for a software breakpoint or hardware breakpoint.
717         (thread_still_has_status_pending_p): New function.
718         (status_pending_p_callback): Use
719         thread_still_has_status_pending_p.  If the event is no longer
720         interesting, resume the LWP.
721         (handle_tracepoints): Add assert.
722         (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
723         (wstatus_maybe_breakpoint): New function.
724         (cancel_breakpoint): Delete function.
725         (check_stopped_by_watchpoint): New function, factored out from
726         linux_low_filter_event.
727         (lp_status_maybe_breakpoint): Delete function.
728         (linux_low_filter_event): Remove filter_ptid argument.
729         Leave thread group exits pending here.  Store the LWP's stop PC.
730         Always leave events pending.
731         (linux_wait_for_event_filtered): Pull all events out of the
732         kernel, and leave them all pending.
733         (count_events_callback, select_event_lwp_callback): Consider all
734         events.
735         (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
736         (select_event_lwp): Only give preference to the stepping LWP in
737         all-stop mode.  Adjust comments.
738         (ignore_event): New function.
739         (linux_wait_1): Delete 'retry' label.  Use ignore_event.  Remove
740         references to cancel_breakpoints.  Adjust to renames.  Also give
741         equal priority to all LWPs that have had events in non-stop mode.
742         If reporting a software breakpoint event, unadjust the LWP's PC.
743         (linux_wait): If linux_wait_1 returned an ignored event, retry.
744         (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
745         Adjust.
746         (linux_resume_one_lwp): Store the LWP's PC.  Adjust.
747         (resume_status_pending_p): Use thread_still_has_status_pending_p.
748         (linux_stopped_by_watchpoint): Adjust.
749         (linux_target_ops): Remove reference to linux_cancel_breakpoints.
750         * linux-low.h (enum lwp_stop_reason): New.
751         (struct lwp_info) <stop_pc>: Adjust comment.
752         <stopped_by_watchpoint>: Delete field.
753         <stop_reason>: New field.
754         * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
755         * mem-break.c (software_breakpoint_inserted_here)
756         (hardware_breakpoint_inserted_here): New function.
757         * mem-break.h (software_breakpoint_inserted_here)
758         (hardware_breakpoint_inserted_here): Declare.
759         * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
760         (cancel_breakpoints): Delete.
761         * tracepoint.c (clear_installed_tracepoints, stop_tracing)
762         (upload_fast_traceframes): Remove references to
763         cancel_breakpoints.
764
765 2015-01-09  Pedro Alves  <palves@redhat.com>
766
767         * thread-db.c (find_new_threads_callback): Ignore thread if the
768         kernel thread ID is -1.
769
770 2015-01-09  Pedro Alves  <palves@redhat.com>
771
772         * linux-low.c (linux_attach_fail_reason_string): Move to
773         nat/linux-ptrace.c, and rename.
774         (linux_attach_lwp): Update comment.
775         (attach_proc_task_lwp_callback): New function.
776         (linux_attach): Adjust to rename and use
777         linux_proc_attach_tgid_threads.
778         (linux_attach_fail_reason_string): Delete declaration.
779
780 2015-01-01  Joel Brobecker  <brobecker@adacore.com>
781
782         * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
783         * server.c (gdbserver_version): Likewise.
784
785 2014-12-29  Sergio Durigan Junior  <sergiodj@redhat.com>
786
787         * remote-utils.c: Include ctype.h.
788         (input_interrupt): Explicitly handle the case when the char
789         received is the NUL byte.  Improve the printing of non-ASCII
790         characters.
791
792 2014-12-16  Joel Brobecker  <brobecker@adacore.com>
793
794         * linux-low.c (linux_low_filter_event): Update call to
795         linux_enable_event_reporting following the addition of
796         a new parameter to that function.
797
798 2014-12-16  Catalin Udma  <catalin.udma@freescale.com>
799
800         PR server/17457
801         * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
802         (AARCH64_FPCR_REGNO): Likewise.
803         (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
804         (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
805         (aarch64_store_fpregset): Likewise.
806
807 2014-12-15  Joel Brobecker  <brobecker@adacore.com>
808
809         * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
810         Remove FIXME comment about assumption about N.
811
812 2014-12-13  Joel Brobecker  <brobecker@adacore.com>
813
814         * configure.ac: If large-file support is disabled in GDBserver,
815         pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
816         * configure: Regenerate.
817
818 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
819
820         * linux-low.c (regsets_fetch_inferior_registers): Suppress the
821         warning upon ENODATA from ptrace.
822         * linux-s390-low.c (s390_store_tdb): New.
823         (s390_regsets): Add regset for NT_S390_TDB.
824
825 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
826
827         * linux-low.c (regsets_store_inferior_registers): Skip regsets
828         without a fill_function.
829         * linux-s390-low.c (s390_fill_last_break): Remove.
830         (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
831         (s390_arch_setup): Use regset's size instead of fill_function for
832         loop end condition.
833
834 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
835
836         * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
837         the regset's store function when ptrace returned an error.
838         * regcache.c (get_thread_regcache): Invalidate register cache
839         before fetching inferior's registers.
840
841 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
842
843         * linux-low.c (regsets_fetch_inferior_registers): Rephrase
844         while-loop as for-loop.
845         (regsets_store_inferior_registers): Likewise.
846
847 2014-11-28  Yao Qi  <yao@codesourcery.com>
848
849         * configure.ac(AC_CHECK_FUNCS): Remove readlink.
850         * config.in, configure: Re-generate.
851         * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
852         is defined.
853
854 2014-11-21  Yao Qi  <yao@codesourcery.com>
855
856         * configure.ac: Don't invoke AC_FUNC_ALLOCA.
857         (AC_CHECK_HEADERS): Remove malloc.h.
858         * configure: Re-generated.
859         * config.in: Re-generated.
860         * server.h: Don't include alloca.h and malloc.h.
861         * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
862         Don't include malloc.h.
863
864 2014-11-17  Joel Brobecker  <brobecker@adacore.com>
865
866         * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
867         corresponding ERRNO check in same block.
868
869 2014-11-12  Pedro Alves  <palves@redhat.com>
870
871         * server.c (cont_thread): Update comment.
872         (start_inferior, attach_inferior): No longer clear cont_thread.
873         (handle_v_cont): No longer set cont_thread.
874         (captured_main): Clear cont_thread each time a GDB connects.
875
876 2014-11-12  Pedro Alves  <palves@redhat.com>
877
878         * linux-low.c (linux_wait_1): Don't force a wait for the Hc
879         thread, and don't resume all threads if the Hc thread has exited.
880
881 2014-11-12  Pedro Alves  <palves@redhat.com>
882
883         * linux-low.c (linux_request_interrupt): Always send a SIGINT to
884         the process group instead of to a specific LWP.
885
886 2014-10-15  Pedro Alves  <palves@redhat.com>
887
888         PR server/17487
889         * win32-arm-low.c (arm_set_thread_context): Remove current_event
890         parameter.
891         (arm_set_thread_context): Delete.
892         (the_low_target): Adjust.
893         * win32-i386-low.c (debug_registers_changed)
894         (debug_registers_used): Delete.
895         (update_debug_registers_callback): New function.
896         (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
897         needing to update their debug registers.
898         (win32_get_current_dr): New function.
899         (x86_dr_low_get_addr, x86_dr_low_get_control)
900         (x86_dr_low_get_status): Fetch the debug register from the thread
901         record's context.
902         (i386_initial_stuff): Adjust.
903         (i386_get_thread_context): Remove current_event parameter.  Don't
904         clear debug_registers_changed nor copy DR values to
905         debug_reg_state.
906         (i386_set_thread_context): Delete.
907         (i386_prepare_to_resume): New function.
908         (i386_thread_added): Mark the thread as needing to update irs
909         debug registers.
910         (the_low_target): Remove i386_set_thread_context and install
911         i386_prepare_to_resume.
912         * win32-low.c (win32_get_thread_context): Adjust.
913         (win32_set_thread_context): Use SetThreadContext
914         directly.
915         (win32_prepare_to_resume): New function.
916         (win32_require_context): New function, factored out from ...
917         (thread_rec): ... this.
918         (continue_one_thread): Call win32_prepare_to_resume on each thread
919         we're about to continue.
920         (win32_resume): Call win32_prepare_to_resume on the event thread.
921         * win32-low.h (struct win32_thread_info)
922         <debug_registers_changed>: New field.
923         (struct win32_target_ops): Change prototype of set_thread_context,
924         delete set_thread_context and add prepare_to_resume.
925         (win32_require_context): New declaration.
926
927 2014-10-08  Gary Benson  <gbenson@redhat.com>
928
929         * server.h: Do not include common-exceptions.h.
930
931 2014-10-08  Gary Benson  <gbenson@redhat.com>
932
933         * server.h: Do not include cleanups.h.
934
935 2014-09-30  James Hogan  <james.hogan@imgtec.com>
936
937         * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
938         mips64-dsp-linux.c.
939
940 2014-09-23  Yao Qi  <yao@codesourcery.com>
941
942         * linux-low.c (lp_status_maybe_breakpoint): New function.
943         (linux_low_filter_event): Call lp_status_maybe_breakpoint.
944         (count_events_callback): Likewise.
945         (select_event_lwp_callback): Likewise.
946         (cancel_breakpoints_callback): Likewise.
947
948 2014-09-19  Don Breazeal  <donb@codesourcery.com>
949
950         * linux-low.c (handle_extended_wait): Call
951         linux_ptrace_get_extended_event.
952         (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
953         linux_is_extended_waitstatus.
954
955 2014-09-16  Joel Brobecker  <brobecker@adacore.com>
956
957         * Makefile.in (CPPFLAGS): Define.
958         (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
959         (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
960
961 2014-09-16  Gary Benson  <gbenson@redhat.com>
962
963         * inferiors.h (current_inferior): Renamed as...
964         (current_thread): New variable.  All uses updated.
965         * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
966         (maybe_move_out_of_jump_pad): Likewise.
967         (cancel_breakpoint): Likewise.
968         (linux_low_filter_event): Likewise.
969         (wait_for_sigstop): Likewise.
970         (linux_resume_one_lwp): Likewise.
971         (need_step_over_p): Likewise.
972         (start_step_over): Likewise.
973         (linux_stabilize_threads): Renamed save_inferior as saved_thread.
974         * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
975         * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
976         and save_inferior as saved_thread.
977         * regcache.c (get_thread_regcache): Renamed saved_inferior as
978         saved_thread.
979         (regcache_invalidate_thread): Likewise.
980         * remote-utils.c (prepare_resume_reply): Likewise.
981         * thread-db.c (thread_db_get_tls_address): Likewise.
982         (disable_thread_event_reporting): Likewise.
983         (remove_thread_event_breakpoints): Likewise.
984         * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
985         as saved_thread.
986         * target.h (set_desired_inferior): Renamed as...
987         (set_desired_thread): New declaration.  All uses updated.
988         * server.c (myresume): Updated comment to reference thread instead
989         of inferior.
990         (handle_serial_event): Likewise.
991         (handle_target_event): Likewise.
992
993 2014-09-12  Tom Tromey  <tromey@redhat.com>
994             Gary Benson  <gbenson@redhat.com>
995
996         * regcache.h: Include common-regcache.h.
997         (regcache_read_pc): Don't declare.
998         * regcache.c (get_thread_regcache_for_ptid): New function.
999
1000 2014-09-11  Tom Tromey  <tromey@redhat.com>
1001             Gary Benson  <gbenson@redhat.com>
1002
1003         * symbol.c: New file.
1004         * Makefile.in (SFILES): Add symbol.c.
1005         (OBS): Add symbol.o.
1006
1007 2014-09-11  Gary Benson  <gbenson@redhat.com>
1008
1009         * target.c (target_stop_ptid, target_continue_ptid): New
1010         functions.
1011
1012 2014-09-11  Tom Tromey  <tromey@redhat.com>
1013             Gary Benson  <gbenson@redhat.com>
1014
1015         * target.h: Include target/target.h.
1016         * target.c (target_read_memory, target_read_uint32)
1017         (target_write_memory): New functions.
1018
1019 2014-09-11  Gary Benson  <gbenson@redhat.com>
1020
1021         * server.h (debug_hw_points): Don't declare.
1022         * server.c (debug_hw_points): Don't define.  Replace all uses
1023         with show_debug_regs.
1024         * linux-aarch64-low.c (debug_hw_points): Don't define.  Replace
1025         all uses with show_debug_regs.
1026
1027 2014-09-08  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
1028
1029         * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
1030         endianness into account.
1031         (ppc_supply_ptrace_register): Likewise.
1032
1033 2014-09-03  James Hogan  <james.hogan@imgtec.com>
1034
1035         * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
1036         to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
1037
1038 2014-09-03  Gary Benson  <gbenson@redhat.com>
1039
1040         * linux-x86-low.c (x86_linux_prepare_to_resume): Use
1041         ALL_DEBUG_ADDRESS_REGISTERS.
1042
1043 2014-09-02  Gary Benson  <gbenson@redhat.com>
1044
1045         * i386-low.h: Renamed as...
1046         * x86-low.h: New file.  All type, function and variable name
1047         prefixes changed from "i386_" to "x86_".  All references updated.
1048         * i386-low.c: Renamed as...
1049         * x86-low.c: New file.  All type, function and variable name
1050         prefixes changed from "i386_" to "x86_".  All references updated.
1051
1052 2014-09-02  Gary Benson  <gbenson@redhat.com>
1053
1054         * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
1055         (x86_linux_new_thread): Likewise.
1056
1057 2014-08-29  Gary Benson  <gbenson@redhat.com>
1058
1059         * server.h (setjmp.h): Do not include.
1060         (toplevel): Do not declare.
1061         (common-exceptions.h): Include.
1062         (cleanups.h): Likewise.
1063         * server.c (toplevel): Do not define.
1064         (exit_code): New static global.
1065         (detach_or_kill_for_exit_cleanup): New function.
1066         (main): New function.  Original main renamed to...
1067         (captured_main): New function.
1068         * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
1069
1070 2014-08-29  Gary Benson  <gbenson@redhat.com>
1071
1072         * Makefile.in (SFILES): Add common/common-exceptions.c.
1073         (OBS): Add common-exceptions.o.
1074         (common-exceptions.o): New rule.
1075         * utils.c (prepare_to_throw_exception): New function.
1076
1077 2014-08-29  Gary Benson  <gbenson@redhat.com>
1078
1079         * config.in: Regenerate.
1080         * configure: Likewise.
1081
1082 2014-08-29  Gary Benson  <gbenson@redhat.com>
1083
1084         * Makefile.in (SFILES): Add common/cleanups.c.
1085         (OBS): cleanups.o.
1086         (cleanups.o): New rule.
1087
1088 2014-08-29  Gary Benson  <gbenson@redhat.com>
1089
1090         * utils.c (internal_vwarning): New function.
1091
1092 2014-08-28  Gary Benson  <gbenson@redhat.com>
1093
1094         * utils.h (fatal): Remove declaration.
1095         * utils.c (fatal): Remove function.
1096
1097 2014-08-28  Gary Benson  <gbenson@redhat.com>
1098
1099         * tracepoint.c (gdb_agent_init): Replace fatal with
1100         perror_with_name.
1101         (initialize_tracepoint): Likewise.
1102
1103 2014-08-28  Gary Benson  <gbenson@redhat.com>
1104
1105         * remote-utils.c (remote_prepare): Replace fatal with error.
1106
1107 2014-08-28  Gary Benson  <gbenson@redhat.com>
1108
1109         * linux-low.c (linux_async): Replace fatal with warning.
1110         Tidy up and return.
1111         (linux_start_non_stop): Return -1 if linux_async failed.
1112
1113 2014-08-28  Gary Benson  <gbenson@redhat.com>
1114
1115         * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
1116         gdb_assert.
1117         (i386_dr_low_get_addr): Remove vague comment.
1118         * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
1119         gdb_assert.
1120
1121 2014-08-28  Gary Benson  <gbenson@redhat.com>
1122
1123         * inferiors.c (get_thread_process): Replace check with gdb_assert.
1124         * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
1125         internal_error.
1126         (linux_resume_one_lwp): Likewise.
1127         * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
1128         gdb_assert.
1129         * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
1130         with internal_error.
1131         * regcache.c (get_thread_regcache): Replace check with gdb_assert.
1132         (init_register_cache): Replace fatal with gdb_assert_not_reached.
1133         (find_register_by_name): Replace fatal with internal_error.
1134         (find_regno): Likewise.
1135         * tdesc.c (init_target_desc): Replace check with gdb_assert.
1136         * thread-db.c (thread_db_create_event): Likewise.
1137         (thread_db_load_search): Likewise.
1138         (try_thread_db_load_1): Likewise.
1139         * tracepoint.c (get_jump_space_head): Replace fatal with
1140         internal_error.
1141         (claim_trampoline_space): Likewise.
1142         (have_fast_tracepoint_trampoline_buffer): Likewise.
1143         (cmd_qtstart): Likewise.
1144         (stop_tracing): Likewise.
1145         (fast_tracepoint_collecting): Likewise.
1146         (target_malloc): Likewise.
1147         (download_tracepoint): Likewise.
1148         (download_trace_state_variables): Replace check with gdb_assert.
1149         (upload_fast_traceframes): Replace fatal with internal_error.
1150
1151 2014-08-19  Tom Tromey  <tromey@redhat.com>
1152             Gary Benson  <gbenson@redhat.com>
1153
1154         * Makefile.in (SFILES): Add common/common-debug.c.
1155         (OBS): Add common-debug.o.
1156         (common-debug.o): New rule.
1157         * debug.h (debug_printf): Don't declare.
1158         * debug.c (debug_printf): Renamed and rewritten as...
1159         (debug_vprintf): New function.
1160
1161 2014-08-19  Gary Benson  <gbenson@redhat.com>
1162
1163         * utils.h: Do not include print-utils.h.
1164
1165 2014-08-19  Tom Tromey  <tromey@redhat.com>
1166             Gary Benson  <gbenson@redhat.com>
1167
1168         * server.h: Add static assertion.
1169         (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
1170
1171 2014-08-19  Tom Tromey  <tromey@redhat.com>
1172             Gary Benson  <gbenson@redhat.com>
1173
1174         * Makefile.in (SFILES): Add common/errors.c.
1175         (OBS): Add errors.o.
1176         (IPA_OBS): Add errors-ipa.o.
1177         (errors.o): New rule.
1178         (errors-ipa.o): Likewise.
1179         * utils.h (perror_with_name, error, warning): Don't declare.
1180         * utils.c (warning): Renamed and rewritten as...
1181         (vwarning): New function.
1182         (error): Renamed and rewritten as...
1183         (verror): New function.
1184         (internal_error): Renamed and rewritten as...
1185         (internal_verror): New function.
1186
1187 2014-08-07  Gary Benson  <gbenson@redhat.com>
1188
1189         * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
1190         * configure: Regenerate.
1191         * config.in: Likewise.
1192         * server.h: Do not include errno.h.
1193         * event-loop.c: Likewise.
1194         * hostio-errno.c: Likewise.
1195         * linux-low.c: Likewise.
1196         * remote-utils.c: Likewise.
1197         * spu-low.c: Likewise.
1198         * utils.c: Likewise.
1199         * gdbreplay.c: Unconditionally include errno.h.
1200
1201 2014-08-07  Gary Benson  <gbenson@redhat.com>
1202
1203         * server.h: Do not include string.h.
1204         * event-loop.c: Likewise.
1205         * linux-low.c: Likewise.
1206         * regcache.c: Likewise.
1207         * remote-utils.c: Likewise.
1208         * spu-low.c: Likewise.
1209         * utils.c: Likewise.
1210
1211 2014-08-07  Gary Benson  <gbenson@redhat.com>
1212
1213         * server.h: Do not include gdb_assert.h.
1214
1215 2014-08-07  Gary Benson  <gbenson@redhat.com>
1216
1217         * server.h: Do not include common-utils.h.
1218
1219 2014-08-07  Gary Benson  <gbenson@redhat.com>
1220
1221         * server.h: Do not include ptid.h.
1222         * notif.h: Likewise.
1223
1224 2014-08-07  Gary Benson  <gbenson@redhat.com>
1225
1226         * server.h: Do not include gdb_locale.h.
1227
1228 2014-08-07  Gary Benson  <gbenson@redhat.com>
1229
1230         * server.h: Do not include gdb/signals.h.
1231         * win32-low.c: Likewise.
1232
1233 2014-08-07  Gary Benson  <gbenson@redhat.com>
1234
1235         * server.h: Do not include pathmax.h.
1236
1237 2014-08-07  Gary Benson  <gbenson@redhat.com>
1238
1239         * server.h: Do not include libiberty.h.
1240         * linux-bfin-low.c: Likewise.
1241
1242 2014-08-07  Gary Benson  <gbenson@redhat.com>
1243
1244         * server.h: Do not include ansidecl.h.
1245
1246 2014-08-07  Gary Benson  <gbenson@redhat.com>
1247
1248         * linux-x86-low.c: Do not include stddef.h.
1249         * lynx-ppc-low.c: Likewise.
1250         * tracepoint.c: Likewise.
1251
1252 2014-08-07  Gary Benson  <gbenson@redhat.com>
1253
1254         * server.h: Do not include stdarg.h.
1255         * nto-low.c: Likewise.
1256
1257 2014-08-07  Gary Benson  <gbenson@redhat.com>
1258
1259         * server.h: Do not include stdlib.h.
1260         * inferiors.c: Likewise.
1261         * linux-low.c: Likewise.
1262         * regcache.c: Likewise.
1263         * spu-low.c: Likewise.
1264         * tracepoint.c: Likewise.
1265         * utils.c: Likewise.
1266
1267 2014-08-07  Gary Benson  <gbenson@redhat.com>
1268
1269         * server.h: Do not include stdio.h.
1270         * linux-low.c: Likewise.
1271         * remote-utils.c: Likewise.
1272         * spu-low.c: Likewise.
1273         * utils.c: Likewise.
1274         * wincecompat.c: Likewise.
1275
1276 2014-08-06  Gary Benson  <gbenson@redhat.com>
1277
1278         * regcache.c (init_register_cache): Move conditionals inside if.
1279
1280 2014-08-06  Gary Benson  <gbenson@redhat.com>
1281
1282         * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
1283
1284 2014-07-31  Gary Benson  <gbenson@redhat.com>
1285
1286         * ax.h: Do not include server.h.
1287         * gdbthread.h: Likewise.
1288         * lynx-low.h: Likewise.
1289         * notif.h: Likewise.
1290
1291 2014-07-30  Gary Benson  <gbenson@redhat.com>
1292
1293         * server.h: Include common-defs.h.
1294         Do not include config.h or build-gnulib-gdbserver/config.h.
1295
1296 2014-07-30  Gary Benson  <gbenson@redhat.com>
1297
1298         * hostio-errno.c: Move server.h to top of includes list.
1299         * inferiors.c: Likewise.
1300         * linux-x86-low.c: Likewise.
1301         * notif.c: Include server.h.
1302
1303 2014-07-24  Tom Tromey  <tromey@redhat.com>
1304             Gary Benson  <gbenson@redhat.com>
1305
1306         * server.h (CORE_ADDR): Now unsigned.
1307
1308 2014-07-16  Pedro Alves  <palves@redhat.com>
1309
1310         * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
1311
1312 2014-07-15  Pedro Alves  <palves@redhat.com>
1313
1314         * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
1315         copy.
1316
1317 2014-07-11  Pedro Alves  <palves@redhat.com>
1318
1319         * linux-low.c (kill_wait_lwp): New function, based on
1320         kill_one_lwp_callback, but use my_waitpid directly.
1321         (kill_one_lwp_callback, linux_kill): Use it.
1322
1323 2014-06-23  Pedro Alves  <palves@redhat.com>
1324
1325         * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1326         before setting DR0..DR3.
1327
1328 2014-06-20  Gary Benson  <gbenson@redhat.com>
1329
1330         * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1331         * configure: Regenerated.
1332         * config.in: Likewise.
1333
1334 2014-06-20  Gary Benson  <gbenson@redhat.com>
1335
1336         * Makefile.in (SFILES): Update locations for files moved
1337         from common to nat.
1338         (object file files): Reordered.
1339
1340 2014-06-20  Gary Benson  <gbenson@redhat.com>
1341
1342         * i386-low.h (i386_dr_low_can_set_addr): Removed.
1343         (i386_dr_low_set_addr): Likewise.
1344         (i386_dr_low_get_addr): Likewise.
1345         (i386_dr_low_can_set_control): Likewise.
1346         (i386_dr_low_set_control): Likewise.
1347         (i386_dr_low_get_control): Likewise.
1348         (i386_dr_low_get_status): Likewise.
1349         (i386_get_debug_register_length): Likewise.
1350         * linux-x86-low.c (i386_dr_low_set_addr):
1351         Changed signature.  Made static.
1352         (i386_dr_low_get_addr): Likewise.
1353         (i386_dr_low_set_control): Likewise.
1354         (i386_dr_low_get_control): Likewise.
1355         (i386_dr_low_get_status): Likewise.
1356         (i386_dr_low): New global variable.
1357         * win32-i386-low.c (i386_dr_low_set_addr):
1358         Changed signature.  Made static.
1359         (i386_dr_low_get_addr): Likewise.
1360         (i386_dr_low_set_control): Likewise.
1361         (i386_dr_low_get_control): Likewise.
1362         (i386_dr_low_get_status): Likewise.
1363         (i386_dr_low): New global variable.
1364
1365 2014-06-20  Marcus Shawcroft  <marcus.shawcroft@arm.com>
1366
1367         * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1368         * Makefile.in (AR, AR_FLAGS): Define.
1369         * configure: Regenerate.
1370
1371 2014-06-19  Gary Benson  <gbenson@redhat.com>
1372
1373         * Makefile.in (i386-dregs.o): New rule.
1374         * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1375         * i386-low.c (target.h): Remove include.
1376         (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1377         (DR_CONTROL_SHIFT): Likewise.
1378         (DR_CONTROL_SIZE): Likewise.
1379         (DR_RW_EXECUTE): Likewise.
1380         (DR_RW_WRITE): Likewise.
1381         (DR_RW_READ): Likewise.
1382         (DR_RW_IORW): Likewise.
1383         (DR_LEN_1): Likewise.
1384         (DR_LEN_2): Likewise.
1385         (DR_LEN_4): Likewise.
1386         (DR_LEN_8): Likewise.
1387         (DR_LOCAL_ENABLE_SHIFT): Likewise.
1388         (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1389         (DR_ENABLE_SIZE): Likewise.
1390         (DR_LOCAL_SLOWDOWN): Likewise.
1391         (DR_GLOBAL_SLOWDOWN): Likewise.
1392         (DR_CONTROL_RESERVED): Likewise.
1393         (I386_DR_CONTROL_MASK): Likewise.
1394         (I386_DR_VACANT): Likewise.
1395         (I386_DR_LOCAL_ENABLE): Likewise.
1396         (I386_DR_GLOBAL_ENABLE): Likewise.
1397         (I386_DR_DISABLE): Likewise.
1398         (I386_DR_SET_RW_LEN): Likewise.
1399         (I386_DR_GET_RW_LEN): Likewise.
1400         (I386_DR_WATCH_HIT): Likewise.
1401         (i386_wp_op_t): Likewise.
1402         (i386_show_dr): Likewise.
1403         (i386_length_and_rw_bits): Likewise.
1404         (i386_insert_aligned_watchpoint): Likewise.
1405         (i386_remove_aligned_watchpoint): Likewise.
1406         (i386_handle_nonaligned_watchpoint): Likewise.
1407         i386_update_inferior_debug_regs(): Likewise.
1408         (i386_dr_insert_watchpoint): Likewise.
1409         (i386_dr_remove_watchpoint): Likewise.
1410         (i386_dr_region_ok_for_watchpoint): Likewise.
1411         (i386_dr_stopped_data_address): Likewise.
1412         (i386_dr_stopped_by_watchpoint): Likewise.
1413
1414 2014-06-19  Gary Benson  <gbenson@redhat.com>
1415
1416         * i386-low.c (i386_dr_show): Renamed to
1417         i386_show_dr and made static.  All uses updated.
1418         (i386_dr_length_and_rw_bits): Renamed to
1419         i386_length_and_rw_bits and made static.
1420         All uses updated.
1421         (i386_dr_insert_aligned_watchpoint): Renamed to
1422         i386_insert_aligned_watchpoint and made static.
1423         All uses updated.
1424         (i386_dr_remove_aligned_watchpoint): Renamed to
1425         i386_remove_aligned_watchpoint and made static.
1426         All uses updated.
1427         (i386_dr_update_inferior_debug_regs): Renamed to
1428         i386_update_inferior_debug_regs and made static.
1429         All uses updated.
1430
1431 2014-06-18  Gary Benson  <gbenson@redhat.com>
1432
1433         * i386-low.h (i386_dr_low_can_set_addr): New macro.
1434         (i386_dr_low_can_set_control): Likewise.
1435         (i386_get_debug_register_length): Likewise.
1436         * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1437         (i386_dr_low_can_set_control): Likewise.
1438         (i386_get_debug_register_length): Likewise.
1439
1440 2014-06-17  Gary Benson  <gbenson@redhat.com>
1441
1442         * i386-low.h (i386-dregs.h): New include.
1443         (DR_FIRSTADDR): Now in i386-dregs.h.
1444         (DR_LASTADDR): Likewise.
1445         (DR_NADDR): Likewise.
1446         (DR_STATUS): Likewise.
1447         (DR_CONTROL): Likewise.
1448         (i386_debug_reg_state): Likewise.
1449         (i386_dr_insert_watchpoint): Likewise.
1450         (i386_dr_remove_watchpoint): Likewise.
1451         (i386_dr_region_ok_for_watchpoint): Likewise.
1452         (i386_dr_stopped_data_address): Likewise.
1453         (i386_dr_stopped_by_watchpoint): Likewise.
1454         * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1455
1456 2014-06-18  Gary Benson  <gbenson@redhat.com>
1457
1458         * i386-low.h (i386_low_insert_watchpoint): Renamed to
1459         i386_dr_insert_watchpoint.
1460         (i386_low_remove_watchpoint): Renamed to
1461         i386_dr_remove_watchpoint.
1462         (i386_low_region_ok_for_watchpoint): Renamed to
1463         i386_dr_region_ok_for_watchpoint.
1464         (i386_low_stopped_data_address): Renamed to
1465         i386_dr_stopped_data_address.
1466         (i386_low_stopped_by_watchpoint): Renamed to
1467         i386_dr_stopped_by_watchpoint.
1468         * i386-low.c (i386_show_dr): Renamed to
1469         i386_dr_show and made nonstatic.  All uses updated.
1470         (i386_length_and_rw_bits): Renamed to
1471         i386_dr_length_and_rw_bits and made nonstatic.
1472         All uses updated.
1473         (i386_insert_aligned_watchpoint): Renamed to
1474         i386_dr_insert_aligned_watchpoint and made nonstatic.
1475         All uses updated.
1476         (i386_remove_aligned_watchpoint): Renamed to
1477         i386_dr_remove_aligned_watchpoint and made nonstatic.
1478         All uses updated.
1479         (i386_update_inferior_debug_regs): Renamed to
1480         i386_dr_update_inferior_debug_regs and made nonstatic.
1481         All uses updated.
1482         (i386_low_insert_watchpoint): Renamed to
1483         i386_dr_insert_watchpoint.  All uses updated.
1484         (i386_low_remove_watchpoint): Renamed to
1485         i386_dr_remove_watchpoint.  All uses updated.
1486         (i386_low_region_ok_for_watchpoint): Renamed to
1487         i386_dr_region_ok_for_watchpoint.  All uses updated.
1488         (i386_low_stopped_data_address): Renamed to
1489         i386_dr_stopped_data_address.  All uses updated.
1490         (i386_low_stopped_by_watchpoint): Renamed to
1491         i386_dr_stopped_by_watchpoint.  All uses updated.
1492
1493 2014-06-18  Gary Benson  <gbenson@redhat.com>
1494
1495         * i386-low.c (i386_dr_low_can_set_addr): New macro.
1496         (i386_dr_low_can_set_control): Likewise.
1497         (i386_insert_aligned_watchpoint): New check.
1498
1499 2014-06-18  Gary Benson  <gbenson@redhat.com>
1500
1501         * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1502         Renamed to state.
1503
1504 2014-06-18  Gary Benson  <gbenson@redhat.com>
1505
1506         * i386-low.c (i386_length_and_rw_bits): Use internal_error
1507         instead of fatal and error.
1508         (i386_handle_nonaligned_watchpoint): Likewise.
1509
1510 2014-06-18  Gary Benson  <gbenson@redhat.com>
1511
1512         * i386-low.c (i386_get_debug_register_length): New macro.
1513         (TARGET_HAS_DR_LEN_8): Remove conditional.  Use above macro.
1514         (i386_show_dr): Use debug_printf instead of fprintf.  Use
1515         phex to format values.
1516
1517 2014-06-18  Gary Benson  <gbenson@redhat.com>
1518
1519         * i386-low.h: Comment changes.
1520         * i386-low.c: Likewise.
1521
1522 2014-06-18  Gary Benson  <gbenson@redhat.com>
1523
1524         * i386-low.c: Whitespace changes.
1525
1526 2014-06-12  Tom Tromey  <tromey@redhat.com>
1527
1528         * utils.c (freeargv): Remove.
1529
1530 2014-06-12  Tom Tromey  <tromey@redhat.com>
1531
1532         * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1533         * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1534         (parse_debug_format_options): Likewise.
1535         (gdbserver_usage): Likewise.
1536         * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1537         (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1538         (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1539         against libiberty.
1540         ($(LIBGNU)): Depend on libiberty.
1541         (all-lib): Recurse into all subdirs.
1542         (install-only): Invoke "install" target in subdirs.
1543         (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1544         targets.
1545         * configure: Rebuild.
1546         * configure.ac: Add ACX_CONFIGURE_DIR for libiberty.  Don't check
1547         for vasprintf, vsnprintf, or gettimeofday.
1548         * configure.srv: Don't add safe-ctype.o or lbasename.o to
1549         srv_tgtobj.
1550
1551 2014-06-05  Joel Brobecker  <brobecker@adacore.com>
1552
1553         * development.sh: Delete.
1554         * Makefile.in (config.status): Adjust dependency on development.sh.
1555         * configure.ac: Adjust development.sh source call.
1556         * configure: Regenerate.
1557
1558 2014-06-02  Pedro Alves  <palves@redhat.com>
1559
1560         * ax.c (gdb_free_agent_expr): New function.
1561         * ax.h (gdb_free_agent_expr): New declaration.
1562         * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1563         list.
1564         (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1565         static.
1566         (clear_breakpoint_conditions_and_commands): New function.
1567         * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1568         (clear_breakpoint_conditions_and_commands): New declaration.
1569
1570 2014-05-23  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
1571
1572         * linux-aarch64-low.c (asm/ptrace.h): Include.
1573
1574 2014-05-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
1575
1576         Fix TLS access for -static -pthread.
1577         * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1578         (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1579         (thread_db_load_search, try_thread_db_load_1): Initialize it.
1580
1581 2014-05-20  Pedro Alves  <palves@redhat.com>
1582
1583         * linux-aarch64-low.c (aarch64_insert_point)
1584         (aarch64_remove_point): No longer check whether the type is
1585         supported here.  Adjust to new interface.
1586         (the_low_target): Install aarch64_supports_z_point_type as
1587         supports_z_point_type method.
1588         * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1589         (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1590         instead of a Z packet char.  Adjust.
1591         (arm_supports_z_point_type): New function.
1592         (arm_insert_point, arm_remove_point): Adjust to new interface.
1593         (the_low_target): Install arm_supports_z_point_type.
1594         * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1595         (cris_insert_point, cris_remove_point): Adjust to new interface.
1596         Don't check whether the type is supported here.
1597         (the_low_target): Install cris_supports_z_point_type.
1598         * linux-low.c (linux_supports_z_point_type): New function.
1599         (linux_insert_point, linux_remove_point): Adjust to new interface.
1600         * linux-low.h (struct linux_target_ops) <insert_point,
1601         remove_point>: Take an enum raw_bkpt_type instead of a char.  Add
1602         raw_breakpoint pointer parameter.
1603         <supports_z_point_type>: New method.
1604         * linux-mips-low.c (mips_supports_z_point_type): New function.
1605         (mips_insert_point, mips_remove_point): Adjust to new interface.
1606         Use mips_supports_z_point_type.
1607         (the_low_target): Install mips_supports_z_point_type.
1608         * linux-ppc-low.c (the_low_target): Install NULL as
1609         supports_z_point_type method.
1610         * linux-s390-low.c (the_low_target): Install NULL as
1611         supports_z_point_type method.
1612         * linux-sparc-low.c (the_low_target): Install NULL as
1613         supports_z_point_type method.
1614         * linux-x86-low.c (x86_supports_z_point_type): New function.
1615         (x86_insert_point): Adjust to new insert_point interface.  Use
1616         insert_memory_breakpoint.  Adjust to new
1617         i386_low_insert_watchpoint interface.
1618         (x86_remove_point): Adjust to remove_point interface.  Use
1619         remove_memory_breakpoint.  Adjust to new
1620         i386_low_remove_watchpoint interface.
1621         (the_low_target): Install x86_supports_z_point_type.
1622         * lynx-low.c (lynx_target_ops): Install NULL as
1623         supports_z_point_type callback.
1624         * nto-low.c (nto_supports_z_point_type): New.
1625         (nto_insert_point, nto_remove_point): Adjust to new interface.
1626         (nto_target_ops): Install nto_supports_z_point_type.
1627         * mem-break.c: Adjust intro comment.
1628         (struct raw_breakpoint) <raw_type, size>: New fields.
1629         <inserted>: Update comment.
1630         <shlib_disabled>: Delete field.
1631         (enum bkpt_type) <gdb_breakpoint>: Delete value.
1632         <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1633         gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1634         (raw_bkpt_type_to_target_hw_bp_type): New function.
1635         (find_enabled_raw_code_breakpoint_at): New function.
1636         (find_raw_breakpoint_at): New type and size parameters.  Use them.
1637         (insert_memory_breakpoint): New function, based off
1638         set_raw_breakpoint_at.
1639         (remove_memory_breakpoint): New function.
1640         (set_raw_breakpoint_at): Reimplement.
1641         (set_breakpoint): New, based on set_breakpoint_at.
1642         (set_breakpoint_at): Reimplement.
1643         (delete_raw_breakpoint): Go through the_target->remove_point
1644         instead of assuming memory breakpoints.
1645         (find_gdb_breakpoint_at): Delete.
1646         (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1647         (find_gdb_breakpoint): New function.
1648         (set_gdb_breakpoint_at): Delete.
1649         (z_type_supported): New function.
1650         (set_gdb_breakpoint_1): New function, loosely based off
1651         set_gdb_breakpoint_at.
1652         (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1653         (delete_gdb_breakpoint_at): Delete.
1654         (delete_gdb_breakpoint_1): New function, loosely based off
1655         delete_gdb_breakpoint_at.
1656         (delete_gdb_breakpoint): New function.
1657         (clear_gdb_breakpoint_conditions): Rename to ...
1658         (clear_breakpoint_conditions): ... this.  Don't handle a NULL
1659         breakpoint.
1660         (add_condition_to_breakpoint): Make static.
1661         (add_breakpoint_condition): Take a struct breakpoint pointer
1662         instead of an address.  Adjust.
1663         (gdb_condition_true_at_breakpoint): Rename to ...
1664         (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1665         z_type parameter.
1666         (gdb_condition_true_at_breakpoint): Reimplement.
1667         (add_breakpoint_commands): Take a struct breakpoint pointer
1668         instead of an address.  Adjust.
1669         (gdb_no_commands_at_breakpoint): Rename to ...
1670         (gdb_no_commands_at_breakpoint_z_type): ... this.  Add z_type
1671         parameter.  Return true if no breakpoint was found.  Change debug
1672         output.
1673         (gdb_no_commands_at_breakpoint): Reimplement.
1674         (run_breakpoint_commands): Rename to ...
1675         (run_breakpoint_commands_z_type): ... this.  Add z_type parameter,
1676         and change return type to boolean.
1677         (run_breakpoint_commands): New function.
1678         (gdb_breakpoint_here): Also check for Z1 breakpoints.
1679         (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1680         breakpoint.  Go through the_target->remove_point instead of
1681         assuming memory breakpoint.
1682         (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1683         software and hardware breakpoints.
1684         (reinsert_raw_breakpoint): Go through the_target->insert_point
1685         instead of assuming memory breakpoint.
1686         (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1687         software and hardware breakpoints.
1688         (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1689         Check both software and hardware breakpoints.
1690         (validate_inserted_breakpoint): Assert the breakpoint is a
1691         software breakpoint.  Set the inserted flag to -1 instead of
1692         setting shlib_disabled.
1693         (delete_disabled_breakpoints): Adjust.
1694         (validate_breakpoints): Only validate software breakpoints.
1695         Adjust to inserted flag change.
1696         (check_mem_read, check_mem_write): Skip breakpoint types other
1697         than software breakpoints.  Adjust to inserted flag change.
1698         * mem-break.h (enum raw_bkpt_type): New enum.
1699         (raw_breakpoint, struct process_info): Forward declare.
1700         (Z_packet_to_target_hw_bp_type): Delete declaration.
1701         (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1702         (set_gdb_breakpoint, delete_gdb_breakpoint)
1703         (clear_breakpoint_conditions): New declarations.
1704         (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1705         (breakpoint_inserted_here): Update comment.
1706         (add_breakpoint_condition, add_breakpoint_commands): Replace
1707         address parameter with a breakpoint pointer parameter.
1708         (gdb_breakpoint_here): Update comment.
1709         (delete_gdb_breakpoint_at): Delete.
1710         (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1711         * server.c (process_point_options): Take a struct breakpoint
1712         pointer instead of an address.  Adjust.
1713         (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1714         delete_gdb_breakpoint.
1715         * spu-low.c (spu_target_ops): Install NULL as
1716         supports_z_point_type method.
1717         * target.h: Include mem-break.h.
1718         (struct target_ops) <prepare_to_access_memory>: Update comment.
1719         <supports_z_point_type>: New field.
1720         <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1721         instead of a char.  Also take a raw breakpoint pointer.
1722         * win32-arm-low.c (the_low_target): Install NULL as
1723         supports_z_point_type.
1724         * win32-i386-low.c (i386_supports_z_point_type): New function.
1725         (i386_insert_point, i386_remove_point): Adjust to new interface.
1726         (the_low_target): Install i386_supports_z_point_type.
1727         * win32-low.c (win32_supports_z_point_type): New function.
1728         (win32_insert_point, win32_remove_point): Adjust to new interface.
1729         (win32_target_ops): Install win32_supports_z_point_type.
1730         * win32-low.h (struct win32_target_ops):
1731         <supports_z_point_type>: New method.
1732         <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1733         instead of a char.  Also take a raw breakpoint pointer.
1734
1735 2014-05-20  Pedro Alves  <palves@redhat.com>
1736
1737         * mem-break.h: Include break-common.h.
1738         (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1739         (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1740         (Z_packet_to_target_hw_bp_type): New declaration.
1741         * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1742         * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1743         (Z_PACKET_ACCESS_WP): Delete macros.
1744         (Z_packet_to_hw_type): Delete function.
1745         * i386-low.h: Don't include break-common.h here.
1746         (Z_packet_to_hw_type): Delete declaration.
1747         * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1748         Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1749         * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1750         Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1751         * linux-aarch64-low.c: Don't include break-common.h here.
1752         (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1753         (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1754         (Z_packet_to_target_hw_bp_type): Delete function.
1755         * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1756         function.
1757         (mips_insert_point, mips_remove_point): Use
1758         Z_packet_to_target_hw_bp_type.
1759
1760 2014-05-20  Pedro Alves  <palves@redhat.com>
1761
1762         * linux-aarch64-low.c: Include break-common.h.
1763         (enum target_point_type): Delete.
1764         (Z_packet_to_point_type): Rename to ...
1765         (Z_packet_to_target_hw_bp_type): ... this, and return a
1766         target_hw_bp_type instead.
1767         (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1768         instead of an enum target_point_type.
1769         (aarch64_point_encode_ctrl_reg): Likewise.  Compute type mask from
1770         breakpoint type.
1771         (aarch64_dr_state_insert_one_point)
1772         (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1773         (aarch64_handle_aligned_watchpoint)
1774         (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1775         Take an enum target_hw_bp_type instead of an enum
1776         target_point_type.
1777         (aarch64_supports_z_point_type): New function.
1778         (aarch64_insert_point, aarch64_remove_point): Use it.  Adjust to
1779         use Z_packet_to_target_hw_bp_type.
1780
1781 2014-05-20  Joel Brobecker  <brobecker@adacore.com>
1782
1783         * configure.ac: Only use -Werror by default when DEVELOPMENT
1784         is true.
1785         * configure: Regenerate.
1786
1787 2014-05-19  Jan Kratochvil  <jan.kratochvil@redhat.com>
1788
1789         Fix gdbserver qGetTLSAddr for x86_64 -m32.
1790         * linux-x86-low.c (X86_64_USER_REGS): New.
1791         (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1792
1793 2014-04-28  Yao Qi  <yao@codesourcery.com>
1794
1795         * Makefile.in (i386-avx512.c): Fix the typo of generated file
1796         name.
1797
1798 2014-04-25  Pedro Alves  <palves@redhat.com>
1799
1800         PR server/16255
1801         * linux-low.c (linux_attach_fail_reason_string): New function.
1802         (linux_attach_lwp): Delete.
1803         (linux_attach_lwp_1): Rename to ...
1804         (linux_attach_lwp): ... this.  Take a ptid instead of a pid as
1805         argument.  Remove "initial" parameter.  Return int instead of
1806         void.  Don't error or warn here.
1807         (linux_attach): Adjust to call linux_attach_lwp.  Call error on
1808         failure to attach to the tgid.  Call warning when failing to
1809         attach to an lwp.
1810         * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1811         argument.  Remove "initial" parameter.  Return int instead of
1812         void.  Don't error or warn here.
1813         (linux_attach_fail_reason_string): New declaration.
1814         * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1815         interface change.  Use linux_attach_fail_reason_string.
1816
1817 2014-04-24  Michael Sturm  <michael.sturm@mintel.com>
1818             Walfred Tedeschi  <walfred.tedeschi@intel.com>
1819
1820         * Makefile.in: Added rules to handle new files
1821         i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1822         amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1823         * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1824         (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1825         (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1826         (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1827         x32-avx512-linux.o.
1828         (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1829         (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1830         (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1831         i386/x32-avx512.xml.
1832         (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1833         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1834         i386/x32-avx512-linux.xml.
1835         * i387-fp.c (num_avx512_k_registers): New constant for number
1836         of K registers.
1837         (num_avx512_zmmh_low_registers): New constant for number of
1838         lower ZMM registers (0-15).
1839         (num_avx512_zmmh_high_registers): New constant for number of
1840         higher ZMM registers (16-31).
1841         (num_avx512_ymmh_registers): New contant for number of higher
1842         YMM registers (ymm16-31 added by avx521 on x86_64).
1843         (num_avx512_xmm_registers): New constant for number of higher
1844         XMM registers (xmm16-31 added by AVX512 on x86_64).
1845         (struct i387_xsave): Add space for AVX512 registers.
1846         (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1847         Add code to handle AVX512 registers.
1848         (i387_xsave_to_cache): Add code to handle AVX512 registers.
1849         * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1850         prototypei from generated file.
1851         (tdesc_amd64_avx512_linux): Likewise.
1852         (init_registers_x32_avx512_linux): Likewise.
1853         (tdesc_x32_avx512_linux): Likewise.
1854         (init_registers_i386_avx512_linux): Likewise.
1855         (tdesc_i386_avx512_linux): Likewise.
1856         (x86_64_regmap): Add AVX512 registers.
1857         (x86_linux_read_description): Add code to handle AVX512 XSTATE
1858         mask.
1859         (initialize_low_arch): Add code to initialize AVX512 registers.
1860
1861 2014-04-23  Pedro Alves  <palves@redhat.com>
1862
1863         * mem-break.c (find_gdb_breakpoint_at): Make static.
1864         * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1865
1866 2014-04-23  Pedro Alves  <palves@redhat.com>
1867
1868         * i386-low.c: Don't include break-common.h here.
1869         (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1870         prototype to take target_hw_bp_type as argument instead of a Z
1871         packet char.
1872         * i386-low.h: Include break-common.h here.
1873         (Z_packet_to_hw_type): Declare.
1874         (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1875         prototypes.
1876         * linux-x86-low.c (x86_insert_point): Convert the packet number to
1877         a target_hw_bp_type before calling i386_low_insert_watchpoint.
1878         (x86_remove_point): Convert the packet number to a
1879         target_hw_bp_type before calling i386_low_remove_watchpoint.
1880         * win32-i386-low.c (i386_insert_point): Convert the packet number
1881         to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1882         (i386_remove_point): Convert the packet number to a
1883         target_hw_bp_type before calling i386_low_remove_watchpoint.
1884
1885 2014-04-23  Pedro Alves  <palves@redhat.com>
1886
1887         * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1888
1889 2014-04-10  Pedro Alves  <palves@redhat.com>
1890
1891         * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1892         Check if the condition or command is NULL before checking if the
1893         breakpoint is known.  On success, return true.
1894         * mem-break.h (add_breakpoint_condition): Document return.
1895         (add_breakpoint_commands): Add describing comment.
1896         * server.c (skip_to_semicolon): New function.
1897         (process_point_options): Use it.
1898
1899 2014-04-09  Pedro Alves  <palves@redhat.com>
1900
1901         * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1902         to lwpid_of.
1903
1904 2014-02-27  Pedro Alves  <palves@redhat.com>
1905
1906         PR 12702
1907         * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1908         macros.
1909         * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1910         output.
1911         (last_thread_of_process_p): Take a PID argument instead of a
1912         thread pointer.
1913         (linux_wait_for_lwp): Delete.
1914         (num_lwps, check_zombie_leaders, not_stopped_callback): New
1915         functions.
1916         (linux_low_filter_event): New function, party factored out from
1917         linux_wait_for_event.
1918         (linux_wait_for_event): Rename to ...
1919         (linux_wait_for_event_filtered): ... this.  Add new filter ptid
1920         argument.  Partly rewrite.  Always use waitpid(-1, WNOHANG) and
1921         sigsuspend.  Check for zombie leaders.
1922         (linux_wait_for_event): Reimplement as wrapper around
1923         linux_wait_for_event_filtered.
1924         (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED.  Assume that if
1925         a normal or signal exit is seen, it's the whole process exiting.
1926         (wait_for_sigstop): No longer a for_each_inferior callback.
1927         Rewrite on top of linux_wait_for_event_filtered.
1928         (stop_all_lwps): Call wait_for_sigstop directly.
1929         * server.c (resume, handle_target_event): Handle
1930         TARGET_WAITKIND_NO_RESUMED.
1931
1932 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
1933
1934         * win32-low.c (psapi_get_dll_name,
1935         * win32_CreateToolhelp32Snapshot): Delete.
1936         (win32_CreateToolhelp32Snapshot, win32_Module32First)
1937         (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
1938         Delete.
1939         (handle_load_dll): Add function description.
1940         Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
1941
1942 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
1943
1944         * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
1945         Add comment.
1946         (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
1947         base address when calling win32_add_one_solib.
1948         (handle_load_dll): Delete local variable load_addr.
1949         Remove 0x1000 offset applied to DLL base address when calling
1950         win32_add_one_solib.
1951         (handle_unload_dll): Add comment.
1952
1953 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
1954
1955         * win32-low.c (win32_add_all_dlls): Renames
1956         win32_ensure_ntdll_loaded.  Rewrite function documentation.
1957         Adjust implementation to always load all DLLs.
1958         Add 0x1000 offset to DLL base address when calling
1959         win32_add_one_solib.
1960         (child_initialization_done): New static global.
1961         (do_initial_child_stuff): Set child_initialization_done to
1962         zero during child initialization, and 1 after.  Replace call
1963         to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
1964         Add comment.
1965         (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
1966         (handle_unload_dll): Add function documentation.
1967         (get_child_debug_event): Ignore load and unload DLL events
1968         during child initialization.
1969
1970 2014-02-20  Doug Evans  <dje@google.com>
1971
1972         Remove global all_lwps.
1973         * inferiors.h (ptid_of): Move here from linux-low.h.
1974         (pid_of, lwpid_of): Ditto.
1975         * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
1976         parameter is a struct thread_info * now.
1977         (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
1978         directly.  Pass &all_threads to find_inferior instead of &all_lwps.
1979         (aarch64_stopped_data_address): Fetch lwpid from current_inferior
1980         directly.
1981         (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
1982         (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
1983         * linux-arm-low.c (update_registers_callback): Update, "entry"
1984         parameter is a struct thread_info * now.
1985         Fetch lwpid from current_inferior directly.
1986         (arm_insert_point): Pass &all_threads to find_inferior instead of
1987         &all_lwps.
1988         (arm_remove_point): Ditto.
1989         (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
1990         (arm_prepare_to_resume): Fetch pid from thread.
1991         (arm_read_description): Fetch lwpid from current_inferior directly.
1992         * linux-low.c (all_lwps): Delete.
1993         (delete_lwp): Delete call to remove_inferior.
1994         (handle_extended_wait): Fetch lwpid from thread.
1995         (add_lwp): Don't set lwp->entry.id.  Remove call to
1996         add_inferior_to_list.
1997         (linux_attach_lwp_1): Fetch pid from current_inferior directly.
1998         (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
1999         (kill_one_lwp_callback): Ditto.
2000         (linux_kill): Don't dereference NULL pointer.
2001         Fetch ptid,lwpid from thread.
2002         (get_detach_signal): Fetch ptid from thread.
2003         (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
2004         Simplify call to regcache_invalidate_thread.
2005         (delete_lwp_callback): Update, "entry" parameter is a
2006         struct thread_info * now.  Fetch pid from thread.
2007         (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
2008         (status_pending_p_callback): Update, "entry" parameter is a
2009         struct thread_info * now.  Fetch ptid from thread.
2010         (find_lwp_pid): Update, "entry" parameter is a
2011         struct thread_info * now.
2012         (linux_wait_for_lwp): Fetch pid from thread.
2013         (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
2014         (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
2015         (enqueue_one_deferred_signal): Fetch lwpid from thread.
2016         (dequeue_one_deferred_signal): Ditto.
2017         (cancel_breakpoint): Fetch ptid from current_inferior.
2018         (linux_wait_for_event): Pass &all_threads to find_inferior,
2019         not &all_lwps.  Fetch ptid, lwpid from thread.
2020         (count_events_callback): Update, "entry" parameter is a
2021         struct thread_info * now.
2022         (select_singlestep_lwp_callback): Ditto.
2023         (select_event_lwp_callback): Ditto.
2024         (cancel_breakpoints_callback): Ditto.
2025         (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
2026         not &all_lwps.
2027         (select_event_lwp): Ditto.  Fetch ptid from event_thread.
2028         (unsuspend_one_lwp): Update, "entry" parameter is a
2029         struct thread_info * now.
2030         (unsuspend_all_lwps): Pass &all_threads to find_inferior,
2031         not &all_lwps.
2032         (linux_stabilize_threads): Ditto.  And for for_each_inferior.
2033         Fetch lwpid from thread, not lwp.
2034         (linux_wait_1): Fetch ptid, lwpid from current_inferior.
2035         Pass &all_threads to find_inferior, not &all_lwps.
2036         (send_sigstop): Fetch lwpid from thread, not lwp.
2037         (send_sigstop_callback): Update, "entry" parameter is a
2038         struct thread_info * now.
2039         (suspend_and_send_sigstop_callback): Ditto.
2040         (wait_for_sigstop): Ditto.  Fetch ptid, lwpid from thread, lwp.
2041         (stuck_in_jump_pad_callback): Update, "entry" parameter is a
2042         struct thread_info * now.
2043         (move_out_of_jump_pad_callback): Ditto.  Fetch ptid, lwpid
2044         from thread, lwp.
2045         (lwp_running): Update, "entry" parameter is a
2046         struct thread_info * now.
2047         (stop_all_lwps): Fetch ptid from thread.
2048         Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
2049         (linux_resume_one_lwp): Fetch lwpid from thread.
2050         (linux_set_resume_request): Update, "entry" parameter is a
2051         struct thread_info * now.  Fetch pid, lwpid from thread.
2052         (resume_status_pending_p): Update, "entry" parameter is a
2053         struct thread_info * now.
2054         (need_step_over_p): Ditto.  Fetch lwpid from thread.
2055         (start_step_over): Fetch lwpid from thread.
2056         (linux_resume_one_thread): Update, "entry" parameter is a
2057         struct thread_info * now.  Fetch lwpid from thread.
2058         (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
2059         (proceed_one_lwp): Update, "entry" parameter is a
2060         struct thread_info * now.  Fetch lwpid from thread.
2061         (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
2062         struct thread_info * now.
2063         (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
2064         (unstop_all_lwps): Ditto.  Fetch lwpid from thread.
2065         (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
2066         directly.
2067         (regsets_store_inferior_registers): Ditto.
2068         (fetch_register, store_register): Ditto.
2069         (linux_read_memory, linux_write_memory): Ditto.
2070         (linux_request_interrupt): Ditto.
2071         (linux_read_auxv): Ditto.
2072         (linux_xfer_siginfo): Ditto.
2073         (linux_qxfer_spu): Ditto.
2074         (linux_qxfer_libraries_svr4): Ditto.
2075         * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
2076         moved to inferiors.h.
2077         (get_lwp): Delete.
2078         (get_thread_lwp): Update.
2079         (struct lwp_info): Delete member "entry".  Simplify comment for
2080         member "thread".
2081         (all_lwps): Delete.
2082         * linux-mips-low.c (mips_read_description): Fetch lwpid from
2083         current_inferior directly.
2084         (update_watch_registers_callback): Update, "entry" parameter is a
2085         struct thread_info * now.  Fetch pid from thread.
2086         (mips_linux_prepare_to_resume): Fetch ptid from thread.
2087         (mips_insert_point): Fetch lwpid from current_inferior.
2088         Pass &all_threads to find_inferior, not &all_lwps.
2089         (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
2090         (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
2091         directly.
2092         (mips_stopped_data_address): Ditto.
2093         * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
2094         directly.
2095         * linux-tile-low.c (tile_arch_setup): Ditto.
2096         * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
2097         (update_debug_registers_callback): Update, "entry" parameter is a
2098         struct thread_info * now.  Fetch pid from thread.
2099         (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
2100         Pass &all_threads to find_inferior, not &all_lwps.
2101         (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
2102         (i386_dr_low_set_control): Fetch pid from current_inferior directly.
2103         Pass &all_threads to find_inferior, not &all_lwps.
2104         (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
2105         (i386_dr_low_get_status): Ditto.
2106         (x86_linux_prepare_to_resume): Fetch ptid from thread.
2107         (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
2108         (x86_linux_read_description): Ditto.
2109         * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
2110
2111 2014-02-20  Doug Evans  <dje@google.com>
2112
2113         * inferiors.c (get_first_inferior): Fix buglet.
2114
2115 2014-02-19  Doug Evans  <dje@google.com>
2116
2117         * gdbthread.h (add_thread): Change result type to struct thread_info *.
2118         * inferiors.c (add_thread): Change result type to struct thread_info *.
2119         All callers updated.
2120         (add_lwp): Call add_thread here instead of in callers.
2121         All callers updated.
2122         * linux-low.h (get_lwp_thread): Rewrite.
2123         (struct lwp_info): New member "thread".
2124
2125 2014-02-19  Doug Evans  <dje@google.com>
2126
2127         * linux-low.c (add_lwp): Change result to struct lwp_info *.
2128         All callers updated.
2129
2130 2014-02-19  Doug Evans  <dje@google.com>
2131
2132         * inferiors.c (add_thread): Fix whitespace.
2133
2134 2014-02-19  Doug Evans  <dje@google.com>
2135
2136         * dll.c (clear_dlls): Replace accessing list implemention details
2137         with API function.
2138         * gdbthread.h (get_first_thread): Declare.
2139         * inferiors.c (for_each_inferior_with_data): New function.
2140         (get_first_thread): New function.
2141         (find_thread_ptid): Simplify.
2142         (get_first_inferior): New function.
2143         (clear_list): Delete.
2144         (one_inferior_p): New function.
2145         (clear_inferior_list): New function.
2146         (clear_inferiors): Update.
2147         * inferiors.h (for_each_inferior_with_data): Declare.
2148         (clear_inferior_list): Declare.
2149         (one_inferior_p): Declare.
2150         (get_first_inferior): Declare.
2151         * linux-low.c (linux_wait_for_event): Replace accessing list
2152         implemention details with API function.
2153         * server.c (target_running): Ditto.
2154         (accumulate_file_name_length): New function.
2155         (emit_dll_description): New function.
2156         (handle_qxfer_libraries): Replace accessing list implemention
2157         details with API function.
2158         (handle_qxfer_threads_worker): New function.
2159         (handle_qxfer_threads_proper): Replace accessing list implemention
2160         details with API function.
2161         (handle_query): Ditto.
2162         (visit_actioned_threads_callback_ftype): New typedef.
2163         (visit_actioned_threads_data): New struct.
2164         (visit_actioned_threads): Rewrite to be find_inferior callback.
2165         (resume): Call find_inferior.
2166         (handle_status): Replace accessing list implemention
2167         details with API function.
2168         (process_serial_event): Replace accessing list implemention details
2169         with API function.
2170         * target.c (set_desired_inferior): Replace accessing list implemention
2171         details with API function.
2172         * tracepoint.c (same_process_p): New function.
2173         (gdb_agent_about_to_close): Replace accessing list implemention
2174         details with API function.
2175         * win32-low.c (child_delete_thread): Replace accessing list
2176         implemention details with API function.
2177         (match_dll_by_basename): New function.
2178         (dll_is_loaded_by_basename): New function.
2179         (win32_ensure_ntdll_loaded): Replace accessing list implemention
2180         details call to dll_is_loaded_by_basename.
2181
2182 2014-02-19  Doug Evans  <dje@google.com>
2183
2184         * dll.h (struct dll_info): Add comment.
2185         * gdbthread.h (struct thread_info): Add comment.
2186         (current_ptid): Simplify.
2187         * inferiors.c (add_process): Update.
2188         (remove_process): Update.
2189         * inferiors.h (struct process_info): Rename member "head" to "entry".
2190         * linux-low.c (delete_lwp): Update.
2191         (add_lwp): Update.
2192         (last_thread_of_process_p): Update.
2193         (kill_one_lwp_callback, linux_kill): Update.
2194         (status_pending_p_callback): Update.
2195         (wait_for_sigstop): Update.  Simplify read of ptid.
2196         (start_step_over): Update.
2197         * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
2198         (get_lwp_thread): Update.
2199         (struct lwp_info): Rename member "head" to "entry".
2200         * regcache.h (inferior_list_entry): Delete.
2201         * server.c (kill_inferior_callback): Update.
2202         (detach_or_kill_inferior_callback): Update.
2203         (print_started_pid): Update.
2204         (print_attached_pid): Update.
2205         (process_serial_event): Simplify read of ptid.
2206         * thread-db.c (thread_db_create_event): Update.
2207         (thread_db_get_tls_address): Update.
2208         * win32-low.c (current_inferior_ptid): Simplify.
2209
2210 2014-02-19  Tom Tromey  <tromey@redhat.com>
2211
2212         * target.h (struct target_ops) <supports_btrace>: Add target_ops
2213         argument.
2214         (target_supports_btrace): Update.
2215
2216 2014-02-14  Yao Qi  <yao@codesourcery.com>
2217
2218         * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
2219         (rsp-low-ipa.o): New target.
2220
2221 2014-02-12  Tom Tromey  <tromey@redhat.com>
2222
2223         * ax.c (gdb_parse_agent_expr): Use hex2bin, not
2224         convert_ascii_to_int.
2225         * regcache.c (registers_to_string): Likewise.
2226         * remote-utils.c (decode_M_packet): Likewise.
2227         * server.c (process_serial_event): Likewise.
2228
2229 2014-02-12  Tom Tromey  <tromey@redhat.com>
2230
2231         * server.c (handle_query, handle_v_run): Use hex2bin, not
2232         unhexify.
2233         * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
2234
2235 2014-02-12  Tom Tromey  <tromey@redhat.com>
2236
2237         * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
2238         convert_int_to_ascii.
2239         * regcache.c (registers_to_string, collect_register_as_string):
2240         Likewise.
2241         * remote-utils.c (look_up_one_symbol, relocate_instruction):
2242         Likewise.
2243         * server.c (process_serial_event): Likewise.
2244         * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
2245         (cmd_qtbuffer, cstr_to_hexstr): Likewise.
2246
2247 2014-02-12  Tom Tromey  <tromey@redhat.com>
2248
2249         * remote-utils.c (look_up_one_symbol, monitor_output): Use
2250         bin2hex, not hexify.
2251         * tracepoint.c (cmd_qtstatus): Likewise.
2252
2253 2014-02-12  Tom Tromey  <tromey@redhat.com>
2254
2255         * remote-utils.c (monitor_output): Pass explicit length to
2256         hexify.
2257
2258 2014-02-12  Tom Tromey  <tromey@redhat.com>
2259
2260         * tracepoint.c: Include rsp-low.h.
2261         * server.c: Include rsp-low.h.
2262         * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
2263         (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
2264         declare.
2265         * remote-utils.c: Include rsp-low.h.
2266         (fromhex, hexchars, ishex, unhexify, tohex, hexify)
2267         (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
2268         (convert_int_to_ascii, convert_ascii_to_int): Move to
2269         common/rsp-low.c.
2270         * regcache.c: Include rsp-low.h.
2271         * ax.c: Include rsp-low.h.
2272         * Makefile.in (SFILES): Add common/rsp-low.c.
2273         (OBS): Add rsp-low.o.
2274         (rsp-low.o): New target.
2275
2276 2014-02-12  Tom Tromey  <tromey@redhat.com>
2277
2278         * utils.h (pulongest, plongest, phex_nz): Don't declare.
2279         Include print-utils.h.
2280         * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
2281         (plongest, thirty_two, phex_nz): Remove.
2282         * Makefile.in (SFILES): Add common/print-utils.c.
2283         (OBS): Add print-utils.o.
2284         (print-utils-ipa.o): New target.
2285         (print-utils.o): New target.
2286         (IPA_OBJS): Add print-utils-ipa.o.
2287
2288 2014-02-06  Tom Tromey  <tromey@redhat.com>
2289
2290         * Makefile.in (SFILES): Fix indentation.
2291
2292 2014-02-05  Doug Evans  <dje@google.com>
2293
2294         * linux-low.c (linux_wait_for_event): Improve comment.
2295         (linux_wait_1): Keep current_inferior in sync with event_child.
2296
2297 2014-01-22  Doug Evans  <dje@google.com>
2298
2299         * gdbthread.h (gdb_id_to_thread): Delete, unused.
2300
2301 2014-01-22  Doug Evans  <dje@google.com>
2302
2303         * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
2304         * configure: Regenerate.
2305         * config.in: Regenerate.
2306         * Makefile.in (SFILES): Add debug.c.
2307         (OBS): Add debug.o.
2308         * debug.c: New file.
2309         * debug.h: New file.
2310         * linux-aarch64-low.c (*): Update all debugging printfs to use
2311         debug_printf instead of fprintf.
2312         * linux-arm-low.c (*): Ditto.
2313         * linux-cris-low.c (*): Ditto.
2314         * linux-crisv32-low.c (*): Ditto.
2315         * linux-m32r-low.c (*): Ditto.
2316         * linux-sparc-low.c (*): Ditto.
2317         * linux-x86.c (*): Ditto.
2318         * linux-low.c (*): Ditto.
2319         (linux_wait_1): Add calls to debug_enter, debug_exit.
2320         (linux_wait): Remove redundant debugging printf.
2321         (stop_all_lwps): Add calls to debug_enter, debug_exit.
2322         (linux_resume, unstop_all_lwps): Ditto.
2323         * mem-break.c (*): Update all debugging printfs to use
2324         debug_printf instead of fprintf.
2325         * remote-utils.c (*): Ditto.
2326         * thread-db.c (*): Ditto.
2327         * server.c #include <ctype.h>, "gdb_vecs.h".
2328         (debug_threads): Moved to debug.c.
2329         (*): Update all debugging printfs to use debug_printf instead of
2330         fprintf.
2331         (start_inferior): Replace call to fflush with call to debug_flush.
2332         (monitor_show_help): Mention set debug-format.
2333         (parse_debug_format_options): New function.
2334         (handle_monitor_command): Handle "monitor set debug-format".
2335         (gdbserver_usage): Mention --debug-format.
2336         (main): Parse --debug-format.
2337         * server.h (debug_threads): Declaration moved to debug.h.
2338         #include "debug.h".
2339         * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2340         trace_debug_1 that uses debug_printf.
2341         (tracepoint_look_up_symbols): Update all debugging printfs to use
2342         debug_printf instead of fprintf.
2343
2344 2014-01-20  Baruch Siach  <baruch@tkos.co.il>
2345
2346         * linux-xtensa-low.c: Include asm/ptrace.h instead of
2347         sys/ptrace.h.
2348
2349 2014-01-17  Pedro Alves  <palves@redhat.com>
2350
2351         PR build/16445
2352         * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2353         defined after including gdb_proc_service.h.
2354
2355 2014-01-16  Doug Evans  <dje@google.com>
2356
2357         * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2358         (match_dll): Use it.
2359
2360 2014-01-16  Markus Metzger  <markus.t.metzger@intel.com>
2361
2362         * target.h (target_ops) <read_btrace>: Change parameters and
2363         return type to allow error reporting.
2364         * server.c (handle_qxfer_btrace): Support delta reads.  Pass
2365         trace reading errors on.
2366         * linux-low.c (linux_low_read_btrace): Pass trace reading
2367         errors on.
2368         (linux_low_disable_btrace): New.
2369
2370 2014-01-15  Doug Evans  <dje@google.com>
2371
2372         * inferiors.c (thread_id_to_gdb_id): Delete.
2373         * inferiors.h (thread_id_to_gdb_id): Delete.
2374
2375 2014-01-13  Eli Zaretskii  <eliz@gnu.org>
2376
2377         * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2378         "-I$(srcdir)/../".  Fixes MinGW compilation errors with old GCC
2379         versions.
2380
2381 2014-01-08  Pedro Alves  <palves@redhat.com>
2382
2383         * server.c (handle_status): Don't discard previous queued stop
2384         replies or thread's pending status here.
2385         (main) <disconnection>: Do it here instead.
2386
2387 2014-01-08  Pedro Alves  <palves@redhat.com>
2388
2389         * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2390         * server.c (visit_actioned_threads, handle_pending_status): New
2391         function.
2392         (handle_v_cont): Factor out parts to ...
2393         (resume): ... this new function.  If in all-stop, and a thread
2394         being resumed has a pending status, report it without actually
2395         resuming.
2396         (myresume): Adjust to use the new 'resume' function.
2397         (clear_pending_status_callback, set_pending_status_callback)
2398         (find_status_pending_thread_callback): New functions.
2399         (handle_status): Handle the case of multiple threads having
2400         interesting statuses to report.  Report threads' real last signal
2401         instead of always reporting GDB_SIGNAL_TRAP.  Look for a thread
2402         with an interesting thread to report the status for, instead of
2403         always reporting the status of the first thread.
2404
2405 2014-01-01  Joel Brobecker  <brobecker@adacore.com>
2406
2407         * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2408         * gdbreplay.c (gdbreplay_version): Likewise.
2409
2410 2013-12-18  Yufeng Zhang  <yufeng.zhang@arm.com>
2411
2412         * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2413         iov.iov_len with the real length in use.
2414
2415 2013-12-13  Joel Brobecker  <brobecker@adacore.com>
2416
2417         * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2418         * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2419         for all targets that use win32-low.c.
2420         * win32-low.c (win32_ensure_ntdll_loaded): New function.
2421         (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2422
2423 2013-12-13  Pedro Alves  <palves@redhat.com>
2424
2425         * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2426         if equal to TARGET_WAITKIND_LOADED.
2427         * win32-low.c (cached_status): New static global.
2428         (win32_wait): Add declaration.
2429         (do_initial_child_stuff): Flush all initial pending debug events
2430         up to the initial breakpoint.
2431         (win32_wait): If CACHED_STATUS was set, return that instead
2432         of doing a real wait.  Remove the code resuming the execution
2433         of the inferior after receiving a TARGET_WAITKIND_LOADED event
2434         during the initial phase.  Also remove the code changing
2435         OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2436         TARGET_WAITKIND_STOPPED.
2437
2438 2013-12-11  Yao Qi  <yao@codesourcery.com>
2439
2440         * notif.c (handle_notif_ack): Return 0 if no notification
2441         matches.
2442
2443 2013-11-20  Doug Evans  <dje@google.com>
2444
2445         * linux-low.c (linux_set_resume_request): Fix comment.
2446
2447 2013-11-20  Doug Evans  <dje@google.com>
2448
2449         * linux-low.c (resume_status_pending_p): Tweak comment.
2450
2451 2013-11-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2452
2453         * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2454         amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2455         * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2456         (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2457         (srv_amd64_regobj): Add amd64-mpx.o.
2458         (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2459         (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2460         (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2461         * i387-fp.c (num_pl_bnd_register) Added constant.
2462         (num_pl_bnd_cfg_registers) Added constant.
2463         (struct i387_xsave) Added reserved area and MPX fields.
2464         (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2465         * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2466         function.
2467         (tdesc_i386_mpx_linux): Add MPX amd64 target.
2468         (init_registers_amd64_mpx_linux): Declare new function.
2469         (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2470         (x86_64_regmap): Add MPX registers.
2471         (x86_linux_read_description): Add MPX case.
2472         (initialize_low_arch): Initialize MPX targets.
2473
2474 2013-11-18  Tom Tromey  <tromey@redhat.com>
2475
2476         * configure: Rebuild.
2477         * configure.ac: Don't check for stdlib.h.
2478         * gdbreplay.c: Unconditionally include stdlib.h.
2479
2480 2013-11-18  Tom Tromey  <tromey@redhat.com>
2481
2482         * config.in: Rebuild.
2483         * configure: Rebuild.
2484         * configure.ac: Don't use AC_HEADER_DIRENT.
2485
2486 2013-11-18  Tom Tromey  <tromey@redhat.com>
2487
2488         * server.h: Don't check HAVE_STRING_H.
2489         * gdbreplay.c: Don't check HAVE_STRING_H.
2490         * configure: Rebuild.
2491
2492 2013-11-18  Tom Tromey  <tromey@redhat.com>
2493
2494         * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2495         LIBGNU.
2496
2497 2013-11-08  Tom Tromey  <tromey@redhat.com>
2498
2499         * configure, config.in: Rebuild.
2500         * configure.ac: Remove unused configury.
2501
2502 2013-11-08  Tom Tromey  <tromey@redhat.com>
2503
2504         * acinclude.m4: Include common.m4, codeset.m4.
2505         * configure, config.in: Rebuild.
2506         * configure.ac: Use GDB_AC_COMMON.
2507
2508 2013-11-06  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2509
2510         * linux-s390-low.c (HWCAP_S390_TE): New define.
2511         (s390_arch_setup): Consider the TE field in the HWCAP for
2512         determining 'have_regset_tdb'.
2513
2514 2013-10-16  Sergio Durigan Junior  <sergiodj@redhat.com>
2515
2516         PR gdb/16014
2517         * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2518         call to sizeof.
2519
2520 2013-10-02  Pedro Alves  <palves@redhat.com>
2521
2522         * server.c (process_serial_event): Don't output "GDBserver
2523         exiting" if GDB is connected through stdio.
2524         * target.c (mywait): Likewise, be silent if GDB is connected
2525         through stdio.
2526
2527 2013-10-01  Joel Brobecker  <brobecker@adacore.com>
2528
2529         * lynx-low.c (lynx_add_threads_after_attach): New function.
2530         (lynx_attach): Remove call to add_thread.  Add call to
2531         lynx_add_threads_after_attach instead.
2532
2533 2013-09-28  Mike Frysinger  <vapier@gentoo.org>
2534
2535         * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2536         * config.in, configure: Regenerated.
2537
2538 2013-09-18  Yao Qi  <yao@codesourcery.com>
2539
2540         PR server/15959
2541         * server.c (start_inferior): Clear 'resume_info'.
2542
2543 2013-09-16  Jiong Wang  <jiwang@tilera.com>
2544
2545         * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2546         for each register.
2547
2548 2013-09-16  Jiong Wang  <jiwang@tilera.com>
2549
2550         * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2551         linux-tile-low.o to srv_tgtobj.
2552
2553 2013-09-16  Will Newton  <will.newton@linaro.org>
2554
2555         * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2556         out regs.
2557
2558 2013-09-06  Pedro Alves  <palves@redhat.com>
2559
2560         * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2561         (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2562         (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2563         (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2564         (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2565         (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2566
2567 2013-09-06  Pedro Alves  <palves@redhat.com>
2568
2569         * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2570         explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2571
2572 2013-09-06  Pedro Alves  <palves@redhat.com>
2573
2574         * linux-amd64-ipa.c: Include tracepoint.h.
2575         * linux-i386-ipa.c: Include tracepoint.h.
2576
2577 2013-09-06  Ricard Wanderlof  <ricardw@axis.com>
2578
2579         * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2580         (ps_get_thread_area): New function.
2581
2582 2013-09-06  Ricard Wanderlof  <ricardw@axis.com>
2583
2584         * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2585         (initialize_low_arch): Call init_registers_crisv32 rather than
2586         init_register_crisv32.
2587
2588 2013-09-05  Pedro Alves  <palves@redhat.com>
2589
2590         * server.h (handle_vFile, hostio_last_error_from_errno): Move
2591         to ...
2592         * hostio.h: ... this new file.
2593         * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2594         win32-low.c: Include hostio.h.
2595
2596 2013-09-05  Pedro Alves  <palves@redhat.com>
2597
2598         * server.h (gdb_client_data, handler_func, callback_handler_func)
2599         (delete_file_handler, add_file_handler, append_callback_event)
2600         (delete_callback_event, start_event_loop, initialize_event_loop):
2601         Move to event-loop.h and include it.
2602         * event-loop.h: New file.
2603
2604 2013-09-05  Pedro Alves  <palves@redhat.com>
2605
2606         * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2607         * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2608         (loaded_dll, unloaded_dll): Move to ...
2609         * dll.h: ... this new file.
2610         * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2611
2612 2013-09-05  Pedro Alves  <palves@redhat.com>
2613
2614         * server.h (current_process, get_thread_process, all_processes)
2615         (add_inferior_to_list, for_each_inferior, current_inferior)
2616         (remove_inferior, add_process, remove_process, find_process_pid)
2617         (have_started_inferiors_p, have_attached_inferiors_p)
2618         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2619         (clear_inferiors, find_inferior, find_inferior_id)
2620         (inferior_target_data, set_inferior_target_data)
2621         (inferior_regcache_data, set_inferior_regcache_data): Move to
2622         inferiors.h, and include it.
2623         * inferiors.h: New file.
2624
2625 2013-09-05  Pedro Alves  <palves@redhat.com>
2626
2627         * server.h (struct emit_ops, current_insn_ptr, emit_error):
2628         Move ...
2629         * ax.h: ... here.
2630
2631 2013-09-05  Pedro Alves  <palves@redhat.com>
2632
2633         * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2634         tracepoint.h.
2635         * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2636         (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2637         (handle_tracepoint_general_set, handle_tracepoint_query)
2638         (tracepoint_finished_step, tracepoint_was_hit)
2639         (release_while_stepping_state_list, current_traceframe)
2640         (in_readonly_region, traceframe_read_mem)
2641         (fetch_traceframe_registers, traceframe_read_sdata)
2642         (traceframe_read_info, struct fast_tpoint_collect_status)
2643         (fast_tracepoint_collecting, force_unlock_trace_buffer)
2644         (handle_tracepoit_bkpts, initialize_low_tracepoint)
2645         (supply_fast_tracepoint_registers)
2646         (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2647         (ipa_tdesc, claim_trampoline_space)
2648         (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2649         (agent_mem_read, agent_get_trace_state_variable_value)
2650         (agent_set_trace_state_variable_value, agent_tsv_read)
2651         (agent_mem_read_string, get_raw_reg_func_addr)
2652         (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2653         * tracepoint.h: ... this new file.
2654
2655 2013-09-05  Pedro Alves  <palves@redhat.com>
2656
2657         * server.h (perror_with_name, error, fatal, warning, paddress)
2658         (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2659         include it.
2660         * utils.h: New file.
2661
2662 2013-09-05  Pedro Alves  <palves@redhat.com>
2663
2664         * server.h (remote_debug, noack_mode, transport_is_reliable)
2665         (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2666         (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2667         (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2668         (write_enn, initialize_async_io, enable_async_io)
2669         (disable_async_io, check_remote_input_interrupt_request)
2670         (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2671         (dead_thread_notify, prepare_resume_reply)
2672         (decode_address_to_semicolon, decode_address, decode_m_packet)
2673         (decode_M_packet, decode_X_packet, decode_xfer_write)
2674         (decode_search_memory_packet, unhexify, hexify)
2675         (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2676         (look_up_one_symbol, relocate_instruction)
2677         (monitor_output): Move to remote-utils.h, and include it.
2678         * remote-utils.h: New file.
2679
2680 2013-09-05  Pedro Alves  <palves@redhat.com>
2681
2682         * server.h (_): Delete.
2683
2684 2013-09-02  Pedro Alves  <palves@redhat.com>
2685
2686         * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2687         (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2688         allocated.
2689         (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2690
2691 2013-09-02  Pierre Muller  <muller@sourceware.org>
2692
2693         * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2694         or WriteProcessMemory complete successfully and handle
2695         ERROR_PARTIAL_COPY error.
2696
2697 2013-09-02  Pedro Alves  <palves@redhat.com>
2698
2699         * server.c (gdb_read_memory): Return -1 on traceframe memory read
2700         error instead of EIO.
2701
2702 2013-08-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
2703
2704         PR server/15604
2705         * linux-low.c: Include filestuff.h.
2706         (linux_create_inferior) <pid == 0>: Call close_most_fds.
2707         * lynx-low.c: Include filestuff.h.
2708         (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2709         * server.c: Include filestuff.h.
2710         (main): Call notice_open_fds.
2711         * spu-low.c: Include filestuff.h.
2712         (spu_create_inferior) <pid == 0>: Call close_most_fds.
2713
2714 2013-08-22  Luis Machado  <lgustavo@codesourcery.com>
2715
2716         * Makefile.in: Explain why ../target and ../nat are not
2717         listed as include file search paths.
2718         (linux-waitpid.o): New object file rule.
2719         * configure.srv (srv_native_linux_obj): New variable.
2720         Replace all occurrences of linux native object files with
2721         $srv_native_linux_obj.
2722         * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2723         (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2724         (linux_enable_event_reporting): Remove declaration.
2725         (my_waitpid): Moved to common/linux-waitpid.c.
2726         (linux_wait_for_event): Pass ptid when calling
2727         linux_enable_event_reporting.
2728         (linux_supports_tracefork_flag): Remove.
2729         (linux_enable_event_reporting): Likewise.
2730         (linux_tracefork_grandchild): Remove.
2731         (STACK_SIZE): Moved to common/linux-ptrace.c.
2732         (linux_tracefork_child): Remove.
2733         (linux_test_for_tracefork): Remove.
2734         (linux_look_up_symbols): Call linux_supports_traceclone.
2735         (initialize_low): Remove call to linux_test_for_tracefork.
2736         * linux-low.h (PTRACE_TYPE_ARG3): Move to
2737         common/linux-ptrace.h.
2738         (PTRACE_TYPE_ARG4): Likewise.
2739         Include linux-ptrace.h.
2740
2741 2013-08-21  Pedro Alves  <palves@redhat.com>
2742
2743         * config.in: Renegerate.
2744
2745 2013-08-19  Luis Machado  <lgustavo@codesourcery.com>
2746
2747         * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2748         (SFILES): Remove $(srcdir)/common/target-common.c and
2749         add $(srcdir)/target/waitstatus.c.
2750         (OBS): Remove target-common.o and add waitstatus.o.
2751         (server_h): Remove $(srcdir)/../common/target-common.h and
2752         add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2753         and $(srcdir)/../target/waitstatus.h.
2754         (target-common.o): Remove.
2755         (waitstatus.o): New target object file.
2756         * target.h: Do not include target-common.h and
2757         include target/resume.h, target/wait.h and
2758         target/waitstatus.h.
2759
2760 2013-08-13  Luis Machado  <lgustavo@codesourcery.com>
2761
2762         * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2763         to PTRACE_TYPE_ARG3.
2764         * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2765         to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2766         PTRACE_TYPE_ARG4.
2767         * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2768         (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2769
2770 2013-07-27  Jie Zhang  <jie@codesourcery.com>
2771             Daniel Jacobowitz  <dan@codesourcery.com>
2772             Yao Qi  <yao@codesourcery.com>
2773
2774         * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2775         (mips-linux-watch.o): New rule.
2776         (mips_linux_watch_h): New variable.
2777         * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2778         srv_tgtobj.
2779         * linux-mips-low.c: Include mips-linux-watch.h.
2780         (struct arch_process_info, struct arch_lwp_info): New.
2781         (update_watch_registers_callback): New function.
2782         (mips_linux_new_process, mips_linux_new_thread) New functions.
2783         (mips_linux_prepare_to_resume, mips_insert_point): New
2784         functions.
2785         (mips_remove_point, mips_stopped_by_watchpoint): New
2786         functions.
2787         (rsp_bp_type_to_target_hw_bp_type): New function.
2788         (mips_stopped_data_address): New function.
2789         (the_low_target): Add watchpoint support functions.
2790
2791 2013-07-27  Yao Qi  <yao@codesourcery.com>
2792
2793         * i386-low.c: Include break-common.h.
2794         (enum target_hw_bp_type): Remove.
2795
2796 2013-07-24  Luis Machado  <lgustavo@codesourcery.com>
2797
2798         * Makefile.in (SFILES): /common/target-common.c.
2799         (OBS): Add target-common.o.
2800         (server_h): Add $(srcdir)/../common/target-common.h.
2801         (target-common.o): New target.
2802         * server.c (queue_stop_reply_callback): Free
2803         status string after use.
2804         * target.c (target_waitstatus_to_string): Remove.
2805         * target.h: Include target-common.h.
2806         (resume_kind): Likewise.
2807         (target_waitkind): Likewise.
2808         (target_waitstatus): Likewise.
2809         (TARGET_WNOHANG): Likewise.
2810
2811 2013-07-04  Yao Qi  <yao@codesourcery.com>
2812
2813         * Makefile.in (host_alias): Use @host_noncanonical@.
2814         (target_alias): Use @target_noncanonical@.
2815         * configure.ac: Use ACX_NONCANONICAL_TARGET and
2816         ACX_NONCANONICAL_HOST.
2817         * configure: Regenerated.
2818
2819         Revert:
2820         2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>
2821
2822         * configure.ac (version_host, version_target): Set and AC_SUBST them.
2823         * configure: Rebuild.
2824         * Makefile.in (version_host, version_target): Get from configure.
2825         (version.c): Use $(version_host) and $(version_target).
2826
2827 2013-07-03  Pedro Alves  <palves@redhat.com>
2828
2829         * Makefile.in (config.status): Depend on development.sh.
2830         * acinclude.m4: Include libmcheck.m4.
2831         * configure: Regenerate.
2832
2833 2013-07-02  Mircea Gherzan  <mircea.gherzan@intel.com>
2834
2835         * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2836         attribute inside the parentheses.
2837         (winapi_DebugSetProcessKillOnExit): Ditto.
2838         (winapi_DebugBreakProcess): Ditto.
2839         (winapi_GenerateConsoleCtrlEvent): Ditto.
2840
2841 2013-07-02  Mircea Gherzan  <mircea.gherzan@intel.com>
2842
2843         * notif.h (notif_event): Add a dummy member to avoid compiler
2844         errors.
2845
2846 2013-07-01  Pedro Alves  <palves@redhat.com>
2847
2848         * hostio.c (HOSTIO_PATH_MAX): Define.
2849         (require_filename, handle_open, handle_unlink, handle_readlink):
2850         Use it.
2851
2852 2013-07-01  Pedro Alves  <palves@redhat.com>
2853
2854         * server.h: Include "pathmax.h".
2855         * linux-low.c: Don't include sys/param.h.
2856         (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2857         MAXPATHLEN.
2858         * win32-low.c: Don't include sys/param.h.
2859         (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2860
2861 2013-07-01  Pedro Alves  <palves@redhat.com>
2862
2863         * event-loop.c: Don't check HAVE_UNISTD_H before including
2864         <unistd.h>.
2865         * gdbreplay.c: Likewise.
2866         * remote-utils.c: Likewise.
2867         * server.c: Likewise.
2868         * configure.ac: Don't check for unistd.h.
2869         * configure: Regenerate.
2870
2871 2013-06-28  Tom Tromey  <tromey@redhat.com>
2872
2873         * Makefile.in (version.c): Use version.in, not
2874         common/version.in.
2875
2876 2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>
2877
2878         * configure.ac (version_host, version_target): Set and AC_SUBST them.
2879         * configure: Rebuild.
2880         * Makefile.in (version_host, version_target): Get from configure.
2881         (version.c): Use $(version_host) and $(version_target).
2882
2883 2013-06-10  Dmitry Kozlov <ddk@codesourcery.com>
2884
2885         Fix trace-status to output user name without trailing colon.
2886         * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2887
2888 2013-06-10  Dmitry Kozlov <ddk@codesourcery.com>
2889
2890         Fix trace-status to output proper start-time and stop-time.
2891         * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2892         output start time and stop time in hex as gdb expects.
2893
2894 2013-06-26  Pedro Alves  <pedro@codesourcery.com>
2895
2896         * tracepoint.c (build_traceframe_info_xml): Output trace state
2897         variables present in the trace buffer.
2898
2899 2013-06-24  Tom Tromey  <tromey@redhat.com>
2900
2901         * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2902         create-version.sh.
2903         (version.o): Remove.
2904         * gdbreplay.c: Include version.h.
2905         (version, host_name): Don't declare.
2906         * server.h: Include version.h.
2907         (version, host_name): Don't declare.
2908
2909 2013-06-12  Pedro Alves  <palves@redhat.com>
2910
2911         * linux-x86-low.c (linux_is_elf64): Delete global.
2912         (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2913         with local linux_pid_exe_is_elf_64_file use.
2914
2915 2013-06-11  Pedro Alves  <palves@redhat.com>
2916
2917         * linux-low.c (regset_disabled, disable_regset): New functions.
2918         (regsets_fetch_inferior_registers)
2919         (regsets_store_inferior_registers): Use them.
2920         (initialize_regsets_info); Don't allocate the disabled_regsets
2921         array here.
2922         * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2923         comment.
2924
2925 2013-06-11  Pedro Alves  <palves@redhat.com>
2926
2927         * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2928         xmalloc.
2929
2930 2013-06-11  Pedro Alves  <palves@redhat.com>
2931
2932         * linux-x86-low.c (initialize_low_arch): Call
2933         init_registers_x32_avx_linux.
2934
2935 2013-06-09  Jan Kratochvil  <jan.kratochvil@redhat.com>
2936
2937         Fix compatibility with Android Bionic.
2938         * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
2939         it is not empty.
2940
2941 2013-06-07  Pedro Alves  <palves@redhat.com>
2942
2943         PR server/14823
2944         * Makefile.in (OBS): Add tdesc.o.
2945         (IPA_OBJS): Add tdesc-ipa.o.
2946         (tdesc-ipa.o): New rule.
2947         * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
2948         interface.
2949         * linux-low.c (new_inferior): Delete.
2950         (disabled_regsets, num_regsets): Delete.
2951         (linux_add_process): Adjust to set the new per-process
2952         new_inferior flag.
2953         (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
2954         (linux_wait_for_lwp): Adjust.  Only call arch_setup if the event
2955         was a stop.  When calling arch_setup, switch the current inferior
2956         to the thread that got an event.
2957         (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
2958         (regsets_fetch_inferior_registers)
2959         (regsets_store_inferior_registers): New regsets_info parameter.
2960         Adjust to use it.
2961         (linux_register_in_regsets): New regs_info parameter.  Adjust to
2962         use it.
2963         (register_addr, fetch_register, store_register): New usrregs_info
2964         parameter.  Adjust to use it.
2965         (usr_fetch_inferior_registers, usr_store_inferior_registers): New
2966         parameter regs_info.  Adjust to use it.
2967         (linux_fetch_registers): Get the current inferior's regs_info, and
2968         adjust to use it.
2969         (linux_store_registers): Ditto.
2970         [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
2971         (initialize_low): Don't initialize the target_regsets here.  Call
2972         initialize_low_arch.
2973         * linux-low.h (target_regsets): Delete declaration.
2974         (struct regsets_info): New.
2975         (struct usrregs_info): New.
2976         (struct regs_info): New.
2977         (struct process_info_private) <new_inferior>: New field.
2978         (struct linux_target_ops): Delete the num_regs, regmap, and
2979         regset_bitmap fields.  New field regs_info.
2980         [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
2981         * i387-fp.c (num_xmm_registers): Delete.
2982         (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
2983         calls to new interface.
2984         (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
2985         (i387_xsave_to_cache): Adjust find_regno calls to new interface.
2986         Infer the number of xmm registers from the regcache's target
2987         description.
2988         * i387-fp.h (num_xmm_registers): Delete.
2989         * inferiors.c (add_thread): Don't install the thread's regcache
2990         here.
2991         * proc-service.c (gregset_info): Fetch the current inferior's
2992         regs_info.  Adjust to use it.
2993         * regcache.c: Include tdesc.h.
2994         (register_bytes, reg_defs, num_registers)
2995         (gdbserver_expedite_regs): Delete.
2996         (get_thread_regcache): If the thread doesn't have a regcache yet,
2997         create one, instead of aborting gdbserver.
2998         (regcache_invalidate_one): Rename to ...
2999         (regcache_invalidate_thread): ... this.
3000         (regcache_invalidate_one): New.
3001         (regcache_invalidate): Only invalidate registers of the current
3002         process.
3003         (init_register_cache): Add target_desc parameter, and use it.
3004         (new_register_cache): Ditto.  Assert the target description has a
3005         non zero registers_size.
3006         (regcache_cpy): Add assertions.  Adjust.
3007         (realloc_register_cache, set_register_cache): Delete.
3008         (registers_to_string, registers_from_string): Adjust.
3009         (find_register_by_name, find_regno, find_register_by_number)
3010         (register_cache_size): Add target_desc parameter, and use it.
3011         (free_register_cache_thread, free_register_cache_thread_one)
3012         (regcache_release, register_cache_size): New.
3013         (register_size): Add target_desc parameter, and use it.
3014         (register_data, supply_register, supply_register_zeroed)
3015         (supply_regblock, supply_register_by_name, collect_register)
3016         (collect_register_as_string, collect_register_by_name): Adjust.
3017         * regcache.h (struct target_desc): Forward declare.
3018         (struct regcache) <tdesc>: New field.
3019         (init_register_cache, new_register_cache): Add target_desc
3020         parameter.
3021         (regcache_invalidate_thread): Declare.
3022         (regcache_invalidate_one): Delete declaration.
3023         (regcache_release): Declare.
3024         (find_register_by_number, register_cache_size, register_size)
3025         (find_regno): Add target_desc parameter.
3026         (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
3027         declarations.
3028         * remote-utils.c: Include tdesc.h.
3029         (outreg, prepare_resume_reply): Adjust.
3030         * server.c: Include tdesc.h.
3031         (gdbserver_xmltarget): Delete declaration.
3032         (get_features_xml, process_serial_event): Adjust.
3033         * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
3034         declare.
3035         (struct process_info) <tdesc>: New field.
3036         (ipa_tdesc): Declare.
3037         * tdesc.c: New file.
3038         * tdesc.h: New file.
3039         * tracepoint.c: Include tdesc.h.
3040         [IN_PROCESS_AGENT] (ipa_tdesc): Define.
3041         (get_context_regcache): Adjust to pass ipa_tdesc down.
3042         (do_action_at_tracepoint): Adjust to get the register cache size
3043         from the context regcache's description.
3044         (traceframe_walk_blocks): Adjust to get the register cache size
3045         from the current trace frame's description.
3046         (traceframe_get_pc): Adjust to get current trace frame's
3047         description and pass it down.
3048         (gdb_collect): Adjust to get the register cache size from the
3049         IPA's description.
3050         * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
3051         (gdbserver_xmltarget): Delete.
3052         (initialize_low_tracepoint): Set the ipa's target description.
3053         * linux-i386-ipa.c (tdesc_i386_linux): Declare.
3054         (initialize_low_tracepoint): Set the ipa's target description.
3055         * linux-x86-low.c: Include tdesc.h.
3056         [__x86_64__] (is_64bit_tdesc): New.
3057         (ps_get_thread_area, x86_get_thread_area): Use it.
3058         (i386_cannot_store_register): Rename to ...
3059         (x86_cannot_store_register): ... this.  Use is_64bit_tdesc.
3060         (i386_cannot_fetch_register): Rename to ...
3061         (x86_cannot_fetch_register): ... this.  Use is_64bit_tdesc.
3062         (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
3063         to new interface.
3064         (target_regsets): Rename to ...
3065         (x86_regsets): ... this.
3066         (x86_get_pc, x86_set_pc): Adjust register_size calls to new
3067         interface.
3068         (x86_siginfo_fixup): Use is_64bit_tdesc.
3069         [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
3070         (tdesc_x32_avx_linux, tdesc_x32_linux)
3071         (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
3072         Declare.
3073         (x86_linux_update_xmltarget): Delete.
3074         (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
3075         (have_ptrace_getfpxregs, have_ptrace_getregset): New.
3076         (AMD64_LINUX_USER64_CS): New.
3077         (x86_linux_read_description): New, based on
3078         x86_linux_update_xmltarget.
3079         (same_process_callback): New.
3080         (x86_arch_setup_process_callback): New.
3081         (x86_linux_update_xmltarget): New.
3082         (x86_regsets_info): New.
3083         (amd64_linux_regs_info): New.
3084         (i386_linux_usrregs_info): New.
3085         (i386_linux_regs_info): New.
3086         (x86_linux_regs_info): New.
3087         (x86_arch_setup): Reimplement.
3088         (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
3089         (x86_emit_ops): Ditto.
3090         (the_low_target): Adjust.  Install x86_linux_regs_info,
3091         x86_cannot_fetch_register, and x86_cannot_store_register.
3092         (initialize_low_arch): New.
3093         * linux-ia64-low.c (tdesc_ia64): Declare.
3094         (ia64_fetch_register): Adjust.
3095         (ia64_usrregs_info, regs_info): New globals.
3096         (ia64_regs_info): New function.
3097         (the_low_target): Adjust.
3098         (initialize_low_arch): New function.
3099         * linux-sparc-low.c (tdesc_sparc64): Declare.
3100         (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
3101         Adjust.
3102         (sparc_arch_setup): New function.
3103         (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
3104         (the_low_target): Adjust.
3105         (initialize_low_arch): New function.
3106         * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
3107         (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
3108         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
3109         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
3110         (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
3111         (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
3112         (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
3113         (tdesc_powerpc_isa205_vsx64l): Declare.
3114         (ppc_cannot_store_register, ppc_collect_ptrace_register)
3115         (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
3116         (ppc_set_pc, ppc_get_hwcap): Adjust.
3117         (ppc_usrregs_info): Forward declare.
3118         (!__powerpc64__) ppc_regmap_adjusted: New global.
3119         (ppc_arch_setup): Adjust to the current process'es target
3120         description.
3121         (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
3122         (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
3123         (ppc_store_evrregset): Adjust.
3124         (target_regsets): Rename to ...
3125         (ppc_regsets): ... this, and make static.
3126         (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
3127         (ppc_regs_info): New function.
3128         (the_low_target): Adjust.
3129         (initialize_low_arch): New function.
3130         * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
3131         (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
3132         (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
3133         (tdesc_s390x_linux64v2): Declare.
3134         (s390_collect_ptrace_register, s390_supply_ptrace_register)
3135         (s390_fill_gregset, s390_store_last_break): Adjust.
3136         (target_regsets): Rename to ...
3137         (s390_regsets): ... this, and make static.
3138         (s390_get_pc, s390_set_pc): Adjust.
3139         (s390_get_hwcap): New target_desc parameter, and use it.
3140         [__s390x__] (have_hwcap_s390_high_gprs): New global.
3141         (s390_arch_setup): Adjust to set the current process'es target
3142         description.  Don't adjust the regmap.
3143         (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
3144         [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
3145         (regs_info_3264): New globals.
3146         (s390_regs_info): New function.
3147         (the_low_target): Adjust.
3148         (initialize_low_arch): New function.
3149         * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
3150         (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
3151         [__mips64] (init_registers_mips_linux)
3152         (init_registers_mips_dsp_linux): Delete defines.
3153         [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
3154         (have_dsp): New global.
3155         (mips_read_description): New, based on mips_arch_setup.
3156         (mips_arch_setup): Reimplement.
3157         (get_usrregs_info): New function.
3158         (mips_cannot_fetch_register, mips_cannot_store_register)
3159         (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
3160         (mips_fill_fpregset, mips_store_fpregset): Adjust.
3161         (target_regsets): Rename to ...
3162         (mips_regsets): ... this, and make static.
3163         (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
3164         (dsp_regs_info, regs_info): New globals.
3165         (mips_regs_info): New function.
3166         (the_low_target): Adjust.
3167         (initialize_low_arch): New function.
3168         * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
3169         (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
3170         Declare.
3171         (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
3172         (arm_read_description): New, with bits factored from
3173         arm_arch_setup.
3174         (arm_arch_setup): Reimplement.
3175         (target_regsets): Rename to ...
3176         (arm_regsets): ... this, and make static.
3177         (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
3178         (arm_regs_info): New function.
3179         (the_low_target): Adjust.
3180         (initialize_low_arch): New function.
3181         * linux-m68k-low.c (tdesc_m68k): Declare.
3182         (target_regsets): Rename to ...
3183         (m68k_regsets): ... this, and make static.
3184         (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
3185         (m68k_regs_info): New function.
3186         (m68k_arch_setup): New function.
3187         (the_low_target): Adjust.
3188         (initialize_low_arch): New function.
3189         * linux-sh-low.c (tdesc_sharch): Declare.
3190         (target_regsets): Rename to ...
3191         (sh_regsets): ... this, and make static.
3192         (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
3193         (sh_regs_info, sh_arch_setup): New functions.
3194         (the_low_target): Adjust.
3195         (initialize_low_arch): New function.
3196         * linux-bfin-low.c (tdesc_bfin): Declare.
3197         (bfin_arch_setup): New function.
3198         (bfin_usrregs_info, regs_info): New globals.
3199         (bfin_regs_info): New function.
3200         (the_low_target): Adjust.
3201         (initialize_low_arch): New function.
3202         * linux-cris-low.c (tdesc_cris): Declare.
3203         (cris_arch_setup): New function.
3204         (cris_usrregs_info, regs_info): New globals.
3205         (cris_regs_info): New function.
3206         (the_low_target): Adjust.
3207         (initialize_low_arch): New function.
3208         * linux-cris-low.c (tdesc_crisv32): Declare.
3209         (cris_arch_setup): New function.
3210         (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
3211         (cris_regs_info): New function.
3212         (the_low_target): Adjust.
3213         (initialize_low_arch): New function.
3214         * linux-m32r-low.c (tdesc_m32r): Declare.
3215         (m32r_arch_setup): New function.
3216         (m32r_usrregs_info, regs_info): New globals.
3217         (m32r_regs_info): Adjust.
3218         (initialize_low_arch): New function.
3219         * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
3220         (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
3221         (tic6x_usrregs_info): Forward declare.
3222         (tic6x_read_description): New function, based on ...
3223         (tic6x_arch_setup): ... this.  Reimplement.
3224         (target_regsets): Rename to ...
3225         (tic6x_regsets): ... this, and make static.
3226         (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
3227         (tic6x_regs_info): New function.
3228         (the_low_target): Adjust.
3229         (initialize_low_arch): New function.
3230         * linux-xtensa-low.c (tdesc_xtensa): Declare.
3231         (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
3232         (target_regsets): Rename to ...
3233         (xtensa_regsets): ... this, and make static.
3234         (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
3235         globals.
3236         (xtensa_arch_setup, xtensa_regs_info): New functions.
3237         (the_low_target): Adjust.
3238         (initialize_low_arch): New function.
3239         * linux-nios2-low.c (tdesc_nios2_linux): Declare.
3240         (nios2_arch_setup): Set the current process'es tdesc.
3241         (target_regsets): Rename to ...
3242         (nios2_regsets): ... this.
3243         (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
3244         (nios2_regs_info): New function.
3245         (the_low_target): Adjust.
3246         (initialize_low_arch): New function.
3247         * linux-aarch64-low.c (tdesc_aarch64): Declare.
3248         (aarch64_arch_setup): Set the current process'es tdesc.
3249         (target_regsets): Rename to ...
3250         (aarch64_regsets): ... this.
3251         (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
3252         (aarch64_regs_info): New function.
3253         (the_low_target): Adjust.
3254         (initialize_low_arch): New function.
3255         * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
3256         globals.
3257         (target_regsets): Rename to ...
3258         (tile_regsets): ... this.
3259         (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
3260         (tile_regs_info): New function.
3261         (tile_arch_setup): Set the current process'es tdesc.
3262         (the_low_target): Adjust.
3263         (initialize_low_arch): New function.
3264         * spu-low.c (tdesc_spu): Declare.
3265         (spu_create_inferior, spu_attach): Set the new process'es tdesc.
3266         * win32-arm-low.c (tdesc_arm): Declare.
3267         (arm_arch_setup): New function.
3268         (the_low_target): Install arm_arch_setup instead of
3269         init_registers_arm.
3270         * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
3271         (init_windows_x86): Rename to ...
3272         (i386_arch_setup): ... this.  Set `win32_tdesc'.
3273         (the_low_target): Adjust.
3274         * win32-low.c (win32_tdesc): New global.
3275         (child_add_thread): Don't create the thread cache here.
3276         (do_initial_child_stuff): Set the new process'es tdesc.
3277         * win32-low.h (struct target_desc): Forward declare.
3278         (win32_tdesc): Declare.
3279         * lynx-i386-low.c (tdesc_i386): Declare global.
3280         (lynx_i386_arch_setup): Set `lynx_tdesc'.
3281         * lynx-low.c (lynx_tdesc): New global.
3282         (lynx_add_process): Set the new process'es tdesc.
3283         * lynx-low.h (struct target_desc): Forward declare.
3284         (lynx_tdesc): Declare global.
3285         * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
3286         (lynx_ppc_arch_setup): Set `lynx_tdesc'.
3287         * nto-low.c (nto_tdesc): New global.
3288         (do_attach): Set the new process'es tdesc.
3289         * nto-low.h (struct target_desc): Forward declare.
3290         (nto_tdesc): Declare.
3291         * nto-x86-low.c (tdesc_i386): Declare.
3292         (nto_x86_arch_setup): Set `nto_tdesc'.
3293
3294 2013-06-04  Gary Benson  <gbenson@redhat.com>
3295
3296         * server.c (handle_query): Add "augmented-libraries-svr4-read+"
3297         to qSupported response when appropriate.
3298         (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
3299         with nonzero-length annex.
3300         * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
3301         arguments supplied in annex.
3302
3303 2013-05-31  Doug Evans  <dje@google.com>
3304
3305         PR server/15594
3306         * linux-x86-low.c (ps_get_thread_area): Properly extend address to
3307         64 bits in 64-cross-32 environment.
3308
3309 2013-05-28  Pedro Alves  <palves@redhat.com>
3310
3311         * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
3312         (aarch64-without-fpu.c): Delete rule.
3313         * configure.srv (aarch64*-*-linux*): Remove references to
3314         aarch64-without-fpu.o and aarch64-without-fpu.xml.
3315         * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
3316         declaration.
3317
3318 2013-05-24  Pedro Alves  <palves@redhat.com>
3319
3320         * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
3321         instead of strchr/decode_address.  Error if the range isn't split
3322         with a ','.  Don't assume there's be a ':' in the action.
3323
3324 2013-05-23  Yao Qi  <yao@codesourcery.com>
3325             Pedro Alves  <palves@redhat.com>
3326
3327         * linux-low.c (lwp_in_step_range): New function.
3328         (linux_wait_1): If the thread was range stepping and stopped
3329         outside the stepping range, report the stop to GDB.  Otherwise,
3330         continue stepping.  Add range stepping debug output.
3331         (linux_set_resume_request): Copy the step range from the resume
3332         request to the lwp.
3333         (linux_supports_range_stepping): New.
3334         (linux_target_ops) <supports_range_stepping>: Set to
3335         linux_supports_range_stepping.
3336         * linux-low.h (struct linux_target_ops)
3337         <supports_range_stepping>: New field.
3338         (struct lwp_info) <step_range_start, step_range_end>: New fields.
3339         * linux-x86-low.c (x86_supports_range_stepping): New.
3340         (the_low_target) <supports_range_stepping>: Set to
3341         x86_supports_range_stepping.
3342         * server.c (handle_v_cont): Handle 'r' action.
3343         (handle_v_requests): Append ";r" if the target supports range
3344         stepping.
3345         * target.h (struct thread_resume) <step_range_start,
3346         step_range_end>: New fields.
3347         (struct target_ops) <supports_range_stepping>:
3348         New field.
3349         (target_supports_range_stepping): New macro.
3350
3351 2013-05-17  Joel Brobecker  <brobecker@adacore.com>
3352
3353         * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3354         confusion in comment.
3355
3356 2013-05-17  Joel Brobecker  <brobecker@adacore.com>
3357
3358         * lynx-low.c (struct process_info_private): New type.
3359         (lynx_add_process): New function.
3360         (lynx_create_inferior, lynx_attach): Replace calls to
3361         add_process by calls to lynx_add_process.
3362         (lynx_resume): If PTID is null, then try using
3363         current_process()->private->last_wait_event_ptid.
3364         Add comments.
3365         (lynx_clear_inferiors): Delete.  The contents of that function
3366         has been inlined in lynx_mourn;
3367         (lynx_wait_1): Save the ptid in the process's private data.
3368         (lynx_mourn): Free the process' private data.  Replace call
3369         to lynx_clear_inferiors by call to clear_inferiors.
3370
3371 2013-05-17  Yao Qi  <yao@codesourcery.com>
3372
3373         * i386-low.c (i386_length_and_rw_bits): Move the comment to
3374         the right place.
3375
3376 2013-05-16  Luis Machado  <lgustavo@codesourcery.com>
3377
3378         * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3379         PT_DATA_ADDR and PT_TEXT_END_ADDR.  Update comments.
3380         (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3381         PT_TEXT_END_ADDR guards.  Update comments.
3382         (linux_target_op) <read_offsets>: Conditionally define to
3383         linux_read_offsets if the target is UCLIBC and if it defines
3384         PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3385
3386 2013-05-06  Sandra Loosemore  <sandra@codesourcery.com>
3387             Andrew Jenner  <andrew@codesourcery.com>
3388
3389         * Makefile.in (SFILES): Add linux-nios2-low.c.
3390         (clean): Add action to delete nios2-linux.c.
3391         (nios2-linux.c): New rule.
3392         * configure.srv: Add nios2*-*-linux*.
3393         * linux-nios2-low.c: New.
3394
3395 2013-05-03  Hafiz Abid Qadeer  <abidh@codesourcery.com>
3396
3397         * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3398
3399 2013-04-25  Hui Zhu  <hui@codesourcery.com>
3400
3401         PR gdb/15186
3402         * ax.c (ax_printf): Add fflush.
3403
3404 2013-04-22  Tom Tromey  <tromey@redhat.com>
3405
3406         * Makefile.in (SFILES): Add filestuff.c.
3407         (OBS): Add filestuff.o.
3408         (filestuff.o): New target.
3409         * config.in, configure: Rebuild.
3410         * configure.ac: Check for fdwalk, pipe2.
3411
3412 2013-04-17  Pedro Alves  <palves@redhat.com>
3413
3414         * configure.ac (USE_THREAD_DB): Delete variable.
3415         (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3416         Don't AC_SUBST USE_THREAD_DB.
3417         * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3418         * config.in, configure: Regenerate.
3419
3420 2013-04-16  Pedro Alves  <palves@redhat.com>
3421
3422         * linux-low.h (struct lwp_info) <thread_known>: Move under
3423         the USE_THREAD_DB #ifdef.
3424
3425 2013-04-16  Pedro Alves  <palves@redhat.com>
3426
3427         * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3428         (linux-low.o): Delete rule.
3429         * linux-low.h: Always include "gdb_thread_db.h" instead of
3430         conditionally including thread_db.h.
3431         (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3432         HAVE_THREAD_DB_H.
3433
3434 2013-04-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
3435
3436         * Makefile.in (install-only): Fix make install regression.
3437
3438 2013-04-05  Jan Kratochvil  <jan.kratochvil@redhat.com>
3439
3440         Convert man pages to texinfo, new gdbinit.5 texinfo page.
3441         * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3442         installation.
3443         * gdbserver.1: Remove.
3444
3445 2013-03-22  Pedro Alves  <palves@redhat.com>
3446
3447         * linux-low.c (handle_extended_wait): Don't call
3448         linux_enable_event_reporting.
3449
3450 2013-03-15  Tony Theodore  <tonyt@logyst.com>
3451
3452         PR build/9098:
3453         * Makefile.in (SHELL): Use @SHELL@.
3454
3455 2013-03-14  Sergio Durigan Junior  <sergiodj@redhat.com>
3456
3457         * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3458         compiler warning.
3459
3460 2013-03-13  Joel Brobecker  <brobecker@adacore.com>
3461
3462         * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3463         Remove extraneous NULL element.
3464
3465 2013-03-13  Yao Qi  <yao@codesourcery.com>
3466
3467         * tracepoint.c (traceframe_read_tsv): Look for the last matched
3468         'V' block in trace frame.
3469
3470 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
3471
3472         * target.h (struct target_ops): Add btrace ops.
3473         (target_supports_btrace): New macro.
3474         (target_enable_btrace): New macro.
3475         (target_disable_btrace): New macro.
3476         (target_read_btrace): New macro.
3477         * gdbthread.h (struct thread_info): Add btrace field.
3478         * server.c: Include btrace-common.h.
3479         (handle_btrace_general_set): New function.
3480         (handle_btrace_enable): New function.
3481         (handle_btrace_disable): New function.
3482         (handle_general_set): Call handle_btrace_general_set.
3483         (handle_qxfer_btrace): New function.
3484         (struct qxfer qxfer_packets[]): Add btrace entry.
3485         * inferiors.c (remove_thread): Disable btrace.
3486         * linux-low: Include linux-btrace.h.
3487         (linux_low_enable_btrace): New function.
3488         (linux_low_read_btrace): New function.
3489         (linux_target_ops): Add btrace ops.
3490         * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3491         Add srv_linux_btrace=yes.
3492         (x86_64-*-linux*): Add linux-btrace.o.
3493         Add srv_linux_btrace=yes.
3494         * configure.ac: Define HAVE_LINUX_BTRACE.
3495         * config.in: Regenerated.
3496         * configure: Regenerated.
3497
3498 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
3499
3500         * server.c (handle_qxfer): Preserve error message if -3 is
3501         returned.
3502         (qxfer): Document the -3 return value.
3503
3504 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
3505
3506         * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3507         (linux_btrace_h): New variable.
3508         (linux-btrace.o): New rule.
3509
3510 2013-03-08  Stan Shebs  <stan@codesourcery.com>
3511             Hafiz Abid Qadeer  <abidh@codesourcery.com>
3512
3513         * tracepoint.c (trace_buffer_size): New global.
3514         (DEFAULT_TRACE_BUFFER_SIZE): New define.
3515         (init_trace_buffer): Change to one-argument function. Allocate
3516         trace buffer memory.
3517         (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3518         handle QTBuffer:size packet.
3519         (cmd_bigqtbuffer_size): New function.
3520         (initialize_tracepoint): Call init_trace_buffer with
3521         DEFAULT_TRACE_BUFFER_SIZE.
3522         * server.c (handle_query): Add QTBuffer:size in the
3523         supported packets.
3524
3525 2013-03-07  Yao Qi  <yao@codesourcery.com>
3526
3527         * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3528         (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3529         of -1.
3530         (cmd_qtsp): Adjust condition.  Do post increment.
3531         Set cur_action and cur_step_action back to 0.
3532
3533 2013-03-07  Jeremy Bennett  <jeremy.bennett@embecosm.com>
3534
3535         PR server/15236
3536         * linux-low.c (linux_write_memory): Return early success if LEN is
3537         zero.
3538
3539 2013-03-05  Corinna Vinschen  <vinschen@redhat.de>
3540
3541         * configure.srv: Add x86_64-*-cygwin* as target.
3542
3543 2013-02-28  Tom Tromey  <tromey@redhat.com>
3544
3545         * configure.ac: Invoke AC_SYS_LARGEFILE.
3546         * configure, config.in: Rebuild.
3547
3548 2013-02-28  Corinna Vinschen  <vinschen@redhat.com>
3549
3550         * win32-low.c: Throughout, fix format strings and casts of
3551         printf-like functions to avoid type related warnings on all
3552         platforms.
3553         (get_child_debug_event): Print dwDebugEventCode as hex since
3554         that's how it's usually documented.
3555
3556 2013-02-28  Yao Qi  <yao@codesourcery.com>
3557
3558         * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3559         pulongest.
3560
3561 2013-02-27  Jiong Wang  <jiwang@tilera.com>
3562
3563         * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3564         (reg-tilegx32.c): New rule.
3565         * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3566         * linux-tile-low.c (tile_arch_setup): New function.  Invoke
3567         different register info initializer according to elf class.
3568         (init_registers_tilgx32): New function.  The tilegx32 register info
3569         initializer.
3570         (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3571         (tile_store_gregset): Likewise.
3572
3573 2013-02-27  Yao Qi  <yao@codesourcery.com>
3574
3575         * server.c (process_point_options): Print debug message when
3576         debug_threads is true.
3577
3578 2013-02-26  Yao Qi  <yao@codesourcery.com>
3579
3580         * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3581
3582 2013-02-19  Pedro Alves  <palves@redhat.com>
3583             Kai Tietz <ktietz@redhat.com>
3584
3585         PR gdb/15161
3586
3587         * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3588         instead of strtoul to extract address from packet.
3589         (process_serial_event) <'z'>: Likewise.
3590
3591 2013-02-18  Yao Qi  <yao@codesourcery.com>
3592
3593         * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3594
3595 2013-02-14  Pedro Alves  <palves@redhat.com>
3596
3597         Plug memory leak.
3598
3599         * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3600         TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3601
3602 2013-02-14  Pedro Alves  <palves@redhat.com>
3603
3604         * tracepoint.c (cmd_qtdpsrc): Use savestring.
3605
3606 2013-02-14  Pedro Alves  <palves@redhat.com>
3607
3608         * tracepoint.c (save_string): Delete.
3609         (add_tracepoint_action): Use savestring instead of save_string.
3610
3611 2013-02-12  Pedro Alves  <palves@redhat.com>
3612
3613         * linux-xtensa-low.c: Ditto.
3614         * xtensa-xtregs.c: Ditto.
3615
3616 2013-02-12  Sanimir Agovic  <sanimir.agovic@intel.com>
3617
3618         * thread-db.c (thread_db_get_tls_address): NULL pointer check
3619         thread_db.
3620
3621 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
3622
3623         * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3624         aarch64_num_wp_regs and aarch64_num_bp_regs to
3625         AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3626
3627 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
3628
3629         * linux-aarch64-low.c (ps_get_thread_area): Replace
3630         PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3631
3632 2013-02-04  Jim MacArthur  <jim.macarthur@arm.com>
3633             Marcus Shawcroft  <marcus.shawcroft@arm.com>
3634             Nigel Stephens  <nigel.stephens@arm.com>
3635             Yufeng Zhang  <yufeng.zhang@arm.com>
3636
3637         * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3638         (aarch64.c, aarch64-without-fpu.c): New targets.
3639         * configure.srv (aarch64*-*-linux*): New.
3640         * linux-aarch64-low.c: New file.
3641
3642 2013-02-04  Marcus Shawcroft  <marcus.shawcroft@arm.com>
3643
3644         * linux-low.c (handle_extended_wait, linux_create_inferior)
3645         (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3646         (dequeue_one_deferred_signal, linux_resume_one_thread)
3647         (fetch_register, linux_write_memory, linux_enable_event_reporting)
3648         (linux_tracefork_grandchild, linux_test_for_tracefork)
3649         (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3650         PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3651         where the argument is 0.
3652
3653 2013-01-25  Yao Qi  <yao@codesourcery.com>
3654
3655         * event-loop.c: Include "queue.h".
3656         (gdb_event_p): New typedef.
3657         (struct gdb_event) <next_event>: Remove.
3658         (event_queue): Change to QUEUE(gdb_event_p).
3659         (async_queue_event): Remove.
3660         (gdb_event_xfree): New.
3661         (initialize_event_loop): New.
3662         (process_event): Use API from QUEUE.
3663         (wait_for_event): Likewise.
3664         * server.c (main): Call initialize_event_loop.
3665         * server.h (initialize_event_loop): Declare.
3666
3667 2013-01-18  Yao Qi  <yao@codesourcery.com>
3668
3669         * ax.h (struct eval_agent_expr_context): New.
3670         (gdb_eval_agent_expr): Update declaration.
3671         * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3672         TFRAME.  Add new argument CTX.
3673         * server.h (struct eval_agent_expr_context): Declare.
3674         (agent_mem_read, agent_tsv_read): Update declaration.
3675         (agent_mem_read_string): Likewise.
3676         * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3677         (add_traceframe_block): Add new argument TPOINT.
3678         Increase TPOINT->traceframe_usage.
3679         (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3680         eval_tracepoint_agent_expr.
3681         (condition_true_at_tracepoint): Likewise.
3682         (agent_mem_read): Remove argument TFRAME.  Add argument CTX.
3683         (agent_mem_read_string, agent_tsv_read): Likewise.
3684
3685 2013-01-16  Yao Qi  <yao@codesourcery.com>
3686
3687         * linux-low.c (linux_resume_one_lwp): Don't check
3688         'lwp->bp_reinsert != 0'.
3689
3690 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
3691             Pedro Alves  <palves@redhat.com>
3692
3693         * lynx-low.c (ptrace_request_to_str): Define a temporary
3694         macro and use it to simplify this function's implementation.
3695
3696 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
3697
3698         * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3699         sets errno.
3700
3701 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
3702
3703         * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3704
3705 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
3706
3707         * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3708
3709 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
3710
3711         * lynx-low.c (lynx_resume): Use the resume_info parameter
3712         to determine the ptid for the lynx_ptrace call, unless
3713         it is equal to minus_one_ptid, in which case we use the
3714         ptid of the current_inferior.
3715         (lynx_wait_1): After having received a thread create/exit
3716         event, resume the inferior's execution using the signaling
3717         thread's ptid, rather than the old ptid.
3718
3719 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
3720
3721         * lynx-low.c (lynx_resume): Delete variable ret.
3722
3723 2013-01-01  Joel Brobecker  <brobecker@adacore.com>
3724
3725         * gdbreplay.c (gdbreplay_version): Update copyright year.
3726         * server.c (gdbserver_version): Likewise.
3727
3728 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
3729
3730         * lynx-low.c (lynx_wait_1): Add debug trace before adding
3731         new thread.
3732
3733 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
3734
3735         * lynx-low.c (ptrace_request_to_str): Add handling for
3736         PTRACE_GETTRACESIG.
3737
3738 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
3739
3740         * lynx-low.c (lynx_attach): Delete variable new_process.
3741
3742 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
3743
3744         * lynx-low.c (lynx_create_inferior): Delete variable
3745         new_process.
3746
3747 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
3748
3749         * lynx-low.c (ptrace_request_to_str): Do not handle
3750         PTRACE_GETTHREADLIST if this macro does not exist.
3751
3752 2012-12-15  Yao Qi  <yao@codesourcery.com>
3753
3754         * Makefile.in (OBS): Add notif.o.
3755         * notif.c, notif.h: New.
3756         * server.c: Include "notif.h".
3757         (struct vstop_notif) <next>: Remove.
3758         <base>: New field.
3759         (queue_stop_reply): Update.
3760         (push_event, send_next_stop_reply): Remove.
3761         (discard_queued_stop_replies): Update.
3762         (notif_stop): New variable.
3763         (handle_v_stopped): Remove.
3764         (handle_v_requests): Don't call handle_v_stopped.  Call
3765         handle_ack_notif instead.
3766         (queue_stop_reply_callback): Call notif_event_enque instead
3767         of queue_stop_reply.
3768         (handle_status): Don't call send_next_stop_reply, call
3769         notif_write_event instead.
3770         (kill_inferior_callback): Likewise.
3771         (detach_or_kill_inferior_callback): Likewise.
3772         (main): Call initialize_notif.
3773         (process_serial_event): Call QUEUE_is_empty.
3774         (handle_target_event): Call notif_push instead of push event.
3775         * server.h (push_event): Remove declaration.
3776
3777 2012-12-10  Tom Tromey  <tromey@redhat.com>
3778
3779         * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3780         (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3781         macros.
3782         (.c.o): Rewrite.
3783         (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3784         (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3785         (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3786         (amd64-linux-ipa.o, ax.o): Rewrite.
3787         (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3788         (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3789         (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3790         (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3791         (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3792         (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3793         (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3794         (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3795         (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3796         (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3797         (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3798         (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3799         (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3800         (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3801         (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3802         (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3803         (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3804         (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3805         (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3806         (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3807         (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3808         (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3809         (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3810         (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3811         (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3812         (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3813         (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3814         (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3815         (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3816         (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3817         (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3818         (reg-tilegx.o): Remove.
3819         (all_object_files): New macro.
3820         Include .deps files.
3821         * aclocal.m4, configure: Rebuild.
3822         * acinclude.m4: Include depstand.m4, lead-dot.m4.
3823         * configure.ac: Invoke ZW_CREATE_DEPDIR,
3824         ZW_PROG_COMPILER_DEPENDENCIES.  Compute GMAKE condition.
3825
3826 2012-12-05  Tom Tromey  <tromey@redhat.com>
3827
3828         PR gdb/14917:
3829         * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3830
3831 2012-11-28  Markus Metzger  <markus.t.metzger@intel.com>
3832
3833         * configure.ac: Check for linux/perf_event.h.
3834         * config.in: Regenerated.
3835         * configure: Regenerated.
3836
3837 2012-11-26  Maxime Villard  <rustyBSD@gmx.fr>
3838
3839         * hostio.c (handle_readlink): Decrease buffer size
3840         parameter passed to readlink by one byte.
3841
3842 2012-11-26  Yao Qi  <yao@codesourcery.com>
3843
3844         * configure.ac (build_warnings): Append '-Wempty-body'.
3845         * configure: Regenerated.
3846         * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3847         body.
3848
3849 2012-11-15  Pierre Muller  <muller@sourceware.org>
3850
3851         * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3852         * config.in: Regenerate.
3853         * configure: Regenerate.
3854         * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3855         Use "gdb_wait.h" header instead of <sys/wait.h> header.
3856         * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3857         * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3858         header.
3859         * server.c: Remove HAVE_WAIT_H conditional.  Use "gdb_wait.h" header
3860         instead of <sys/wait.h> header.
3861         * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3862
3863 2012-11-13 Markus Metzger  <markus.t.metzger@intel.com>
3864
3865         * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3866         (various make rules): Remove -DGDBSERVER
3867
3868 2012-11-09  Yao Qi  <yao@codesourcery.com>
3869
3870         * spu-low.c (current_ptid): Move it to ..
3871         * gdbthread.h: ... here.  New.
3872         * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3873         * server.c (myresume, process_serial_event): Likewise.
3874         * thread-db.c (thread_db_find_new_threads): Likewise.
3875         * tracepoint.c (run_inferior_command): Likewise.
3876
3877 2012-10-01  Andrew Burgess  <aburgess@broadcom.com>
3878
3879         * server.c (handle_search_memory_1): Include access length in
3880         warning message.
3881
3882 2012-09-05  Michael Brandt  <michael.brandt@axis.com>
3883
3884         * linux-crisv32-low.c: Fix compile errors.
3885
3886 2012-09-04  Yao Qi  <yao@codesourcery.com>
3887
3888         * tracepoint.c (cmd_qtsv): Adjust debug message.
3889         Don't check CUR_TPOINT.
3890
3891 2012-08-28  Yao Qi  <yao@codesourcery.com>
3892
3893         * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3894         * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3895         (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3896         Remove declarations of xmalloc, xreallloc, xstrdup and
3897         freeargv.
3898         * Makefile.in (libiberty_h): New.
3899         (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3900         (linux-bfin-low.o): Append dependency 'libiberty.h'.
3901
3902 2012-08-23  Yao Qi  <yao@codesourcery.com>
3903
3904         * server.h: Remove declaration of 'xsnprintf'.
3905
3906 2012-08-22  Keith Seitz  <keiths@redhat.com>
3907
3908         * server.h: Include build-gnulib-gbserver/config.h.
3909         * gdbreplay.c: Likewise.
3910
3911 2012-08-08  Doug Evans  <dje@google.com>
3912
3913         * Makefile.in (SFILES): Add gdb_vecs.c.
3914         (OBS): Add gdb_vecs.o.
3915         (gdb_vecs_h, host_defs_h): New variables.
3916         (thread-db.o): Add $(gdb_vecs_h) dependency.
3917         (gdb_vecs.o): New rule.
3918         * thread-db.c: #include "gdb_vecs.h".
3919         (thread_db_load_search): Use a vector to iterate over path elements.
3920         Handle text appearing after "$pdir".
3921
3922         * configure.ac: Add check for strstr.
3923         * config.in: Regenerate.
3924         * configure: Regenerate.
3925
3926 2012-08-02  Ulrich Weigand  <ulrich.weigand@linaro.org>
3927
3928         * hostio.c (handle_pread): If pread fails, fall back to attempting
3929         lseek/read.
3930         (handle_pwrite): Likewise for pwrite.
3931
3932 2012-08-01  Ulrich Weigand  <ulrich.weigand@linaro.org>
3933
3934         * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3935         between unsupported TYPE and unimplementable ADDR/LEN combination.
3936         (arm_insert_point): Act on new return value.
3937
3938 2012-07-31  Pedro Alves  <palves@redhat.com>
3939
3940         * server.c (process_point_options): Only skip tokens if we find
3941         one that is unrecognized.  Don't treat 'X' specially while
3942         skipping unrecognized tokens.
3943
3944 2012-07-30  Ulrich Weigand  <ulrich.weigand@linaro.org>
3945
3946         * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
3947         to 4-byte-align HW breakpoint addresses for Thumb.
3948
3949 2012-07-27  Yao Qi  <yao@codesourcery.com>
3950
3951         PR remote/14161.
3952
3953         * server.h: Declare gdb_agent_about_to_close.
3954         * target.c (kill_inferior): Include "agent.h".
3955         New.  Send command 'kill'.
3956         * target.h (kill_inferior): Removed macro.
3957         * tracepoint.c (gdb_agent_about_to_close): New.
3958         (gdb_agent_helper_thread): Handle command 'close'.
3959         Wait endlessly until the inferior stops.
3960         Install gdb_agent_remove_socket to atexit hook.
3961         (agent_socket_name): New static variable.
3962         (gdb_agent_socket_init): Replace local variable 'name' with
3963         'agent_socket_name'.
3964         (gdb_agent_remove_socket): New.
3965
3966 2012-07-27  Yao Qi  <yao@codesourcery.com>
3967
3968         * server.c (process_point_options): Stop at 'X' when parsing.
3969
3970 2012-07-19  Michael Eager  <eager@eagercon.com>
3971
3972         * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
3973         to hw_execute.
3974         * linux-x86-low.c (x86_insert_point, x86_remove_point):
3975         Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
3976         hardware breakpoint.
3977
3978 2012-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
3979
3980         * gdbserver/linux-low.c (initialize_low): Call
3981         linux_ptrace_init_warnings.
3982
3983 2012-07-02  Doug Evans  <dje@google.com>
3984
3985         * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
3986         pointer to int.
3987
3988 2012-07-02  Stan Shebs  <stan@codesourcery.com>
3989
3990         * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
3991         (ax.o): Add it to build rule.
3992         (ax-ipa.o): Ditto.
3993         (OBS): Add format.o.
3994         (IPA_OBS): Add format.o.
3995         * server.c (handle_query): Claim support for breakpoint commands.
3996         (process_point_options): Add command case.
3997         (process_serial_event): Leave running if there are printfs in
3998         effect.
3999         * mem-break.h (any_persistent_commands): Declare.
4000         (add_breakpoint_commands): Declare.
4001         (gdb_no_commands_at_breakpoint): Declare.
4002         (run_breakpoint_commands): Declare.
4003         * mem-break.c (struct point_command_list): New struct.
4004         (struct breakpoint): New field command_list.
4005         (any_persistent_commands): New function.
4006         (add_commands_to_breakpoint): New function.
4007         (add_breakpoint_commands): New function.
4008         (gdb_no_commands_at_breakpoint): New function.
4009         (run_breakpoint_commands): New function.
4010         * linux-low.c (linux_wait_1): Test for and run breakpoint commands
4011         locally.
4012         * ax.c: Include format.h.
4013         (ax_printf): New function.
4014         (gdb_eval_agent_expr): Add printf opcode.
4015
4016 2012-06-13  Yao Qi  <yao@codesourcery.com>
4017
4018         * server.c (start_inferior): Remove duplicated writes to fields
4019         'last_resume_kind' and 'last_status' of 'current_inferior'.
4020
4021 2012-06-12  Yao Qi  <yao@codesourcery.com>
4022             Pedro Alves  <palves@redhat.com>
4023
4024         * linux-low.c (linux_set_resume_request): Simplify predicate.  Add
4025         comment.
4026         * server.c (handle_v_cont): Extend comment.
4027
4028 2012-06-11  Yao Qi  <yao@codesourcery.com>
4029
4030         * linux-low.c (linux_attach): Add 'static'.
4031
4032 2012-06-06  Yao Qi  <yao@codesourcery.com>
4033
4034         * ax.c (gdb_eval_agent_expr): Print `top' in hex.
4035
4036 2012-06-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
4037
4038         Fix gcc -flto compilation warning.
4039         * server.c (main): Make variable multi_mode and attach volatile.
4040
4041 2012-05-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
4042
4043         * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
4044         if the platform doesn't know about it.
4045
4046 2012-05-30  Jeff Kenton  <jkenton@tilera.com>
4047
4048         * Makefile.in (SFILES): Add linux-tile-low.c.
4049         (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
4050         * configure.srv: Handle tilegx-*-linux*.
4051         * linux-tile-low.c: New file.
4052
4053 2012-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
4054
4055         * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
4056
4057 2012-05-24  Pedro Alves  <palves@redhat.com>
4058
4059         PR gdb/7205
4060
4061         Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
4062
4063 2012-05-24  Pedro Alves  <palves@redhat.com>
4064
4065         PR gdb/7205
4066
4067         Replace target_signal with gdb_signal throughout.
4068
4069 2012-05-22  Maciej W. Rozycki  <macro@codesourcery.com>
4070
4071         * linux-low.c (linux_store_registers): Avoid the copying sequence
4072         when no data has been retrieved by ptrace.
4073
4074 2012-05-22  Will Deacon  <will.deacon@arm.com>
4075
4076         * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
4077         Include asm/ptrace.h.
4078         (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
4079         already defined.
4080
4081 2012-05-21  Maciej W. Rozycki  <macro@codesourcery.com>
4082
4083         * linux-low.c (linux_store_registers): Don't re-retrieve data
4084         with ptrace that has already been obtained from /proc.  Always
4085         copy any data retrieved with ptrace to the buffer supplied.
4086
4087 2012-05-11  Yao Qi  <yao@codesourcery.com>
4088             Pedro Alves  <palves@redhat.com>
4089
4090         * linux-low.c (enum stopping_threads_kind): New.
4091         (stopping_threads): Change type to `enum stopping_threads_kind'.
4092         (handle_extended_wait): If stopping and suspending threads, leave
4093         the new_lwp suspended too.
4094         (linux_wait_for_event): Adjust.
4095         (stop_all_lwps): Set `stopping_threads' to
4096         STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
4097         whether we're suspending threads or just stopping them.  Assert no
4098         recursion happens.
4099
4100 2012-04-29  Yao Qi  <yao@codesourcery.com>
4101
4102         * server.h: Move some code to ...
4103         * gdbthread.h: ... here.  New.
4104         * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
4105         (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
4106         (nto-low.o, win32-low.o): Likewise.
4107         * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
4108         * regcache.c, remote-utils.c, server.c: Likewise.
4109         * target.c, tracepoint.c, win32-low.c: Likewise.
4110
4111 2012-04-24  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
4112
4113         * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
4114         (PTRACE_ARG4_TYPE): Likewise.
4115         (PTRACE_XFER_TYPE): Likewise.
4116         * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
4117         ptrace to PTRACE_ARG3_TYPE.
4118         * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
4119         (PTRACE_ARG4_TYPE): Likewise.
4120         (PTRACE_XFER_TYPE): Likewise.
4121         (linux_detach_one_lwp): Cast fourth argument of
4122         ptrace to long then PTRACE_ARG4_TYPE.
4123         (regsets_fetch_inferior_registers): Cast third argument of
4124         ptrace to long then PTRACE_ARG3_TYPE.
4125         (regsets_store_inferior_registers): Likewise.
4126
4127 2012-04-20  Pedro Alves  <palves@redhat.com>
4128
4129         * configure: Regenerate.
4130
4131 2012-04-19  Pedro Alves  <palves@redhat.com>
4132
4133         * Makefile.in (GNULIB_BUILDDIR): New.
4134         (LIBGNU, INCGNU, GNULIB_H): Adjust.
4135         (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
4136         (all, install-only, uninstall, clean-info, all-lib, clean): No
4137         longer pass GNULIB_FLAGS_TO_PASS.  Use subdir_do.
4138         (maintainer-clean realclean distclean): Use subdir_do.
4139         (subdir_do): New.
4140         (gnulib/import/Makefile): Adjust.  Replace gnulib/import with
4141         $(GNULIB_BUILDDIR).  Don't pass argument to config.status.
4142         * acinclude.m4: Include acx_configure_dir.m4.
4143         * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
4144         calls.  Call AC_PROG_RANLIB.  Configure gnulib using
4145         ACX_CONFIGURE_DIR.
4146         (GNULIB): New.
4147         (GNULIB_STDINT_H): Adjust.
4148         (AC_OUTPUT): Don't output gnulib/Makefile anymore.
4149         * gdbreplay.c: Include build-gnulib/config.h.
4150         * server.h: Likewise.
4151         * aclocal.m4: Regenerate.
4152         * config.in: Regenerate.
4153         * configure: Regenerate.
4154
4155 2012-04-19  Pedro Alves  <palves@redhat.com>
4156
4157         * Makefile.in (LIBGNU, INCGNU): Adjust.
4158         (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
4159         (all, install-only, uninstall, clean-info, all-lib, clean)
4160         (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
4161         * configure.ac: Adjust AC_OUTPUT output.
4162         * aclocal.m4: Regenerate.
4163         * configure: Regenerate.
4164
4165 2012-04-19  Pedro Alves  <palves@redhat.com>
4166
4167         * Makefile.in (generated_files): New.
4168         (server_h): Remove the explicit dependency on config.h, and depend
4169         on $generated_files.
4170
4171 2012-04-19  Pedro Alves  <palves@redhat.com>
4172
4173         * Makefile.in (INCGNU): Add -Ignulib.
4174
4175 2012-04-19  Pedro Alves  <palves@redhat.com>
4176
4177         * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
4178         (INCGNU): ... this, and spell out -I here.
4179         (GNULIB_LIB): Rename to ...
4180         (LIBGNU): ... this.
4181         (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
4182
4183 2012-04-19  Pedro Alves  <palves@redhat.com>
4184
4185         * config.in: Regenerate.
4186
4187 2012-04-19  Pedro Alves  <palves@redhat.com>
4188
4189         * configure.ac: Remove AC_CHECK_DECLS check for memmem.
4190         * server.h (memmem): Remove declaration.
4191         * config.in: Regenerate.
4192         * configure: Regenerate.
4193
4194 2012-04-19  Yao Qi  <yao@codesourcery.com>
4195
4196         * Makefile.in (SFILES): Add common/vec.c.
4197         (OBS): Add vec.o.
4198         (vec.o): New rule.
4199
4200 2012-04-19  Yao Qi  <yao@codesourcery.com>
4201
4202         * remote-utils.c (prepare_resume_reply): Replace with macro
4203         target_core_of_thread.
4204         * server.c (handle_qxfer_threads_proper): Likewise.
4205         * target.h (traget_core_of_thread): New macro.
4206
4207 2012-04-18  Pedro Alves  <palves@redhat.com>
4208
4209         * aclocal.m4: Regenerate.
4210         * configure: Regenerate.
4211
4212 2012-04-16  Yao Qi  <yao@codesourcery.com>
4213
4214         * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
4215         duplicated on address.
4216
4217 2012-04-16  Yao Qi  <yao@codesourcery.com>
4218
4219         * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
4220         (struct tracepoint_action_ops) <send>: New field.
4221         (m_tracepoint_action_send, r_tracepoint_action_send): New.
4222         (agent_expr_send, x_tracepoint_action_send): New.
4223         (l_tracepoint_action_send): New.
4224         (cmd_qtdp): Download and install tracepoint
4225         according to `use_agent'.
4226         (run_inferior_command): Add one more parameter `len'.
4227         Update callers.
4228         (tracepoint_send_agent): New.
4229         (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
4230
4231 2012-04-16  Yao Qi  <yao@codesourcery.com>
4232
4233         * tracepoint.c (download_tracepoints): Moved to ...
4234         (cmd_qtstart): ... here.
4235
4236 2012-04-14  Yao Qi  <yao@codesourcery.com>
4237
4238         * tracepoint.c: Include inttypes.h.
4239         (struct collect_memory_action): Use sized types.
4240         (struct tracepoint): Likewise.
4241         (cmd_qtdp, stop_tracing): Update print specifiers.
4242         (cmd_qtp, response_tracepoint): Likewise.
4243         (collect_data_at_tracepoint): Likewise.
4244         (collect_data_at_step): Likewise.
4245
4246 2012-04-14  Yao Qi  <yao@codesourcery.com>
4247
4248         Import gnulib module inttypes.
4249         * aclocal.m4, config.in, configure: Regenerated.
4250
4251 2012-04-14  Yao Qi  <yao@codesourcery.com>
4252
4253         * Makefile.in (maintainer-clean, realclean, distclean): Remove
4254         Makefile and config.status at last.
4255
4256 2012-04-13  Yao Qi  <yao@codesourcery.com>
4257
4258         * tracepoint.c: Include stdint.h unconditionally.
4259
4260 2012-04-13  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
4261
4262         * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
4263         on BFD_HAVE_SYS_PROCFS_TYPE.
4264         * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
4265         * configure: Regenerate.
4266         * config.in: Likewise.
4267
4268 2012-04-13  H.J. Lu  <hongjiu.lu@intel.com>
4269
4270         * Makefile.in (clean): Also remove x32.c x32-linux.c
4271         x32-avx.c x32-avx-linux.c.
4272         (x32.o): New target.
4273         (x32.c): Likewise.
4274         (x32-linux.o): Likewise.
4275         (x32-linux.c): Likewise.
4276         (x32-avx.o): Likewise.
4277         (x32-avx.c): Likewise.
4278         (x32-avx-linux.o): Likewise.
4279         (x32-avx-linux.c): Likewise.
4280
4281         * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
4282         (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
4283         (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
4284         (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
4285         (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
4286         i386/x32-avx-linux.xml.
4287
4288         * linux-x86-low.c (init_registers_x32_linux): New prototype.
4289         (init_registers_x32_avx_linux): Likwise.
4290         (x86_linux_update_xmltarget): Call init_registers_x32_linux
4291         or init_registers_x32_avx_linux if linux_is_elf64 is false.
4292
4293 2012-04-13  Pedro Alves  <palves@redhat.com>
4294
4295         * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
4296         (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
4297         (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
4298         (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
4299         the sub-make.
4300
4301 2012-04-12  H.J. Lu  <hongjiu.lu@intel.com>
4302
4303         * linux-x86-low.c (compat_x32_clock_t): New.
4304         (compat_x32_siginfo_t): Likewise.
4305         (compat_x32_siginfo_from_siginfo): Likewise.
4306         (siginfo_from_compat_x32_siginfo): Likewise.
4307         (linux_is_elf64): Likewise.
4308         (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
4309         and siginfo_from_compat_x32_siginfo for x32.
4310         (x86_arch_setup): Set linux_is_elf64.
4311
4312 2012-04-12  H.J. Lu  <hongjiu.lu@intel.com>
4313
4314         PR gdb/13969
4315         * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
4316         e_machine field.
4317         (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
4318         * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
4319         * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
4320         compatible with process.
4321
4322 2012-04-12  Yao Qi  <yao@codesourcery.com>
4323
4324         * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4325         (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4326         (install-only, install-info, clean): Handle sub dir gnulib.
4327         (all-lib, am--refresh): New targets.
4328         (memmem.o): Remove target.
4329         * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4330         Invoke gl_EARLY.  Invoke AC_CHECK_PROGS for make.
4331         (AC_REPLACE_FUNCS): Remove memmem.
4332         Invoke gl_INIT and AM_INIT_AUTOMAKE.
4333         (AC_OUTPUT): Generate Makefile in gnulib/.
4334         * aclocal.m4, config.in, configure: Regenerated.
4335
4336 2012-04-10  Maciej W. Rozycki  <macro@codesourcery.com>
4337
4338         * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4339
4340 2012-04-05  Pedro Alves  <palves@redhat.com>
4341
4342         -Werror=strict-aliasing
4343
4344         * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4345         pointer.
4346
4347 2012-04-04  Pedro Alves  <palves@redhat.com>
4348
4349         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4350         (sparc_store_gregset_from_stack, sparc_store_gregset)
4351         (sparc_breakpoint_at): Fix formatting.
4352
4353 2012-03-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
4354
4355         * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4356         are available.
4357         * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4358         [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4359         * config.in: Regenerate.
4360         * configure: Likewise.
4361
4362 2012-03-29  Pedro Alves  <palves@redhat.com>
4363
4364         * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4365         Correct ptrace arguments.
4366
4367 2012-03-28  Pedro Alves  <palves@redhat.com>
4368
4369         * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4370         (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4371         (IA64_FR1_REGNUM): New defines.
4372         (ia64_fetch_register): New.
4373         (the_low_target): Install it.
4374         * linux-low.h (struct linux_target_ops) <fetch_register>: New
4375         field.
4376         * linux-low.c (linux_fetch_registers): Try the
4377         the_low_target.fetch_register hook first.
4378
4379         * linux-arm-low.c (the_low_target): Adjust.
4380         * linux-bfin-low.c (the_low_target): Adjust.
4381         * linux-cris-low.c (the_low_target): Adjust.
4382         * linux-crisv32-low.c (the_low_target): Adjust.
4383         * linux-m32r-low.c (the_low_target): Adjust.
4384         * linux-m68k-low.c (the_low_target): Adjust.
4385         * linux-mips-low.c (the_low_target): Adjust.
4386         * linux-ppc-low.c (the_low_target): Adjust.
4387         * linux-s390-low.c (the_low_target): Adjust.
4388         * linux-sh-low.c (the_low_target): Adjust.
4389         * linux-sparc-low.c (the_low_target): Adjust.
4390         * linux-tic6x-low.c (the_low_target): Adjust.
4391         * linux-x86-low.c (the_low_target): Adjust.
4392         * linux-xtensa-low.c (the_low_target): Adjust.
4393
4394 2012-03-26  Pedro Alves  <palves@redhat.com>
4395
4396         * server.c (handle_qxfer_libraries): Don't bail early if
4397         the_target->qxfer_libraries_svr4 is not NULL.
4398
4399 2012-03-26  Pedro Alves  <palves@redhat.com>
4400
4401         * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4402
4403 2012-03-23  Pedro Alves  <palves@redhat.com>
4404
4405         * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4406         "library-list-svr4" element's start tag when the the DSO list is
4407         empty.
4408
4409 2012-03-23  Pedro Alves  <palves@redhat.com>
4410
4411         * linux-low.c (read_one_ptr): Read the inferior's pointer through
4412         a variable whose type size is the same as the inferior's pointer
4413         size.
4414
4415 2012-03-21  Thomas Schwinge  <thomas@codesourcery.com>
4416
4417         * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4418         struct siginfo.
4419         * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4420         * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4421         * linux-low.h: Include <signal.h>.
4422         (struct siginfo): Remove forward declaration.
4423         (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4424         struct siginfo.
4425
4426 2012-03-21  Mike Frysinger  <vapier@gentoo.org>
4427
4428         * .gitignore: Ignore more files.
4429
4430 2012-03-19  Pedro Alves  <palves@redhat.com>
4431             Jan Kratochvil  <jan.kratochvil@redhat.com>
4432
4433         * server.c (cont_thread, general_thread): Add describing comments.
4434         (start_inferior): Clear `cont_thread'.
4435         (handle_v_cont): Don't set `cont_thread' if resuming all threads
4436         of a process.
4437
4438 2012-03-15  Yao Qi  <yao@codesourcery.com>
4439
4440         * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4441         handling to ...
4442         (cmd_qtdp): ... here.
4443
4444 2012-03-15  Yao Qi  <yao@codesourcery.com>
4445
4446         * tracepoint.c (struct tracepoint_action_ops): New.
4447         (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4448         (m_tracepoint_action_download): New.
4449         (r_tracepoint_action_download): New.
4450         (x_tracepoint_action_download): New.
4451         (l_tracepoint_action_download): New.
4452         (add_tracepoint_action): Install `action->ops' according type.
4453         (download_tracepoint_1): Move code `download' function pointer
4454         of various tracepoint_action_ops.
4455
4456 2012-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
4457
4458         * linux-low.c (linux_attach_lwp_1): New variable buffer.  Call
4459         linux_ptrace_attach_warnings.
4460
4461 2012-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
4462
4463         * Makefile.in (linux-ptrace.o): New.
4464         * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4465         (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4466         (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4467         (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4468         (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4469         of these targets.
4470         * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4471
4472 2012-03-08  Yao Qi  <yao@codesourcery.com>
4473             Pedro Alves  <palves@redhat.com>
4474
4475         Fix PR server/13392.
4476         * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4477         offset of JMP insn.
4478         * tracepoint.c (remove_tracepoint): New.
4479         (cmd_qtdp): Call remove_tracepoint when failed to install.
4480
4481 2012-03-07  Pedro Alves  <palves@redhat.com>
4482
4483         * linux-low.c (get_detach_signal): New.
4484         (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4485         Pass on pending signals to PTRACE_DETACH.  Check the result of the
4486         ptrace call.
4487         * server.c (program_signals, program_signals_p): New.
4488         (handle_general_set): Handle QProgramSignals.
4489         * server.h (program_signals, program_signals_p): Declare.
4490
4491 2012-03-05  Pedro Alves  <palves@redhat.com>
4492             Jan Kratochvil  <jan.kratochvil@redhat.com>
4493
4494         * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4495         New comment why.
4496
4497 2012-03-03  Yao Qi  <yao@codesourcery.com>
4498
4499         * tracepoint.c (tracepoint_look_up_symbols): Update call to
4500         agent_look_up_symbols.
4501
4502 2012-03-03  Yao Qi  <yao@codesourcery.com>
4503
4504         * Makefile.in (linux-low.o): Keep dependence on agent.h.
4505         (linux-x86-low.o): Likewise.
4506         * server.h: Remove in_process_agent_loaded.
4507         * tracepoint.c (in_process_agent_loaded): Removed.  Moved it
4508         common/agent.c.
4509         Update callers.
4510
4511 2012-03-03  Yao Qi  <yao@codesourcery.com>
4512
4513         * tracepoint.c (gdb_agent_capability): New global.
4514         (in_process_agent_loaded_ust): Renamed to
4515         `in_process_agent_supports_ust'.
4516         Update callers.
4517         (in_process_agent_supports_ust): Call agent_capability_check.
4518         (clear_installed_tracepoints): Assert that agent supports
4519         agent.
4520
4521 2012-03-03  Yao Qi  <yao@codesourcery.com>
4522
4523         * linux-low.c (linux_supports_agent): New.
4524         (linux_target_ops): Initialize field `supports_agent' with
4525         linux_supports_agent.
4526         * target.h (struct target_ops) <supports_agent>: New.
4527         (target_supports_agent): New macro.
4528         * server.c (handle_general_set): Handle packet 'QAgent'.
4529         (handle_query): Send `QAgent+'.
4530         * Makefile.in (server.o): Depends on agent.h.
4531
4532 2012-03-03  Yao Qi  <yao@codesourcery.com>
4533
4534         * Makefile.in (OBS): Add agent.o.
4535         Add new rule for agent.o.
4536         Track dependence of tracepoint.c on agent.h.
4537         * tracepoint.c (run_inferior_command_1):
4538         (run_inferior_command): Call agent_run_command.
4539         (gdb_ust_connect_sync_socket): Deleted.  Move it to
4540         common/agent.c.
4541         (resume_thread, stop_thread): Likewise.
4542         (gdb_ust_socket_init): Renamed to ...
4543         (gdb_agent_socket_init): ... New.
4544         (gdb_ust_thread): Renamed to ...
4545         (gdb_agent_helper_thread): ... New.
4546         (gdb_ust_init): Move some code to ...
4547         (gdb_agent_init): ... here.  New.
4548         [HAVE_UST]: Call gdb_ust_init.
4549         (initialize_tracepoint_ftlib):  Call gdb_agent_init.
4550         * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4551         * config.in, configure: Regenerated.
4552
4553 2012-03-02  Pedro Alves  <palves@redhat.com>
4554
4555         * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4556         * linux-low.c (struct simple_pid_list): New.
4557         (stopped_pids): New a struct simple_pid_list pointer.
4558         (add_to_pid_list, pull_pid_from_list): New.
4559         (handle_extended_wait): Don't assume the first signal new children
4560         report is SIGSTOP.  Adjust call to pull_pid_from_list.
4561         (linux_wait_for_lwp): Adjust.
4562
4563 2012-03-02  Yao Qi  <yao@codesourcery.com>
4564
4565         * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4566         debug log.
4567
4568 2012-03-02  Yao Qi  <yao@codesourcery.com>
4569
4570         * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4571         `stop_pc' and `tpoint'.  Update caller.
4572
4573 2012-03-01  Maciej W. Rozycki  <macro@codesourcery.com>
4574
4575         * linux-low.h (linux_target_ops): Add regset_bitmap member.
4576         * linux-low.c (use_linux_regsets): New macro.
4577         [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4578         [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4579         (linux_register_in_regsets): New function.
4580         (usr_fetch_inferior_registers): Skip registers covered by
4581         regsets.
4582         (usr_store_inferior_registers): Likewise.
4583         (usr_fetch_inferior_registers): New macro.
4584         (usr_store_inferior_registers): Likewise.
4585         (linux_fetch_registers): Handle mixed regset/non-regset targets.
4586         (linux_store_registers): Likewise.
4587         * linux-mips-low.c (init_registers_mips_dsp_linux): New
4588         prototype.
4589         (init_registers_mips64_dsp_linux): Likewise.
4590         (init_registers_mips_linux): New macro.
4591         (init_registers_mips_dsp_linux): Likewise.
4592         (mips_dsp_num_regs): Likewise.
4593         (DSP_BASE, DSP_CONTROL): New fallback macros.
4594         (mips_base_regs): New macro.
4595         (mips_regmap): Use it.  Fix the size.
4596         (mips_dsp_regmap): New variable.
4597         (mips_dsp_regset_bitmap): Likewise.
4598         (mips_arch_setup): New function.
4599         (mips_cannot_fetch_register): Use the_low_target.regmap rather
4600         than mips_regmap.
4601         (mips_cannot_store_register): Likewise.
4602         (the_low_target): Update .arch_setup, .num_regs and .regmap
4603         initializers.  Add .regset_bitmap initializer.
4604         * linux-arm-low.c (the_low_target): Add .regset_bitmap
4605         initializer.
4606         * linux-bfin-low.c (the_low_target): Likewise.
4607         * linux-cris-low.c (the_low_target): Likewise.
4608         * linux-crisv32-low.c (the_low_target): Likewise.
4609         * linux-ia64-low.c (the_low_target): Likewise.
4610         * linux-m32r-low.c (the_low_target): Likewise.
4611         * linux-m68k-low.c (the_low_target): Likewise.
4612         * linux-ppc-low.c (the_low_target): Likewise.
4613         * linux-s390-low.c (the_low_target): Likewise.
4614         * linux-sh-low.c (the_low_target): Likewise.
4615         * linux-sparc-low.c (the_low_target): Likewise.
4616         * linux-tic6x-low.c (the_low_target): Likewise.
4617         * linux-x86-low.c (the_low_target): Likewise.
4618         * linux-xtensa-low.c (the_low_target): Likewise.
4619         * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4620         mips64-dsp-linux.o to srv_regobj.  Add mips-dsp-linux.xml,
4621         mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4622         srv_xmlfiles.
4623         * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4624         (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4625
4626 2012-02-29  Yao Qi  <yao@codesourcery.com>
4627             Pedro Alves  <palves@redhat.com>
4628
4629         * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4630         `step_over_finished' is true.
4631
4632 2012-02-27  Pedro Alves  <palves@redhat.com>
4633
4634         * linux-low.c (pid_is_stopped): Delete, moved to common/.
4635         (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4636
4637 2012-02-27  Pedro Alves  <palves@redhat.com>
4638
4639         PR server/9684
4640         * linux-low.c (pid_is_stopped): New.
4641         (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4642
4643 2012-02-25  Luis Machado  <lgustavo@codesourcery.com>
4644
4645         * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4646         of conditions.
4647
4648 2012-02-24  Maciej W. Rozycki  <macro@codesourcery.com>
4649
4650         * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4651
4652 2012-02-24  Luis Machado  <lgustavo@codesourcery>
4653
4654         * server.c (handle_query): Advertise support for target-side
4655         breakpoint condition evaluation.
4656         (process_point_options): New function.
4657         (process_serial_event): When inserting a breakpoint, check for
4658         a target-side condition that should be evaluated.
4659
4660         * mem-break.c: Include regcache.h and ax.h.
4661         (point_cond_list_t): New data structure.
4662         (breakpoint) <cond_list>: New field.
4663         (find_gdb_breakpoint_at): Make non-static.
4664         (delete_gdb_breakpoint_at): Clear any target-side
4665         conditions.
4666         (clear_gdb_breakpoint_conditions): New function.
4667         (add_condition_to_breakpoint): Likewise.
4668         (add_breakpoint_condition): Likewise.
4669         (gdb_condition_true_at_breakpoint): Likewise.
4670         (gdb_breakpoint_here): Return result directly instead
4671         of going through a local variable.
4672
4673         * mem-break.h (find_gdb_breakpoint_at): New prototype.
4674         (clear_gdb_breakpoint_conditions): Likewise.
4675         (add_breakpoint_condition): Likewise.
4676         (gdb_condition_true_at_breakpoint): Likewise.
4677
4678         * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4679         (need_step_over_p): Take target-side breakpoint condition into
4680         consideration.
4681
4682 2012-02-24  Luis Machado  <lgustavo@codesourcery>
4683
4684         * server.h: Include tracepoint.h.
4685         (agent_mem_read, agent_get_trace_state_variable_value,
4686         agent_set_trace_state_variable_value,
4687         agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4688         get_set_tsv_func_addr): New prototypes.
4689
4690         * ax.h: New include file.
4691         * ax.c: New source file.
4692
4693         * tracepoint.c: Include ax.h.
4694         (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4695         agent_expr, eval_result_type): Move to ax.h.
4696         (parse_agent_expr): Rename to ...
4697         (gdb_parse_agent_expr): ... this, make it non-static and move
4698         to ax.h.
4699         (unparse_agent_expr) Rename to ...
4700         (gdb_unparse_agent_expr): ... this, make it non-static and move
4701         to ax.h.
4702         (eval_agent_expr): Rename to ...
4703         (eval_tracepoint_agent_expr): ... this.
4704         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4705         forward declarations.
4706         (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4707         (agent_get_trace_state_variable_value): New function.
4708         (agent_set_trace_state_variable_value): New function.
4709         (cmd_qtdp): Call gdb_parse_agent_expr (...).
4710         (response_tracepoint): Call gdb_unparse_agent_expr (...).
4711         (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4712         (condition_true_at_tracepoint): Likewise.
4713         (parse_agent_expr): Rename to ...
4714         (gdb_parse_agent_expr): ... this and move to ax.c.
4715         (unparse_agent_expr): Rename to ...
4716         (gdb_unparse_agent_expr): ... this and move to ax.c.
4717         (gdb_agent_op_name): Move to ax.c.
4718         (eval_agent_expr): Rename to ...
4719         (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4720         and move to ax.c.
4721         (eval_tracepoint_agent_expr): New function.
4722         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
4723         non-static.
4724         (current_insn_ptr, emit_error, struct bytecode_address): Move to
4725         ax.c.
4726         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4727         emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4728         emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4729         emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4730         emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4731         emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4732         emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4733         emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4734         (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4735         (compile_bytecodes): Remove forward declaration.
4736         (is_goto_target): Move to ax.c.
4737         (compile_bytecodes): Move to ax.c and call
4738         agent_get_trace_state_variable_value (...) and
4739         agent_set_trace_state_variable_value (...).
4740
4741         * Makefile.in: Update ax.c and IPA dependencies.
4742
4743 2012-02-24  Pedro Alves  <palves@redhat.com>
4744
4745         * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4746         (cmd_bigqtbuffer_circular): ... this.  Only handle
4747         'QTBuffer:circular:'.
4748         (handle_tracepoint_general_set): Adjust.
4749
4750 2012-02-16  Yao Qi  <yao@codesourcery.com>
4751
4752         * inferiors.c: Move code to ...
4753         * dll.c: .... here.  New.
4754         * server.h: Declare clear_dlls.
4755         * Makefile.in (SFILES): Add dll.c.
4756         (OBS): Add dll.o
4757         (dll.o): New rule.
4758
4759 2012-02-11  Yao Qi  <yao@codesourcery.com>
4760
4761         * server.c: (handle_monitor_command): Add a new parameter
4762         `own_buf'.
4763         (handle_query): Update caller.
4764
4765 2012-02-09  Joel Brobecker  <brobecker@adacore.com>
4766
4767         * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4768         * configure, config.in: Regenerate.
4769         * hostio.c: Provide an alternate implementation if HAVE_READLINK
4770         is not defined.
4771
4772 2012-02-02  Pedro Alves  <palves@redhat.com>
4773
4774         Try SIGKILL first, then PTRACE_KILL.
4775         * linux-low.c (linux_kill_one_lwp): New.
4776         (linux_kill_one_lwp): Rename to ...
4777         (kill_one_lwp_callback): ... this.  Use the new
4778         linux_kill_one_lwp.
4779
4780 2012-02-02  Pedro Alves  <palves@redhat.com>
4781
4782         * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4783         inferior.
4784
4785 2012-01-27  Pedro Alves  <palves@redhat.com>
4786
4787         * linux-low.c (linux_child_pid_to_exec_file): Delete.
4788         (elf_64_file_p): Make static.
4789         (linux_pid_exe_is_elf_64_file): New.
4790         * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4791         Delete declarations.
4792         (linux_pid_exe_is_elf_64_file): Declare.
4793         * linux-x86-low.c (x86_arch_setup): Use
4794         linux_pid_exe_is_elf_64_file.
4795
4796 2012-01-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
4797
4798         * linux-low.c (linux_wait_for_event_1): Rename to ...
4799         (linux_wait_for_event): ... here and merge it with former
4800         linux_wait_for_event - new variable wait_ptid, use it.
4801         (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4802
4803 2012-01-23  Pedro Alves  <palves@redhat.com>
4804
4805         * server.c (main): Avoid yet another case of infinite loop while
4806         detaching/killing after a longjmp.
4807
4808 2012-01-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
4809
4810         Code cleanup.
4811         * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4812
4813 2012-01-20  Ulrich Weigand  <ulrich.weigand@linaro.org>
4814
4815         * hostio.c (handle_readlink): New function.
4816         (handle_vFile): Call it to handle "vFile:readlink" packets.
4817
4818 2012-01-20  Pedro Alves  <palves@redhat.com>
4819             Ulrich Weigand  <ulrich.weigand@linaro.org>
4820
4821         * server.c (handle_v_requests): Only support vAttach and vRun to
4822         start multiple processes when in extended protocol mode.
4823
4824 2012-01-17  Pedro Alves  <palves@redhat.com>
4825
4826         * tracepoint.c (initialize_tracepoint): Use mmap instead of
4827         memalign plus mprotect to allocate the scratch buffer.
4828
4829 2012-01-13  Pedro Alves  <palves@redhat.com>
4830
4831         * server.c (attach_inferior): Clear `cont_thread'.
4832
4833 2012-01-13  Pedro Alves  <palves@redhat.com>
4834
4835         * server.c (main): Avoid infinite loop while detaching/killing
4836         after a longjmp.
4837
4838 2012-01-09  Doug Evans  <dje@google.com>
4839
4840         * server.c (start_inferior): Set last_ptid in --wrapper case.
4841
4842 2012-01-06  Yao Qi  <yao@codesourcery.com>
4843
4844         * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4845         defined.
4846         [IN_PROCESS_AGENT] (debug_agent): New global variable.
4847
4848 2012-01-04  Yao Qi  <yao@codesourcery.com>
4849
4850         * tracepoint.c (cmd_qtdp): Print debug message
4851         for static tracepoint.
4852
4853 2012-01-04  Yao Qi  <yao@codesourcery.com>
4854
4855         * tracepoint.c (trace_vdebug): Differentiate debug message
4856         between gdbserver and IPA.
4857
4858 2012-01-03  Yao Qi  <yao@codesourcery.com>
4859
4860         * tracepoint.c (tracepoint_was_hit): Don't collect for
4861         static tracepoint.
4862
4863 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
4864
4865         * terminal.h: Reformat copyright header.
4866
4867 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
4868
4869         * server.c (gdbserver_version): Update copyright year.
4870         * gdbreplay.c (gdbreplay_version): Likewise.
4871
4872 2011-12-18  Jan Kratochvil  <jan.kratochvil@redhat.com>
4873
4874         * linux-low.c (linux_create_inferior): Put empty if clause for write.
4875
4876         Revert:
4877         2011-12-18  Hui Zhu  <teawater@gmail.com>
4878         * linux-low.c (linux_create_inferior): Save return value to ret.
4879
4880 2011-12-18  Hui Zhu  <teawater@gmail.com>
4881
4882         * linux-low.c (linux_create_inferior): Save return value to ret.
4883
4884 2011-12-16  Doug Evans  <dje@google.com>
4885
4886         * linux-low.c (linux_create_inferior): If stdio connection,
4887         redirect stdin from /dev/null, stdout to stderr.
4888         * remote-utils.c (remote_is_stdio): New static global.
4889         (remote_connection_is_stdio): New function.
4890         (remote_prepare): Handle stdio connection.
4891         (remote_open): Ditto.
4892         (remote_close): Don't close stdin for stdio connections.
4893         (read_prim,write_prim): New functions.  Replace all calls to
4894         read/write to these.
4895         * server.c (main): Watch for "-" argument.  Move call to
4896         remote_prepare before start_inferior.
4897         * server.h (STDIO_CONNECTION_NAME): New macro.
4898         (remote_connection_is_stdio): Declare.
4899
4900         * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4901         in debugging output.
4902
4903 2011-12-15  Yao Qi  <yao@codesourcery.com>
4904
4905         * tracepoint.c: Include sys/syscall.h.
4906         (gdb_ust_thread): Remove preprocessor conditional.
4907
4908 2011-12-14  Pedro Alves  <pedro@codesourcery.com>
4909
4910         * linux-low.c (linux_detach_one_lwp): Call
4911         the_low_target.prepare_to_resume before detaching.
4912
4913 2011-12-14  Yao Qi  <yao@codesourcery.com>
4914
4915         * tracepoint.c (gdb_ust_thread): Don't ignore return value
4916         of write.
4917
4918 2011-12-14  Yao Qi  <yao@codesourcery.com>
4919
4920         * i386-low.c (i386_low_stopped_data_address): Initialize local
4921         variable `control'.
4922
4923 2011-12-13  Pedro Alves  <pedro@codesourcery.com>
4924
4925         PR remote/13492
4926
4927         * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4928         DR_CONTROL unless necessary.  Extend comments.
4929         * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4930         DR0-3 if not used.  If any watchpoint was set, clear DR_STATUS.
4931
4932 2011-12-13  Yao Qi  <yao@codesourcery.com>
4933
4934         * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
4935         macros.
4936         (upload_fast_traceframes, upload_fast_traceframes): Likewise.
4937
4938 2011-12-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
4939
4940         * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
4941         Print new debug message for such case.
4942
4943 2011-12-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
4944
4945         Fix overlapping memcpy.
4946         * mem-break.c (set_raw_breakpoint_at): New variable buf.  Use it for
4947         the read_inferior_memory transfer.
4948         (delete_fast_tracepoint_jump): New variable buf.  Use it for the
4949         write_inferior_memory transfer.
4950         (set_fast_tracepoint_jump): New variable buf.  Use it for the
4951         read_inferior_memory and write_inferior_memory transfers.
4952         (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
4953         (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
4954         Use it for the write_inferior_memory transfer.
4955         (check_mem_read, check_mem_write): New gdb_asserts for overlapping
4956         buffers.
4957
4958 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
4959
4960         * linux-low.c (fetch_register, store_register): Make code
4961         consistent, fix formatting.
4962
4963 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
4964
4965         * linux-low.c (usr_store_inferior_registers): Factor out code
4966         to handle individual registers into...
4967         (store_register): ... this new function.
4968
4969 2011-12-06  Ulrich Weigand  <uweigand@de.ibm.com>
4970
4971         * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
4972         (s390-linux32v2.o, s390-linux32v2.c): Likewise.
4973         (s390-linux64v1.o, s390-linux64v1.c): Likewise.
4974         (s390-linux64v2.o, s390-linux64v2.c): Likewise.
4975         (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
4976         (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
4977         * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
4978         (srv_xmlfiles): Add new XML files.
4979
4980         * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
4981         and <sys/uio.h>.
4982         (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
4983         (init_registers_s390_linux32v1): Add prototype.
4984         (init_registers_s390_linux32v2): Likewise.
4985         (init_registers_s390_linux64v1): Likewise.
4986         (init_registers_s390_linux64v2): Likewise.
4987         (init_registers_s390x_linux64v1): Likewise.
4988         (init_registers_s390x_linux64v2): Likewise.
4989         (s390_num_regs): Increment to 52.
4990         (s390_regmap): Add orig_r2 register.
4991         (s390_num_regs_3264): Increment to 68.
4992         (s390_regmap_3264): Add orig_r2 register.
4993         (s390_collect_ptrace_register): Handle orig_r2 register.
4994         (s390_supply_ptrace_register): Likewise.
4995         (s390_fill_last_break): New function.
4996         (s390_store_last_break): Likewise.
4997         (s390_fill_system_call): New function.
4998         (s390_store_system_call): Likewise.
4999         (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
5000         register sets.
5001         (s390_check_regset): New function.
5002         (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
5003         NT_S390_SYSTEM_CALL regsets and use appropriate description.
5004         Update target_regsets for available register sets.
5005
5006 2011-12-02  Paul Pluzhnikov  <ppluzhnikov@google.com>
5007             Jan Kratochvil  <jan.kratochvil@redhat.com>
5008
5009         * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
5010         (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
5011         New.
5012         (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
5013         * linux-low.h (struct process_info_private): New member r_debug.
5014         * server.c (handle_qxfer_libraries): Call
5015         the_target->qxfer_libraries_svr4.
5016         (handle_qxfer_libraries_svr4): New function.
5017         (qxfer_packets): New entry "libraries-svr4".
5018         (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
5019         * target.h (struct target_ops): New member qxfer_libraries_svr4.
5020         * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
5021         PACKET_qXfer_libraries_svr4.
5022
5023 2011-11-30  Ulrich Weigand  <uweigand@de.ibm.com>
5024
5025         * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
5026         PSW address/mask between 8-byte and 16-byte formats.
5027         (s390_supply_ptrace_register): Likewise.
5028         (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
5029         basic addressing mode bit.
5030
5031 2011-11-24  Stan Shebs  <stan@codesourcery.com>
5032
5033         * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
5034
5035 2011-11-17  Stan Shebs  <stan@codesourcery.com>
5036
5037         * tracepoint.c (struct tracepoint): New field traceframe_usage.
5038         (tracing_start_time): New global.
5039         (tracing_stop_time): New global.
5040         (tracing_user_name): New global.
5041         (tracing_notes): New global.
5042         (tracing_stop_note): New global.
5043         (cmd_qtstart): Set traceframe_usage, start_time.
5044         (stop_tracing): Set stop_time.
5045         (cmd_qtstatus): Report additional status.
5046         (cmd_qtp): New function.
5047         (handle_tracepoint_query): Call it.
5048         (cmd_qtnotes): New function.
5049         (handle_tracepoint_general_set): Call it.
5050         (get_timestamp): Rename from tsv_get_timestamp.
5051
5052 2011-11-14  Stan Shebs  <stan@codesourcery.com>
5053             Kwok Cheung Yeung  <kcy@codesourcery.com>
5054
5055         * linux-x86-low.c (small_jump_insn): New.
5056         (i386_install_fast_tracepoint_jump_pad): Add arguments for
5057         trampoline and error message, build a trampoline and issue a small
5058         jump instruction to it.
5059         (x86_install_fast_tracepoint_jump_pad): Add arguments for
5060         trampoline and error message.
5061         (x86_get_min_fast_tracepoint_insn_len): New.
5062         (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
5063         * linux-low.h (struct linux_target_ops): Add arguments to
5064         install_fast_tracepoint_jump_pad operation, add new operation.
5065         * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
5066         arguments.
5067         (linux_get_min_fast_tracepoint_insn_len): New function.
5068         (linux_target_op): Add new operation.
5069         * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
5070         (gdb_trampoline_buffer_end): Ditto.
5071         (gdb_trampoline_buffer_error): Ditto.
5072         (struct ipa_sym_addresses): Add fields for new IPA variables.
5073         (symbol_list): Add entries for new IPA variables.
5074         (struct tracepoint): Add fields to hold the address range of the
5075         trampoline used by the tracepoint.
5076         (trampoline_buffer_head): New static variable.
5077         (trampoline_buffer_tail): Ditto.
5078         (claim_trampoline_space): New function.
5079         (have_fast_tracepoint_trampoline_buffer): New function.
5080         (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
5081         structure.
5082         (install_fast_tracepoint): Ditto, also add error buffer argument.
5083         (cmd_qtminftpilen): New function.
5084         (handle_tracepoint_query): Add response to qTMinFTPILen packet.
5085         (fast_tracepoint_from_trampoline_address): New function.
5086         (fast_tracepoint_collecting): Handle trampoline as part of jump
5087         pad space.
5088         (set_trampoline_buffer_space): New function.
5089         (initialize_tracepoint): Initialize new IPA variables.
5090         * target.h (struct target_ops): Add arguments to
5091         install_fast_tracepoint_jump_pad operation, add new
5092         get_min_fast_tracepoint_insn_len operation.
5093         (target_get_min_fast_tracepoint_insn_len): New.
5094         (install_fast_tracepoint_jump_pad): Add arguments.
5095         * server.h (IPA_BUFSIZ): Define.
5096         * linux-i386-ipa.c: Include extra header files.
5097         (initialize_fast_tracepoint_trampoline_buffer): New function.
5098         (initialize_low_tracepoint): Call it.
5099         * server.h (set_trampoline_buffer_space): Declare.
5100         (claim_trampoline_space): Ditto.
5101         (have_fast_tracepoint_trampoline_buffer): Ditto.
5102
5103 2011-11-14  Yao Qi  <yao@codesourcery.com>
5104
5105         * server.c (handle_query): Handle InstallInTrace for qSupported.
5106         * tracepoint.c (add_tracepoint): Sort list.
5107         (install_tracepoint, download_tracepoint): New.
5108         (cmd_qtdp): Call them to install and download tracepoints.
5109         (sort_tracepoints): Removed.
5110         (cmd_qtstart): Update.
5111
5112 2011-11-14  Yao Qi  <yao@codesourcery.com>
5113
5114         * mem-break.c (inc_ref_fast_tracepoint_jump): New.
5115         * mem-break.h: Declare.
5116         * tracepoint.c (cmd_qtstart): Move some code to ...
5117         (clone_fast_tracepoint, install_fast_tracepoint): ... here.
5118         New.
5119         (download_tracepoints): Move some code to ...
5120         (download_tracepoint_1): ... here.  New.
5121
5122 2011-11-08  Yao Qi  <yao@codesourcery.com>
5123
5124         * remote-utils.c (relocate_instruction): A comment fix.
5125
5126 2011-11-07  Joel Brobecker  <brobecker@adacore.com>
5127
5128         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
5129         (i386_dr_low_get_control, i386_dr_low_get_status): Use
5130         dr_status_mirror and dr_control_mirror from debug_reg_state.
5131         (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
5132         (i386_initial_stuff): Remove use of deleted globals.
5133         (i386_get_thread_context, i386_set_thread_context,
5134         i386_thread_added): Use dr_status_mirror and dr_control_mirror
5135         from debug_reg_state.
5136
5137 2011-11-05  Yao Qi  <yao@codesourcery.com>
5138
5139         * tracepoint.c (gdb_collect): Loop over tracepoints of same
5140         address as TPOINT's.
5141
5142 2011-11-02  Stan Shebs  <stan@codesourcery.com>
5143
5144         * tracepoint.c (agent_mem_read_string): New function.
5145         (eval_agent_expr): Call it for tracenz.
5146         * server.c (handle_query): Report support for tracenz.
5147
5148 2011-11-02  Yao Qi  <yao@codesourcery.com>
5149
5150         * tracepoint.c (cmd_qtstart): Remove unused local variables.
5151
5152 2011-11-02  Yao Qi  <yao@codesourcery.com>
5153
5154         * target.h: Fix a typo in comment.
5155
5156 2011-10-31  Pedro Alves  <pedro@codesourcery.com>
5157
5158         * mem-break.c (check_mem_write): Add `myaddr' parameter.  Don't
5159         clobber the breakpoints' shadows with fast tracepoint jumps.
5160         * mem-break.h (check_mem_write): Add `myaddr' parameter.
5161         * target.c (write_inferior_memory): Also pass MYADDR down to
5162         check_mem_write.
5163
5164 2011-10-07  Ulrich Weigand  <ulrich.weigand@linaro.org>
5165
5166         * configure.ac: Check support for personality routine.
5167         * configure: Regenerate.
5168         * config.in: Likewise.
5169         * linux-low.c: Include <sys/personality.h>.
5170         Define ADDR_NO_RANDOMIZE if necessary.
5171         (linux_create_inferior): Disable address space randomization when
5172         forking inferior, if requested.
5173         (linux_supports_disable_randomization): New function.
5174         (linux_target_ops): Install it.
5175         * server.h (disable_randomization): Declare.
5176         * server.c (disable_randomization): New global variable.
5177         (handle_general_set): Handle QDisableRandomization.
5178         (handle_query): Likewise for qSupported.
5179         (main): Support --disable-randomization and --no-disable-randomization
5180         command line arguments.
5181         * target.h (struct target_ops): Add supports_disable_randomization.
5182         (target_supports_disable_randomization): New macro.
5183
5184 2011-09-29  Mike Frysinger  <vapier@gentoo.org>
5185
5186         * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
5187         ifdef check.
5188         [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
5189         [!PT_GETDSBT] (target_loadmap): New definition.
5190         (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
5191         (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
5192         LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
5193         and PT_GETDSBT to LINUX_LOADMAP.
5194         [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
5195         (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
5196
5197 2011-09-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
5198
5199         * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
5200         (arm_linux_hwbp_cap): New static variable.
5201         (arm_linux_get_hwbp_cap): Replace by ...
5202         (arm_linux_init_hwbp_cap): ... this new function.
5203         (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
5204         (arm_linux_get_hw_watchpoint_count): Likewise.
5205         (arm_linux_get_hw_watchpoint_max_length): Likewise.
5206         (arm_arch_setup): Call arm_linux_init_hwbp_cap.
5207         (arm_prepare_to_resume): Use perror_with_name instead of error.
5208
5209 2011-09-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
5210
5211         * linux-arm-low.c: Include <signal.h>.
5212         (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
5213         (struct arm_linux_hwbp_cap): New data type.
5214         (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
5215         (struct arm_linux_hw_breakpoint): New data type.
5216         (MAX_BPTS, MAX_WPTS): Define.
5217         (struct arch_process_info, struct arch_lwp_info): New data types.
5218         (arm_linux_get_hwbp_cap): New function.
5219         (arm_linux_get_hw_breakpoint_count): Likewise.
5220         (arm_linux_get_hw_watchpoint_count): Likewise.
5221         (arm_linux_get_hw_watchpoint_max_length): Likewise.
5222         (arm_hwbp_control_initialize): Likewise.
5223         (arm_hwbp_control_is_enabled): Likewise.
5224         (arm_hwbp_control_is_initialized): Likewise.
5225         (arm_hwbp_control_disable): Likewise.
5226         (arm_linux_hw_breakpoint_equal): Likewise.
5227         (arm_linux_hw_point_initialize): Likewise.
5228         (struct update_registers_data): New data structure.
5229         (update_registers_callback: New function.
5230         (arm_insert_point): Likewise.
5231         (arm_remove_point): Likewise.
5232         (arm_stopped_by_watchpoint): Likewise.
5233         (arm_stopped_data_address): Likewise.
5234         (arm_new_process): Likewise.
5235         (arm_new_thread): Likewise.
5236         (arm_prepare_to_resume): Likewise.
5237         (the_low_target): Register arm_insert_point, arm_remove_point,
5238         arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
5239         arm_new_thread, and arm_prepare_to_resume.
5240
5241 2011-09-15  Stan Shebs  <stan@codesourcery.com>
5242
5243         * server.h (struct emit_ops): Add compare-goto fields.
5244         * tracepoint.c (gdb_agent_op_sizes): New table.
5245         (emit_eq_goto): New function.
5246         (emit_ne_goto): New function.
5247         (emit_lt_goto): New function.
5248         (emit_le_goto): New function.
5249         (emit_gt_goto): New function.
5250         (emit_ge_goto): New function.
5251         (is_goto_target): New function.
5252         (compile_bytecodes): Recognize special cases of compare-goto
5253         combinations and call specialized emitters for them.
5254         * linux-x86-low.c (amd64_emit_eq_goto): New function.
5255         (amd64_emit_ne_goto): New function.
5256         (amd64_emit_lt_goto): New function.
5257         (amd64_emit_le_goto): New function.
5258         (amd64_emit_gt_goto): New function.
5259         (amd64_emit_ge_goto): New function.
5260         (amd64_emit_ops): Add the new functions.
5261         (i386_emit_eq_goto): New function.
5262         (i386_emit_ne_goto): New function.
5263         (i386_emit_lt_goto): New function.
5264         (i386_emit_le_goto): New function.
5265         (i386_emit_gt_goto): New function.
5266         (i386_emit_ge_goto): New function.
5267         (i386_emit_ops): Add the new functions.
5268
5269 2011-09-08  Stan Shebs  <stan@codesourcery.com>
5270
5271         * linux-x86-low.c (i386_emit_prologue): Save %ebx.
5272         (i386_emit_epilogue): Restore %ebx.
5273
5274 2011-08-31  Jie Zhang  <jzhang918@gmail.com>
5275
5276         * server.c (step_thread): Remove definition.
5277         (process_serial_event): Don't handle Hs.
5278         * server.h (step_thread): Remove declaration.
5279         * target.c (set_desired_inferior): Remove use of step_thread.
5280
5281 2011-08-24  Luis Machado  <lgustavo@codesourcery.com>
5282
5283         * linux-low.c: Include linux-procfs.h.
5284         (linux_attach_lwp_1): Update comments.
5285         (linux_attach): Scan for existing threads when attaching to a
5286         process that is the tgid.
5287         * Makefile.in: Update dependencies.
5288
5289 2011-08-24  Luis Machado  <lgustavo@codesourcery.com>
5290
5291         * configure.srv: Add linux-procfs.o dependencies.
5292
5293 2011-08-14  Yao Qi  <yao@codesourcery.com>
5294
5295         * target.h (struct target_ops): Fix indent.
5296         * win32-low.c (win32_target_ops): Fix comment.
5297
5298 2011-08-14  Andrew Jenner  <andrew@codesourcery.com>
5299             Yao Qi  <yao@codesourcery.com>
5300
5301         * Makefile.in (clean): Remove tic6x-*.c files.
5302         (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
5303         (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
5304         (tic6x-c64xp-linux.c): Likewise.
5305         * configure.srv: Add support for tic6x-*-uclinux.
5306         * linux-tic6x-low.c: New.
5307         * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
5308
5309 2011-08-14  Andrew Stubbs <ams@codesourcery.com>
5310             Yao Qi  <yao@codesourcery.com>
5311
5312         * target.h (struct target_ops): Add read_loadmap.
5313         * linux-low.c (struct target_loadseg): New type.
5314         (struct target_loadmap): New type.
5315         (linux_read_loadmap): New function.
5316         (linux_target_ops): Add linux_read_loadmap.
5317         * server.c (handle_query): Support qXfer:fdpic:read packet.
5318         * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
5319         to NULL.
5320
5321 2011-08-05  Eli Zaretskii  <eliz@gnu.org>
5322
5323         * win32-low.c: Include <stdint.h>.
5324
5325 2011-07-22  Pedro Alves  <pedro@codesourcery.com>
5326
5327         * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5328         to the inferior here.
5329         (i386_remove_aligned_watchpoint): Ditto.
5330         (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5331         fit part of the watchpoint in the debug registers.
5332         (i386_update_inferior_debug_regs): New.
5333         (i386_low_insert_watchpoint): Work on a local mirror of the debug
5334         registers, and only update the inferior on success.
5335         (i386_low_remove_watchpoint): Ditto.
5336
5337 2011-07-22  Kwok Cheung Yeung  <kcy@codesourcery.com>
5338
5339         * linux-low.c (compare_ints, unique, list_threads, show_process,
5340         linux_core_of_thread): Delete.
5341         (linux_target_ops): Change linux_core_of_thread to
5342         linux_common_core_of_thread.
5343         (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5344         * utils.c (malloc_failure): Change type of argument.
5345         (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5346         * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5347         common/linux-osdata.c, common/ptid.c and common/buffer.c.
5348         (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5349         (IPA_OBJS): Add common-utils-ipa.o.
5350         (ptid_h, linux_osdata_h): New macros.
5351         (server_h): Add common/common-utils.h, common/xml-utils.h,
5352         common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5353         common/ptid.h.
5354         (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5355         ptid.o, buffer.o): New rules.
5356         (linux-low.o): Add common/linux-osdata.h as a dependency.
5357         * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5358         * configure.ac: Add AC_HEADER_DIRENT check.
5359         * config.in: Regenerate.
5360         * configure: Regenerate.
5361         * remote-utils.c (xml_escape_text): Delete.
5362         (buffer_grow, buffer_free, buffer_init, buffer_finish,
5363         buffer_xml_printf): Move to common/buffer.c.
5364         * server.c (main): Remove call to initialize_inferiors.
5365         * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5366         ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5367         ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5368         internal_error, gdb_assert, gdb_assert_fail): Delete.
5369         (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5370         buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5371         common/buffer.h.
5372         * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5373         ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5374         initialize_inferiors): Delete.
5375
5376 2011-07-20  Pedro Alves  <pedro@codesourcery.com>
5377
5378         * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5379         symbol error.
5380
5381 2011-05-31  Pedro Alves  <pedro@codesourcery.com>
5382
5383         * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5384         assertion.
5385         * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5386
5387 2011-05-26  Yao Qi  <yao@codesourcery.com>
5388
5389         * Makefile.in (thread-db.o): Track dependence to
5390         common/gdb_thread_db.h.
5391         * thread-db.c: include gdb_thread_db.h from right place.
5392
5393 2011-05-16  Adrian Cornish  <gnu@bluedreamer.com>
5394
5395         * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5396         __FILE__ and __LINE__ to internal_error.
5397
5398 2011-05-13  Doug Evans  <dje@google.com>
5399
5400         * thread-db.c (try_thread_db_load_from_sdir): New function.
5401         (try_thread_db_load_from_dir): New function.
5402         (thread_db_load_search): Handle $sdir, ignore $pdir.
5403         Remove trying of system directories if search of
5404         libthread-db-search-path fails, that is now done via $sdir.
5405
5406 2011-05-12  Kwok Cheung Yeung  <kcy@codesourcery.com>
5407
5408         * server.c (handle_query): Add EnableDisableTracepoints to the list
5409         of supported features.
5410         * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
5411         tracepoints.
5412         (cmd_qtenable_disable): New.
5413         (cmd_qtstart): Install tracepoints even if disabled.
5414         (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5415         receiving a QTEnable or QTDisable packet.
5416         (gdb_collect): Skip data collection if fast tracepoint is disabled.
5417         (ust_marker_to_static_tracepoint): Do not ignore disabled static
5418         tracepoints.
5419         (gdb_probe): Skip data collection if static tracepoint is disabled.
5420
5421 2011-05-10  Doug Evans  <dje@google.com>
5422
5423         * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5424
5425 2011-05-04  Doug Evans  <dje@google.com>
5426
5427         * linux-low.c (linux_join): Skip process lookup.
5428         * spu-low.c (spu_join): Ditto.
5429         * server.c (join_inferiors_callback): Delete.
5430         (process_serial_event): For 'D' packet (detach) call join_inferior
5431         directly.
5432
5433 2011-05-04  Joseph Myers  <joseph@codesourcery.com>
5434
5435         * README: Don't mention xscale*-*-linux*.
5436         * configure.srv (xscale*-*-linux*): Don't handle target.
5437
5438 2011-04-27  Nathan Froyd  <froydnj@codesourcery.com>
5439
5440         * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5441         casting pointers.
5442         (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5443         (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5444         (i386_emit_void_call_2): Likewise.
5445
5446 2011-04-26  Yao Qi  <yao@codesourcery.com>
5447
5448         * linux-low.c: Move common macros to linux-ptrace.h.
5449         Include linux-ptrace.h.
5450         * Makefile.in (linux_ptrace_h): New.
5451         (linux-low.o): Depends on linux-ptrace.h.
5452
5453 2011-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
5454
5455         * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5456         RUN_ONCE.  Comment for the LISTEN_DESC delete_file_handler call.
5457         (remote_prepare): New function with most of the TCP code from ...
5458         (remote_open): ... here.  Detect PORT here unconditionally.  Move also
5459         setting transport_is_reliable.
5460         * server.c (run_once): New variable.
5461         (gdbserver_usage): Document it.
5462         (main): Set run_once for `--once'.  Call remote_prepare.  Exit after
5463         the first run if RUN_ONCE.
5464         * server.h (run_once, remote_prepare): New declarations.
5465
5466 2011-04-19  Tom Tromey  <tromey@redhat.com>
5467
5468         * win32-low.c (handle_load_dll): Remove duplicate "the".
5469
5470 2011-04-07  Pierre Muller  <muller@ics.u-strasbg.fr>
5471
5472         Remove support for old Cygwin 1.5 versions.
5473         * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5474         function to avoid warning.
5475         (win32_add_one_solib): Use cygwin_conv_path function to avoid
5476         warning.
5477
5478 2011-03-18  Pierre Muller  <muller@ics.u-strasbg.fr>
5479
5480         * gdbserver/server.h (Macro _): Define it if not available.
5481
5482 2011-03-14  Michael Snyder  <msnyder@vmware.com>
5483
5484         * hostio.c (handle_close): Remove unnecessary null test.
5485
5486 2011-03-10  Joel Brobecker  <brobecker@adacore.com>
5487
5488         * Makefile.in (maintainer-clean realclean distclean): Remove
5489         "make ...  subdir_do" command.
5490
5491 2011-03-10  Michael Snyder  <msnyder@vmware.com>
5492
5493         * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5494
5495         * server.c (handle_v_run): Free alloced buffer on early return.
5496
5497 2011-03-09  Yao Qi  <yao@codesourcery.com>
5498
5499         Revert:
5500         2011-03-04  Yao Qi  <yao@codesourcery.com>
5501
5502         * Makefile.in: Remove GNU make feature --directory.
5503
5504         2011-03-05  Yao Qi  <yao@codesourcery.com>
5505
5506         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5507         (subdir_do): New make target.  Copied from gdb/Makefile.
5508         (maintainer-clean, realclean, distclean, clean): Call corresponding
5509         make targets in common/Makefile.
5510
5511         2011-02-11  Yao Qi  <yao@codesourcery.com>
5512
5513         * configure.ac: Call AC_PROG_RANLIB.
5514         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
5515         * configure: Regenerate.
5516
5517 2011-03-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
5518
5519         * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5520
5521 2011-03-06  Yao Qi  <yao@codesourcery.com>
5522
5523         * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5524
5525 2011-03-05  Yao Qi  <yao@codesourcery.com>
5526
5527         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5528         (subdir_do): New make target.  Copied from gdb/Makefile.
5529         (maintainer-clean, realclean, distclean, clean): Call corresponding
5530         make targets in common/Makefile.
5531
5532 2011-03-04  Yao Qi  <yao@codesourcery.com>
5533
5534         * Makefile.in: Remove GNU make feature --directory.
5535
5536 2011-03-04  Michael Snyder  <msnyder@vmware.com>
5537
5538         * server.c (queue_stop_reply): Call xmalloc not malloc.
5539
5540 2011-03-02  Michael Snyder  <msnyder@vmware.com>
5541
5542         * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5543
5544 2011-02-28  Michael Snyder  <msnyder@vmware.com>
5545
5546         * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5547         (cmd_qtframe): Ditto.
5548         (cmd_qtbuffer): Ditto.
5549         (cmd_bigqtbuffer): Ditto.
5550
5551         * utils.c (decimal2str): Initialize 'width' to nine, then
5552         don't mess with it.
5553
5554 2011-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
5555
5556         * hostio.c (require_data): Free *data, not data.
5557
5558 2011-02-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
5559
5560         * hostio.c (require_data): Use free, not xfree.
5561
5562 2011-02-27  Michael Snyder  <msnyder@vmware.com>
5563
5564         * server.c (handle_query): Discard unused value.
5565
5566         * hostio.c (require_data): Free malloc memory before returning
5567         error.
5568
5569 2011-02-26  Michael Snyder  <msnyder@vmware.com>
5570
5571         * linux-low.c (list_threads): Call closedir for dirent.
5572
5573 2011-02-27  Michael Snyder  <msnyder@vmware.com>
5574
5575         * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5576         a case statement falls through.
5577
5578         * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5579
5580         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5581         in comparison.
5582
5583 2011-02-26  Michael Snyder  <msnyder@vmware.com>
5584
5585         * utils.c (decimal2str): Eliminate dead code and dead param.
5586         (pulongest): Drop dead param from call to decimal2str.
5587         (plongest): Ditto.
5588
5589 2011-02-24  Joel Brobecker  <brobecker@adacore.com>
5590
5591         Revert the following patch (not approved yet):
5592         2011-02-21  Hui Zhu  <teawater@gmail.com>
5593         * tracepoint.c (tp_printf): New function.
5594         (eval_agent_expr): Handle gdb_agent_op_printf.
5595
5596 2011-02-21  Hui Zhu  <teawater@gmail.com>
5597
5598         * tracepoint.c (tp_printf): New function.
5599         (eval_agent_expr): Handle gdb_agent_op_printf.
5600
5601 2011-02-18  Tom Tromey  <tromey@redhat.com>
5602
5603         * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5604         (tracepoint.o): Likewise.
5605         * tracepoint.c (enum gdb_agent_op): Use ax.def.
5606         (gdb_agent_op_names): Likewise.
5607
5608 2011-02-18  Tom Tromey  <tromey@redhat.com>
5609
5610         * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5611         gdb_agent_op_rot>: New constants.
5612         (gdb_agent_op_names): Add pick and roll.
5613         (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5614         cases.
5615
5616 2011-02-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
5617
5618         * aclocal.m4: Regenerated with aclocal-1.11.1.
5619
5620 2011-02-14  Pedro Alves  <pedro@codesourcery.com>
5621
5622         * server.c (handle_qxfer_traceframe_info): New.
5623         (qxfer_packets): Register "traceframe-info".
5624         (handle_query): Report support for qXfer:traceframe-info:read+.
5625         * tracepoint.c (match_blocktype): New.
5626         (traceframe_find_block_type): Rename to ...
5627         (traceframe_walk_blocks): ... this.  Add callback filter argument,
5628         and use it.
5629         (traceframe_find_block_type): New, reimplemented on top of
5630         traceframe_walk_blocks.
5631         (build_traceframe_info_xml): New.
5632         (traceframe_read_info): New.
5633         * server.h (traceframe_read_info): Declare.
5634
5635 2011-02-11  Yao Qi  <yao@codesourcery.com>
5636
5637         * configure.ac: Call AC_PROG_RANLIB.
5638         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
5639         * configure: Regenerate.
5640
5641 2011-02-07  Pedro Alves  <pedro@codesourcery.com>
5642
5643         * server.c (gdb_read_memory): Change return semantics to allow
5644         partial transfers.
5645         (handle_search_memory_1): Adjust.
5646         (process_serial_event) <'m' packet>: Handle partial transfers.
5647         * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5648
5649 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
5650
5651         * regcache.c (init_register_cache): Initialize
5652         regcache->register_status.
5653         (free_register_cache): Release regcache->register_status.
5654         (regcache_cpy): Copy register_status.
5655         (registers_to_string): Print 'x's for unavailable registers.
5656         (supply_register): Mark the register's status valid or
5657         unavailable, depending on whether a buffer was passed in or not.
5658         (supply_register_zeroed): New.
5659         (supply_regblock): Mark the registers' status valid or
5660         unavailable, depending on whether a buffer was passed in or not.
5661         * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5662         (struct regcache): New `register_status' field.
5663         (supply_register_zeroed): Declare.
5664         * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5665         supply_register_zeroed, rather than passing a NULL buffer to
5666         supply_register.
5667         * tracepoint.c (fetch_traceframe_registers): Update comment.
5668
5669 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
5670
5671         * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5672         buffer explicit.
5673
5674 2011-01-25  Pedro Alves  <pedro@codesourcery.com>
5675
5676         * server.h (decode_xfer_write): Change prototype.
5677         * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5678         and don't extract the annex here.
5679         * server.c (decode_xfer_read): Remove `annex' parameter,
5680         and don't extract the annex here.
5681         (decode_xfer): New.
5682         (struct qxfer): New.
5683         (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5684         (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5685         (handle_qxfer_statictrace): New functions, abstracted out from
5686         handle_query, and made to use the struct qxfer interface.
5687         (handle_threads_qxfer_proper): Rename to ...
5688         (handle_qxfer_threads_proper): ... this.
5689         (handle_threads_qxfer): Rename to ...
5690         (handle_qxfer_threads): ... this.  Adjust.
5691         (qxfer_packets): New array.
5692         (handle_qxfer): New function.
5693         (handle_query): Use handle_qxfer.
5694
5695 2011-01-05  Michael Snyder  <msnyder@msnyder-server.eng.vmware.com>
5696
5697         * gdbreplay.c: Shorten lines of >= 80 columns.
5698         * linux-low.c: Ditto.
5699         * linux-ppc-low.c: Ditto.
5700         * linux-s390-low.c: Ditto.
5701         * linux-sparc-low.c: Ditto.
5702         * linux-x86-low.c: Ditto.
5703         * linux-xtensa-low.c: Ditto.
5704         * mem-break.c: Ditto.
5705         * nto-low.c: Ditto.
5706         * regcache.h: Ditto.
5707         * remote-utils.c: Ditto.
5708         * server.c: Ditto.
5709         * server.h: Ditto.
5710         * thread-db.c: Ditto.
5711         * tracepoint.c: Ditto.
5712         * utils.c: Ditto.
5713         * win32-low.h: Ditto.
5714
5715 2011-01-05  Joel Brobecker  <brobecker@adacore.com>
5716
5717         * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5718         update.
5719
5720 2011-01-01  Joel Brobecker  <brobecker@adacore.com>
5721
5722         * server.c (gdbserver_version): Update copyright year in version
5723         output.
5724         * gdbreplay.c (gdbreplay_version): Ditto.
5725
5726 2010-12-29  Jie Zhang  <jie.zhang@analog.com>
5727
5728         * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5729         * linux-bfin-low.c: New file.
5730         * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5731         PT_DATA_ADDR for BFIN targets.
5732         * Makefile.in (SFILES): Add linux-bfin-low.c.
5733         (clean): Remove reg-bfin.c.
5734         (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5735         * README: Mention supported Blackfin targets.
5736
5737 2010-12-23  Mike Frysinger  <vapier@gentoo.org>
5738
5739         * .gitignore: New file.
5740
5741 2010-11-16  Mike Frysinger  <vapier@gentoo.org>
5742
5743         * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5744
5745 2010-10-22  Jie Zhang  <jie@codesourcery.com>
5746
5747         * Makefile.in: Add FLAGS_TO_PASS variable.
5748         (install): Remove dependency of install-only and recursively
5749         invoke make for install-only.
5750
5751 2010-10-04  Doug Evans  <dje@google.com>
5752
5753         * Makefile.in (uninstall): Use $(DESTDIR).
5754
5755 2010-09-24  Pedro Alves  <pedro@codesourcery.com>
5756
5757         PR gdb/11842
5758
5759         * linux-x86-low.c (compat_siginfo_from_siginfo)
5760         (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5761         si_code is < 0.  Check for si_code == SI_TIMER before checking for
5762         si_code < 0.
5763
5764 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
5765
5766         * lynx-i386-low.c: New file.
5767         * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5768
5769 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
5770
5771         * lynx-low.c (ptrace_request_to_str): Remove handling for
5772         request values that have been removed in LynxOS 5.x.
5773
5774 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
5775
5776         * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5777         <ptrace.h>
5778
5779 2010-09-09  Nathan Sidwell  <nathan@codesourcery.com>
5780
5781         * configure.ac: Add --enable-inprocess-agent option.
5782         * configure: Rebuilt.
5783
5784 2010-09-06  Yao Qi  <yao@codesourcery.com>
5785
5786         * linux-low.c (linux_kill): Remove unused variable.
5787         (linux_stabilize_threads): Likewise.
5788         * server.c (start_inferior): Likewise.
5789         (queue_stop_reply_callback): Likewise.
5790         * tracepoint.c (do_action_at_tracepoint): Likewise.
5791
5792 2010-09-06  Yao Qi  <yao@codesourcery.com>
5793
5794         * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5795         on return.
5796
5797 2010-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
5798
5799         * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5800
5801 2010-09-06  Pedro Alves  <pedro@codesourcery.com>
5802
5803         * Makefile.in (install-only): Replace $IPA_DEPFILES with
5804         "$(IPA_DEPFILES)".
5805
5806 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
5807
5808         * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5809         gdbserver/lynx-ppc-low.c: New files.
5810         * Makefile.in (lynx_low_h): New variable.
5811         (lynx-low.o, lynx-ppc-low.o): New rules.
5812         * configure.ac: On LynxOS, link with -lnetinet.
5813         * configure.srv: Add handling of powerpc-*-lynxos* targets.
5814         * configure: regenerate.
5815
5816 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
5817
5818         * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5819         * configure.ac: Add check for vasprintf and vsnprintf.
5820         * configure, config.in: Regenerate.
5821         * server.h (vasprintf, vsnprintf): Add conditional declarations.
5822
5823 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
5824
5825         * gdbreplay.c: Move include of alloca.h up, next to include of
5826         malloc.h.
5827         * server.h: Add include of malloc.h.
5828         * mem-break.c: Remove include of malloc.h.
5829         * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5830
5831 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
5832
5833         * Makefile.in (memmem.o): Build with -Wno-error.
5834
5835 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
5836
5837         * utils.c (xsnprintf): Make non-static.
5838         * server.h: Add xsnprintf declaration.
5839         * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5840         replace calls to snprintf by calls to xsnprintf throughout.
5841
5842 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
5843
5844         * configure.ac: Add configure check for alloca.
5845         * configure, config.in: Regenerate.
5846         * server.h: Include alloca.h if it exists.
5847         * gdbreplay.c: Include alloca.h if it exists.
5848
5849 2010-08-28  Pedro Alves  <pedro@codesourcery.com>
5850
5851         * linux-low.c (__SIGRTMIN): Define if not already defined.
5852         (linux_create_inferior): Check for __ANDROID__ rather than
5853         __SIGRTMIN.
5854         (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5855         are already deferred.
5856         (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5857         (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5858         stopped and already has a pending signal to report.
5859         (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5860         a pending signal to report or is moving out of a jump pad.
5861         (linux_init_signals): Check for __ANDROID__ rather than
5862         __SIGRTMIN.
5863
5864 2010-08-28  Pedro Alves  <pedro@codesourcery.com>
5865
5866         * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5867         debug_threads check.  Avoid a linear search when not doing debug
5868         output.
5869
5870 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
5871
5872         * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5873         (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5874         (struct file_handler) <fd>: Change type to gdb_fildes_t.
5875         (process_event): Change local fd's type to gdb_fildes_t.
5876         (create_file_handler): Adjust prototype.
5877         (delete_file_handler): Adjust prototype.
5878         (handle_file_event): Adjust prototype.  Use pfildes.
5879         (create_file_event): Adjsut prototype.
5880         * remote-utils.c (remote_desc, listen_desc): Change type to
5881         gdb_fildes_t.
5882         * server.h: New gdb_fildes_t typedef.
5883         [USE_WIN32API]: Include winsock2.h.
5884         (delete_file_handler, add_file_handler): Adjust prototypes.
5885         (pfildes): Declare.
5886         * utils.c (pfildes): New.
5887
5888 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
5889
5890         * configure.ac (build_warnings): Add -Wno-char-subscripts.
5891         * configure: Regenerate.
5892
5893 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
5894
5895         * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5896         (linux_done_accessing_memory): ... this.
5897         (linux_target_ops): Adjust.
5898         * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5899         * nto-low.c (nto_target_ops): Adjust comment.
5900         * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5901         * spu-low.c (spu_target_ops): Adjust comment.
5902         * target.h (target_ops): Rename unprepare_to_access_memory field
5903         to done_accessing_memory.
5904         (unprepare_to_access_memory): Rename to ...
5905         (done_accessing_memory): ... this.
5906
5907 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
5908
5909         * linux-low.c (linux_prepare_to_access_memory): New.
5910         (linux_unprepare_to_access_memory): New.
5911         (linux_target_ops): Install them.
5912         * server.c (read_memory): Rename to ...
5913         (gdb_read_memory): ... this.  Use
5914         prepare_to_access_memory/prepare_to_access_memory.
5915         (write_memory): Rename to ...
5916         (gdb_write_memory): ... this.  Use
5917         prepare_to_access_memory/prepare_to_access_memory.
5918         (handle_search_memory_1): Adjust.
5919         (process_serial_event): Adjust.
5920         * target.h (struct target_ops): New fields
5921         prepare_to_access_memory and unprepare_to_access_memory.
5922         (prepare_to_access_memory, unprepare_to_access_memory): New.
5923         * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5924         prepare_to_access_memory/prepare_to_access_memory.
5925         * nto-low.c (nto_target_ops): Adjust.
5926         * spu-low.c (spu_target_ops): Adjust.
5927         * win32-low.c (win32_target_ops): Adjust.
5928
5929 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
5930
5931         * Makefile.in (WARN_CFLAGS): Get it from configure.
5932         (WERROR_CFLAGS): New.
5933         (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5934         * configure.ac: Introduce --enable-werror, which adds -Werror to
5935         the compiler command line.  Enabled by default.  Disable with
5936         --disable-werror.  Add -Wdeclaration-after-statement
5937         Wpointer-arith and -Wformat-nonliteral to warning flags.
5938         * configure: Regenerate.
5939
5940 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
5941
5942         * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
5943
5944 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
5945
5946         * gdbreplay.c (remote_error): New.
5947         (gdbchar): New.
5948         (expect): Use gdbchar.  Check for error reading from GDB.
5949         Clarify sync error output.
5950         (play): Check for errors writing to GDB.
5951         * linux-low.c (sigchld_handler): Really ignore `write' errors.
5952         * remote-utils.c (getpkt): Check for errors writing to the remote
5953         descriptor.
5954
5955 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
5956
5957         * linux-low.c (linux_wait_1): Move non-debugging code out of
5958         `debug_threads' control.
5959
5960 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
5961
5962         * linux-low.c (linux_wait_1): Don't set last_status here.
5963         * server.c (push_event, queue_stop_reply_callback): Assert we're
5964         not pushing a TARGET_WAITKIND_IGNORE event.
5965         (start_inferior, start_inferior, attach_inferior, handle_v_cont)
5966         (myresume, handle_target_event): Set the thread's last_resume_kind
5967         and last_status from the target returned status.
5968
5969 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
5970
5971         PR threads/10729
5972
5973         * linux-x86-low.c (update_debug_registers_callback): New.
5974         (i386_dr_low_set_addr): Use it.
5975         (i386_dr_low_get_addr): New.
5976         (i386_dr_low_set_control): Use update_debug_registers_callback.
5977         (i386_dr_low_get_control): New.
5978         (i386_dr_low_get_status): Adjust.
5979         * linux-low.c (linux_stop_lwp): New.
5980         * linux-low.h (linux_stop_lwp): Declare.
5981
5982         * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
5983         argument instead of a i386_debug_reg_state.
5984         (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
5985         a i386_debug_reg_state.
5986         (i386_insert_aligned_watchpoint): Adjust.
5987         (i386_remove_aligned_watchpoint): Adjust.
5988         (i386_low_stopped_data_address): Read the debug registers from the
5989         inferior instead of from the mirrors.
5990         * i386-low.h (struct i386_debug_reg_state): Extend comment.
5991         (i386_dr_low_get_addr): Declare.
5992         (i386_dr_low_get_control): Declare.
5993         (i386_dr_low_get_status): Change prototype.
5994
5995         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
5996         (i386_dr_low_get_addr): New.
5997         (i386_dr_low_get_control): New.
5998         (i386_dr_low_get_status): Adjust prototype.  Return
5999         dr_status_mirror.
6000         (i386_initial_stuff): Clear dr_status_mirror and
6001         dr_control_mirror.
6002         (i386_get_thread_context): Adjust.
6003         (i386_set_thread_context): Adjust.
6004         (i386_thread_added): Adjust.
6005
6006 2010-08-24  Pedro Alves  <pedro@codesourcery.com>
6007
6008         * linux-low.h (linux_thread_area): Delete declaration.
6009
6010 2010-08-11  Thomas Schwinge  <thomas@codesourcery.com>
6011
6012         * linux-low.c (linux_wait_1): Correctly return the ptid of the child
6013         after its termination.
6014
6015 2010-08-09  Pedro Alves  <pedro@codesourcery.com>
6016
6017         * linux-low.c (gdb_wants_lwp_stopped): Delete.
6018         (gdb_wants_all_stopped): Delete.
6019         (linux_wait_1): Don't call them.
6020         * server.c (handle_v_cont): Tag all threads as want-stopped.
6021         (gdb_wants_thread_stopped): Fix comments.  Tag the thread that
6022         stopped as "client-wants-stopped".
6023
6024 2010-07-31  Pedro Alves  <pedro@codesourcery.com>
6025
6026         * Makefile.in (signals_h): New.
6027         (server_h): Depend on it.
6028         (server.o): Don't depend on $(signals_def).
6029         (signals.o): Depend on $(signals_def).
6030
6031 2010-07-31  Jan Kratochvil  <jan.kratochvil@redhat.com>
6032
6033         * Makefile.in (signals_def): New.
6034         (server_h): Append include/gdb/signals.h and signals_def.
6035         (server.o): Append signals_def.
6036
6037 2010-07-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
6038
6039         * server.c (handle_target_event): Use target_signal_to_host for
6040         resume_info.sig initialization.
6041         * target.h (struct thread_resume) <sig>: New comment.
6042
6043 2010-07-20  Ozkan Sezer  <sezeroz@gmail.com>
6044
6045         * server.c (handle_query): strcpy() the returned string from paddress()
6046         instead of sprintf().
6047         * utils.c (paddress): Return phex_nz().
6048
6049 2010-07-07  Joel Brobecker  <brobecker@adacore.com>
6050
6051         * server.c (handle_v_cont): Call mourn_inferior if process
6052         just exited.
6053         (myresume): Likewise.
6054
6055 2010-07-01  Pedro Alves  <pedro@codesourcery.com>
6056
6057         Static tracepoints, and integration with UST.
6058
6059         * configure.ac: Handle --with-ust.  substitute ustlibs and ustinc.
6060         * mem-break.c (uninsert_all_breakpoints)
6061         (reinsert_all_breakpoints): New.
6062         * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
6063         * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
6064         (gdb_agent_ust_loaded, helper_thread_id)
6065         (gdb_agent_helper_thread_id): New macros.
6066         (struct ipa_sym_addresses): Add addr_ust_loaded,
6067         addr_helper_thread_id, addr_cmd_buf.
6068         (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
6069         (in_process_agent_loaded_ust): New.
6070         (write_e_ust_not_loaded): New.
6071         (maybe_write_ipa_ust_not_loaded): New.
6072         (struct collect_static_trace_data_action): New.
6073         (enum tracepoint_type) <static_tracepoint>: New.
6074         (struct tracepoint) <handle>: Mention static tracepoints.
6075         (struct static_tracepoint_ctx): New.
6076         (CMD_BUF_SIZE): New.
6077         (add_tracepoint_action): Handle static tracepoint actions.
6078         (unprobe_marker_at): New.
6079         (clear_installed_tracepoints): Handle static tracepoints.
6080         (cmd_qtdp): Handle static tracepoints.
6081         (probe_marker_at): New.
6082         (cmd_qtstart): Handle static tracepoints.
6083         (response_tracepoint): Handle static tracepoints.
6084         (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
6085         (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
6086         (get_context_regcache): Handle static tracepoints.
6087         (do_action_at_tracepoint): Handle static tracepoint actions.
6088         (traceframe_find_block_type): Handle static trace data blocks.
6089         (traceframe_read_sdata): New.
6090         (download_tracepoints): Download static tracepoint actions.
6091         [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
6092         (GDB_PROBE_NAME): New.
6093         (ust_ops): New.
6094         (GET_UST_SYM): New.
6095         (USTF): New.
6096         (dlsym_ust): New.
6097         (ust_marker_to_static_tracepoint): New.
6098         (gdb_probe): New.
6099         (collect_ust_data_at_tracepoint): New.
6100         (gdb_ust_probe): New.
6101         (UNIX_PATH_MAX, SOCK_DIR): New.
6102         (gdb_ust_connect_sync_socket): New.
6103         (resume_thread, stop_thread): New.
6104         (run_inferior_command): New.
6105         (init_named_socket): New.
6106         (gdb_ust_socket_init): New.
6107         (cstr_to_hexstr): New.
6108         (next_st): New.
6109         (first_marker, next_marker): New.
6110         (response_ust_marker): New.
6111         (cmd_qtfstm, cmd_qtsstm): New.
6112         (unprobe_marker_at, probe_marker_at): New.
6113         (cmd_qtstmat, gdb_ust_thread): New.
6114         (gdb_ust_init): New.
6115         (initialize_tracepoint_ftlib): Call gdb_ust_init.
6116         * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
6117         (ST_REGENTRY): New.
6118         (x86_64_st_collect_regmap): New.
6119         (X86_64_NUM_ST_COLLECT_GREGS): New.
6120         (AMD64_RIP_REGNUM): New.
6121         (supply_static_tracepoint_registers): New.
6122         * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
6123         (ST_REGENTRY): New.
6124         (i386_st_collect_regmap): New.
6125         (i386_NUM_ST_COLLECT_GREGS): New.
6126         (supply_static_tracepoint_registers): New.
6127         * server.c (handle_query): Handle qXfer:statictrace:read.
6128         <qSupported>: Report support for StaticTracepoints, and
6129         qXfer:statictrace:read features.
6130         * server.h (traceframe_read_sdata)
6131         (supply_static_tracepoint_registers): Declare.
6132         * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
6133         (unpack_varlen_hex): Include in IPA build.
6134         * Makefile.in (ustlibs, ustinc): New.
6135         (IPA_OBJS): Add remote-utils-ipa.o.
6136         ($(IPA_LIB)): Link -ldl and -lpthread.
6137         (UST_CFLAGS): New.
6138         (IPAGENT_CFLAGS): Add UST_CFLAGS.
6139         * config.in, configure: Regenerate.
6140
6141 2010-06-20  Ian Lance Taylor  <iant@google.com>
6142             Pedro Alves  <pedro@codesourcery.com>
6143
6144         * linux-x86-low.c (always_true): Delete.
6145         (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
6146         trying to fool the compiler with always_true.
6147
6148 2010-06-20  Pedro Alves  <pedro@codesourcery.com>
6149
6150         * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
6151         conditions in gdbserver.
6152
6153 2010-06-19  Ulrich Weigand  <uweigand@de.ibm.com>
6154
6155         * spu-low.c (spu_read_memory): Wrap around local store limit.
6156         (spu_write_memory): Likewise.
6157
6158 2010-06-15  Pedro Alves  <pedro@codesourcery.com>
6159
6160         * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
6161         (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
6162         LONGEST uses.
6163         * server.h (struct emit_ops): Replace int64_t uses with LONGEST
6164         uses.
6165         * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
6166         uses with LONGEST uses.
6167
6168 2010-06-14  Stan Shebs  <stan@codesourcery.com>
6169             Pedro Alves  <pedro@codesourcery.com>
6170
6171         Bytecode compiler.
6172
6173         * linux-x86-low.c: Include limits.h.
6174         (add_insns): New.
6175         (always_true): New.
6176         (EMIT_ASM): New.
6177         (EMIT_ASM32): New.
6178         (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
6179         (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
6180         (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
6181         (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
6182         (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
6183         (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
6184         (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
6185         (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
6186         (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
6187         (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
6188         (amd64_emit_void_call_2): New.
6189         (amd64_emit_ops): New.
6190         (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
6191         (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
6192         (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
6193         (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
6194         (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
6195         (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
6196         (i386_emit_goto, i386_write_goto_address, i386_emit_const)
6197         (i386_emit_call, i386_emit_reg, i386_emit_pop)
6198         (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
6199         (i386_emit_stack_adjust, i386_emit_int_call_1)
6200         (i386_emit_void_call_2): New.
6201         (i386_emit_ops): New.
6202         (x86_emit_ops): New.
6203         (the_low_target): Install x86_emit_ops.
6204         * server.h (struct emit_ops): New.
6205         (get_raw_reg_func_addr): Declare.
6206         (current_insn_ptr, emit_error): Declare.
6207         * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
6208         (set_trace_state_variable_value): New defines.
6209         (struct ipa_sym_addresses): New fields addr_get_raw_reg,
6210         addr_get_trace_state_variable_value and
6211         addr_set_trace_state_variable_value.
6212         (symbol_list): New fields for get_raw_reg,
6213         get_trace_state_variable_value and set_trace_state_variable_value.
6214         (condfn): New typedef.
6215         (struct tracepoint): New field `compiled_cond'.
6216         (do_action_at_tracepoint): Clear compiled_cond.
6217         (get_trace_state_variable_value, set_trace_state_variable_value):
6218         Export in the IPA.
6219         (condition_true_at_tracepoint): If there's a compiled condition,
6220         run that.
6221         (current_insn_ptr, emit_error): New globals.
6222         (struct bytecode_address): New.
6223         (get_raw_reg_func_addr): New.
6224         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
6225         (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
6226         (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
6227         (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
6228         (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
6229         (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
6230         (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
6231         (compile_tracepoint_condition, compile_bytecodes): New.
6232         * target.h (emit_ops): Forward declare.
6233         (struct target_ops): New field emit_ops.
6234         (target_emit_ops): New.
6235         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
6236         * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
6237         * linux-low.c (linux_emit_ops): New.
6238         (linux_target_ops): Install it.
6239         * linux-low.h (struct linux_target_ops): New field emit_ops.
6240
6241 2010-06-14  Ulrich Weigand  <uweigand@de.ibm.com>
6242
6243         * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
6244         * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
6245
6246 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
6247             Stan Shebs  <stan@codesourcery.com>
6248
6249         * Makefile.in (IPA_DEPFILES, extra_libraries): New.
6250         (all): Depend on $(extra_libraries).
6251         (install-only): Install the IPA.
6252         (IPA_OBJS, IPA_LIB): New.
6253         (clean): Remove the IPA lib.
6254         (IPAGENT_CFLAGS): New.
6255         (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
6256         (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
6257         (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
6258         * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
6259         * configure.ac: Check for atomic builtins support in the compiler.
6260         (IPA_DEPFILES, extra_libraries): Define.
6261         * configure.srv (ipa_obj): Add description.
6262         (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
6263         (i[34567]86-*-linux*): Set ipa_obj.
6264         (x86_64-*-linux*): Set ipa_obj.
6265         * linux-low.c (stabilizing_threads): New.
6266         (supports_fast_tracepoints): New.
6267         (linux_detach): Stabilize threads before detaching.
6268         (handle_tracepoints): Handle internal tracing breakpoints.  Assert
6269         the lwp is either not stabilizing, or is moving out of a jump pad.
6270         (linux_fast_tracepoint_collecting): New.
6271         (maybe_move_out_of_jump_pad): New.
6272         (enqueue_one_deferred_signal): New.
6273         (dequeue_one_deferred_signal): New.
6274         (linux_wait_for_event_1): If moving out of a jump pad, defer
6275         pending signals to later.
6276         (linux_stabilize_threads): New.
6277         (linux_wait_1): Check if threads need moving out of jump pads, and
6278         do it if so.
6279         (stuck_in_jump_pad_callback): New.
6280         (move_out_of_jump_pad_callback): New.
6281         (lwp_running): New.
6282         (linux_resume_one_lwp): Handle moving out of jump pads.
6283         (linux_set_resume_request): Dequeue deferred signals.
6284         (need_step_over_p): Also step over fast tracepoint jumps.
6285         (start_step_over): Also uninsert fast tracepoint jumps.
6286         (finish_step_over): Also reinsert fast tracepoint jumps.
6287         (linux_install_fast_tracepoint_jump): New.
6288         (linux_target_ops): Install linux_stabilize_threads and
6289         linux_install_fast_tracepoint_jump_pad.
6290         * linux-low.h (linux_target_ops) <get_thread_area,
6291         install_fast_tracepoint_jump_pad>: New fields.
6292         (struct lwp_info) <collecting_fast_tracepoint,
6293         pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
6294         (linux_get_thread_area): Declare.
6295         * linux-x86-low.c (jump_insn): New.
6296         (x86_get_thread_area): New.
6297         (append_insns): New.
6298         (push_opcode): New.
6299         (amd64_install_fast_tracepoint_jump_pad): New.
6300         (i386_install_fast_tracepoint_jump_pad): New.
6301         (x86_install_fast_tracepoint_jump_pad): New.
6302         (the_low_target): Install x86_get_thread_area and
6303         x86_install_fast_tracepoint_jump_pad.
6304         * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
6305         (struct fast_tracepoint_jump): New.
6306         (fast_tracepoint_jump_insn): New.
6307         (fast_tracepoint_jump_shadow): New.
6308         (find_fast_tracepoint_jump_at): New.
6309         (fast_tracepoint_jump_here): New.
6310         (delete_fast_tracepoint_jump): New.
6311         (set_fast_tracepoint_jump): New.
6312         (uninsert_fast_tracepoint_jumps_at): New.
6313         (reinsert_fast_tracepoint_jumps_at): New.
6314         (set_breakpoint_at): Use write_inferior_memory.
6315         (uninsert_raw_breakpoint): Use write_inferior_memory.
6316         (check_mem_read): Mask out fast tracepoint jumps.
6317         (check_mem_write): Mask out fast tracepoint jumps.
6318         * mem-break.h (struct fast_tracepoint_jump): Forward declare.
6319         (set_fast_tracepoint_jump): Declare.
6320         (delete_fast_tracepoint_jump)
6321         (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
6322         (reinsert_fast_tracepoint_jumps_at): Declare.
6323         * regcache.c: Don't compile many functions when building the
6324         in-process agent library.
6325         (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6326         the register buffer in the heap.
6327         (free_register_cache): If the register buffer isn't owned by the
6328         regcache, don't free it.
6329         (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6330         pre-existing register caches.
6331         * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6332         type.
6333         (convert_ascii_to_int): : Constify `from' parameter type.
6334         (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6335         a `to_p' pointer to pointer parameter.  If TO_P is NULL, malloc
6336         the needed buffer in-place.
6337         (relocate_instruction): New.
6338         * server.c (handle_query) <qSymbols>: If the target supports
6339         tracepoints, give it a chance of looking up symbols.  Report
6340         support for fast tracepoints.
6341         (handle_status): Stabilize threads.
6342         (process_serial_event): Adjust.
6343         * server.h (struct fast_tracepoint_jump): Forward declare.
6344         (struct process_info) <fast_tracepoint_jumps>: New field.
6345         (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6346         (decode_X_packet, decode_M_packet): Adjust.
6347         (relocate_instruction): Declare.
6348         (in_process_agent_loaded): Declare.
6349         (tracepoint_look_up_symbols): Declare.
6350         (struct fast_tpoint_collect_status): Declare.
6351         (fast_tracepoint_collecting): Declare.
6352         (force_unlock_trace_buffer): Declare.
6353         (handle_tracepoint_bkpts): Declare.
6354         (initialize_low_tracepoint)
6355         (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6356         * target.h (struct target_ops) <stabilize_threads,
6357         install_fast_tracepoint_jump_pad>: New fields.
6358         (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6359         * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6360         [HAVE_STDINT_H]: Include stdint.h.
6361         (trace_debug_1): Rename to ...
6362         (trace_vdebug): ... this.
6363         (trace_debug): Rename to ...
6364         (trace_debug_1): ... this.  Add `level' parameter.
6365         (trace_debug): New.
6366         (ATTR_USED, ATTR_NOINLINE): New.
6367         (IP_AGENT_EXPORT): New.
6368         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6369         (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6370         (about_to_request_buffer_space, trace_buffer_is_full)
6371         (stopping_tracepoint, expr_eval_result, error_tracepoint)
6372         (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6373         (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6374         (traceframe_write_count, traceframes_created)
6375         (trace_state_variables)
6376         New renaming defines.
6377         (struct ipa_sym_addresses): New.
6378         (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6379         (symbol_list): New.
6380         (ipa_sym_addrs): New.
6381         (all_tracepoint_symbols_looked_up): New.
6382         (in_process_agent_loaded): New.
6383         (write_e_ipa_not_loaded): New.
6384         (maybe_write_ipa_not_loaded): New.
6385         (tracepoint_look_up_symbols): New.
6386         (debug_threads) [IN_PROCESS_AGENT]: New.
6387         (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6388         (UNKNOWN_SIDE_EFFECTS): New.
6389         (stop_tracing): New.
6390         (flush_trace_buffer): New.
6391         (stop_tracing_bkpt): New.
6392         (flush_trace_buffer_bkpt): New.
6393         (read_inferior_integer): New.
6394         (read_inferior_uinteger): New.
6395         (read_inferior_data_pointer): New.
6396         (write_inferior_data_pointer): New.
6397         (write_inferior_integer): New.
6398         (write_inferior_uinteger): New.
6399         (struct collect_static_trace_data_action): Delete.
6400         (enum tracepoint_type): New.
6401         (struct tracepoint) <type>: New field `type'.
6402         <actions_str, step_actions, step_actions_str>: Only include in
6403         GDBserver.
6404         <orig_size, obj_addr_on_target, adjusted_insn_addr>
6405         <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6406         (tracepoints): Use IP_AGENT_EXPORT.
6407         (last_tracepoint): Don't include in the IPA.
6408         (stopping_tracepoint): Use IP_AGENT_EXPORT.
6409         (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6410         (alloced_trace_state_variables): New.
6411         (trace_state_variables): Use IP_AGENT_EXPORT.
6412         (traceframe_t): Delete unused variable.
6413         (circular_trace_buffer): Don't include in the IPA.
6414         (trace_buffer_start): Delete.
6415         (struct trace_buffer_control): New.
6416         (trace_buffer_free): Delete.
6417         (struct ipa_trace_buffer_control): New.
6418         (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6419         (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6420         New.
6421         (trace_buffer_ctrl): New.
6422         (TRACE_BUFFER_CTRL_CURR): New.
6423         (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6424         Reimplement as macros.
6425         (trace_buffer_wrap): Delete.
6426         (traceframe_write_count, traceframe_read_count)
6427         (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6428         (struct tracepoint_hit_ctx) <type>: New field.
6429         (struct fast_tracepoint_ctx): New.
6430         (memory_barrier): New.
6431         (cmpxchg): New.
6432         (record_tracepoint_error): Update atomically in the IPA.
6433         (clear_inferior_trace_buffer): New.
6434         (about_to_request_buffer_space): New.
6435         (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6436         updating the same buffer.
6437         (add_tracepoint): Default the tracepoint's type to trap
6438         tracepoint, and orig_size to -1.
6439         (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6440         internal variables.
6441         (create_trace_state_variable): New parameter `gdb'.  Handle it.
6442         (clear_installed_tracepoints): Clear fast tracepoint jumps.
6443         (cmd_qtdp): Handle fast tracepoints.
6444         (cmd_qtdv): Adjust.
6445         (max_jump_pad_size): New.
6446         (gdb_jump_pad_head): New.
6447         (get_jump_space_head): New.
6448         (claim_jump_space): New.
6449         (sort_tracepoints): New.
6450         (MAX_JUMP_SIZE): New.
6451         (cmd_qtstart): Handle fast tracepoints.  Sync tracepoints with the
6452         IPA.
6453         (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6454         support.  Upload fast traceframes, and delete internal IPA
6455         breakpoints.
6456         (stop_tracing_handler): New.
6457         (flush_trace_buffer_handler): New.
6458         (cmd_qtstop): Upload fast tracepoints.
6459         (response_tracepoint): Handle fast tracepoints.
6460         (tracepoint_finished_step): Upload fast traceframes.  Set the
6461         tracepoint hit context's tracepoint type.
6462         (handle_tracepoint_bkpts): New.
6463         (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6464         type.  Add comment about fast tracepoints.
6465         (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6466         non-existing action_str field.
6467         (get_context_regcache): Handle fast tracepoints.
6468         (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6469         to the regcache.
6470         (fast_tracepoint_from_jump_pad_address): New.
6471         (fast_tracepoint_from_ipa_tpoint_address): New.
6472         (collecting_t): New.
6473         (force_unlock_trace_buffer): New.
6474         (fast_tracepoint_collecting): New.
6475         (collecting): New.
6476         (gdb_collect): New.
6477         (write_inferior_data_ptr): New.
6478         (target_tp_heap): New.
6479         (target_malloc): New.
6480         (download_agent_expr): New.
6481         (UALIGN): New.
6482         (download_tracepoints): New.
6483         (download_trace_state_variables): New.
6484         (upload_fast_traceframes): New.
6485         (IPA_FIRST_TRACEFRAME): New.
6486         (IPA_NEXT_TRACEFRAME_1): New.
6487         (IPA_NEXT_TRACEFRAME): New.
6488         [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6489         [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6490         (gdb_jump_pad_buffer_end): New.
6491         [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6492         (initialize_tracepoint): Adjust.
6493         [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6494         buffer.  Initialize the low module.
6495         * utils.c (PREFIX, TOOLNAME): New.
6496         (malloc_failure): Use PREFIX.
6497         (error): In the IPA, an error causes an exit.
6498         (fatal, warning): Use PREFIX.
6499         (internal_error): Use TOOLNAME.
6500         (NUMCELLS): Increase to 10.
6501         * configure, config.in: Regenerate.
6502
6503 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
6504
6505         * server.c (handle_query) <qSupported>: Do two passes over the
6506         qSupported string to avoid nesting strtok.
6507
6508 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
6509
6510         * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6511         (CDEPS): New.
6512         * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping.  Test also
6513         -Wl,--dynamic-list.
6514         * configure: Regenerate.
6515         * proc-service.list: New.
6516
6517 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
6518
6519         * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6520         New comment.
6521
6522 2010-05-26  Ozkan Sezer  <sezeroz@gmail.com>
6523
6524         * gdbreplay.c (remote_open): Check error return from socket() call by
6525         its equality to -1 not by it being negative.
6526         * remote-utils.c (remote_open): Likewise.
6527
6528 2010-05-23  Pedro Alves  <pedro@codesourcery.com>
6529
6530         * config.h: Regenerate.
6531
6532 2010-05-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
6533
6534         * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6535         doesn't provide PTRACE_GET_THREAD_AREA.
6536
6537 2010-05-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
6538
6539         * linux-m68k-low.c: Include <asm/ptrace.h>
6540         (ps_get_thread_area): Implement.
6541
6542 2010-05-03  Doug Evans  <dje@google.com>
6543
6544         * event-loop.c (struct callback_event): New struct.
6545         (callback_list): New global.
6546         (append_callback_event, delete_callback_event): New functions.
6547         (process_callback): New function.
6548         (start_event_loop): Call it.
6549         * remote-utils.c (NOT_SCHEDULED): Define.
6550         (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6551         moved out of readchar.
6552         (readchar): Rewrite.  Call reschedule before returning.
6553         (reset_readchar): New function.
6554         (remote_close): Call it.
6555         (process_remaining, reschedule): New functions.
6556         * server.h (callback_handler_func): New typedef.
6557         (append_callback_event, delete_callback_event): Declare.
6558
6559 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
6560
6561         * proc-service.c (ps_pglobal_lookup): Use
6562         thread_db_look_up_one_symbol.
6563         * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6564         parameter.  Use it instead of all_symbols_looked_up.
6565         * server.h (struct process_info) <all_symbols_looked_up>: Delete
6566         field.
6567         (all_symbols_looked_up): Don't declare.
6568         (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6569         * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6570         field.
6571         (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6572         Set all_symbols_looked_up here.
6573         (thread_db_look_up_one_symbol): New.
6574         (thread_db_get_tls_address): Adjust.
6575         (thread_db_load_search, try_thread_db_load_1): Always allocate the
6576         thread_db object on the heap, and tentatively set it in the
6577         process structure.
6578         (thread_db_init): Don't set all_symbols_looked_up here.
6579         * linux-low.h (thread_db_look_up_one_symbol): Declare.
6580
6581 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
6582
6583         * linux-low.c (linux_kill, linux_detach): Adjust.
6584         (status_pending_p_callback): Remove redundant statement.  Check
6585         for !TARGET_WAITIKIND_IGNORE, instead of
6586         TARGET_WAITKIND_STOPPED.
6587         (handle_tracepoints): Make sure LWP is locked.  Adjust.
6588         (linux_wait_for_event_1): Adjust.
6589         (linux_cancel_breakpoints): New.
6590         (unsuspend_one_lwp): New.
6591         (unsuspend_all_lwps): New.
6592         (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6593         (send_sigstop_callback): Change return type to int, add new
6594         `except' parameter and handle it.
6595         (suspend_and_send_sigstop_callback): New.
6596         (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6597         pass them down.  If SUSPEND, also increment the lwp's suspend
6598         count.
6599         (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6600         (need_step_over_p): Don't consider suspended LWPs.
6601         (start_step_over): Adjust.
6602         (proceed_one_lwp): Change return type to int, add new `except'
6603         parameter and handle it.
6604         (unsuspend_and_proceed_one_lwp): New.
6605         (proceed_all_lwps): Use find_inferior instead of
6606         for_each_inferior.
6607         (unstop_all_lwps): Add `unsuspend' parameter.  If UNSUSPEND, them
6608         also decrement the suspend count of LWPs.  Pass `except' down,
6609         instead of hacking its suspend count.
6610         (linux_pause_all): Add `freeze' parameter.  Adjust.
6611         (linux_unpause_all): New.
6612         (linux_target_ops): Install linux_unpause_all.
6613         * server.c (handle_status): Adjust.
6614         * target.h (struct target_ops): New fields `unpause_all' and
6615         `cancel_breakpoints'.  Add new parameter to `pause_all'.
6616         (pause_all): Add new `freeze' parameter.
6617         (unpause_all): New.
6618         (cancel_breakpoints): New.
6619         * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6620         cancel breakpoints.
6621         (cmd_qtstart): Pause threads.
6622         (stop_tracing): Pause threads, and cancel breakpoints.
6623         * win32-low.c (win32_target_ops): Adjust.
6624
6625 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
6626
6627         * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6628         the inferior right away from here...
6629         (linux_wait_1): ... to here, and adjust to check the thread's
6630         last_resume_kind instead of the lwp's step or stop_expected flags.
6631
6632 2010-05-02  Pedro Alves  <pedro@codesourcery.com>
6633
6634         * README: Use consistent `GDB' and `GDBserver' spellings.
6635
6636 2010-05-02  Pedro Alves  <pedro@codesourcery.com>
6637
6638         * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6639         (linux_kill): Stop all lwps here.  Don't delete the main lwp here.
6640         (linux_detach_one_lwp): Assume the lwp is stopped.
6641         (any_thread_of): Delete.
6642         (linux_detach): Stop all lwps here.  Don't blindly delete all
6643         breakpoints.
6644         (delete_lwp_callback): New.
6645         (linux_mourn): Delete all lwps of the process that is gone.
6646         (linux_wait_1): Don't delete the last lwp of the process here.
6647         * mem-break.h (mark_breakpoints_out): Declare.
6648         * mem-break.c (mark_breakpoints_out): New.
6649         (free_all_breakpoints): Use it.
6650         * server.c (handle_target_event): If the process is gone, mark
6651         breakpoints out.
6652         * thread-db.c (struct thread_db) <create_bp>: New field.
6653         (thread_db_enable_reporting): Fix prototype.  Store a thread event
6654         breakpoint reference in the thread_db struct.
6655         (thread_db_load_search): Clear the thread_db object.
6656         (try_thread_db_load_1): Ditto.
6657         (switch_to_process): New.
6658         (disable_thread_event_reporting): Use it.
6659         (remove_thread_event_breakpoints): New.
6660         (thread_db_detach, thread_db_mourn): Use it.
6661
6662 2010-05-01  Pedro Alves  <pedro@codesourcery.com>
6663
6664         * linux-low.c (linux_enable_event_reporting): New.
6665         (linux_wait_for_event_1, handle_extended_wait): Use it.
6666
6667 2010-04-30  Pedro Alves  <pedro@codesourcery.com>
6668
6669         * linux-low.c (linux_kill_one_lwp, linux_kill)
6670         (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6671         (send_sigstop): Take an lwp_info as parameter instead.  Queue a
6672         SIGSTOP even if the LWP is stopped.
6673         (send_sigstop_callback): New.
6674         (stop_all_lwps): Use send_sigstop_callback instead.
6675         (linux_resume_one_thread): Adjust.
6676         (proceed_one_lwp): Still proceed an LWP that the client has
6677         requested to stop, if we haven't reported it as stopped yet.  Make
6678         sure that LWPs the client want stopped, have a pending SIGSTOP.
6679
6680 2010-04-26  Doug Evans  <dje@google.com>
6681
6682         * server.c (handle_general_set): Make static.
6683
6684         * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6685         Print received char after testing for error/eof instead of before.
6686         (input_interrupt): Tweak comment.
6687
6688 2010-04-23  Doug Evans  <dje@google.com>
6689
6690         * server.c (start_inferior): Print inferior argv if --debug.
6691
6692 2010-04-21  Aleksandar Ristovski  <aristovski@qnx.com>
6693
6694         * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6695         * nto-x86-low.c: Include server.h
6696
6697 2010-04-20  Pierre Muller  <muller@ics.u-strasbg.fr>
6698
6699         * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6700         be consistent with other sources of this directory.
6701         (init_registers_amd64): Correct name of source file of this function
6702         in the comment.
6703
6704 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
6705
6706         * configure.srv (x86_64-*-mingw*): New configuration for Windows
6707         64-bit executables.
6708
6709 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
6710
6711         * win32-i386-low.c: Add 64-bit support.
6712         (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6713         (init_registers_amd64): Declare.
6714         (mappings): Add 64-bit version of array.
6715         (init_windows_x86): New function.
6716         (the_low_target): Change init_arch field to init_windows_x86.
6717
6718 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
6719
6720         * win32-low.c: Adapt to support also 64-bit architecture.
6721         (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6722         (get_image_name): Use SIZE_T type for local variable `done'.
6723         (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6724         (toolhelp_get_dll_name): Idem.
6725         (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6726         Use uintptr_t typecast to avoid warning.
6727         (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6728         (handle_exception): Use phex_nz to avoid warning.
6729         (win32_wait): Remove unused local variable `process'.
6730
6731 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
6732
6733         * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6734         `amd64-avx.o'.
6735
6736 2010-04-17  Pierre Muller  <muller@ics.u-strasbg.fr>
6737
6738         * configure.ac: Use `ws2_32' library for srv_mingw.
6739         * configure: Regenerate.
6740         * gdbreplay.c: Include winsock2.h instead of winsock.h.
6741         * remote-utils.c: Likewise.
6742
6743 2010-04-17  H.J. Lu  <hongjiu.lu@intel.com>
6744
6745         * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6746         if __x86_64__ is defined.
6747
6748 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
6749
6750         * configure: Regenerate.
6751
6752 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
6753
6754         * server.c (handle_query): Handle 'qGetTIBAddr' query.
6755         * target.h (target_ops): New get_tib_address field.
6756         * win32-low.h (win32_thread_info): Add thread_local_base field.
6757         * win32-low.c (child_add_thread): Add tlb argument.
6758         Set thread_local_base field to TLB.
6759         (get_child_debug_event): Adapt to child_add_thread change.
6760         (win32_get_tib_address): New function.
6761         (win32_target_ops): Set get_tib_address field to
6762         win32_get_tib_address.
6763         * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6764
6765 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
6766
6767         * linux-low.c (linux_mourn): Also remove the process.
6768         * server.c (handle_target_event): Don't remove the process here.
6769         * nto-low.c (nto_mourn): New.
6770         (nto_target_ops): Install it.
6771         * spu-low.c (spu_mourn): New.
6772         (spu_target_ops): Install it.
6773         * win32-low.c (win32_mourn): New.
6774         (win32_target_ops): Install it.
6775
6776 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
6777
6778         * server.h (buffer_xml_printf): Remove redundant `;'.
6779
6780 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
6781
6782         * regcache.c (set_register_cache): Invalidate regcaches before
6783         changing the register cache layout.
6784         (regcache_invalidate_one): Allow a NULL regcache.
6785         * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6786         regcaches before changing the register cache layout or the target
6787         regsets.
6788
6789 2010-04-12  H.J. Lu  <hongjiu.lu@intel.com>
6790
6791         * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6792         variable warning on Linux/x86-64.
6793
6794 2010-04-11  Pedro Alves  <pedro@codesourcery.com>
6795
6796         GDBserver disconnected tracing support.
6797
6798         * linux-low.c (linux_remove_process): Delete.
6799         (add_lwp): Don't set last_resume_kind here.
6800         (linux_kill): Use `mourn'.
6801         (linux_detach): Use `thread_db_detach', and `mourn'.
6802         (linux_mourn): New.
6803         (linux_attach_lwp_1): Adjust comment.
6804         (linux_attach): last_resume_kind moved the thread_info; adjust.
6805         (status_pending_p_callback): Adjust.
6806         (linux_wait_for_event_1): Adjust.
6807         (count_events_callback, select_singlestep_lwp_callback)
6808         (select_event_lwp_callback, cancel_breakpoints_callback)
6809         (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6810         (proceed_one_lwp): Adjust.
6811         (linux_async): Add debug output.
6812         (linux_thread_stopped): New.
6813         (linux_pause_all): New.
6814         (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6815         linux_pause_all.
6816         * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6817         (thread_db_free): Delete declaration.
6818         (thread_db_detach, thread_db_mourn): Declare.
6819         * thread-db.c (thread_db_init): Use thread_db_mourn.
6820         (thread_db_free): Delete, split in two.
6821         (disable_thread_event_reporting): New.
6822         (thread_db_detach): New.
6823         (thread_db_mourn): New.
6824
6825         * server.h (struct thread_info) <last_resume_kind>: New field.
6826         <attached>: Add comment.
6827         <gdb_detached>: New field.
6828         (handler_func): Change return type to int.
6829         (handle_serial_event, handle_target_event): Ditto.
6830         (gdb_connected): Declare.
6831         (tracing): Delete.
6832         (disconnected_tracing): Declare.
6833         (stop_tracing): Declare.
6834
6835         * server.c (handle_query) <qSupported>: Report support for
6836         disconnected tracing.
6837         (queue_stop_reply_callback): Account for running threads.
6838         (gdb_wants_thread_stopped): New.
6839         (gdb_wants_all_threads_stopped): New.
6840         (gdb_reattached_process): New.
6841         (handle_status): Clear the `gdb_detached' flag of all processes.
6842         In all-stop, stop all threads.
6843         (main): Be sure to leave tfind mode.  Handle disconnected tracing.
6844         (process_serial_event): If the remote connection breaks, or if an
6845         exit was forced with "monitor exit", force an event loop exit.
6846         Handle disconnected tracing on detach.
6847         (handle_serial_event): Adjust.
6848         (handle_target_event): If GDB isn't connected, forward events back
6849         to the inferior, unless the last process exited, in which case,
6850         exit gdbserver.  Adjust interface.
6851
6852         * remote-utils.c (remote_open): Don't block in accept.  Instead
6853         register an event loop source on the listen socket file
6854         descriptor.  Refactor bits into ...
6855         (listen_desc): ... this new global.
6856         (gdb_connected): ... this new function.
6857         (enable_async_notification): ... this new function.
6858         (handle_accept_event): ... this new function.
6859         (remote_close): Clear remote_desc.
6860
6861         * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6862
6863         * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6864         New fields.
6865         (mourn_inferior): Define.
6866         (target_process_qsupported): Avoid the dangling else problem.
6867         (thread_stopped): Define.
6868         (pause_all): Define.
6869         (target_waitstatus_to_string): Declare.
6870         * target.c (target_waitstatus_to_string): New.
6871
6872         * tracepoint.c (tracing): Make extern.
6873         (disconnected_tracing): New.
6874         (stop_tracing): Make extern.  Handle tracing stops due to GDB
6875         disconnecting.
6876         (cmd_qtdisconnected): New.
6877         (cmd_qtstatus): Report disconnected tracing status in trace reply.
6878         (handle_tracepoint_general_set): Handle QTDisconnected.
6879
6880         * event-loop.c (event_handler_func): Change return type to int.
6881         (process_event): Bail out if the event handler wants the event
6882         loop to stop.
6883         (handle_file_event): Ditto.
6884         (start_event_loop): Bail out if the event handler wants the event
6885         loop to stop.
6886
6887         * nto-low.c (nto_target_ops): Adjust.
6888         * spu-low.c (spu_wait): Don't remove the process here.
6889         (spu_target_ops): Adjust.
6890         * win32-low.c (win32_wait): Don't remove the process here.
6891         (win32_target_ops): Adjust.
6892
6893 2010-04-11  Pedro Alves  <pedro@codesourcery.com>
6894
6895         * regcache.c (realloc_register_cache): Invalidate inferior's
6896         regcache before recreating it.
6897
6898 2010-04-09  Pedro Alves  <pedro@codesourcery.com>
6899
6900         * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6901
6902 2010-04-09  Stan Shebs  <stan@codesourcery.com>
6903             Pedro Alves  <pedro@codesourcery.com>
6904
6905         * server.h (LONGEST): New.
6906         (struct thread_info) <while_stepping>: New field.
6907         (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6908         Declare.
6909         (initialize_tracepoint, handle_tracepoint_general_set)
6910         (handle_tracepoint_query, tracepoint_finished_step)
6911         (tracepoint_was_hit, release_while_stepping_state_list):
6912         (current_traceframe): Declare.
6913         * server.c (handle_general_set): Handle tracepoint packets.
6914         (read_memory): New.
6915         (write_memory): New.
6916         (handle_search_memory_1): Use read_memory.
6917         (handle_query): Report support for conditional tracepoints, trace
6918         state variables, and tracepoint sources.  Handle tracepoint
6919         queries.
6920         (main): Initialize the tracepoints module.
6921         (process_serial_event): Handle traceframe reads/writes.
6922
6923         * linux-low.c (handle_tracepoints): New.
6924         (linux_wait_1): Call it.
6925         (linux_resume_one_lwp): Handle while-stepping.
6926         (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6927         (linux_target_ops): Install them.
6928         * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6929         New field.
6930         * linux-x86-low.c (x86_supports_tracepoints): New.
6931         (the_low_target). Install it.
6932
6933         * mem-break.h (delete_breakpoint): Declare.
6934         * mem-break.c (delete_breakpoint): Make external.
6935
6936         * target.h (struct target_ops): Add `supports_tracepoints',
6937         `read_pc', and `write_pc' fields.
6938         (target_supports_tracepoints): Define.
6939         * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
6940         (phex_nz): New.
6941
6942         * regcache.h (struct regcache) <registers_owned>: New field.
6943         (init_register_cache, regcache_cpy): Declare.
6944         (regcache_read_pc, regcache_write_pc): Declare.
6945         (register_cache_size): Declare.
6946         (supply_regblock): Declare.
6947         * regcache.c (init_register_cache): New.
6948         (new_register_cache): Use it.
6949         (regcache_cpy): New.
6950         (register_cache_size): New.
6951         (supply_regblock): New.
6952         (regcache_read_pc, regcache_write_pc): New.
6953
6954         * tracepoint.c: New.
6955
6956         * Makefile.in (OBS): Add tracepoint.o.
6957         (tracepoint.o): New rule.
6958
6959 2010-04-08  H.J. Lu  <hongjiu.lu@intel.com>
6960
6961         * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
6962         (i386-mmx.o): New.
6963         (i386-mmx.c): Likewise.
6964         (i386-mmx-linux.o): Likewise.
6965         (i386-mmx-linux.c): Likewise.
6966
6967         * configure.srv (srv_i386_regobj): Add i386-mmx.o.
6968         (srv_i386_linux_regobj): Add i386-mmx-linux.o.
6969         (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
6970         (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
6971
6972         * linux-x86-low.c (init_registers_i386_mmx_linux): New.
6973         (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
6974         and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
6975
6976 2010-04-07  H.J. Lu  <hongjiu.lu@intel.com>
6977
6978         * Makefile.in (clean): Updated.
6979         (i386-avx.o): New.
6980         (i386-avx.c): Likewise.
6981         (i386-avx-linux.o): Likewise.
6982         (i386-avx-linux.c): Likewise.
6983         (amd64-avx.o): Likewise.
6984         (amd64-avx.c): Likewise.
6985         (amd64-avx-linux.o): Likewise.
6986         (amd64-avx-linux.c): Likewise.
6987
6988         * configure.srv (srv_i386_regobj): Add i386-avx.o.
6989         (srv_i386_linux_regobj): Add i386-avx-linux.o.
6990         (srv_amd64_regobj): Add amd64-avx.o.
6991         (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
6992         (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
6993         (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
6994         (srv_i386_xmlfiles): Add i386/i386-avx.xml.
6995         (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
6996         (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
6997         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
6998
6999         * i387-fp.c: Include "i386-xstate.h".
7000         (i387_xsave): New.
7001         (i387_cache_to_xsave): Likewise.
7002         (i387_xsave_to_cache): Likewise.
7003         (x86_xcr0): Likewise.
7004
7005         * i387-fp.h (i387_cache_to_xsave): Likewise.
7006         (i387_xsave_to_cache): Likewise.
7007         (x86_xcr0): Likewise.
7008
7009         * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
7010         * linux-crisv32-low.c (target_regsets): Likewise.
7011         * linux-m68k-low.c (target_regsets): Likewise.
7012         * linux-mips-low.c (target_regsets): Likewise.
7013         * linux-ppc-low.c (target_regsets): Likewise.
7014         * linux-s390-low.c (target_regsets): Likewise.
7015         * linux-sh-low.c (target_regsets): Likewise.
7016         * linux-sparc-low.c (target_regsets): Likewise.
7017         * linux-xtensa-low.c (target_regsets): Likewise.
7018
7019         * linux-low.c: Include <sys/uio.h>.
7020         (regsets_fetch_inferior_registers): Support nt_type.
7021         (regsets_store_inferior_registers): Likewise.
7022         (linux_process_qsupported): New.
7023         (linux_target_ops): Add linux_process_qsupported.
7024
7025         * linux-low.h (regset_info): Add nt_type.
7026         (linux_target_ops): Add process_qsupported.
7027
7028         * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
7029         and <sys/uio.h>.
7030         (init_registers_i386_avx_linux): New.
7031         (init_registers_amd64_avx_linux): Likewise.
7032         (xmltarget_i386_linux_no_xml): Likewise.
7033         (xmltarget_amd64_linux_no_xml): Likewise.
7034         (PTRACE_GETREGSET): Likewise.
7035         (PTRACE_SETREGSET): Likewise.
7036         (x86_fill_xstateregset): Likewise.
7037         (x86_store_xstateregset): Likewise.
7038         (use_xml): Likewise.
7039         (x86_linux_update_xmltarget): Likewise.
7040         (x86_linux_process_qsupported): Likewise.
7041         (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
7042         (x86_arch_setup): Don't call init_registers_amd64_linux nor
7043         init_registers_i386_linux here.  Call
7044         x86_linux_update_xmltarget.
7045         (the_low_target): Add x86_linux_process_qsupported.
7046
7047         * server.c (handle_query): Call target_process_qsupported.
7048
7049         * target.h (target_ops): Add process_qsupported.
7050         (target_process_qsupported): New.
7051
7052 2010-04-03  Pedro Alves  <pedro@codesourcery.com>
7053
7054         * inferiors.c (add_thread): Set last_status kind to
7055         TARGET_WAITKIND_IGNORE.
7056         * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
7057         fetch.  Use ptid_of.  Avoid unnecessary get_lwp_thread calls.
7058         (linux_wait_1): Move `thread' local definition to block that uses
7059         it.  Don't NULL initialize `event_child'.
7060         (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
7061         Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
7062         * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
7063
7064 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
7065
7066         * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
7067         an extended waitstatus, or by a watchpoint.
7068         (cancel_breakpoints_callback): Don't cancel a breakpoint if the
7069         thread was stepping or has been stopped by a watchpoint.
7070
7071 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
7072
7073         * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
7074         (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
7075         of another, then delete the previous, and validate all
7076         breakpoints.
7077         (validate_inserted_breakpoint): New.
7078         (delete_disabled_breakpoints): New.
7079         (validate_breakpoints): New.
7080         (check_mem_read): Validate breakpoints before trusting their
7081         shadow.  Delete disabled breakpoints.
7082         (check_mem_write): Validate breakpoints before trusting they
7083         should be inserted.  Delete disabled breakpoints.
7084         * mem-break.h (validate_breakpoints):
7085         * server.c (handle_query): Validate breakpoints when we see a
7086         qSymbol query.
7087
7088 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
7089
7090         * linux-low.c (linux_wait_1): Avoid setting need_step_over is
7091         there's a GDB breakpoint at stop_pc.  Always report a trap to GDB
7092         if we could tell there's a GDB breakpoint at stop_pc.
7093         (need_step_over_p): Don't do a step over if we find a GDB
7094         breakpoint at the resume PC.
7095
7096         * mem-break.c (struct raw_breakpoint): New.
7097         (enum bkpt_type): New type `gdb_breakpoint'.
7098         (struct breakpoint): Delete the `PC', `old_data' and `inserted'
7099         fields.  New field `raw'.
7100         (find_raw_breakpoint_at): New.
7101         (set_raw_breakpoint_at): Handle refcounting.  Create a raw
7102         breakpoint instead.
7103         (set_breakpoint_at): Adjust.
7104         (delete_raw_breakpoint): New.
7105         (release_breakpoint): New.
7106         (delete_breakpoint): Rename to...
7107         (delete_breakpoint_1): ... this.  Add proc parameter.  Use
7108         release_breakpoint.  Return ENOENT.
7109         (delete_breakpoint): Reimplement.
7110         (find_breakpoint_at): Delete.
7111         (find_gdb_breakpoint_at): New.
7112         (delete_breakpoint_at): Delete.
7113         (set_gdb_breakpoint_at): New.
7114         (delete_gdb_breakpoint_at): New.
7115         (gdb_breakpoint_here): New.
7116         (set_reinsert_breakpoint): Use release_breakpoint.
7117         (uninsert_breakpoint): Rename to ...
7118         (uninsert_raw_breakpoint): ... this.
7119         (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
7120         (reinsert_raw_breakpoint): Change parameter type to
7121         raw_breakpoint.
7122         (reinsert_breakpoints_at): Adjust to handle raw breakpoints
7123         instead.
7124         (check_breakpoints): Adjust.  Use release_breakpoint.
7125         (breakpoint_here): Rewrite using find_raw_breakpoint_at.
7126         (breakpoint_inserted_here): Ditto.
7127         (check_mem_read): Adjust to iterate over raw breakpoints instead.
7128         Don't trust the breakpoint's shadow if it is not inserted.
7129         (check_mem_write): Adjust to iterate over raw breakpoints instead.
7130         (delete_all_breakpoints): Adjust.
7131         (free_all_breakpoints): Mark all breakpoints as uninserted, and
7132         use delete_breakpoint_1.
7133
7134         * mem-break.h (breakpoints_supported): Delete declaration.
7135         (set_gdb_breakpoint_at): Declare.
7136         (gdb_breakpoint_here): Declare.
7137         (delete_breakpoint_at): Delete.
7138         (delete_gdb_breakpoint_at): Declare.
7139
7140         * server.h (struct raw_breakpoint): Forward declare.
7141         (struct process_info): New field `raw_breakpoints'.
7142
7143         * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
7144         breakpoints.
7145
7146 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
7147
7148         * linux-low.c (status_pending_p_callback): Fix comment.
7149         (linux_wait_for_event_1): Move most of the internal breakpoint
7150         handling from here...
7151         (linux_wait_1): ... to here.
7152         (count_events_callback): New.
7153         (select_singlestep_lwp_callback): New.
7154         (select_event_lwp_callback): New.
7155         (cancel_breakpoints_callback): New.
7156         (select_event_lwp): New.
7157         (linux_wait_1): Simplify internal breakpoint handling.  Give equal
7158         priority to all LWPs that have had events that should be reported
7159         to the client.  Cancel breakpoints when about to reporting the
7160         event to the client, not while stopping lwps.  No longer cancel
7161         finished single-steps here.
7162         (cancel_finished_single_step): Delete.
7163         (cancel_finished_single_steps): Delete.
7164
7165 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
7166
7167         * mem-break.c (enum bkpt_type): New.
7168         (struct breakpoint): New field `type'.
7169         (set_breakpoint_at): Change return type to struct breakpoint
7170         pointer.  Set type to `other_breakpoint' by default.
7171         (delete_breakpoint): Rewrite, supporting more than one breakpoint
7172         in the breakpoint list.
7173         (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
7174         (reinsert_breakpoint): Rename to ...
7175         (reinsert_raw_breakpoint): ... this.
7176         (reinsert_breakpoints_at): Adjust.
7177         * mem-break.h (struct breakpoint): Declare.
7178         (set_breakpoint_at): Change return type to struct breakpoint
7179         pointer.
7180
7181 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
7182
7183         * server.c (handle_query): Assign, not compare.
7184
7185 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
7186
7187         Teach linux gdbserver to step-over-breakpoints.
7188
7189         * linux-low.c (can_hardware_single_step): New.
7190         (supports_breakpoints): New.
7191         (handle_extended_wait): If stopping threads, read the stop pc of
7192         the new cloned LWP.
7193         (get_pc): New.
7194         (get_stop_pc): Add `lwp' parameter.  Handle it.  Bail out if the
7195         low target doesn't support retrieving the PC.
7196         (add_lwp): Set last_resume_kind to resume_continue.
7197         (linux_attach_lwp_1): Adjust comments.  Always set stop_expected.
7198         (linux_attach): Don't clear stop_expected.  Set the lwp's
7199         last_resume_kind to resume_stop.
7200         (linux_detach_one_lwp): Don't check for removed breakpoints.
7201         (check_removed_breakpoint): Delete.
7202         (status_pending_p): Rename to ...
7203         (status_pending_p_callback): ... this.  Don't check for removed
7204         breakpoints.  Don't consider threads that are stopped from GDB's
7205         perspective.
7206         (linux_wait_for_lwp): Always read the stop_pc here.
7207         (cancel_breakpoint): New.
7208         (step_over_bkpt): New global.
7209         (linux_wait_for_event_1): Implement stepping over breakpoints.
7210         (gdb_wants_lwp_stopped): New.
7211         (gdb_wants_all_stopped): New.
7212         (linux_wait_1): Tag threads as gdb-wants-stopped.  Cancel finished
7213         single-step traps here.  Store the thread's last reported target
7214         wait status.
7215         (send_sigstop): Don't clear stop_expected.  Always set it,
7216         instead.
7217         (mark_lwp_dead): Remove reference to pending_is_breakpoint.
7218         (cancel_finished_single_step): New.
7219         (cancel_finished_single_steps): New.
7220         (wait_for_sigstop): Don't cancel finished single-step traps here.
7221         (linux_resume_one_lwp): Don't check for removed breakpoints.
7222         Don't set `step' on non-hardware step archs.
7223         (linux_set_resume_request): Ignore resume_stop requests if already
7224         stopping or stopped.  Set the lwp's last_resume_kind.
7225         (resume_status_pending_p): Don't check for removed breakpoints.
7226         (need_step_over_p): New.
7227         (start_step_over): New.
7228         (finish_step_over): New.
7229         (linux_resume_one_thread): Always queue a sigstop for resume_stop
7230         requests.  Clear the thread's last reported target waitstatus.
7231         Don't use the `suspended' flag.  Don't consider pending breakpoints.
7232         (linux_resume): Start a step-over if necessary.
7233         (proceed_one_lwp): New.
7234         (proceed_all_lwps): New.
7235         (unstop_all_lwps): New.
7236         * linux-low.h (struct lwp_info): Rewrite comment for the
7237         `suspended' flag.  Add the `stop_pc' field.  Delete the
7238         `pending_stop_pc' field.  Tweak the `stepping' flag's comment.
7239         Add `'last_resume_kind' and `need_step_over' fields.
7240         * inferiors.c (struct thread_info): Delete, moved elsewhere.
7241         * mem-break.c (struct breakpoint): Delete `reinserting' flag.
7242         Delete `breakpoint_to_reinsert' field.  New flag `inserted'.
7243         (set_raw_breakpoint_at): New.
7244         (set_breakpoint_at): Rewrite to use it.
7245         (reinsert_breakpoint_handler): Delete.
7246         (set_reinsert_breakpoint): New.
7247         (reinsert_breakpoint_by_bp): Delete.
7248         (delete_reinsert_breakpoints): New.
7249         (uninsert_breakpoint): Rewrite.
7250         (uninsert_breakpoints_at): New.
7251         (reinsert_breakpoint): Rewrite.
7252         (reinsert_breakpoints_at): New.
7253         (check_breakpoints): Rewrite.
7254         (breakpoint_here): New.
7255         (breakpoint_inserted_here): New.
7256         (check_mem_read): Adjust.
7257         * mem-break.h (breakpoints_supported, breakpoint_here)
7258         (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
7259         (reinsert_breakpoint_by_bp): Delete declaration.
7260         (delete_reinsert_breakpoints): Declare.
7261         (reinsert_breakpoint): Delete declaration.
7262         (reinsert_breakpoints_at): Declare.
7263         (uninsert_breakpoint): Delete declaration.
7264         (uninsert_breakpoints_at): Declare.
7265         (check_breakpoints): Adjust prototype.
7266         * server.h: Adjust include order.
7267         (struct thread_info): Declare here.  Add a `last_status' field.
7268
7269 2010-03-23  Michael Snyder  <msnyder@vmware.com>
7270
7271         * server.c (crc32): New function.
7272         (handle_query): Add handling for 'qCRC:' request.
7273
7274 2010-03-23  Pedro Alves  <pedro@codesourcery.com>
7275
7276         * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
7277         lwp had been stopped by a watchpoint.
7278
7279 2010-03-16  Pedro Alves  <pedro@codesourcery.com>
7280
7281         * server.h (internal_error): Declare.
7282         (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
7283         * utils.c (internal_error): New function.
7284
7285 2010-03-15  Andreas Schwab  <schwab@redhat.com>
7286
7287         * configure.srv: Fix typo setting srv_regobj.
7288
7289 2010-03-15  Pedro Alves  <pedro@codesourcery.com>
7290
7291         * linux-low.c (fetch_register): Avoid passing a non string literal
7292         format to `error'.
7293         (usr_store_inferior_registers): Ditto.
7294
7295 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
7296
7297         * linux-low.c (linux_write_memory): Bail out early if peeking
7298         memory failed.
7299
7300 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
7301
7302         * linux-low.h (struct lwp_info): New fields
7303         `stopped_by_watchpoint' and `stopped_data_address'.
7304         * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
7305         here, and cache them in the lwp object.
7306         (wait_for_sigstop): Check stopped_by_watchpoint lwp field
7307         directly.
7308         (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
7309         field.
7310         (linux_stopped_by_watchpoint): Rewrite.
7311         (linux_stopped_data_address): Rewrite.
7312
7313 2010-03-06  Simo Melenius  <simo.melenius@iki.fi>
7314
7315         * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
7316         switching the current inferior, not before.
7317
7318 2010-03-01  H.J. Lu  <hongjiu.lu@intel.com>
7319
7320         * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
7321         reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
7322         i386-linux.c and amd64-linux.c.
7323         (reg-i386.o): Removed.
7324         (reg-i386.c): Likewise.
7325         (reg-i386-linux.o): Likewise.
7326         (reg-i386-linux.c): Likewise.
7327         (reg-x86-64.o): Likewise.
7328         (reg-x86-64.c): Likewise.
7329         (reg-x86-64-linux.o): Likewise.
7330         (reg-x86-64-linux.c): Likewise.
7331         (i386.o): New.
7332         (i386.c): Likewise.
7333         (i386-linux.o): Likewise.
7334         (i386-linux.c): Likewise.
7335         (amd64.o): Likewise.
7336         (amd64.c): Likewise.
7337         (amd64-linux.o): Likewise.
7338         (amd64-linux.c): Likewise.
7339
7340         * configure.srv (srv_i386_regobj): New.
7341         (srv_i386_linux_regobj): Likewise.
7342         (srv_amd64_regobj): Likewise.
7343         (srv_amd64_linux_regobj): Likewise.
7344         (srv_i386_32bit_xmlfiles): Likewise.
7345         (srv_i386_64bit_xmlfiles): Likewise.
7346         (srv_i386_xmlfiles): Likewise.
7347         (srv_amd64_xmlfiles): Likewise.
7348         (srv_i386_linux_xmlfiles): Likewise.
7349         (srv_amd64_linux_xmlfiles): Likewise.
7350         (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj.  Set
7351         srv_xmlfiles to $srv_i386_xmlfiles.
7352         (i[34567]86-*-mingw32ce*): Likewise.
7353         (i[34567]86-*-mingw*): Likewise.
7354         (i[34567]86-*-nto*): Likewise.
7355         (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7356         and $srv_amd64_linux_regobj.  Set srv_xmlfiles to
7357         $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7358         (x86_64-*-linux*): Likewise.
7359
7360         * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7361         (init_registers_amd64_linux): New.
7362         (x86_arch_setup): Replace init_registers_x86_64_linux with
7363         init_registers_amd64_linux.
7364
7365 2010-02-23  Maxim Kuvyrkov  <maxim@codesourcery.com>
7366
7367         * configure.ac: Check for libdl.  If it is not available link against
7368         static libthread_db.
7369         * configure: Regenerate.
7370
7371 2010-02-22  Pedro Alves  <pedro@codesourcery.com>
7372
7373         PR9605
7374
7375         * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7376         handing a read watchpoint.
7377         (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7378
7379 2010-02-12  Doug Evans  <dje@google.com>
7380
7381         * linux-low.c (linux_supports_tracefork_flag): Document.
7382         (linux_look_up_symbols): Add comment.
7383
7384 2010-02-03  H.J. Lu  <hongjiu.lu@intel.com>
7385
7386         * regcache.c (supply_register): Clear regcache if buf is NULL.
7387
7388 2010-02-02  Nicolas Roche  <roche@sourceware.org>
7389             Joel Brobecker  <brobecker@adacore.com>
7390
7391         * inferiors.c (find_inferior): Add function documentation.
7392         (unloaded_dll): Handle the case where the unloaded dll has not
7393         been previously registered in the dll list.
7394
7395 2010-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
7396
7397         * linux-arm-low.c (thumb_breakpoint_len): Delete.
7398         (thumb2_breakpoint): New.
7399         (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7400
7401 2010-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
7402
7403         * linux-low.c (get_stop_pc): Check for SIGTRAP.
7404         (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7405         breakpoints.
7406
7407 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
7408
7409         * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7410
7411 2010-01-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
7412
7413         * linux-s390-low.c (s390_collect_ptrace_register)
7414         (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7415
7416 2010-01-21  Doug Evans  <dje@google.com>
7417
7418         * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7419         (PTRACE_ARG4_TYPE): New macro.
7420         (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7421         (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7422         (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7423         (usr_store_inferior_registers): Ditto.
7424         (linux_read_memory, linux_write_memory): Ditto.
7425         (linux_test_for_tracefork): Ditto.
7426
7427         * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7428         Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7429
7430 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
7431
7432         * proc-service.c (ps_lgetregs): Don't refetch registers from the
7433         target.
7434
7435 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
7436
7437         * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7438         prototype to take a regcache.  Adjust.
7439
7440 2010-01-20  Pedro Alves  <pedro@codesourcery.com>
7441
7442         * regcache.h (struct thread_info): Forward declare.
7443         (struct regcache): New.
7444         (new_register_cache): Adjust prototype.
7445         (get_thread_regcache): Declare.
7446         (free_register_cache): Adjust prototype.
7447         (registers_to_string, registers_from_string): Ditto.
7448         (supply_register, supply_register_by_name, collect_register)
7449         (collect_register_as_string, collect_register_by_name): Ditto.
7450         * regcache.c (struct inferior_regcache_data): Delete.
7451         (get_regcache): Rename to ...
7452         (get_thread_regcache): ... this.  Adjust.  Switch inferior before
7453         fetching registers.
7454         (regcache_invalidate_one): Adjust.
7455         (regcache_invalidate): Fix prototype.
7456         (new_register_cache): Return the new register cache.
7457         (free_register_cache): Change prototype.
7458         (realloc_register_cache): Adjust.
7459         (registers_to_string): Change prototype to take a regcache.  Adjust.
7460         (registers_from_string): Ditto.
7461         (register_data): Ditto.
7462         (supply_register): Ditto.
7463         (supply_register_by_name): Ditto.
7464         (collect_register): Ditto.
7465         (collect_register_as_string): Ditto.
7466         (collect_register_by_name): Ditto.
7467         * server.c (process_serial_event): Adjust.
7468         * linux-low.h (regset_fill_func, regset_store_func): Change
7469         prototype.
7470         (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7471         Change prototype.
7472         * linux-low.c (get_stop_pc): Adjust.
7473         (check_removed_breakpoint): Adjust.
7474         (linux_wait_for_event): Adjust.
7475         (linux_resume_one_lwp): Adjust.
7476         (fetch_register): Add regcache parameter.  Adjust.
7477         (usr_store_inferior_registers): Ditto.
7478         (regsets_fetch_inferior_registers): Ditto.
7479         (regsets_store_inferior_registers): Ditto.
7480         (linux_fetch_registers, linux_store_registers): Ditto.
7481         * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7482         regcache.  Adjust.
7483         (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7484         Ditto.
7485         * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7486         prototype to take a regcache.
7487         (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7488         * remote-utils.c (convert_ascii_to_int, outreg)
7489         (prepare_resume_reply): Change prototype to take a regcache.
7490         Adjust.
7491         * target.h (struct target_ops) <fetch_registers, store_registers>:
7492         Change prototype to take a regcache.
7493         (fetch_inferior_registers, store_inferior_registers): Change
7494         prototype to take a regcache.  Adjust.
7495         * proc-service.c (ps_lgetregs): Adjust.
7496         * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7497         (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7498         (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7499         take a regcache.  Adjust.
7500         * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7501         (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7502         (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7503         (arm_breakpoint_at): Change prototype to take a regcache.  Adjust.
7504         * linux-cris-low.c (cris_get_pc, cris_set_pc)
7505         (cris_cannot_fetch_register):
7506         (cris_breakpoint_at): Change prototype to take a regcache.
7507         Adjust.
7508         * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7509         cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7510         to take a regcache.  Adjust.
7511         (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7512         Adjust.
7513         * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7514         take a regcache.  Adjust.
7515         * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7516         (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7517         (m68k_set_pc): Change prototype to take a regcache.  Adjust.
7518         * linux-mips-low.c (mips_get_pc):
7519         (mips_set_pc): Change prototype to take a regcache.  Adjust.
7520         (mips_reinsert_addr): Adjust.
7521         (mips_collect_register): Change prototype to take a regcache.
7522         Adjust.
7523         (mips_supply_register):
7524         (mips_collect_register_32bit, mips_supply_register_32bit)
7525         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7526         (mips_store_fpregset): Ditto.
7527         * linux-ppc-low.c (ppc_supply_ptrace_register)
7528         (ppc_supply_ptrace_register): Ditto.
7529         (parse_spufs_run): Adjust.
7530         (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7531         (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7532         (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7533         take a regcache.  Adjust.
7534         * linux-s390-low.c (s390_collect_ptrace_register)
7535         (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7536         (s390_set_pc): Change prototype to take a regcache.  Adjust.
7537         (s390_arch_setup): Adjust.
7538         * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7539         (sh_fill_gregset): Change prototype to take a regcache.  Adjust.
7540         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7541         (sparc_fill_gregset, sparc_store_gregset_from_stack)
7542         (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7543         regcache.  Adjust.
7544         (sparc_breakpoint_at): Adjust.
7545         * linux-xtensa-low.c (xtensa_fill_gregset):
7546         (xtensa_store_gregset):
7547         (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7548         (xtensa_set_pc): Change prototype to take a regcache.  Adjust.
7549         * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7550         prototype to take a regcache.  Adjust.
7551         * win32-arm-low.c (arm_fetch_inferior_register)
7552         (arm_store_inferior_register): Change prototype to take a
7553         regcache.  Adjust.
7554         * win32-i386-low.c (i386_fetch_inferior_register)
7555         (i386_store_inferior_register): Change prototype to take a
7556         regcache.  Adjust.
7557         * win32-low.c (child_fetch_inferior_registers)
7558         (child_store_inferior_registers): Change prototype to take a
7559         regcache.  Adjust.
7560         (win32_wait): Adjust.
7561         (win32_fetch_inferior_registers): Change prototype to take a
7562         regcache.  Adjust.
7563         (win32_store_inferior_registers): Adjust.
7564         * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7565         store_inferior_register>: Change prototype to take a regcache.
7566
7567 2010-01-20  Doug Evans  <dje@google.com>
7568
7569         * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7570         #ifdef.
7571         (linux_wait_for_event1, linux_init_signals): Ditto.
7572         (W_STOPCODE): Provide definition if missing.
7573
7574 2010-01-13  Vladimir Prus  <vladimir@codesourcery.com>
7575
7576         * linux-low.c (linux_core_of_thread): New.
7577         (compare_ints, show_process, list_threads): New.
7578         (linux_qxfer_osdata): Report threads and cores.
7579         (linux_target_op): Register linux_core_of_thread.
7580         * remote-utils.c (prepare_resume_reply): Report the core.
7581         (buffer_xml_printf): Support %d specifier.
7582         * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7583         New.
7584         (handle_query): Handle qXfer:threads.  Announce availability
7585         thereof.
7586         * target.h (struct target_ops): New field core_of_thread.
7587
7588 2010-01-04  Ulrich Weigand  <uweigand@de.ibm.com>
7589
7590         * Makefile.in (clean): Remove new generated files.
7591         (reg-s390.o, reg-s390.c): Remove rules.
7592         (reg-s390x.o, reg-s390x.c): Likewise.
7593         (s390-linux32.o, s390-linux32.c): Add rules.
7594         (s390-linux64.o, s390-linux64.c): Likewise.
7595         (s390x-linux64.o, s390x-linux64.c): Likewise.
7596         * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7597         * linux-s390-low.c: Include <elf.h>.
7598         (HWCAP_S390_HIGH_GPRS): Define if undefined.
7599         (init_registers_s390): Remove prototype.
7600         (init_registers_s390x): Likewise.
7601         (init_registers_s390_linux32): Add prototype.
7602         (init_registers_s390_linux64): Likewise.
7603         (init_registers_s390x_linux64): Likewise.
7604         (s390_num_regs_3264): New define.
7605         (s390_regmap_3264): New global variable.
7606         (s390_cannot_fetch_register): Remove obsolete check.
7607         (s390_cannot_store_register): Likewise.
7608         (s390_collect_ptrace_register): Handle upper/lower register halves.
7609         (s390_supply_ptrace_register): Likewise.
7610         (s390_fill_gregset): Update to register number changes.
7611         (s390_get_hwcap): New routine.
7612         (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7613         Install appropriate regmap and register set.
7614
7615 2010-01-01  Joel Brobecker  <brobecker@adacore.com>
7616
7617         * server.c (gdbserver_version): Update copyright year to 2010.
7618         * gdbreplay.c (gdbreplay_version): Likewise.
7619
7620 2009-12-28  Doug Evans  <dje@google.com>
7621
7622         * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7623         elf/external.h.  Include <elf.h> instead but only if necessary.
7624
7625 2009-12-28  Pedro Alves  <pedro@codesourcery.com>
7626
7627         * linux-low.c (linux_remove_process): Remove `detaching'
7628         parameter.  Don't release/detach from thread_db here.
7629         (linux_kill): Release/detach from thread_db here, ...
7630         (linux_detach): ... and here, before actually detaching.
7631         (linux_wait_1): ... and here, when a process exits.
7632         * thread-db.c (any_thread_of): New.
7633         (thread_db_free): Switch the current inferior to a thread of the
7634         passed in process.
7635
7636 2009-12-21  Doug Evans  <dje@google.com>
7637
7638         * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7639
7640         * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7641         Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7642         warning ifndef __NR_tkill.  Move setting of errno there too.
7643         Delete unnecessary resetting of errno after syscall.
7644         Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7645
7646         * configure.ac: Check for dladdr.
7647         * config.in: Regenerate.
7648         * configure: Regenerate.
7649         * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7650         (try_thread_db_load): Update.
7651
7652         * linux-low.c (my_waitpid): Delete unnecessary prototype.
7653
7654 2009-12-18  Doug Evans  <dje@google.com>
7655
7656         * event-loop.c: Include unistd.h if it exists.
7657
7658         * linux-low.c (my_waitpid): Move definition away from being in
7659         between linux_tracefork_child/linux_test_for_tracefork.
7660
7661         * gdb_proc_service.h (psaddr_t): Fix type.
7662         * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7663         signature to match glibc.
7664
7665 2009-12-16  Doug Evans  <dje@google.com>
7666
7667         * linux-low.c (linux_read_memory): Fix argument to read.
7668
7669 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
7670
7671         * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7672         events, don't leave current_inferior pointing at null.
7673
7674 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
7675
7676         * win32-low.c (LOG): Delete.
7677         (OUTMSG): Output to stderr.
7678         (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7679         on compile time LOG macro.
7680         (win32_wait): Fix debug output.
7681
7682 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
7683
7684         * win32-low.c (win32_add_one_solib): If the dll name is
7685         "ntdll.dll", prepend the system directory to the dll path.
7686
7687 2009-11-17  Daniel Jacobowitz  <dan@codesourcery.com>
7688
7689         * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7690
7691 2009-11-17  Nathan Sidwell  <nathan@codesourcery.com>
7692             Vladimir Prus  <vladimir@codesourcery.com>
7693
7694         * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7695         * configure.ac: Check for __mcoldfire__ and set
7696         gdb_cv_m68k_is_coldfire.
7697         * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7698         reg-cf.o and reg-m68k.o.
7699         * configure: Regenerated.
7700
7701 2009-11-16  Pedro Alves  <pedro@codesourcery.com>
7702
7703         * linux-low.c (linux_remove_process): Add `detaching' parameter.
7704         Pass it to thread_db_free.
7705         (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7706         proper `detaching' argument to linux_remove_process.
7707         * linux-low.h (thread_db_free): Add `detaching' parameter.
7708         * thread-db.c (thread_db_init): Pass false as `detaching' argument
7709         to thread_db_free.
7710         (thread_db_free): Add `detaching' parameter.  Only
7711         call td_ta_clear_event if detaching from process.
7712
7713 2009-11-12  Maxim Kuvyrkov  <maxim@codesourcery.com>
7714
7715         * thread-db.c (thread_db_free): Fix typo.
7716
7717 2009-11-11  Paul Pluzhnikov  <ppluzhnikov@google.com>
7718
7719         PR gdb/10838
7720         * thread-db.c (thread_db_free): Call td_ta_clear_event.
7721
7722 2009-11-03  Nathan Sidwell  <nathan@codesourcery.com>
7723
7724         * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7725         with an i686 compiler.
7726         * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7727         needed.
7728         * configure: Rebuilt.
7729
7730 2009-10-29  Sandra Loosemore  <sandra@codesourcery.com>
7731
7732         PR gdb/10783
7733
7734         * server.c (handle_search_memory_1): Correct read_addr initialization
7735         in loop for searching subsequent chunks.
7736
7737 2009-10-29  Paul Pluzhnikov  <ppluzhnikov@google.com>
7738
7739         * configure.ac: New --with-libthread-db option.
7740         * thread-db.c: Allow direct dependence on libthread_db.
7741         (thread_db_free): Adjust.
7742         * config.in: Regenerate.
7743         * configure: Likewise.
7744
7745 2009-10-28  Paul Pluzhnikov  <ppluzhnikov@google.com>
7746
7747         PR gdb/10757
7748         * thread-db.c (attach_thread): New function.
7749         (maybe_attach_thread): Return success/failure.
7750         (find_new_threads_callback): Adjust.
7751         (thread_db_find_new_threads): Loop until no new threads.
7752
7753 2009-10-13  Pedro Alves  <pedro@codesourcery.com>
7754
7755         * proc-service.c (ps_lgetregs): Formatting.
7756
7757 2009-10-08  Paul Pluzhnikov  <ppluzhnikov@google.com>
7758
7759         * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7760         * configure.ac: Adjust.
7761         * linux-low.h (struct process_info_private): Move members to struct
7762         thread_db.
7763         (thread_db_free, thread_db_handle_monitor_command): New prototype.
7764         * linux-low.c (linux_remove_process): Adjust.
7765         (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7766         * server.c (handle_query): Move code ...
7767         (handle_monitor_command): ... here. New function.
7768         * target.h (struct target_ops): New member.
7769         * thread-db.c (struct thread_db): New.
7770         (libthread_db_search_path): New variable.
7771         (thread_db_create_event, thread_db_enable_reporting)
7772         (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7773         (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7774         (try_thread_db_load_1, dladdr_to_soname): New functions.
7775         (try_thread_db_load, thread_db_load_search): New functions.
7776         (thread_db_init): Search for libthread_db.
7777         (thread_db_free): New function.
7778         (thread_db_handle_monitor_command): Likewise.
7779         * config.in: Regenerate.
7780         * configure: Regenerate.
7781
7782 2009-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
7783
7784         * spu-low.c (spu_kill): Wait for inferior to terminate.
7785         Call clear_inferiors.
7786         (spu_detach): Call clear_inferiors.
7787
7788 2009-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7789
7790         * aclocal.m4: Regenerate.
7791         * config.in: Likewise.
7792         * configure: Likewise.
7793
7794 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
7795
7796         * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7797         (parse_spufs_run): New function.
7798         (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7799         (ppc_breakpoint_at): Handle SPU breakpoints.
7800
7801 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
7802
7803         * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7804         (SPUFS_MAGIC): Define.
7805         (spu_enumerate_spu_ids): New function.
7806         (linux_qxfer_spu): New function.
7807         (linux_target_ops): Install linux_qxfer_spu.
7808
7809 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
7810
7811         * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7812         and powerpc-cell64l.o to srv_regobj.  Add rs6000/powerpc-cell32l.xml
7813         and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7814         * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7815         (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7816         (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7817         * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7818         (init_registers_powerpc_cell32l): Add prototype.
7819         (init_registers_powerpc_cell64l): Likewise.
7820         (ppc_arch_setup): Detect Cell/B.E. architecture.
7821
7822 2009-07-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7823
7824         * Makefile.in (datarootdir): New variable.
7825
7826 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
7827
7828         * linux-low.c (linux_write_memory): Update debugging output.
7829         * Makefile.in (clean): Add new descriptions.
7830         (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7831         (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7832         * configure.srv: Add new files for arm*-*-linux*.
7833         * linux-arm-low.c: Add new declarations.
7834         (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7835         (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7836         (HWCAP_VFPv3D16): New.
7837         (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7838         instead of __IWMMXT__.
7839         (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7840         (arm_arch_setup): New.
7841         (target_regsets): Remove #ifdef.  Add VFP regset.
7842         (the_low_target): Use arm_arch_setup.
7843
7844 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
7845
7846         * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7847         the main thread again.
7848
7849 2009-07-06  Aleksandar Ristovski  <aristovski@qnx.com>
7850
7851         Adding Neutrino gdbserver.
7852         * configure: Regenerated.
7853         * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7854         * configure.srv (i[34567]86-*-nto*): New target.
7855         * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7856         * remote-utils.c [__QNX__]: Include sys/iomgr.h
7857         (nto_comctrl) [__QNX__]: New function.
7858         (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7859
7860 2009-07-05  Danny Backx  <dannybackx@users.sourceforge.net>
7861
7862         * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7863         srv_tgtobj.
7864
7865 2009-07-04  Danny Backx  <dannybackx@users.sourceforge.net>
7866             Pedro Alves  <pedro@codesourcery.com>
7867
7868         * win32-i386-low.c (i386_get_thread_context): Handle systems that
7869         don't support CONTEXT_EXTENDED_REGISTERS.
7870         (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7871         (the_low_target): Install them.
7872         * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7873         failing with ERROR_PIPE_NOT_CONNECTED.
7874
7875 2009-06-30  Doug Evans  <dje@google.com>
7876             Pierre Muller  <muller@ics.u-strasbg.fr>
7877
7878         Add h/w watchpoint support to x86-linux, win32-i386.
7879         * Makefile.in (SFILES): Add i386-low.c
7880         (i386_low_h): Define.
7881         (i386-low.o): Add dependencies.
7882         (linux-x86-low.o): Add i386-low.h dependency.
7883         (win32-i386-low.o): Ditto.
7884         * i386-low.c: New file.
7885         * i386-low.h: New file.
7886         * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7887         (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7888         * linux-low.c (linux_add_process): Initialize arch_private.
7889         (linux_remove_process): Free arch_private.
7890         (add_lwp): Initialize arch_private.
7891         (delete_lwp): Free arch_private.
7892         (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7893         provided.
7894         * linux-low.h (process_info_private): New member arch_private.
7895         (lwp_info): New member arch_private.
7896         (linux_target_ops): New members new_process, new_thread,
7897         prepare_to_resume.
7898         (ptid_of): New macro.
7899         * linux-x86-low.c: Include stddef.h, i386-low.h.
7900         (arch_process_info): New struct.
7901         (arch_lwp_info): New struct.
7902         (x86_linux_dr_get, x86_linux_dr_set): New functions.
7903         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7904         (i386_dr_low_get_status): New function.
7905         (x86_insert_point, x86_remove_point): New functions.
7906         (x86_stopped_by_watchpoint): New function.
7907         (x86_stopped_data_address): New function.
7908         (x86_linux_new_process, x86_linux_new_thread): New functions.
7909         (x86_linux_prepare_to_resume): New function.
7910         (the_low_target): Add entries for insert_point, remove_point,
7911         stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7912         prepare_to_resume.
7913         * server.c (debug_hw_points): New global.
7914         (monitor_show_help): Document set debug-hw-points.
7915         (handle_query): Process "set debug-hw-points".
7916         * server.h (debug_hw_points): Declare.
7917         (paddress): Declare.
7918         * utils.c (NUMCELLS, CELLSIZE): New macros.
7919         (get_sell, xsnprintf, paddress): New functions.
7920         * win32-arm-low.c (the_low_target): Add entries for insert_point,
7921         remove_point, stopped_by_watchpoint, stopped_data_address.
7922         * win32-i386-low.c: Include i386-low.h.
7923         (debug_reg_state): Replaces dr.
7924         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7925         (i386_dr_low_get_status): New function.
7926         (i386_insert_point, i386_remove_point): New functions.
7927         (i386_stopped_by_watchpoint): New function.
7928         (i386_stopped_data_address): New function.
7929         (i386_initial_stuff): Update.
7930         (get_thread_context,set_thread_context,i386_thread_added): Update.
7931         (the_low_target): Add entries for insert_point,
7932         remove_point, stopped_by_watchpoint, stopped_data_address.
7933         * win32-low.c (win32_insert_watchpoint): New function.
7934         (win32_remove_watchpoint): New function.
7935         (win32_stopped_by_watchpoint): New function.
7936         (win32_stopped_data_address): New function.
7937         (win32_target_ops): Add entries for insert_watchpoint,
7938         remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
7939         * win32-low.h (win32_target_ops): New members insert_point,
7940         remove_point, stopped_by_watchpoint, stopped_data_address.
7941
7942 2009-06-25  Pedro Alves  <pedro@codesourcery.com>
7943
7944         * server.c (process_serial_event): Re-return unsupported, not
7945         error, if the type isn't recognized.  Re-allow supporting only
7946         insert or remove packets.  Also call require_running for
7947         breakpoints.  Add missing break statement to default case.  Tidy.
7948         * target.h (struct target_ops): Rename insert_watchpoint to
7949         insert_point, and remove_watchpoint to remove_point.
7950
7951         * linux-low.h (struct linux_target_ops): Likewise.
7952         * linux-low.c (linux_insert_watchpoint): Rename to ...
7953         (linux_insert_point): ... this.  Adjust.
7954         (linux_remove_watchpoint): Rename to ...
7955         (linux_remove_point): ... this.  Adjust.
7956         (linux_target_ops): Adjust.
7957         * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
7958         (cris_insert_point): ... this.
7959         (cris_remove_watchpoint): Rename to ...
7960         (cris_remove_point): ... this.
7961         (the_low_target): Adjust.
7962
7963 2009-06-24  Pierre Muller  <muller@ics.u-strasbg.fr>
7964
7965         * server.c (handle_v_kill): Pass signal_pid to
7966         kill_inferior if multi_process is zero.
7967
7968 2009-06-23  Aleksandar Ristovski  <aristovski@qnx.com>
7969
7970         * server.c (process_serial_event): Add support for Z0 and Z1 packet.
7971         * target.h (target_ops): Comment for *_watchpoint to make it clear
7972         the functions can get types '0' and '1'.
7973
7974 2009-06-22  Aleksandar Ristovski  <aristovski@qnx.com>
7975
7976         * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
7977         * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
7978         * regcache.c (get_regcache): Likewise.
7979         * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
7980         * win32-low.c (child_fetch_inferior_registers): Remove check for
7981         regno 0.
7982
7983 2009-06-19  Aleksandar Ristovski  <aristovski@qnx.com>
7984             Pedro Alves <pedro@codesourcery.com>
7985
7986         * target.h (struct target_ops) <supports_multi_process>: New
7987         callback.
7988         (target_supports_multi_process): New.
7989         * server.c (handle_query): Even if GDB reports support, only
7990         enable multi-process if the target also supports it.  Report
7991         multi-process support only if the target backend supports it.
7992         * linux-low.c (linux_supports_multi_process): New function.
7993         (linux_target_ops): Install it as target_supports_multi_process
7994         callback.
7995
7996 2009-05-24  Doug Evans  <dje@google.com>
7997
7998         Global renaming of find_thread_pid to find_thread_ptid.
7999         * server.h (find_thread_ptid): Renamed from find_thread_pid.
8000         * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
8001         All callers updated.
8002
8003         * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
8004         to resume the newly created thread, don't call ptrace (PTRACE_CONT)
8005         directly.
8006
8007         * linux-low.c (get_stop_pc): Print pc if debug_threads.
8008         (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
8009         (linux_resume_one_lwp): Ditto.
8010
8011 2009-05-23  Doug Evans  <dje@google.com>
8012
8013         * linux-low.c (linux_resume_one_lwp): Change type of first arg
8014         from struct inferior_list_entry * to struct lwp_info *.
8015         All callers updated.
8016
8017 2009-05-13  Doug Evans  <dje@google.com>
8018
8019         * linux-x86-low.c: Don't include assert.h.
8020         (x86_siginfo_fixup): Use fatal, not assert.
8021         (x86_arch_setup): Fix comment.
8022
8023 2009-05-12  Doug Evans  <dje@google.com>
8024
8025         Biarch support for i386/amd64 gdbserver.
8026         * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
8027         Add linux-x86-low.c.
8028         (linux-i386-low.o, linux-x86-64-low.o): Delete.
8029         (linux-x86-low.o): Add.
8030         * linux-x86-64-low.c: Delete.
8031         * linux-i386-low.c: Delete.
8032         * linux-x86-low.c: New file.
8033         * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
8034         linux-x86-low.o.
8035         (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
8036         linux-x86-low.o.
8037         (x86_64-linux srv_regobj): Add reg-i386-linux.o.
8038         * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
8039         (linux_child_pid_to_exec_file): New function.
8040         (elf_64_header_p, elf_64_file_p): New functions.
8041         (siginfo_fixup): New function.
8042         (linux_xfer_siginfo): New local inf_siginfo.  Call siginfo_fixup to
8043         give target a chance to convert layout.
8044         * linux-low.h (linux_target_ops): New member siginfo_fixup.
8045         (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
8046
8047 2009-05-07  Doug Evans  <dje@google.com>
8048
8049         * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
8050         (regsets_store_inferior_registers): Ditto.
8051
8052 2009-05-06  Pedro Alves  <pedro@codesourcery.com>
8053
8054         PR server/10048
8055
8056         * linux-low.c (must_set_ptrace_flags): Delete.
8057         (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
8058         of the global.
8059         (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here.  Set
8060         `lwp->must_set_ptrace_flags' instead.
8061         (linux_wait_for_event_1): Set ptrace options here.
8062         (linux_wait_1): ... not here.
8063
8064 2009-04-30  Doug Evans  <dje@google.com>
8065
8066         * inferiors.c (started_inferior_callback): New function.
8067         (attached_inferior_callback): New function.
8068         (have_started_inferiors_p, have_attached_inferiors_p): New functions.
8069         * server.c (print_started_pid, print_attached_pid): New functions.
8070         (detach_or_kill_for_exit): New function.
8071         (main): Call it instead of for_each_inferior (kill_inferior_callback).
8072         * server.h (have_started_inferiors_p): Declare.
8073         (have_attached_inferiors_p): Declare.
8074
8075         * inferiors.c (remove_process): Fix memory leak, free process.
8076         * linux-low.c (linux_remove_process): New function.
8077         (linux_kill): Call it instead of remove_process.
8078         (linux_detach, linux_wait_1): Ditto.
8079
8080 2009-04-19  Danny Backx  <dannybackx@users.sourceforge.net>
8081
8082         * configure.srv: Add x86 Windows CE target.
8083
8084 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
8085
8086         * inferiors.c (get_thread_process): Make global.
8087         * server.h (get_thread_process): Add prototype.
8088         * thread-db.c (find_one_thread): Use get_thread_process
8089         instead of current_process.
8090         (thread_db_get_tls_address): Do not crash if called when
8091         thread layer is not yet initialized.
8092
8093 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
8094
8095         * remote-utils.c (prepare_resume_reply): Null-terminate packet.
8096         * spu-low.c (current_tid): Rename to ...
8097         (current_ptid): ... this.
8098         (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
8099         spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
8100         ptid_get_lwp (current_ptid) instead of current_tid.
8101         (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
8102         instead of current_tid.  Use find_process_pid to verify pid
8103         argument is valid.  Pass proper argument to remove_process.
8104         (spu_thread_alive): Compare current_ptid instead of current_tid.
8105         (spu_resume): Likewise.
8106
8107 2009-04-02  Pedro Alves  <pedro@codesourcery.com>
8108
8109         * linux-low.c (usr_store_inferior_registers): Declare local `pid'
8110         variable.
8111
8112 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
8113
8114         Implement the multiprocess extensions, and add linux multiprocess
8115         support.
8116
8117         * server.h (ULONGEST): Declare.
8118         (struct ptid, ptid_t): New.
8119         (minus_one_ptid, null_ptid): Declare.
8120         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8121         (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
8122         (struct inferior_list_entry): Change `id' type from unsigned from
8123         to ptid_t.
8124         (struct sym_cache, struct breakpoint, struct
8125         process_info_private): Forward declare.
8126         (struct process_info): Declare.
8127         (current_process): Declare.
8128         (all_processes): Declare.
8129         (initialize_inferiors): Declare.
8130         (add_thread): Adjust to use ptid_t.
8131         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
8132         (add_process, remove_process, find_thread_pid): Declare.
8133         (find_inferior_id): Adjust to use ptid_t.
8134         (cont_thread, general_thread, step_thread): Change type to ptid_t.
8135         (multi_process): Declare.
8136         (push_event): Adjust to use ptid_t.
8137         (read_ptid, write_ptid): Declare.
8138         (prepare_resume_reply): Adjust to use ptid_t.
8139         (clear_symbol_cache): Declare.
8140         * inferiors.c (all_processes): New.
8141         (null_ptid, minus_one_ptid): New.
8142         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
8143         (ptid_get_tid, ptid_equal, ptid_is_pid): New.
8144         (add_thread): Change unsigned long to ptid.  Remove gdb_id
8145         parameter.  Adjust.
8146         (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
8147         (gdb_id_to_thread): Rename to ...
8148         (find_thread_pid): ... this.  Change unsigned long to ptid.
8149         (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
8150         (loaded_dll, pull_pid_from_list): Adjust.
8151         (add_process, remove_process, find_process_pid)
8152         (get_thread_process, current_process, initialize_inferiors): New.
8153         * target.h (struct thread_resume) <thread>: Change type to ptid_t.
8154         (struct target_waitstatus) <related_pid>: Ditto.
8155         (struct target_ops) <kill, detach>: Add `pid' argument.  Change
8156         return type to int.
8157         (struct target_ops) <join>: Add `pid' argument.
8158         (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
8159         (struct target_ops) <wait>: Add `ptid' field.  Change return type
8160         to ptid.
8161         (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
8162         (mywait): Add `ptid' argument.  Change return type to ptid_t.
8163         (target_pid_to_str): Declare.
8164         * target.c (set_desired_inferior): Adjust to use ptids.
8165         (mywait): Add new `ptid' argument.  Adjust.
8166         (target_pid_to_str): New.
8167         * mem-break.h (free_all_breakpoints): Declare.
8168         * mem-break.c (breakpoints): Delelete.
8169         (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
8170         (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
8171         to use per-process breakpoint list.
8172         (free_all_breakpoints): New.
8173         * remote-utils.c (struct sym_cache) <name>: Drop `const'.
8174         (symbol_cache, all_symbols_looked_up): Delete.
8175         (hexchars): New.
8176         (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
8177         read_ptid): New.
8178         (prepare_resume_reply): Change ptid argument's type from unsigned
8179         long to ptid_t.  Adjust.  Implement W;process and X;process.
8180         (free_sym_cache, clear_symbol_cache): New.
8181         (look_up_one_symbol): Adjust to per-process symbol cache.  *
8182         * server.c (cont_thread, general_thread, step_thread): Change type
8183         to ptid_t.
8184         (attached): Delete.
8185         (multi_process): New.
8186         (last_ptid): Change type to ptid_t.
8187         (struct vstop_notif) <ptid>: Change type to ptid_t.
8188         (queue_stop_reply, push_event): Change `ptid' argument's type to
8189         ptid_t.
8190         (discard_queued_stop_replies): Add `pid' argument.
8191         (start_inferior): Adjust to use ptids.  Adjust to mywait interface
8192         changes.  Don't reference the `attached' global.
8193         (attach_inferior): Adjust to mywait interface changes.
8194         (handle_query): Adjust to use ptids.  Parse GDB's qSupported
8195         features.  Handle and report "multiprocess+".  Handle
8196         "qAttached:PID".
8197         (handle_v_cont): Adjust to use ptids.  Adjust to mywait interface
8198         changes.
8199         (handle_v_kill): New.
8200         (handle_v_stopped): Adjust to use target_pid_to_str.
8201         (handle_v_requests): Allow multiple attaches and runs when
8202         multiprocess extensions are in effect.  Handle "vKill".
8203         (myresume): Adjust to use ptids.
8204         (queue_stop_reply_callback): Add `arg' parameter.  Handle it.
8205         (handle_status): Adjust to discard_queued_stop_replies interface
8206         change.
8207         (first_thread_of, kill_inferior_callback)
8208         (detach_or_kill_inferior_callback, join_inferiors_callback): New.
8209         (main): Call initialize_inferiors.  Adjust to use ptids, killing
8210         and detaching from all inferiors.  Handle multiprocess packet
8211         variants.
8212         * linux-low.h: Include gdb_proc_service.h.
8213         (struct process_info_private): New.
8214         (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
8215         <lwpid_of>: Use ptid_get_lwp.
8216         (get_lwp_thread): Adjust.
8217         (struct lwp_info): Add `dead' member.
8218         (find_lwp_pid): Declare.
8219         * linux-low.c (thread_db_active): Delete.
8220         (new_inferior): Adjust comment.
8221         (inferior_pid): Delete.
8222         (linux_add_process): New.
8223         (handle_extended_wait): Adjust.
8224         (add_lwp): Change unsigned long to ptid.
8225         (linux_create_inferior): Add process to processes table.  Adjust
8226         to use ptids.  Don't set new_inferior here.
8227         (linux_attach_lwp): Rename to ...
8228         (linux_attach_lwp_1): ... this.  Add `initial' argument.  Handle
8229         it.  Adjust to use ptids.
8230         (linux_attach_lwp): New.
8231         (linux_attach): Add process to processes table.  Don't set
8232         new_inferior here.
8233         (struct counter): New.
8234         (second_thread_of_pid_p, last_thread_of_process_p): New.
8235         (linux_kill_one_lwp): Add `args' parameter.  Handle it.  Adjust to
8236         multiple processes.
8237         (linux_kill): Add `pid' argument.  Handle it.  Adjust to multiple
8238         processes.  Remove process from process table.
8239         (linux_detach_one_lwp): Add `args' parameter.  Handle it.  Adjust
8240         to multiple processes.
8241         (any_thread_of): New.
8242         (linux_detach): Add `pid' argument, and handle it.  Remove process
8243         from processes table.
8244         (linux_join): Add `pid' argument.  Handle it.
8245         (linux_thread_alive): Change unsighed long argument to ptid_t.
8246         Consider dead lwps as not being alive.
8247         (status_pending_p): Rename `dummy' argument to `arg'.  Filter out
8248         threads we're not interested in.
8249         (same_lwp, find_lwp_pid): New.
8250         (linux_wait_for_lwp): Change `pid' argument's type from int to
8251         ptid_t.  Adjust.
8252         (linux_wait_for_event): Rename to ...
8253         (linux_wait_for_event_1): ... this.  Change `pid' argument's type
8254         from int to ptid_t.  Adjust.
8255         (linux_wait_for_event): New.
8256         (linux_wait_1): Add `ptid' argument.  Change return type to
8257         ptid_t.  Adjust.  Use last_thread_of_process_p.  Remove processes
8258         that exit from the process table.
8259         (linux_wait): Add `ptid' argument.  Change return type to ptid_t.
8260         Adjust.
8261         (mark_lwp_dead): New.
8262         (wait_for_sigstop): Adjust to use ptids.  If a process exits while
8263         stopping all threads, mark its main lwp as dead.
8264         (linux_set_resume_request, linux_resume_one_thread): Adjust to use
8265         ptids.
8266         (fetch_register, usr_store_inferior_registers)
8267         (regsets_fetch_inferior_registers)
8268         (regsets_store_inferior_registers, linux_read_memory)
8269         (linux_write_memory): Inline `inferior_pid'.
8270         (linux_look_up_symbols): Adjust to use per-process
8271         `thread_db_active'.
8272         (linux_request_interrupt): Adjust to use ptids.
8273         (linux_read_auxv): Inline `inferior_pid'.
8274         (initialize_low): Don't reference thread_db_active.
8275         * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
8276         * proc-service.c (ps_lgetregs): Use find_lwp_pid.
8277         (ps_getpid): Return the pid of the current inferior.
8278         * thread-db.c (proc_handle, thread_agent): Delete.
8279         (thread_db_create_event, thread_db_enable_reporting): Adjust to
8280         per-process data.
8281         (find_one_thread): Change argument type to ptid_t.  Adjust to
8282         per-process data.
8283         (maybe_attach_thread): Adjust to per-process data and ptids.
8284         (thread_db_find_new_threads): Ditto.
8285         (thread_db_init): Ditto.
8286         * spu-low.c (spu_create_inferior, spu_attach): Add process to
8287         processes table.  Adjust to use ptids.
8288         (spu_kill, spu_detach): Adjust interface.  Remove process from
8289         processes table.
8290         (spu_join, spu_thread_alive): Adjust interface.
8291         (spu_wait): Adjust interface.  Remove process from processes
8292         table.  Adjust to use ptids.
8293         * win32-low.c (current_inferior_tid): Delete.
8294         (current_inferior_ptid): New.
8295         (debug_event_ptid): New.
8296         (thread_rec): Take a ptid.  Adjust.
8297         (child_add_thread): Add `pid' argument.  Adjust to use ptids.
8298         (child_delete_thread): Ditto.
8299         (do_initial_child_stuff): Add `attached' argument.  Add process to
8300         processes table.
8301         (child_fetch_inferior_registers, child_store_inferior_registers):
8302         Adjust.
8303         (win32_create_inferior): Pass 0 to do_initial_child_stuff.
8304         (win32_attach): Pass 1 to do_initial_child_stuff.
8305         (win32_kill): Adjust interface.  Remove process from processes
8306         table.
8307         (win32_detach): Ditto.
8308         (win32_join): Adjust interface.
8309         (win32_thread_alive): Take a ptid.
8310         (win32_resume): Adjust to use ptids.
8311         (get_child_debug_event): Ditto.
8312         (win32_wait): Adjust interface.  Remove exiting process from
8313         processes table.
8314
8315 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
8316
8317         Non-stop mode support.
8318
8319         * server.h (non_stop): Declare.
8320         (gdb_client_data, handler_func): Declare.
8321         (delete_file_handler, add_file_handler, start_event_loop):
8322         Declare.
8323         (handle_serial_event, handle_target_event, push_event)
8324         (putpkt_notif): Declare.
8325         * target.h (enum resume_kind): New.
8326         (struct thread_resume): Replace `step' field by `kind' field.
8327         (TARGET_WNOHANG): Define.
8328         (struct target_ops) <wait>: Add `options' argument.
8329         <supports_non_stop, async, start_non_stop>: New fields.
8330         (target_supports_non_stop, target_async): New.
8331         (start_non_stop): Declare.
8332         (mywait): Add `options' argument.
8333         * target.c (mywait): Add `options' argument.  Print child exit
8334         notifications here.
8335         (start_non_stop): New.
8336         * server.c (non_stop, own_buf, mem_buf): New globals.
8337         (struct vstop_notif): New.
8338         (notif_queue): New global.
8339         (queue_stop_reply, push_event, discard_queued_stop_replies)
8340         (send_next_stop_reply): New.
8341         (start_inferior): Adjust to use resume_kind.  Adjust to mywait
8342         interface changes.
8343         (attach_inferior): In non-stop mode, don't wait for the target
8344         here.
8345         (handle_general_set): Handle QNonStop.
8346         (handle_query): When handling qC, return the current general
8347         thread, instead of the first thread of the list.
8348         (handle_query): If the backend supports non-stop mode, include
8349         QNonStop+ in the qSupported query response.
8350         (handle_v_cont): Adjust to use resume_kind.  Handle resume_stop
8351         and non-stop mode.
8352         (handle_v_attach, handle_v_run): Handle non-stop mode.
8353         (handle_v_stopped): New.
8354         (handle_v_requests): Report support for vCont;t.  Handle vStopped.
8355         (myresume): Adjust to use resume_kind.  Handle non-stop.
8356         (queue_stop_reply_callback): New.
8357         (handle_status): Handle non-stop mode.
8358         (main): Clear non_stop flag on reconnection.  Use the event-loop.
8359         Refactor serial protocol handling from here ...
8360         (process_serial_event): ... to this new function.  When GDB
8361         selects any thread, select one here.  In non-stop mode, wait until
8362         GDB acks all pending events before exiting.
8363         (handle_serial_event, handle_target_event): New.
8364         * remote-utils.c (remote_open): Install remote_desc in the event
8365         loop.
8366         (remote_close): Remove remote_desc from the event loop.
8367         (putpkt_binary): Rename to...
8368         (putpkt_binary_1): ... this.  Add `is_notic' argument.  Handle it.
8369         (putpkt_binary): New as wrapper around putpkt_binary_1.
8370         (putpkt_notif): New.
8371         (prepare_resume_reply): In non-stop mode, don't change the
8372         general_thread.
8373         * event-loop.c: New.
8374         * Makefile.in (OBJ): Add event-loop.o.
8375         (event-loop.o): New rule.
8376
8377         * linux-low.h (pid_of): Moved here.
8378         (lwpid_of): New.
8379         (get_lwp_thread): Use lwpid_of.
8380         (struct lwp_info): Delete `lwpid' field.  Add `suspended' field.
8381         * linux-low.c (pid_of): Delete.
8382         (inferior_pid): Use lwpid_of.
8383         (linux_event_pipe): New.
8384         (target_is_async_p): New.
8385         (delete_lwp): New.
8386         (handle_extended_wait): Use lwpid_of.
8387         (add_lwp): Don't set lwpid field.
8388         (linux_attach_lwp): Adjust debug output.  Use lwpid_of.
8389         (linux_kill_one_lwp): If killing a running lwp, stop it first.
8390         Use lwpid_of.  Adjust to linux_wait_for_event interface changes.
8391         (linux_detach_one_lwp): If detaching from a running lwp, stop it
8392         first.  Adjust to linux_wait_for_event interface changes.  Use
8393         lwpid_of.
8394         (linux_detach): Don't delete the main lwp here.
8395         (linux_join): Use my_waitpid.  Avoid signal_pid.  Use lwpid_of.
8396         (status_pending_p): Don't consider explicitly suspended lwps.
8397         (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8398         pointer.  Add OPTIONS argument.  Change return type to int.  Use
8399         my_waitpid instead of sleeping.  Handle WNOHANG.  Use lwpid_of.
8400         (linux_wait_for_event): Take an integer pid instead of a lwp_info
8401         pointer.  Add status pointer argument.  Return a pid instead of a
8402         status.  Use lwpid_of.  Adjust to linux_wait_for_lwp interface
8403         changes.  In non-stop mode, don't switch to a random thread.
8404         (linux_wait): Rename to...
8405         (linux_wait_1): ... this.  Add target_options argument, and handle
8406         it.  Adjust to use resume_kind.  Use lwpid_of.  In non-stop mode,
8407         don't handle the continue thread.  Handle TARGET_WNOHANG.  Merge
8408         clean exit and signal exit code.  Don't stop all threads in
8409         non-stop mode.  In all-stop mode, only stop all threads when
8410         reporting a stop to GDB.  Handle explicit thread stop requests.
8411         (async_file_flush, async_file_mark): New.
8412         (linux_wait): New.
8413         (send_sigstop): Use lwpid_of.
8414         (wait_for_sigstop): Use lwpid_of.  Adjust to linux_wait_for_event
8415         interface changes.  In non-stop mode, don't switch to a random
8416         thread.
8417         (linux_resume_one_lwp): Use lwpid_of.
8418         (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8419         (linux_resume_one_thread): ... this.  Handle resume_stop.  In
8420         non-stop mode, don't look for pending flag in all threads.
8421         (resume_status_pending_p): Don't consider explicitly suspended
8422         threads.
8423         (my_waitpid): Reimplement.  Emulate __WALL.
8424         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8425         Use lwpid_of.
8426         (sigchld_handler, linux_supports_non_stop, linux_async)
8427         (linux_start_non_stop): New.
8428         (linux_target_ops): Register linux_supports_non_stop, linux_async
8429         and linux_start_non_stop.
8430         (initialize_low): Install SIGCHLD handler.
8431         * thread-db.c (thread_db_create_event, find_one_thread)
8432         (thread_db_get_tls_address): Use lwpid_of.
8433         * win32-low.c (win32_detach): Adjust to use resume_kind.
8434         (win32_wait): Add `options' argument.
8435         * spu-low.c (spu_resume): Adjust to use resume_kind.
8436         (spu_wait): Add `options' argument.
8437
8438 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
8439
8440         Decouple target code from remote protocol.
8441
8442         * target.h (enum target_waitkind): New.
8443         (struct target_waitstatus): New.
8444         (struct target_ops) <wait>: Return an unsigned long.  Take a
8445         target_waitstatus pointer instead of a char pointer.
8446         (mywait): Likewise.
8447         * target.c (mywait): Change prototype to return an unsigned long.
8448         Take a target_waitstatus pointer instead of a char pointer.  Adjust.
8449         * server.h (thread_from_wait, old_thread_from_wait): Delete
8450         declarations.
8451         (prepare_resume_reply): Change prototype to take a
8452         target_waitstatus.
8453         * server.c (thread_from_wait, old_thread_from_wait): Delete.
8454         (last_status, last_ptid): New.
8455         (start_inferior): Remove "statusptr" argument.  Adjust.  Return a
8456         pid instead of a signal.
8457         (attach_inferior): Remove "status" and "signal" parameters.
8458         Adjust.
8459         (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8460         not as an address.
8461         (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8462         (handle_v_requests, myresume): Remove "status" and "signal"
8463         parameters.  Adjust.
8464         (handle_status): New.
8465         (main): Delete local `status'.  Adjust.
8466         * remote-utils.c: Include target.h.
8467         (prepare_resume_reply): Change prototype to take a
8468         target_waitstatus.  Adjust.
8469
8470         * linux-low.c (linux_wait): Adjust to new target_ops->wait
8471         interface.
8472         * spu-low.c (spu_wait): Adjust.
8473         * win32-low.c (enum target_waitkind, struct target_waitstatus):
8474         Delete.
8475         (win32_wait): Adjust.
8476
8477 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
8478
8479         * target.h (struct thread_resume): Delete leave_stopped member.
8480         (struct target_ops): Add a `n' argument to the `resume' callback.
8481         * server.c (start_inferior): Adjust.
8482         (handle_v_cont, myresume): Adjust.
8483         * linux-low.c (check_removed_breakpoint): Adjust to resume
8484         interface change, and to removed leave_stopped field.
8485         (resume_ptr): Delete.
8486         (struct thread_resume_array): New.
8487         (linux_set_resume_request): Add new `arg' parameter.  Adjust to
8488         resume interface change.
8489         (linux_continue_one_thread, linux_queue_one_thread)
8490         (resume_status_pending_p): Check if the resume field is NULL
8491         instead of checking the leave_stopped member.
8492         (linux_resume): Adjust to the target resume interface change.
8493         * spu-low.c (spu_resume): Adjust to the target resume interface
8494         change.
8495         * win32-low.c (win32_detach, win32_resume): Ditto.
8496
8497 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
8498
8499         * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8500         flag.
8501         (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8502         pending.
8503         (linux_continue_one_thread): Only preserve the stepping flag if
8504         there's a pending breakpoint.
8505
8506 2009-03-31  Pedro Alves  <pedro@codesourcery.com>
8507
8508         * server.c (main): After the inferior having exited, call
8509         remote_close before exiting gdbserver.
8510
8511 2009-03-25  Thiago Jung Bauermann  <bauerman@br.ibm.com>
8512
8513         Fix size of FPSCR in Power 7 processors.
8514         * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8515         (PPC_FEATURE_HAS_DFP): New #define.
8516         (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8517         size of the FPSCR.
8518
8519 2009-03-23  Pedro Alves  <pedro@codesourcery.com>
8520
8521         * server.c (handle_query) Whitespace and formatting.
8522
8523 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
8524
8525         * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8526         linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8527         linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8528         linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8529         regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8530         thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8531         Makefile.in, configure.ac: Fix whitespace throughout.
8532         * configure: Regenerate.
8533
8534 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
8535
8536         * inferiors.c (find_inferior): Make it safe for the callback
8537         function to delete the currently iterated inferior.
8538
8539 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
8540
8541         * Makefile.in (linuw_low_h): Move higher.
8542         (thread-db.o): Depend on $(linux_low_h).
8543
8544 2009-03-17  Pedro Alves  <pedro@codesourcery.com>
8545
8546         Rename "process" to "lwp" throughout.
8547
8548         * linux-low.c (all_processes): Rename to...
8549         (all_lwps): ... this.
8550         (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8551         (add_process): Rename to ...
8552         (add_lwp): ... this.  Adjust.
8553         (linux_create_inferior): Adjust.
8554         (linux_attach_lwp): Adjust.
8555         (linux_attach): Adjust.
8556         (linux_kill_one_process): Rename to ...
8557         (linux_kill_one_lwp): ... this.  Adjust.
8558         (linux_kill): Adjust.
8559         (linux_detach_one_process): Rename to ...
8560         (linux_detach_one_lwp): ... this.  Adjust.
8561         (linux_detach): Adjust.
8562         (check_removed_breakpoint): Adjust.
8563         (status_pending_p): Adjust.
8564         (linux_wait_for_process): Rename to ...
8565         (linux_wait_for_lwp): ... this.  Adjust.
8566         (linux_wait_for_event): Adjust.
8567         (send_sigstop): Adjust.
8568         (wait_for_sigstop): Adjust.
8569         (stop_all_processes): Rename to ...
8570         (stop_all_lwps): ... this.
8571         (linux_resume_one_process): Rename to ...
8572         (linux_resume_one_lwp): ... this.  Adjust.
8573         (linux_set_resume_request, linux_continue_one_thread)
8574         (linux_queue_one_thread, resume_status_pending_p)
8575         (usr_store_inferior_registers, regsets_store_inferior_registers)
8576         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8577         Adjust.
8578         * linux-low.h (get_process): Rename to ...
8579         (get_lwp): ... this.  Adjust.
8580         (get_thread_process): Rename to ...
8581         (get_thread_lwp): ... this.  Adjust.
8582         (get_process_thread): Rename to ...
8583         (get_lwp_thread): ... this.  Adjust.
8584         (struct process_info): Rename to ...
8585         (struct lwp_info): ... this.
8586         (all_processes): Rename to ...
8587         (all_lwps): ... this.
8588         * proc-service.c (ps_lgetregs): Adjust.
8589         * thread-db.c (thread_db_create_event, find_one_thread)
8590         (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8591
8592 2009-03-14  Pedro Alves  <pedro@codesourcery.com>
8593
8594         * server.c (handle_query): Handle "qAttached".
8595
8596 2009-03-13  Nathan Sidwell  <nathan@codesourcery.com>
8597
8598         * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8599         GPLv3, update license URL.
8600
8601 2009-03-01  Doug Evans  <dje@google.com>
8602
8603         * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
8604         (server_h): Add gdb_signals.h.
8605         (signals.o): Update.
8606         * server.h (target_signal_from_host,target_signal_to_host_p)
8607         (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8608
8609 2009-02-14  Pierre Muller  <muller@ics.u-strasbg.fr>
8610
8611         * remote-utils.c (getpkt): Also generate remote-debug
8612         information if noack_mode is set.
8613
8614 2009-02-06  Pedro Alves  <pedro@codesourcery.com>
8615
8616         * server.c (handle_query): Report qXfer:siginfo:read and
8617         qXfer:siginfo:write as supported and handle them.
8618         * target.h (struct target_ops) <qxfer_siginfo>: New field.
8619         * linux-low.c (linux_xfer_siginfo): New.
8620         (linux_target_ops): Set it.
8621
8622 2009-01-26  Pedro Alves  <pedro@codesourcery.com>
8623
8624         * server.c (gdbserver_usage): Mention --remote-debug.
8625         (main): Accept '--remote-debug' switch.
8626
8627 2009-01-18  Doug Evans  <dje@google.com>
8628
8629         * regcache.c (new_register_cache): No need to check result of xcalloc.
8630         * server.c (handle_search_memory): Back out calls to xmalloc,
8631         result is checked and error is returned to user upon failure.
8632         (handle_query): Ditto.  Add more checks for result of malloc.
8633         (handle_v_cont): Check result of malloc, report error back to
8634         user upon failure.
8635         (handle_v_run): Ditto.  Call freeargv.
8636         * server.h (freeargv): Declare.
8637         * utils.c (freeargv): New fn.
8638
8639 2009-01-15  Doug Evans  <dje@google.com>
8640
8641         * gdbreplay.c (perror_with_name): Make arg const char *.
8642         * server.h (target_signal_to_name): Make return type const char *.
8643         * thread-db.c (thread_db_err_str): Make return type const char *.
8644         * utils.c (perror_with_name): Make arg const char *.
8645
8646 2009-01-14  Pedro Alves  <pedro@codesourcery.com>
8647
8648         * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8649         when handling a EXIT_PROCESS_DEBUG_EVENT.
8650
8651 2009-01-06  Joel Brobecker  <brobecker@adacore.com>
8652
8653         * gdbreplay.c (gdbreplay_version): Update copyright year.
8654         * server.c (gdbserver_version): Likewise.
8655
8656 2009-01-05  Doug Evans  <dje@google.com>
8657
8658         * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
8659         (handle_extended_wait): Improve comment.
8660
8661 2008-12-13  Doug Evans  <dje@google.com>
8662
8663         * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8664         * server.h (ATTR_MALLOC): New macro.
8665         (xmalloc,xcalloc,xstrdup): Declare.
8666         * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8667         * inferiors.c: Ditto.
8668         * linux-low.c: Ditto.
8669         * mem-break.c: Ditto.
8670         * regcache.c: Ditto.
8671         * remote-utils.c: Ditto.
8672         * server.c: Ditto.
8673         * target.c: Ditto.
8674         * win32-low.c: Ditto.
8675
8676 2008-12-12  Doug Evans  <dje@google.com>
8677
8678         * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8679         in debugging printf.
8680
8681         * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8682
8683 2008-12-09  Doug Evans  <dje@google.com>
8684
8685         * linux-low.h (struct process_info): Delete member tid, unused.
8686         * thread-db.c (find_one_thread): Update.
8687         (maybe_attach_thread): Update.
8688
8689 2008-12-02  Pedro Alves  <pedro@codesourcery.com>
8690
8691         * target.h (struct target_ops): Add qxfer_osdata member.
8692         * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8693         and dirent.h.
8694         (linux_qxfer_osdata): New functions.
8695         (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8696         callback.
8697         * server.c (handle_query): Handle "qXfer:osdata:read:".
8698         * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8699         (buffer_xml_printf): New functions.
8700         * server.h (struct buffer): New.
8701         (buffer_grow_str, buffer_grow_str0): New macros.
8702         (buffer_grow, buffer_free, buffer_init, buffer_finish)
8703         (buffer_xml_printf): Declare.
8704
8705 2008-11-24  Doug Evans  <dje@google.com>
8706
8707         * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8708
8709 2008-11-24  Daniel Jacobowitz  <dan@codesourcery.com>
8710
8711         * server.c (handle_v_run): Always use the supplied argument list.
8712
8713 2008-11-19  Bob Wilson  <bob.wilson@acm.org>
8714
8715         * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8716         (xtensa_regmap_table): Add entry for scompare1.
8717
8718 2008-11-18  Thiago Jung Bauermann  <bauerman@br.ibm.com>
8719
8720         * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8721         powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8722         powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8723         powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8724         powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8725         powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8726         * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8727         XML target descriptions.
8728         * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8729         when inferior is running on an ISA 2.05 or later processor.  Add
8730         special case to return offset for full 64-bit slot of FPSCR when
8731         in 32-bits.
8732
8733 2008-11-14  Daniel Gutson  <dgutson@codesourcery.com>
8734
8735         * Makefile.in (SFILES, clean): Added sparc64 files.
8736         (reg-sparc64.o, reg-sparc64.c): New.
8737         * configure.srv (sparc*-*-linux*): New configuration.
8738         * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8739         syscall arguments for SPARC.
8740         (regsets_store_inferior_registers): Likewise.
8741         * linux-sparc-low.c: New file.
8742
8743 2008-10-21  Doug Evans  <dje@google.com>
8744
8745         * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8746         (READLINE_DIR,READLINE_DEP): Delete.
8747         (INTERNAL_CFLAGS): Update.
8748         (LINTFLAGS): Update.
8749
8750 2008-10-10  Pedro Alves  <pedro@codesourcery.com>
8751
8752         * server.c (handle_v_run): If GDB didn't specify an argv, use the
8753         whole argv from the last run, not just argv[0].
8754
8755 2008-09-08  Pedro Alves  <pedro@codesourcery.com>
8756
8757         * regcache.c (new_register_cache): Return NULL if the register
8758         cache size isn't known yet.
8759         (free_register_cache): Avoid dereferencing a NULL regcache.
8760
8761 2008-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
8762
8763         * configure.srv: Merge MIPS and MIPS64.
8764
8765 2008-08-24  Maciej W. Rozycki  <macro@linux-mips.org>
8766
8767         * Makefile.in (uninstall): Apply $(EXEEXT) too.
8768
8769 2008-08-18  Luis Machado  <luisgpm@br.ibm.com>
8770
8771         * Makefile.in: Add required vsx dependencies.
8772
8773         * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8774         Declare init_registers_powerpc_vsx32l.
8775         Declare init_registers_powerpc_vsx64l.
8776         Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8777         (ppc_arch_setup): Check for VSX in hwcap.
8778         (ppc_fill_vsxregset): New function.
8779         (ppc_store_vsxregset): New function.
8780         Add new VSX entry in regset_info target_regsets.
8781
8782         * configure.srv: Add new VSX dependencies.
8783
8784 2008-08-12  Pedro Alves  <pedro@codesourcery.com>
8785
8786         * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8787         (remote_open): Set or clear transport_is_reliable.
8788         (putpkt_binary): Don't expect acks in noack mode.
8789         (getpkt): Don't send ack/nac in noack mode.
8790         * server.c (handle_general_set): Handle QStartNoAckMode.
8791         (handle_query): If connected by tcp pass QStartNoAckMode+ in
8792         qSupported.
8793         (main): Reset noack_mode on every connection.
8794         * server.h (noack_mode): Declare.
8795
8796 2008-08-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8797
8798         * Makefile.in (GDBREPLAY_OBS): New variable.
8799         (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8800
8801 2008-08-05  Ulrich Weigand  <uweigand@de.ibm.com>
8802             Daniel Jacobowitz  <dan@codesourcery.com>
8803
8804         * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8805         (usr_store_inferior_registers): Likewise.
8806         (regsets_store_inferior_registers): Likewise.
8807
8808 2008-07-31  Rolf Jansen  <rj@surtec.com>
8809             Pedro Alves  <pedro@codesourcery.com>
8810
8811         * configure.ac: Check for memmem declaration.
8812         * server.c [HAVE_MALLOC_H]: Include malloc.h.
8813         (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8814         (disable_packet_qfThreadInfo): Unconditionally compile.
8815         * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8816         * configure, config.in: Regenerate.
8817
8818 2008-07-28  Doug Kwan  <dougkwan@google.com>
8819
8820         * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8821         (linux_write_memory): Remove declaration of errno.
8822
8823 2008-07-12  Ulrich Weigand  <uweigand@de.ibm.com>
8824
8825         * linux-low.c (handle_extended_wait): Do not use "status"
8826         variable uninitialized.
8827
8828 2008-07-07  Pedro Alves  <pedro@codesourcery.com>
8829
8830         * server.c (handle_v_attach): Inhibit reporting dll changes.
8831
8832 2008-06-27  Pedro Alves  <pedro@codesourcery.com>
8833
8834         * remote-utils.c (prepare_resume_reply): If requested, don't
8835         output "thread:TID" in the T stop reply.
8836
8837         * server.c (disable_packet_vCont, disable_packet_Tthread)
8838         (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8839         (handle_query): If requested, disable support for qC, qfThreadInfo
8840         and qsThreadInfo.
8841         (handle_v_requests): If requested, disable support for vCont.
8842         (gdbserver_show_disableable): New.
8843         (main): Handle --disable-packet and --disable-packet=LIST.
8844
8845         * server.h (disable_packet_vCont, disable_packet_Tthread)
8846         (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8847
8848 2008-06-20  Carlos O'Donell  <carlos@codesourcery.com>
8849
8850         * server.c (gdbserver_usage): Mention --version.
8851
8852 2008-06-06  Daniel Jacobowitz  <dan@codesourcery.com>
8853
8854         * Makefile.in (gdbreplay.o): New rule.
8855
8856 2008-06-06  Joseph Myers  <joseph@codesourcery.com>
8857
8858         * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8859         message, not gdbserver.
8860
8861 2008-06-05  Vladimir Prus  <vladimir@codesourcery.com>
8862             Nathan Sidwell  <nathan@codesourcery.com>
8863             Joseph Myers  <joseph@codesourcery.com>
8864
8865         * acinclude.m4: Include ../../config/acx.m4.
8866         * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8867         * configure, config.in: Regenerate.
8868         * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8869         * server.c (gdbserver_version): Print PKGVERSION.
8870         (gdbsrever_usage): Add stream parameter.  Print REPORT_BUGS_TO.
8871         (main): Adjust gdbserver_usage calls.
8872         * gdbreplay.c (version, host_name): Add declarations.
8873         (gdbreplay_version, gdbreplay_usage): New.
8874         (main): Accept --version and --help options.
8875
8876 2008-06-04  Daniel Jacobowitz  <dan@codesourcery.com>
8877
8878         * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8879         (arm_breakpoint_at): Handle Thumb.
8880         (the_low_target): Add comment.
8881
8882 2008-05-29  Ulrich Weigand  <uweigand@de.ibm.com>
8883
8884         * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8885
8886 2008-05-09  Doug Evans  <dje@google.com>
8887
8888         * server.h (decode_search_memory_packet): Declare.
8889         * remote-utils.c (decode_search_memory_packet): New fn.
8890         * server.c (handle_search_memory_1): New fn.
8891         (handle_search_memory): New fn.
8892         (handle_query): Process qSearch:memory packets.
8893
8894 2008-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
8895
8896         * regcache.c (registers_length): Remove.
8897         (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8898         full register packet.
8899         * regcache.h (registers_length): Remove prototype.
8900         * server.h (PBUFSIZ): Define to 16384.
8901
8902 2008-05-03  Ulrich Weigand  <uweigand@de.ibm.com>
8903
8904         * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8905         powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8906         powerpc-64l.o, and powerpc-altivec64l.o.
8907         Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8908         rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8909         rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8910         rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8911         rs6000/power-linux.xml, and rs6000/power64-linux.xml
8912         to srv_xmlfiles.
8913
8914         * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8915         (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8916         (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8917         (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8918         (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8919         (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8920         (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8921         (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8922         (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8923         (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8924         (clean): Update.
8925
8926         * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8927         (init_registers_powerpc_32l): ... this new prototype.
8928         (init_registers_powerpc_32): Remove, replace by ...
8929         (init_registers_powerpc_altivec32l): ... this new prototype.
8930         (init_registers_powerpc_e500): Remove, replace by ...
8931         (init_registers_powerpc_e500l): ... this new prototype.
8932         (init_registers_ppc64): Remove, replace by ...
8933         (init_registers_powerpc_64l): ... this new prototype.
8934         (init_registers_powerpc_64): Remove, replace by ...
8935         (init_registers_powerpc_altivec64l): ... this new prototype.
8936         (ppc_num_regs): Set to 73.
8937         (PT_ORIG_R3, PT_TRAP): Define if necessary.
8938         (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
8939         (ppc_cannot_store_register): Handle orig_r3 and trap.
8940         (ppc_arch_setup): Update init_registers_... calls.
8941         (ppc_fill_gregset): Handle orig_r3 and trap.
8942
8943         * inferiors.c (clear_inferiors): Reset current_inferior.
8944
8945 2008-04-23  Paolo Bonzini  <bonzini@gnu.org>
8946
8947         * acinclude.m4: Add override.m4.
8948         * configure: Regenerate.
8949
8950 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
8951
8952         * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
8953         initial call to init_register_ppc64.
8954
8955 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
8956
8957         * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
8958         single powerpc*-*-linux* case.
8959         (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
8960
8961 2008-04-17  Ulrich Weigand  <uweigand@de.ibm.com>
8962
8963         * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
8964         srv_regobj.  Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
8965         from reg_xmlfiles.
8966         * linux-ppc-low.c: Include <elf.h>.
8967         (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
8968         (ppc_hwcap): New global variable.
8969         (ppc_regmap): Remove __SPE__ #ifdef sections.
8970         (ppc_regmap_e500): New global variable.
8971         (ppc_cannot_store_register): Update __SPE__ special case.
8972         (ppc_get_hwcap): New function.
8973         (ppc_arch_setup): Use it to determine whether inferior supports
8974         AltiVec or SPE registers.  Set the_low_target.regmap if appropriate.
8975         (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
8976         Do not access registers if target does not support AltiVec.
8977         (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
8978         Do not access registers if target does not support SPE.
8979         (target_regsets): Unconditionally include AltiVec and SPE regsets.
8980
8981 2008-04-17  Daniel Jacobowitz  <dan@codesourcery.com>
8982
8983         * linux-low.c (disabled_regsets, num_regsets): New.
8984         (use_regsets_p): Delete.
8985         (linux_wait_for_process): Clear disabled_regsets.
8986         (regsets_fetch_inferior_registers): Check and set it.
8987         (regsets_store_inferior_registers): Likewise.
8988         (linux_fetch_registers, linux_store_registers): Do not use
8989         use_regsets_p.
8990         (initialize_low): Allocate disabled_regsets.
8991
8992 2008-04-14  Daniel Jacobowitz  <dan@codesourcery.com>
8993
8994         * Makefile.in (LIBOBJS): New.
8995         (OBS): Use LIBOBJS.
8996         (memmem.o): New rule.
8997         * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
8998         * configure: Regenerated.
8999
9000 2008-04-04  Ulrich Weigand  <uweigand@de.ibm.com>
9001
9002         * server.c (handle_query): Never return "unsupported" for
9003         qXfer:features:read queries.
9004
9005 2008-03-27  Ulrich Weigand  <uweigand@de.ibm.com>
9006
9007         * server.c (get_features_xml): Fix inverted condition.
9008         (handle_query): Always support qXfer:feature:read.
9009
9010 2008-03-10  Daniel Jacobowitz  <dan@codesourcery.com>
9011
9012         * server.c (wrapper_argv): New.
9013         (start_inferior): Handle wrapper_argv.  If set, expect an extra
9014         trap.
9015         (gdbserver_usage): Document --wrapper.
9016         (main): Parse --wrapper.
9017
9018 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
9019
9020         * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
9021         powerpc-*-linux* to srv_regobj and reg_xmlfiles.
9022         * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
9023         (ppc_set_pc): Likewise.
9024         (ppc_arch_setup): New function.
9025         (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
9026         of collect_register.
9027         (the_low_target): Use ppc_arch_setup as arch_setup initializer.
9028
9029 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
9030
9031         * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
9032         instead of linux-ppc64-low.o.
9033         * linux-ppc64-low.c: Remove file.
9034         * Makefile.in (SFILES): Remove linux-ppc64-low.c.
9035         (linux-ppc64-low.o): Remove rule.
9036
9037         * linux-ppc-low.c (init_registers_ppc64): Add prototype.
9038         (init_registers_powerpc_64): Likewise.
9039         (ppc_regmap): Conditionally define depending on __powerpc64__.
9040         (ppc_cannot_store_register): Do not special-case "fpscr" when
9041         compiled on __powerpc64__.
9042         (ppc_collect_ptrace_register): New function.
9043         (ppc_supply_ptrace_register): New function.
9044         (ppc_breakpoint): Change type to "unsigned int".
9045         (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
9046         (the_low_target): Conditionally provide initializers for the
9047         arch_setup member depending on __powerpc64__.  Install
9048         collect_ptrace_register and supply_ptrace_register members.
9049
9050 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
9051
9052         * regcache.h (gdbserver_xmltarget): Add extern declaration.
9053         * server.c (gdbserver_xmltarget): Define.
9054         (get_features_xml): Use it to replace "target.xml" and arch_string.
9055
9056         * configure.srv: Remove srv_xmltarget.  Add XML files that were
9057         mentioned there to srv_xmlfiles instead.  Remove conditional tests
9058         on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
9059         srv_xmlfiles and srv_regobj to include all possible choices.
9060         * configure.ac (srv_xmltarget): Remove.
9061         (srv_xmlfiles): Do not add "target.xml".
9062         (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
9063         checks for supplementary target information.
9064         * configure: Regenerate.
9065         * Makefile.in (XML_TARGET): Remove.
9066         (target.xml): Remove rule.
9067         (clean): Do not clean up target.xml.
9068         (.PRECIOUS): Do not mention target.xml.
9069
9070         * target.h (struct target_ops): Remove arch_string member.
9071         * linux-low.c (linux_arch_string): Remove.
9072         (linux_target_ops): Remove arch_string initializer.
9073         * linux-low.h (struct linux_target_ops): Remove arch_string member.
9074         * linux-i386-low.c (the_low_target): Remove arch_string initializer.
9075         * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
9076         * spu-low.c (spu_arch_string): Remove.
9077         (spu_target_ops): Remove arch_string initializer.
9078         * win32-low.c (win32_arch_string): Remove.
9079         (win32_target_ops): Remove arch_string initializer.
9080         * win32-low.h (struct win32_target_ops): Remove arch_string member.
9081         * win32-arm-low.c (the_low_target): Remove arch_string initializer.
9082         * win32-i368-low.c (the_low_target): Remove arch_string initializer.
9083
9084 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
9085
9086         * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
9087         by collect_ptrace_register and supply_ptrace_register hooks.
9088         * linux-low.c (fetch_register): Use supply_ptrace_register callback
9089         instead of checking for the_low_target.left_pad_xfer.
9090         (usr_store_inferior_registers): Use collect_ptrace_register callback
9091         instead of checking for the_low_target.left_pad_xfer.
9092
9093         * linux-s390-low.c (s390_collect_ptrace_register): New function.
9094         (s390_supply_ptrace_register): Likewise.
9095         (s390_fill_gregset): Call s390_collect_ptrace_register.
9096         (the_low_target): Update.
9097
9098         * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
9099         (ppc_supply_ptrace_register): Likewise.
9100         (the_low_target): Update.
9101
9102         * linux-i386-low.c (the_low_target): Update.
9103         * linux-x86-64-low.c (the_low_target): Update.
9104
9105 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
9106
9107         * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
9108         reg-s390.o and reg-s390x.o.
9109
9110         * linux-low.c (new_inferior): New global variable.
9111         (linux_create_inferior, linux_attach): Set it.
9112         (linux_wait_for_process): Call the_low_target.arch_setup after the
9113         target has stopped for the first time.
9114         (initialize_low): Do not call the_low_target.arch_setup.
9115
9116         * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
9117         (s390_set_pc): Likewise.
9118         (s390_arch_setup): New function.
9119         (the_low_target): Use s390_arch_setup as arch_setup routine.
9120
9121         * regcache.c (realloc_register_cache): New function.
9122         (set_register_cache): Call it for each existing regcache.
9123
9124 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
9125
9126         * server.h (init_registers): Remove prototype.
9127
9128         * linux-low.h (struct linux_target_ops): Add arch_setup field.
9129         * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
9130         instead of init_registers ().
9131         * linux-arm-low.c (init_registers_arm): Add prototype.
9132         (init_registers_arm_with_iwmmxt): Likewise.
9133         (the_low_target): Add initializer for arch_setup field.
9134         * linux-cris-low.c (init_registers_cris): Add prototype.
9135         (the_low_target): Add initializer for arch_setup field.
9136         * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
9137         (the_low_target): Add initializer for arch_setup field.
9138         * linux-i386-low.c (init_registers_i386_linux): Add prototype.
9139         (the_low_target): Add initializer for arch_setup field.
9140         * linux-ia64-low.c (init_registers_ia64): Add prototype.
9141         (the_low_target): Add initializer for arch_setup field.
9142         * linux-m32r-low.c (init_registers_m32r): Add prototype.
9143         (the_low_target): Add initializer for arch_setup field.
9144         * linux-m68k-low.c (init_registers_m68k): Add prototype.
9145         (the_low_target): Add initializer for arch_setup field.
9146         * linux-mips-low.c (init_registers_mips_linux): Add prototype.
9147         (init_registers_mips64_linux): Likewise.
9148         (the_low_target): Add initializer for arch_setup field.
9149         * linux-ppc-low.c (init_registers_ppc): Add prototype.
9150         (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
9151         (the_low_target): Add initializer for arch_setup field.
9152         * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
9153         (init_registers_powerpc_64): Likewise.
9154         (the_low_target): Add initializer for arch_setup field.
9155         * linux-s390-low.c (init_registers_s390): Add prototype.
9156         (init_registers_s390x): Likewise.
9157         (the_low_target): Add initializer for arch_setup field.
9158         * linux-sh-low.c (init_registers_sh): Add prototype.
9159         (the_low_target): Add initializer for arch_setup field.
9160         * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
9161         (the_low_target): Add initializer for arch_setup field.
9162         * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
9163         (the_low_target): Add initializer for arch_setup field.
9164
9165         * win32-low.h (struct win32_target_ops): Add arch_setup field.
9166         * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
9167         instead of init_registers ().
9168         * win32-arm-low.c (init_registers_arm): Add prototype.
9169         (the_low_target): Add initializer for arch_setup field.
9170         * win32-i386-low.c (init_registers_i386): Add prototype.
9171         (the_low_target): Add initializer for arch_setup field.
9172
9173         * spu-low.c (init_registers_spu): Add prototype.
9174         (initialize_low): Call initialie_registers_spu () instead of
9175         initialize_registers ().
9176
9177 2008-02-19  Pedro Alves  <pedro@codesourcery.com>
9178
9179         * server.c (handle_v_requests): When handling the vRun and vAttach
9180         packets, if already debugging a process, don't kill it.  Return an
9181         error instead.
9182
9183 2008-02-17  Daniel Jacobowitz  <dan@codesourcery.com>
9184
9185         * server.c (handle_query): Correct length check.
9186
9187 2008-02-14  Pedro Alves  <pedro_alves@portugalmail.pt>
9188
9189         * win32-low.c (do_initial_child_stuff): Add process handle
9190         parameter.  Set current_process_handle and current_process_id from the
9191         parameters. Clear globals.
9192         (win32_create_inferior): Don't set current_process_handle and
9193         current_process_id here.  Instead pass them on the call to
9194         do_initial_child_stuff.
9195         (win32_attach): Likewise.
9196         (win32_clear_inferiors): New.
9197         (win32_kill): Don't close the current process handle or the
9198         current thread handle here.  Instead call win32_clear_inferiors.
9199         (win32_detach): Don't open a new handle to the process.  Call
9200         win32_clear_inferiors.
9201         (win32_join): Don't rely on current_process_handle; open a new
9202         handle using the process id.
9203         (win32_wait): Call win32_clear_inferiors when the inferior process
9204         has exited.
9205
9206 2008-02-14  Daniel Jacobowitz  <dan@codesourcery.com>
9207
9208         * server.c (monitor_show_help): Add "exit".
9209
9210 2008-02-11  Maxim Grigoriev  <maxim2405@gmail.com>
9211
9212         * Makefile.in (SFILES): Add linux-xtensa-low.c.
9213         (clean): Add reg-xtensa.c.
9214         (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
9215         * configure.srv (xtensa*-*-linux*) New target.
9216         * linux-xtensa-low.c: New.
9217         * xtensa-xtregs.c: New.
9218
9219 2008-02-01  Pedro Alves  <pedro_alves@portugalmail.pt>
9220
9221         * hostio.c: Don't include errno.h.
9222         (errno_to_fileio_errno): Move to hostio-errno.
9223         * hostio.c: (hostio_error): Remove the error parameter.  Defer the
9224         error number outputting to the target->hostio_last_error callback.
9225         (hostio_packet_error): Use FILEIO_EINVAL directly.
9226         (handle_open, handle_pread, hostio_error, handle_unlink): Update
9227         calls to hostio_error.
9228         * hostio-errno.c: New.
9229         * server.h (hostio_last_error_from_errno): Declare.
9230         * target.h (target_ops): Add hostio_last_error member.
9231         * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
9232         as hostio_last_error handler.
9233         * spu-low.c (spu_target_ops): Likewise.
9234         * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
9235         (wince_hostio_last_error): New functions.
9236         (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
9237         as hostio_last_error handler.
9238         (win32_target_ops) [!_WIN32_WCE]: Register
9239         hostio_last_error_from_errno as hostio_last_error handler.
9240         * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
9241         (hostio-errno.o): New rule.
9242         * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
9243         * configure.srv (srv_hostio_err_objs): New variable.  Default to
9244         hostio-errno.o.
9245         (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
9246         * configure: Regenerate.
9247
9248 2008-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
9249
9250         * linux-low.c (linux_attach_lwp): Do not _exit after errors.
9251         (linux_kill, linux_detach): Clean up the process list.
9252         * remote-utils.c (remote_open): Improve port number parsing.
9253         (putpkt_binary, input_interrupt): Only send interrupts if the target
9254         is running.
9255         * server.c (extended_protocol): Make static.
9256         (attached): Define earlier.
9257         (exit_requested, response_needed, program_argv): New variables.
9258         (target_running): New.
9259         (start_inferior): Clear attached here.
9260         (attach_inferior): Set attached here.
9261         (require_running): Define.
9262         (handle_query): Use require_running and target_running.  Implement
9263         "monitor exit".
9264         (handle_v_attach, handle_v_run): New.
9265         (handle_v_requests): Use require_running.  Handle vAttach and vRun.
9266         (gdbserver_usage): Update.
9267         (main): Redo argument parsing.  Handle --debug and --multi.  Handle
9268         --attach along with other options or after the port.  Save
9269         program_argv.  Support no initial program.  Resynchronize
9270         communication with GDB after an error.  Handle "monitor exit".
9271         Use require_running and target_running.  Always allow the extended
9272         protocol.  Do not error out for Hc0 or Hc-1.  Do not automatically
9273         restart in extended mode.
9274         * README: Refer to the GDB manual.  Update --attach usage.
9275
9276 2007-12-20  Andreas Schwab  <schwab@suse.de>
9277
9278         * linux-low.c (STACK_SIZE): Define.
9279         (linux_tracefork_child): Use it.  Use __clone2 on ia64.
9280         (linux_test_for_tracefork): Likewise.
9281
9282 2007-12-18  Daniel Jacobowitz  <dan@codesourcery.com>
9283
9284         * linux-low.c (linux_wait_for_event): Update messages.  Do not
9285         reinsert auto-delete breakpoints.
9286         * mem-break.c (struct breakpoint): Change return type of handler to
9287         int.
9288         (set_breakpoint_at): Update handler type.
9289         (reinsert_breakpoint_handler): Return 1 instead of calling
9290         delete_breakpoint.
9291         (reinsert_breakpoint_by_bp): Check for the original breakpoint before
9292         setting a new one.
9293         (check_breakpoints): Delete auto-delete breakpoints and return 2.
9294         * mem-break.h (set_breakpoint_at): Update handler type.
9295         * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
9296         * win32-low.c (auto_delete_breakpoint): New.
9297         (get_child_debug_event): Use it.
9298
9299 2007-12-16  Daniel Jacobowitz  <dan@codesourcery.com>
9300
9301         * configure.ac: Check for pread and pwrite.
9302         * hostio.c (handle_pread): Fall back to lseek and read.
9303         (handle_pwrite): Fall back to lseek and write.
9304         * config.in, configure: Regenerated.
9305
9306 2007-12-07  Daniel Jacobowitz  <dan@codesourcery.com>
9307
9308         * server.c (myresume): Add own_buf argument.
9309         (main): Update calls.
9310
9311 2007-12-06  Daniel Jacobowitz  <dan@codesourcery.com>
9312
9313         * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
9314         * remote-utils.c (remote_open): Do not call disable_async_io.
9315         (block_async_io): Delete.
9316         (unblock_async_io): Make static.
9317         (initialize_async_io): New.
9318         * server.c (handle_v_cont): Handle async I/O here.
9319         (myresume): Likewise.  Move other common resume tasks here...
9320         (main): ... from here.  Call initialize_async_io.  Disable async
9321         I/O before the main loop.
9322         * server.h (initialize_async_io): Declare.
9323         (block_async_io, unblock_async_io): Delete prototypes.
9324         * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9325
9326 2007-12-06  Mick Davis  <mickd@goanna.iinet.net.au>
9327
9328         * remote-utils.c (readchar): Allow binary data in received messages.
9329
9330 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
9331
9332         * win32-low.c (attaching): New global.
9333         (win32_create_inferior): Clear the `attaching' global.
9334         (win32_attach): Set the `attaching' global.
9335         (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9336         attaching.  Only set a breakpoint at the entry point if not
9337         attaching.
9338
9339 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
9340
9341         * server.c (main): Don't report dll events on the initial
9342         connection on attaches.
9343
9344 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
9345
9346         * server.c (main): Relax numerical bases supported for the pid of
9347         the --attach command line argument.
9348
9349 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
9350
9351         * win32-low.c (win32_attach): Call OpenProcess before
9352         DebugActiveProcess, not after.  Add last error output to error
9353         call.
9354
9355 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
9356
9357         * win32-low.c (win32_get_thread_context)
9358         (win32_set_thread_context): New functions.
9359         (thread_rec): Use win32_get_thread_context.
9360         (continue_one_thread, win32_resume): Use win32_set_thread_context.
9361         * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9362         field.
9363
9364 2007-12-03  Leo Zayas
9365             Pedro Alves  <pedro_alves@portugalmail.pt>
9366
9367         * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9368         global variables.
9369         (child_add_thread): Minor cleanup.
9370         (child_continue): Resume artificially suspended threads before
9371         calling ContinueDebugEvent.
9372         (suspend_one_thread): New.
9373         (fake_breakpoint_event): New.
9374         (get_child_debug_event): Change return type to int.  Check here if
9375         gdb sent an interrupt request.  If a soft interrupt was requested,
9376         fake a breakpoint event.  Return 0 if there is no event to handle,
9377         and 1 otherwise.
9378         (win32_wait): Don't check here if gdb sent an interrupt request.
9379         Ensure there is a valid event to handle.
9380         (win32_request_interrupt): Add soft interruption method as last
9381         resort.
9382
9383 2007-12-03  Leo Zayas
9384             Pedro Alves  <pedro_alves@portugalmail.pt>
9385
9386         * win32-low.h (win32_thread_info): Add descriptions to the
9387         structure members.  Replace `suspend_count' counter by a
9388         `suspended' flag.
9389         * win32-low.c (thread_rec): Update condition of when to get the
9390         context from the inferior.  Rely on ContextFlags being set if it
9391         has already been retrieved.  Only suspend the inferior thread if
9392         we haven't already.  Warn if that fails.
9393         (continue_one_thread): s/suspend_count/suspended/.  Only call
9394         ResumeThread once.  Warn if that fails.
9395
9396 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
9397
9398         * win32-low.c (win32_wait): Don't read from the inferior when it
9399         has already exited.
9400
9401 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
9402
9403         * Makefile.in (win32_low_h): New variable.
9404         (win32-low.o): Add dependency on $(win32_low_h).
9405         (win32-arm-low.o, win32-i386-low.o): New rules.
9406
9407 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
9408
9409         * hostio.c: Correct copyright year.
9410
9411 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
9412
9413         * Makefile.in (OBS): Add hostio.o.
9414         (hostio.o): New rule.
9415         * server.h (handle_vFile): Declare.
9416         * hostio.c: New file.
9417         * server.c (handle_v_requests): Take packet_len and new_packet_len
9418         for binary packets.  Call handle_vFile.
9419         (main): Update call to handle_v_requests.
9420
9421 2007-11-05  Daniel Jacobowitz  <dan@codesourcery.com>
9422
9423         * linux-low.c: Include <sched.h>.
9424
9425 2007-11-01  Daniel Jacobowitz  <dan@codesourcery.com>
9426
9427         * linux-low.c (linux_tracefork_grandchild): New.
9428         (linux_tracefork_child): Use clone.
9429         (linux_test_for_tracefork): Use clone; allocate and free a stack.
9430
9431 2007-10-31  Joel Brobecker  <brobecker@adacore.com>
9432
9433         * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9434
9435 2007-10-24  Daniel Jacobowitz  <dan@codesourcery.com>
9436
9437         * linux-low.c (handle_extended_wait): Handle unexpected signals.
9438
9439 2007-10-23  Daniel Jacobowitz  <dan@codesourcery.com>
9440
9441         * inferiors.c (change_inferior_id): Delete.
9442         (add_pid_to_list, pull_pid_from_list): New.
9443         * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9444         (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9445         (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9446         (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9447         (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9448         (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9449         (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9450         (using_threads): Always set to 1.
9451         (handle_extended_wait): New.
9452         (add_process): Do not set TID.
9453         (linux_create_inferior): Set must_set_ptrace_flags.
9454         (linux_attach_lwp): Remove TID argument.  Do not check using_threads.
9455         Use PTRACE_SETOPTIONS.  Call new_thread_notify.  Update all callers.
9456         (linux_thread_alive): Rename TID argument to LWPID.
9457         (linux_wait_for_process): Handle unknown processes.  Do not use TID.
9458         (linux_wait_for_event): Do not use TID or check using_threads.  Update
9459         call to dead_thread_notify.  Call handle_extended_wait.
9460         (linux_create_inferior): Use PTRACE_SETOPTIONS.
9461         (send_sigstop): Delete sigstop_sent.
9462         (wait_for_sigstop): Avoid TID.
9463         (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9464         (linux_test_for_tracefork): New.
9465         (linux_lookup_signals): Use thread_db_active and
9466         linux_supports_tracefork_flag.
9467         (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9468         * linux-low.h (get_process_thread): Avoid TID.
9469         (struct process_ifo): Move thread_known and tid to the end.  Remove
9470         sigstop_sent.
9471         (linux_attach_lwp, thread_db_init): Update prototypes.
9472         * server.h (change_inferior_id): Delete prototype.
9473         (add_pid_to_list, pull_pid_from_list): New prototypes.
9474         * thread-db.c (thread_db_use_events): New.
9475         (find_first_thread): Rename to...
9476         (find_one_thread): ...this.  Update callers and messages.  Do not
9477         call fatal.  Check thread_db_use_events.  Do not call
9478         change_inferior_id or new_thread_notify.
9479         (maybe_attach_thread): Update.  Do not call new_thread_notify.
9480         (thread_db_init): Set thread_db_use_events.  Check use_events.
9481         * utils.c (fatal, warning): Correct message prefix.
9482
9483 2007-10-15  Daniel Jacobowitz  <dan@codesourcery.com>
9484
9485         * Makefile.in (clean): Remove new files.
9486         (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9487         (powerpc-64.o, powerpc-64.c): New rules.
9488         * configure.srv: Use alternate register sets for powerpc64-*-linux*
9489         with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9490         with SPE.
9491         * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9492         SPE targets.
9493         (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9494         (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9495         (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9496         (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9497         (target_regsets): Add AltiVec and SPE register sets.
9498         * configure.ac: Check for AltiVec and SPE.
9499         * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9500         (ppc_fill_vrregset, ppc_store_vrregset): New.
9501         (target_regsets): Add AltiVec register set.
9502         * configure: Regenerated.
9503
9504 2007-09-19  Daniel Jacobowitz  <dan@codesourcery.com>
9505
9506         * linux-low.c (O_LARGEFILE): Define.
9507         (linux_read_memory): Use /proc/PID/mem.
9508         * configure.ac: Use AC_GNU_SOURCE.  Check for pread64.
9509         * configure, config.in: Regenerated.
9510
9511 2007-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
9512
9513         * linux-low.c (linux_wait_for_event): Do not pass signals while
9514         single-stepping.
9515
9516 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
9517
9518         * win32-low.c (create_process): New.
9519         (win32_create_inferior): Use create_process instead of
9520         CreateProcess.  If create_process failed retry appending an ".exe"
9521         suffix.  Store the GetLastError result immediatelly after
9522         create_process calls and use it on the call to error.
9523
9524 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
9525
9526         * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9527
9528 2007-08-23  Joel Brobecker  <brobecker@adacore.com>
9529
9530         * configure.ac: Switch license to GPLv3.
9531
9532 2007-08-01  Michael Snyder  <msnyder@access-company.com>
9533
9534         * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9535
9536 2007-07-31  Pedro Alves  <pedro_alves@portugalmail.pt>
9537
9538         * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9539         typedef.
9540         (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9541         (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL.  Get
9542         CloseToolhelp32Snapshot.
9543         (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9544         CloseToolhelp32Snapshot.
9545
9546 2007-07-27  Michael Snyder  <michael.snyder@access-company.com>
9547
9548         * server.c (main): Check for inferior exit before main loop.
9549
9550 2007-07-18  Pedro Alves  <pedro_alves@portugalmail.pt>
9551
9552         * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9553         instead of on tmp_desc.
9554
9555 2007-07-17  Pedro Alves  <pedro_alves@portugalmail.pt>
9556             Daniel Jacobowitz  <dan@codesourcery.com>
9557
9558         * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9559         (add_thread): Minor cleanups.
9560         (clear_inferiors): Move lower in the file.  Clear the DLL
9561         list.
9562         (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9563         * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9564         (xml_escape_text): New.
9565         * server.c (handle_query): Handle qXfer:libraries:read.  Report it
9566         for qSupported.
9567         (handle_v_cont): Report errors.
9568         (gdbserver_version): Update.
9569         (main): Correct size of own_buf.  Do not report initial DLL events.
9570         * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9571         (unloaded_dll, xml_escape_text): New.
9572         * win32-low.c (enum target_waitkind): Update comments.
9573         (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9574         (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9575         (win32_EnumProcessModules, win32_GetModuleInformation)
9576         (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9577         (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9578         (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9579         (win32_Module32First, win32_Module32Next, load_toolhelp)
9580         (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9581         (get_child_debug_event): Handle DLL events.
9582         (win32_wait): Likewise.
9583
9584 2007-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
9585
9586         * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9587         * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9588
9589 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
9590
9591         * win32-low.c (handle_output_debug_string): Ignore event if not
9592         waiting.
9593
9594 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
9595
9596         * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9597
9598 2007-07-03  Daniel Jacobowitz  <dan@codesourcery.com>
9599
9600         * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9601
9602 2007-07-02  Daniel Jacobowitz  <dan@codesourcery.com>
9603
9604         * inferiors.c (change_inferior_id): Add comment.
9605         * linux-low.c (check_removed_breakpoint): Add an early
9606         prototype.  Improve debug output.
9607         (linux_attach): Doc update.
9608         (linux_detach_one_process, linux_detach): Clean up before releasing
9609         each process.
9610         (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9611         * linux-low.h (struct process_info): Doc improvement.
9612         * mem-break.c (delete_all_breakpoints): New.
9613         * mem-break.h (delete_all_breakpoints): New prototype.
9614         * thread-db.c (find_first_thread): New.
9615         (thread_db_create_event): Call it instead of
9616         thread_db_find_new_threads.  Clean up unused variables.
9617         (maybe_attach_thread): Remove first thread handling.
9618         (thread_db_find_new_threads): Use find_first_thread.
9619         (thread_db_get_tls_address): Likewise.
9620
9621 2007-06-27  Daniel Jacobowitz  <dan@codesourcery.com>
9622
9623         * thread-db.c (thread_db_find_new_threads): Add prototype.
9624         (thread_db_create_event): Check for the main thread before adding
9625         a new thread.
9626         (maybe_attach_thread): Only enable event reporting if TID == 0.
9627         (thread_db_get_tls_address): Check for new threads.
9628
9629 2007-06-20  Daniel Jacobowitz  <dan@codesourcery.com>
9630
9631         * linux-low.c (linux_create_inferior): Try execv before execvp.
9632         * spu-low.c (spu_create_inferior): Likewise.
9633
9634 2007-06-13  Mike Frysinger  <vapier@gentoo.org>
9635
9636         * linux-low.c (linux_create_inferior): Change execv to execvp.
9637         * spu-low.c (spu_create_inferior): Likewies.
9638
9639 2007-06-13  Daniel Jacobowitz  <dan@codesourcery.com>
9640
9641         * Makefile.in (clean): Clean new files instead of deleted ones.
9642         (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9643         (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9644         rules.
9645         * configure.srv: Specify XML files and new regformats for MIPS and
9646         MIPS64 GNU/Linux.
9647         * linux-mips-low.c (mips_num_regs): Set to only used registers.
9648         (mips_regmap): Do not fetch $0.  Remove unused registers.  Add
9649         an entry for the restart register.
9650         (mips_cannot_fetch_register, mips_cannot_store_register)
9651         (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9652         register names to match the XML descriptions.
9653         (mips_fill_gregset, mips_store_gregset): Likewise.  Handle the
9654         restart register instead of $0.
9655
9656 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
9657             Markus Deuling  <deuling@de.ibm.com>
9658
9659         * remote-utils.c (decode_xfer_write): New function.
9660         * server.h (decode_xfer_write): Add prototype.
9661         * server.c (handle_query): Add PACKET_LEN argument.  Support
9662         qXfer:spu:read and qXfer:spu:write packets.
9663         (main): Pass packet_len to handle_query.
9664         * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9665         * target.h (target_ops): Add qxfer_spu.
9666
9667 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
9668
9669         * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9670         accessing non-seekable spufs files.
9671
9672 2007-05-16  Markus Deuling  <deuling@de.ibm.com>
9673
9674         * server.c (handle_query): Add reply for qC packet.
9675
9676 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
9677             Leo Zayas  <lerele@champenstudios@com>
9678
9679         * server.h (check_remote_input_interrupt_request): New function.
9680         * remote_utils.c (INVALID_DESCRIPTOR): New define.
9681         (remote_desc): Initialize with INVALID_DESCRIPTOR.
9682         (input_interrupt): Expose on USE_WIN32API too.  Fix whitespace.
9683         (check_remote_input_interrupt_request): New function.
9684         * server.h (check_remote_input_interrupt_request): Declare.
9685         * win32-low.c (winapi_DebugBreakProcess,
9686         winapi_GenerateConsoleCtrlEvent): New typedefs.
9687         (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9688         to 250 ms.
9689         (win32_wait): Check for remote interrupt request
9690         with check_remote_input_interrupt_request.
9691         (win32_request_interrupt): New function.
9692         (win32_target_op): Set request_interrupt to win32_request_interrupt.
9693
9694 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
9695
9696         * win32-low.c (debug_registers_changed,
9697         debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9698         CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9699         CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9700         (thread_rec): Get context using the low target.
9701         (child_add_thread): Call thread_added on the low target,
9702         which does the same thing.
9703         (regptr): Delete.
9704         (do_initial_child_stuff): Remove debug registers references.
9705         Set context using the low target.  Resume threads after
9706         setting the contexts.
9707         (child_continue): Remove dead variable.  Remove debug
9708         registers references.
9709         (child_fetch_inferior_registers): Go through the low target.
9710         (do_child_store_inferior_registers): Remove.
9711         (child_store_inferior_registers): Go through the low target.
9712         (win32_resume): Remove debug registers references.
9713         Set context using the low target.
9714         (handle_exception): Change return type to void.  Don't record
9715         context here.  Set status to TARGET_WAITKIND_SPURIOUS on a
9716         first chance exception.
9717         (get_child_debug_event): Change return type to void.  Remove
9718         goto loop.  Always return after waiting for debug event.
9719         (win32_wait): Convert to switch statement.  Handle spurious
9720         events.
9721
9722         * win32-i386-low.c (debug_registers_changed,
9723         debug_registers_used): New.
9724         (initial_stuff): Rename to ...
9725         (i386_initial_stuff): ... this.  Clear debug registers
9726         state variables.
9727         (store_debug_registers): Delete.
9728         (i386_get_thread_context): New.
9729         (load_debug_registers): Delete.
9730         (i386_set_thread_context): New.
9731         (i386_thread_added): New.
9732         (single_step): Rename to ...
9733         (i386_single_step): ... this.
9734         (do_fetch_inferior_registers): Rename to ...
9735         (i386_fetch_inferior_register): ... this.
9736         (i386_store_inferior_register): New.
9737         (the_low_target): Adapt to new interface.
9738
9739         * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9740         (arm_get_thread_context): New.
9741         (arm_set_thread_context): New.
9742         (regptr): New.
9743         (do_fetch_inferior_registers): Rename to ...
9744         (arm_fetch_inferior_register): ... this.
9745         (arm_store_inferior_register): New.
9746         (arm_wince_breakpoint): Reimplement as unsigned long.
9747         (arm_wince_breakpoint_len): Define.
9748         (the_low_target): Adapt to new interface.
9749
9750         * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9751         load_debug_registers.  Add get_thread_context, set_thread_context,
9752         thread_added and store_inferior_register.  Rename
9753         fetch_inferior_registers to fetch_inferior_register.
9754         (regptr): Remove declaration.
9755
9756 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
9757
9758         * linux-low.c (linux_detach): Change return type to int.  Return 0.
9759         * spu-low.c (spu_detach): Likewise.
9760
9761 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
9762
9763         * target.h (target_ops): Change return type of detach to int.
9764         Add join.
9765         (join_inferior): New.
9766         * server.c (main): Don't skip detach support on mingw32.
9767         If the inferior doesn't support detaching return error.
9768         Call join_inferior instead of using waitpid.
9769         * linux-low.c (linux_join): New.
9770         (linux_target_op): Add linux_join.
9771         * spu-low.c (spu_join): New.
9772         (spu_target_ops): Add spu_join.
9773         * win32-low.c (win32_detach): Adapt to new interface.
9774         Reopen current_process_handle before detaching.  Issue a child
9775         resume before detaching.
9776         (win32_join): New.
9777         (win32_target_op): Add win32_join.
9778
9779 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
9780
9781         * win32-low.c (win32-attach): Fix return value.
9782         * target.h (target_ops): Describe ATTACH return values.
9783
9784 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
9785
9786         * win32-low.c (GETPROCADDRESS): Define.
9787         (winapi_DebugActiveProcessStop): Add WINAPI.  typedef as pointer.
9788         (winapi_DebugSetProcessKillOnExit): Likewise.
9789         (win32_create_inferior): Force usage of ansi CreateProcessA.
9790         (win32_attach): Use GETPROCADDRESS.
9791         (win32_detach): Likewise.
9792
9793 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
9794
9795         * win32-low.c (win32_wait): Don't use WSTOPSIG.
9796
9797 2007-03-30  Pedro Alves  <pedro_alves@portugalmail.pt>
9798
9799         * win32-low.c: Commit leftover changes from 2007-03-29.
9800
9801 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
9802
9803         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9804         fields short instead of int.  Add explicit padding.
9805         (i387_cache_to_fsave): Remove unnecessary casts.
9806         (i387_fsave_to_cache): Doc fix.
9807         (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9808
9809 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
9810
9811         * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9812         (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9813
9814 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
9815
9816         * configure.srv (arm*-*-mingw32ce*): Move near the other
9817         arm targets.
9818
9819 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
9820
9821         * configure.ac: Add errno checking.
9822         (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9823         sys/file.h and malloc.h.
9824         (AC_CHECK_DECLS): Add perror.
9825         (srv_mingwce): Handle.
9826         * configure.srv (i[34567]86-*-cygwin*): Add
9827         win32-i386-low.o to srv_tgtobj.
9828         (i[34567]86-*-mingw*): Likewise.
9829         (arm*-*-mingw32ce*): Add case.
9830         * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9831         HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9832         [__MINGW32CE__] (strerror): New function.
9833         [__MINGW32CE__] (errno): Define to GetLastError.
9834         [__MINGW32CE__] (COUNTOF): New macro.
9835         (remote_open): Remove extra close call.
9836         * mem-break.c (delete_breakpoint_at): New function.
9837         * mem-break.h (delete_breakpoint_at): Declare.
9838         * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9839         HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9840         [USE_WIN32API] (read, write): Add char* casts.
9841         * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9842         * server.h: Include wincecompat.h on Windows CE.
9843         [HAVE_ERRNO_H]: Check.
9844         (perror): Declare if not declared.
9845         * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9846         (perror_with_name): Remove errno declaration.
9847         * wincecompat.h: New.
9848         * wincecompat.c: New.
9849         * win32-low.h: New.
9850         * win32-arm-low.c: New.
9851         * win32-i386-low.c: New.
9852         (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9853         (OUTMSG2): Make it safe.
9854         (_T): New macro.
9855         (COUNTOF): New macro.
9856         (NUM_REGS): Get it from the low target.
9857         (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9858         CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9859         (thread_rec): Let low target handle debug registers.
9860         (child_add_thread): Likewise.
9861         (child_init_thread_list): Likewise.
9862         (continue_one_thread): Likewise.
9863         (regptr): New.
9864         (do_child_fetch_inferior_registers): Move to ...
9865         * win32-i386-low.c: ... here, and rename to ...
9866         (do_fetch_inferior_registers): ... this.
9867         * win32-low.c (child_fetch_inferior_registers):
9868         Go through the low target.
9869         (do_child_store_inferior_registers): Use regptr.
9870         (strwinerror): New function.
9871         (win32_create_inferior): Handle Windows CE.
9872         Use strwinerror instead of strerror on Windows error
9873         codes.  Add program to the error output.
9874         Don't close the main thread handle on Windows CE.
9875         (win32_attach): Use coredll.dll on Windows CE.
9876         (win32_kill): Close current process and current
9877         thread handles.
9878         (win32_detach): Use coredll.dll on Windows CE.
9879         (win32_resume): Let low target handle debug registers, and
9880         step request.
9881         (handle_exception): Add/Remove initial breakpoint.  Avoid
9882         non-existant WSTOPSIG on Windows CE.
9883         (win32_read_inferior_memory): Cast to remove warning.
9884         (win32_arch_string): Go through the low target.
9885         (initialize_low): Call set_breakpoint_data with the low
9886         target's breakpoint.
9887         * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9888         FOP_REGNUM, mappings): Move to ...
9889         * win32-i386-low.c: ... here.
9890         * win32-low.c (win32_thread_info): Move to ...
9891         * win32-low.h: ... here.
9892         * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9893         win32-arm-low.c and wincecompat.c.
9894         (all:): Add $EXEEXT.
9895         (install-only:): Likewise.
9896         (gdbserver:): Likewise.
9897         (gdbreplay:): Likewise.
9898         * config.in: Regenerate.
9899         * configure: Regenerate.
9900
9901 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
9902
9903         * win32-low.c: Rename typedef thread_info to
9904         win32_thread_info throughout.
9905
9906 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
9907
9908         * win32-i386-low.c: Rename to ...
9909         * win32-low.c: ... this.
9910         * configure.srv: Replace win32-i386-low.o with win32-low.o.
9911         * Makefile.in: Likewise.
9912
9913 2007-03-27  Pedro Alves  <pedro_alves@portugalmail.pt>
9914
9915         * remote-utils.c (monitor_output): Constify msg parameter.
9916         * server.h (monitor_output): Likewise.
9917         * win32-i386-low.c (handle_output_debug_string): New.
9918         (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9919         handle_output_debug_string.
9920         (get_child_debug_event): Likewise.
9921
9922 2007-03-27  Mat Hostetter  <mat@lcs.mit.edu>
9923
9924         * server.c (main): Correct strtoul check.
9925
9926 2007-03-27  Jon Ringle  <jon@ringle.org>
9927
9928         * linux-low.c: Check __ARCH_HAS_MMU__ also.
9929
9930 2007-03-27  Brooks Moses  <brooks.moses@codesourcery.com>
9931
9932         * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9933
9934 2007-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
9935
9936         * terminal.h: Check HAVE_SGTTY_H.
9937
9938 2007-02-27  Mat Hostetter  <mat@lcs.mit.edu>
9939
9940         * remote-utils.c (remote_open): Print out the assigned port number.
9941
9942 2007-02-26  Daniel Jacobowitz  <dan@codesourcery.com>
9943
9944         * remote-utils.c (monitor_output): New function.
9945         * server.c (debug_threads): Define here.
9946         (monitor_show_help): New function.
9947         (handle_query): Handle qRcmd.
9948         (main): Do not handle 'd' packet.
9949         * server.h (debug_threads, remote_debug, monitor_output): Declare.
9950         * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
9951         of debug_threads.
9952
9953 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
9954
9955         * Makefile.in (EXEEXT): New.
9956         (clean): Use $(EXEEXT).
9957
9958 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
9959
9960         * target.h (target_ops): Rename send_signal to request_interrupt,
9961         and remove enum target_signal parameter.
9962         * linux-low.c (linux_request_interrupt): Rename from
9963         linux_send_signal, and always send SIGINT.
9964         * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
9965         and always send SIGINT.
9966         * remote-utils.c (putpkt_binary): Call request_interrupt, instead
9967         of send_signal.
9968         (input_interrupt): Likewise.
9969
9970 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
9971
9972         * server.c (get_features_xml): Check if target implemented
9973         arch_string.
9974         * win32-i386-low.c (win32_arch_string): New.
9975         (win32_target_ops): Add win32_arch_string as arch_string member.
9976
9977 2007-02-22  Markus Deuling  <deuling@de.ibm.com>
9978
9979         * spu-low.c (spu_arch_string): New.
9980         (spu_target_ops): Add spu_arch_string.
9981
9982 2007-02-16  Daniel Jacobowitz  <dan@codesourcery.com>
9983
9984         * remote-utils.c: Remove HAVE_TERMINAL_H check.
9985         * configure.ac: Do not check for terminal.h.
9986         * configure, config.in: Regenerated.
9987
9988 2007-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
9989
9990         * Makefile.in (OBS): Add $(XML_BUILTIN).
9991         (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
9992         (clean): Update.
9993         (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
9994         (arm-with-iwmmxt.c): New.
9995         * config.in, configure: Regenerate.
9996         * configure.ac: Check for iWMMXt.  Handle srv_xmltarget,
9997         srv_xmlbuiltin, and srv_xmlfiles.  Define USE_XML.
9998         * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
9999         (arm*-*-linux*): Add iWMMXt and regset support.
10000         * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
10001         (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
10002         (arm_store_wmmxregset, target_regsets): New.
10003         * server.c (get_features_xml): Take annex argument.  Check builtin
10004         XML documents.
10005         (handle_query): Handle multiple annexes.
10006
10007 2007-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
10008
10009         * remote-utils.c [USE_WIN32API] (read, write): Define.
10010         (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
10011         write.
10012
10013 2007-01-09  Daniel Jacobowitz  <dan@codesourcery.com>
10014
10015         * linux-i386-low.c (the_low_target): Set arch_string.
10016         * linux-x86-64-low.c (the_low_target): Likewise.
10017         * linux-low.c (linux_arch_string): New.
10018         (linux_target_ops): Add it.
10019         * linux-low.h (struct linux_target_ops): Add arch_string.
10020         * server.c (write_qxfer_response): Use const void * for DATA.
10021         (get_features_xml): New.
10022         (handle_query): Handle qXfer:features:read.  Report it for qSupported.
10023         * target.h (struct target_ops): Add arch_string method.
10024
10025 2007-01-03  Denis Pilat  <denis.pilat@st.com>
10026             Daniel Jacobowitz  <dan@codesourcery.com>
10027
10028         * linux-low.c (linux_kill): Handle being called with no threads.
10029         * win32-i386-low.c (win32_kill): Likewise.
10030         (get_child_debug_event): Clear current_process_handle.
10031
10032 2006-12-30  Denis PILAT  <denis.pilat@st.com>
10033             Daniel Jacobowitz  <dan@codesourcery.com>
10034
10035         * remote-utils.c (remote_open): Check the type of specified
10036         serial port devices before opening them.
10037         * server.c (main): Kill the inferior if an error occurs during
10038         the first remote_open.
10039
10040 2006-12-05  Markus Deuling  <deuling@de.ibm.com>
10041
10042         * README: Update supported targets.
10043
10044 2006-11-28  Daniel Jacobowitz  <dan@codesourcery.com>
10045
10046         * Makefile.in (clean): Remove reg-mips64.c.
10047         (reg-mips64.c, reg-mips64.o): New rules.
10048         * configure.srv: Handle mips64.  Include regset support for mips.
10049         * linux-mips-low.c (union mips_register): New.
10050         (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
10051         (mips_breakpoint, mips_breakpoint_at): Use int.
10052         (mips_collect_register, mips_supply_register)
10053         (mips_collect_register_32bit, mips_supply_register_32bit)
10054         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10055         (mips_store_fpregset, target_regsets): New.
10056         * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
10057
10058 2006-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
10059
10060         * configure.srv: Add target "spu*-*-*".
10061         * Makefile.in (clean): Remove reg-spu.c.
10062         (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
10063         * spu-low.c: New file.
10064
10065 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
10066
10067         * configure.ac: Correct td_thr_tls_get_addr test.
10068         * configure: Regenerated.
10069
10070 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
10071
10072         * linux-low.c (linux_wait_for_event): Reformat.  Use the
10073         pass_signals array.
10074         * remote-utils.c (decode_address_to_semicolon): New.
10075         * server.c (pass_signals, handle_general_set): New.
10076         (handle_query): Mention QPassSignals for qSupported.
10077         (main): Call handle_general_set.
10078         * server.h (pass_signals, decode_address_to_semicolon): New.
10079
10080 2006-11-06  Daniel Jacobowitz  <dan@codesourcery.com>
10081
10082         * server.c (handle_query): Correct error handling for read_auxv.
10083
10084 2005-10-19  Ulrich Weigand  <uweigand@de.ibm.com>
10085
10086         * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
10087         and srv_linux_thread_db to yes.
10088         * linux-s390-low.c (s390_fill_gregset): New function.
10089         (target_regsets): Define data structure.
10090
10091 2006-10-17  Daniel Jacobowitz  <dan@codesourcery.com>
10092
10093         * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
10094         * configure.ac: Use it.  Define HAVE_TD_THR_TLS_GET_ADDR.
10095         * config.in, configure: Regenerated.
10096         * inferiors.c (gdb_id_to_thread): New function.
10097         (gdb_id_to_thread_id): Use it.
10098         * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
10099         * linux-low.h (struct process_info): Add th member.
10100         (thread_db_get_tls_address): New prototype.
10101         * remote-utils.c (decode_address): Make non-static.
10102         * server.c (handle_query): Handle qGetTLSAddr.
10103         * server.h (gdb_id_to_thread, decode_address): New prototypes.
10104         * target.h (struct target_ops): Add get_tls_address.
10105         * thread-db.c (maybe_attach_thread): Save the thread handle.
10106         (thread_db_get_tls_address): New.
10107
10108 2006-09-28  Daniel Jacobowitz  <dan@codesourcery.com>
10109
10110         * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
10111         (linux_resume_one_process): Take a siginfo_t *.  Update all
10112         callers.  Queue it if necessary.  Use PTRACE_SETSIGINFO.
10113         (struct pending_signals): Add a siginfo_t.
10114         (linux_wait_for_process): Always set last_status.
10115         (linux_wait_for_event): Use PTRACE_GETSIGINFO.
10116         (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
10117         * linux-low.h (struct process_info): Add last_status.
10118
10119 2006-09-21  Daniel Jacobowitz  <dan@codesourcery.com>
10120
10121         * remote-utils.c (try_rle): New function.
10122         (putpkt_binary): Use it.
10123
10124 2006-08-19  Daniel Jacobowitz  <dan@codesourcery.com>
10125
10126         * Makefile.in (clean): Clean reg-x86-64-linux.c.
10127         (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
10128         * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
10129         * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
10130         (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
10131         point registers.
10132
10133 2006-08-08  Richard Sandiford  <richard@codesourcery.com>
10134
10135         * server.c (terminal_fd): New variable.
10136         (old_foreground_pgrp): Likewise.
10137         (restore_old_foreground_pgrp): New function.
10138         (start_inferior): Record the terminal file descriptor in terminal_fd
10139         and its original foreground group in old_foreground_pgrp.  Register
10140         restore_old_foreground_pgrp with atexit().
10141
10142 2006-07-26  Daniel Jacobowitz  <dan@codesourcery.com>
10143
10144         * server.c (handle_query): Correct qPart to qXfer.
10145
10146 2006-07-22  Daniel Jacobowitz  <dan@codesourcery.com>
10147
10148         * configure.ac: Check for more headers which are missing on
10149         Windows.  Automatically supply -lwsock32 and USE_WIN32API.
10150         * configure.srv: Add Cygwin and mingw32.
10151         * remote-utils.c: Don't include headers unconditionally which
10152         are missing on mingw32.  Include <winsock.h> for mingw32.
10153         (remote_open): Adjust for mingw32 support.  Flush
10154         standard error after writing to it.
10155         (remote_close, putpkt_binary, input_interrupt, block_async_io)
10156         (unblock_async_io, enable_async_io, disable_async_io)
10157         (readchar, getpkt): Update for Winsock support.
10158         (prepare_resume_reply): Expect a protocol signal number.
10159         * server.c: Disable <sys/wait.h> on mingw32.
10160         (start_inferior): Adjust for mingw32 support.  Flush
10161         standard error after writing to it.
10162         (attach_inferior): Likewise.  Use protocol signal
10163         numbers.
10164         (main): Skip 'D' packet on mingw32.  Use protocol signal numbers
10165         and names.
10166         * win32-i386-low.c: New file.
10167         * Makefile.in (XM_CLIBS): Set.
10168         (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
10169         (win32-i386-low.o): New dependency rule.
10170         * linux-low.c (linux_wait): Use target signal numbers.
10171         * target.h (struct target_ops): Doc fix.
10172         * server.h (target_signal_to_name): New prototype.
10173         * gdbreplay.c: Don't include headers unconditionally which
10174         are missing on mingw32.  Include <winsock.h> for mingw32.
10175         (remote_close, remote_open): Adjust for Winsock support.
10176         * configure, config.in: Regenerated.
10177
10178 2006-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
10179
10180         * server.c (decode_xfer_read, write_qxfer_response): New.
10181         (handle_query): Take a packet length argument.  Handle
10182         qXfer:auxv:read instead of qPart:auxv:read.  Mention it in
10183         the qSupported response.
10184         (main): Update call to handle_query.
10185
10186 2006-06-22  Daniel Jacobowitz  <dan@codesourcery.com>
10187
10188         * remote-utils.c (remote_escape_output, remote_unescape_input): New.
10189         (putpkt_binary): Renamed from putpkt and adjusted for binary
10190         data.
10191         (putpkt): New wrapper for putpkt_binary.
10192         (readchar): Don't mask off the high bit.
10193         (decode_X_packet): New function.
10194         * server.c (main): Call putpkt_binary if a handler sets the packet
10195         length.  Save the length of the incoming packet.  Handle 'X'.
10196         * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
10197
10198 2006-06-21  Daniel Jacobowitz  <dan@codesourcery.com>
10199
10200         * server.c (handle_query): Handle qSupported.
10201
10202 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
10203
10204         * remote-utils.c (all_symbols_looked_up): New variable.
10205         (look_up_one_symbol): Check it.
10206         * server.h (look_up_one_symbol): New declaration.
10207         * thread-db.c (thread_db_init): Set all_symbols_looked_up.
10208
10209 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
10210
10211         * Makefile.in (linux-arm-low.o): Update dependencies.
10212         * linux-arm-low.c: Include "gdb_proc_service.h".
10213         (PTRACE_GET_THREAD_AREA): Define.
10214         (ps_get_thread_area): New function.
10215
10216 2006-05-09  Nathan Sidwell  <nathan@codesourcery.com>
10217
10218         * configure.srv (m68k*-*-uclinux*): New target.
10219         * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
10220         (linux_resume_one_process): Remove extraneous cast.
10221         (linux_read_offsets): New.
10222         (linux_target_op): Add linux_read_offsets on mmuless systems.
10223         * server.c (handle_query): Add qOffsets logic.
10224         * target.h (struct target_ops): Add read_offsets.
10225
10226 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
10227
10228         * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
10229         (PTRACE_GET_THREAD_AREA): Define.
10230         (ps_get_thread_area): New function.
10231         * Makefile.in (linux-i386-low.o, linux-mips-low.o)
10232         (linux-x86-64-low.o): Update.
10233
10234 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
10235
10236         * configure.ac: Remove checks for prfpregset_t.
10237         * gdb_proc_service.h: New file.
10238         * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
10239         new "gdb_proc_service.h".
10240         * proc-service.c: Likewise.
10241         (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
10242         (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
10243         * Makefile.in (gdb_proc_service_h): Updated.
10244         * configure, config.in: Regenerated.
10245
10246 2006-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
10247
10248         * remote-utils.c (prepare_resume_reply): Move declaration
10249         of gdb_id_from_wait to the top of the block.
10250
10251 2006-02-15  Daniel Jacobowitz  <dan@codesourcery.com>
10252
10253         * linux-low.c (regsets_store_inferior_registers): Read the regset
10254         from the target before filling it.
10255
10256 2006-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
10257
10258         * server.c (attach_inferior): Return SIGTRAP for a successful
10259         attach.
10260
10261 2006-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
10262
10263         * Makefile.in (OBS): Add version.o.
10264         (STAGESTUFF): Delete.
10265         (version.o): Add dependencies.
10266         (version.c): Replace rule.
10267         (clean): Remove version.c.
10268         * server.c (gdbserver_version): New.
10269         (gdbserver_usage): Use printf.
10270         (main): Handle --version and --help.
10271         * server.h (version, host_name): Add declarations.
10272
10273 2005-12-23  Eli Zaretskii  <eliz@gnu.org>
10274
10275         * linux-arm-low.c:
10276         * linux-arm-low.c:
10277         * inferiors.c:
10278         * i387-fp.h:
10279         * i387-fp.c:
10280         * gdbreplay.c:
10281         * regcache.c:
10282         * proc-service.c:
10283         * mem-break.h:
10284         * mem-break.c:
10285         * linux-x86-64-low.c:
10286         * linux-sh-low.c:
10287         * linux-s390-low.c:
10288         * linux-ppc64-low.c:
10289         * linux-ppc-low.c:
10290         * linux-mips-low.c:
10291         * linux-m68k-low.c:
10292         * linux-m32r-low.c:
10293         * linux-low.h:
10294         * linux-low.c:
10295         * linux-ia64-low.c:
10296         * linux-i386-low.c:
10297         * linux-crisv32-low.c:
10298         * thread-db.c:
10299         * terminal.h:
10300         * target.h:
10301         * target.c:
10302         * server.h:
10303         * server.c:
10304         * remote-utils.c:
10305         * regcache.h:
10306         * utils.c:
10307         * Makefile.in:
10308         * configure.ac:
10309         * gdbserver.1: Add (C) after Copyright.  Update the FSF
10310         address.
10311
10312 2005-11-13  Daniel Jacobowitz  <dan@codesourcery.com>
10313
10314         * linux-arm-low.c (arm_eabi_breakpoint): New variable.
10315         (arm_breakpoint_at): Recognize both breakpoints.
10316         (the_low_target): Use the correct breakpoint instruction.
10317
10318 2005-11-02  Daniel Jacobowitz  <dan@codesourcery.com>
10319
10320         * configure.srv (x86_64-*-linux*): Turn on thread_db support.
10321         * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
10322         (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
10323         (the_low_target): Update.
10324
10325 2005-10-25  Andreas Schwab  <schwab@suse.de>
10326
10327         * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10328
10329         * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10330         (ia64_num_regs): Reduce to 462.
10331
10332 2005-09-17  Daniel Jacobowitz  <dan@codesourcery.com>
10333
10334         * acinclude.m4: Correct quoting.
10335         * aclocal.m4: Regenerated.
10336
10337         Suggested by SZOKOVACS Robert <szo@ies.hu>:
10338         * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10339         (thread_db_init): Call thread_db_err_str.
10340         * configure.ac: Check for TD_VERSION.
10341         * config.in, configure: Regenerated.
10342
10343 2005-07-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10344
10345         * server.h (error, fatal, warning): Add ATTR_FORMAT.
10346
10347 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
10348
10349         * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10350         is not available.  Define HAVE_PTRACE_GETREGS if it is.
10351         * config.in, configure: Regenerated.
10352         * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10353         * linux-i386-low.c, linux-m68k-low.c: Update to use
10354         HAVE_PTRACE_GETREGS.
10355         * linux-low.c (regsets_fetch_inferior_registers)
10356         (regsets_store_inferior_registers): Only return 0 if we processed
10357         GENERAL_REGS.
10358         * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10359         * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10360
10361 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
10362
10363         * inferiors.c (struct thread_info): Add gdb_id.
10364         (add_thread): Add gdb_id argument.
10365         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10366         * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10367         calls to add_thread.
10368         * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10369         * server.c (handle_query): Use thread_to_gdb_id.
10370         (handle_v_cont, main): Use gdb_id_to_thread_id.
10371         * server.h (add_thread): Update prototype.
10372         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10373         prototypes.
10374
10375 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
10376
10377         * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10378         left-padded registers.
10379         * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10380         * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10381
10382 2005-07-01  Steve Ellcey  <sje@cup.hp.com>
10383
10384         * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10385         * configure: Regenerate.
10386         * config.in: Regenerate.
10387         * server.h (NEED_DECLARATION_STRERROR):
10388         Replace with !HAVE_DECL_STRERROR.
10389
10390 2005-06-16  Daniel Jacobowitz  <dan@codesourcery.com>
10391
10392         * linux-low.c (linux_wait, linux_send_signal): Don't test
10393         an unsigned long variable for > 0 if it could be MAX_ULONG.
10394         * server.c (myresume): Likewise.
10395         * target.c (set_desired_inferior): Likewise.
10396
10397 2005-06-13  Mark Kettenis  <kettenis@gnu.org>
10398
10399         * configure.ac: Simplify and improve check for socklen_t.
10400         * configure, config.in: Regenerate.
10401
10402 2005-06-12  Daniel Jacobowitz  <dan@codesourcery.com>
10403
10404         * acconfig.h: Remove.
10405         * configure.ac: Add a test for socklen_t.  Use three-argument
10406         AC_DEFINE throughout.
10407         * config.in: Regenerated using autoheader 2.59.
10408         * configure: Regenerated.
10409
10410         * gdbreplay.c (socklen_t): Provide a default.
10411         (remote_open): Use socklen_t.
10412         * remote-utils.c (socklen_t): Provide a default.
10413         (remote_open): Use socklen_t.
10414         (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10415         unsigned char.
10416
10417         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10418         char for buffers.
10419         * linux-low.c (linux_read_memory, linux_write_memory)
10420         (linux_read_auxv): Likewise.
10421         * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10422         (check_mem_write): Likewise.
10423         * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10424         Likewise.
10425         * regcache.c (struct inferior_rgcache_data, registers_to_string)
10426         (registers_from_string, register_data): Likewise.
10427         * server.c (handle_query, main): Likewise.
10428         * server.h (convert_ascii_to_int, convert_int_to_ascii)
10429         (decode_M_packet): Likewise.
10430         * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10431         * target.h (struct target_ops): Update read_memory, write_memory,
10432         and read_auxv.
10433         (read_inferior_memory, write_inferior_memory): Update.
10434         * linux-low.h (struct linux_target_ops): Change type of breakpoint
10435         to unsigned char *.
10436         * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10437         linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10438         linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10439         linux-s390-low.c, linux-sh-low.c: Update for changes in
10440         read_inferior_memory and the_low_target->breakpoint.
10441
10442 2005-05-28  Daniel Jacobowitz  <dan@codesourcery.com>
10443
10444         * Makefile.in (SFILES): Add linux-ppc64-low.c.
10445         (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10446         * configure.srv: Add powerpc64-*-linux*.
10447         * linux-ppc64-low.c: New file.
10448
10449 2005-05-23  Orjan Friberg  <orjanf@axis.com>
10450
10451         * linux-cris-low.c: New file with support for CRIS.
10452         * linux-crisv32-low.c: Ditto for CRISv32.
10453         * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10454         (clean): Add reg-cris.c and reg-crisv32.c.
10455         Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
10456         reg-crisv32.o, and reg-crisv32.c to make rules.
10457         * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10458         recognized targets.
10459
10460 2005-05-16  Ulrich Weigand  <uweigand@de.ibm.com>
10461
10462         * linux-low.c (fetch_register): Ensure buffer size is a multiple
10463         of sizeof (PTRACE_XFER_TYPE).
10464         (usr_store_inferior_registers): Likewise.  Zero out excess bytes.
10465
10466 2005-05-12  Orjan Friberg  <orjanf@axis.com>
10467
10468         * target.h (struct target_ops): Add insert_watchpoint,
10469         remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10470         pointers for hardware watchpoint support.
10471         * linux-low.h (struct linux_target_ops): Ditto.
10472         * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10473         (linux_stopped_by_watchpoint, linux_stopped_data_address): New.  Add
10474         to linux_target_ops.
10475         * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10476         reply packet.
10477         * server.c (main): Recognize 'Z' and 'z' packets.
10478
10479 2005-05-10  Ulrich Weigand  <uweigand@de.ibm.com>
10480
10481         * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10482         (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10483         (the_low_target): Add new members.
10484
10485 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
10486
10487         * proc-service.c (ps_lgetregs): Search all_processes instead of
10488         all_threads.
10489
10490 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
10491
10492         * server.c (start_inferior): Change return type to int.
10493         (attach_inferior): Change sigptr to int *.
10494         (handle_v_cont, handle_v_requests): Change signal to int *.
10495         (main): Change signal to int.
10496
10497 2005-04-15  Kei Sakamoto  <sakamoto.kei@renesas.com>
10498
10499         * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10500         * configure.srv: Add m32r*-*-linux*.
10501         * linux-m32r-low.c: New file.
10502
10503 2005-03-04  Daniel Jacobowitz  <dan@codesourcery.com>
10504
10505         * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10506
10507 2005-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
10508
10509         * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10510         Take unsigned long arguments for PIDs.
10511         * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10512         (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10513         (wait_for_sigstop, linux_resume_one_process)
10514         (regsets_fetch_inferior_registers, linux_send_signal)
10515         (linux_read_auxv): Likewise.  Update the types of variables holding
10516         PIDs.  Update format string specifiers.
10517         * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10518         * remote-utils.c (prepare_resume_reply): Likewise.
10519         * server.c (cont_thread, general_thread, step_thread)
10520         (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10521         unsigned long.
10522         (handle_query): Update format specifiers.
10523         (handle_v_cont, main): Use strtoul for thread IDs.
10524         * server.h (struct inferior_list_entry): Use unsigned long for ID.
10525         (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10526         (general_thread, step_thread, thread_from_wait)
10527         (old_thread_from_wait): Update.
10528         * target.h (struct thread_resume): Use unsigned long for THREAD.
10529         (struct target_ops): Use unsigned long for arguments to attach and
10530         thread_alive.
10531
10532 2005-02-24  Daniel Jacobowitz  <dan@codesourcery.com>
10533
10534         * acinclude.m4: Include bfd/bfd.m4 directly.
10535         * configure.ac: Use AC_ARG_PROGRAM.  Suggested by Aron Griffis
10536         <agriffis@toolchain.org>.
10537         * aclocal.m4, configure: Regenerated.
10538
10539 2005-01-07  Andrew Cagney  <cagney@gnu.org>
10540
10541         * configure.ac: Rename configure.in, require autoconf 2.59.
10542         * configure: Re-generate.
10543
10544 2004-12-08  Daniel Jacobowitz  <dan@debian.org>
10545
10546         * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area.  Reset
10547         LIBS when finished.
10548         * aclocal.m4: Regenerated.
10549         * configure: Regenerated.
10550
10551 2004-11-21  Andreas Schwab  <schwab@suse.de>
10552
10553         * linux-m68k-low.c (m68k_num_gregs): Define.
10554         (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10555         (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10556         (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10557         (m68k_breakpoint_at): New.  Add to the_low_target.
10558
10559         * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10560         srv_linux_thread_db to yes.
10561
10562 2004-10-20  Joel Brobecker  <brobecker@gnat.com>
10563
10564         * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10565         (ARCH_SET_FS): Likewise.
10566         (ARCH_GET_FS): Likewise.
10567         (ARCH_GET_GS): Likewise.
10568
10569 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
10570
10571         * linux-i386-low.c (ps_get_thread_area): New.
10572         * linux-x86-64-low.c (ps_get_thread_area): New.
10573         * linux-low.c: Include <sys/syscall.h>.
10574         (linux_kill_one_process): Don't kill the first thread here.
10575         (linux_kill): Kill the first thread here.
10576         (kill_lwp): New function.
10577         (send_sigstop, linux_send_signal): Use it.
10578         * proc-service.c: Clean up #ifdefs.
10579         (fpregset_info): Delete.
10580         (ps_lgetregs): Update and enable implementation.
10581         (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10582         implementations.
10583         * remote-utils.c (struct sym_cache, symbol_cache): New.
10584         (input_interrupt): Print a clearer message.
10585         (async_io_enabled): New variable.
10586         (enable_async_io, disable_async_io): Use it.  Update comments.
10587         (look_up_one_symbol): Use the symbol cache.
10588         * thread-db.c (thread_db_look_up_symbols): New function.
10589         (thread_db_init): Update comments.  Call thread_db_look_up_symbols.
10590
10591 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
10592
10593         * configure.in: Test for -rdynamic.
10594         * configure: Regenerated.
10595         * Makefile (INTERNAL_LDFLAGS): New.
10596         (gdbserver, gdbreplay): Use it.
10597
10598 2004-09-02  Andrew Cagney  <cagney@gnu.org>
10599
10600         * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10601
10602 2004-03-23  Daniel Jacobowitz  <drow@mvista.com>
10603
10604         * linux-low.c (linux_wait): Clear all_processes list also.
10605
10606 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
10607
10608         * linux-low.c: Include <errno.h>.  Remove extern declaration of
10609         errno.
10610
10611 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
10612
10613         * gdbreplay.c, server.h, utils.c: Update copyright years.
10614
10615 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
10616
10617         * server.c (main): Print child status or termination signal from
10618         variable 'signal', not 'sig'.
10619
10620 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
10621
10622         * linux-low.c (linux_read_memory): Change return type to
10623         int.  Check for and return error from ptrace().
10624         * target.c (read_inferior_memory): Change return type to int.  Pass
10625         back return status from the_target->read_memory().
10626         * target.h (struct target_ops): Adapt *read_memory() prototype.
10627         Update comment.
10628         (read_inferior_memory): Adapt prototype.
10629         * server.c (main): Return an error packet if
10630         read_inferior_memory() returns an error.
10631
10632 2004-03-04  Daniel Jacobowitz  <drow@mvista.com>
10633
10634         * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10635         Unify with other clean targets.
10636
10637 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
10638
10639         * server.c (handle_v_cont): Call set_desired_inferior.
10640
10641 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
10642
10643         * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10644
10645 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
10646
10647         * linux-low.c (linux_wait): Unblock async I/O.
10648         (linux_resume): Block and enable async I/O.
10649         * remote-utils.c (block_async_io, unblock_async_io): New functions.
10650         * server.h (block_async_io, unblock_async_io): Add prototypes.
10651
10652 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
10653
10654         * remote-utils.c (remote_open): Print a status notice after
10655         opening a TCP port.
10656         * server.c (attach_inferior): Print a status notice after
10657         attaching.
10658
10659 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
10660
10661         * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10662
10663 2004-02-26  Daniel Jacobowitz  <drow@mvista.com>
10664
10665         * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10666         error packet.
10667         * server.c, target.h: Update copyright years.
10668
10669 2004-02-25  Roland McGrath  <roland@redhat.com>
10670
10671         * target.h (struct target_ops): New member `read_auxv'.
10672         * server.c (handle_query): Handle qPart:auxv:read: query using that.
10673         * linux-low.c (linux_read_auxv): New function.
10674         (linux_target_ops): Initialize `read_auxv' member to that.
10675
10676 2004-02-17  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10677
10678         Committed by Jim Blandy  <jimb@redhat.com>.
10679
10680         * linux-s390-low.c (s390_num_regs): Update.
10681         (s390_regmap): Remove control registers.  Use __s390x__ predefine
10682         instead of GPR_SIZE to distiguish s390 and s390x targets.
10683
10684 2004-01-31  Daniel Jacobowitz  <drow@mvista.com>
10685
10686         * linux-low.c: Update copyright year.
10687         (check_removed_breakpoint): Clear pending_is_breakpoint.
10688         (linux_set_resume_request, linux_queue_one_thread)
10689         (resume_status_pending_p): New functions.
10690         (linux_continue_one_thread): Use process->resume.
10691         (linux_resume): Only resume threads if there are no pending events.
10692         * linux-low.h (struct process_info): Add resume request
10693         pointer.
10694
10695 2004-01-30  Daniel Jacobowitz  <drow@mvista.com>
10696
10697         * regcache.c (new_register_cache): Clear the allocated register
10698         buffer.  Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10699
10700 2003-10-13  Daniel Jacobowitz  <drow@mvista.com>
10701
10702         * linux-low.c (linux_resume): Take a struct thread_resume *
10703         argument.
10704         (linux_wait): Update call.
10705         (resume_ptr): New static variable.
10706         (linux_continue_one_thread): Renamed from
10707         linux_continue_one_process.  Use resume_ptr.
10708         (linux_resume): Use linux_continue_one_thread.
10709         * server.c (handle_v_cont, handle_v_requests): New functions.
10710         (myresume): New function.
10711         (main): Handle 'v' case.
10712         * target.h (struct thread_resume): New type.
10713         (struct target_ops): Change argument of "resume" to struct
10714         thread_resume *.
10715         (myresume): Delete macro.
10716
10717 2003-08-08  H.J. Lu  <hongjiu.lu@intel.com>
10718
10719         * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10720         (uninstall): Support DESTDIR.
10721
10722 Mon Jul 21 20:09:34 UTC 2003  Brendan Conoboy  <blc@redhat.com>
10723
10724         * configure.srv: Add xscale*linux copy of arm*linux entry.
10725
10726 2003-07-24  Daniel Jacobowitz  <drow@mvista.com>
10727
10728         * linux-arm-low.c (arm_reinsert_addr): New function.
10729         (the_low_target): Add arm_reinsert_addr.
10730
10731 2003-07-08  Mark Kettenis  <kettenis@gnu.org>
10732
10733         * mem-break.c: Remove whitespace at end of file.
10734
10735 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
10736
10737         * configure.in: Check whether we need to prototype strerror.
10738         * server.h: Optionally prototype strerror.
10739         * gdbreplay.c (perror_with_name): Use strerror.
10740         * linux-low.c (linux_attach_lwp): Use strerror.
10741         * utils.c (perror_with_name): Use strerror.
10742         * config.in, configure: Regenerated.
10743
10744 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
10745
10746         * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10747         SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10748
10749 2003-06-20  Daniel Jacobowitz  <drow@mvista.com>
10750
10751         * Makefile.in (SFILES): Update.
10752         * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10753         low-sun3.c: Remove files.
10754
10755 2003-06-17  Daniel Jacobowitz  <drow@mvista.com>
10756
10757         * linux-low.c: Move comment to linux_thread_alive where it belonged.
10758         (linux_detach_one_process, linux_detach): New functions.
10759         (linux_target_ops): Add linux_detach.
10760         * server.c (main): Handle 'D' packet.
10761         * target.h (struct target_ops): Add "detach" member.
10762         (detach_inferior): Define.
10763
10764 2003-06-13  Mark Kettenis  <kettenis@gnu.org>
10765
10766         From Kelley Cook  <kelleycook@wideopenwest.com>:
10767         * configure.srv: Accept i[34567]86 variants.
10768
10769 2003-06-05  Daniel Jacobowitz  <drow@mvista.com>
10770
10771         * linux-low.c (linux_wait_for_event): Correct comment typos.
10772         (linux_resume_one_process): Call check_removed_breakpoint.
10773         (linux_send_signal): New function.
10774         (linux_target_ops): Add linux_send_signal.
10775         * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10776         of kill.
10777         * target.h (struct target_ops): Add send_signal.
10778
10779 2003-05-29  Jim Blandy  <jimb@redhat.com>
10780
10781         * linux-low.c (usr_store_inferior_registers): Transfer buf in
10782         PTRACE_XFER_TYPE-sized chunks, not int-sized chunks.  Otherwise,
10783         if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10784         away part of the register's value.
10785
10786 2003-03-26  Daniel Jacobowitz  <drow@mvista.com>
10787
10788         * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10789         (linux_wait_for_event, linux_init_signals): Likewise.
10790
10791 2003-03-17  Daniel Jacobowitz  <drow@mvista.com>
10792
10793         * configure.in: Check for stdlib.h.
10794         * configure: Regenerated.
10795         * config.in: Regenerated.
10796
10797 2003-01-04  Andreas Schwab  <schwab@suse.de>
10798
10799         * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10800
10801 2003-01-02  Andrew Cagney  <ac131313@redhat.com>
10802
10803         * Makefile.in: Remove obsolete code.
10804
10805 2002-11-20  Daniel Jacobowitz  <drow@mvista.com>
10806
10807         * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10808         defined(PT_FPR0_HI).
10809
10810 2002-11-17  Stuart Hughes  <seh@zee2.com>
10811
10812         * linux-arm-low.c (arm_num_regs): Increase.
10813         (arm_regmap): Include status register.
10814
10815 2002-11-17  Daniel Jacobowitz  <drow@mvista.com>
10816
10817         * linux-low.c (register_addr): Remove incorrect -1 check.
10818
10819 2002-08-29  Daniel Jacobowitz  <drow@mvista.com>
10820
10821         * linux-low.c (linux_create_inferior): Call setpgid.  Return
10822         the new PID.
10823         (unstopped_p, linux_signal_pid): Remove.
10824         (linux_target_ops): Remove linux_signal_pid.
10825         * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10826         global instead of target method.
10827         * target.h (struct target_ops): Remove signal_pid.  Update comment
10828         for create_inferior.
10829         * server.c (signal_pid): New variable.
10830         (create_inferior): Set signal_pid.  Block SIGTTOU and SIGTTIN in
10831         gdbserver.  Set the child to be the foreground process group.
10832         (attach_inferior): Set signal_pid.
10833
10834 2002-08-23  Daniel Jacobowitz  <drow@mvista.com>
10835
10836         * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10837
10838 2002-08-20  Jim Blandy  <jimb@redhat.com>
10839
10840         * Makefile.in (LDFLAGS): Allow the configure script to establish a
10841         default for this.
10842
10843 2002-08-01  Andrew Cagney  <cagney@redhat.com>
10844
10845         * Makefile.in: Make chill references obsolete.
10846
10847 2002-07-24  Kevin Buettner  <kevinb@redhat.com>
10848
10849         * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10850         * configure: Regenerate.
10851         * config.in: Regenerate.
10852
10853 2002-07-09  David O'Brien  <obrien@FreeBSD.org>
10854
10855         * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10856         (perror_with_name, remote_close, remote_open, expect, play): Static.
10857
10858 2002-07-04  Michal Ludvig  <mludvig@suse.cz>
10859
10860         * linux-x86-64-low.c (x86_64_regmap): Make it an array of
10861         byte offsets instead of an array of indexes.
10862         (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10863
10864 2002-06-13  Daniel Jacobowitz  <drow@mvista.com>
10865
10866         * regcache.c: Add comment.
10867
10868 2002-06-11  Daniel Jacobowitz  <drow@mvista.com>
10869
10870         * thread-db.c: New file.
10871         * proc-service.c: New file.
10872         * acinclude.m4: New file.
10873         * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10874         proc-service.o, and thread-db.o.
10875         (linux-low.o): Add USE_THREAD_DB.
10876         * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10877         HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10878         * aclocal.m4: Regenerated.
10879         * config.in: Regenerated.
10880         * configure: Regenerated.
10881         * configure.in: Check for proc_service.h, sys/procfs.h,
10882         thread_db.h, and linux/elf.h headrs.
10883         Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10884         PRFPREGSET_T_BROKEN.  Introduce srv_thread_depfiles and USE_THREAD_DB.
10885         Check for -lthread_db and thread support.
10886         * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10887         PowerPC, and SuperH.
10888         * i387-fp.c: Constify arguments.
10889         * i387-fp.h: Likewise.
10890         * inferiors.c: (struct thread_info): Renamed from
10891         `struct inferior_info'.  Remove PID member.  Use generic inferior
10892         list header.  All uses updated.
10893         (inferiors, signal_pid): Removed.
10894         (all_threads): New variable.
10895         (get_thread): Define.
10896         (add_inferior_to_list): New function.
10897         (for_each_inferior): New function.
10898         (change_inferior_id): New function.
10899         (add_inferior): Removed.
10900         (remove_inferior): New function.
10901         (add_thread): New function.
10902         (free_one_thread): New function.
10903         (remove_thread): New function.
10904         (clear_inferiors): Use for_each_inferior and free_one_thread.
10905         (find_inferior): New function.
10906         (find_inferior_id): New function.
10907         (inferior_target_data): Update argument type.
10908         (set_inferior_target_data): Likewise.
10909         (inferior_regcache_data): Likewise.
10910         (set_inferior_regcache_data): Likewise.
10911         * linux-low.c (linux_bp_reinsert): Remove.
10912         (all_processes, stopping_threads, using_thrads)
10913         (struct pending_signals, debug_threads, pid_of): New.
10914         (inferior_pid): Replace with macro.
10915         (struct inferior_linux_data): Remove.
10916         (get_stop_pc, add_process): New functions.
10917         (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10918         Use add_process and add_thread.
10919         (linux_attach_lwp): New function, based on old linux_attach.  Use
10920         add_process and add_thread.  Set stop_expected for new threads.
10921         (linux_attach): New function.
10922         (linux_kill_one_process): New function.
10923         (linux_kill): Kill all LWPs.
10924         (linux_thread_alive): Use find_inferior_id.
10925         (check_removed_breakpoints, status_pending_p): New functions.
10926         (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10927         Update.  Use WNOHANG.  Wait for cloned processes also.  Update process
10928         struct for the found process.
10929         (linux_wait_for_event): New function.
10930         (linux_wait): Use it.  Support LWPs.
10931         (send_sigstop, wait_for_sigstop, stop_all_processes)
10932         (linux_resume_one_process, linux_continue_one_process): New functions.
10933         (linux_resume): Support LWPs.
10934         (REGISTER_RAW_SIZE): Remove.
10935         (fetch_register): Use register_size instead.  Call supply_register.
10936         (usr_store_inferior_registers): Likewise.  Call collect_register.
10937         Fix recursive case.
10938         (regsets_fetch_inferior_registers): Improve error message.
10939         (regsets_store_inferior_registers): Add debugging.
10940         (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
10941         (unstopped_p, linux_signal_pid): New functions.
10942         (linux_target_ops): Add linux_signal_pid.
10943         (linux_init_signals): New function.
10944         (initialize_low): Call it.  Initialize using_threads.
10945         * regcache.c (inferior_regcache_data): Add valid
10946         flag.
10947         (get_regcache): Fetch registers lazily.  Add fetch argument
10948         and update all callers.
10949         (regcache_invalidate_one, regcache_invalidate): New
10950         functions.
10951         (new_register_cache): Renamed from create_register_cache.
10952         Return the new regcache.
10953         (free_register_cache): Change argument to a void *.
10954         (registers_to_string, registers_from_string): Call get_regcache
10955         with fetch flag set.
10956         (register_data): Make static.  Pass fetch flag to get_regcache.
10957         (supply_register): Call get_regcache with fetch flag clear.
10958         (collect_register): Call get_regcache with fetch flag set.
10959         (collect_register_as_string): New function.
10960         * regcache.h: Update.
10961         * remote-utils.c (putpkt): Flush after debug output and use
10962         stderr.
10963         Handle input interrupts while waiting for an ACK.
10964         (input_interrupt): Use signal_pid method.
10965         (getpkt): Flush after debug output and use stderr.
10966         (outreg): Use collect_register_as_string.
10967         (new_thread_notify, dead_thread_notify): New functions.
10968         (prepare_resume_reply): Check using_threads.  Set thread_from_wait
10969         and general_thread.
10970         (look_up_one_symbol): Flush after debug output.
10971         * server.c (step_thread, server_waiting): New variables.
10972         (start_inferior): Don't use signal_pid.  Update call to mywait.
10973         (attach_inferior): Update call to mywait.
10974         (handle_query): Handle qfThreadInfo and qsThreadInfo.
10975         (main): Don't fetch/store registers explicitly.  Use
10976         set_desired_inferior.  Support proposed ``Hs'' packet.  Update
10977         calls to mywait.
10978         * server.h: Update.
10979         (struct inferior_list, struct_inferior_list_entry): New.
10980         * target.c (set_desired_inferior): New.
10981         (write_inferior_memory): Constify.
10982         (mywait): New function.
10983         * target.h: Update.
10984         (struct target_ops): New signal_pid method.
10985         (mywait): Removed macro, added prototype.
10986
10987         * linux-low.h (regset_func): Removed.
10988         (regset_fill_func, regset_store_func): New.
10989         (enum regset_type): New.
10990         (struct regset_info): Add type field.  Use new operation types.
10991         (struct linux_target_ops): stop_pc renamed to get_pc.
10992         Add decr_pc_after_break and breakpoint_at.
10993         (get_process, get_thread_proess, get_process_thread)
10994         (strut process_info, all_processes, linux_attach_lwp)
10995         (thread_db_init): New.
10996
10997         * linux-arm-low.c (arm_get_pc, arm_set_pc,
10998         arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
10999         (the_low_target): Add new members.
11000         * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
11001         (i386_store_fpxregset): Constify.
11002         (target_regsets): Add new kind identifier.
11003         (i386_get_pc): Renamed from i386_stop_pc.  Simplify.
11004         (i386_set_pc): Add debugging.
11005         (i386_breakpoint_at): New function.
11006         (the_low_target): Add new members.
11007         * linux-mips-low.c (mips_get_pc, mips_set_pc)
11008         (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
11009         (mips_breakpoint_at): New.
11010         (the_low_target): Add new members.
11011         * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
11012         (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
11013         (the_low_target): Add new members.
11014         * linux-sh-low.c (sh_get_pc, sh_set_pc)
11015         (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
11016         (the_low_target): Add new members.
11017         * linux-x86-64-low.c (target_regsets): Add new kind
11018         identifier.
11019
11020 2002-05-15  Daniel Jacobowitz  <drow@mvista.com>
11021
11022         From Martin Pool <mbp@samba.org>:
11023         * server.c (gdbserver_usage): New function.
11024         (main): Call it.
11025
11026 2002-05-14  Daniel Jacobowitz  <drow@mvista.com>
11027
11028         * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
11029         stop_at -> stop_pc.
11030
11031 2002-05-04  Andrew Cagney  <ac131313@redhat.com>
11032
11033         * Makefile.in: Remove obsolete code.
11034
11035 2002-04-24  Michal Ludvig  <mludvig@suse.cz>
11036
11037         * linux-low.c (regsets_fetch_inferior_registers),
11038         (regsets_store_inferior_registers): Removed cast to int from
11039         ptrace() calls.
11040         * regcache.h: Added declaration of struct inferior_info.
11041
11042 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
11043
11044         * inferiors.c (struct inferior_info): Add regcache_data.
11045         (add_inferior): Call create_register_cache.
11046         (clear_inferiors): Call free_register_cache.
11047         (inferior_regcache_data, set_inferior_regcache_data): New functions.
11048         * regcache.c (struct inferior_regcache_data): New.
11049         (registers): Remove.
11050         (get_regcache): New function.
11051         (create_register_cache, free_register_cache): New functions.
11052         (set_register_cache): Don't initialize the register cache here.
11053         (registers_to_string, registers_from_string, register_data): Call
11054         get_regcache.
11055         * regcache.h: Add prototypes.
11056         * server.h: Likewise.
11057
11058 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
11059
11060         * mem-break.c: New file.
11061         * mem-break.h: New file.
11062         * Makefile.in: Add mem-break.o rule; update server.h
11063         dependencies.
11064         * inferiors.c (struct inferior_info): Add target_data
11065         member.
11066         (clear_inferiors): Free target_data member if set.
11067         (inferior_target_data, set_inferior_target_data): New functions.
11068         * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
11069         (i386_stop_pc, i386_set_pc): New.  Add to the_low_target.
11070         * linux-low.c (linux_bp_reinsert): New variable.
11071         (struct inferior_linux_data): New.
11072         (linux_create_inferior): Use set_inferior_target_data.
11073         (linux_attach): Likewise.  Call add_inferior.
11074         (linux_wait_for_one_inferior): New function.
11075         (linux_wait): Call it.
11076         (linux_write_memory): Add const.
11077         (initialize_low): Call set_breakpoint_data.
11078         * linux-low.h (struct linux_target_ops): Add breakpoint
11079         handling members.
11080         * server.c (attach_inferior): Remove extra add_inferior
11081         call.
11082         * server.h: Include mem-break.h.  Update inferior.c
11083         prototypes.
11084         * target.c (read_inferior_memory)
11085         (write_inferior_memory): New functions.
11086         * target.h (read_inferior_memory)
11087         (write_inferior_memory): Change macros to prototypes.
11088         (struct target_ops): Update comments.  Add const to write_memory
11089         definition.
11090
11091 2002-04-11  Daniel Jacobowitz  <drow@mvista.com>
11092
11093         * linux-low.c (usr_store_inferior_registers): Support
11094         registers which are allowed to fail to store.
11095         * linux-low.h (linux_target_ops): Likewise.
11096         * linux-ppc-low.c (ppc_regmap): Support FPSCR.
11097         (ppc_cannot_store_register): FPSCR may not be storable.
11098
11099 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
11100
11101         * server.h: Include <string.h> if HAVE_STRING_H.
11102         * ChangeLog: Correct paths in last ChangeLog entry.
11103
11104 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
11105
11106         * linux-low.h: Remove obsolete prototypes.
11107         (struct linux_target_ops): New.
11108         (extern the_low_target): New.
11109         * linux-low.c (num_regs, regmap): Remove declarations.
11110         (register_addr): Use the_low_target explicitly.
11111         (fetch_register): Likewise.
11112         (usr_fetch_inferior_registers): Likewise.
11113         (usr_store_inferior_registers): Likewise.
11114         * linux-arm-low.c (num_regs): Remove.
11115         (arm_num_regs): Define.
11116         (arm_regmap): Renamed from regmap, made static.
11117         (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
11118         made static.
11119         (arm_cannot_store_register): Renamed from cannot_store_register,
11120         made static.
11121         (the_low_target): New.
11122         * linux-i386-low.c (num_regs): Remove.
11123         (i386_num_regs): Define.
11124         (i386_regmap): Renamed from regmap, made static.
11125         (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
11126         made static.
11127         (i386_cannot_store_register): Renamed from cannot_store_register,
11128         made static.
11129         (the_low_target): New.
11130         * linux-ia64-low.c (num_regs): Remove.
11131         (ia64_num_regs): Define.
11132         (ia64_regmap): Renamed from regmap, made static.
11133         (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
11134         made static.
11135         (ia64_cannot_store_register): Renamed from cannot_store_register,
11136         made static.
11137         (the_low_target): New.
11138         * linux-m68k-low.c (num_regs): Remove.
11139         (m68k_num_regs): Define.
11140         (m68k_regmap): Renamed from regmap, made static.
11141         (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
11142         made static.
11143         (m68k_cannot_store_register): Renamed from cannot_store_register,
11144         made static.
11145         (the_low_target): New.
11146         * linux-mips-low.c (num_regs): Remove.
11147         (mips_num_regs): Define.
11148         (mips_regmap): Renamed from regmap, made static.
11149         (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
11150         made static.
11151         (mips_cannot_store_register): Renamed from cannot_store_register,
11152         made static.
11153         (the_low_target): New.
11154         * linux-ppc-low.c (num_regs): Remove.
11155         (ppc_num_regs): Define.
11156         (ppc_regmap): Renamed from regmap, made static.
11157         (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
11158         made static.
11159         (ppc_cannot_store_register): Renamed from cannot_store_register,
11160         made static.
11161         (the_low_target): New.
11162         * linux-s390-low.c (num_regs): Remove.
11163         (s390_num_regs): Define.
11164         (s390_regmap): Renamed from regmap, made static.
11165         (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
11166         made static.
11167         (s390_cannot_store_register): Renamed from cannot_store_register,
11168         made static.
11169         (the_low_target): New.
11170         * linux-sh-low.c (num_regs): Remove.
11171         (sh_num_regs): Define.
11172         (sh_regmap): Renamed from regmap, made static.
11173         (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
11174         made static.
11175         (sh_cannot_store_register): Renamed from cannot_store_register,
11176         made static.
11177         (the_low_target): New.
11178         * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
11179         (the_low_target): New.
11180
11181 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
11182
11183         * Makefile.in: Add stamp-h target.
11184         * configure.in: Create stamp-h.
11185         * configure: Regenerated.
11186
11187 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
11188
11189         * inferiors.c: New file.
11190         * target.c: New file.
11191         * target.h: New file.
11192         * Makefile.in:  Add target.o and inferiors.o.  Update
11193         dependencies.
11194         * linux-low.c (inferior_pid): New static variable,
11195         moved from server.c.
11196         (linux_create_inferior): Renamed from create_inferior.
11197         Call add_inferior.  Return 0 on success instead of a PID.
11198         (linux_attach): Renamed from myattach.
11199         (linux_kill): Renamed from kill_inferior.  Call clear_inferiors ().
11200         (linux_thread_alive): Renamed from mythread_alive.
11201         (linux_wait): Renamed from mywait.  Call clear_inferiors () if the
11202         child dies.
11203         (linux_resume): Renamed from myresume.  Add missing ``return 0''.
11204         (regsets_store_inferior_registers): Correct error message.
11205         Add missing ``return 0''.
11206         (linux_fetch_registers): Renamed from fetch_inferior_registers.
11207         (linux_store_registers): Renamed from store_inferior_registers.
11208         (linux_read_memory): Renamed from read_inferior_memory.
11209         (linux_write_memory): Renamed from write_inferior_memory.
11210         (linux_target_ops): New structure.
11211         (initialize_low): Call set_target_ops ().
11212         * remote-utils.c (unhexify): New function.
11213         (hexify): New function.
11214         (input_interrupt): Send signals to ``signal_pid''.
11215         * server.c (inferior_pid): Remove.
11216         (start_inferior): Update create_inferior call.
11217         (attach_inferior): Call add_inferior.
11218         (handle_query): New function.
11219         (main): Call handle_query for `q' packets.
11220         * server.h: Include "target.h".  Remove obsolete prototypes.
11221         Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
11222
11223 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
11224
11225         * Makefile.in: Add WARN_CFLAGS.  Update configury
11226         dependencies.
11227         * configure.in: Check for <string.h>
11228         * configure: Regenerate.
11229         * config.in: Regenerate.
11230         * gdbreplay.c: Include needed system headers.
11231         (remote_open): Remove strchr prototype.
11232         * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
11233         * regcache.c (supply_register): Change buf argument to const void *.
11234         (supply_register_by_name): Likewise.
11235         (collect_register): Change buf argument to void *.
11236         (collect_register_by_name): Likewise.
11237         * regcache.h: Add missing prototypes.
11238         * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
11239         * server.c (handle_query): New function.
11240         (attached): New static variable, moved out of main.
11241         (main): Quiet longjmp clobber warnings.
11242         * server.h: Add ATTR_NORETURN and ATTR_FORMAT.  Update prototypes.
11243         * utils.c (error): Remove NORETURN.
11244         (fatal): Likewise.