]> Git Repo - binutils.git/blob - gdb/gdbserver/ChangeLog
gdbserver/tracepoint: Add 'struct sockaddr_un *' -> 'struct sockaddr *' cast
[binutils.git] / gdb / gdbserver / ChangeLog
1 2015-03-09  Pedro Alves  <[email protected]>
2
3         * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4         'struct sockaddr' pointer in 'accept' call.
5
6 2015-03-09  Pedro Alves  <[email protected]>
7
8         Revert:
9         2015-03-07  Pedro Alves  <[email protected]>
10         * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
11         or <winsock2.h> here.  Instead include "gdb_socket.h".
12         (remote_open): Use union gdb_sockaddr_u.
13         * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
14         or <winsock2.h> here.  Instead include "gdb_socket.h".
15         (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
16         * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
17         or <sys/un.h>.
18         (init_named_socket, gdb_agent_helper_thread): Use union
19         gdb_sockaddr_u.
20
21 2015-03-07  Pedro Alves  <[email protected]>
22
23         * configure.ac (build_warnings): Move
24         -Wdeclaration-after-statement to the C-specific set.
25         * configure: Regenerate.
26
27 2015-03-07  Pedro Alves  <[email protected]>
28
29         * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
30         or <winsock2.h> here.  Instead include "gdb_socket.h".
31         (remote_open): Use union gdb_sockaddr_u.
32         * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
33         or <winsock2.h> here.  Instead include "gdb_socket.h".
34         (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
35         * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
36         or <sys/un.h>.
37         (init_named_socket, gdb_agent_helper_thread): Use union
38         gdb_sockaddr_u.
39
40 2015-03-07  Pedro Alves  <[email protected]>
41
42         Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
43         instead.
44
45 2015-03-06  Yao Qi  <[email protected]>
46
47         * linux-aarch64-low.c (aarch64_insert_point): Use
48         show_debug_regs as a boolean.
49         (aarch64_remove_point): Likewise.
50
51 2015-03-05  Pedro Alves  <[email protected]>
52
53         * lynx-low.c (lynx_target_ops): Install NULL hooks for
54         stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
55         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
56         * nto-low.c (nto_target_ops): Likewise.
57         * spu-low.c (spu_target_ops): Likewise.
58         * win32-low.c (win32_target_ops): Likewise.
59
60 2015-03-04  Pedro Alves  <[email protected]>
61
62         * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
63         Decide whether a breakpoint triggered based on the SIGTRAP's
64         siginfo.si_code.
65         (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
66         breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
67         (linux_low_filter_event): Check for breakpoints before checking
68         watchpoints.
69         (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
70         siginfo.si_code.
71         (linux_stopped_by_sw_breakpoint)
72         (linux_supports_stopped_by_sw_breakpoint)
73         (linux_stopped_by_hw_breakpoint)
74         (linux_supports_stopped_by_hw_breakpoint): New functions.
75         (linux_target_ops): Install new target methods.
76
77 2015-03-04  Pedro Alves  <[email protected]>
78
79         * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
80         * server.c (swbreak_feature, hwbreak_feature): New globals.
81         (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
82         (captured_main): Clear swbreak_feature and hwbreak_feature.
83         * server.h (swbreak_feature, hwbreak_feature): Declare.
84         * target.h (struct target_ops) <stopped_by_sw_breakpoint,
85         supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
86         supports_stopped_by_hw_breakpoint>: New fields.
87         (target_supports_stopped_by_sw_breakpoint)
88         (target_stopped_by_sw_breakpoint)
89         (target_supports_stopped_by_hw_breakpoint)
90         (target_stopped_by_hw_breakpoint): Declare.
91
92 2015-03-04  Pedro Alves  <[email protected]>
93
94         enum lwp_stop_reason -> enum target_stop_reason
95         * linux-low.c (check_stopped_by_breakpoint): Adjust.
96         (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
97         (linux_wait_1, stuck_in_jump_pad_callback)
98         (move_out_of_jump_pad_callback, linux_resume_one_lwp)
99         (linux_stopped_by_watchpoint):
100         * linux-low.h (enum lwp_stop_reason): Delete.
101         (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
102         * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
103
104 2015-03-04  Yao Qi  <[email protected]>
105
106         * Makefile.in (SFILES): Add linux-aarch64-low.c.
107
108 2015-03-03  Gary Benson  <[email protected]>
109
110         * hostio.c (handle_vFile): Fix prefix lengths.
111
112 2015-03-03  Markus Metzger  <[email protected]>
113
114         * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
115         ptr_bits.
116
117 2015-03-02  Andreas Arnez  <[email protected]>
118
119         * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
120         (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
121         (clean): Add "rm -f" for above C files.
122         * configure.srv (srv_regobj): Add s390-vx-linux64.o,
123         s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
124         (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
125         s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
126         * linux-s390-low.c (HWCAP_S390_VX): New macro.
127         (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
128         (init_registers_s390x_vx_linux64)
129         (init_registers_s390x_tevx_linux64)
130         (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
131         (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
132         declarations.
133         (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
134         (s390_store_vxrs_high): New functions.
135         (s390_regsets): Add entries for NT_S390_VXRS_LOW and
136         NT_S390_VXRS_HIGH.
137         (s390_arch_setup): Add logic for selecting one of the new target
138         descriptions.  Activate the new vector regsets if applicable.
139         (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
140         init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
141         and init_registers_s390x_tevx_linux64.
142
143 2015-03-01  Pedro Alves  <[email protected]>
144
145         * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
146         parameter.
147
148 2015-02-27  Pedro Alves  <[email protected]>
149
150         * linux-x86-low.c (u_debugreg_offset): New function.
151         (x86_linux_dr_get, x86_linux_dr_set): Use it.
152
153 2015-02-27  Pedro Alves  <[email protected]>
154
155         * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
156         [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
157         [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
158         ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
159         (ps_lsetfpregs, ps_getpid)
160         (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
161         (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
162         (ps_lsetxregs, ps_plog): Declare.
163
164 2015-02-27  Pedro Alves  <[email protected]>
165
166         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
167         IP_AGENT_EXPORT_FUNC.
168         * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
169         IP_AGENT_EXPORT_FUNC.
170         * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
171         (IP_AGENT_EXPORT): Delete.
172         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
173         (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
174         (gdb_trampoline_buffer_error, collecting, gdb_collect)
175         (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
176         (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
177         (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
178         (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
179         (traceframe_read_count, traceframe_write_count)
180         (traceframes_created, trace_state_variables, get_raw_reg)
181         (get_trace_state_variable_value, set_trace_state_variable_value)
182         (ust_loaded, helper_thread_id, cmd_buf): Use
183         IPA_SYM_EXPORTED_NAME.
184         (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
185         (tracepoints) Use IP_AGENT_EXPORT_VAR.
186         (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
187         IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
188         (last_tracepoint): Move into !IN_PROCESS_AGENT block.
189         (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
190         EXTERN_C_PUSH/EXTERN_C_POP.
191         (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
192         (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
193         wrap in EXTERN_C_PUSH/EXTERN_C_POP.
194         (trace_buffer_ctrl, trace_buffer_ctrl_curr)
195         (traceframe_write_count, traceframe_read_count)
196         (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
197         (about_to_request_buffer_space, get_trace_state_variable_value)
198         (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
199         (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
200         EXTERN_C_PUSH/EXTERN_C_POP.
201         (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
202         (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
203         (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
204         and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
205         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
206         (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
207         (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
208         * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
209         Define.
210         (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
211         (IP_AGENT_EXPORT_VAR_DECL): Define.
212         (tracing): Declare.
213         (gdb_agent_get_raw_reg): Declare.
214
215 2015-02-27  Tom Tromey  <[email protected]>
216             Pedro Alves  <[email protected]>
217
218         Rename symbols whose names are reserved C++ keywords throughout.
219
220 2015-02-27  Pedro Alves  <[email protected]>
221
222         * Makefile.in (COMPILER): New, get it from autoconf.
223         (CXX): Get from autoconf instead.
224         (COMPILE.pre): Use COMPILER.
225         (CC-LD): Rename to ...
226         (CC_LD): ... this.  Use COMPILER.
227         (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
228         (CXX_FOR_TARGET): Default to g++ instead of gcc.
229         * acinclude.m4: Include build-with-cxx.m4.
230         * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
231         Disable -Werror by default if building in C++ mode.
232         (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
233         -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
234         the C++ compiler.  Save/restore CXXFLAGS too.
235         * configure: Regenerate.
236
237 2015-02-27  Pedro Alves  <[email protected]>
238
239         * acinclude.m4: Include libiberty.m4.
240         * configure.ac: Call libiberty_INIT.
241         * config.in, configure: Regenerate.
242
243 2015-02-26  Pedro Alves  <[email protected]>
244
245         * linux-low.c (linux_wait_1): When incrementing the PC past a
246         program breakpoint always use the_low_target.breakpoint_len as
247         increment, rather than the maximum between that and
248         the_low_target.decr_pc_after_break.
249
250 2015-02-23  Pedro Alves  <[email protected]>
251
252         * linux-low.c (check_stopped_by_breakpoint): Don't check if the
253         thread was doing a step-over; always adjust the PC if
254         we stepped over a permanent breakpoint.
255         (linux_wait_1): If we stepped over breakpoint that was on top of a
256         permanent breakpoint, manually advance the PC past it.
257
258 2015-02-23  Pedro Alves  <[email protected]>
259
260         * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
261         modes.
262         (x86_fill_gregset, x86_store_gregset): Use it when handling
263         $orig_eax.
264
265 2015-02-20  Pedro Alves  <[email protected]>
266
267         * thread-db.c: Include "nat/linux-procfs.h".
268         (thread_db_init): Skip listing new threads if the kernel supports
269         PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
270
271 2015-02-20  Pedro Alves  <[email protected]>
272
273         * linux-low.c (status_pending_p_callback): Use ptid_match.
274
275 2015-02-19  Antoine Tremblay  <[email protected]>
276
277         PR breakpoints/16812
278         * linux-low.c (wstatus_maybe_breakpoint): Remove.
279         (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
280         (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
281
282 2015-02-10  Antoine Tremblay <[email protected]>
283
284         PR breakpoints/15956
285         * tracepoint.c (cmd_qtinit): Add check for current_thread.
286
287 2015-02-09  Markus Metzger  <[email protected]>
288
289         * linux-low.c (linux_low_btrace_conf): Print size.
290         * server.c (handle_btrace_conf_general_set): New.
291         (hanle_general_set): Call handle_btrace_conf_general_set.
292         (handle_query): Report Qbtrace-conf:bts:size as supported.
293
294 2015-02-09  Markus Metzger  <[email protected]>
295
296         * linux-low.c (linux_low_enable_btrace): Update parameters.
297         (linux_low_btrace_conf): New.
298         (linux_target_ops)<to_btrace_conf>: Initialize.
299         * server.c (current_btrace_conf): New.
300         (handle_btrace_enable): Rename to ...
301         (handle_btrace_enable_bts): ... this.  Pass &current_btrace_conf
302         to target_enable_btrace.  Update comment.  Update users.
303         (handle_qxfer_btrace_conf): New.
304         (qxfer_packets): Add btrace-conf entry.
305         (handle_query): Report qXfer:btrace-conf:read as supported packet.
306         * target.h (target_ops)<enable_btrace>: Update parameters and comment.
307         (target_ops)<read_btrace_conf>: New.
308         (target_enable_btrace): Update parameters.
309         (target_read_btrace_conf): New.
310
311 2015-02-09  Markus Metzger  <[email protected]>
312
313         * server.c (handle_btrace_general_set): Remove call to
314         target_supports_btrace.
315         (supported_btrace_packets): New.
316         (handle_query): Call supported_btrace_packets.
317         * target.h: include btrace-common.h.
318         (btrace_target_info): Removed.
319         (supports_btrace, target_supports_btrace): Update parameters.
320
321 2015-02-09  Markus Metzger  <[email protected]>
322
323         * Makefile.in (SFILES): Add common/btrace-common.c.
324         (OBS): Add common/btrace-common.o.
325         (btrace-common.o): Add build rules.
326         * linux-low: Include btrace-common.h.
327         (linux_low_read_btrace): Use struct btrace_data.  Call
328         btrace_data_init and btrace_data_fini.
329
330 2015-02-06  Pedro Alves  <[email protected]>
331
332         * thread-db.c (find_new_threads_callback): Add debug output.
333
334 2015-02-04  Pedro Alves  <[email protected]>
335
336         * linux-low.c (handle_extended_wait): Don't resume LWPs here.
337         (resume_stopped_resumed_lwps): New function.
338         (linux_wait_for_event_filtered): Use it.
339
340 2015-01-15  Sergio Durigan Junior  <[email protected]>
341
342         * Makefile.in (SFILES): Add linux-personality.c.
343         (linux-personality.o): New rule.
344         * configure.srv (srv_linux_obj): Add linux-personality.o to the
345         list of objects to be built.
346         * linux-low.c: Include nat/linux-personality.h.
347         (linux_create_inferior): Remove code to disable address space
348         randomization (moved to ../nat/linux-personality.c).  Create
349         cleanup to disable address space randomization.
350
351 2015-01-15  Sergio Durigan Junior  <[email protected]>
352
353         * Makefile.in (posix-strerror.o): New rule.
354         (mingw-strerror.o): Likewise.
355         * configure: Regenerated.
356         * configure.ac: Source file ../common/common.host.  Initialize new
357         variable srv_host_obs.  Add srv_host_obs to GDBSERVER_DEPFILES.
358
359 2015-01-14  Yao Qi  <[email protected]>
360
361         * Makefile.in (SFILES): Add nat/ppc-linux.c.
362         (ppc-linux.o): New rule.
363         * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
364         * configure.ac: AC_CHECK_FUNCS(getauxval).
365         * config.in: Re-generated.
366         * configure: Re-generated.
367         * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
368         ppc64_64bit_inferior_p
369
370 2015-01-14  Yao Qi  <[email protected]>
371
372         * linux-ppc-low.c: Include "nat/ppc-linux.h".
373          (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
374         (PPC_FEATURE_HAS_ALTIVEC,  PPC_FEATURE_HAS_SPE): Likewise.
375         (PT_ORIG_R3, PT_TRAP): Likewise.
376         (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
377         (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
378         (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
379
380 2015-01-10  Joel Brobecker  <[email protected]>
381
382         * i387-fp.c (i387_cache_to_xsave): In look over
383         num_avx512_zmmh_high_registers, replace use of struct i387_xsave
384         zmmh_low_space field by use of zmmh_high_space.
385
386 2015-01-09  Pedro Alves  <[email protected]>
387
388         * linux-low.c (step_over_bkpt): Move higher up in the file.
389         (handle_extended_wait): Don't store the stop_pc here.
390         (get_stop_pc): Adjust comments and rename to ...
391         (check_stopped_by_breakpoint): ... this.  Record whether the LWP
392         stopped for a software breakpoint or hardware breakpoint.
393         (thread_still_has_status_pending_p): New function.
394         (status_pending_p_callback): Use
395         thread_still_has_status_pending_p.  If the event is no longer
396         interesting, resume the LWP.
397         (handle_tracepoints): Add assert.
398         (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
399         (wstatus_maybe_breakpoint): New function.
400         (cancel_breakpoint): Delete function.
401         (check_stopped_by_watchpoint): New function, factored out from
402         linux_low_filter_event.
403         (lp_status_maybe_breakpoint): Delete function.
404         (linux_low_filter_event): Remove filter_ptid argument.
405         Leave thread group exits pending here.  Store the LWP's stop PC.
406         Always leave events pending.
407         (linux_wait_for_event_filtered): Pull all events out of the
408         kernel, and leave them all pending.
409         (count_events_callback, select_event_lwp_callback): Consider all
410         events.
411         (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
412         (select_event_lwp): Only give preference to the stepping LWP in
413         all-stop mode.  Adjust comments.
414         (ignore_event): New function.
415         (linux_wait_1): Delete 'retry' label.  Use ignore_event.  Remove
416         references to cancel_breakpoints.  Adjust to renames.  Also give
417         equal priority to all LWPs that have had events in non-stop mode.
418         If reporting a software breakpoint event, unadjust the LWP's PC.
419         (linux_wait): If linux_wait_1 returned an ignored event, retry.
420         (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
421         Adjust.
422         (linux_resume_one_lwp): Store the LWP's PC.  Adjust.
423         (resume_status_pending_p): Use thread_still_has_status_pending_p.
424         (linux_stopped_by_watchpoint): Adjust.
425         (linux_target_ops): Remove reference to linux_cancel_breakpoints.
426         * linux-low.h (enum lwp_stop_reason): New.
427         (struct lwp_info) <stop_pc>: Adjust comment.
428         <stopped_by_watchpoint>: Delete field.
429         <stop_reason>: New field.
430         * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
431         * mem-break.c (software_breakpoint_inserted_here)
432         (hardware_breakpoint_inserted_here): New function.
433         * mem-break.h (software_breakpoint_inserted_here)
434         (hardware_breakpoint_inserted_here): Declare.
435         * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
436         (cancel_breakpoints): Delete.
437         * tracepoint.c (clear_installed_tracepoints, stop_tracing)
438         (upload_fast_traceframes): Remove references to
439         cancel_breakpoints.
440
441 2015-01-09  Pedro Alves  <[email protected]>
442
443         * thread-db.c (find_new_threads_callback): Ignore thread if the
444         kernel thread ID is -1.
445
446 2015-01-09  Pedro Alves  <[email protected]>
447
448         * linux-low.c (linux_attach_fail_reason_string): Move to
449         nat/linux-ptrace.c, and rename.
450         (linux_attach_lwp): Update comment.
451         (attach_proc_task_lwp_callback): New function.
452         (linux_attach): Adjust to rename and use
453         linux_proc_attach_tgid_threads.
454         (linux_attach_fail_reason_string): Delete declaration.
455
456 2015-01-01  Joel Brobecker  <[email protected]>
457
458         * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
459         * server.c (gdbserver_version): Likewise.
460
461 2014-12-29  Sergio Durigan Junior  <[email protected]>
462
463         * remote-utils.c: Include ctype.h.
464         (input_interrupt): Explicitly handle the case when the char
465         received is the NUL byte.  Improve the printing of non-ASCII
466         characters.
467
468 2014-12-16  Joel Brobecker  <[email protected]>
469
470         * linux-low.c (linux_low_filter_event): Update call to
471         linux_enable_event_reporting following the addition of
472         a new parameter to that function.
473
474 2014-12-16  Catalin Udma  <[email protected]>
475
476         PR server/17457
477         * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
478         (AARCH64_FPCR_REGNO): Likewise.
479         (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
480         (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
481         (aarch64_store_fpregset): Likewise.
482
483 2014-12-15  Joel Brobecker  <[email protected]>
484
485         * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
486         Remove FIXME comment about assumption about N.
487
488 2014-12-13  Joel Brobecker  <[email protected]>
489
490         * configure.ac: If large-file support is disabled in GDBserver,
491         pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
492         * configure: Regenerate.
493
494 2014-12-12  Andreas Arnez  <[email protected]>
495
496         * linux-low.c (regsets_fetch_inferior_registers): Suppress the
497         warning upon ENODATA from ptrace.
498         * linux-s390-low.c (s390_store_tdb): New.
499         (s390_regsets): Add regset for NT_S390_TDB.
500
501 2014-12-12  Andreas Arnez  <[email protected]>
502
503         * linux-low.c (regsets_store_inferior_registers): Skip regsets
504         without a fill_function.
505         * linux-s390-low.c (s390_fill_last_break): Remove.
506         (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
507         (s390_arch_setup): Use regset's size instead of fill_function for
508         loop end condition.
509
510 2014-12-12  Andreas Arnez  <[email protected]>
511
512         * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
513         the regset's store function when ptrace returned an error.
514         * regcache.c (get_thread_regcache): Invalidate register cache
515         before fetching inferior's registers.
516
517 2014-12-12  Andreas Arnez  <[email protected]>
518
519         * linux-low.c (regsets_fetch_inferior_registers): Rephrase
520         while-loop as for-loop.
521         (regsets_store_inferior_registers): Likewise.
522
523 2014-11-28  Yao Qi  <[email protected]>
524
525         * configure.ac(AC_CHECK_FUNCS): Remove readlink.
526         * config.in, configure: Re-generate.
527         * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
528         is defined.
529
530 2014-11-21  Yao Qi  <[email protected]>
531
532         * configure.ac: Don't invoke AC_FUNC_ALLOCA.
533         (AC_CHECK_HEADERS): Remove malloc.h.
534         * configure: Re-generated.
535         * config.in: Re-generated.
536         * server.h: Don't include alloca.h and malloc.h.
537         * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
538         Don't include malloc.h.
539
540 2014-11-17  Joel Brobecker  <[email protected]>
541
542         * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
543         corresponding ERRNO check in same block.
544
545 2014-11-12  Pedro Alves  <[email protected]>
546
547         * server.c (cont_thread): Update comment.
548         (start_inferior, attach_inferior): No longer clear cont_thread.
549         (handle_v_cont): No longer set cont_thread.
550         (captured_main): Clear cont_thread each time a GDB connects.
551
552 2014-11-12  Pedro Alves  <[email protected]>
553
554         * linux-low.c (linux_wait_1): Don't force a wait for the Hc
555         thread, and don't resume all threads if the Hc thread has exited.
556
557 2014-11-12  Pedro Alves  <[email protected]>
558
559         * linux-low.c (linux_request_interrupt): Always send a SIGINT to
560         the process group instead of to a specific LWP.
561
562 2014-10-15  Pedro Alves  <[email protected]>
563
564         PR server/17487
565         * win32-arm-low.c (arm_set_thread_context): Remove current_event
566         parameter.
567         (arm_set_thread_context): Delete.
568         (the_low_target): Adjust.
569         * win32-i386-low.c (debug_registers_changed)
570         (debug_registers_used): Delete.
571         (update_debug_registers_callback): New function.
572         (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
573         needing to update their debug registers.
574         (win32_get_current_dr): New function.
575         (x86_dr_low_get_addr, x86_dr_low_get_control)
576         (x86_dr_low_get_status): Fetch the debug register from the thread
577         record's context.
578         (i386_initial_stuff): Adjust.
579         (i386_get_thread_context): Remove current_event parameter.  Don't
580         clear debug_registers_changed nor copy DR values to
581         debug_reg_state.
582         (i386_set_thread_context): Delete.
583         (i386_prepare_to_resume): New function.
584         (i386_thread_added): Mark the thread as needing to update irs
585         debug registers.
586         (the_low_target): Remove i386_set_thread_context and install
587         i386_prepare_to_resume.
588         * win32-low.c (win32_get_thread_context): Adjust.
589         (win32_set_thread_context): Use SetThreadContext
590         directly.
591         (win32_prepare_to_resume): New function.
592         (win32_require_context): New function, factored out from ...
593         (thread_rec): ... this.
594         (continue_one_thread): Call win32_prepare_to_resume on each thread
595         we're about to continue.
596         (win32_resume): Call win32_prepare_to_resume on the event thread.
597         * win32-low.h (struct win32_thread_info)
598         <debug_registers_changed>: New field.
599         (struct win32_target_ops): Change prototype of set_thread_context,
600         delete set_thread_context and add prepare_to_resume.
601         (win32_require_context): New declaration.
602
603 2014-10-08  Gary Benson  <[email protected]>
604
605         * server.h: Do not include common-exceptions.h.
606
607 2014-10-08  Gary Benson  <[email protected]>
608
609         * server.h: Do not include cleanups.h.
610
611 2014-09-30  James Hogan  <[email protected]>
612
613         * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
614         mips64-dsp-linux.c.
615
616 2014-09-23  Yao Qi  <[email protected]>
617
618         * linux-low.c (lp_status_maybe_breakpoint): New function.
619         (linux_low_filter_event): Call lp_status_maybe_breakpoint.
620         (count_events_callback): Likewise.
621         (select_event_lwp_callback): Likewise.
622         (cancel_breakpoints_callback): Likewise.
623
624 2014-09-19  Don Breazeal  <[email protected]>
625
626         * linux-low.c (handle_extended_wait): Call
627         linux_ptrace_get_extended_event.
628         (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
629         linux_is_extended_waitstatus.
630
631 2014-09-16  Joel Brobecker  <[email protected]>
632
633         * Makefile.in (CPPFLAGS): Define.
634         (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
635         (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
636
637 2014-09-16  Gary Benson  <[email protected]>
638
639         * inferiors.h (current_inferior): Renamed as...
640         (current_thread): New variable.  All uses updated.
641         * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
642         (maybe_move_out_of_jump_pad): Likewise.
643         (cancel_breakpoint): Likewise.
644         (linux_low_filter_event): Likewise.
645         (wait_for_sigstop): Likewise.
646         (linux_resume_one_lwp): Likewise.
647         (need_step_over_p): Likewise.
648         (start_step_over): Likewise.
649         (linux_stabilize_threads): Renamed save_inferior as saved_thread.
650         * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
651         * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
652         and save_inferior as saved_thread.
653         * regcache.c (get_thread_regcache): Renamed saved_inferior as
654         saved_thread.
655         (regcache_invalidate_thread): Likewise.
656         * remote-utils.c (prepare_resume_reply): Likewise.
657         * thread-db.c (thread_db_get_tls_address): Likewise.
658         (disable_thread_event_reporting): Likewise.
659         (remove_thread_event_breakpoints): Likewise.
660         * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
661         as saved_thread.
662         * target.h (set_desired_inferior): Renamed as...
663         (set_desired_thread): New declaration.  All uses updated.
664         * server.c (myresume): Updated comment to reference thread instead
665         of inferior.
666         (handle_serial_event): Likewise.
667         (handle_target_event): Likewise.
668
669 2014-09-12  Tom Tromey  <[email protected]>
670             Gary Benson  <[email protected]>
671
672         * regcache.h: Include common-regcache.h.
673         (regcache_read_pc): Don't declare.
674         * regcache.c (get_thread_regcache_for_ptid): New function.
675
676 2014-09-11  Tom Tromey  <[email protected]>
677             Gary Benson  <[email protected]>
678
679         * symbol.c: New file.
680         * Makefile.in (SFILES): Add symbol.c.
681         (OBS): Add symbol.o.
682
683 2014-09-11  Gary Benson  <[email protected]>
684
685         * target.c (target_stop_ptid, target_continue_ptid): New
686         functions.
687
688 2014-09-11  Tom Tromey  <[email protected]>
689             Gary Benson  <[email protected]>
690
691         * target.h: Include target/target.h.
692         * target.c (target_read_memory, target_read_uint32)
693         (target_write_memory): New functions.
694
695 2014-09-11  Gary Benson  <[email protected]>
696
697         * server.h (debug_hw_points): Don't declare.
698         * server.c (debug_hw_points): Don't define.  Replace all uses
699         with show_debug_regs.
700         * linux-aarch64-low.c (debug_hw_points): Don't define.  Replace
701         all uses with show_debug_regs.
702
703 2014-09-08  Edjunior Barbosa Machado  <[email protected]>
704
705         * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
706         endianness into account.
707         (ppc_supply_ptrace_register): Likewise.
708
709 2014-09-03  James Hogan  <[email protected]>
710
711         * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
712         to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
713
714 2014-09-03  Gary Benson  <[email protected]>
715
716         * linux-x86-low.c (x86_linux_prepare_to_resume): Use
717         ALL_DEBUG_ADDRESS_REGISTERS.
718
719 2014-09-02  Gary Benson  <[email protected]>
720
721         * i386-low.h: Renamed as...
722         * x86-low.h: New file.  All type, function and variable name
723         prefixes changed from "i386_" to "x86_".  All references updated.
724         * i386-low.c: Renamed as...
725         * x86-low.c: New file.  All type, function and variable name
726         prefixes changed from "i386_" to "x86_".  All references updated.
727
728 2014-09-02  Gary Benson  <[email protected]>
729
730         * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
731         (x86_linux_new_thread): Likewise.
732
733 2014-08-29  Gary Benson  <[email protected]>
734
735         * server.h (setjmp.h): Do not include.
736         (toplevel): Do not declare.
737         (common-exceptions.h): Include.
738         (cleanups.h): Likewise.
739         * server.c (toplevel): Do not define.
740         (exit_code): New static global.
741         (detach_or_kill_for_exit_cleanup): New function.
742         (main): New function.  Original main renamed to...
743         (captured_main): New function.
744         * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
745
746 2014-08-29  Gary Benson  <[email protected]>
747
748         * Makefile.in (SFILES): Add common/common-exceptions.c.
749         (OBS): Add common-exceptions.o.
750         (common-exceptions.o): New rule.
751         * utils.c (prepare_to_throw_exception): New function.
752
753 2014-08-29  Gary Benson  <[email protected]>
754
755         * config.in: Regenerate.
756         * configure: Likewise.
757
758 2014-08-29  Gary Benson  <[email protected]>
759
760         * Makefile.in (SFILES): Add common/cleanups.c.
761         (OBS): cleanups.o.
762         (cleanups.o): New rule.
763
764 2014-08-29  Gary Benson  <[email protected]>
765
766         * utils.c (internal_vwarning): New function.
767
768 2014-08-28  Gary Benson  <[email protected]>
769
770         * utils.h (fatal): Remove declaration.
771         * utils.c (fatal): Remove function.
772
773 2014-08-28  Gary Benson  <[email protected]>
774
775         * tracepoint.c (gdb_agent_init): Replace fatal with
776         perror_with_name.
777         (initialize_tracepoint): Likewise.
778
779 2014-08-28  Gary Benson  <[email protected]>
780
781         * remote-utils.c (remote_prepare): Replace fatal with error.
782
783 2014-08-28  Gary Benson  <[email protected]>
784
785         * linux-low.c (linux_async): Replace fatal with warning.
786         Tidy up and return.
787         (linux_start_non_stop): Return -1 if linux_async failed.
788
789 2014-08-28  Gary Benson  <[email protected]>
790
791         * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
792         gdb_assert.
793         (i386_dr_low_get_addr): Remove vague comment.
794         * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
795         gdb_assert.
796
797 2014-08-28  Gary Benson  <[email protected]>
798
799         * inferiors.c (get_thread_process): Replace check with gdb_assert.
800         * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
801         internal_error.
802         (linux_resume_one_lwp): Likewise.
803         * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
804         gdb_assert.
805         * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
806         with internal_error.
807         * regcache.c (get_thread_regcache): Replace check with gdb_assert.
808         (init_register_cache): Replace fatal with gdb_assert_not_reached.
809         (find_register_by_name): Replace fatal with internal_error.
810         (find_regno): Likewise.
811         * tdesc.c (init_target_desc): Replace check with gdb_assert.
812         * thread-db.c (thread_db_create_event): Likewise.
813         (thread_db_load_search): Likewise.
814         (try_thread_db_load_1): Likewise.
815         * tracepoint.c (get_jump_space_head): Replace fatal with
816         internal_error.
817         (claim_trampoline_space): Likewise.
818         (have_fast_tracepoint_trampoline_buffer): Likewise.
819         (cmd_qtstart): Likewise.
820         (stop_tracing): Likewise.
821         (fast_tracepoint_collecting): Likewise.
822         (target_malloc): Likewise.
823         (download_tracepoint): Likewise.
824         (download_trace_state_variables): Replace check with gdb_assert.
825         (upload_fast_traceframes): Replace fatal with internal_error.
826
827 2014-08-19  Tom Tromey  <[email protected]>
828             Gary Benson  <[email protected]>
829
830         * Makefile.in (SFILES): Add common/common-debug.c.
831         (OBS): Add common-debug.o.
832         (common-debug.o): New rule.
833         * debug.h (debug_printf): Don't declare.
834         * debug.c (debug_printf): Renamed and rewritten as...
835         (debug_vprintf): New function.
836
837 2014-08-19  Gary Benson  <[email protected]>
838
839         * utils.h: Do not include print-utils.h.
840
841 2014-08-19  Tom Tromey  <[email protected]>
842             Gary Benson  <[email protected]>
843
844         * server.h: Add static assertion.
845         (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
846
847 2014-08-19  Tom Tromey  <[email protected]>
848             Gary Benson  <[email protected]>
849
850         * Makefile.in (SFILES): Add common/errors.c.
851         (OBS): Add errors.o.
852         (IPA_OBS): Add errors-ipa.o.
853         (errors.o): New rule.
854         (errors-ipa.o): Likewise.
855         * utils.h (perror_with_name, error, warning): Don't declare.
856         * utils.c (warning): Renamed and rewritten as...
857         (vwarning): New function.
858         (error): Renamed and rewritten as...
859         (verror): New function.
860         (internal_error): Renamed and rewritten as...
861         (internal_verror): New function.
862
863 2014-08-07  Gary Benson  <[email protected]>
864
865         * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
866         * configure: Regenerate.
867         * config.in: Likewise.
868         * server.h: Do not include errno.h.
869         * event-loop.c: Likewise.
870         * hostio-errno.c: Likewise.
871         * linux-low.c: Likewise.
872         * remote-utils.c: Likewise.
873         * spu-low.c: Likewise.
874         * utils.c: Likewise.
875         * gdbreplay.c: Unconditionally include errno.h.
876
877 2014-08-07  Gary Benson  <[email protected]>
878
879         * server.h: Do not include string.h.
880         * event-loop.c: Likewise.
881         * linux-low.c: Likewise.
882         * regcache.c: Likewise.
883         * remote-utils.c: Likewise.
884         * spu-low.c: Likewise.
885         * utils.c: Likewise.
886
887 2014-08-07  Gary Benson  <[email protected]>
888
889         * server.h: Do not include gdb_assert.h.
890
891 2014-08-07  Gary Benson  <[email protected]>
892
893         * server.h: Do not include common-utils.h.
894
895 2014-08-07  Gary Benson  <[email protected]>
896
897         * server.h: Do not include ptid.h.
898         * notif.h: Likewise.
899
900 2014-08-07  Gary Benson  <[email protected]>
901
902         * server.h: Do not include gdb_locale.h.
903
904 2014-08-07  Gary Benson  <[email protected]>
905
906         * server.h: Do not include gdb/signals.h.
907         * win32-low.c: Likewise.
908
909 2014-08-07  Gary Benson  <[email protected]>
910
911         * server.h: Do not include pathmax.h.
912
913 2014-08-07  Gary Benson  <[email protected]>
914
915         * server.h: Do not include libiberty.h.
916         * linux-bfin-low.c: Likewise.
917
918 2014-08-07  Gary Benson  <[email protected]>
919
920         * server.h: Do not include ansidecl.h.
921
922 2014-08-07  Gary Benson  <[email protected]>
923
924         * linux-x86-low.c: Do not include stddef.h.
925         * lynx-ppc-low.c: Likewise.
926         * tracepoint.c: Likewise.
927
928 2014-08-07  Gary Benson  <[email protected]>
929
930         * server.h: Do not include stdarg.h.
931         * nto-low.c: Likewise.
932
933 2014-08-07  Gary Benson  <[email protected]>
934
935         * server.h: Do not include stdlib.h.
936         * inferiors.c: Likewise.
937         * linux-low.c: Likewise.
938         * regcache.c: Likewise.
939         * spu-low.c: Likewise.
940         * tracepoint.c: Likewise.
941         * utils.c: Likewise.
942
943 2014-08-07  Gary Benson  <[email protected]>
944
945         * server.h: Do not include stdio.h.
946         * linux-low.c: Likewise.
947         * remote-utils.c: Likewise.
948         * spu-low.c: Likewise.
949         * utils.c: Likewise.
950         * wincecompat.c: Likewise.
951
952 2014-08-06  Gary Benson  <[email protected]>
953
954         * regcache.c (init_register_cache): Move conditionals inside if.
955
956 2014-08-06  Gary Benson  <[email protected]>
957
958         * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
959
960 2014-07-31  Gary Benson  <[email protected]>
961
962         * ax.h: Do not include server.h.
963         * gdbthread.h: Likewise.
964         * lynx-low.h: Likewise.
965         * notif.h: Likewise.
966
967 2014-07-30  Gary Benson  <[email protected]>
968
969         * server.h: Include common-defs.h.
970         Do not include config.h or build-gnulib-gdbserver/config.h.
971
972 2014-07-30  Gary Benson  <[email protected]>
973
974         * hostio-errno.c: Move server.h to top of includes list.
975         * inferiors.c: Likewise.
976         * linux-x86-low.c: Likewise.
977         * notif.c: Include server.h.
978
979 2014-07-24  Tom Tromey  <[email protected]>
980             Gary Benson  <[email protected]>
981
982         * server.h (CORE_ADDR): Now unsigned.
983
984 2014-07-16  Pedro Alves  <[email protected]>
985
986         * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
987
988 2014-07-15  Pedro Alves  <[email protected]>
989
990         * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
991         copy.
992
993 2014-07-11  Pedro Alves  <[email protected]>
994
995         * linux-low.c (kill_wait_lwp): New function, based on
996         kill_one_lwp_callback, but use my_waitpid directly.
997         (kill_one_lwp_callback, linux_kill): Use it.
998
999 2014-06-23  Pedro Alves  <[email protected]>
1000
1001         * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
1002         before setting DR0..DR3.
1003
1004 2014-06-20  Gary Benson  <[email protected]>
1005
1006         * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
1007         * configure: Regenerated.
1008         * config.in: Likewise.
1009
1010 2014-06-20  Gary Benson  <[email protected]>
1011
1012         * Makefile.in (SFILES): Update locations for files moved
1013         from common to nat.
1014         (object file files): Reordered.
1015
1016 2014-06-20  Gary Benson  <[email protected]>
1017
1018         * i386-low.h (i386_dr_low_can_set_addr): Removed.
1019         (i386_dr_low_set_addr): Likewise.
1020         (i386_dr_low_get_addr): Likewise.
1021         (i386_dr_low_can_set_control): Likewise.
1022         (i386_dr_low_set_control): Likewise.
1023         (i386_dr_low_get_control): Likewise.
1024         (i386_dr_low_get_status): Likewise.
1025         (i386_get_debug_register_length): Likewise.
1026         * linux-x86-low.c (i386_dr_low_set_addr):
1027         Changed signature.  Made static.
1028         (i386_dr_low_get_addr): Likewise.
1029         (i386_dr_low_set_control): Likewise.
1030         (i386_dr_low_get_control): Likewise.
1031         (i386_dr_low_get_status): Likewise.
1032         (i386_dr_low): New global variable.
1033         * win32-i386-low.c (i386_dr_low_set_addr):
1034         Changed signature.  Made static.
1035         (i386_dr_low_get_addr): Likewise.
1036         (i386_dr_low_set_control): Likewise.
1037         (i386_dr_low_get_control): Likewise.
1038         (i386_dr_low_get_status): Likewise.
1039         (i386_dr_low): New global variable.
1040
1041 2014-06-20  Marcus Shawcroft  <[email protected]>
1042
1043         * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
1044         * Makefile.in (AR, AR_FLAGS): Define.
1045         * configure: Regenerate.
1046
1047 2014-06-19  Gary Benson  <[email protected]>
1048
1049         * Makefile.in (i386-dregs.o): New rule.
1050         * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
1051         * i386-low.c (target.h): Remove include.
1052         (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
1053         (DR_CONTROL_SHIFT): Likewise.
1054         (DR_CONTROL_SIZE): Likewise.
1055         (DR_RW_EXECUTE): Likewise.
1056         (DR_RW_WRITE): Likewise.
1057         (DR_RW_READ): Likewise.
1058         (DR_RW_IORW): Likewise.
1059         (DR_LEN_1): Likewise.
1060         (DR_LEN_2): Likewise.
1061         (DR_LEN_4): Likewise.
1062         (DR_LEN_8): Likewise.
1063         (DR_LOCAL_ENABLE_SHIFT): Likewise.
1064         (DR_GLOBAL_ENABLE_SHIFT): Likewise.
1065         (DR_ENABLE_SIZE): Likewise.
1066         (DR_LOCAL_SLOWDOWN): Likewise.
1067         (DR_GLOBAL_SLOWDOWN): Likewise.
1068         (DR_CONTROL_RESERVED): Likewise.
1069         (I386_DR_CONTROL_MASK): Likewise.
1070         (I386_DR_VACANT): Likewise.
1071         (I386_DR_LOCAL_ENABLE): Likewise.
1072         (I386_DR_GLOBAL_ENABLE): Likewise.
1073         (I386_DR_DISABLE): Likewise.
1074         (I386_DR_SET_RW_LEN): Likewise.
1075         (I386_DR_GET_RW_LEN): Likewise.
1076         (I386_DR_WATCH_HIT): Likewise.
1077         (i386_wp_op_t): Likewise.
1078         (i386_show_dr): Likewise.
1079         (i386_length_and_rw_bits): Likewise.
1080         (i386_insert_aligned_watchpoint): Likewise.
1081         (i386_remove_aligned_watchpoint): Likewise.
1082         (i386_handle_nonaligned_watchpoint): Likewise.
1083         i386_update_inferior_debug_regs(): Likewise.
1084         (i386_dr_insert_watchpoint): Likewise.
1085         (i386_dr_remove_watchpoint): Likewise.
1086         (i386_dr_region_ok_for_watchpoint): Likewise.
1087         (i386_dr_stopped_data_address): Likewise.
1088         (i386_dr_stopped_by_watchpoint): Likewise.
1089
1090 2014-06-19  Gary Benson  <[email protected]>
1091
1092         * i386-low.c (i386_dr_show): Renamed to
1093         i386_show_dr and made static.  All uses updated.
1094         (i386_dr_length_and_rw_bits): Renamed to
1095         i386_length_and_rw_bits and made static.
1096         All uses updated.
1097         (i386_dr_insert_aligned_watchpoint): Renamed to
1098         i386_insert_aligned_watchpoint and made static.
1099         All uses updated.
1100         (i386_dr_remove_aligned_watchpoint): Renamed to
1101         i386_remove_aligned_watchpoint and made static.
1102         All uses updated.
1103         (i386_dr_update_inferior_debug_regs): Renamed to
1104         i386_update_inferior_debug_regs and made static.
1105         All uses updated.
1106
1107 2014-06-18  Gary Benson  <[email protected]>
1108
1109         * i386-low.h (i386_dr_low_can_set_addr): New macro.
1110         (i386_dr_low_can_set_control): Likewise.
1111         (i386_get_debug_register_length): Likewise.
1112         * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
1113         (i386_dr_low_can_set_control): Likewise.
1114         (i386_get_debug_register_length): Likewise.
1115
1116 2014-06-17  Gary Benson  <[email protected]>
1117
1118         * i386-low.h (i386-dregs.h): New include.
1119         (DR_FIRSTADDR): Now in i386-dregs.h.
1120         (DR_LASTADDR): Likewise.
1121         (DR_NADDR): Likewise.
1122         (DR_STATUS): Likewise.
1123         (DR_CONTROL): Likewise.
1124         (i386_debug_reg_state): Likewise.
1125         (i386_dr_insert_watchpoint): Likewise.
1126         (i386_dr_remove_watchpoint): Likewise.
1127         (i386_dr_region_ok_for_watchpoint): Likewise.
1128         (i386_dr_stopped_data_address): Likewise.
1129         (i386_dr_stopped_by_watchpoint): Likewise.
1130         * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
1131
1132 2014-06-18  Gary Benson  <[email protected]>
1133
1134         * i386-low.h (i386_low_insert_watchpoint): Renamed to
1135         i386_dr_insert_watchpoint.
1136         (i386_low_remove_watchpoint): Renamed to
1137         i386_dr_remove_watchpoint.
1138         (i386_low_region_ok_for_watchpoint): Renamed to
1139         i386_dr_region_ok_for_watchpoint.
1140         (i386_low_stopped_data_address): Renamed to
1141         i386_dr_stopped_data_address.
1142         (i386_low_stopped_by_watchpoint): Renamed to
1143         i386_dr_stopped_by_watchpoint.
1144         * i386-low.c (i386_show_dr): Renamed to
1145         i386_dr_show and made nonstatic.  All uses updated.
1146         (i386_length_and_rw_bits): Renamed to
1147         i386_dr_length_and_rw_bits and made nonstatic.
1148         All uses updated.
1149         (i386_insert_aligned_watchpoint): Renamed to
1150         i386_dr_insert_aligned_watchpoint and made nonstatic.
1151         All uses updated.
1152         (i386_remove_aligned_watchpoint): Renamed to
1153         i386_dr_remove_aligned_watchpoint and made nonstatic.
1154         All uses updated.
1155         (i386_update_inferior_debug_regs): Renamed to
1156         i386_dr_update_inferior_debug_regs and made nonstatic.
1157         All uses updated.
1158         (i386_low_insert_watchpoint): Renamed to
1159         i386_dr_insert_watchpoint.  All uses updated.
1160         (i386_low_remove_watchpoint): Renamed to
1161         i386_dr_remove_watchpoint.  All uses updated.
1162         (i386_low_region_ok_for_watchpoint): Renamed to
1163         i386_dr_region_ok_for_watchpoint.  All uses updated.
1164         (i386_low_stopped_data_address): Renamed to
1165         i386_dr_stopped_data_address.  All uses updated.
1166         (i386_low_stopped_by_watchpoint): Renamed to
1167         i386_dr_stopped_by_watchpoint.  All uses updated.
1168
1169 2014-06-18  Gary Benson  <[email protected]>
1170
1171         * i386-low.c (i386_dr_low_can_set_addr): New macro.
1172         (i386_dr_low_can_set_control): Likewise.
1173         (i386_insert_aligned_watchpoint): New check.
1174
1175 2014-06-18  Gary Benson  <[email protected]>
1176
1177         * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
1178         Renamed to state.
1179
1180 2014-06-18  Gary Benson  <[email protected]>
1181
1182         * i386-low.c (i386_length_and_rw_bits): Use internal_error
1183         instead of fatal and error.
1184         (i386_handle_nonaligned_watchpoint): Likewise.
1185
1186 2014-06-18  Gary Benson  <[email protected]>
1187
1188         * i386-low.c (i386_get_debug_register_length): New macro.
1189         (TARGET_HAS_DR_LEN_8): Remove conditional.  Use above macro.
1190         (i386_show_dr): Use debug_printf instead of fprintf.  Use
1191         phex to format values.
1192
1193 2014-06-18  Gary Benson  <[email protected]>
1194
1195         * i386-low.h: Comment changes.
1196         * i386-low.c: Likewise.
1197
1198 2014-06-18  Gary Benson  <[email protected]>
1199
1200         * i386-low.c: Whitespace changes.
1201
1202 2014-06-12  Tom Tromey  <[email protected]>
1203
1204         * utils.c (freeargv): Remove.
1205
1206 2014-06-12  Tom Tromey  <[email protected]>
1207
1208         * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
1209         * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
1210         (parse_debug_format_options): Likewise.
1211         (gdbserver_usage): Likewise.
1212         * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
1213         (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
1214         (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
1215         against libiberty.
1216         ($(LIBGNU)): Depend on libiberty.
1217         (all-lib): Recurse into all subdirs.
1218         (install-only): Invoke "install" target in subdirs.
1219         (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
1220         targets.
1221         * configure: Rebuild.
1222         * configure.ac: Add ACX_CONFIGURE_DIR for libiberty.  Don't check
1223         for vasprintf, vsnprintf, or gettimeofday.
1224         * configure.srv: Don't add safe-ctype.o or lbasename.o to
1225         srv_tgtobj.
1226
1227 2014-06-05  Joel Brobecker  <[email protected]>
1228
1229         * development.sh: Delete.
1230         * Makefile.in (config.status): Adjust dependency on development.sh.
1231         * configure.ac: Adjust development.sh source call.
1232         * configure: Regenerate.
1233
1234 2014-06-02  Pedro Alves  <[email protected]>
1235
1236         * ax.c (gdb_free_agent_expr): New function.
1237         * ax.h (gdb_free_agent_expr): New declaration.
1238         * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
1239         list.
1240         (clear_breakpoint_conditions, clear_breakpoint_commands): Make
1241         static.
1242         (clear_breakpoint_conditions_and_commands): New function.
1243         * mem-break.h (clear_breakpoint_conditions): Delete declaration.
1244         (clear_breakpoint_conditions_and_commands): New declaration.
1245
1246 2014-05-23  Ramana Radhakrishnan  <[email protected]>
1247
1248         * linux-aarch64-low.c (asm/ptrace.h): Include.
1249
1250 2014-05-21  Jan Kratochvil  <[email protected]>
1251
1252         Fix TLS access for -static -pthread.
1253         * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
1254         (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
1255         (thread_db_load_search, try_thread_db_load_1): Initialize it.
1256
1257 2014-05-20  Pedro Alves  <[email protected]>
1258
1259         * linux-aarch64-low.c (aarch64_insert_point)
1260         (aarch64_remove_point): No longer check whether the type is
1261         supported here.  Adjust to new interface.
1262         (the_low_target): Install aarch64_supports_z_point_type as
1263         supports_z_point_type method.
1264         * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
1265         (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
1266         instead of a Z packet char.  Adjust.
1267         (arm_supports_z_point_type): New function.
1268         (arm_insert_point, arm_remove_point): Adjust to new interface.
1269         (the_low_target): Install arm_supports_z_point_type.
1270         * linux-crisv32-low.c (cris_supports_z_point_type): New function.
1271         (cris_insert_point, cris_remove_point): Adjust to new interface.
1272         Don't check whether the type is supported here.
1273         (the_low_target): Install cris_supports_z_point_type.
1274         * linux-low.c (linux_supports_z_point_type): New function.
1275         (linux_insert_point, linux_remove_point): Adjust to new interface.
1276         * linux-low.h (struct linux_target_ops) <insert_point,
1277         remove_point>: Take an enum raw_bkpt_type instead of a char.  Add
1278         raw_breakpoint pointer parameter.
1279         <supports_z_point_type>: New method.
1280         * linux-mips-low.c (mips_supports_z_point_type): New function.
1281         (mips_insert_point, mips_remove_point): Adjust to new interface.
1282         Use mips_supports_z_point_type.
1283         (the_low_target): Install mips_supports_z_point_type.
1284         * linux-ppc-low.c (the_low_target): Install NULL as
1285         supports_z_point_type method.
1286         * linux-s390-low.c (the_low_target): Install NULL as
1287         supports_z_point_type method.
1288         * linux-sparc-low.c (the_low_target): Install NULL as
1289         supports_z_point_type method.
1290         * linux-x86-low.c (x86_supports_z_point_type): New function.
1291         (x86_insert_point): Adjust to new insert_point interface.  Use
1292         insert_memory_breakpoint.  Adjust to new
1293         i386_low_insert_watchpoint interface.
1294         (x86_remove_point): Adjust to remove_point interface.  Use
1295         remove_memory_breakpoint.  Adjust to new
1296         i386_low_remove_watchpoint interface.
1297         (the_low_target): Install x86_supports_z_point_type.
1298         * lynx-low.c (lynx_target_ops): Install NULL as
1299         supports_z_point_type callback.
1300         * nto-low.c (nto_supports_z_point_type): New.
1301         (nto_insert_point, nto_remove_point): Adjust to new interface.
1302         (nto_target_ops): Install nto_supports_z_point_type.
1303         * mem-break.c: Adjust intro comment.
1304         (struct raw_breakpoint) <raw_type, size>: New fields.
1305         <inserted>: Update comment.
1306         <shlib_disabled>: Delete field.
1307         (enum bkpt_type) <gdb_breakpoint>: Delete value.
1308         <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1309         gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1310         (raw_bkpt_type_to_target_hw_bp_type): New function.
1311         (find_enabled_raw_code_breakpoint_at): New function.
1312         (find_raw_breakpoint_at): New type and size parameters.  Use them.
1313         (insert_memory_breakpoint): New function, based off
1314         set_raw_breakpoint_at.
1315         (remove_memory_breakpoint): New function.
1316         (set_raw_breakpoint_at): Reimplement.
1317         (set_breakpoint): New, based on set_breakpoint_at.
1318         (set_breakpoint_at): Reimplement.
1319         (delete_raw_breakpoint): Go through the_target->remove_point
1320         instead of assuming memory breakpoints.
1321         (find_gdb_breakpoint_at): Delete.
1322         (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1323         (find_gdb_breakpoint): New function.
1324         (set_gdb_breakpoint_at): Delete.
1325         (z_type_supported): New function.
1326         (set_gdb_breakpoint_1): New function, loosely based off
1327         set_gdb_breakpoint_at.
1328         (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1329         (delete_gdb_breakpoint_at): Delete.
1330         (delete_gdb_breakpoint_1): New function, loosely based off
1331         delete_gdb_breakpoint_at.
1332         (delete_gdb_breakpoint): New function.
1333         (clear_gdb_breakpoint_conditions): Rename to ...
1334         (clear_breakpoint_conditions): ... this.  Don't handle a NULL
1335         breakpoint.
1336         (add_condition_to_breakpoint): Make static.
1337         (add_breakpoint_condition): Take a struct breakpoint pointer
1338         instead of an address.  Adjust.
1339         (gdb_condition_true_at_breakpoint): Rename to ...
1340         (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1341         z_type parameter.
1342         (gdb_condition_true_at_breakpoint): Reimplement.
1343         (add_breakpoint_commands): Take a struct breakpoint pointer
1344         instead of an address.  Adjust.
1345         (gdb_no_commands_at_breakpoint): Rename to ...
1346         (gdb_no_commands_at_breakpoint_z_type): ... this.  Add z_type
1347         parameter.  Return true if no breakpoint was found.  Change debug
1348         output.
1349         (gdb_no_commands_at_breakpoint): Reimplement.
1350         (run_breakpoint_commands): Rename to ...
1351         (run_breakpoint_commands_z_type): ... this.  Add z_type parameter,
1352         and change return type to boolean.
1353         (run_breakpoint_commands): New function.
1354         (gdb_breakpoint_here): Also check for Z1 breakpoints.
1355         (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1356         breakpoint.  Go through the_target->remove_point instead of
1357         assuming memory breakpoint.
1358         (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1359         software and hardware breakpoints.
1360         (reinsert_raw_breakpoint): Go through the_target->insert_point
1361         instead of assuming memory breakpoint.
1362         (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1363         software and hardware breakpoints.
1364         (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1365         Check both software and hardware breakpoints.
1366         (validate_inserted_breakpoint): Assert the breakpoint is a
1367         software breakpoint.  Set the inserted flag to -1 instead of
1368         setting shlib_disabled.
1369         (delete_disabled_breakpoints): Adjust.
1370         (validate_breakpoints): Only validate software breakpoints.
1371         Adjust to inserted flag change.
1372         (check_mem_read, check_mem_write): Skip breakpoint types other
1373         than software breakpoints.  Adjust to inserted flag change.
1374         * mem-break.h (enum raw_bkpt_type): New enum.
1375         (raw_breakpoint, struct process_info): Forward declare.
1376         (Z_packet_to_target_hw_bp_type): Delete declaration.
1377         (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1378         (set_gdb_breakpoint, delete_gdb_breakpoint)
1379         (clear_breakpoint_conditions): New declarations.
1380         (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1381         (breakpoint_inserted_here): Update comment.
1382         (add_breakpoint_condition, add_breakpoint_commands): Replace
1383         address parameter with a breakpoint pointer parameter.
1384         (gdb_breakpoint_here): Update comment.
1385         (delete_gdb_breakpoint_at): Delete.
1386         (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1387         * server.c (process_point_options): Take a struct breakpoint
1388         pointer instead of an address.  Adjust.
1389         (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1390         delete_gdb_breakpoint.
1391         * spu-low.c (spu_target_ops): Install NULL as
1392         supports_z_point_type method.
1393         * target.h: Include mem-break.h.
1394         (struct target_ops) <prepare_to_access_memory>: Update comment.
1395         <supports_z_point_type>: New field.
1396         <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1397         instead of a char.  Also take a raw breakpoint pointer.
1398         * win32-arm-low.c (the_low_target): Install NULL as
1399         supports_z_point_type.
1400         * win32-i386-low.c (i386_supports_z_point_type): New function.
1401         (i386_insert_point, i386_remove_point): Adjust to new interface.
1402         (the_low_target): Install i386_supports_z_point_type.
1403         * win32-low.c (win32_supports_z_point_type): New function.
1404         (win32_insert_point, win32_remove_point): Adjust to new interface.
1405         (win32_target_ops): Install win32_supports_z_point_type.
1406         * win32-low.h (struct win32_target_ops):
1407         <supports_z_point_type>: New method.
1408         <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1409         instead of a char.  Also take a raw breakpoint pointer.
1410
1411 2014-05-20  Pedro Alves  <[email protected]>
1412
1413         * mem-break.h: Include break-common.h.
1414         (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1415         (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1416         (Z_packet_to_target_hw_bp_type): New declaration.
1417         * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1418         * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1419         (Z_PACKET_ACCESS_WP): Delete macros.
1420         (Z_packet_to_hw_type): Delete function.
1421         * i386-low.h: Don't include break-common.h here.
1422         (Z_packet_to_hw_type): Delete declaration.
1423         * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1424         Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1425         * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1426         Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1427         * linux-aarch64-low.c: Don't include break-common.h here.
1428         (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1429         (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1430         (Z_packet_to_target_hw_bp_type): Delete function.
1431         * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1432         function.
1433         (mips_insert_point, mips_remove_point): Use
1434         Z_packet_to_target_hw_bp_type.
1435
1436 2014-05-20  Pedro Alves  <[email protected]>
1437
1438         * linux-aarch64-low.c: Include break-common.h.
1439         (enum target_point_type): Delete.
1440         (Z_packet_to_point_type): Rename to ...
1441         (Z_packet_to_target_hw_bp_type): ... this, and return a
1442         target_hw_bp_type instead.
1443         (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1444         instead of an enum target_point_type.
1445         (aarch64_point_encode_ctrl_reg): Likewise.  Compute type mask from
1446         breakpoint type.
1447         (aarch64_dr_state_insert_one_point)
1448         (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1449         (aarch64_handle_aligned_watchpoint)
1450         (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1451         Take an enum target_hw_bp_type instead of an enum
1452         target_point_type.
1453         (aarch64_supports_z_point_type): New function.
1454         (aarch64_insert_point, aarch64_remove_point): Use it.  Adjust to
1455         use Z_packet_to_target_hw_bp_type.
1456
1457 2014-05-20  Joel Brobecker  <[email protected]>
1458
1459         * configure.ac: Only use -Werror by default when DEVELOPMENT
1460         is true.
1461         * configure: Regenerate.
1462
1463 2014-05-19  Jan Kratochvil  <[email protected]>
1464
1465         Fix gdbserver qGetTLSAddr for x86_64 -m32.
1466         * linux-x86-low.c (X86_64_USER_REGS): New.
1467         (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1468
1469 2014-04-28  Yao Qi  <[email protected]>
1470
1471         * Makefile.in (i386-avx512.c): Fix the typo of generated file
1472         name.
1473
1474 2014-04-25  Pedro Alves  <[email protected]>
1475
1476         PR server/16255
1477         * linux-low.c (linux_attach_fail_reason_string): New function.
1478         (linux_attach_lwp): Delete.
1479         (linux_attach_lwp_1): Rename to ...
1480         (linux_attach_lwp): ... this.  Take a ptid instead of a pid as
1481         argument.  Remove "initial" parameter.  Return int instead of
1482         void.  Don't error or warn here.
1483         (linux_attach): Adjust to call linux_attach_lwp.  Call error on
1484         failure to attach to the tgid.  Call warning when failing to
1485         attach to an lwp.
1486         * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1487         argument.  Remove "initial" parameter.  Return int instead of
1488         void.  Don't error or warn here.
1489         (linux_attach_fail_reason_string): New declaration.
1490         * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1491         interface change.  Use linux_attach_fail_reason_string.
1492
1493 2014-04-24  Michael Sturm  <[email protected]>
1494             Walfred Tedeschi  <[email protected]>
1495
1496         * Makefile.in: Added rules to handle new files
1497         i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1498         amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1499         * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1500         (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1501         (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1502         (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1503         x32-avx512-linux.o.
1504         (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1505         (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1506         (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1507         i386/x32-avx512.xml.
1508         (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1509         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1510         i386/x32-avx512-linux.xml.
1511         * i387-fp.c (num_avx512_k_registers): New constant for number
1512         of K registers.
1513         (num_avx512_zmmh_low_registers): New constant for number of
1514         lower ZMM registers (0-15).
1515         (num_avx512_zmmh_high_registers): New constant for number of
1516         higher ZMM registers (16-31).
1517         (num_avx512_ymmh_registers): New contant for number of higher
1518         YMM registers (ymm16-31 added by avx521 on x86_64).
1519         (num_avx512_xmm_registers): New constant for number of higher
1520         XMM registers (xmm16-31 added by AVX512 on x86_64).
1521         (struct i387_xsave): Add space for AVX512 registers.
1522         (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1523         Add code to handle AVX512 registers.
1524         (i387_xsave_to_cache): Add code to handle AVX512 registers.
1525         * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1526         prototypei from generated file.
1527         (tdesc_amd64_avx512_linux): Likewise.
1528         (init_registers_x32_avx512_linux): Likewise.
1529         (tdesc_x32_avx512_linux): Likewise.
1530         (init_registers_i386_avx512_linux): Likewise.
1531         (tdesc_i386_avx512_linux): Likewise.
1532         (x86_64_regmap): Add AVX512 registers.
1533         (x86_linux_read_description): Add code to handle AVX512 XSTATE
1534         mask.
1535         (initialize_low_arch): Add code to initialize AVX512 registers.
1536
1537 2014-04-23  Pedro Alves  <[email protected]>
1538
1539         * mem-break.c (find_gdb_breakpoint_at): Make static.
1540         * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1541
1542 2014-04-23  Pedro Alves  <[email protected]>
1543
1544         * i386-low.c: Don't include break-common.h here.
1545         (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1546         prototype to take target_hw_bp_type as argument instead of a Z
1547         packet char.
1548         * i386-low.h: Include break-common.h here.
1549         (Z_packet_to_hw_type): Declare.
1550         (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1551         prototypes.
1552         * linux-x86-low.c (x86_insert_point): Convert the packet number to
1553         a target_hw_bp_type before calling i386_low_insert_watchpoint.
1554         (x86_remove_point): Convert the packet number to a
1555         target_hw_bp_type before calling i386_low_remove_watchpoint.
1556         * win32-i386-low.c (i386_insert_point): Convert the packet number
1557         to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1558         (i386_remove_point): Convert the packet number to a
1559         target_hw_bp_type before calling i386_low_remove_watchpoint.
1560
1561 2014-04-23  Pedro Alves  <[email protected]>
1562
1563         * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1564
1565 2014-04-10  Pedro Alves  <[email protected]>
1566
1567         * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1568         Check if the condition or command is NULL before checking if the
1569         breakpoint is known.  On success, return true.
1570         * mem-break.h (add_breakpoint_condition): Document return.
1571         (add_breakpoint_commands): Add describing comment.
1572         * server.c (skip_to_semicolon): New function.
1573         (process_point_options): Use it.
1574
1575 2014-04-09  Pedro Alves  <[email protected]>
1576
1577         * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1578         to lwpid_of.
1579
1580 2014-02-27  Pedro Alves  <[email protected]>
1581
1582         PR 12702
1583         * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1584         macros.
1585         * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1586         output.
1587         (last_thread_of_process_p): Take a PID argument instead of a
1588         thread pointer.
1589         (linux_wait_for_lwp): Delete.
1590         (num_lwps, check_zombie_leaders, not_stopped_callback): New
1591         functions.
1592         (linux_low_filter_event): New function, party factored out from
1593         linux_wait_for_event.
1594         (linux_wait_for_event): Rename to ...
1595         (linux_wait_for_event_filtered): ... this.  Add new filter ptid
1596         argument.  Partly rewrite.  Always use waitpid(-1, WNOHANG) and
1597         sigsuspend.  Check for zombie leaders.
1598         (linux_wait_for_event): Reimplement as wrapper around
1599         linux_wait_for_event_filtered.
1600         (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED.  Assume that if
1601         a normal or signal exit is seen, it's the whole process exiting.
1602         (wait_for_sigstop): No longer a for_each_inferior callback.
1603         Rewrite on top of linux_wait_for_event_filtered.
1604         (stop_all_lwps): Call wait_for_sigstop directly.
1605         * server.c (resume, handle_target_event): Handle
1606         TARGET_WAITKIND_NO_RESUMED.
1607
1608 2014-02-26  Joel Brobecker  <[email protected]>
1609
1610         * win32-low.c (psapi_get_dll_name,
1611         * win32_CreateToolhelp32Snapshot): Delete.
1612         (win32_CreateToolhelp32Snapshot, win32_Module32First)
1613         (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
1614         Delete.
1615         (handle_load_dll): Add function description.
1616         Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
1617
1618 2014-02-26  Joel Brobecker  <[email protected]>
1619
1620         * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
1621         Add comment.
1622         (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
1623         base address when calling win32_add_one_solib.
1624         (handle_load_dll): Delete local variable load_addr.
1625         Remove 0x1000 offset applied to DLL base address when calling
1626         win32_add_one_solib.
1627         (handle_unload_dll): Add comment.
1628
1629 2014-02-26  Joel Brobecker  <[email protected]>
1630
1631         * win32-low.c (win32_add_all_dlls): Renames
1632         win32_ensure_ntdll_loaded.  Rewrite function documentation.
1633         Adjust implementation to always load all DLLs.
1634         Add 0x1000 offset to DLL base address when calling
1635         win32_add_one_solib.
1636         (child_initialization_done): New static global.
1637         (do_initial_child_stuff): Set child_initialization_done to
1638         zero during child initialization, and 1 after.  Replace call
1639         to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
1640         Add comment.
1641         (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
1642         (handle_unload_dll): Add function documentation.
1643         (get_child_debug_event): Ignore load and unload DLL events
1644         during child initialization.
1645
1646 2014-02-20  Doug Evans  <[email protected]>
1647
1648         Remove global all_lwps.
1649         * inferiors.h (ptid_of): Move here from linux-low.h.
1650         (pid_of, lwpid_of): Ditto.
1651         * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
1652         parameter is a struct thread_info * now.
1653         (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
1654         directly.  Pass &all_threads to find_inferior instead of &all_lwps.
1655         (aarch64_stopped_data_address): Fetch lwpid from current_inferior
1656         directly.
1657         (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
1658         (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
1659         * linux-arm-low.c (update_registers_callback): Update, "entry"
1660         parameter is a struct thread_info * now.
1661         Fetch lwpid from current_inferior directly.
1662         (arm_insert_point): Pass &all_threads to find_inferior instead of
1663         &all_lwps.
1664         (arm_remove_point): Ditto.
1665         (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
1666         (arm_prepare_to_resume): Fetch pid from thread.
1667         (arm_read_description): Fetch lwpid from current_inferior directly.
1668         * linux-low.c (all_lwps): Delete.
1669         (delete_lwp): Delete call to remove_inferior.
1670         (handle_extended_wait): Fetch lwpid from thread.
1671         (add_lwp): Don't set lwp->entry.id.  Remove call to
1672         add_inferior_to_list.
1673         (linux_attach_lwp_1): Fetch pid from current_inferior directly.
1674         (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
1675         (kill_one_lwp_callback): Ditto.
1676         (linux_kill): Don't dereference NULL pointer.
1677         Fetch ptid,lwpid from thread.
1678         (get_detach_signal): Fetch ptid from thread.
1679         (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
1680         Simplify call to regcache_invalidate_thread.
1681         (delete_lwp_callback): Update, "entry" parameter is a
1682         struct thread_info * now.  Fetch pid from thread.
1683         (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
1684         (status_pending_p_callback): Update, "entry" parameter is a
1685         struct thread_info * now.  Fetch ptid from thread.
1686         (find_lwp_pid): Update, "entry" parameter is a
1687         struct thread_info * now.
1688         (linux_wait_for_lwp): Fetch pid from thread.
1689         (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
1690         (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
1691         (enqueue_one_deferred_signal): Fetch lwpid from thread.
1692         (dequeue_one_deferred_signal): Ditto.
1693         (cancel_breakpoint): Fetch ptid from current_inferior.
1694         (linux_wait_for_event): Pass &all_threads to find_inferior,
1695         not &all_lwps.  Fetch ptid, lwpid from thread.
1696         (count_events_callback): Update, "entry" parameter is a
1697         struct thread_info * now.
1698         (select_singlestep_lwp_callback): Ditto.
1699         (select_event_lwp_callback): Ditto.
1700         (cancel_breakpoints_callback): Ditto.
1701         (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
1702         not &all_lwps.
1703         (select_event_lwp): Ditto.  Fetch ptid from event_thread.
1704         (unsuspend_one_lwp): Update, "entry" parameter is a
1705         struct thread_info * now.
1706         (unsuspend_all_lwps): Pass &all_threads to find_inferior,
1707         not &all_lwps.
1708         (linux_stabilize_threads): Ditto.  And for for_each_inferior.
1709         Fetch lwpid from thread, not lwp.
1710         (linux_wait_1): Fetch ptid, lwpid from current_inferior.
1711         Pass &all_threads to find_inferior, not &all_lwps.
1712         (send_sigstop): Fetch lwpid from thread, not lwp.
1713         (send_sigstop_callback): Update, "entry" parameter is a
1714         struct thread_info * now.
1715         (suspend_and_send_sigstop_callback): Ditto.
1716         (wait_for_sigstop): Ditto.  Fetch ptid, lwpid from thread, lwp.
1717         (stuck_in_jump_pad_callback): Update, "entry" parameter is a
1718         struct thread_info * now.
1719         (move_out_of_jump_pad_callback): Ditto.  Fetch ptid, lwpid
1720         from thread, lwp.
1721         (lwp_running): Update, "entry" parameter is a
1722         struct thread_info * now.
1723         (stop_all_lwps): Fetch ptid from thread.
1724         Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
1725         (linux_resume_one_lwp): Fetch lwpid from thread.
1726         (linux_set_resume_request): Update, "entry" parameter is a
1727         struct thread_info * now.  Fetch pid, lwpid from thread.
1728         (resume_status_pending_p): Update, "entry" parameter is a
1729         struct thread_info * now.
1730         (need_step_over_p): Ditto.  Fetch lwpid from thread.
1731         (start_step_over): Fetch lwpid from thread.
1732         (linux_resume_one_thread): Update, "entry" parameter is a
1733         struct thread_info * now.  Fetch lwpid from thread.
1734         (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
1735         (proceed_one_lwp): Update, "entry" parameter is a
1736         struct thread_info * now.  Fetch lwpid from thread.
1737         (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
1738         struct thread_info * now.
1739         (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
1740         (unstop_all_lwps): Ditto.  Fetch lwpid from thread.
1741         (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
1742         directly.
1743         (regsets_store_inferior_registers): Ditto.
1744         (fetch_register, store_register): Ditto.
1745         (linux_read_memory, linux_write_memory): Ditto.
1746         (linux_request_interrupt): Ditto.
1747         (linux_read_auxv): Ditto.
1748         (linux_xfer_siginfo): Ditto.
1749         (linux_qxfer_spu): Ditto.
1750         (linux_qxfer_libraries_svr4): Ditto.
1751         * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
1752         moved to inferiors.h.
1753         (get_lwp): Delete.
1754         (get_thread_lwp): Update.
1755         (struct lwp_info): Delete member "entry".  Simplify comment for
1756         member "thread".
1757         (all_lwps): Delete.
1758         * linux-mips-low.c (mips_read_description): Fetch lwpid from
1759         current_inferior directly.
1760         (update_watch_registers_callback): Update, "entry" parameter is a
1761         struct thread_info * now.  Fetch pid from thread.
1762         (mips_linux_prepare_to_resume): Fetch ptid from thread.
1763         (mips_insert_point): Fetch lwpid from current_inferior.
1764         Pass &all_threads to find_inferior, not &all_lwps.
1765         (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
1766         (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
1767         directly.
1768         (mips_stopped_data_address): Ditto.
1769         * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
1770         directly.
1771         * linux-tile-low.c (tile_arch_setup): Ditto.
1772         * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
1773         (update_debug_registers_callback): Update, "entry" parameter is a
1774         struct thread_info * now.  Fetch pid from thread.
1775         (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
1776         Pass &all_threads to find_inferior, not &all_lwps.
1777         (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
1778         (i386_dr_low_set_control): Fetch pid from current_inferior directly.
1779         Pass &all_threads to find_inferior, not &all_lwps.
1780         (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
1781         (i386_dr_low_get_status): Ditto.
1782         (x86_linux_prepare_to_resume): Fetch ptid from thread.
1783         (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
1784         (x86_linux_read_description): Ditto.
1785         * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
1786
1787 2014-02-20  Doug Evans  <[email protected]>
1788
1789         * inferiors.c (get_first_inferior): Fix buglet.
1790
1791 2014-02-19  Doug Evans  <[email protected]>
1792
1793         * gdbthread.h (add_thread): Change result type to struct thread_info *.
1794         * inferiors.c (add_thread): Change result type to struct thread_info *.
1795         All callers updated.
1796         (add_lwp): Call add_thread here instead of in callers.
1797         All callers updated.
1798         * linux-low.h (get_lwp_thread): Rewrite.
1799         (struct lwp_info): New member "thread".
1800
1801 2014-02-19  Doug Evans  <[email protected]>
1802
1803         * linux-low.c (add_lwp): Change result to struct lwp_info *.
1804         All callers updated.
1805
1806 2014-02-19  Doug Evans  <[email protected]>
1807
1808         * inferiors.c (add_thread): Fix whitespace.
1809
1810 2014-02-19  Doug Evans  <[email protected]>
1811
1812         * dll.c (clear_dlls): Replace accessing list implemention details
1813         with API function.
1814         * gdbthread.h (get_first_thread): Declare.
1815         * inferiors.c (for_each_inferior_with_data): New function.
1816         (get_first_thread): New function.
1817         (find_thread_ptid): Simplify.
1818         (get_first_inferior): New function.
1819         (clear_list): Delete.
1820         (one_inferior_p): New function.
1821         (clear_inferior_list): New function.
1822         (clear_inferiors): Update.
1823         * inferiors.h (for_each_inferior_with_data): Declare.
1824         (clear_inferior_list): Declare.
1825         (one_inferior_p): Declare.
1826         (get_first_inferior): Declare.
1827         * linux-low.c (linux_wait_for_event): Replace accessing list
1828         implemention details with API function.
1829         * server.c (target_running): Ditto.
1830         (accumulate_file_name_length): New function.
1831         (emit_dll_description): New function.
1832         (handle_qxfer_libraries): Replace accessing list implemention
1833         details with API function.
1834         (handle_qxfer_threads_worker): New function.
1835         (handle_qxfer_threads_proper): Replace accessing list implemention
1836         details with API function.
1837         (handle_query): Ditto.
1838         (visit_actioned_threads_callback_ftype): New typedef.
1839         (visit_actioned_threads_data): New struct.
1840         (visit_actioned_threads): Rewrite to be find_inferior callback.
1841         (resume): Call find_inferior.
1842         (handle_status): Replace accessing list implemention
1843         details with API function.
1844         (process_serial_event): Replace accessing list implemention details
1845         with API function.
1846         * target.c (set_desired_inferior): Replace accessing list implemention
1847         details with API function.
1848         * tracepoint.c (same_process_p): New function.
1849         (gdb_agent_about_to_close): Replace accessing list implemention
1850         details with API function.
1851         * win32-low.c (child_delete_thread): Replace accessing list
1852         implemention details with API function.
1853         (match_dll_by_basename): New function.
1854         (dll_is_loaded_by_basename): New function.
1855         (win32_ensure_ntdll_loaded): Replace accessing list implemention
1856         details call to dll_is_loaded_by_basename.
1857
1858 2014-02-19  Doug Evans  <[email protected]>
1859
1860         * dll.h (struct dll_info): Add comment.
1861         * gdbthread.h (struct thread_info): Add comment.
1862         (current_ptid): Simplify.
1863         * inferiors.c (add_process): Update.
1864         (remove_process): Update.
1865         * inferiors.h (struct process_info): Rename member "head" to "entry".
1866         * linux-low.c (delete_lwp): Update.
1867         (add_lwp): Update.
1868         (last_thread_of_process_p): Update.
1869         (kill_one_lwp_callback, linux_kill): Update.
1870         (status_pending_p_callback): Update.
1871         (wait_for_sigstop): Update.  Simplify read of ptid.
1872         (start_step_over): Update.
1873         * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
1874         (get_lwp_thread): Update.
1875         (struct lwp_info): Rename member "head" to "entry".
1876         * regcache.h (inferior_list_entry): Delete.
1877         * server.c (kill_inferior_callback): Update.
1878         (detach_or_kill_inferior_callback): Update.
1879         (print_started_pid): Update.
1880         (print_attached_pid): Update.
1881         (process_serial_event): Simplify read of ptid.
1882         * thread-db.c (thread_db_create_event): Update.
1883         (thread_db_get_tls_address): Update.
1884         * win32-low.c (current_inferior_ptid): Simplify.
1885
1886 2014-02-19  Tom Tromey  <[email protected]>
1887
1888         * target.h (struct target_ops) <supports_btrace>: Add target_ops
1889         argument.
1890         (target_supports_btrace): Update.
1891
1892 2014-02-14  Yao Qi  <[email protected]>
1893
1894         * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
1895         (rsp-low-ipa.o): New target.
1896
1897 2014-02-12  Tom Tromey  <[email protected]>
1898
1899         * ax.c (gdb_parse_agent_expr): Use hex2bin, not
1900         convert_ascii_to_int.
1901         * regcache.c (registers_to_string): Likewise.
1902         * remote-utils.c (decode_M_packet): Likewise.
1903         * server.c (process_serial_event): Likewise.
1904
1905 2014-02-12  Tom Tromey  <[email protected]>
1906
1907         * server.c (handle_query, handle_v_run): Use hex2bin, not
1908         unhexify.
1909         * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
1910
1911 2014-02-12  Tom Tromey  <[email protected]>
1912
1913         * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
1914         convert_int_to_ascii.
1915         * regcache.c (registers_to_string, collect_register_as_string):
1916         Likewise.
1917         * remote-utils.c (look_up_one_symbol, relocate_instruction):
1918         Likewise.
1919         * server.c (process_serial_event): Likewise.
1920         * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
1921         (cmd_qtbuffer, cstr_to_hexstr): Likewise.
1922
1923 2014-02-12  Tom Tromey  <[email protected]>
1924
1925         * remote-utils.c (look_up_one_symbol, monitor_output): Use
1926         bin2hex, not hexify.
1927         * tracepoint.c (cmd_qtstatus): Likewise.
1928
1929 2014-02-12  Tom Tromey  <[email protected]>
1930
1931         * remote-utils.c (monitor_output): Pass explicit length to
1932         hexify.
1933
1934 2014-02-12  Tom Tromey  <[email protected]>
1935
1936         * tracepoint.c: Include rsp-low.h.
1937         * server.c: Include rsp-low.h.
1938         * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
1939         (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
1940         declare.
1941         * remote-utils.c: Include rsp-low.h.
1942         (fromhex, hexchars, ishex, unhexify, tohex, hexify)
1943         (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
1944         (convert_int_to_ascii, convert_ascii_to_int): Move to
1945         common/rsp-low.c.
1946         * regcache.c: Include rsp-low.h.
1947         * ax.c: Include rsp-low.h.
1948         * Makefile.in (SFILES): Add common/rsp-low.c.
1949         (OBS): Add rsp-low.o.
1950         (rsp-low.o): New target.
1951
1952 2014-02-12  Tom Tromey  <[email protected]>
1953
1954         * utils.h (pulongest, plongest, phex_nz): Don't declare.
1955         Include print-utils.h.
1956         * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
1957         (plongest, thirty_two, phex_nz): Remove.
1958         * Makefile.in (SFILES): Add common/print-utils.c.
1959         (OBS): Add print-utils.o.
1960         (print-utils-ipa.o): New target.
1961         (print-utils.o): New target.
1962         (IPA_OBJS): Add print-utils-ipa.o.
1963
1964 2014-02-06  Tom Tromey  <[email protected]>
1965
1966         * Makefile.in (SFILES): Fix indentation.
1967
1968 2014-02-05  Doug Evans  <[email protected]>
1969
1970         * linux-low.c (linux_wait_for_event): Improve comment.
1971         (linux_wait_1): Keep current_inferior in sync with event_child.
1972
1973 2014-01-22  Doug Evans  <[email protected]>
1974
1975         * gdbthread.h (gdb_id_to_thread): Delete, unused.
1976
1977 2014-01-22  Doug Evans  <[email protected]>
1978
1979         * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
1980         * configure: Regenerate.
1981         * config.in: Regenerate.
1982         * Makefile.in (SFILES): Add debug.c.
1983         (OBS): Add debug.o.
1984         * debug.c: New file.
1985         * debug.h: New file.
1986         * linux-aarch64-low.c (*): Update all debugging printfs to use
1987         debug_printf instead of fprintf.
1988         * linux-arm-low.c (*): Ditto.
1989         * linux-cris-low.c (*): Ditto.
1990         * linux-crisv32-low.c (*): Ditto.
1991         * linux-m32r-low.c (*): Ditto.
1992         * linux-sparc-low.c (*): Ditto.
1993         * linux-x86.c (*): Ditto.
1994         * linux-low.c (*): Ditto.
1995         (linux_wait_1): Add calls to debug_enter, debug_exit.
1996         (linux_wait): Remove redundant debugging printf.
1997         (stop_all_lwps): Add calls to debug_enter, debug_exit.
1998         (linux_resume, unstop_all_lwps): Ditto.
1999         * mem-break.c (*): Update all debugging printfs to use
2000         debug_printf instead of fprintf.
2001         * remote-utils.c (*): Ditto.
2002         * thread-db.c (*): Ditto.
2003         * server.c #include <ctype.h>, "gdb_vecs.h".
2004         (debug_threads): Moved to debug.c.
2005         (*): Update all debugging printfs to use debug_printf instead of
2006         fprintf.
2007         (start_inferior): Replace call to fflush with call to debug_flush.
2008         (monitor_show_help): Mention set debug-format.
2009         (parse_debug_format_options): New function.
2010         (handle_monitor_command): Handle "monitor set debug-format".
2011         (gdbserver_usage): Mention --debug-format.
2012         (main): Parse --debug-format.
2013         * server.h (debug_threads): Declaration moved to debug.h.
2014         #include "debug.h".
2015         * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
2016         trace_debug_1 that uses debug_printf.
2017         (tracepoint_look_up_symbols): Update all debugging printfs to use
2018         debug_printf instead of fprintf.
2019
2020 2014-01-20  Baruch Siach  <[email protected]>
2021
2022         * linux-xtensa-low.c: Include asm/ptrace.h instead of
2023         sys/ptrace.h.
2024
2025 2014-01-17  Pedro Alves  <[email protected]>
2026
2027         PR build/16445
2028         * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
2029         defined after including gdb_proc_service.h.
2030
2031 2014-01-16  Doug Evans  <[email protected]>
2032
2033         * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
2034         (match_dll): Use it.
2035
2036 2014-01-16  Markus Metzger  <[email protected]>
2037
2038         * target.h (target_ops) <read_btrace>: Change parameters and
2039         return type to allow error reporting.
2040         * server.c (handle_qxfer_btrace): Support delta reads.  Pass
2041         trace reading errors on.
2042         * linux-low.c (linux_low_read_btrace): Pass trace reading
2043         errors on.
2044         (linux_low_disable_btrace): New.
2045
2046 2014-01-15  Doug Evans  <[email protected]>
2047
2048         * inferiors.c (thread_id_to_gdb_id): Delete.
2049         * inferiors.h (thread_id_to_gdb_id): Delete.
2050
2051 2014-01-13  Eli Zaretskii  <[email protected]>
2052
2053         * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
2054         "-I$(srcdir)/../".  Fixes MinGW compilation errors with old GCC
2055         versions.
2056
2057 2014-01-08  Pedro Alves  <[email protected]>
2058
2059         * server.c (handle_status): Don't discard previous queued stop
2060         replies or thread's pending status here.
2061         (main) <disconnection>: Do it here instead.
2062
2063 2014-01-08  Pedro Alves  <[email protected]>
2064
2065         * gdbthread.h (struct thread_info) <status_pending_p>: New field.
2066         * server.c (visit_actioned_threads, handle_pending_status): New
2067         function.
2068         (handle_v_cont): Factor out parts to ...
2069         (resume): ... this new function.  If in all-stop, and a thread
2070         being resumed has a pending status, report it without actually
2071         resuming.
2072         (myresume): Adjust to use the new 'resume' function.
2073         (clear_pending_status_callback, set_pending_status_callback)
2074         (find_status_pending_thread_callback): New functions.
2075         (handle_status): Handle the case of multiple threads having
2076         interesting statuses to report.  Report threads' real last signal
2077         instead of always reporting GDB_SIGNAL_TRAP.  Look for a thread
2078         with an interesting thread to report the status for, instead of
2079         always reporting the status of the first thread.
2080
2081 2014-01-01  Joel Brobecker  <[email protected]>
2082
2083         * gdbserver.c (gdbserver_version): Set copyright year to 2014.
2084         * gdbreplay.c (gdbreplay_version): Likewise.
2085
2086 2013-12-18  Yufeng Zhang  <[email protected]>
2087
2088         * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
2089         iov.iov_len with the real length in use.
2090
2091 2013-12-13  Joel Brobecker  <[email protected]>
2092
2093         * Makefile.in (safe-ctype.o, lbasename.o): New rules.
2094         * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
2095         for all targets that use win32-low.c.
2096         * win32-low.c (win32_ensure_ntdll_loaded): New function.
2097         (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2098
2099 2013-12-13  Pedro Alves  <[email protected]>
2100
2101         * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
2102         if equal to TARGET_WAITKIND_LOADED.
2103         * win32-low.c (cached_status): New static global.
2104         (win32_wait): Add declaration.
2105         (do_initial_child_stuff): Flush all initial pending debug events
2106         up to the initial breakpoint.
2107         (win32_wait): If CACHED_STATUS was set, return that instead
2108         of doing a real wait.  Remove the code resuming the execution
2109         of the inferior after receiving a TARGET_WAITKIND_LOADED event
2110         during the initial phase.  Also remove the code changing
2111         OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
2112         TARGET_WAITKIND_STOPPED.
2113
2114 2013-12-11  Yao Qi  <[email protected]>
2115
2116         * notif.c (handle_notif_ack): Return 0 if no notification
2117         matches.
2118
2119 2013-11-20  Doug Evans  <[email protected]>
2120
2121         * linux-low.c (linux_set_resume_request): Fix comment.
2122
2123 2013-11-20  Doug Evans  <[email protected]>
2124
2125         * linux-low.c (resume_status_pending_p): Tweak comment.
2126
2127 2013-11-20  Walfred Tedeschi  <[email protected]>
2128
2129         * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
2130         amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
2131         * configure.srv (srv_i386_regobj): Add i386-mpx.o.
2132         (srv_i386_linux_regobj): Add i386-mpx-linux.o.
2133         (srv_amd64_regobj): Add amd64-mpx.o.
2134         (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
2135         (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
2136         (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
2137         * i387-fp.c (num_pl_bnd_register) Added constant.
2138         (num_pl_bnd_cfg_registers) Added constant.
2139         (struct i387_xsave) Added reserved area and MPX fields.
2140         (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
2141         * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
2142         function.
2143         (tdesc_i386_mpx_linux): Add MPX amd64 target.
2144         (init_registers_amd64_mpx_linux): Declare new function.
2145         (tdesc_amd64_mpx_linux): Add MPX amd64 target.
2146         (x86_64_regmap): Add MPX registers.
2147         (x86_linux_read_description): Add MPX case.
2148         (initialize_low_arch): Initialize MPX targets.
2149
2150 2013-11-18  Tom Tromey  <[email protected]>
2151
2152         * configure: Rebuild.
2153         * configure.ac: Don't check for stdlib.h.
2154         * gdbreplay.c: Unconditionally include stdlib.h.
2155
2156 2013-11-18  Tom Tromey  <[email protected]>
2157
2158         * config.in: Rebuild.
2159         * configure: Rebuild.
2160         * configure.ac: Don't use AC_HEADER_DIRENT.
2161
2162 2013-11-18  Tom Tromey  <[email protected]>
2163
2164         * server.h: Don't check HAVE_STRING_H.
2165         * gdbreplay.c: Don't check HAVE_STRING_H.
2166         * configure: Rebuild.
2167
2168 2013-11-18  Tom Tromey  <[email protected]>
2169
2170         * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
2171         LIBGNU.
2172
2173 2013-11-08  Tom Tromey  <[email protected]>
2174
2175         * configure, config.in: Rebuild.
2176         * configure.ac: Remove unused configury.
2177
2178 2013-11-08  Tom Tromey  <[email protected]>
2179
2180         * acinclude.m4: Include common.m4, codeset.m4.
2181         * configure, config.in: Rebuild.
2182         * configure.ac: Use GDB_AC_COMMON.
2183
2184 2013-11-06  Andreas Arnez  <[email protected]>
2185
2186         * linux-s390-low.c (HWCAP_S390_TE): New define.
2187         (s390_arch_setup): Consider the TE field in the HWCAP for
2188         determining 'have_regset_tdb'.
2189
2190 2013-10-16  Sergio Durigan Junior  <[email protected]>
2191
2192         PR gdb/16014
2193         * tracepoint.c (download_tracepoint_1): Remove unnecessary double
2194         call to sizeof.
2195
2196 2013-10-02  Pedro Alves  <[email protected]>
2197
2198         * server.c (process_serial_event): Don't output "GDBserver
2199         exiting" if GDB is connected through stdio.
2200         * target.c (mywait): Likewise, be silent if GDB is connected
2201         through stdio.
2202
2203 2013-10-01  Joel Brobecker  <[email protected]>
2204
2205         * lynx-low.c (lynx_add_threads_after_attach): New function.
2206         (lynx_attach): Remove call to add_thread.  Add call to
2207         lynx_add_threads_after_attach instead.
2208
2209 2013-09-28  Mike Frysinger  <[email protected]>
2210
2211         * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
2212         * config.in, configure: Regenerated.
2213
2214 2013-09-18  Yao Qi  <[email protected]>
2215
2216         PR server/15959
2217         * server.c (start_inferior): Clear 'resume_info'.
2218
2219 2013-09-16  Jiong Wang  <[email protected]>
2220
2221         * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
2222         for each register.
2223
2224 2013-09-16  Jiong Wang  <[email protected]>
2225
2226         * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
2227         linux-tile-low.o to srv_tgtobj.
2228
2229 2013-09-16  Will Newton  <[email protected]>
2230
2231         * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
2232         out regs.
2233
2234 2013-09-06  Pedro Alves  <[email protected]>
2235
2236         * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
2237         (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
2238         (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
2239         (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
2240         (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
2241         (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2242
2243 2013-09-06  Pedro Alves  <[email protected]>
2244
2245         * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
2246         explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2247
2248 2013-09-06  Pedro Alves  <[email protected]>
2249
2250         * linux-amd64-ipa.c: Include tracepoint.h.
2251         * linux-i386-ipa.c: Include tracepoint.h.
2252
2253 2013-09-06  Ricard Wanderlof  <[email protected]>
2254
2255         * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
2256         (ps_get_thread_area): New function.
2257
2258 2013-09-06  Ricard Wanderlof  <[email protected]>
2259
2260         * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
2261         (initialize_low_arch): Call init_registers_crisv32 rather than
2262         init_register_crisv32.
2263
2264 2013-09-05  Pedro Alves  <[email protected]>
2265
2266         * server.h (handle_vFile, hostio_last_error_from_errno): Move
2267         to ...
2268         * hostio.h: ... this new file.
2269         * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
2270         win32-low.c: Include hostio.h.
2271
2272 2013-09-05  Pedro Alves  <[email protected]>
2273
2274         * server.h (gdb_client_data, handler_func, callback_handler_func)
2275         (delete_file_handler, add_file_handler, append_callback_event)
2276         (delete_callback_event, start_event_loop, initialize_event_loop):
2277         Move to event-loop.h and include it.
2278         * event-loop.h: New file.
2279
2280 2013-09-05  Pedro Alves  <[email protected]>
2281
2282         * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
2283         * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
2284         (loaded_dll, unloaded_dll): Move to ...
2285         * dll.h: ... this new file.
2286         * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2287
2288 2013-09-05  Pedro Alves  <[email protected]>
2289
2290         * server.h (current_process, get_thread_process, all_processes)
2291         (add_inferior_to_list, for_each_inferior, current_inferior)
2292         (remove_inferior, add_process, remove_process, find_process_pid)
2293         (have_started_inferiors_p, have_attached_inferiors_p)
2294         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2295         (clear_inferiors, find_inferior, find_inferior_id)
2296         (inferior_target_data, set_inferior_target_data)
2297         (inferior_regcache_data, set_inferior_regcache_data): Move to
2298         inferiors.h, and include it.
2299         * inferiors.h: New file.
2300
2301 2013-09-05  Pedro Alves  <[email protected]>
2302
2303         * server.h (struct emit_ops, current_insn_ptr, emit_error):
2304         Move ...
2305         * ax.h: ... here.
2306
2307 2013-09-05  Pedro Alves  <[email protected]>
2308
2309         * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2310         tracepoint.h.
2311         * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2312         (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2313         (handle_tracepoint_general_set, handle_tracepoint_query)
2314         (tracepoint_finished_step, tracepoint_was_hit)
2315         (release_while_stepping_state_list, current_traceframe)
2316         (in_readonly_region, traceframe_read_mem)
2317         (fetch_traceframe_registers, traceframe_read_sdata)
2318         (traceframe_read_info, struct fast_tpoint_collect_status)
2319         (fast_tracepoint_collecting, force_unlock_trace_buffer)
2320         (handle_tracepoit_bkpts, initialize_low_tracepoint)
2321         (supply_fast_tracepoint_registers)
2322         (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2323         (ipa_tdesc, claim_trampoline_space)
2324         (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2325         (agent_mem_read, agent_get_trace_state_variable_value)
2326         (agent_set_trace_state_variable_value, agent_tsv_read)
2327         (agent_mem_read_string, get_raw_reg_func_addr)
2328         (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2329         * tracepoint.h: ... this new file.
2330
2331 2013-09-05  Pedro Alves  <[email protected]>
2332
2333         * server.h (perror_with_name, error, fatal, warning, paddress)
2334         (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2335         include it.
2336         * utils.h: New file.
2337
2338 2013-09-05  Pedro Alves  <[email protected]>
2339
2340         * server.h (remote_debug, noack_mode, transport_is_reliable)
2341         (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2342         (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2343         (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2344         (write_enn, initialize_async_io, enable_async_io)
2345         (disable_async_io, check_remote_input_interrupt_request)
2346         (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2347         (dead_thread_notify, prepare_resume_reply)
2348         (decode_address_to_semicolon, decode_address, decode_m_packet)
2349         (decode_M_packet, decode_X_packet, decode_xfer_write)
2350         (decode_search_memory_packet, unhexify, hexify)
2351         (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2352         (look_up_one_symbol, relocate_instruction)
2353         (monitor_output): Move to remote-utils.h, and include it.
2354         * remote-utils.h: New file.
2355
2356 2013-09-05  Pedro Alves  <[email protected]>
2357
2358         * server.h (_): Delete.
2359
2360 2013-09-02  Pedro Alves  <[email protected]>
2361
2362         * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2363         (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2364         allocated.
2365         (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2366
2367 2013-09-02  Pierre Muller  <[email protected]>
2368
2369         * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2370         or WriteProcessMemory complete successfully and handle
2371         ERROR_PARTIAL_COPY error.
2372
2373 2013-09-02  Pedro Alves  <[email protected]>
2374
2375         * server.c (gdb_read_memory): Return -1 on traceframe memory read
2376         error instead of EIO.
2377
2378 2013-08-28  Jan Kratochvil  <[email protected]>
2379
2380         PR server/15604
2381         * linux-low.c: Include filestuff.h.
2382         (linux_create_inferior) <pid == 0>: Call close_most_fds.
2383         * lynx-low.c: Include filestuff.h.
2384         (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2385         * server.c: Include filestuff.h.
2386         (main): Call notice_open_fds.
2387         * spu-low.c: Include filestuff.h.
2388         (spu_create_inferior) <pid == 0>: Call close_most_fds.
2389
2390 2013-08-22  Luis Machado  <[email protected]>
2391
2392         * Makefile.in: Explain why ../target and ../nat are not
2393         listed as include file search paths.
2394         (linux-waitpid.o): New object file rule.
2395         * configure.srv (srv_native_linux_obj): New variable.
2396         Replace all occurrences of linux native object files with
2397         $srv_native_linux_obj.
2398         * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2399         (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2400         (linux_enable_event_reporting): Remove declaration.
2401         (my_waitpid): Moved to common/linux-waitpid.c.
2402         (linux_wait_for_event): Pass ptid when calling
2403         linux_enable_event_reporting.
2404         (linux_supports_tracefork_flag): Remove.
2405         (linux_enable_event_reporting): Likewise.
2406         (linux_tracefork_grandchild): Remove.
2407         (STACK_SIZE): Moved to common/linux-ptrace.c.
2408         (linux_tracefork_child): Remove.
2409         (linux_test_for_tracefork): Remove.
2410         (linux_look_up_symbols): Call linux_supports_traceclone.
2411         (initialize_low): Remove call to linux_test_for_tracefork.
2412         * linux-low.h (PTRACE_TYPE_ARG3): Move to
2413         common/linux-ptrace.h.
2414         (PTRACE_TYPE_ARG4): Likewise.
2415         Include linux-ptrace.h.
2416
2417 2013-08-21  Pedro Alves  <[email protected]>
2418
2419         * config.in: Renegerate.
2420
2421 2013-08-19  Luis Machado  <[email protected]>
2422
2423         * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2424         (SFILES): Remove $(srcdir)/common/target-common.c and
2425         add $(srcdir)/target/waitstatus.c.
2426         (OBS): Remove target-common.o and add waitstatus.o.
2427         (server_h): Remove $(srcdir)/../common/target-common.h and
2428         add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2429         and $(srcdir)/../target/waitstatus.h.
2430         (target-common.o): Remove.
2431         (waitstatus.o): New target object file.
2432         * target.h: Do not include target-common.h and
2433         include target/resume.h, target/wait.h and
2434         target/waitstatus.h.
2435
2436 2013-08-13  Luis Machado  <[email protected]>
2437
2438         * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2439         to PTRACE_TYPE_ARG3.
2440         * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2441         to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2442         PTRACE_TYPE_ARG4.
2443         * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2444         (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2445
2446 2013-07-27  Jie Zhang  <[email protected]>
2447             Daniel Jacobowitz  <[email protected]>
2448             Yao Qi  <[email protected]>
2449
2450         * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2451         (mips-linux-watch.o): New rule.
2452         (mips_linux_watch_h): New variable.
2453         * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2454         srv_tgtobj.
2455         * linux-mips-low.c: Include mips-linux-watch.h.
2456         (struct arch_process_info, struct arch_lwp_info): New.
2457         (update_watch_registers_callback): New function.
2458         (mips_linux_new_process, mips_linux_new_thread) New functions.
2459         (mips_linux_prepare_to_resume, mips_insert_point): New
2460         functions.
2461         (mips_remove_point, mips_stopped_by_watchpoint): New
2462         functions.
2463         (rsp_bp_type_to_target_hw_bp_type): New function.
2464         (mips_stopped_data_address): New function.
2465         (the_low_target): Add watchpoint support functions.
2466
2467 2013-07-27  Yao Qi  <[email protected]>
2468
2469         * i386-low.c: Include break-common.h.
2470         (enum target_hw_bp_type): Remove.
2471
2472 2013-07-24  Luis Machado  <[email protected]>
2473
2474         * Makefile.in (SFILES): /common/target-common.c.
2475         (OBS): Add target-common.o.
2476         (server_h): Add $(srcdir)/../common/target-common.h.
2477         (target-common.o): New target.
2478         * server.c (queue_stop_reply_callback): Free
2479         status string after use.
2480         * target.c (target_waitstatus_to_string): Remove.
2481         * target.h: Include target-common.h.
2482         (resume_kind): Likewise.
2483         (target_waitkind): Likewise.
2484         (target_waitstatus): Likewise.
2485         (TARGET_WNOHANG): Likewise.
2486
2487 2013-07-04  Yao Qi  <[email protected]>
2488
2489         * Makefile.in (host_alias): Use @host_noncanonical@.
2490         (target_alias): Use @target_noncanonical@.
2491         * configure.ac: Use ACX_NONCANONICAL_TARGET and
2492         ACX_NONCANONICAL_HOST.
2493         * configure: Regenerated.
2494
2495         Revert:
2496         2013-06-28  Mircea Gherzan  <[email protected]>
2497
2498         * configure.ac (version_host, version_target): Set and AC_SUBST them.
2499         * configure: Rebuild.
2500         * Makefile.in (version_host, version_target): Get from configure.
2501         (version.c): Use $(version_host) and $(version_target).
2502
2503 2013-07-03  Pedro Alves  <[email protected]>
2504
2505         * Makefile.in (config.status): Depend on development.sh.
2506         * acinclude.m4: Include libmcheck.m4.
2507         * configure: Regenerate.
2508
2509 2013-07-02  Mircea Gherzan  <[email protected]>
2510
2511         * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2512         attribute inside the parentheses.
2513         (winapi_DebugSetProcessKillOnExit): Ditto.
2514         (winapi_DebugBreakProcess): Ditto.
2515         (winapi_GenerateConsoleCtrlEvent): Ditto.
2516
2517 2013-07-02  Mircea Gherzan  <[email protected]>
2518
2519         * notif.h (notif_event): Add a dummy member to avoid compiler
2520         errors.
2521
2522 2013-07-01  Pedro Alves  <[email protected]>
2523
2524         * hostio.c (HOSTIO_PATH_MAX): Define.
2525         (require_filename, handle_open, handle_unlink, handle_readlink):
2526         Use it.
2527
2528 2013-07-01  Pedro Alves  <[email protected]>
2529
2530         * server.h: Include "pathmax.h".
2531         * linux-low.c: Don't include sys/param.h.
2532         (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2533         MAXPATHLEN.
2534         * win32-low.c: Don't include sys/param.h.
2535         (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2536
2537 2013-07-01  Pedro Alves  <[email protected]>
2538
2539         * event-loop.c: Don't check HAVE_UNISTD_H before including
2540         <unistd.h>.
2541         * gdbreplay.c: Likewise.
2542         * remote-utils.c: Likewise.
2543         * server.c: Likewise.
2544         * configure.ac: Don't check for unistd.h.
2545         * configure: Regenerate.
2546
2547 2013-06-28  Tom Tromey  <[email protected]>
2548
2549         * Makefile.in (version.c): Use version.in, not
2550         common/version.in.
2551
2552 2013-06-28  Mircea Gherzan  <[email protected]>
2553
2554         * configure.ac (version_host, version_target): Set and AC_SUBST them.
2555         * configure: Rebuild.
2556         * Makefile.in (version_host, version_target): Get from configure.
2557         (version.c): Use $(version_host) and $(version_target).
2558
2559 2013-06-10  Dmitry Kozlov <[email protected]>
2560
2561         Fix trace-status to output user name without trailing colon.
2562         * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2563
2564 2013-06-10  Dmitry Kozlov <[email protected]>
2565
2566         Fix trace-status to output proper start-time and stop-time.
2567         * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2568         output start time and stop time in hex as gdb expects.
2569
2570 2013-06-26  Pedro Alves  <[email protected]>
2571
2572         * tracepoint.c (build_traceframe_info_xml): Output trace state
2573         variables present in the trace buffer.
2574
2575 2013-06-24  Tom Tromey  <[email protected]>
2576
2577         * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2578         create-version.sh.
2579         (version.o): Remove.
2580         * gdbreplay.c: Include version.h.
2581         (version, host_name): Don't declare.
2582         * server.h: Include version.h.
2583         (version, host_name): Don't declare.
2584
2585 2013-06-12  Pedro Alves  <[email protected]>
2586
2587         * linux-x86-low.c (linux_is_elf64): Delete global.
2588         (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2589         with local linux_pid_exe_is_elf_64_file use.
2590
2591 2013-06-11  Pedro Alves  <[email protected]>
2592
2593         * linux-low.c (regset_disabled, disable_regset): New functions.
2594         (regsets_fetch_inferior_registers)
2595         (regsets_store_inferior_registers): Use them.
2596         (initialize_regsets_info); Don't allocate the disabled_regsets
2597         array here.
2598         * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2599         comment.
2600
2601 2013-06-11  Pedro Alves  <[email protected]>
2602
2603         * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2604         xmalloc.
2605
2606 2013-06-11  Pedro Alves  <[email protected]>
2607
2608         * linux-x86-low.c (initialize_low_arch): Call
2609         init_registers_x32_avx_linux.
2610
2611 2013-06-09  Jan Kratochvil  <[email protected]>
2612
2613         Fix compatibility with Android Bionic.
2614         * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
2615         it is not empty.
2616
2617 2013-06-07  Pedro Alves  <[email protected]>
2618
2619         PR server/14823
2620         * Makefile.in (OBS): Add tdesc.o.
2621         (IPA_OBJS): Add tdesc-ipa.o.
2622         (tdesc-ipa.o): New rule.
2623         * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
2624         interface.
2625         * linux-low.c (new_inferior): Delete.
2626         (disabled_regsets, num_regsets): Delete.
2627         (linux_add_process): Adjust to set the new per-process
2628         new_inferior flag.
2629         (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
2630         (linux_wait_for_lwp): Adjust.  Only call arch_setup if the event
2631         was a stop.  When calling arch_setup, switch the current inferior
2632         to the thread that got an event.
2633         (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
2634         (regsets_fetch_inferior_registers)
2635         (regsets_store_inferior_registers): New regsets_info parameter.
2636         Adjust to use it.
2637         (linux_register_in_regsets): New regs_info parameter.  Adjust to
2638         use it.
2639         (register_addr, fetch_register, store_register): New usrregs_info
2640         parameter.  Adjust to use it.
2641         (usr_fetch_inferior_registers, usr_store_inferior_registers): New
2642         parameter regs_info.  Adjust to use it.
2643         (linux_fetch_registers): Get the current inferior's regs_info, and
2644         adjust to use it.
2645         (linux_store_registers): Ditto.
2646         [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
2647         (initialize_low): Don't initialize the target_regsets here.  Call
2648         initialize_low_arch.
2649         * linux-low.h (target_regsets): Delete declaration.
2650         (struct regsets_info): New.
2651         (struct usrregs_info): New.
2652         (struct regs_info): New.
2653         (struct process_info_private) <new_inferior>: New field.
2654         (struct linux_target_ops): Delete the num_regs, regmap, and
2655         regset_bitmap fields.  New field regs_info.
2656         [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
2657         * i387-fp.c (num_xmm_registers): Delete.
2658         (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
2659         calls to new interface.
2660         (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
2661         (i387_xsave_to_cache): Adjust find_regno calls to new interface.
2662         Infer the number of xmm registers from the regcache's target
2663         description.
2664         * i387-fp.h (num_xmm_registers): Delete.
2665         * inferiors.c (add_thread): Don't install the thread's regcache
2666         here.
2667         * proc-service.c (gregset_info): Fetch the current inferior's
2668         regs_info.  Adjust to use it.
2669         * regcache.c: Include tdesc.h.
2670         (register_bytes, reg_defs, num_registers)
2671         (gdbserver_expedite_regs): Delete.
2672         (get_thread_regcache): If the thread doesn't have a regcache yet,
2673         create one, instead of aborting gdbserver.
2674         (regcache_invalidate_one): Rename to ...
2675         (regcache_invalidate_thread): ... this.
2676         (regcache_invalidate_one): New.
2677         (regcache_invalidate): Only invalidate registers of the current
2678         process.
2679         (init_register_cache): Add target_desc parameter, and use it.
2680         (new_register_cache): Ditto.  Assert the target description has a
2681         non zero registers_size.
2682         (regcache_cpy): Add assertions.  Adjust.
2683         (realloc_register_cache, set_register_cache): Delete.
2684         (registers_to_string, registers_from_string): Adjust.
2685         (find_register_by_name, find_regno, find_register_by_number)
2686         (register_cache_size): Add target_desc parameter, and use it.
2687         (free_register_cache_thread, free_register_cache_thread_one)
2688         (regcache_release, register_cache_size): New.
2689         (register_size): Add target_desc parameter, and use it.
2690         (register_data, supply_register, supply_register_zeroed)
2691         (supply_regblock, supply_register_by_name, collect_register)
2692         (collect_register_as_string, collect_register_by_name): Adjust.
2693         * regcache.h (struct target_desc): Forward declare.
2694         (struct regcache) <tdesc>: New field.
2695         (init_register_cache, new_register_cache): Add target_desc
2696         parameter.
2697         (regcache_invalidate_thread): Declare.
2698         (regcache_invalidate_one): Delete declaration.
2699         (regcache_release): Declare.
2700         (find_register_by_number, register_cache_size, register_size)
2701         (find_regno): Add target_desc parameter.
2702         (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
2703         declarations.
2704         * remote-utils.c: Include tdesc.h.
2705         (outreg, prepare_resume_reply): Adjust.
2706         * server.c: Include tdesc.h.
2707         (gdbserver_xmltarget): Delete declaration.
2708         (get_features_xml, process_serial_event): Adjust.
2709         * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
2710         declare.
2711         (struct process_info) <tdesc>: New field.
2712         (ipa_tdesc): Declare.
2713         * tdesc.c: New file.
2714         * tdesc.h: New file.
2715         * tracepoint.c: Include tdesc.h.
2716         [IN_PROCESS_AGENT] (ipa_tdesc): Define.
2717         (get_context_regcache): Adjust to pass ipa_tdesc down.
2718         (do_action_at_tracepoint): Adjust to get the register cache size
2719         from the context regcache's description.
2720         (traceframe_walk_blocks): Adjust to get the register cache size
2721         from the current trace frame's description.
2722         (traceframe_get_pc): Adjust to get current trace frame's
2723         description and pass it down.
2724         (gdb_collect): Adjust to get the register cache size from the
2725         IPA's description.
2726         * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
2727         (gdbserver_xmltarget): Delete.
2728         (initialize_low_tracepoint): Set the ipa's target description.
2729         * linux-i386-ipa.c (tdesc_i386_linux): Declare.
2730         (initialize_low_tracepoint): Set the ipa's target description.
2731         * linux-x86-low.c: Include tdesc.h.
2732         [__x86_64__] (is_64bit_tdesc): New.
2733         (ps_get_thread_area, x86_get_thread_area): Use it.
2734         (i386_cannot_store_register): Rename to ...
2735         (x86_cannot_store_register): ... this.  Use is_64bit_tdesc.
2736         (i386_cannot_fetch_register): Rename to ...
2737         (x86_cannot_fetch_register): ... this.  Use is_64bit_tdesc.
2738         (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
2739         to new interface.
2740         (target_regsets): Rename to ...
2741         (x86_regsets): ... this.
2742         (x86_get_pc, x86_set_pc): Adjust register_size calls to new
2743         interface.
2744         (x86_siginfo_fixup): Use is_64bit_tdesc.
2745         [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
2746         (tdesc_x32_avx_linux, tdesc_x32_linux)
2747         (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
2748         Declare.
2749         (x86_linux_update_xmltarget): Delete.
2750         (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
2751         (have_ptrace_getfpxregs, have_ptrace_getregset): New.
2752         (AMD64_LINUX_USER64_CS): New.
2753         (x86_linux_read_description): New, based on
2754         x86_linux_update_xmltarget.
2755         (same_process_callback): New.
2756         (x86_arch_setup_process_callback): New.
2757         (x86_linux_update_xmltarget): New.
2758         (x86_regsets_info): New.
2759         (amd64_linux_regs_info): New.
2760         (i386_linux_usrregs_info): New.
2761         (i386_linux_regs_info): New.
2762         (x86_linux_regs_info): New.
2763         (x86_arch_setup): Reimplement.
2764         (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
2765         (x86_emit_ops): Ditto.
2766         (the_low_target): Adjust.  Install x86_linux_regs_info,
2767         x86_cannot_fetch_register, and x86_cannot_store_register.
2768         (initialize_low_arch): New.
2769         * linux-ia64-low.c (tdesc_ia64): Declare.
2770         (ia64_fetch_register): Adjust.
2771         (ia64_usrregs_info, regs_info): New globals.
2772         (ia64_regs_info): New function.
2773         (the_low_target): Adjust.
2774         (initialize_low_arch): New function.
2775         * linux-sparc-low.c (tdesc_sparc64): Declare.
2776         (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
2777         Adjust.
2778         (sparc_arch_setup): New function.
2779         (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
2780         (the_low_target): Adjust.
2781         (initialize_low_arch): New function.
2782         * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
2783         (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
2784         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
2785         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
2786         (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
2787         (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
2788         (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
2789         (tdesc_powerpc_isa205_vsx64l): Declare.
2790         (ppc_cannot_store_register, ppc_collect_ptrace_register)
2791         (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
2792         (ppc_set_pc, ppc_get_hwcap): Adjust.
2793         (ppc_usrregs_info): Forward declare.
2794         (!__powerpc64__) ppc_regmap_adjusted: New global.
2795         (ppc_arch_setup): Adjust to the current process'es target
2796         description.
2797         (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
2798         (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
2799         (ppc_store_evrregset): Adjust.
2800         (target_regsets): Rename to ...
2801         (ppc_regsets): ... this, and make static.
2802         (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
2803         (ppc_regs_info): New function.
2804         (the_low_target): Adjust.
2805         (initialize_low_arch): New function.
2806         * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
2807         (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
2808         (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
2809         (tdesc_s390x_linux64v2): Declare.
2810         (s390_collect_ptrace_register, s390_supply_ptrace_register)
2811         (s390_fill_gregset, s390_store_last_break): Adjust.
2812         (target_regsets): Rename to ...
2813         (s390_regsets): ... this, and make static.
2814         (s390_get_pc, s390_set_pc): Adjust.
2815         (s390_get_hwcap): New target_desc parameter, and use it.
2816         [__s390x__] (have_hwcap_s390_high_gprs): New global.
2817         (s390_arch_setup): Adjust to set the current process'es target
2818         description.  Don't adjust the regmap.
2819         (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
2820         [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
2821         (regs_info_3264): New globals.
2822         (s390_regs_info): New function.
2823         (the_low_target): Adjust.
2824         (initialize_low_arch): New function.
2825         * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
2826         (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
2827         [__mips64] (init_registers_mips_linux)
2828         (init_registers_mips_dsp_linux): Delete defines.
2829         [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
2830         (have_dsp): New global.
2831         (mips_read_description): New, based on mips_arch_setup.
2832         (mips_arch_setup): Reimplement.
2833         (get_usrregs_info): New function.
2834         (mips_cannot_fetch_register, mips_cannot_store_register)
2835         (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
2836         (mips_fill_fpregset, mips_store_fpregset): Adjust.
2837         (target_regsets): Rename to ...
2838         (mips_regsets): ... this, and make static.
2839         (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
2840         (dsp_regs_info, regs_info): New globals.
2841         (mips_regs_info): New function.
2842         (the_low_target): Adjust.
2843         (initialize_low_arch): New function.
2844         * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
2845         (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
2846         Declare.
2847         (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
2848         (arm_read_description): New, with bits factored from
2849         arm_arch_setup.
2850         (arm_arch_setup): Reimplement.
2851         (target_regsets): Rename to ...
2852         (arm_regsets): ... this, and make static.
2853         (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
2854         (arm_regs_info): New function.
2855         (the_low_target): Adjust.
2856         (initialize_low_arch): New function.
2857         * linux-m68k-low.c (tdesc_m68k): Declare.
2858         (target_regsets): Rename to ...
2859         (m68k_regsets): ... this, and make static.
2860         (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
2861         (m68k_regs_info): New function.
2862         (m68k_arch_setup): New function.
2863         (the_low_target): Adjust.
2864         (initialize_low_arch): New function.
2865         * linux-sh-low.c (tdesc_sharch): Declare.
2866         (target_regsets): Rename to ...
2867         (sh_regsets): ... this, and make static.
2868         (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
2869         (sh_regs_info, sh_arch_setup): New functions.
2870         (the_low_target): Adjust.
2871         (initialize_low_arch): New function.
2872         * linux-bfin-low.c (tdesc_bfin): Declare.
2873         (bfin_arch_setup): New function.
2874         (bfin_usrregs_info, regs_info): New globals.
2875         (bfin_regs_info): New function.
2876         (the_low_target): Adjust.
2877         (initialize_low_arch): New function.
2878         * linux-cris-low.c (tdesc_cris): Declare.
2879         (cris_arch_setup): New function.
2880         (cris_usrregs_info, regs_info): New globals.
2881         (cris_regs_info): New function.
2882         (the_low_target): Adjust.
2883         (initialize_low_arch): New function.
2884         * linux-cris-low.c (tdesc_crisv32): Declare.
2885         (cris_arch_setup): New function.
2886         (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
2887         (cris_regs_info): New function.
2888         (the_low_target): Adjust.
2889         (initialize_low_arch): New function.
2890         * linux-m32r-low.c (tdesc_m32r): Declare.
2891         (m32r_arch_setup): New function.
2892         (m32r_usrregs_info, regs_info): New globals.
2893         (m32r_regs_info): Adjust.
2894         (initialize_low_arch): New function.
2895         * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
2896         (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
2897         (tic6x_usrregs_info): Forward declare.
2898         (tic6x_read_description): New function, based on ...
2899         (tic6x_arch_setup): ... this.  Reimplement.
2900         (target_regsets): Rename to ...
2901         (tic6x_regsets): ... this, and make static.
2902         (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
2903         (tic6x_regs_info): New function.
2904         (the_low_target): Adjust.
2905         (initialize_low_arch): New function.
2906         * linux-xtensa-low.c (tdesc_xtensa): Declare.
2907         (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
2908         (target_regsets): Rename to ...
2909         (xtensa_regsets): ... this, and make static.
2910         (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
2911         globals.
2912         (xtensa_arch_setup, xtensa_regs_info): New functions.
2913         (the_low_target): Adjust.
2914         (initialize_low_arch): New function.
2915         * linux-nios2-low.c (tdesc_nios2_linux): Declare.
2916         (nios2_arch_setup): Set the current process'es tdesc.
2917         (target_regsets): Rename to ...
2918         (nios2_regsets): ... this.
2919         (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
2920         (nios2_regs_info): New function.
2921         (the_low_target): Adjust.
2922         (initialize_low_arch): New function.
2923         * linux-aarch64-low.c (tdesc_aarch64): Declare.
2924         (aarch64_arch_setup): Set the current process'es tdesc.
2925         (target_regsets): Rename to ...
2926         (aarch64_regsets): ... this.
2927         (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
2928         (aarch64_regs_info): New function.
2929         (the_low_target): Adjust.
2930         (initialize_low_arch): New function.
2931         * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
2932         globals.
2933         (target_regsets): Rename to ...
2934         (tile_regsets): ... this.
2935         (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
2936         (tile_regs_info): New function.
2937         (tile_arch_setup): Set the current process'es tdesc.
2938         (the_low_target): Adjust.
2939         (initialize_low_arch): New function.
2940         * spu-low.c (tdesc_spu): Declare.
2941         (spu_create_inferior, spu_attach): Set the new process'es tdesc.
2942         * win32-arm-low.c (tdesc_arm): Declare.
2943         (arm_arch_setup): New function.
2944         (the_low_target): Install arm_arch_setup instead of
2945         init_registers_arm.
2946         * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
2947         (init_windows_x86): Rename to ...
2948         (i386_arch_setup): ... this.  Set `win32_tdesc'.
2949         (the_low_target): Adjust.
2950         * win32-low.c (win32_tdesc): New global.
2951         (child_add_thread): Don't create the thread cache here.
2952         (do_initial_child_stuff): Set the new process'es tdesc.
2953         * win32-low.h (struct target_desc): Forward declare.
2954         (win32_tdesc): Declare.
2955         * lynx-i386-low.c (tdesc_i386): Declare global.
2956         (lynx_i386_arch_setup): Set `lynx_tdesc'.
2957         * lynx-low.c (lynx_tdesc): New global.
2958         (lynx_add_process): Set the new process'es tdesc.
2959         * lynx-low.h (struct target_desc): Forward declare.
2960         (lynx_tdesc): Declare global.
2961         * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
2962         (lynx_ppc_arch_setup): Set `lynx_tdesc'.
2963         * nto-low.c (nto_tdesc): New global.
2964         (do_attach): Set the new process'es tdesc.
2965         * nto-low.h (struct target_desc): Forward declare.
2966         (nto_tdesc): Declare.
2967         * nto-x86-low.c (tdesc_i386): Declare.
2968         (nto_x86_arch_setup): Set `nto_tdesc'.
2969
2970 2013-06-04  Gary Benson  <[email protected]>
2971
2972         * server.c (handle_query): Add "augmented-libraries-svr4-read+"
2973         to qSupported response when appropriate.
2974         (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
2975         with nonzero-length annex.
2976         * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
2977         arguments supplied in annex.
2978
2979 2013-05-31  Doug Evans  <[email protected]>
2980
2981         PR server/15594
2982         * linux-x86-low.c (ps_get_thread_area): Properly extend address to
2983         64 bits in 64-cross-32 environment.
2984
2985 2013-05-28  Pedro Alves  <[email protected]>
2986
2987         * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
2988         (aarch64-without-fpu.c): Delete rule.
2989         * configure.srv (aarch64*-*-linux*): Remove references to
2990         aarch64-without-fpu.o and aarch64-without-fpu.xml.
2991         * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
2992         declaration.
2993
2994 2013-05-24  Pedro Alves  <[email protected]>
2995
2996         * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
2997         instead of strchr/decode_address.  Error if the range isn't split
2998         with a ','.  Don't assume there's be a ':' in the action.
2999
3000 2013-05-23  Yao Qi  <[email protected]>
3001             Pedro Alves  <[email protected]>
3002
3003         * linux-low.c (lwp_in_step_range): New function.
3004         (linux_wait_1): If the thread was range stepping and stopped
3005         outside the stepping range, report the stop to GDB.  Otherwise,
3006         continue stepping.  Add range stepping debug output.
3007         (linux_set_resume_request): Copy the step range from the resume
3008         request to the lwp.
3009         (linux_supports_range_stepping): New.
3010         (linux_target_ops) <supports_range_stepping>: Set to
3011         linux_supports_range_stepping.
3012         * linux-low.h (struct linux_target_ops)
3013         <supports_range_stepping>: New field.
3014         (struct lwp_info) <step_range_start, step_range_end>: New fields.
3015         * linux-x86-low.c (x86_supports_range_stepping): New.
3016         (the_low_target) <supports_range_stepping>: Set to
3017         x86_supports_range_stepping.
3018         * server.c (handle_v_cont): Handle 'r' action.
3019         (handle_v_requests): Append ";r" if the target supports range
3020         stepping.
3021         * target.h (struct thread_resume) <step_range_start,
3022         step_range_end>: New fields.
3023         (struct target_ops) <supports_range_stepping>:
3024         New field.
3025         (target_supports_range_stepping): New macro.
3026
3027 2013-05-17  Joel Brobecker  <[email protected]>
3028
3029         * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
3030         confusion in comment.
3031
3032 2013-05-17  Joel Brobecker  <[email protected]>
3033
3034         * lynx-low.c (struct process_info_private): New type.
3035         (lynx_add_process): New function.
3036         (lynx_create_inferior, lynx_attach): Replace calls to
3037         add_process by calls to lynx_add_process.
3038         (lynx_resume): If PTID is null, then try using
3039         current_process()->private->last_wait_event_ptid.
3040         Add comments.
3041         (lynx_clear_inferiors): Delete.  The contents of that function
3042         has been inlined in lynx_mourn;
3043         (lynx_wait_1): Save the ptid in the process's private data.
3044         (lynx_mourn): Free the process' private data.  Replace call
3045         to lynx_clear_inferiors by call to clear_inferiors.
3046
3047 2013-05-17  Yao Qi  <[email protected]>
3048
3049         * i386-low.c (i386_length_and_rw_bits): Move the comment to
3050         the right place.
3051
3052 2013-05-16  Luis Machado  <[email protected]>
3053
3054         * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
3055         PT_DATA_ADDR and PT_TEXT_END_ADDR.  Update comments.
3056         (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
3057         PT_TEXT_END_ADDR guards.  Update comments.
3058         (linux_target_op) <read_offsets>: Conditionally define to
3059         linux_read_offsets if the target is UCLIBC and if it defines
3060         PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
3061
3062 2013-05-06  Sandra Loosemore  <[email protected]>
3063             Andrew Jenner  <[email protected]>
3064
3065         * Makefile.in (SFILES): Add linux-nios2-low.c.
3066         (clean): Add action to delete nios2-linux.c.
3067         (nios2-linux.c): New rule.
3068         * configure.srv: Add nios2*-*-linux*.
3069         * linux-nios2-low.c: New.
3070
3071 2013-05-03  Hafiz Abid Qadeer  <[email protected]>
3072
3073         * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
3074
3075 2013-04-25  Hui Zhu  <[email protected]>
3076
3077         PR gdb/15186
3078         * ax.c (ax_printf): Add fflush.
3079
3080 2013-04-22  Tom Tromey  <[email protected]>
3081
3082         * Makefile.in (SFILES): Add filestuff.c.
3083         (OBS): Add filestuff.o.
3084         (filestuff.o): New target.
3085         * config.in, configure: Rebuild.
3086         * configure.ac: Check for fdwalk, pipe2.
3087
3088 2013-04-17  Pedro Alves  <[email protected]>
3089
3090         * configure.ac (USE_THREAD_DB): Delete variable.
3091         (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
3092         Don't AC_SUBST USE_THREAD_DB.
3093         * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
3094         * config.in, configure: Regenerate.
3095
3096 2013-04-16  Pedro Alves  <[email protected]>
3097
3098         * linux-low.h (struct lwp_info) <thread_known>: Move under
3099         the USE_THREAD_DB #ifdef.
3100
3101 2013-04-16  Pedro Alves  <[email protected]>
3102
3103         * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
3104         (linux-low.o): Delete rule.
3105         * linux-low.h: Always include "gdb_thread_db.h" instead of
3106         conditionally including thread_db.h.
3107         (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
3108         HAVE_THREAD_DB_H.
3109
3110 2013-04-07  Jan Kratochvil  <[email protected]>
3111
3112         * Makefile.in (install-only): Fix make install regression.
3113
3114 2013-04-05  Jan Kratochvil  <[email protected]>
3115
3116         Convert man pages to texinfo, new gdbinit.5 texinfo page.
3117         * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
3118         installation.
3119         * gdbserver.1: Remove.
3120
3121 2013-03-22  Pedro Alves  <[email protected]>
3122
3123         * linux-low.c (handle_extended_wait): Don't call
3124         linux_enable_event_reporting.
3125
3126 2013-03-15  Tony Theodore  <[email protected]>
3127
3128         PR build/9098:
3129         * Makefile.in (SHELL): Use @SHELL@.
3130
3131 2013-03-14  Sergio Durigan Junior  <[email protected]>
3132
3133         * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
3134         compiler warning.
3135
3136 2013-03-13  Joel Brobecker  <[email protected]>
3137
3138         * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
3139         Remove extraneous NULL element.
3140
3141 2013-03-13  Yao Qi  <[email protected]>
3142
3143         * tracepoint.c (traceframe_read_tsv): Look for the last matched
3144         'V' block in trace frame.
3145
3146 2013-03-11  Markus Metzger  <[email protected]>
3147
3148         * target.h (struct target_ops): Add btrace ops.
3149         (target_supports_btrace): New macro.
3150         (target_enable_btrace): New macro.
3151         (target_disable_btrace): New macro.
3152         (target_read_btrace): New macro.
3153         * gdbthread.h (struct thread_info): Add btrace field.
3154         * server.c: Include btrace-common.h.
3155         (handle_btrace_general_set): New function.
3156         (handle_btrace_enable): New function.
3157         (handle_btrace_disable): New function.
3158         (handle_general_set): Call handle_btrace_general_set.
3159         (handle_qxfer_btrace): New function.
3160         (struct qxfer qxfer_packets[]): Add btrace entry.
3161         * inferiors.c (remove_thread): Disable btrace.
3162         * linux-low: Include linux-btrace.h.
3163         (linux_low_enable_btrace): New function.
3164         (linux_low_read_btrace): New function.
3165         (linux_target_ops): Add btrace ops.
3166         * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
3167         Add srv_linux_btrace=yes.
3168         (x86_64-*-linux*): Add linux-btrace.o.
3169         Add srv_linux_btrace=yes.
3170         * configure.ac: Define HAVE_LINUX_BTRACE.
3171         * config.in: Regenerated.
3172         * configure: Regenerated.
3173
3174 2013-03-11  Markus Metzger  <[email protected]>
3175
3176         * server.c (handle_qxfer): Preserve error message if -3 is
3177         returned.
3178         (qxfer): Document the -3 return value.
3179
3180 2013-03-11  Markus Metzger  <[email protected]>
3181
3182         * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
3183         (linux_btrace_h): New variable.
3184         (linux-btrace.o): New rule.
3185
3186 2013-03-08  Stan Shebs  <[email protected]>
3187             Hafiz Abid Qadeer  <[email protected]>
3188
3189         * tracepoint.c (trace_buffer_size): New global.
3190         (DEFAULT_TRACE_BUFFER_SIZE): New define.
3191         (init_trace_buffer): Change to one-argument function. Allocate
3192         trace buffer memory.
3193         (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
3194         handle QTBuffer:size packet.
3195         (cmd_bigqtbuffer_size): New function.
3196         (initialize_tracepoint): Call init_trace_buffer with
3197         DEFAULT_TRACE_BUFFER_SIZE.
3198         * server.c (handle_query): Add QTBuffer:size in the
3199         supported packets.
3200
3201 2013-03-07  Yao Qi  <[email protected]>
3202
3203         * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
3204         (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
3205         of -1.
3206         (cmd_qtsp): Adjust condition.  Do post increment.
3207         Set cur_action and cur_step_action back to 0.
3208
3209 2013-03-07  Jeremy Bennett  <[email protected]>
3210
3211         PR server/15236
3212         * linux-low.c (linux_write_memory): Return early success if LEN is
3213         zero.
3214
3215 2013-03-05  Corinna Vinschen  <[email protected]>
3216
3217         * configure.srv: Add x86_64-*-cygwin* as target.
3218
3219 2013-02-28  Tom Tromey  <[email protected]>
3220
3221         * configure.ac: Invoke AC_SYS_LARGEFILE.
3222         * configure, config.in: Rebuild.
3223
3224 2013-02-28  Corinna Vinschen  <[email protected]>
3225
3226         * win32-low.c: Throughout, fix format strings and casts of
3227         printf-like functions to avoid type related warnings on all
3228         platforms.
3229         (get_child_debug_event): Print dwDebugEventCode as hex since
3230         that's how it's usually documented.
3231
3232 2013-02-28  Yao Qi  <[email protected]>
3233
3234         * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
3235         pulongest.
3236
3237 2013-02-27  Jiong Wang  <[email protected]>
3238
3239         * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
3240         (reg-tilegx32.c): New rule.
3241         * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
3242         * linux-tile-low.c (tile_arch_setup): New function.  Invoke
3243         different register info initializer according to elf class.
3244         (init_registers_tilgx32): New function.  The tilegx32 register info
3245         initializer.
3246         (tile_fill_gregset): Use "uint_reg_t" to represent register size.
3247         (tile_store_gregset): Likewise.
3248
3249 2013-02-27  Yao Qi  <[email protected]>
3250
3251         * server.c (process_point_options): Print debug message when
3252         debug_threads is true.
3253
3254 2013-02-26  Yao Qi  <[email protected]>
3255
3256         * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
3257
3258 2013-02-19  Pedro Alves  <[email protected]>
3259             Kai Tietz <[email protected]>
3260
3261         PR gdb/15161
3262
3263         * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
3264         instead of strtoul to extract address from packet.
3265         (process_serial_event) <'z'>: Likewise.
3266
3267 2013-02-18  Yao Qi  <[email protected]>
3268
3269         * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
3270
3271 2013-02-14  Pedro Alves  <[email protected]>
3272
3273         Plug memory leak.
3274
3275         * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
3276         TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
3277
3278 2013-02-14  Pedro Alves  <[email protected]>
3279
3280         * tracepoint.c (cmd_qtdpsrc): Use savestring.
3281
3282 2013-02-14  Pedro Alves  <[email protected]>
3283
3284         * tracepoint.c (save_string): Delete.
3285         (add_tracepoint_action): Use savestring instead of save_string.
3286
3287 2013-02-12  Pedro Alves  <[email protected]>
3288
3289         * linux-xtensa-low.c: Ditto.
3290         * xtensa-xtregs.c: Ditto.
3291
3292 2013-02-12  Sanimir Agovic  <[email protected]>
3293
3294         * thread-db.c (thread_db_get_tls_address): NULL pointer check
3295         thread_db.
3296
3297 2013-02-07  Marcus Shawcroft  <[email protected]>
3298
3299         * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3300         aarch64_num_wp_regs and aarch64_num_bp_regs to
3301         AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3302
3303 2013-02-07  Marcus Shawcroft  <[email protected]>
3304
3305         * linux-aarch64-low.c (ps_get_thread_area): Replace
3306         PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3307
3308 2013-02-04  Jim MacArthur  <[email protected]>
3309             Marcus Shawcroft  <[email protected]>
3310             Nigel Stephens  <[email protected]>
3311             Yufeng Zhang  <[email protected]>
3312
3313         * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3314         (aarch64.c, aarch64-without-fpu.c): New targets.
3315         * configure.srv (aarch64*-*-linux*): New.
3316         * linux-aarch64-low.c: New file.
3317
3318 2013-02-04  Marcus Shawcroft  <[email protected]>
3319
3320         * linux-low.c (handle_extended_wait, linux_create_inferior)
3321         (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3322         (dequeue_one_deferred_signal, linux_resume_one_thread)
3323         (fetch_register, linux_write_memory, linux_enable_event_reporting)
3324         (linux_tracefork_grandchild, linux_test_for_tracefork)
3325         (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3326         PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3327         where the argument is 0.
3328
3329 2013-01-25  Yao Qi  <[email protected]>
3330
3331         * event-loop.c: Include "queue.h".
3332         (gdb_event_p): New typedef.
3333         (struct gdb_event) <next_event>: Remove.
3334         (event_queue): Change to QUEUE(gdb_event_p).
3335         (async_queue_event): Remove.
3336         (gdb_event_xfree): New.
3337         (initialize_event_loop): New.
3338         (process_event): Use API from QUEUE.
3339         (wait_for_event): Likewise.
3340         * server.c (main): Call initialize_event_loop.
3341         * server.h (initialize_event_loop): Declare.
3342
3343 2013-01-18  Yao Qi  <[email protected]>
3344
3345         * ax.h (struct eval_agent_expr_context): New.
3346         (gdb_eval_agent_expr): Update declaration.
3347         * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3348         TFRAME.  Add new argument CTX.
3349         * server.h (struct eval_agent_expr_context): Declare.
3350         (agent_mem_read, agent_tsv_read): Update declaration.
3351         (agent_mem_read_string): Likewise.
3352         * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3353         (add_traceframe_block): Add new argument TPOINT.
3354         Increase TPOINT->traceframe_usage.
3355         (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3356         eval_tracepoint_agent_expr.
3357         (condition_true_at_tracepoint): Likewise.
3358         (agent_mem_read): Remove argument TFRAME.  Add argument CTX.
3359         (agent_mem_read_string, agent_tsv_read): Likewise.
3360
3361 2013-01-16  Yao Qi  <[email protected]>
3362
3363         * linux-low.c (linux_resume_one_lwp): Don't check
3364         'lwp->bp_reinsert != 0'.
3365
3366 2013-01-07  Joel Brobecker  <[email protected]>
3367             Pedro Alves  <[email protected]>
3368
3369         * lynx-low.c (ptrace_request_to_str): Define a temporary
3370         macro and use it to simplify this function's implementation.
3371
3372 2013-01-07  Joel Brobecker  <[email protected]>
3373
3374         * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3375         sets errno.
3376
3377 2013-01-07  Joel Brobecker  <[email protected]>
3378
3379         * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3380
3381 2013-01-07  Joel Brobecker  <[email protected]>
3382
3383         * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3384
3385 2013-01-07  Joel Brobecker  <[email protected]>
3386
3387         * lynx-low.c (lynx_resume): Use the resume_info parameter
3388         to determine the ptid for the lynx_ptrace call, unless
3389         it is equal to minus_one_ptid, in which case we use the
3390         ptid of the current_inferior.
3391         (lynx_wait_1): After having received a thread create/exit
3392         event, resume the inferior's execution using the signaling
3393         thread's ptid, rather than the old ptid.
3394
3395 2013-01-07  Joel Brobecker  <[email protected]>
3396
3397         * lynx-low.c (lynx_resume): Delete variable ret.
3398
3399 2013-01-01  Joel Brobecker  <[email protected]>
3400
3401         * gdbreplay.c (gdbreplay_version): Update copyright year.
3402         * server.c (gdbserver_version): Likewise.
3403
3404 2012-12-17  Joel Brobecker  <[email protected]>
3405
3406         * lynx-low.c (lynx_wait_1): Add debug trace before adding
3407         new thread.
3408
3409 2012-12-17  Joel Brobecker  <[email protected]>
3410
3411         * lynx-low.c (ptrace_request_to_str): Add handling for
3412         PTRACE_GETTRACESIG.
3413
3414 2012-12-17  Joel Brobecker  <[email protected]>
3415
3416         * lynx-low.c (lynx_attach): Delete variable new_process.
3417
3418 2012-12-17  Joel Brobecker  <[email protected]>
3419
3420         * lynx-low.c (lynx_create_inferior): Delete variable
3421         new_process.
3422
3423 2012-12-17  Joel Brobecker  <[email protected]>
3424
3425         * lynx-low.c (ptrace_request_to_str): Do not handle
3426         PTRACE_GETTHREADLIST if this macro does not exist.
3427
3428 2012-12-15  Yao Qi  <[email protected]>
3429
3430         * Makefile.in (OBS): Add notif.o.
3431         * notif.c, notif.h: New.
3432         * server.c: Include "notif.h".
3433         (struct vstop_notif) <next>: Remove.
3434         <base>: New field.
3435         (queue_stop_reply): Update.
3436         (push_event, send_next_stop_reply): Remove.
3437         (discard_queued_stop_replies): Update.
3438         (notif_stop): New variable.
3439         (handle_v_stopped): Remove.
3440         (handle_v_requests): Don't call handle_v_stopped.  Call
3441         handle_ack_notif instead.
3442         (queue_stop_reply_callback): Call notif_event_enque instead
3443         of queue_stop_reply.
3444         (handle_status): Don't call send_next_stop_reply, call
3445         notif_write_event instead.
3446         (kill_inferior_callback): Likewise.
3447         (detach_or_kill_inferior_callback): Likewise.
3448         (main): Call initialize_notif.
3449         (process_serial_event): Call QUEUE_is_empty.
3450         (handle_target_event): Call notif_push instead of push event.
3451         * server.h (push_event): Remove declaration.
3452
3453 2012-12-10  Tom Tromey  <[email protected]>
3454
3455         * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3456         (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3457         macros.
3458         (.c.o): Rewrite.
3459         (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3460         (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3461         (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3462         (amd64-linux-ipa.o, ax.o): Rewrite.
3463         (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3464         (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3465         (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3466         (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3467         (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3468         (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3469         (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3470         (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3471         (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3472         (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3473         (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3474         (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3475         (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3476         (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3477         (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3478         (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3479         (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3480         (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3481         (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3482         (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3483         (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3484         (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3485         (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3486         (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3487         (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3488         (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3489         (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3490         (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3491         (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3492         (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3493         (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3494         (reg-tilegx.o): Remove.
3495         (all_object_files): New macro.
3496         Include .deps files.
3497         * aclocal.m4, configure: Rebuild.
3498         * acinclude.m4: Include depstand.m4, lead-dot.m4.
3499         * configure.ac: Invoke ZW_CREATE_DEPDIR,
3500         ZW_PROG_COMPILER_DEPENDENCIES.  Compute GMAKE condition.
3501
3502 2012-12-05  Tom Tromey  <[email protected]>
3503
3504         PR gdb/14917:
3505         * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3506
3507 2012-11-28  Markus Metzger  <[email protected]>
3508
3509         * configure.ac: Check for linux/perf_event.h.
3510         * config.in: Regenerated.
3511         * configure: Regenerated.
3512
3513 2012-11-26  Maxime Villard  <[email protected]>
3514
3515         * hostio.c (handle_readlink): Decrease buffer size
3516         parameter passed to readlink by one byte.
3517
3518 2012-11-26  Yao Qi  <[email protected]>
3519
3520         * configure.ac (build_warnings): Append '-Wempty-body'.
3521         * configure: Regenerated.
3522         * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3523         body.
3524
3525 2012-11-15  Pierre Muller  <[email protected]>
3526
3527         * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3528         * config.in: Regenerate.
3529         * configure: Regenerate.
3530         * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3531         Use "gdb_wait.h" header instead of <sys/wait.h> header.
3532         * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3533         * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3534         header.
3535         * server.c: Remove HAVE_WAIT_H conditional.  Use "gdb_wait.h" header
3536         instead of <sys/wait.h> header.
3537         * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3538
3539 2012-11-13 Markus Metzger  <[email protected]>
3540
3541         * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3542         (various make rules): Remove -DGDBSERVER
3543
3544 2012-11-09  Yao Qi  <[email protected]>
3545
3546         * spu-low.c (current_ptid): Move it to ..
3547         * gdbthread.h: ... here.  New.
3548         * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3549         * server.c (myresume, process_serial_event): Likewise.
3550         * thread-db.c (thread_db_find_new_threads): Likewise.
3551         * tracepoint.c (run_inferior_command): Likewise.
3552
3553 2012-10-01  Andrew Burgess  <[email protected]>
3554
3555         * server.c (handle_search_memory_1): Include access length in
3556         warning message.
3557
3558 2012-09-05  Michael Brandt  <[email protected]>
3559
3560         * linux-crisv32-low.c: Fix compile errors.
3561
3562 2012-09-04  Yao Qi  <[email protected]>
3563
3564         * tracepoint.c (cmd_qtsv): Adjust debug message.
3565         Don't check CUR_TPOINT.
3566
3567 2012-08-28  Yao Qi  <[email protected]>
3568
3569         * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3570         * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3571         (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3572         Remove declarations of xmalloc, xreallloc, xstrdup and
3573         freeargv.
3574         * Makefile.in (libiberty_h): New.
3575         (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3576         (linux-bfin-low.o): Append dependency 'libiberty.h'.
3577
3578 2012-08-23  Yao Qi  <[email protected]>
3579
3580         * server.h: Remove declaration of 'xsnprintf'.
3581
3582 2012-08-22  Keith Seitz  <[email protected]>
3583
3584         * server.h: Include build-gnulib-gbserver/config.h.
3585         * gdbreplay.c: Likewise.
3586
3587 2012-08-08  Doug Evans  <[email protected]>
3588
3589         * Makefile.in (SFILES): Add gdb_vecs.c.
3590         (OBS): Add gdb_vecs.o.
3591         (gdb_vecs_h, host_defs_h): New variables.
3592         (thread-db.o): Add $(gdb_vecs_h) dependency.
3593         (gdb_vecs.o): New rule.
3594         * thread-db.c: #include "gdb_vecs.h".
3595         (thread_db_load_search): Use a vector to iterate over path elements.
3596         Handle text appearing after "$pdir".
3597
3598         * configure.ac: Add check for strstr.
3599         * config.in: Regenerate.
3600         * configure: Regenerate.
3601
3602 2012-08-02  Ulrich Weigand  <[email protected]>
3603
3604         * hostio.c (handle_pread): If pread fails, fall back to attempting
3605         lseek/read.
3606         (handle_pwrite): Likewise for pwrite.
3607
3608 2012-08-01  Ulrich Weigand  <[email protected]>
3609
3610         * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3611         between unsupported TYPE and unimplementable ADDR/LEN combination.
3612         (arm_insert_point): Act on new return value.
3613
3614 2012-07-31  Pedro Alves  <[email protected]>
3615
3616         * server.c (process_point_options): Only skip tokens if we find
3617         one that is unrecognized.  Don't treat 'X' specially while
3618         skipping unrecognized tokens.
3619
3620 2012-07-30  Ulrich Weigand  <[email protected]>
3621
3622         * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
3623         to 4-byte-align HW breakpoint addresses for Thumb.
3624
3625 2012-07-27  Yao Qi  <[email protected]>
3626
3627         PR remote/14161.
3628
3629         * server.h: Declare gdb_agent_about_to_close.
3630         * target.c (kill_inferior): Include "agent.h".
3631         New.  Send command 'kill'.
3632         * target.h (kill_inferior): Removed macro.
3633         * tracepoint.c (gdb_agent_about_to_close): New.
3634         (gdb_agent_helper_thread): Handle command 'close'.
3635         Wait endlessly until the inferior stops.
3636         Install gdb_agent_remove_socket to atexit hook.
3637         (agent_socket_name): New static variable.
3638         (gdb_agent_socket_init): Replace local variable 'name' with
3639         'agent_socket_name'.
3640         (gdb_agent_remove_socket): New.
3641
3642 2012-07-27  Yao Qi  <[email protected]>
3643
3644         * server.c (process_point_options): Stop at 'X' when parsing.
3645
3646 2012-07-19  Michael Eager  <[email protected]>
3647
3648         * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
3649         to hw_execute.
3650         * linux-x86-low.c (x86_insert_point, x86_remove_point):
3651         Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
3652         hardware breakpoint.
3653
3654 2012-07-07  Jan Kratochvil  <[email protected]>
3655
3656         * gdbserver/linux-low.c (initialize_low): Call
3657         linux_ptrace_init_warnings.
3658
3659 2012-07-02  Doug Evans  <[email protected]>
3660
3661         * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
3662         pointer to int.
3663
3664 2012-07-02  Stan Shebs  <[email protected]>
3665
3666         * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
3667         (ax.o): Add it to build rule.
3668         (ax-ipa.o): Ditto.
3669         (OBS): Add format.o.
3670         (IPA_OBS): Add format.o.
3671         * server.c (handle_query): Claim support for breakpoint commands.
3672         (process_point_options): Add command case.
3673         (process_serial_event): Leave running if there are printfs in
3674         effect.
3675         * mem-break.h (any_persistent_commands): Declare.
3676         (add_breakpoint_commands): Declare.
3677         (gdb_no_commands_at_breakpoint): Declare.
3678         (run_breakpoint_commands): Declare.
3679         * mem-break.c (struct point_command_list): New struct.
3680         (struct breakpoint): New field command_list.
3681         (any_persistent_commands): New function.
3682         (add_commands_to_breakpoint): New function.
3683         (add_breakpoint_commands): New function.
3684         (gdb_no_commands_at_breakpoint): New function.
3685         (run_breakpoint_commands): New function.
3686         * linux-low.c (linux_wait_1): Test for and run breakpoint commands
3687         locally.
3688         * ax.c: Include format.h.
3689         (ax_printf): New function.
3690         (gdb_eval_agent_expr): Add printf opcode.
3691
3692 2012-06-13  Yao Qi  <[email protected]>
3693
3694         * server.c (start_inferior): Remove duplicated writes to fields
3695         'last_resume_kind' and 'last_status' of 'current_inferior'.
3696
3697 2012-06-12  Yao Qi  <[email protected]>
3698             Pedro Alves  <[email protected]>
3699
3700         * linux-low.c (linux_set_resume_request): Simplify predicate.  Add
3701         comment.
3702         * server.c (handle_v_cont): Extend comment.
3703
3704 2012-06-11  Yao Qi  <[email protected]>
3705
3706         * linux-low.c (linux_attach): Add 'static'.
3707
3708 2012-06-06  Yao Qi  <[email protected]>
3709
3710         * ax.c (gdb_eval_agent_expr): Print `top' in hex.
3711
3712 2012-06-01  Jan Kratochvil  <[email protected]>
3713
3714         Fix gcc -flto compilation warning.
3715         * server.c (main): Make variable multi_mode and attach volatile.
3716
3717 2012-05-30  Thiago Jung Bauermann  <[email protected]>
3718
3719         * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
3720         if the platform doesn't know about it.
3721
3722 2012-05-30  Jeff Kenton  <[email protected]>
3723
3724         * Makefile.in (SFILES): Add linux-tile-low.c.
3725         (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
3726         * configure.srv: Handle tilegx-*-linux*.
3727         * linux-tile-low.c: New file.
3728
3729 2012-05-28  Jan Kratochvil  <[email protected]>
3730
3731         * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
3732
3733 2012-05-24  Pedro Alves  <[email protected]>
3734
3735         PR gdb/7205
3736
3737         Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
3738
3739 2012-05-24  Pedro Alves  <[email protected]>
3740
3741         PR gdb/7205
3742
3743         Replace target_signal with gdb_signal throughout.
3744
3745 2012-05-22  Maciej W. Rozycki  <[email protected]>
3746
3747         * linux-low.c (linux_store_registers): Avoid the copying sequence
3748         when no data has been retrieved by ptrace.
3749
3750 2012-05-22  Will Deacon  <[email protected]>
3751
3752         * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
3753         Include asm/ptrace.h.
3754         (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
3755         already defined.
3756
3757 2012-05-21  Maciej W. Rozycki  <[email protected]>
3758
3759         * linux-low.c (linux_store_registers): Don't re-retrieve data
3760         with ptrace that has already been obtained from /proc.  Always
3761         copy any data retrieved with ptrace to the buffer supplied.
3762
3763 2012-05-11  Yao Qi  <[email protected]>
3764             Pedro Alves  <[email protected]>
3765
3766         * linux-low.c (enum stopping_threads_kind): New.
3767         (stopping_threads): Change type to `enum stopping_threads_kind'.
3768         (handle_extended_wait): If stopping and suspending threads, leave
3769         the new_lwp suspended too.
3770         (linux_wait_for_event): Adjust.
3771         (stop_all_lwps): Set `stopping_threads' to
3772         STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
3773         whether we're suspending threads or just stopping them.  Assert no
3774         recursion happens.
3775
3776 2012-04-29  Yao Qi  <[email protected]>
3777
3778         * server.h: Move some code to ...
3779         * gdbthread.h: ... here.  New.
3780         * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
3781         (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
3782         (nto-low.o, win32-low.o): Likewise.
3783         * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
3784         * regcache.c, remote-utils.c, server.c: Likewise.
3785         * target.c, tracepoint.c, win32-low.c: Likewise.
3786
3787 2012-04-24  Thiago Jung Bauermann  <[email protected]>
3788
3789         * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
3790         (PTRACE_ARG4_TYPE): Likewise.
3791         (PTRACE_XFER_TYPE): Likewise.
3792         * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
3793         ptrace to PTRACE_ARG3_TYPE.
3794         * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
3795         (PTRACE_ARG4_TYPE): Likewise.
3796         (PTRACE_XFER_TYPE): Likewise.
3797         (linux_detach_one_lwp): Cast fourth argument of
3798         ptrace to long then PTRACE_ARG4_TYPE.
3799         (regsets_fetch_inferior_registers): Cast third argument of
3800         ptrace to long then PTRACE_ARG3_TYPE.
3801         (regsets_store_inferior_registers): Likewise.
3802
3803 2012-04-20  Pedro Alves  <[email protected]>
3804
3805         * configure: Regenerate.
3806
3807 2012-04-19  Pedro Alves  <[email protected]>
3808
3809         * Makefile.in (GNULIB_BUILDDIR): New.
3810         (LIBGNU, INCGNU, GNULIB_H): Adjust.
3811         (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
3812         (all, install-only, uninstall, clean-info, all-lib, clean): No
3813         longer pass GNULIB_FLAGS_TO_PASS.  Use subdir_do.
3814         (maintainer-clean realclean distclean): Use subdir_do.
3815         (subdir_do): New.
3816         (gnulib/import/Makefile): Adjust.  Replace gnulib/import with
3817         $(GNULIB_BUILDDIR).  Don't pass argument to config.status.
3818         * acinclude.m4: Include acx_configure_dir.m4.
3819         * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
3820         calls.  Call AC_PROG_RANLIB.  Configure gnulib using
3821         ACX_CONFIGURE_DIR.
3822         (GNULIB): New.
3823         (GNULIB_STDINT_H): Adjust.
3824         (AC_OUTPUT): Don't output gnulib/Makefile anymore.
3825         * gdbreplay.c: Include build-gnulib/config.h.
3826         * server.h: Likewise.
3827         * aclocal.m4: Regenerate.
3828         * config.in: Regenerate.
3829         * configure: Regenerate.
3830
3831 2012-04-19  Pedro Alves  <[email protected]>
3832
3833         * Makefile.in (LIBGNU, INCGNU): Adjust.
3834         (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
3835         (all, install-only, uninstall, clean-info, all-lib, clean)
3836         (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
3837         * configure.ac: Adjust AC_OUTPUT output.
3838         * aclocal.m4: Regenerate.
3839         * configure: Regenerate.
3840
3841 2012-04-19  Pedro Alves  <[email protected]>
3842
3843         * Makefile.in (generated_files): New.
3844         (server_h): Remove the explicit dependency on config.h, and depend
3845         on $generated_files.
3846
3847 2012-04-19  Pedro Alves  <[email protected]>
3848
3849         * Makefile.in (INCGNU): Add -Ignulib.
3850
3851 2012-04-19  Pedro Alves  <[email protected]>
3852
3853         * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
3854         (INCGNU): ... this, and spell out -I here.
3855         (GNULIB_LIB): Rename to ...
3856         (LIBGNU): ... this.
3857         (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
3858
3859 2012-04-19  Pedro Alves  <[email protected]>
3860
3861         * config.in: Regenerate.
3862
3863 2012-04-19  Pedro Alves  <[email protected]>
3864
3865         * configure.ac: Remove AC_CHECK_DECLS check for memmem.
3866         * server.h (memmem): Remove declaration.
3867         * config.in: Regenerate.
3868         * configure: Regenerate.
3869
3870 2012-04-19  Yao Qi  <[email protected]>
3871
3872         * Makefile.in (SFILES): Add common/vec.c.
3873         (OBS): Add vec.o.
3874         (vec.o): New rule.
3875
3876 2012-04-19  Yao Qi  <[email protected]>
3877
3878         * remote-utils.c (prepare_resume_reply): Replace with macro
3879         target_core_of_thread.
3880         * server.c (handle_qxfer_threads_proper): Likewise.
3881         * target.h (traget_core_of_thread): New macro.
3882
3883 2012-04-18  Pedro Alves  <[email protected]>
3884
3885         * aclocal.m4: Regenerate.
3886         * configure: Regenerate.
3887
3888 2012-04-16  Yao Qi  <[email protected]>
3889
3890         * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
3891         duplicated on address.
3892
3893 2012-04-16  Yao Qi  <[email protected]>
3894
3895         * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
3896         (struct tracepoint_action_ops) <send>: New field.
3897         (m_tracepoint_action_send, r_tracepoint_action_send): New.
3898         (agent_expr_send, x_tracepoint_action_send): New.
3899         (l_tracepoint_action_send): New.
3900         (cmd_qtdp): Download and install tracepoint
3901         according to `use_agent'.
3902         (run_inferior_command): Add one more parameter `len'.
3903         Update callers.
3904         (tracepoint_send_agent): New.
3905         (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
3906
3907 2012-04-16  Yao Qi  <[email protected]>
3908
3909         * tracepoint.c (download_tracepoints): Moved to ...
3910         (cmd_qtstart): ... here.
3911
3912 2012-04-14  Yao Qi  <[email protected]>
3913
3914         * tracepoint.c: Include inttypes.h.
3915         (struct collect_memory_action): Use sized types.
3916         (struct tracepoint): Likewise.
3917         (cmd_qtdp, stop_tracing): Update print specifiers.
3918         (cmd_qtp, response_tracepoint): Likewise.
3919         (collect_data_at_tracepoint): Likewise.
3920         (collect_data_at_step): Likewise.
3921
3922 2012-04-14  Yao Qi  <[email protected]>
3923
3924         Import gnulib module inttypes.
3925         * aclocal.m4, config.in, configure: Regenerated.
3926
3927 2012-04-14  Yao Qi  <[email protected]>
3928
3929         * Makefile.in (maintainer-clean, realclean, distclean): Remove
3930         Makefile and config.status at last.
3931
3932 2012-04-13  Yao Qi  <[email protected]>
3933
3934         * tracepoint.c: Include stdint.h unconditionally.
3935
3936 2012-04-13  Thiago Jung Bauermann  <[email protected]>
3937
3938         * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
3939         on BFD_HAVE_SYS_PROCFS_TYPE.
3940         * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
3941         * configure: Regenerate.
3942         * config.in: Likewise.
3943
3944 2012-04-13  H.J. Lu  <[email protected]>
3945
3946         * Makefile.in (clean): Also remove x32.c x32-linux.c
3947         x32-avx.c x32-avx-linux.c.
3948         (x32.o): New target.
3949         (x32.c): Likewise.
3950         (x32-linux.o): Likewise.
3951         (x32-linux.c): Likewise.
3952         (x32-avx.o): Likewise.
3953         (x32-avx.c): Likewise.
3954         (x32-avx-linux.o): Likewise.
3955         (x32-avx-linux.c): Likewise.
3956
3957         * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
3958         (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
3959         (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
3960         (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
3961         (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
3962         i386/x32-avx-linux.xml.
3963
3964         * linux-x86-low.c (init_registers_x32_linux): New prototype.
3965         (init_registers_x32_avx_linux): Likwise.
3966         (x86_linux_update_xmltarget): Call init_registers_x32_linux
3967         or init_registers_x32_avx_linux if linux_is_elf64 is false.
3968
3969 2012-04-13  Pedro Alves  <[email protected]>
3970
3971         * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
3972         (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
3973         (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
3974         (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
3975         the sub-make.
3976
3977 2012-04-12  H.J. Lu  <[email protected]>
3978
3979         * linux-x86-low.c (compat_x32_clock_t): New.
3980         (compat_x32_siginfo_t): Likewise.
3981         (compat_x32_siginfo_from_siginfo): Likewise.
3982         (siginfo_from_compat_x32_siginfo): Likewise.
3983         (linux_is_elf64): Likewise.
3984         (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
3985         and siginfo_from_compat_x32_siginfo for x32.
3986         (x86_arch_setup): Set linux_is_elf64.
3987
3988 2012-04-12  H.J. Lu  <[email protected]>
3989
3990         PR gdb/13969
3991         * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
3992         e_machine field.
3993         (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
3994         * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
3995         * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
3996         compatible with process.
3997
3998 2012-04-12  Yao Qi  <[email protected]>
3999
4000         * Makefile.in: Define abs_top_srcdir and abs_srcdir.
4001         (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
4002         (install-only, install-info, clean): Handle sub dir gnulib.
4003         (all-lib, am--refresh): New targets.
4004         (memmem.o): Remove target.
4005         * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
4006         Invoke gl_EARLY.  Invoke AC_CHECK_PROGS for make.
4007         (AC_REPLACE_FUNCS): Remove memmem.
4008         Invoke gl_INIT and AM_INIT_AUTOMAKE.
4009         (AC_OUTPUT): Generate Makefile in gnulib/.
4010         * aclocal.m4, config.in, configure: Regenerated.
4011
4012 2012-04-10  Maciej W. Rozycki  <[email protected]>
4013
4014         * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
4015
4016 2012-04-05  Pedro Alves  <[email protected]>
4017
4018         -Werror=strict-aliasing
4019
4020         * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
4021         pointer.
4022
4023 2012-04-04  Pedro Alves  <[email protected]>
4024
4025         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
4026         (sparc_store_gregset_from_stack, sparc_store_gregset)
4027         (sparc_breakpoint_at): Fix formatting.
4028
4029 2012-03-30  Thiago Jung Bauermann  <[email protected]>
4030
4031         * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
4032         are available.
4033         * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
4034         [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
4035         * config.in: Regenerate.
4036         * configure: Likewise.
4037
4038 2012-03-29  Pedro Alves  <[email protected]>
4039
4040         * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
4041         Correct ptrace arguments.
4042
4043 2012-03-28  Pedro Alves  <[email protected]>
4044
4045         * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
4046         (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
4047         (IA64_FR1_REGNUM): New defines.
4048         (ia64_fetch_register): New.
4049         (the_low_target): Install it.
4050         * linux-low.h (struct linux_target_ops) <fetch_register>: New
4051         field.
4052         * linux-low.c (linux_fetch_registers): Try the
4053         the_low_target.fetch_register hook first.
4054
4055         * linux-arm-low.c (the_low_target): Adjust.
4056         * linux-bfin-low.c (the_low_target): Adjust.
4057         * linux-cris-low.c (the_low_target): Adjust.
4058         * linux-crisv32-low.c (the_low_target): Adjust.
4059         * linux-m32r-low.c (the_low_target): Adjust.
4060         * linux-m68k-low.c (the_low_target): Adjust.
4061         * linux-mips-low.c (the_low_target): Adjust.
4062         * linux-ppc-low.c (the_low_target): Adjust.
4063         * linux-s390-low.c (the_low_target): Adjust.
4064         * linux-sh-low.c (the_low_target): Adjust.
4065         * linux-sparc-low.c (the_low_target): Adjust.
4066         * linux-tic6x-low.c (the_low_target): Adjust.
4067         * linux-x86-low.c (the_low_target): Adjust.
4068         * linux-xtensa-low.c (the_low_target): Adjust.
4069
4070 2012-03-26  Pedro Alves  <[email protected]>
4071
4072         * server.c (handle_qxfer_libraries): Don't bail early if
4073         the_target->qxfer_libraries_svr4 is not NULL.
4074
4075 2012-03-26  Pedro Alves  <[email protected]>
4076
4077         * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
4078
4079 2012-03-23  Pedro Alves  <[email protected]>
4080
4081         * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
4082         "library-list-svr4" element's start tag when the the DSO list is
4083         empty.
4084
4085 2012-03-23  Pedro Alves  <[email protected]>
4086
4087         * linux-low.c (read_one_ptr): Read the inferior's pointer through
4088         a variable whose type size is the same as the inferior's pointer
4089         size.
4090
4091 2012-03-21  Thomas Schwinge  <[email protected]>
4092
4093         * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
4094         struct siginfo.
4095         * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
4096         * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4097         * linux-low.h: Include <signal.h>.
4098         (struct siginfo): Remove forward declaration.
4099         (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
4100         struct siginfo.
4101
4102 2012-03-21  Mike Frysinger  <[email protected]>
4103
4104         * .gitignore: Ignore more files.
4105
4106 2012-03-19  Pedro Alves  <[email protected]>
4107             Jan Kratochvil  <[email protected]>
4108
4109         * server.c (cont_thread, general_thread): Add describing comments.
4110         (start_inferior): Clear `cont_thread'.
4111         (handle_v_cont): Don't set `cont_thread' if resuming all threads
4112         of a process.
4113
4114 2012-03-15  Yao Qi  <[email protected]>
4115
4116         * tracepoint.c (install_tracepoint): Move duplicated tracepoint
4117         handling to ...
4118         (cmd_qtdp): ... here.
4119
4120 2012-03-15  Yao Qi  <[email protected]>
4121
4122         * tracepoint.c (struct tracepoint_action_ops): New.
4123         (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
4124         (m_tracepoint_action_download): New.
4125         (r_tracepoint_action_download): New.
4126         (x_tracepoint_action_download): New.
4127         (l_tracepoint_action_download): New.
4128         (add_tracepoint_action): Install `action->ops' according type.
4129         (download_tracepoint_1): Move code `download' function pointer
4130         of various tracepoint_action_ops.
4131
4132 2012-03-13  Jan Kratochvil  <[email protected]>
4133
4134         * linux-low.c (linux_attach_lwp_1): New variable buffer.  Call
4135         linux_ptrace_attach_warnings.
4136
4137 2012-03-13  Jan Kratochvil  <[email protected]>
4138
4139         * Makefile.in (linux-ptrace.o): New.
4140         * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
4141         (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
4142         (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
4143         (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
4144         (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
4145         of these targets.
4146         * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
4147
4148 2012-03-08  Yao Qi  <[email protected]>
4149             Pedro Alves  <[email protected]>
4150
4151         Fix PR server/13392.
4152         * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
4153         offset of JMP insn.
4154         * tracepoint.c (remove_tracepoint): New.
4155         (cmd_qtdp): Call remove_tracepoint when failed to install.
4156
4157 2012-03-07  Pedro Alves  <[email protected]>
4158
4159         * linux-low.c (get_detach_signal): New.
4160         (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
4161         Pass on pending signals to PTRACE_DETACH.  Check the result of the
4162         ptrace call.
4163         * server.c (program_signals, program_signals_p): New.
4164         (handle_general_set): Handle QProgramSignals.
4165         * server.h (program_signals, program_signals_p): Declare.
4166
4167 2012-03-05  Pedro Alves  <[email protected]>
4168             Jan Kratochvil  <[email protected]>
4169
4170         * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
4171         New comment why.
4172
4173 2012-03-03  Yao Qi  <[email protected]>
4174
4175         * tracepoint.c (tracepoint_look_up_symbols): Update call to
4176         agent_look_up_symbols.
4177
4178 2012-03-03  Yao Qi  <[email protected]>
4179
4180         * Makefile.in (linux-low.o): Keep dependence on agent.h.
4181         (linux-x86-low.o): Likewise.
4182         * server.h: Remove in_process_agent_loaded.
4183         * tracepoint.c (in_process_agent_loaded): Removed.  Moved it
4184         common/agent.c.
4185         Update callers.
4186
4187 2012-03-03  Yao Qi  <[email protected]>
4188
4189         * tracepoint.c (gdb_agent_capability): New global.
4190         (in_process_agent_loaded_ust): Renamed to
4191         `in_process_agent_supports_ust'.
4192         Update callers.
4193         (in_process_agent_supports_ust): Call agent_capability_check.
4194         (clear_installed_tracepoints): Assert that agent supports
4195         agent.
4196
4197 2012-03-03  Yao Qi  <[email protected]>
4198
4199         * linux-low.c (linux_supports_agent): New.
4200         (linux_target_ops): Initialize field `supports_agent' with
4201         linux_supports_agent.
4202         * target.h (struct target_ops) <supports_agent>: New.
4203         (target_supports_agent): New macro.
4204         * server.c (handle_general_set): Handle packet 'QAgent'.
4205         (handle_query): Send `QAgent+'.
4206         * Makefile.in (server.o): Depends on agent.h.
4207
4208 2012-03-03  Yao Qi  <[email protected]>
4209
4210         * Makefile.in (OBS): Add agent.o.
4211         Add new rule for agent.o.
4212         Track dependence of tracepoint.c on agent.h.
4213         * tracepoint.c (run_inferior_command_1):
4214         (run_inferior_command): Call agent_run_command.
4215         (gdb_ust_connect_sync_socket): Deleted.  Move it to
4216         common/agent.c.
4217         (resume_thread, stop_thread): Likewise.
4218         (gdb_ust_socket_init): Renamed to ...
4219         (gdb_agent_socket_init): ... New.
4220         (gdb_ust_thread): Renamed to ...
4221         (gdb_agent_helper_thread): ... New.
4222         (gdb_ust_init): Move some code to ...
4223         (gdb_agent_init): ... here.  New.
4224         [HAVE_UST]: Call gdb_ust_init.
4225         (initialize_tracepoint_ftlib):  Call gdb_agent_init.
4226         * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
4227         * config.in, configure: Regenerated.
4228
4229 2012-03-02  Pedro Alves  <[email protected]>
4230
4231         * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
4232         * linux-low.c (struct simple_pid_list): New.
4233         (stopped_pids): New a struct simple_pid_list pointer.
4234         (add_to_pid_list, pull_pid_from_list): New.
4235         (handle_extended_wait): Don't assume the first signal new children
4236         report is SIGSTOP.  Adjust call to pull_pid_from_list.
4237         (linux_wait_for_lwp): Adjust.
4238
4239 2012-03-02  Yao Qi  <[email protected]>
4240
4241         * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
4242         debug log.
4243
4244 2012-03-02  Yao Qi  <[email protected]>
4245
4246         * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
4247         `stop_pc' and `tpoint'.  Update caller.
4248
4249 2012-03-01  Maciej W. Rozycki  <[email protected]>
4250
4251         * linux-low.h (linux_target_ops): Add regset_bitmap member.
4252         * linux-low.c (use_linux_regsets): New macro.
4253         [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
4254         [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
4255         (linux_register_in_regsets): New function.
4256         (usr_fetch_inferior_registers): Skip registers covered by
4257         regsets.
4258         (usr_store_inferior_registers): Likewise.
4259         (usr_fetch_inferior_registers): New macro.
4260         (usr_store_inferior_registers): Likewise.
4261         (linux_fetch_registers): Handle mixed regset/non-regset targets.
4262         (linux_store_registers): Likewise.
4263         * linux-mips-low.c (init_registers_mips_dsp_linux): New
4264         prototype.
4265         (init_registers_mips64_dsp_linux): Likewise.
4266         (init_registers_mips_linux): New macro.
4267         (init_registers_mips_dsp_linux): Likewise.
4268         (mips_dsp_num_regs): Likewise.
4269         (DSP_BASE, DSP_CONTROL): New fallback macros.
4270         (mips_base_regs): New macro.
4271         (mips_regmap): Use it.  Fix the size.
4272         (mips_dsp_regmap): New variable.
4273         (mips_dsp_regset_bitmap): Likewise.
4274         (mips_arch_setup): New function.
4275         (mips_cannot_fetch_register): Use the_low_target.regmap rather
4276         than mips_regmap.
4277         (mips_cannot_store_register): Likewise.
4278         (the_low_target): Update .arch_setup, .num_regs and .regmap
4279         initializers.  Add .regset_bitmap initializer.
4280         * linux-arm-low.c (the_low_target): Add .regset_bitmap
4281         initializer.
4282         * linux-bfin-low.c (the_low_target): Likewise.
4283         * linux-cris-low.c (the_low_target): Likewise.
4284         * linux-crisv32-low.c (the_low_target): Likewise.
4285         * linux-ia64-low.c (the_low_target): Likewise.
4286         * linux-m32r-low.c (the_low_target): Likewise.
4287         * linux-m68k-low.c (the_low_target): Likewise.
4288         * linux-ppc-low.c (the_low_target): Likewise.
4289         * linux-s390-low.c (the_low_target): Likewise.
4290         * linux-sh-low.c (the_low_target): Likewise.
4291         * linux-sparc-low.c (the_low_target): Likewise.
4292         * linux-tic6x-low.c (the_low_target): Likewise.
4293         * linux-x86-low.c (the_low_target): Likewise.
4294         * linux-xtensa-low.c (the_low_target): Likewise.
4295         * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4296         mips64-dsp-linux.o to srv_regobj.  Add mips-dsp-linux.xml,
4297         mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4298         srv_xmlfiles.
4299         * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4300         (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4301
4302 2012-02-29  Yao Qi  <[email protected]>
4303             Pedro Alves  <[email protected]>
4304
4305         * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4306         `step_over_finished' is true.
4307
4308 2012-02-27  Pedro Alves  <[email protected]>
4309
4310         * linux-low.c (pid_is_stopped): Delete, moved to common/.
4311         (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4312
4313 2012-02-27  Pedro Alves  <[email protected]>
4314
4315         PR server/9684
4316         * linux-low.c (pid_is_stopped): New.
4317         (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4318
4319 2012-02-25  Luis Machado  <[email protected]>
4320
4321         * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4322         of conditions.
4323
4324 2012-02-24  Maciej W. Rozycki  <[email protected]>
4325
4326         * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4327
4328 2012-02-24  Luis Machado  <lgustavo@codesourcery>
4329
4330         * server.c (handle_query): Advertise support for target-side
4331         breakpoint condition evaluation.
4332         (process_point_options): New function.
4333         (process_serial_event): When inserting a breakpoint, check for
4334         a target-side condition that should be evaluated.
4335
4336         * mem-break.c: Include regcache.h and ax.h.
4337         (point_cond_list_t): New data structure.
4338         (breakpoint) <cond_list>: New field.
4339         (find_gdb_breakpoint_at): Make non-static.
4340         (delete_gdb_breakpoint_at): Clear any target-side
4341         conditions.
4342         (clear_gdb_breakpoint_conditions): New function.
4343         (add_condition_to_breakpoint): Likewise.
4344         (add_breakpoint_condition): Likewise.
4345         (gdb_condition_true_at_breakpoint): Likewise.
4346         (gdb_breakpoint_here): Return result directly instead
4347         of going through a local variable.
4348
4349         * mem-break.h (find_gdb_breakpoint_at): New prototype.
4350         (clear_gdb_breakpoint_conditions): Likewise.
4351         (add_breakpoint_condition): Likewise.
4352         (gdb_condition_true_at_breakpoint): Likewise.
4353
4354         * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4355         (need_step_over_p): Take target-side breakpoint condition into
4356         consideration.
4357
4358 2012-02-24  Luis Machado  <lgustavo@codesourcery>
4359
4360         * server.h: Include tracepoint.h.
4361         (agent_mem_read, agent_get_trace_state_variable_value,
4362         agent_set_trace_state_variable_value,
4363         agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4364         get_set_tsv_func_addr): New prototypes.
4365
4366         * ax.h: New include file.
4367         * ax.c: New source file.
4368
4369         * tracepoint.c: Include ax.h.
4370         (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4371         agent_expr, eval_result_type): Move to ax.h.
4372         (parse_agent_expr): Rename to ...
4373         (gdb_parse_agent_expr): ... this, make it non-static and move
4374         to ax.h.
4375         (unparse_agent_expr) Rename to ...
4376         (gdb_unparse_agent_expr): ... this, make it non-static and move
4377         to ax.h.
4378         (eval_agent_expr): Rename to ...
4379         (eval_tracepoint_agent_expr): ... this.
4380         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4381         forward declarations.
4382         (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4383         (agent_get_trace_state_variable_value): New function.
4384         (agent_set_trace_state_variable_value): New function.
4385         (cmd_qtdp): Call gdb_parse_agent_expr (...).
4386         (response_tracepoint): Call gdb_unparse_agent_expr (...).
4387         (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4388         (condition_true_at_tracepoint): Likewise.
4389         (parse_agent_expr): Rename to ...
4390         (gdb_parse_agent_expr): ... this and move to ax.c.
4391         (unparse_agent_expr): Rename to ...
4392         (gdb_unparse_agent_expr): ... this and move to ax.c.
4393         (gdb_agent_op_name): Move to ax.c.
4394         (eval_agent_expr): Rename to ...
4395         (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4396         and move to ax.c.
4397         (eval_tracepoint_agent_expr): New function.
4398         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
4399         non-static.
4400         (current_insn_ptr, emit_error, struct bytecode_address): Move to
4401         ax.c.
4402         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4403         emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4404         emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4405         emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4406         emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4407         emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4408         emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4409         emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4410         (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4411         (compile_bytecodes): Remove forward declaration.
4412         (is_goto_target): Move to ax.c.
4413         (compile_bytecodes): Move to ax.c and call
4414         agent_get_trace_state_variable_value (...) and
4415         agent_set_trace_state_variable_value (...).
4416
4417         * Makefile.in: Update ax.c and IPA dependencies.
4418
4419 2012-02-24  Pedro Alves  <[email protected]>
4420
4421         * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4422         (cmd_bigqtbuffer_circular): ... this.  Only handle
4423         'QTBuffer:circular:'.
4424         (handle_tracepoint_general_set): Adjust.
4425
4426 2012-02-16  Yao Qi  <[email protected]>
4427
4428         * inferiors.c: Move code to ...
4429         * dll.c: .... here.  New.
4430         * server.h: Declare clear_dlls.
4431         * Makefile.in (SFILES): Add dll.c.
4432         (OBS): Add dll.o
4433         (dll.o): New rule.
4434
4435 2012-02-11  Yao Qi  <[email protected]>
4436
4437         * server.c: (handle_monitor_command): Add a new parameter
4438         `own_buf'.
4439         (handle_query): Update caller.
4440
4441 2012-02-09  Joel Brobecker  <[email protected]>
4442
4443         * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4444         * configure, config.in: Regenerate.
4445         * hostio.c: Provide an alternate implementation if HAVE_READLINK
4446         is not defined.
4447
4448 2012-02-02  Pedro Alves  <[email protected]>
4449
4450         Try SIGKILL first, then PTRACE_KILL.
4451         * linux-low.c (linux_kill_one_lwp): New.
4452         (linux_kill_one_lwp): Rename to ...
4453         (kill_one_lwp_callback): ... this.  Use the new
4454         linux_kill_one_lwp.
4455
4456 2012-02-02  Pedro Alves  <[email protected]>
4457
4458         * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4459         inferior.
4460
4461 2012-01-27  Pedro Alves  <[email protected]>
4462
4463         * linux-low.c (linux_child_pid_to_exec_file): Delete.
4464         (elf_64_file_p): Make static.
4465         (linux_pid_exe_is_elf_64_file): New.
4466         * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4467         Delete declarations.
4468         (linux_pid_exe_is_elf_64_file): Declare.
4469         * linux-x86-low.c (x86_arch_setup): Use
4470         linux_pid_exe_is_elf_64_file.
4471
4472 2012-01-25  Jan Kratochvil  <[email protected]>
4473
4474         * linux-low.c (linux_wait_for_event_1): Rename to ...
4475         (linux_wait_for_event): ... here and merge it with former
4476         linux_wait_for_event - new variable wait_ptid, use it.
4477         (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4478
4479 2012-01-23  Pedro Alves  <[email protected]>
4480
4481         * server.c (main): Avoid yet another case of infinite loop while
4482         detaching/killing after a longjmp.
4483
4484 2012-01-20  Jan Kratochvil  <[email protected]>
4485
4486         Code cleanup.
4487         * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4488
4489 2012-01-20  Ulrich Weigand  <[email protected]>
4490
4491         * hostio.c (handle_readlink): New function.
4492         (handle_vFile): Call it to handle "vFile:readlink" packets.
4493
4494 2012-01-20  Pedro Alves  <[email protected]>
4495             Ulrich Weigand  <[email protected]>
4496
4497         * server.c (handle_v_requests): Only support vAttach and vRun to
4498         start multiple processes when in extended protocol mode.
4499
4500 2012-01-17  Pedro Alves  <[email protected]>
4501
4502         * tracepoint.c (initialize_tracepoint): Use mmap instead of
4503         memalign plus mprotect to allocate the scratch buffer.
4504
4505 2012-01-13  Pedro Alves  <[email protected]>
4506
4507         * server.c (attach_inferior): Clear `cont_thread'.
4508
4509 2012-01-13  Pedro Alves  <[email protected]>
4510
4511         * server.c (main): Avoid infinite loop while detaching/killing
4512         after a longjmp.
4513
4514 2012-01-09  Doug Evans  <[email protected]>
4515
4516         * server.c (start_inferior): Set last_ptid in --wrapper case.
4517
4518 2012-01-06  Yao Qi  <[email protected]>
4519
4520         * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4521         defined.
4522         [IN_PROCESS_AGENT] (debug_agent): New global variable.
4523
4524 2012-01-04  Yao Qi  <[email protected]>
4525
4526         * tracepoint.c (cmd_qtdp): Print debug message
4527         for static tracepoint.
4528
4529 2012-01-04  Yao Qi  <[email protected]>
4530
4531         * tracepoint.c (trace_vdebug): Differentiate debug message
4532         between gdbserver and IPA.
4533
4534 2012-01-03  Yao Qi  <[email protected]>
4535
4536         * tracepoint.c (tracepoint_was_hit): Don't collect for
4537         static tracepoint.
4538
4539 2012-01-02  Joel Brobecker  <[email protected]>
4540
4541         * terminal.h: Reformat copyright header.
4542
4543 2012-01-02  Joel Brobecker  <[email protected]>
4544
4545         * server.c (gdbserver_version): Update copyright year.
4546         * gdbreplay.c (gdbreplay_version): Likewise.
4547
4548 2011-12-18  Jan Kratochvil  <[email protected]>
4549
4550         * linux-low.c (linux_create_inferior): Put empty if clause for write.
4551
4552         Revert:
4553         2011-12-18  Hui Zhu  <[email protected]>
4554         * linux-low.c (linux_create_inferior): Save return value to ret.
4555
4556 2011-12-18  Hui Zhu  <[email protected]>
4557
4558         * linux-low.c (linux_create_inferior): Save return value to ret.
4559
4560 2011-12-16  Doug Evans  <[email protected]>
4561
4562         * linux-low.c (linux_create_inferior): If stdio connection,
4563         redirect stdin from /dev/null, stdout to stderr.
4564         * remote-utils.c (remote_is_stdio): New static global.
4565         (remote_connection_is_stdio): New function.
4566         (remote_prepare): Handle stdio connection.
4567         (remote_open): Ditto.
4568         (remote_close): Don't close stdin for stdio connections.
4569         (read_prim,write_prim): New functions.  Replace all calls to
4570         read/write to these.
4571         * server.c (main): Watch for "-" argument.  Move call to
4572         remote_prepare before start_inferior.
4573         * server.h (STDIO_CONNECTION_NAME): New macro.
4574         (remote_connection_is_stdio): Declare.
4575
4576         * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4577         in debugging output.
4578
4579 2011-12-15  Yao Qi  <[email protected]>
4580
4581         * tracepoint.c: Include sys/syscall.h.
4582         (gdb_ust_thread): Remove preprocessor conditional.
4583
4584 2011-12-14  Pedro Alves  <[email protected]>
4585
4586         * linux-low.c (linux_detach_one_lwp): Call
4587         the_low_target.prepare_to_resume before detaching.
4588
4589 2011-12-14  Yao Qi  <[email protected]>
4590
4591         * tracepoint.c (gdb_ust_thread): Don't ignore return value
4592         of write.
4593
4594 2011-12-14  Yao Qi  <[email protected]>
4595
4596         * i386-low.c (i386_low_stopped_data_address): Initialize local
4597         variable `control'.
4598
4599 2011-12-13  Pedro Alves  <[email protected]>
4600
4601         PR remote/13492
4602
4603         * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4604         DR_CONTROL unless necessary.  Extend comments.
4605         * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4606         DR0-3 if not used.  If any watchpoint was set, clear DR_STATUS.
4607
4608 2011-12-13  Yao Qi  <[email protected]>
4609
4610         * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
4611         macros.
4612         (upload_fast_traceframes, upload_fast_traceframes): Likewise.
4613
4614 2011-12-08  Jan Kratochvil  <[email protected]>
4615
4616         * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
4617         Print new debug message for such case.
4618
4619 2011-12-06  Jan Kratochvil  <[email protected]>
4620
4621         Fix overlapping memcpy.
4622         * mem-break.c (set_raw_breakpoint_at): New variable buf.  Use it for
4623         the read_inferior_memory transfer.
4624         (delete_fast_tracepoint_jump): New variable buf.  Use it for the
4625         write_inferior_memory transfer.
4626         (set_fast_tracepoint_jump): New variable buf.  Use it for the
4627         read_inferior_memory and write_inferior_memory transfers.
4628         (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
4629         (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
4630         Use it for the write_inferior_memory transfer.
4631         (check_mem_read, check_mem_write): New gdb_asserts for overlapping
4632         buffers.
4633
4634 2011-12-06  Maciej W. Rozycki  <[email protected]>
4635
4636         * linux-low.c (fetch_register, store_register): Make code
4637         consistent, fix formatting.
4638
4639 2011-12-06  Maciej W. Rozycki  <[email protected]>
4640
4641         * linux-low.c (usr_store_inferior_registers): Factor out code
4642         to handle individual registers into...
4643         (store_register): ... this new function.
4644
4645 2011-12-06  Ulrich Weigand  <[email protected]>
4646
4647         * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
4648         (s390-linux32v2.o, s390-linux32v2.c): Likewise.
4649         (s390-linux64v1.o, s390-linux64v1.c): Likewise.
4650         (s390-linux64v2.o, s390-linux64v2.c): Likewise.
4651         (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
4652         (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
4653         * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
4654         (srv_xmlfiles): Add new XML files.
4655
4656         * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
4657         and <sys/uio.h>.
4658         (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
4659         (init_registers_s390_linux32v1): Add prototype.
4660         (init_registers_s390_linux32v2): Likewise.
4661         (init_registers_s390_linux64v1): Likewise.
4662         (init_registers_s390_linux64v2): Likewise.
4663         (init_registers_s390x_linux64v1): Likewise.
4664         (init_registers_s390x_linux64v2): Likewise.
4665         (s390_num_regs): Increment to 52.
4666         (s390_regmap): Add orig_r2 register.
4667         (s390_num_regs_3264): Increment to 68.
4668         (s390_regmap_3264): Add orig_r2 register.
4669         (s390_collect_ptrace_register): Handle orig_r2 register.
4670         (s390_supply_ptrace_register): Likewise.
4671         (s390_fill_last_break): New function.
4672         (s390_store_last_break): Likewise.
4673         (s390_fill_system_call): New function.
4674         (s390_store_system_call): Likewise.
4675         (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
4676         register sets.
4677         (s390_check_regset): New function.
4678         (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
4679         NT_S390_SYSTEM_CALL regsets and use appropriate description.
4680         Update target_regsets for available register sets.
4681
4682 2011-12-02  Paul Pluzhnikov  <[email protected]>
4683             Jan Kratochvil  <[email protected]>
4684
4685         * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
4686         (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
4687         New.
4688         (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
4689         * linux-low.h (struct process_info_private): New member r_debug.
4690         * server.c (handle_qxfer_libraries): Call
4691         the_target->qxfer_libraries_svr4.
4692         (handle_qxfer_libraries_svr4): New function.
4693         (qxfer_packets): New entry "libraries-svr4".
4694         (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
4695         * target.h (struct target_ops): New member qxfer_libraries_svr4.
4696         * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
4697         PACKET_qXfer_libraries_svr4.
4698
4699 2011-11-30  Ulrich Weigand  <[email protected]>
4700
4701         * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
4702         PSW address/mask between 8-byte and 16-byte formats.
4703         (s390_supply_ptrace_register): Likewise.
4704         (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
4705         basic addressing mode bit.
4706
4707 2011-11-24  Stan Shebs  <[email protected]>
4708
4709         * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
4710
4711 2011-11-17  Stan Shebs  <[email protected]>
4712
4713         * tracepoint.c (struct tracepoint): New field traceframe_usage.
4714         (tracing_start_time): New global.
4715         (tracing_stop_time): New global.
4716         (tracing_user_name): New global.
4717         (tracing_notes): New global.
4718         (tracing_stop_note): New global.
4719         (cmd_qtstart): Set traceframe_usage, start_time.
4720         (stop_tracing): Set stop_time.
4721         (cmd_qtstatus): Report additional status.
4722         (cmd_qtp): New function.
4723         (handle_tracepoint_query): Call it.
4724         (cmd_qtnotes): New function.
4725         (handle_tracepoint_general_set): Call it.
4726         (get_timestamp): Rename from tsv_get_timestamp.
4727
4728 2011-11-14  Stan Shebs  <[email protected]>
4729             Kwok Cheung Yeung  <[email protected]>
4730
4731         * linux-x86-low.c (small_jump_insn): New.
4732         (i386_install_fast_tracepoint_jump_pad): Add arguments for
4733         trampoline and error message, build a trampoline and issue a small
4734         jump instruction to it.
4735         (x86_install_fast_tracepoint_jump_pad): Add arguments for
4736         trampoline and error message.
4737         (x86_get_min_fast_tracepoint_insn_len): New.
4738         (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
4739         * linux-low.h (struct linux_target_ops): Add arguments to
4740         install_fast_tracepoint_jump_pad operation, add new operation.
4741         * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
4742         arguments.
4743         (linux_get_min_fast_tracepoint_insn_len): New function.
4744         (linux_target_op): Add new operation.
4745         * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
4746         (gdb_trampoline_buffer_end): Ditto.
4747         (gdb_trampoline_buffer_error): Ditto.
4748         (struct ipa_sym_addresses): Add fields for new IPA variables.
4749         (symbol_list): Add entries for new IPA variables.
4750         (struct tracepoint): Add fields to hold the address range of the
4751         trampoline used by the tracepoint.
4752         (trampoline_buffer_head): New static variable.
4753         (trampoline_buffer_tail): Ditto.
4754         (claim_trampoline_space): New function.
4755         (have_fast_tracepoint_trampoline_buffer): New function.
4756         (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
4757         structure.
4758         (install_fast_tracepoint): Ditto, also add error buffer argument.
4759         (cmd_qtminftpilen): New function.
4760         (handle_tracepoint_query): Add response to qTMinFTPILen packet.
4761         (fast_tracepoint_from_trampoline_address): New function.
4762         (fast_tracepoint_collecting): Handle trampoline as part of jump
4763         pad space.
4764         (set_trampoline_buffer_space): New function.
4765         (initialize_tracepoint): Initialize new IPA variables.
4766         * target.h (struct target_ops): Add arguments to
4767         install_fast_tracepoint_jump_pad operation, add new
4768         get_min_fast_tracepoint_insn_len operation.
4769         (target_get_min_fast_tracepoint_insn_len): New.
4770         (install_fast_tracepoint_jump_pad): Add arguments.
4771         * server.h (IPA_BUFSIZ): Define.
4772         * linux-i386-ipa.c: Include extra header files.
4773         (initialize_fast_tracepoint_trampoline_buffer): New function.
4774         (initialize_low_tracepoint): Call it.
4775         * server.h (set_trampoline_buffer_space): Declare.
4776         (claim_trampoline_space): Ditto.
4777         (have_fast_tracepoint_trampoline_buffer): Ditto.
4778
4779 2011-11-14  Yao Qi  <[email protected]>
4780
4781         * server.c (handle_query): Handle InstallInTrace for qSupported.
4782         * tracepoint.c (add_tracepoint): Sort list.
4783         (install_tracepoint, download_tracepoint): New.
4784         (cmd_qtdp): Call them to install and download tracepoints.
4785         (sort_tracepoints): Removed.
4786         (cmd_qtstart): Update.
4787
4788 2011-11-14  Yao Qi  <[email protected]>
4789
4790         * mem-break.c (inc_ref_fast_tracepoint_jump): New.
4791         * mem-break.h: Declare.
4792         * tracepoint.c (cmd_qtstart): Move some code to ...
4793         (clone_fast_tracepoint, install_fast_tracepoint): ... here.
4794         New.
4795         (download_tracepoints): Move some code to ...
4796         (download_tracepoint_1): ... here.  New.
4797
4798 2011-11-08  Yao Qi  <[email protected]>
4799
4800         * remote-utils.c (relocate_instruction): A comment fix.
4801
4802 2011-11-07  Joel Brobecker  <[email protected]>
4803
4804         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
4805         (i386_dr_low_get_control, i386_dr_low_get_status): Use
4806         dr_status_mirror and dr_control_mirror from debug_reg_state.
4807         (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
4808         (i386_initial_stuff): Remove use of deleted globals.
4809         (i386_get_thread_context, i386_set_thread_context,
4810         i386_thread_added): Use dr_status_mirror and dr_control_mirror
4811         from debug_reg_state.
4812
4813 2011-11-05  Yao Qi  <[email protected]>
4814
4815         * tracepoint.c (gdb_collect): Loop over tracepoints of same
4816         address as TPOINT's.
4817
4818 2011-11-02  Stan Shebs  <[email protected]>
4819
4820         * tracepoint.c (agent_mem_read_string): New function.
4821         (eval_agent_expr): Call it for tracenz.
4822         * server.c (handle_query): Report support for tracenz.
4823
4824 2011-11-02  Yao Qi  <[email protected]>
4825
4826         * tracepoint.c (cmd_qtstart): Remove unused local variables.
4827
4828 2011-11-02  Yao Qi  <[email protected]>
4829
4830         * target.h: Fix a typo in comment.
4831
4832 2011-10-31  Pedro Alves  <[email protected]>
4833
4834         * mem-break.c (check_mem_write): Add `myaddr' parameter.  Don't
4835         clobber the breakpoints' shadows with fast tracepoint jumps.
4836         * mem-break.h (check_mem_write): Add `myaddr' parameter.
4837         * target.c (write_inferior_memory): Also pass MYADDR down to
4838         check_mem_write.
4839
4840 2011-10-07  Ulrich Weigand  <[email protected]>
4841
4842         * configure.ac: Check support for personality routine.
4843         * configure: Regenerate.
4844         * config.in: Likewise.
4845         * linux-low.c: Include <sys/personality.h>.
4846         Define ADDR_NO_RANDOMIZE if necessary.
4847         (linux_create_inferior): Disable address space randomization when
4848         forking inferior, if requested.
4849         (linux_supports_disable_randomization): New function.
4850         (linux_target_ops): Install it.
4851         * server.h (disable_randomization): Declare.
4852         * server.c (disable_randomization): New global variable.
4853         (handle_general_set): Handle QDisableRandomization.
4854         (handle_query): Likewise for qSupported.
4855         (main): Support --disable-randomization and --no-disable-randomization
4856         command line arguments.
4857         * target.h (struct target_ops): Add supports_disable_randomization.
4858         (target_supports_disable_randomization): New macro.
4859
4860 2011-09-29  Mike Frysinger  <[email protected]>
4861
4862         * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
4863         ifdef check.
4864         [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
4865         [!PT_GETDSBT] (target_loadmap): New definition.
4866         (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
4867         (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
4868         LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
4869         and PT_GETDSBT to LINUX_LOADMAP.
4870         [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
4871         (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
4872
4873 2011-09-21  Ulrich Weigand  <[email protected]>
4874
4875         * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
4876         (arm_linux_hwbp_cap): New static variable.
4877         (arm_linux_get_hwbp_cap): Replace by ...
4878         (arm_linux_init_hwbp_cap): ... this new function.
4879         (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
4880         (arm_linux_get_hw_watchpoint_count): Likewise.
4881         (arm_linux_get_hw_watchpoint_max_length): Likewise.
4882         (arm_arch_setup): Call arm_linux_init_hwbp_cap.
4883         (arm_prepare_to_resume): Use perror_with_name instead of error.
4884
4885 2011-09-21  Ulrich Weigand  <[email protected]>
4886
4887         * linux-arm-low.c: Include <signal.h>.
4888         (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
4889         (struct arm_linux_hwbp_cap): New data type.
4890         (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
4891         (struct arm_linux_hw_breakpoint): New data type.
4892         (MAX_BPTS, MAX_WPTS): Define.
4893         (struct arch_process_info, struct arch_lwp_info): New data types.
4894         (arm_linux_get_hwbp_cap): New function.
4895         (arm_linux_get_hw_breakpoint_count): Likewise.
4896         (arm_linux_get_hw_watchpoint_count): Likewise.
4897         (arm_linux_get_hw_watchpoint_max_length): Likewise.
4898         (arm_hwbp_control_initialize): Likewise.
4899         (arm_hwbp_control_is_enabled): Likewise.
4900         (arm_hwbp_control_is_initialized): Likewise.
4901         (arm_hwbp_control_disable): Likewise.
4902         (arm_linux_hw_breakpoint_equal): Likewise.
4903         (arm_linux_hw_point_initialize): Likewise.
4904         (struct update_registers_data): New data structure.
4905         (update_registers_callback: New function.
4906         (arm_insert_point): Likewise.
4907         (arm_remove_point): Likewise.
4908         (arm_stopped_by_watchpoint): Likewise.
4909         (arm_stopped_data_address): Likewise.
4910         (arm_new_process): Likewise.
4911         (arm_new_thread): Likewise.
4912         (arm_prepare_to_resume): Likewise.
4913         (the_low_target): Register arm_insert_point, arm_remove_point,
4914         arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
4915         arm_new_thread, and arm_prepare_to_resume.
4916
4917 2011-09-15  Stan Shebs  <[email protected]>
4918
4919         * server.h (struct emit_ops): Add compare-goto fields.
4920         * tracepoint.c (gdb_agent_op_sizes): New table.
4921         (emit_eq_goto): New function.
4922         (emit_ne_goto): New function.
4923         (emit_lt_goto): New function.
4924         (emit_le_goto): New function.
4925         (emit_gt_goto): New function.
4926         (emit_ge_goto): New function.
4927         (is_goto_target): New function.
4928         (compile_bytecodes): Recognize special cases of compare-goto
4929         combinations and call specialized emitters for them.
4930         * linux-x86-low.c (amd64_emit_eq_goto): New function.
4931         (amd64_emit_ne_goto): New function.
4932         (amd64_emit_lt_goto): New function.
4933         (amd64_emit_le_goto): New function.
4934         (amd64_emit_gt_goto): New function.
4935         (amd64_emit_ge_goto): New function.
4936         (amd64_emit_ops): Add the new functions.
4937         (i386_emit_eq_goto): New function.
4938         (i386_emit_ne_goto): New function.
4939         (i386_emit_lt_goto): New function.
4940         (i386_emit_le_goto): New function.
4941         (i386_emit_gt_goto): New function.
4942         (i386_emit_ge_goto): New function.
4943         (i386_emit_ops): Add the new functions.
4944
4945 2011-09-08  Stan Shebs  <[email protected]>
4946
4947         * linux-x86-low.c (i386_emit_prologue): Save %ebx.
4948         (i386_emit_epilogue): Restore %ebx.
4949
4950 2011-08-31  Jie Zhang  <[email protected]>
4951
4952         * server.c (step_thread): Remove definition.
4953         (process_serial_event): Don't handle Hs.
4954         * server.h (step_thread): Remove declaration.
4955         * target.c (set_desired_inferior): Remove use of step_thread.
4956
4957 2011-08-24  Luis Machado  <[email protected]>
4958
4959         * linux-low.c: Include linux-procfs.h.
4960         (linux_attach_lwp_1): Update comments.
4961         (linux_attach): Scan for existing threads when attaching to a
4962         process that is the tgid.
4963         * Makefile.in: Update dependencies.
4964
4965 2011-08-24  Luis Machado  <[email protected]>
4966
4967         * configure.srv: Add linux-procfs.o dependencies.
4968
4969 2011-08-14  Yao Qi  <[email protected]>
4970
4971         * target.h (struct target_ops): Fix indent.
4972         * win32-low.c (win32_target_ops): Fix comment.
4973
4974 2011-08-14  Andrew Jenner  <[email protected]>
4975             Yao Qi  <[email protected]>
4976
4977         * Makefile.in (clean): Remove tic6x-*.c files.
4978         (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
4979         (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
4980         (tic6x-c64xp-linux.c): Likewise.
4981         * configure.srv: Add support for tic6x-*-uclinux.
4982         * linux-tic6x-low.c: New.
4983         * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
4984
4985 2011-08-14  Andrew Stubbs <[email protected]>
4986             Yao Qi  <[email protected]>
4987
4988         * target.h (struct target_ops): Add read_loadmap.
4989         * linux-low.c (struct target_loadseg): New type.
4990         (struct target_loadmap): New type.
4991         (linux_read_loadmap): New function.
4992         (linux_target_ops): Add linux_read_loadmap.
4993         * server.c (handle_query): Support qXfer:fdpic:read packet.
4994         * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
4995         to NULL.
4996
4997 2011-08-05  Eli Zaretskii  <[email protected]>
4998
4999         * win32-low.c: Include <stdint.h>.
5000
5001 2011-07-22  Pedro Alves  <[email protected]>
5002
5003         * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
5004         to the inferior here.
5005         (i386_remove_aligned_watchpoint): Ditto.
5006         (i386_handle_nonaligned_watchpoint): Return immediate on fail to
5007         fit part of the watchpoint in the debug registers.
5008         (i386_update_inferior_debug_regs): New.
5009         (i386_low_insert_watchpoint): Work on a local mirror of the debug
5010         registers, and only update the inferior on success.
5011         (i386_low_remove_watchpoint): Ditto.
5012
5013 2011-07-22  Kwok Cheung Yeung  <[email protected]>
5014
5015         * linux-low.c (compare_ints, unique, list_threads, show_process,
5016         linux_core_of_thread): Delete.
5017         (linux_target_ops): Change linux_core_of_thread to
5018         linux_common_core_of_thread.
5019         (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
5020         * utils.c (malloc_failure): Change type of argument.
5021         (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
5022         * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
5023         common/linux-osdata.c, common/ptid.c and common/buffer.c.
5024         (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
5025         (IPA_OBJS): Add common-utils-ipa.o.
5026         (ptid_h, linux_osdata_h): New macros.
5027         (server_h): Add common/common-utils.h, common/xml-utils.h,
5028         common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
5029         common/ptid.h.
5030         (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
5031         ptid.o, buffer.o): New rules.
5032         (linux-low.o): Add common/linux-osdata.h as a dependency.
5033         * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
5034         * configure.ac: Add AC_HEADER_DIRENT check.
5035         * config.in: Regenerate.
5036         * configure: Regenerate.
5037         * remote-utils.c (xml_escape_text): Delete.
5038         (buffer_grow, buffer_free, buffer_init, buffer_finish,
5039         buffer_xml_printf): Move to common/buffer.c.
5040         * server.c (main): Remove call to initialize_inferiors.
5041         * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
5042         ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
5043         ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
5044         internal_error, gdb_assert, gdb_assert_fail): Delete.
5045         (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
5046         buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
5047         common/buffer.h.
5048         * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
5049         ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
5050         initialize_inferiors): Delete.
5051
5052 2011-07-20  Pedro Alves  <[email protected]>
5053
5054         * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
5055         symbol error.
5056
5057 2011-05-31  Pedro Alves  <[email protected]>
5058
5059         * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
5060         assertion.
5061         * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
5062
5063 2011-05-26  Yao Qi  <[email protected]>
5064
5065         * Makefile.in (thread-db.o): Track dependence to
5066         common/gdb_thread_db.h.
5067         * thread-db.c: include gdb_thread_db.h from right place.
5068
5069 2011-05-16  Adrian Cornish  <[email protected]>
5070
5071         * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
5072         __FILE__ and __LINE__ to internal_error.
5073
5074 2011-05-13  Doug Evans  <[email protected]>
5075
5076         * thread-db.c (try_thread_db_load_from_sdir): New function.
5077         (try_thread_db_load_from_dir): New function.
5078         (thread_db_load_search): Handle $sdir, ignore $pdir.
5079         Remove trying of system directories if search of
5080         libthread-db-search-path fails, that is now done via $sdir.
5081
5082 2011-05-12  Kwok Cheung Yeung  <[email protected]>
5083
5084         * server.c (handle_query): Add EnableDisableTracepoints to the list
5085         of supported features.
5086         * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
5087         tracepoints.
5088         (cmd_qtenable_disable): New.
5089         (cmd_qtstart): Install tracepoints even if disabled.
5090         (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
5091         receiving a QTEnable or QTDisable packet.
5092         (gdb_collect): Skip data collection if fast tracepoint is disabled.
5093         (ust_marker_to_static_tracepoint): Do not ignore disabled static
5094         tracepoints.
5095         (gdb_probe): Skip data collection if static tracepoint is disabled.
5096
5097 2011-05-10  Doug Evans  <[email protected]>
5098
5099         * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
5100
5101 2011-05-04  Doug Evans  <[email protected]>
5102
5103         * linux-low.c (linux_join): Skip process lookup.
5104         * spu-low.c (spu_join): Ditto.
5105         * server.c (join_inferiors_callback): Delete.
5106         (process_serial_event): For 'D' packet (detach) call join_inferior
5107         directly.
5108
5109 2011-05-04  Joseph Myers  <[email protected]>
5110
5111         * README: Don't mention xscale*-*-linux*.
5112         * configure.srv (xscale*-*-linux*): Don't handle target.
5113
5114 2011-04-27  Nathan Froyd  <[email protected]>
5115
5116         * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
5117         casting pointers.
5118         (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
5119         (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
5120         (i386_emit_void_call_2): Likewise.
5121
5122 2011-04-26  Yao Qi  <[email protected]>
5123
5124         * linux-low.c: Move common macros to linux-ptrace.h.
5125         Include linux-ptrace.h.
5126         * Makefile.in (linux_ptrace_h): New.
5127         (linux-low.o): Depends on linux-ptrace.h.
5128
5129 2011-04-24  Jan Kratochvil  <[email protected]>
5130
5131         * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
5132         RUN_ONCE.  Comment for the LISTEN_DESC delete_file_handler call.
5133         (remote_prepare): New function with most of the TCP code from ...
5134         (remote_open): ... here.  Detect PORT here unconditionally.  Move also
5135         setting transport_is_reliable.
5136         * server.c (run_once): New variable.
5137         (gdbserver_usage): Document it.
5138         (main): Set run_once for `--once'.  Call remote_prepare.  Exit after
5139         the first run if RUN_ONCE.
5140         * server.h (run_once, remote_prepare): New declarations.
5141
5142 2011-04-19  Tom Tromey  <[email protected]>
5143
5144         * win32-low.c (handle_load_dll): Remove duplicate "the".
5145
5146 2011-04-07  Pierre Muller  <[email protected]>
5147
5148         Remove support for old Cygwin 1.5 versions.
5149         * win32-low.c (win32_create_inferior): Use new cygwin_path_list
5150         function to avoid warning.
5151         (win32_add_one_solib): Use cygwin_conv_path function to avoid
5152         warning.
5153
5154 2011-03-18  Pierre Muller  <[email protected]>
5155
5156         * gdbserver/server.h (Macro _): Define it if not available.
5157
5158 2011-03-14  Michael Snyder  <[email protected]>
5159
5160         * hostio.c (handle_close): Remove unnecessary null test.
5161
5162 2011-03-10  Joel Brobecker  <[email protected]>
5163
5164         * Makefile.in (maintainer-clean realclean distclean): Remove
5165         "make ...  subdir_do" command.
5166
5167 2011-03-10  Michael Snyder  <[email protected]>
5168
5169         * tracepoint.c (tracepoint_finish_step): Fix loop variable.
5170
5171         * server.c (handle_v_run): Free alloced buffer on early return.
5172
5173 2011-03-09  Yao Qi  <[email protected]>
5174
5175         Revert:
5176         2011-03-04  Yao Qi  <[email protected]>
5177
5178         * Makefile.in: Remove GNU make feature --directory.
5179
5180         2011-03-05  Yao Qi  <[email protected]>
5181
5182         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5183         (subdir_do): New make target.  Copied from gdb/Makefile.
5184         (maintainer-clean, realclean, distclean, clean): Call corresponding
5185         make targets in common/Makefile.
5186
5187         2011-02-11  Yao Qi  <[email protected]>
5188
5189         * configure.ac: Call AC_PROG_RANLIB.
5190         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
5191         * configure: Regenerate.
5192
5193 2011-03-07  Jan Kratochvil  <[email protected]>
5194
5195         * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
5196
5197 2011-03-06  Yao Qi  <[email protected]>
5198
5199         * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
5200
5201 2011-03-05  Yao Qi  <[email protected]>
5202
5203         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
5204         (subdir_do): New make target.  Copied from gdb/Makefile.
5205         (maintainer-clean, realclean, distclean, clean): Call corresponding
5206         make targets in common/Makefile.
5207
5208 2011-03-04  Yao Qi  <[email protected]>
5209
5210         * Makefile.in: Remove GNU make feature --directory.
5211
5212 2011-03-04  Michael Snyder  <[email protected]>
5213
5214         * server.c (queue_stop_reply): Call xmalloc not malloc.
5215
5216 2011-03-02  Michael Snyder  <[email protected]>
5217
5218         * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
5219
5220 2011-02-28  Michael Snyder  <[email protected]>
5221
5222         * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
5223         (cmd_qtframe): Ditto.
5224         (cmd_qtbuffer): Ditto.
5225         (cmd_bigqtbuffer): Ditto.
5226
5227         * utils.c (decimal2str): Initialize 'width' to nine, then
5228         don't mess with it.
5229
5230 2011-02-28  Ulrich Weigand  <[email protected]>
5231
5232         * hostio.c (require_data): Free *data, not data.
5233
5234 2011-02-28  Jan Kratochvil  <[email protected]>
5235
5236         * hostio.c (require_data): Use free, not xfree.
5237
5238 2011-02-27  Michael Snyder  <[email protected]>
5239
5240         * server.c (handle_query): Discard unused value.
5241
5242         * hostio.c (require_data): Free malloc memory before returning
5243         error.
5244
5245 2011-02-26  Michael Snyder  <[email protected]>
5246
5247         * linux-low.c (list_threads): Call closedir for dirent.
5248
5249 2011-02-27  Michael Snyder  <[email protected]>
5250
5251         * i386-low.c (i386-length_and_rw_bits): Comment the fact that
5252         a case statement falls through.
5253
5254         * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
5255
5256         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
5257         in comparison.
5258
5259 2011-02-26  Michael Snyder  <[email protected]>
5260
5261         * utils.c (decimal2str): Eliminate dead code and dead param.
5262         (pulongest): Drop dead param from call to decimal2str.
5263         (plongest): Ditto.
5264
5265 2011-02-24  Joel Brobecker  <[email protected]>
5266
5267         Revert the following patch (not approved yet):
5268         2011-02-21  Hui Zhu  <[email protected]>
5269         * tracepoint.c (tp_printf): New function.
5270         (eval_agent_expr): Handle gdb_agent_op_printf.
5271
5272 2011-02-21  Hui Zhu  <[email protected]>
5273
5274         * tracepoint.c (tp_printf): New function.
5275         (eval_agent_expr): Handle gdb_agent_op_printf.
5276
5277 2011-02-18  Tom Tromey  <[email protected]>
5278
5279         * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
5280         (tracepoint.o): Likewise.
5281         * tracepoint.c (enum gdb_agent_op): Use ax.def.
5282         (gdb_agent_op_names): Likewise.
5283
5284 2011-02-18  Tom Tromey  <[email protected]>
5285
5286         * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5287         gdb_agent_op_rot>: New constants.
5288         (gdb_agent_op_names): Add pick and roll.
5289         (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5290         cases.
5291
5292 2011-02-15  Jan Kratochvil  <[email protected]>
5293
5294         * aclocal.m4: Regenerated with aclocal-1.11.1.
5295
5296 2011-02-14  Pedro Alves  <[email protected]>
5297
5298         * server.c (handle_qxfer_traceframe_info): New.
5299         (qxfer_packets): Register "traceframe-info".
5300         (handle_query): Report support for qXfer:traceframe-info:read+.
5301         * tracepoint.c (match_blocktype): New.
5302         (traceframe_find_block_type): Rename to ...
5303         (traceframe_walk_blocks): ... this.  Add callback filter argument,
5304         and use it.
5305         (traceframe_find_block_type): New, reimplemented on top of
5306         traceframe_walk_blocks.
5307         (build_traceframe_info_xml): New.
5308         (traceframe_read_info): New.
5309         * server.h (traceframe_read_info): Declare.
5310
5311 2011-02-11  Yao Qi  <[email protected]>
5312
5313         * configure.ac: Call AC_PROG_RANLIB.
5314         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
5315         * configure: Regenerate.
5316
5317 2011-02-07  Pedro Alves  <[email protected]>
5318
5319         * server.c (gdb_read_memory): Change return semantics to allow
5320         partial transfers.
5321         (handle_search_memory_1): Adjust.
5322         (process_serial_event) <'m' packet>: Handle partial transfers.
5323         * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5324
5325 2011-01-28  Pedro Alves  <[email protected]>
5326
5327         * regcache.c (init_register_cache): Initialize
5328         regcache->register_status.
5329         (free_register_cache): Release regcache->register_status.
5330         (regcache_cpy): Copy register_status.
5331         (registers_to_string): Print 'x's for unavailable registers.
5332         (supply_register): Mark the register's status valid or
5333         unavailable, depending on whether a buffer was passed in or not.
5334         (supply_register_zeroed): New.
5335         (supply_regblock): Mark the registers' status valid or
5336         unavailable, depending on whether a buffer was passed in or not.
5337         * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5338         (struct regcache): New `register_status' field.
5339         (supply_register_zeroed): Declare.
5340         * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5341         supply_register_zeroed, rather than passing a NULL buffer to
5342         supply_register.
5343         * tracepoint.c (fetch_traceframe_registers): Update comment.
5344
5345 2011-01-28  Pedro Alves  <[email protected]>
5346
5347         * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5348         buffer explicit.
5349
5350 2011-01-25  Pedro Alves  <[email protected]>
5351
5352         * server.h (decode_xfer_write): Change prototype.
5353         * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5354         and don't extract the annex here.
5355         * server.c (decode_xfer_read): Remove `annex' parameter,
5356         and don't extract the annex here.
5357         (decode_xfer): New.
5358         (struct qxfer): New.
5359         (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5360         (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5361         (handle_qxfer_statictrace): New functions, abstracted out from
5362         handle_query, and made to use the struct qxfer interface.
5363         (handle_threads_qxfer_proper): Rename to ...
5364         (handle_qxfer_threads_proper): ... this.
5365         (handle_threads_qxfer): Rename to ...
5366         (handle_qxfer_threads): ... this.  Adjust.
5367         (qxfer_packets): New array.
5368         (handle_qxfer): New function.
5369         (handle_query): Use handle_qxfer.
5370
5371 2011-01-05  Michael Snyder  <[email protected]>
5372
5373         * gdbreplay.c: Shorten lines of >= 80 columns.
5374         * linux-low.c: Ditto.
5375         * linux-ppc-low.c: Ditto.
5376         * linux-s390-low.c: Ditto.
5377         * linux-sparc-low.c: Ditto.
5378         * linux-x86-low.c: Ditto.
5379         * linux-xtensa-low.c: Ditto.
5380         * mem-break.c: Ditto.
5381         * nto-low.c: Ditto.
5382         * regcache.h: Ditto.
5383         * remote-utils.c: Ditto.
5384         * server.c: Ditto.
5385         * server.h: Ditto.
5386         * thread-db.c: Ditto.
5387         * tracepoint.c: Ditto.
5388         * utils.c: Ditto.
5389         * win32-low.h: Ditto.
5390
5391 2011-01-05  Joel Brobecker  <[email protected]>
5392
5393         * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5394         update.
5395
5396 2011-01-01  Joel Brobecker  <[email protected]>
5397
5398         * server.c (gdbserver_version): Update copyright year in version
5399         output.
5400         * gdbreplay.c (gdbreplay_version): Ditto.
5401
5402 2010-12-29  Jie Zhang  <[email protected]>
5403
5404         * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5405         * linux-bfin-low.c: New file.
5406         * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5407         PT_DATA_ADDR for BFIN targets.
5408         * Makefile.in (SFILES): Add linux-bfin-low.c.
5409         (clean): Remove reg-bfin.c.
5410         (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5411         * README: Mention supported Blackfin targets.
5412
5413 2010-12-23  Mike Frysinger  <[email protected]>
5414
5415         * .gitignore: New file.
5416
5417 2010-11-16  Mike Frysinger  <[email protected]>
5418
5419         * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5420
5421 2010-10-22  Jie Zhang  <[email protected]>
5422
5423         * Makefile.in: Add FLAGS_TO_PASS variable.
5424         (install): Remove dependency of install-only and recursively
5425         invoke make for install-only.
5426
5427 2010-10-04  Doug Evans  <[email protected]>
5428
5429         * Makefile.in (uninstall): Use $(DESTDIR).
5430
5431 2010-09-24  Pedro Alves  <[email protected]>
5432
5433         PR gdb/11842
5434
5435         * linux-x86-low.c (compat_siginfo_from_siginfo)
5436         (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5437         si_code is < 0.  Check for si_code == SI_TIMER before checking for
5438         si_code < 0.
5439
5440 2010-09-13  Joel Brobecker  <[email protected]>
5441
5442         * lynx-i386-low.c: New file.
5443         * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5444
5445 2010-09-13  Joel Brobecker  <[email protected]>
5446
5447         * lynx-low.c (ptrace_request_to_str): Remove handling for
5448         request values that have been removed in LynxOS 5.x.
5449
5450 2010-09-13  Joel Brobecker  <[email protected]>
5451
5452         * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5453         <ptrace.h>
5454
5455 2010-09-09  Nathan Sidwell  <[email protected]>
5456
5457         * configure.ac: Add --enable-inprocess-agent option.
5458         * configure: Rebuilt.
5459
5460 2010-09-06  Yao Qi  <[email protected]>
5461
5462         * linux-low.c (linux_kill): Remove unused variable.
5463         (linux_stabilize_threads): Likewise.
5464         * server.c (start_inferior): Likewise.
5465         (queue_stop_reply_callback): Likewise.
5466         * tracepoint.c (do_action_at_tracepoint): Likewise.
5467
5468 2010-09-06  Yao Qi  <[email protected]>
5469
5470         * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5471         on return.
5472
5473 2010-09-06  Jan Kratochvil  <[email protected]>
5474
5475         * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5476
5477 2010-09-06  Pedro Alves  <[email protected]>
5478
5479         * Makefile.in (install-only): Replace $IPA_DEPFILES with
5480         "$(IPA_DEPFILES)".
5481
5482 2010-09-01  Joel Brobecker  <[email protected]>
5483
5484         * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5485         gdbserver/lynx-ppc-low.c: New files.
5486         * Makefile.in (lynx_low_h): New variable.
5487         (lynx-low.o, lynx-ppc-low.o): New rules.
5488         * configure.ac: On LynxOS, link with -lnetinet.
5489         * configure.srv: Add handling of powerpc-*-lynxos* targets.
5490         * configure: regenerate.
5491
5492 2010-09-01  Joel Brobecker  <[email protected]>
5493
5494         * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5495         * configure.ac: Add check for vasprintf and vsnprintf.
5496         * configure, config.in: Regenerate.
5497         * server.h (vasprintf, vsnprintf): Add conditional declarations.
5498
5499 2010-09-01  Joel Brobecker  <[email protected]>
5500
5501         * gdbreplay.c: Move include of alloca.h up, next to include of
5502         malloc.h.
5503         * server.h: Add include of malloc.h.
5504         * mem-break.c: Remove include of malloc.h.
5505         * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5506
5507 2010-09-01  Joel Brobecker  <[email protected]>
5508
5509         * Makefile.in (memmem.o): Build with -Wno-error.
5510
5511 2010-09-01  Joel Brobecker  <[email protected]>
5512
5513         * utils.c (xsnprintf): Make non-static.
5514         * server.h: Add xsnprintf declaration.
5515         * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5516         replace calls to snprintf by calls to xsnprintf throughout.
5517
5518 2010-09-01  Joel Brobecker  <[email protected]>
5519
5520         * configure.ac: Add configure check for alloca.
5521         * configure, config.in: Regenerate.
5522         * server.h: Include alloca.h if it exists.
5523         * gdbreplay.c: Include alloca.h if it exists.
5524
5525 2010-08-28  Pedro Alves  <[email protected]>
5526
5527         * linux-low.c (__SIGRTMIN): Define if not already defined.
5528         (linux_create_inferior): Check for __ANDROID__ rather than
5529         __SIGRTMIN.
5530         (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5531         are already deferred.
5532         (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5533         (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5534         stopped and already has a pending signal to report.
5535         (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5536         a pending signal to report or is moving out of a jump pad.
5537         (linux_init_signals): Check for __ANDROID__ rather than
5538         __SIGRTMIN.
5539
5540 2010-08-28  Pedro Alves  <[email protected]>
5541
5542         * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5543         debug_threads check.  Avoid a linear search when not doing debug
5544         output.
5545
5546 2010-08-27  Pedro Alves  <[email protected]>
5547
5548         * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5549         (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5550         (struct file_handler) <fd>: Change type to gdb_fildes_t.
5551         (process_event): Change local fd's type to gdb_fildes_t.
5552         (create_file_handler): Adjust prototype.
5553         (delete_file_handler): Adjust prototype.
5554         (handle_file_event): Adjust prototype.  Use pfildes.
5555         (create_file_event): Adjsut prototype.
5556         * remote-utils.c (remote_desc, listen_desc): Change type to
5557         gdb_fildes_t.
5558         * server.h: New gdb_fildes_t typedef.
5559         [USE_WIN32API]: Include winsock2.h.
5560         (delete_file_handler, add_file_handler): Adjust prototypes.
5561         (pfildes): Declare.
5562         * utils.c (pfildes): New.
5563
5564 2010-08-27  Pedro Alves  <[email protected]>
5565
5566         * configure.ac (build_warnings): Add -Wno-char-subscripts.
5567         * configure: Regenerate.
5568
5569 2010-08-27  Pedro Alves  <[email protected]>
5570
5571         * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5572         (linux_done_accessing_memory): ... this.
5573         (linux_target_ops): Adjust.
5574         * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5575         * nto-low.c (nto_target_ops): Adjust comment.
5576         * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5577         * spu-low.c (spu_target_ops): Adjust comment.
5578         * target.h (target_ops): Rename unprepare_to_access_memory field
5579         to done_accessing_memory.
5580         (unprepare_to_access_memory): Rename to ...
5581         (done_accessing_memory): ... this.
5582
5583 2010-08-26  Pedro Alves  <[email protected]>
5584
5585         * linux-low.c (linux_prepare_to_access_memory): New.
5586         (linux_unprepare_to_access_memory): New.
5587         (linux_target_ops): Install them.
5588         * server.c (read_memory): Rename to ...
5589         (gdb_read_memory): ... this.  Use
5590         prepare_to_access_memory/prepare_to_access_memory.
5591         (write_memory): Rename to ...
5592         (gdb_write_memory): ... this.  Use
5593         prepare_to_access_memory/prepare_to_access_memory.
5594         (handle_search_memory_1): Adjust.
5595         (process_serial_event): Adjust.
5596         * target.h (struct target_ops): New fields
5597         prepare_to_access_memory and unprepare_to_access_memory.
5598         (prepare_to_access_memory, unprepare_to_access_memory): New.
5599         * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5600         prepare_to_access_memory/prepare_to_access_memory.
5601         * nto-low.c (nto_target_ops): Adjust.
5602         * spu-low.c (spu_target_ops): Adjust.
5603         * win32-low.c (win32_target_ops): Adjust.
5604
5605 2010-08-26  Pedro Alves  <[email protected]>
5606
5607         * Makefile.in (WARN_CFLAGS): Get it from configure.
5608         (WERROR_CFLAGS): New.
5609         (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5610         * configure.ac: Introduce --enable-werror, which adds -Werror to
5611         the compiler command line.  Enabled by default.  Disable with
5612         --disable-werror.  Add -Wdeclaration-after-statement
5613         Wpointer-arith and -Wformat-nonliteral to warning flags.
5614         * configure: Regenerate.
5615
5616 2010-08-26  Pedro Alves  <[email protected]>
5617
5618         * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
5619
5620 2010-08-26  Pedro Alves  <[email protected]>
5621
5622         * gdbreplay.c (remote_error): New.
5623         (gdbchar): New.
5624         (expect): Use gdbchar.  Check for error reading from GDB.
5625         Clarify sync error output.
5626         (play): Check for errors writing to GDB.
5627         * linux-low.c (sigchld_handler): Really ignore `write' errors.
5628         * remote-utils.c (getpkt): Check for errors writing to the remote
5629         descriptor.
5630
5631 2010-08-25  Pedro Alves  <[email protected]>
5632
5633         * linux-low.c (linux_wait_1): Move non-debugging code out of
5634         `debug_threads' control.
5635
5636 2010-08-25  Pedro Alves  <[email protected]>
5637
5638         * linux-low.c (linux_wait_1): Don't set last_status here.
5639         * server.c (push_event, queue_stop_reply_callback): Assert we're
5640         not pushing a TARGET_WAITKIND_IGNORE event.
5641         (start_inferior, start_inferior, attach_inferior, handle_v_cont)
5642         (myresume, handle_target_event): Set the thread's last_resume_kind
5643         and last_status from the target returned status.
5644
5645 2010-08-25  Pedro Alves  <[email protected]>
5646
5647         PR threads/10729
5648
5649         * linux-x86-low.c (update_debug_registers_callback): New.
5650         (i386_dr_low_set_addr): Use it.
5651         (i386_dr_low_get_addr): New.
5652         (i386_dr_low_set_control): Use update_debug_registers_callback.
5653         (i386_dr_low_get_control): New.
5654         (i386_dr_low_get_status): Adjust.
5655         * linux-low.c (linux_stop_lwp): New.
5656         * linux-low.h (linux_stop_lwp): Declare.
5657
5658         * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
5659         argument instead of a i386_debug_reg_state.
5660         (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
5661         a i386_debug_reg_state.
5662         (i386_insert_aligned_watchpoint): Adjust.
5663         (i386_remove_aligned_watchpoint): Adjust.
5664         (i386_low_stopped_data_address): Read the debug registers from the
5665         inferior instead of from the mirrors.
5666         * i386-low.h (struct i386_debug_reg_state): Extend comment.
5667         (i386_dr_low_get_addr): Declare.
5668         (i386_dr_low_get_control): Declare.
5669         (i386_dr_low_get_status): Change prototype.
5670
5671         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
5672         (i386_dr_low_get_addr): New.
5673         (i386_dr_low_get_control): New.
5674         (i386_dr_low_get_status): Adjust prototype.  Return
5675         dr_status_mirror.
5676         (i386_initial_stuff): Clear dr_status_mirror and
5677         dr_control_mirror.
5678         (i386_get_thread_context): Adjust.
5679         (i386_set_thread_context): Adjust.
5680         (i386_thread_added): Adjust.
5681
5682 2010-08-24  Pedro Alves  <[email protected]>
5683
5684         * linux-low.h (linux_thread_area): Delete declaration.
5685
5686 2010-08-11  Thomas Schwinge  <[email protected]>
5687
5688         * linux-low.c (linux_wait_1): Correctly return the ptid of the child
5689         after its termination.
5690
5691 2010-08-09  Pedro Alves  <[email protected]>
5692
5693         * linux-low.c (gdb_wants_lwp_stopped): Delete.
5694         (gdb_wants_all_stopped): Delete.
5695         (linux_wait_1): Don't call them.
5696         * server.c (handle_v_cont): Tag all threads as want-stopped.
5697         (gdb_wants_thread_stopped): Fix comments.  Tag the thread that
5698         stopped as "client-wants-stopped".
5699
5700 2010-07-31  Pedro Alves  <[email protected]>
5701
5702         * Makefile.in (signals_h): New.
5703         (server_h): Depend on it.
5704         (server.o): Don't depend on $(signals_def).
5705         (signals.o): Depend on $(signals_def).
5706
5707 2010-07-31  Jan Kratochvil  <[email protected]>
5708
5709         * Makefile.in (signals_def): New.
5710         (server_h): Append include/gdb/signals.h and signals_def.
5711         (server.o): Append signals_def.
5712
5713 2010-07-25  Jan Kratochvil  <[email protected]>
5714
5715         * server.c (handle_target_event): Use target_signal_to_host for
5716         resume_info.sig initialization.
5717         * target.h (struct thread_resume) <sig>: New comment.
5718
5719 2010-07-20  Ozkan Sezer  <[email protected]>
5720
5721         * server.c (handle_query): strcpy() the returned string from paddress()
5722         instead of sprintf().
5723         * utils.c (paddress): Return phex_nz().
5724
5725 2010-07-07  Joel Brobecker  <[email protected]>
5726
5727         * server.c (handle_v_cont): Call mourn_inferior if process
5728         just exited.
5729         (myresume): Likewise.
5730
5731 2010-07-01  Pedro Alves  <[email protected]>
5732
5733         Static tracepoints, and integration with UST.
5734
5735         * configure.ac: Handle --with-ust.  substitute ustlibs and ustinc.
5736         * mem-break.c (uninsert_all_breakpoints)
5737         (reinsert_all_breakpoints): New.
5738         * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
5739         * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
5740         (gdb_agent_ust_loaded, helper_thread_id)
5741         (gdb_agent_helper_thread_id): New macros.
5742         (struct ipa_sym_addresses): Add addr_ust_loaded,
5743         addr_helper_thread_id, addr_cmd_buf.
5744         (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
5745         (in_process_agent_loaded_ust): New.
5746         (write_e_ust_not_loaded): New.
5747         (maybe_write_ipa_ust_not_loaded): New.
5748         (struct collect_static_trace_data_action): New.
5749         (enum tracepoint_type) <static_tracepoint>: New.
5750         (struct tracepoint) <handle>: Mention static tracepoints.
5751         (struct static_tracepoint_ctx): New.
5752         (CMD_BUF_SIZE): New.
5753         (add_tracepoint_action): Handle static tracepoint actions.
5754         (unprobe_marker_at): New.
5755         (clear_installed_tracepoints): Handle static tracepoints.
5756         (cmd_qtdp): Handle static tracepoints.
5757         (probe_marker_at): New.
5758         (cmd_qtstart): Handle static tracepoints.
5759         (response_tracepoint): Handle static tracepoints.
5760         (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
5761         (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
5762         (get_context_regcache): Handle static tracepoints.
5763         (do_action_at_tracepoint): Handle static tracepoint actions.
5764         (traceframe_find_block_type): Handle static trace data blocks.
5765         (traceframe_read_sdata): New.
5766         (download_tracepoints): Download static tracepoint actions.
5767         [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
5768         (GDB_PROBE_NAME): New.
5769         (ust_ops): New.
5770         (GET_UST_SYM): New.
5771         (USTF): New.
5772         (dlsym_ust): New.
5773         (ust_marker_to_static_tracepoint): New.
5774         (gdb_probe): New.
5775         (collect_ust_data_at_tracepoint): New.
5776         (gdb_ust_probe): New.
5777         (UNIX_PATH_MAX, SOCK_DIR): New.
5778         (gdb_ust_connect_sync_socket): New.
5779         (resume_thread, stop_thread): New.
5780         (run_inferior_command): New.
5781         (init_named_socket): New.
5782         (gdb_ust_socket_init): New.
5783         (cstr_to_hexstr): New.
5784         (next_st): New.
5785         (first_marker, next_marker): New.
5786         (response_ust_marker): New.
5787         (cmd_qtfstm, cmd_qtsstm): New.
5788         (unprobe_marker_at, probe_marker_at): New.
5789         (cmd_qtstmat, gdb_ust_thread): New.
5790         (gdb_ust_init): New.
5791         (initialize_tracepoint_ftlib): Call gdb_ust_init.
5792         * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
5793         (ST_REGENTRY): New.
5794         (x86_64_st_collect_regmap): New.
5795         (X86_64_NUM_ST_COLLECT_GREGS): New.
5796         (AMD64_RIP_REGNUM): New.
5797         (supply_static_tracepoint_registers): New.
5798         * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
5799         (ST_REGENTRY): New.
5800         (i386_st_collect_regmap): New.
5801         (i386_NUM_ST_COLLECT_GREGS): New.
5802         (supply_static_tracepoint_registers): New.
5803         * server.c (handle_query): Handle qXfer:statictrace:read.
5804         <qSupported>: Report support for StaticTracepoints, and
5805         qXfer:statictrace:read features.
5806         * server.h (traceframe_read_sdata)
5807         (supply_static_tracepoint_registers): Declare.
5808         * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
5809         (unpack_varlen_hex): Include in IPA build.
5810         * Makefile.in (ustlibs, ustinc): New.
5811         (IPA_OBJS): Add remote-utils-ipa.o.
5812         ($(IPA_LIB)): Link -ldl and -lpthread.
5813         (UST_CFLAGS): New.
5814         (IPAGENT_CFLAGS): Add UST_CFLAGS.
5815         * config.in, configure: Regenerate.
5816
5817 2010-06-20  Ian Lance Taylor  <[email protected]>
5818             Pedro Alves  <[email protected]>
5819
5820         * linux-x86-low.c (always_true): Delete.
5821         (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
5822         trying to fool the compiler with always_true.
5823
5824 2010-06-20  Pedro Alves  <[email protected]>
5825
5826         * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
5827         conditions in gdbserver.
5828
5829 2010-06-19  Ulrich Weigand  <[email protected]>
5830
5831         * spu-low.c (spu_read_memory): Wrap around local store limit.
5832         (spu_write_memory): Likewise.
5833
5834 2010-06-15  Pedro Alves  <[email protected]>
5835
5836         * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
5837         (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
5838         LONGEST uses.
5839         * server.h (struct emit_ops): Replace int64_t uses with LONGEST
5840         uses.
5841         * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
5842         uses with LONGEST uses.
5843
5844 2010-06-14  Stan Shebs  <[email protected]>
5845             Pedro Alves  <[email protected]>
5846
5847         Bytecode compiler.
5848
5849         * linux-x86-low.c: Include limits.h.
5850         (add_insns): New.
5851         (always_true): New.
5852         (EMIT_ASM): New.
5853         (EMIT_ASM32): New.
5854         (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
5855         (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
5856         (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
5857         (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
5858         (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
5859         (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
5860         (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
5861         (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
5862         (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
5863         (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
5864         (amd64_emit_void_call_2): New.
5865         (amd64_emit_ops): New.
5866         (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
5867         (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
5868         (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
5869         (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
5870         (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
5871         (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
5872         (i386_emit_goto, i386_write_goto_address, i386_emit_const)
5873         (i386_emit_call, i386_emit_reg, i386_emit_pop)
5874         (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
5875         (i386_emit_stack_adjust, i386_emit_int_call_1)
5876         (i386_emit_void_call_2): New.
5877         (i386_emit_ops): New.
5878         (x86_emit_ops): New.
5879         (the_low_target): Install x86_emit_ops.
5880         * server.h (struct emit_ops): New.
5881         (get_raw_reg_func_addr): Declare.
5882         (current_insn_ptr, emit_error): Declare.
5883         * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
5884         (set_trace_state_variable_value): New defines.
5885         (struct ipa_sym_addresses): New fields addr_get_raw_reg,
5886         addr_get_trace_state_variable_value and
5887         addr_set_trace_state_variable_value.
5888         (symbol_list): New fields for get_raw_reg,
5889         get_trace_state_variable_value and set_trace_state_variable_value.
5890         (condfn): New typedef.
5891         (struct tracepoint): New field `compiled_cond'.
5892         (do_action_at_tracepoint): Clear compiled_cond.
5893         (get_trace_state_variable_value, set_trace_state_variable_value):
5894         Export in the IPA.
5895         (condition_true_at_tracepoint): If there's a compiled condition,
5896         run that.
5897         (current_insn_ptr, emit_error): New globals.
5898         (struct bytecode_address): New.
5899         (get_raw_reg_func_addr): New.
5900         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
5901         (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
5902         (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
5903         (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
5904         (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
5905         (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
5906         (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
5907         (compile_tracepoint_condition, compile_bytecodes): New.
5908         * target.h (emit_ops): Forward declare.
5909         (struct target_ops): New field emit_ops.
5910         (target_emit_ops): New.
5911         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
5912         * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
5913         * linux-low.c (linux_emit_ops): New.
5914         (linux_target_ops): Install it.
5915         * linux-low.h (struct linux_target_ops): New field emit_ops.
5916
5917 2010-06-14  Ulrich Weigand  <[email protected]>
5918
5919         * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
5920         * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
5921
5922 2010-06-01  Pedro Alves  <[email protected]>
5923             Stan Shebs  <[email protected]>
5924
5925         * Makefile.in (IPA_DEPFILES, extra_libraries): New.
5926         (all): Depend on $(extra_libraries).
5927         (install-only): Install the IPA.
5928         (IPA_OBJS, IPA_LIB): New.
5929         (clean): Remove the IPA lib.
5930         (IPAGENT_CFLAGS): New.
5931         (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
5932         (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
5933         (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
5934         * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
5935         * configure.ac: Check for atomic builtins support in the compiler.
5936         (IPA_DEPFILES, extra_libraries): Define.
5937         * configure.srv (ipa_obj): Add description.
5938         (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
5939         (i[34567]86-*-linux*): Set ipa_obj.
5940         (x86_64-*-linux*): Set ipa_obj.
5941         * linux-low.c (stabilizing_threads): New.
5942         (supports_fast_tracepoints): New.
5943         (linux_detach): Stabilize threads before detaching.
5944         (handle_tracepoints): Handle internal tracing breakpoints.  Assert
5945         the lwp is either not stabilizing, or is moving out of a jump pad.
5946         (linux_fast_tracepoint_collecting): New.
5947         (maybe_move_out_of_jump_pad): New.
5948         (enqueue_one_deferred_signal): New.
5949         (dequeue_one_deferred_signal): New.
5950         (linux_wait_for_event_1): If moving out of a jump pad, defer
5951         pending signals to later.
5952         (linux_stabilize_threads): New.
5953         (linux_wait_1): Check if threads need moving out of jump pads, and
5954         do it if so.
5955         (stuck_in_jump_pad_callback): New.
5956         (move_out_of_jump_pad_callback): New.
5957         (lwp_running): New.
5958         (linux_resume_one_lwp): Handle moving out of jump pads.
5959         (linux_set_resume_request): Dequeue deferred signals.
5960         (need_step_over_p): Also step over fast tracepoint jumps.
5961         (start_step_over): Also uninsert fast tracepoint jumps.
5962         (finish_step_over): Also reinsert fast tracepoint jumps.
5963         (linux_install_fast_tracepoint_jump): New.
5964         (linux_target_ops): Install linux_stabilize_threads and
5965         linux_install_fast_tracepoint_jump_pad.
5966         * linux-low.h (linux_target_ops) <get_thread_area,
5967         install_fast_tracepoint_jump_pad>: New fields.
5968         (struct lwp_info) <collecting_fast_tracepoint,
5969         pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
5970         (linux_get_thread_area): Declare.
5971         * linux-x86-low.c (jump_insn): New.
5972         (x86_get_thread_area): New.
5973         (append_insns): New.
5974         (push_opcode): New.
5975         (amd64_install_fast_tracepoint_jump_pad): New.
5976         (i386_install_fast_tracepoint_jump_pad): New.
5977         (x86_install_fast_tracepoint_jump_pad): New.
5978         (the_low_target): Install x86_get_thread_area and
5979         x86_install_fast_tracepoint_jump_pad.
5980         * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
5981         (struct fast_tracepoint_jump): New.
5982         (fast_tracepoint_jump_insn): New.
5983         (fast_tracepoint_jump_shadow): New.
5984         (find_fast_tracepoint_jump_at): New.
5985         (fast_tracepoint_jump_here): New.
5986         (delete_fast_tracepoint_jump): New.
5987         (set_fast_tracepoint_jump): New.
5988         (uninsert_fast_tracepoint_jumps_at): New.
5989         (reinsert_fast_tracepoint_jumps_at): New.
5990         (set_breakpoint_at): Use write_inferior_memory.
5991         (uninsert_raw_breakpoint): Use write_inferior_memory.
5992         (check_mem_read): Mask out fast tracepoint jumps.
5993         (check_mem_write): Mask out fast tracepoint jumps.
5994         * mem-break.h (struct fast_tracepoint_jump): Forward declare.
5995         (set_fast_tracepoint_jump): Declare.
5996         (delete_fast_tracepoint_jump)
5997         (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
5998         (reinsert_fast_tracepoint_jumps_at): Declare.
5999         * regcache.c: Don't compile many functions when building the
6000         in-process agent library.
6001         (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
6002         the register buffer in the heap.
6003         (free_register_cache): If the register buffer isn't owned by the
6004         regcache, don't free it.
6005         (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
6006         pre-existing register caches.
6007         * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
6008         type.
6009         (convert_ascii_to_int): : Constify `from' parameter type.
6010         (decode_M_packet, decode_X_packet): Replace the `to' parameter by
6011         a `to_p' pointer to pointer parameter.  If TO_P is NULL, malloc
6012         the needed buffer in-place.
6013         (relocate_instruction): New.
6014         * server.c (handle_query) <qSymbols>: If the target supports
6015         tracepoints, give it a chance of looking up symbols.  Report
6016         support for fast tracepoints.
6017         (handle_status): Stabilize threads.
6018         (process_serial_event): Adjust.
6019         * server.h (struct fast_tracepoint_jump): Forward declare.
6020         (struct process_info) <fast_tracepoint_jumps>: New field.
6021         (convert_ascii_to_int, convert_int_to_ascii): Adjust.
6022         (decode_X_packet, decode_M_packet): Adjust.
6023         (relocate_instruction): Declare.
6024         (in_process_agent_loaded): Declare.
6025         (tracepoint_look_up_symbols): Declare.
6026         (struct fast_tpoint_collect_status): Declare.
6027         (fast_tracepoint_collecting): Declare.
6028         (force_unlock_trace_buffer): Declare.
6029         (handle_tracepoint_bkpts): Declare.
6030         (initialize_low_tracepoint)
6031         (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
6032         * target.h (struct target_ops) <stabilize_threads,
6033         install_fast_tracepoint_jump_pad>: New fields.
6034         (stabilize_threads, install_fast_tracepoint_jump_pad): New.
6035         * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
6036         [HAVE_STDINT_H]: Include stdint.h.
6037         (trace_debug_1): Rename to ...
6038         (trace_vdebug): ... this.
6039         (trace_debug): Rename to ...
6040         (trace_debug_1): ... this.  Add `level' parameter.
6041         (trace_debug): New.
6042         (ATTR_USED, ATTR_NOINLINE): New.
6043         (IP_AGENT_EXPORT): New.
6044         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6045         (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
6046         (about_to_request_buffer_space, trace_buffer_is_full)
6047         (stopping_tracepoint, expr_eval_result, error_tracepoint)
6048         (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
6049         (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
6050         (traceframe_write_count, traceframes_created)
6051         (trace_state_variables)
6052         New renaming defines.
6053         (struct ipa_sym_addresses): New.
6054         (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
6055         (symbol_list): New.
6056         (ipa_sym_addrs): New.
6057         (all_tracepoint_symbols_looked_up): New.
6058         (in_process_agent_loaded): New.
6059         (write_e_ipa_not_loaded): New.
6060         (maybe_write_ipa_not_loaded): New.
6061         (tracepoint_look_up_symbols): New.
6062         (debug_threads) [IN_PROCESS_AGENT]: New.
6063         (read_inferior_memory) [IN_PROCESS_AGENT]: New.
6064         (UNKNOWN_SIDE_EFFECTS): New.
6065         (stop_tracing): New.
6066         (flush_trace_buffer): New.
6067         (stop_tracing_bkpt): New.
6068         (flush_trace_buffer_bkpt): New.
6069         (read_inferior_integer): New.
6070         (read_inferior_uinteger): New.
6071         (read_inferior_data_pointer): New.
6072         (write_inferior_data_pointer): New.
6073         (write_inferior_integer): New.
6074         (write_inferior_uinteger): New.
6075         (struct collect_static_trace_data_action): Delete.
6076         (enum tracepoint_type): New.
6077         (struct tracepoint) <type>: New field `type'.
6078         <actions_str, step_actions, step_actions_str>: Only include in
6079         GDBserver.
6080         <orig_size, obj_addr_on_target, adjusted_insn_addr>
6081         <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
6082         (tracepoints): Use IP_AGENT_EXPORT.
6083         (last_tracepoint): Don't include in the IPA.
6084         (stopping_tracepoint): Use IP_AGENT_EXPORT.
6085         (trace_buffer_is_full): Use IP_AGENT_EXPORT.
6086         (alloced_trace_state_variables): New.
6087         (trace_state_variables): Use IP_AGENT_EXPORT.
6088         (traceframe_t): Delete unused variable.
6089         (circular_trace_buffer): Don't include in the IPA.
6090         (trace_buffer_start): Delete.
6091         (struct trace_buffer_control): New.
6092         (trace_buffer_free): Delete.
6093         (struct ipa_trace_buffer_control): New.
6094         (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
6095         (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
6096         New.
6097         (trace_buffer_ctrl): New.
6098         (TRACE_BUFFER_CTRL_CURR): New.
6099         (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
6100         Reimplement as macros.
6101         (trace_buffer_wrap): Delete.
6102         (traceframe_write_count, traceframe_read_count)
6103         (traceframes_created, tracing): Use IP_AGENT_EXPORT.
6104         (struct tracepoint_hit_ctx) <type>: New field.
6105         (struct fast_tracepoint_ctx): New.
6106         (memory_barrier): New.
6107         (cmpxchg): New.
6108         (record_tracepoint_error): Update atomically in the IPA.
6109         (clear_inferior_trace_buffer): New.
6110         (about_to_request_buffer_space): New.
6111         (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
6112         updating the same buffer.
6113         (add_tracepoint): Default the tracepoint's type to trap
6114         tracepoint, and orig_size to -1.
6115         (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
6116         internal variables.
6117         (create_trace_state_variable): New parameter `gdb'.  Handle it.
6118         (clear_installed_tracepoints): Clear fast tracepoint jumps.
6119         (cmd_qtdp): Handle fast tracepoints.
6120         (cmd_qtdv): Adjust.
6121         (max_jump_pad_size): New.
6122         (gdb_jump_pad_head): New.
6123         (get_jump_space_head): New.
6124         (claim_jump_space): New.
6125         (sort_tracepoints): New.
6126         (MAX_JUMP_SIZE): New.
6127         (cmd_qtstart): Handle fast tracepoints.  Sync tracepoints with the
6128         IPA.
6129         (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
6130         support.  Upload fast traceframes, and delete internal IPA
6131         breakpoints.
6132         (stop_tracing_handler): New.
6133         (flush_trace_buffer_handler): New.
6134         (cmd_qtstop): Upload fast tracepoints.
6135         (response_tracepoint): Handle fast tracepoints.
6136         (tracepoint_finished_step): Upload fast traceframes.  Set the
6137         tracepoint hit context's tracepoint type.
6138         (handle_tracepoint_bkpts): New.
6139         (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
6140         type.  Add comment about fast tracepoints.
6141         (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
6142         non-existing action_str field.
6143         (get_context_regcache): Handle fast tracepoints.
6144         (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
6145         to the regcache.
6146         (fast_tracepoint_from_jump_pad_address): New.
6147         (fast_tracepoint_from_ipa_tpoint_address): New.
6148         (collecting_t): New.
6149         (force_unlock_trace_buffer): New.
6150         (fast_tracepoint_collecting): New.
6151         (collecting): New.
6152         (gdb_collect): New.
6153         (write_inferior_data_ptr): New.
6154         (target_tp_heap): New.
6155         (target_malloc): New.
6156         (download_agent_expr): New.
6157         (UALIGN): New.
6158         (download_tracepoints): New.
6159         (download_trace_state_variables): New.
6160         (upload_fast_traceframes): New.
6161         (IPA_FIRST_TRACEFRAME): New.
6162         (IPA_NEXT_TRACEFRAME_1): New.
6163         (IPA_NEXT_TRACEFRAME): New.
6164         [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
6165         [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
6166         (gdb_jump_pad_buffer_end): New.
6167         [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
6168         (initialize_tracepoint): Adjust.
6169         [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
6170         buffer.  Initialize the low module.
6171         * utils.c (PREFIX, TOOLNAME): New.
6172         (malloc_failure): Use PREFIX.
6173         (error): In the IPA, an error causes an exit.
6174         (fatal, warning): Use PREFIX.
6175         (internal_error): Use TOOLNAME.
6176         (NUMCELLS): Increase to 10.
6177         * configure, config.in: Regenerate.
6178
6179 2010-06-01  Pedro Alves  <[email protected]>
6180
6181         * server.c (handle_query) <qSupported>: Do two passes over the
6182         qSupported string to avoid nesting strtok.
6183
6184 2010-05-28  Jan Kratochvil  <[email protected]>
6185
6186         * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
6187         (CDEPS): New.
6188         * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping.  Test also
6189         -Wl,--dynamic-list.
6190         * configure: Regenerate.
6191         * proc-service.list: New.
6192
6193 2010-05-28  Jan Kratochvil  <[email protected]>
6194
6195         * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
6196         New comment.
6197
6198 2010-05-26  Ozkan Sezer  <[email protected]>
6199
6200         * gdbreplay.c (remote_open): Check error return from socket() call by
6201         its equality to -1 not by it being negative.
6202         * remote-utils.c (remote_open): Likewise.
6203
6204 2010-05-23  Pedro Alves  <[email protected]>
6205
6206         * config.h: Regenerate.
6207
6208 2010-05-19  Maxim Kuvyrkov  <[email protected]>
6209
6210         * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
6211         doesn't provide PTRACE_GET_THREAD_AREA.
6212
6213 2010-05-19  Maxim Kuvyrkov  <[email protected]>
6214
6215         * linux-m68k-low.c: Include <asm/ptrace.h>
6216         (ps_get_thread_area): Implement.
6217
6218 2010-05-03  Doug Evans  <[email protected]>
6219
6220         * event-loop.c (struct callback_event): New struct.
6221         (callback_list): New global.
6222         (append_callback_event, delete_callback_event): New functions.
6223         (process_callback): New function.
6224         (start_event_loop): Call it.
6225         * remote-utils.c (NOT_SCHEDULED): Define.
6226         (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
6227         moved out of readchar.
6228         (readchar): Rewrite.  Call reschedule before returning.
6229         (reset_readchar): New function.
6230         (remote_close): Call it.
6231         (process_remaining, reschedule): New functions.
6232         * server.h (callback_handler_func): New typedef.
6233         (append_callback_event, delete_callback_event): Declare.
6234
6235 2010-05-03  Pedro Alves  <[email protected]>
6236
6237         * proc-service.c (ps_pglobal_lookup): Use
6238         thread_db_look_up_one_symbol.
6239         * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
6240         parameter.  Use it instead of all_symbols_looked_up.
6241         * server.h (struct process_info) <all_symbols_looked_up>: Delete
6242         field.
6243         (all_symbols_looked_up): Don't declare.
6244         (look_up_one_symbol): Add new `may_ask_gdb' parameter.
6245         * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
6246         field.
6247         (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
6248         Set all_symbols_looked_up here.
6249         (thread_db_look_up_one_symbol): New.
6250         (thread_db_get_tls_address): Adjust.
6251         (thread_db_load_search, try_thread_db_load_1): Always allocate the
6252         thread_db object on the heap, and tentatively set it in the
6253         process structure.
6254         (thread_db_init): Don't set all_symbols_looked_up here.
6255         * linux-low.h (thread_db_look_up_one_symbol): Declare.
6256
6257 2010-05-03  Pedro Alves  <[email protected]>
6258
6259         * linux-low.c (linux_kill, linux_detach): Adjust.
6260         (status_pending_p_callback): Remove redundant statement.  Check
6261         for !TARGET_WAITIKIND_IGNORE, instead of
6262         TARGET_WAITKIND_STOPPED.
6263         (handle_tracepoints): Make sure LWP is locked.  Adjust.
6264         (linux_wait_for_event_1): Adjust.
6265         (linux_cancel_breakpoints): New.
6266         (unsuspend_one_lwp): New.
6267         (unsuspend_all_lwps): New.
6268         (linux_wait_1): If finishing a step-over, unsuspend all lwps.
6269         (send_sigstop_callback): Change return type to int, add new
6270         `except' parameter and handle it.
6271         (suspend_and_send_sigstop_callback): New.
6272         (stop_all_lwps): Add new `suspend' and `expect' parameters, and
6273         pass them down.  If SUSPEND, also increment the lwp's suspend
6274         count.
6275         (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
6276         (need_step_over_p): Don't consider suspended LWPs.
6277         (start_step_over): Adjust.
6278         (proceed_one_lwp): Change return type to int, add new `except'
6279         parameter and handle it.
6280         (unsuspend_and_proceed_one_lwp): New.
6281         (proceed_all_lwps): Use find_inferior instead of
6282         for_each_inferior.
6283         (unstop_all_lwps): Add `unsuspend' parameter.  If UNSUSPEND, them
6284         also decrement the suspend count of LWPs.  Pass `except' down,
6285         instead of hacking its suspend count.
6286         (linux_pause_all): Add `freeze' parameter.  Adjust.
6287         (linux_unpause_all): New.
6288         (linux_target_ops): Install linux_unpause_all.
6289         * server.c (handle_status): Adjust.
6290         * target.h (struct target_ops): New fields `unpause_all' and
6291         `cancel_breakpoints'.  Add new parameter to `pause_all'.
6292         (pause_all): Add new `freeze' parameter.
6293         (unpause_all): New.
6294         (cancel_breakpoints): New.
6295         * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6296         cancel breakpoints.
6297         (cmd_qtstart): Pause threads.
6298         (stop_tracing): Pause threads, and cancel breakpoints.
6299         * win32-low.c (win32_target_ops): Adjust.
6300
6301 2010-05-03  Pedro Alves  <[email protected]>
6302
6303         * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6304         the inferior right away from here...
6305         (linux_wait_1): ... to here, and adjust to check the thread's
6306         last_resume_kind instead of the lwp's step or stop_expected flags.
6307
6308 2010-05-02  Pedro Alves  <[email protected]>
6309
6310         * README: Use consistent `GDB' and `GDBserver' spellings.
6311
6312 2010-05-02  Pedro Alves  <[email protected]>
6313
6314         * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6315         (linux_kill): Stop all lwps here.  Don't delete the main lwp here.
6316         (linux_detach_one_lwp): Assume the lwp is stopped.
6317         (any_thread_of): Delete.
6318         (linux_detach): Stop all lwps here.  Don't blindly delete all
6319         breakpoints.
6320         (delete_lwp_callback): New.
6321         (linux_mourn): Delete all lwps of the process that is gone.
6322         (linux_wait_1): Don't delete the last lwp of the process here.
6323         * mem-break.h (mark_breakpoints_out): Declare.
6324         * mem-break.c (mark_breakpoints_out): New.
6325         (free_all_breakpoints): Use it.
6326         * server.c (handle_target_event): If the process is gone, mark
6327         breakpoints out.
6328         * thread-db.c (struct thread_db) <create_bp>: New field.
6329         (thread_db_enable_reporting): Fix prototype.  Store a thread event
6330         breakpoint reference in the thread_db struct.
6331         (thread_db_load_search): Clear the thread_db object.
6332         (try_thread_db_load_1): Ditto.
6333         (switch_to_process): New.
6334         (disable_thread_event_reporting): Use it.
6335         (remove_thread_event_breakpoints): New.
6336         (thread_db_detach, thread_db_mourn): Use it.
6337
6338 2010-05-01  Pedro Alves  <[email protected]>
6339
6340         * linux-low.c (linux_enable_event_reporting): New.
6341         (linux_wait_for_event_1, handle_extended_wait): Use it.
6342
6343 2010-04-30  Pedro Alves  <[email protected]>
6344
6345         * linux-low.c (linux_kill_one_lwp, linux_kill)
6346         (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6347         (send_sigstop): Take an lwp_info as parameter instead.  Queue a
6348         SIGSTOP even if the LWP is stopped.
6349         (send_sigstop_callback): New.
6350         (stop_all_lwps): Use send_sigstop_callback instead.
6351         (linux_resume_one_thread): Adjust.
6352         (proceed_one_lwp): Still proceed an LWP that the client has
6353         requested to stop, if we haven't reported it as stopped yet.  Make
6354         sure that LWPs the client want stopped, have a pending SIGSTOP.
6355
6356 2010-04-26  Doug Evans  <[email protected]>
6357
6358         * server.c (handle_general_set): Make static.
6359
6360         * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6361         Print received char after testing for error/eof instead of before.
6362         (input_interrupt): Tweak comment.
6363
6364 2010-04-23  Doug Evans  <[email protected]>
6365
6366         * server.c (start_inferior): Print inferior argv if --debug.
6367
6368 2010-04-21  Aleksandar Ristovski  <[email protected]>
6369
6370         * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6371         * nto-x86-low.c: Include server.h
6372
6373 2010-04-20  Pierre Muller  <[email protected]>
6374
6375         * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6376         be consistent with other sources of this directory.
6377         (init_registers_amd64): Correct name of source file of this function
6378         in the comment.
6379
6380 2010-04-19  Pierre Muller  <[email protected]>
6381
6382         * configure.srv (x86_64-*-mingw*): New configuration for Windows
6383         64-bit executables.
6384
6385 2010-04-19  Pierre Muller  <[email protected]>
6386
6387         * win32-i386-low.c: Add 64-bit support.
6388         (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6389         (init_registers_amd64): Declare.
6390         (mappings): Add 64-bit version of array.
6391         (init_windows_x86): New function.
6392         (the_low_target): Change init_arch field to init_windows_x86.
6393
6394 2010-04-19  Pierre Muller  <[email protected]>
6395
6396         * win32-low.c: Adapt to support also 64-bit architecture.
6397         (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6398         (get_image_name): Use SIZE_T type for local variable `done'.
6399         (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6400         (toolhelp_get_dll_name): Idem.
6401         (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6402         Use uintptr_t typecast to avoid warning.
6403         (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6404         (handle_exception): Use phex_nz to avoid warning.
6405         (win32_wait): Remove unused local variable `process'.
6406
6407 2010-04-19  Pierre Muller  <[email protected]>
6408
6409         * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6410         `amd64-avx.o'.
6411
6412 2010-04-17  Pierre Muller  <[email protected]>
6413
6414         * configure.ac: Use `ws2_32' library for srv_mingw.
6415         * configure: Regenerate.
6416         * gdbreplay.c: Include winsock2.h instead of winsock.h.
6417         * remote-utils.c: Likewise.
6418
6419 2010-04-17  H.J. Lu  <[email protected]>
6420
6421         * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6422         if __x86_64__ is defined.
6423
6424 2010-04-16  Pierre Muller  <[email protected]>
6425
6426         * configure: Regenerate.
6427
6428 2010-04-16  Pierre Muller  <[email protected]>
6429
6430         * server.c (handle_query): Handle 'qGetTIBAddr' query.
6431         * target.h (target_ops): New get_tib_address field.
6432         * win32-low.h (win32_thread_info): Add thread_local_base field.
6433         * win32-low.c (child_add_thread): Add tlb argument.
6434         Set thread_local_base field to TLB.
6435         (get_child_debug_event): Adapt to child_add_thread change.
6436         (win32_get_tib_address): New function.
6437         (win32_target_ops): Set get_tib_address field to
6438         win32_get_tib_address.
6439         * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6440
6441 2010-04-12  Pedro Alves  <[email protected]>
6442
6443         * linux-low.c (linux_mourn): Also remove the process.
6444         * server.c (handle_target_event): Don't remove the process here.
6445         * nto-low.c (nto_mourn): New.
6446         (nto_target_ops): Install it.
6447         * spu-low.c (spu_mourn): New.
6448         (spu_target_ops): Install it.
6449         * win32-low.c (win32_mourn): New.
6450         (win32_target_ops): Install it.
6451
6452 2010-04-12  Pedro Alves  <[email protected]>
6453
6454         * server.h (buffer_xml_printf): Remove redundant `;'.
6455
6456 2010-04-12  Pedro Alves  <[email protected]>
6457
6458         * regcache.c (set_register_cache): Invalidate regcaches before
6459         changing the register cache layout.
6460         (regcache_invalidate_one): Allow a NULL regcache.
6461         * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6462         regcaches before changing the register cache layout or the target
6463         regsets.
6464
6465 2010-04-12  H.J. Lu  <[email protected]>
6466
6467         * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6468         variable warning on Linux/x86-64.
6469
6470 2010-04-11  Pedro Alves  <[email protected]>
6471
6472         GDBserver disconnected tracing support.
6473
6474         * linux-low.c (linux_remove_process): Delete.
6475         (add_lwp): Don't set last_resume_kind here.
6476         (linux_kill): Use `mourn'.
6477         (linux_detach): Use `thread_db_detach', and `mourn'.
6478         (linux_mourn): New.
6479         (linux_attach_lwp_1): Adjust comment.
6480         (linux_attach): last_resume_kind moved the thread_info; adjust.
6481         (status_pending_p_callback): Adjust.
6482         (linux_wait_for_event_1): Adjust.
6483         (count_events_callback, select_singlestep_lwp_callback)
6484         (select_event_lwp_callback, cancel_breakpoints_callback)
6485         (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6486         (proceed_one_lwp): Adjust.
6487         (linux_async): Add debug output.
6488         (linux_thread_stopped): New.
6489         (linux_pause_all): New.
6490         (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6491         linux_pause_all.
6492         * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6493         (thread_db_free): Delete declaration.
6494         (thread_db_detach, thread_db_mourn): Declare.
6495         * thread-db.c (thread_db_init): Use thread_db_mourn.
6496         (thread_db_free): Delete, split in two.
6497         (disable_thread_event_reporting): New.
6498         (thread_db_detach): New.
6499         (thread_db_mourn): New.
6500
6501         * server.h (struct thread_info) <last_resume_kind>: New field.
6502         <attached>: Add comment.
6503         <gdb_detached>: New field.
6504         (handler_func): Change return type to int.
6505         (handle_serial_event, handle_target_event): Ditto.
6506         (gdb_connected): Declare.
6507         (tracing): Delete.
6508         (disconnected_tracing): Declare.
6509         (stop_tracing): Declare.
6510
6511         * server.c (handle_query) <qSupported>: Report support for
6512         disconnected tracing.
6513         (queue_stop_reply_callback): Account for running threads.
6514         (gdb_wants_thread_stopped): New.
6515         (gdb_wants_all_threads_stopped): New.
6516         (gdb_reattached_process): New.
6517         (handle_status): Clear the `gdb_detached' flag of all processes.
6518         In all-stop, stop all threads.
6519         (main): Be sure to leave tfind mode.  Handle disconnected tracing.
6520         (process_serial_event): If the remote connection breaks, or if an
6521         exit was forced with "monitor exit", force an event loop exit.
6522         Handle disconnected tracing on detach.
6523         (handle_serial_event): Adjust.
6524         (handle_target_event): If GDB isn't connected, forward events back
6525         to the inferior, unless the last process exited, in which case,
6526         exit gdbserver.  Adjust interface.
6527
6528         * remote-utils.c (remote_open): Don't block in accept.  Instead
6529         register an event loop source on the listen socket file
6530         descriptor.  Refactor bits into ...
6531         (listen_desc): ... this new global.
6532         (gdb_connected): ... this new function.
6533         (enable_async_notification): ... this new function.
6534         (handle_accept_event): ... this new function.
6535         (remote_close): Clear remote_desc.
6536
6537         * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6538
6539         * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6540         New fields.
6541         (mourn_inferior): Define.
6542         (target_process_qsupported): Avoid the dangling else problem.
6543         (thread_stopped): Define.
6544         (pause_all): Define.
6545         (target_waitstatus_to_string): Declare.
6546         * target.c (target_waitstatus_to_string): New.
6547
6548         * tracepoint.c (tracing): Make extern.
6549         (disconnected_tracing): New.
6550         (stop_tracing): Make extern.  Handle tracing stops due to GDB
6551         disconnecting.
6552         (cmd_qtdisconnected): New.
6553         (cmd_qtstatus): Report disconnected tracing status in trace reply.
6554         (handle_tracepoint_general_set): Handle QTDisconnected.
6555
6556         * event-loop.c (event_handler_func): Change return type to int.
6557         (process_event): Bail out if the event handler wants the event
6558         loop to stop.
6559         (handle_file_event): Ditto.
6560         (start_event_loop): Bail out if the event handler wants the event
6561         loop to stop.
6562
6563         * nto-low.c (nto_target_ops): Adjust.
6564         * spu-low.c (spu_wait): Don't remove the process here.
6565         (spu_target_ops): Adjust.
6566         * win32-low.c (win32_wait): Don't remove the process here.
6567         (win32_target_ops): Adjust.
6568
6569 2010-04-11  Pedro Alves  <[email protected]>
6570
6571         * regcache.c (realloc_register_cache): Invalidate inferior's
6572         regcache before recreating it.
6573
6574 2010-04-09  Pedro Alves  <[email protected]>
6575
6576         * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6577
6578 2010-04-09  Stan Shebs  <[email protected]>
6579             Pedro Alves  <[email protected]>
6580
6581         * server.h (LONGEST): New.
6582         (struct thread_info) <while_stepping>: New field.
6583         (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6584         Declare.
6585         (initialize_tracepoint, handle_tracepoint_general_set)
6586         (handle_tracepoint_query, tracepoint_finished_step)
6587         (tracepoint_was_hit, release_while_stepping_state_list):
6588         (current_traceframe): Declare.
6589         * server.c (handle_general_set): Handle tracepoint packets.
6590         (read_memory): New.
6591         (write_memory): New.
6592         (handle_search_memory_1): Use read_memory.
6593         (handle_query): Report support for conditional tracepoints, trace
6594         state variables, and tracepoint sources.  Handle tracepoint
6595         queries.
6596         (main): Initialize the tracepoints module.
6597         (process_serial_event): Handle traceframe reads/writes.
6598
6599         * linux-low.c (handle_tracepoints): New.
6600         (linux_wait_1): Call it.
6601         (linux_resume_one_lwp): Handle while-stepping.
6602         (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6603         (linux_target_ops): Install them.
6604         * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6605         New field.
6606         * linux-x86-low.c (x86_supports_tracepoints): New.
6607         (the_low_target). Install it.
6608
6609         * mem-break.h (delete_breakpoint): Declare.
6610         * mem-break.c (delete_breakpoint): Make external.
6611
6612         * target.h (struct target_ops): Add `supports_tracepoints',
6613         `read_pc', and `write_pc' fields.
6614         (target_supports_tracepoints): Define.
6615         * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
6616         (phex_nz): New.
6617
6618         * regcache.h (struct regcache) <registers_owned>: New field.
6619         (init_register_cache, regcache_cpy): Declare.
6620         (regcache_read_pc, regcache_write_pc): Declare.
6621         (register_cache_size): Declare.
6622         (supply_regblock): Declare.
6623         * regcache.c (init_register_cache): New.
6624         (new_register_cache): Use it.
6625         (regcache_cpy): New.
6626         (register_cache_size): New.
6627         (supply_regblock): New.
6628         (regcache_read_pc, regcache_write_pc): New.
6629
6630         * tracepoint.c: New.
6631
6632         * Makefile.in (OBS): Add tracepoint.o.
6633         (tracepoint.o): New rule.
6634
6635 2010-04-08  H.J. Lu  <[email protected]>
6636
6637         * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
6638         (i386-mmx.o): New.
6639         (i386-mmx.c): Likewise.
6640         (i386-mmx-linux.o): Likewise.
6641         (i386-mmx-linux.c): Likewise.
6642
6643         * configure.srv (srv_i386_regobj): Add i386-mmx.o.
6644         (srv_i386_linux_regobj): Add i386-mmx-linux.o.
6645         (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
6646         (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
6647
6648         * linux-x86-low.c (init_registers_i386_mmx_linux): New.
6649         (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
6650         and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
6651
6652 2010-04-07  H.J. Lu  <[email protected]>
6653
6654         * Makefile.in (clean): Updated.
6655         (i386-avx.o): New.
6656         (i386-avx.c): Likewise.
6657         (i386-avx-linux.o): Likewise.
6658         (i386-avx-linux.c): Likewise.
6659         (amd64-avx.o): Likewise.
6660         (amd64-avx.c): Likewise.
6661         (amd64-avx-linux.o): Likewise.
6662         (amd64-avx-linux.c): Likewise.
6663
6664         * configure.srv (srv_i386_regobj): Add i386-avx.o.
6665         (srv_i386_linux_regobj): Add i386-avx-linux.o.
6666         (srv_amd64_regobj): Add amd64-avx.o.
6667         (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
6668         (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
6669         (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
6670         (srv_i386_xmlfiles): Add i386/i386-avx.xml.
6671         (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
6672         (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
6673         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
6674
6675         * i387-fp.c: Include "i386-xstate.h".
6676         (i387_xsave): New.
6677         (i387_cache_to_xsave): Likewise.
6678         (i387_xsave_to_cache): Likewise.
6679         (x86_xcr0): Likewise.
6680
6681         * i387-fp.h (i387_cache_to_xsave): Likewise.
6682         (i387_xsave_to_cache): Likewise.
6683         (x86_xcr0): Likewise.
6684
6685         * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
6686         * linux-crisv32-low.c (target_regsets): Likewise.
6687         * linux-m68k-low.c (target_regsets): Likewise.
6688         * linux-mips-low.c (target_regsets): Likewise.
6689         * linux-ppc-low.c (target_regsets): Likewise.
6690         * linux-s390-low.c (target_regsets): Likewise.
6691         * linux-sh-low.c (target_regsets): Likewise.
6692         * linux-sparc-low.c (target_regsets): Likewise.
6693         * linux-xtensa-low.c (target_regsets): Likewise.
6694
6695         * linux-low.c: Include <sys/uio.h>.
6696         (regsets_fetch_inferior_registers): Support nt_type.
6697         (regsets_store_inferior_registers): Likewise.
6698         (linux_process_qsupported): New.
6699         (linux_target_ops): Add linux_process_qsupported.
6700
6701         * linux-low.h (regset_info): Add nt_type.
6702         (linux_target_ops): Add process_qsupported.
6703
6704         * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
6705         and <sys/uio.h>.
6706         (init_registers_i386_avx_linux): New.
6707         (init_registers_amd64_avx_linux): Likewise.
6708         (xmltarget_i386_linux_no_xml): Likewise.
6709         (xmltarget_amd64_linux_no_xml): Likewise.
6710         (PTRACE_GETREGSET): Likewise.
6711         (PTRACE_SETREGSET): Likewise.
6712         (x86_fill_xstateregset): Likewise.
6713         (x86_store_xstateregset): Likewise.
6714         (use_xml): Likewise.
6715         (x86_linux_update_xmltarget): Likewise.
6716         (x86_linux_process_qsupported): Likewise.
6717         (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
6718         (x86_arch_setup): Don't call init_registers_amd64_linux nor
6719         init_registers_i386_linux here.  Call
6720         x86_linux_update_xmltarget.
6721         (the_low_target): Add x86_linux_process_qsupported.
6722
6723         * server.c (handle_query): Call target_process_qsupported.
6724
6725         * target.h (target_ops): Add process_qsupported.
6726         (target_process_qsupported): New.
6727
6728 2010-04-03  Pedro Alves  <[email protected]>
6729
6730         * inferiors.c (add_thread): Set last_status kind to
6731         TARGET_WAITKIND_IGNORE.
6732         * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
6733         fetch.  Use ptid_of.  Avoid unnecessary get_lwp_thread calls.
6734         (linux_wait_1): Move `thread' local definition to block that uses
6735         it.  Don't NULL initialize `event_child'.
6736         (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
6737         Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
6738         * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
6739
6740 2010-04-01  Pedro Alves  <[email protected]>
6741
6742         * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
6743         an extended waitstatus, or by a watchpoint.
6744         (cancel_breakpoints_callback): Don't cancel a breakpoint if the
6745         thread was stepping or has been stopped by a watchpoint.
6746
6747 2010-04-01  Pedro Alves  <[email protected]>
6748
6749         * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
6750         (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
6751         of another, then delete the previous, and validate all
6752         breakpoints.
6753         (validate_inserted_breakpoint): New.
6754         (delete_disabled_breakpoints): New.
6755         (validate_breakpoints): New.
6756         (check_mem_read): Validate breakpoints before trusting their
6757         shadow.  Delete disabled breakpoints.
6758         (check_mem_write): Validate breakpoints before trusting they
6759         should be inserted.  Delete disabled breakpoints.
6760         * mem-break.h (validate_breakpoints):
6761         * server.c (handle_query): Validate breakpoints when we see a
6762         qSymbol query.
6763
6764 2010-04-01  Pedro Alves  <[email protected]>
6765
6766         * linux-low.c (linux_wait_1): Avoid setting need_step_over is
6767         there's a GDB breakpoint at stop_pc.  Always report a trap to GDB
6768         if we could tell there's a GDB breakpoint at stop_pc.
6769         (need_step_over_p): Don't do a step over if we find a GDB
6770         breakpoint at the resume PC.
6771
6772         * mem-break.c (struct raw_breakpoint): New.
6773         (enum bkpt_type): New type `gdb_breakpoint'.
6774         (struct breakpoint): Delete the `PC', `old_data' and `inserted'
6775         fields.  New field `raw'.
6776         (find_raw_breakpoint_at): New.
6777         (set_raw_breakpoint_at): Handle refcounting.  Create a raw
6778         breakpoint instead.
6779         (set_breakpoint_at): Adjust.
6780         (delete_raw_breakpoint): New.
6781         (release_breakpoint): New.
6782         (delete_breakpoint): Rename to...
6783         (delete_breakpoint_1): ... this.  Add proc parameter.  Use
6784         release_breakpoint.  Return ENOENT.
6785         (delete_breakpoint): Reimplement.
6786         (find_breakpoint_at): Delete.
6787         (find_gdb_breakpoint_at): New.
6788         (delete_breakpoint_at): Delete.
6789         (set_gdb_breakpoint_at): New.
6790         (delete_gdb_breakpoint_at): New.
6791         (gdb_breakpoint_here): New.
6792         (set_reinsert_breakpoint): Use release_breakpoint.
6793         (uninsert_breakpoint): Rename to ...
6794         (uninsert_raw_breakpoint): ... this.
6795         (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
6796         (reinsert_raw_breakpoint): Change parameter type to
6797         raw_breakpoint.
6798         (reinsert_breakpoints_at): Adjust to handle raw breakpoints
6799         instead.
6800         (check_breakpoints): Adjust.  Use release_breakpoint.
6801         (breakpoint_here): Rewrite using find_raw_breakpoint_at.
6802         (breakpoint_inserted_here): Ditto.
6803         (check_mem_read): Adjust to iterate over raw breakpoints instead.
6804         Don't trust the breakpoint's shadow if it is not inserted.
6805         (check_mem_write): Adjust to iterate over raw breakpoints instead.
6806         (delete_all_breakpoints): Adjust.
6807         (free_all_breakpoints): Mark all breakpoints as uninserted, and
6808         use delete_breakpoint_1.
6809
6810         * mem-break.h (breakpoints_supported): Delete declaration.
6811         (set_gdb_breakpoint_at): Declare.
6812         (gdb_breakpoint_here): Declare.
6813         (delete_breakpoint_at): Delete.
6814         (delete_gdb_breakpoint_at): Declare.
6815
6816         * server.h (struct raw_breakpoint): Forward declare.
6817         (struct process_info): New field `raw_breakpoints'.
6818
6819         * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
6820         breakpoints.
6821
6822 2010-03-24  Pedro Alves  <[email protected]>
6823
6824         * linux-low.c (status_pending_p_callback): Fix comment.
6825         (linux_wait_for_event_1): Move most of the internal breakpoint
6826         handling from here...
6827         (linux_wait_1): ... to here.
6828         (count_events_callback): New.
6829         (select_singlestep_lwp_callback): New.
6830         (select_event_lwp_callback): New.
6831         (cancel_breakpoints_callback): New.
6832         (select_event_lwp): New.
6833         (linux_wait_1): Simplify internal breakpoint handling.  Give equal
6834         priority to all LWPs that have had events that should be reported
6835         to the client.  Cancel breakpoints when about to reporting the
6836         event to the client, not while stopping lwps.  No longer cancel
6837         finished single-steps here.
6838         (cancel_finished_single_step): Delete.
6839         (cancel_finished_single_steps): Delete.
6840
6841 2010-03-24  Pedro Alves  <[email protected]>
6842
6843         * mem-break.c (enum bkpt_type): New.
6844         (struct breakpoint): New field `type'.
6845         (set_breakpoint_at): Change return type to struct breakpoint
6846         pointer.  Set type to `other_breakpoint' by default.
6847         (delete_breakpoint): Rewrite, supporting more than one breakpoint
6848         in the breakpoint list.
6849         (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
6850         (reinsert_breakpoint): Rename to ...
6851         (reinsert_raw_breakpoint): ... this.
6852         (reinsert_breakpoints_at): Adjust.
6853         * mem-break.h (struct breakpoint): Declare.
6854         (set_breakpoint_at): Change return type to struct breakpoint
6855         pointer.
6856
6857 2010-03-24  Pedro Alves  <[email protected]>
6858
6859         * server.c (handle_query): Assign, not compare.
6860
6861 2010-03-24  Pedro Alves  <[email protected]>
6862
6863         Teach linux gdbserver to step-over-breakpoints.
6864
6865         * linux-low.c (can_hardware_single_step): New.
6866         (supports_breakpoints): New.
6867         (handle_extended_wait): If stopping threads, read the stop pc of
6868         the new cloned LWP.
6869         (get_pc): New.
6870         (get_stop_pc): Add `lwp' parameter.  Handle it.  Bail out if the
6871         low target doesn't support retrieving the PC.
6872         (add_lwp): Set last_resume_kind to resume_continue.
6873         (linux_attach_lwp_1): Adjust comments.  Always set stop_expected.
6874         (linux_attach): Don't clear stop_expected.  Set the lwp's
6875         last_resume_kind to resume_stop.
6876         (linux_detach_one_lwp): Don't check for removed breakpoints.
6877         (check_removed_breakpoint): Delete.
6878         (status_pending_p): Rename to ...
6879         (status_pending_p_callback): ... this.  Don't check for removed
6880         breakpoints.  Don't consider threads that are stopped from GDB's
6881         perspective.
6882         (linux_wait_for_lwp): Always read the stop_pc here.
6883         (cancel_breakpoint): New.
6884         (step_over_bkpt): New global.
6885         (linux_wait_for_event_1): Implement stepping over breakpoints.
6886         (gdb_wants_lwp_stopped): New.
6887         (gdb_wants_all_stopped): New.
6888         (linux_wait_1): Tag threads as gdb-wants-stopped.  Cancel finished
6889         single-step traps here.  Store the thread's last reported target
6890         wait status.
6891         (send_sigstop): Don't clear stop_expected.  Always set it,
6892         instead.
6893         (mark_lwp_dead): Remove reference to pending_is_breakpoint.
6894         (cancel_finished_single_step): New.
6895         (cancel_finished_single_steps): New.
6896         (wait_for_sigstop): Don't cancel finished single-step traps here.
6897         (linux_resume_one_lwp): Don't check for removed breakpoints.
6898         Don't set `step' on non-hardware step archs.
6899         (linux_set_resume_request): Ignore resume_stop requests if already
6900         stopping or stopped.  Set the lwp's last_resume_kind.
6901         (resume_status_pending_p): Don't check for removed breakpoints.
6902         (need_step_over_p): New.
6903         (start_step_over): New.
6904         (finish_step_over): New.
6905         (linux_resume_one_thread): Always queue a sigstop for resume_stop
6906         requests.  Clear the thread's last reported target waitstatus.
6907         Don't use the `suspended' flag.  Don't consider pending breakpoints.
6908         (linux_resume): Start a step-over if necessary.
6909         (proceed_one_lwp): New.
6910         (proceed_all_lwps): New.
6911         (unstop_all_lwps): New.
6912         * linux-low.h (struct lwp_info): Rewrite comment for the
6913         `suspended' flag.  Add the `stop_pc' field.  Delete the
6914         `pending_stop_pc' field.  Tweak the `stepping' flag's comment.
6915         Add `'last_resume_kind' and `need_step_over' fields.
6916         * inferiors.c (struct thread_info): Delete, moved elsewhere.
6917         * mem-break.c (struct breakpoint): Delete `reinserting' flag.
6918         Delete `breakpoint_to_reinsert' field.  New flag `inserted'.
6919         (set_raw_breakpoint_at): New.
6920         (set_breakpoint_at): Rewrite to use it.
6921         (reinsert_breakpoint_handler): Delete.
6922         (set_reinsert_breakpoint): New.
6923         (reinsert_breakpoint_by_bp): Delete.
6924         (delete_reinsert_breakpoints): New.
6925         (uninsert_breakpoint): Rewrite.
6926         (uninsert_breakpoints_at): New.
6927         (reinsert_breakpoint): Rewrite.
6928         (reinsert_breakpoints_at): New.
6929         (check_breakpoints): Rewrite.
6930         (breakpoint_here): New.
6931         (breakpoint_inserted_here): New.
6932         (check_mem_read): Adjust.
6933         * mem-break.h (breakpoints_supported, breakpoint_here)
6934         (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
6935         (reinsert_breakpoint_by_bp): Delete declaration.
6936         (delete_reinsert_breakpoints): Declare.
6937         (reinsert_breakpoint): Delete declaration.
6938         (reinsert_breakpoints_at): Declare.
6939         (uninsert_breakpoint): Delete declaration.
6940         (uninsert_breakpoints_at): Declare.
6941         (check_breakpoints): Adjust prototype.
6942         * server.h: Adjust include order.
6943         (struct thread_info): Declare here.  Add a `last_status' field.
6944
6945 2010-03-23  Michael Snyder  <[email protected]>
6946
6947         * server.c (crc32): New function.
6948         (handle_query): Add handling for 'qCRC:' request.
6949
6950 2010-03-23  Pedro Alves  <[email protected]>
6951
6952         * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
6953         lwp had been stopped by a watchpoint.
6954
6955 2010-03-16  Pedro Alves  <[email protected]>
6956
6957         * server.h (internal_error): Declare.
6958         (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
6959         * utils.c (internal_error): New function.
6960
6961 2010-03-15  Andreas Schwab  <[email protected]>
6962
6963         * configure.srv: Fix typo setting srv_regobj.
6964
6965 2010-03-15  Pedro Alves  <[email protected]>
6966
6967         * linux-low.c (fetch_register): Avoid passing a non string literal
6968         format to `error'.
6969         (usr_store_inferior_registers): Ditto.
6970
6971 2010-03-14  Pedro Alves  <[email protected]>
6972
6973         * linux-low.c (linux_write_memory): Bail out early if peeking
6974         memory failed.
6975
6976 2010-03-14  Pedro Alves  <[email protected]>
6977
6978         * linux-low.h (struct lwp_info): New fields
6979         `stopped_by_watchpoint' and `stopped_data_address'.
6980         * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
6981         here, and cache them in the lwp object.
6982         (wait_for_sigstop): Check stopped_by_watchpoint lwp field
6983         directly.
6984         (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
6985         field.
6986         (linux_stopped_by_watchpoint): Rewrite.
6987         (linux_stopped_data_address): Rewrite.
6988
6989 2010-03-06  Simo Melenius  <[email protected]>
6990
6991         * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
6992         switching the current inferior, not before.
6993
6994 2010-03-01  H.J. Lu  <[email protected]>
6995
6996         * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
6997         reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
6998         i386-linux.c and amd64-linux.c.
6999         (reg-i386.o): Removed.
7000         (reg-i386.c): Likewise.
7001         (reg-i386-linux.o): Likewise.
7002         (reg-i386-linux.c): Likewise.
7003         (reg-x86-64.o): Likewise.
7004         (reg-x86-64.c): Likewise.
7005         (reg-x86-64-linux.o): Likewise.
7006         (reg-x86-64-linux.c): Likewise.
7007         (i386.o): New.
7008         (i386.c): Likewise.
7009         (i386-linux.o): Likewise.
7010         (i386-linux.c): Likewise.
7011         (amd64.o): Likewise.
7012         (amd64.c): Likewise.
7013         (amd64-linux.o): Likewise.
7014         (amd64-linux.c): Likewise.
7015
7016         * configure.srv (srv_i386_regobj): New.
7017         (srv_i386_linux_regobj): Likewise.
7018         (srv_amd64_regobj): Likewise.
7019         (srv_amd64_linux_regobj): Likewise.
7020         (srv_i386_32bit_xmlfiles): Likewise.
7021         (srv_i386_64bit_xmlfiles): Likewise.
7022         (srv_i386_xmlfiles): Likewise.
7023         (srv_amd64_xmlfiles): Likewise.
7024         (srv_i386_linux_xmlfiles): Likewise.
7025         (srv_amd64_linux_xmlfiles): Likewise.
7026         (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj.  Set
7027         srv_xmlfiles to $srv_i386_xmlfiles.
7028         (i[34567]86-*-mingw32ce*): Likewise.
7029         (i[34567]86-*-mingw*): Likewise.
7030         (i[34567]86-*-nto*): Likewise.
7031         (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
7032         and $srv_amd64_linux_regobj.  Set srv_xmlfiles to
7033         $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
7034         (x86_64-*-linux*): Likewise.
7035
7036         * linux-x86-low.c (init_registers_x86_64_linux): Removed.
7037         (init_registers_amd64_linux): New.
7038         (x86_arch_setup): Replace init_registers_x86_64_linux with
7039         init_registers_amd64_linux.
7040
7041 2010-02-23  Maxim Kuvyrkov  <[email protected]>
7042
7043         * configure.ac: Check for libdl.  If it is not available link against
7044         static libthread_db.
7045         * configure: Regenerate.
7046
7047 2010-02-22  Pedro Alves  <[email protected]>
7048
7049         PR9605
7050
7051         * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
7052         handing a read watchpoint.
7053         (i386_low_insert_watchpoint): Read watchpoints aren't supported.
7054
7055 2010-02-12  Doug Evans  <[email protected]>
7056
7057         * linux-low.c (linux_supports_tracefork_flag): Document.
7058         (linux_look_up_symbols): Add comment.
7059
7060 2010-02-03  H.J. Lu  <[email protected]>
7061
7062         * regcache.c (supply_register): Clear regcache if buf is NULL.
7063
7064 2010-02-02  Nicolas Roche  <[email protected]>
7065             Joel Brobecker  <[email protected]>
7066
7067         * inferiors.c (find_inferior): Add function documentation.
7068         (unloaded_dll): Handle the case where the unloaded dll has not
7069         been previously registered in the dll list.
7070
7071 2010-02-01  Daniel Jacobowitz  <[email protected]>
7072
7073         * linux-arm-low.c (thumb_breakpoint_len): Delete.
7074         (thumb2_breakpoint): New.
7075         (arm_breakpoint_at): Check for Thumb-2 breakpoints.
7076
7077 2010-01-29  Daniel Jacobowitz  <[email protected]>
7078
7079         * linux-low.c (get_stop_pc): Check for SIGTRAP.
7080         (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
7081         breakpoints.
7082
7083 2010-01-21  Pedro Alves  <[email protected]>
7084
7085         * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
7086
7087 2010-01-21  Jan Kratochvil  <[email protected]>
7088
7089         * linux-s390-low.c (s390_collect_ptrace_register)
7090         (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
7091
7092 2010-01-21  Doug Evans  <[email protected]>
7093
7094         * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
7095         (PTRACE_ARG4_TYPE): New macro.
7096         (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
7097         (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
7098         (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
7099         (usr_store_inferior_registers): Ditto.
7100         (linux_read_memory, linux_write_memory): Ditto.
7101         (linux_test_for_tracefork): Ditto.
7102
7103         * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
7104         Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
7105
7106 2010-01-21  Pedro Alves  <[email protected]>
7107
7108         * proc-service.c (ps_lgetregs): Don't refetch registers from the
7109         target.
7110
7111 2010-01-21  Pedro Alves  <[email protected]>
7112
7113         * spu-low.c (spu_fetch_registers, spu_store_registers): Change
7114         prototype to take a regcache.  Adjust.
7115
7116 2010-01-20  Pedro Alves  <[email protected]>
7117
7118         * regcache.h (struct thread_info): Forward declare.
7119         (struct regcache): New.
7120         (new_register_cache): Adjust prototype.
7121         (get_thread_regcache): Declare.
7122         (free_register_cache): Adjust prototype.
7123         (registers_to_string, registers_from_string): Ditto.
7124         (supply_register, supply_register_by_name, collect_register)
7125         (collect_register_as_string, collect_register_by_name): Ditto.
7126         * regcache.c (struct inferior_regcache_data): Delete.
7127         (get_regcache): Rename to ...
7128         (get_thread_regcache): ... this.  Adjust.  Switch inferior before
7129         fetching registers.
7130         (regcache_invalidate_one): Adjust.
7131         (regcache_invalidate): Fix prototype.
7132         (new_register_cache): Return the new register cache.
7133         (free_register_cache): Change prototype.
7134         (realloc_register_cache): Adjust.
7135         (registers_to_string): Change prototype to take a regcache.  Adjust.
7136         (registers_from_string): Ditto.
7137         (register_data): Ditto.
7138         (supply_register): Ditto.
7139         (supply_register_by_name): Ditto.
7140         (collect_register): Ditto.
7141         (collect_register_as_string): Ditto.
7142         (collect_register_by_name): Ditto.
7143         * server.c (process_serial_event): Adjust.
7144         * linux-low.h (regset_fill_func, regset_store_func): Change
7145         prototype.
7146         (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
7147         Change prototype.
7148         * linux-low.c (get_stop_pc): Adjust.
7149         (check_removed_breakpoint): Adjust.
7150         (linux_wait_for_event): Adjust.
7151         (linux_resume_one_lwp): Adjust.
7152         (fetch_register): Add regcache parameter.  Adjust.
7153         (usr_store_inferior_registers): Ditto.
7154         (regsets_fetch_inferior_registers): Ditto.
7155         (regsets_store_inferior_registers): Ditto.
7156         (linux_fetch_registers, linux_store_registers): Ditto.
7157         * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
7158         regcache.  Adjust.
7159         (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
7160         Ditto.
7161         * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
7162         prototype to take a regcache.
7163         (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
7164         * remote-utils.c (convert_ascii_to_int, outreg)
7165         (prepare_resume_reply): Change prototype to take a regcache.
7166         Adjust.
7167         * target.h (struct target_ops) <fetch_registers, store_registers>:
7168         Change prototype to take a regcache.
7169         (fetch_inferior_registers, store_inferior_registers): Change
7170         prototype to take a regcache.  Adjust.
7171         * proc-service.c (ps_lgetregs): Adjust.
7172         * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
7173         (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
7174         (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
7175         take a regcache.  Adjust.
7176         * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
7177         (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
7178         (arm_store_vfpregset, arm_get_pc, arm_set_pc):
7179         (arm_breakpoint_at): Change prototype to take a regcache.  Adjust.
7180         * linux-cris-low.c (cris_get_pc, cris_set_pc)
7181         (cris_cannot_fetch_register):
7182         (cris_breakpoint_at): Change prototype to take a regcache.
7183         Adjust.
7184         * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
7185         cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
7186         to take a regcache.  Adjust.
7187         (cris_breakpoint_at, cris_insert_point, cris_remove_point):
7188         Adjust.
7189         * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
7190         take a regcache.  Adjust.
7191         * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
7192         (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
7193         (m68k_set_pc): Change prototype to take a regcache.  Adjust.
7194         * linux-mips-low.c (mips_get_pc):
7195         (mips_set_pc): Change prototype to take a regcache.  Adjust.
7196         (mips_reinsert_addr): Adjust.
7197         (mips_collect_register): Change prototype to take a regcache.
7198         Adjust.
7199         (mips_supply_register):
7200         (mips_collect_register_32bit, mips_supply_register_32bit)
7201         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
7202         (mips_store_fpregset): Ditto.
7203         * linux-ppc-low.c (ppc_supply_ptrace_register)
7204         (ppc_supply_ptrace_register): Ditto.
7205         (parse_spufs_run): Adjust.
7206         (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
7207         (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
7208         (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
7209         take a regcache.  Adjust.
7210         * linux-s390-low.c (s390_collect_ptrace_register)
7211         (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
7212         (s390_set_pc): Change prototype to take a regcache.  Adjust.
7213         (s390_arch_setup): Adjust.
7214         * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
7215         (sh_fill_gregset): Change prototype to take a regcache.  Adjust.
7216         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7217         (sparc_fill_gregset, sparc_store_gregset_from_stack)
7218         (sparc_store_gregset, sparc_get_pc): Change prototype to take a
7219         regcache.  Adjust.
7220         (sparc_breakpoint_at): Adjust.
7221         * linux-xtensa-low.c (xtensa_fill_gregset):
7222         (xtensa_store_gregset):
7223         (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
7224         (xtensa_set_pc): Change prototype to take a regcache.  Adjust.
7225         * nto-low.c (nto_fetch_registers, nto_store_registers): Change
7226         prototype to take a regcache.  Adjust.
7227         * win32-arm-low.c (arm_fetch_inferior_register)
7228         (arm_store_inferior_register): Change prototype to take a
7229         regcache.  Adjust.
7230         * win32-i386-low.c (i386_fetch_inferior_register)
7231         (i386_store_inferior_register): Change prototype to take a
7232         regcache.  Adjust.
7233         * win32-low.c (child_fetch_inferior_registers)
7234         (child_store_inferior_registers): Change prototype to take a
7235         regcache.  Adjust.
7236         (win32_wait): Adjust.
7237         (win32_fetch_inferior_registers): Change prototype to take a
7238         regcache.  Adjust.
7239         (win32_store_inferior_registers): Adjust.
7240         * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
7241         store_inferior_register>: Change prototype to take a regcache.
7242
7243 2010-01-20  Doug Evans  <[email protected]>
7244
7245         * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
7246         #ifdef.
7247         (linux_wait_for_event1, linux_init_signals): Ditto.
7248         (W_STOPCODE): Provide definition if missing.
7249
7250 2010-01-13  Vladimir Prus  <[email protected]>
7251
7252         * linux-low.c (linux_core_of_thread): New.
7253         (compare_ints, show_process, list_threads): New.
7254         (linux_qxfer_osdata): Report threads and cores.
7255         (linux_target_op): Register linux_core_of_thread.
7256         * remote-utils.c (prepare_resume_reply): Report the core.
7257         (buffer_xml_printf): Support %d specifier.
7258         * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
7259         New.
7260         (handle_query): Handle qXfer:threads.  Announce availability
7261         thereof.
7262         * target.h (struct target_ops): New field core_of_thread.
7263
7264 2010-01-04  Ulrich Weigand  <[email protected]>
7265
7266         * Makefile.in (clean): Remove new generated files.
7267         (reg-s390.o, reg-s390.c): Remove rules.
7268         (reg-s390x.o, reg-s390x.c): Likewise.
7269         (s390-linux32.o, s390-linux32.c): Add rules.
7270         (s390-linux64.o, s390-linux64.c): Likewise.
7271         (s390x-linux64.o, s390x-linux64.c): Likewise.
7272         * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
7273         * linux-s390-low.c: Include <elf.h>.
7274         (HWCAP_S390_HIGH_GPRS): Define if undefined.
7275         (init_registers_s390): Remove prototype.
7276         (init_registers_s390x): Likewise.
7277         (init_registers_s390_linux32): Add prototype.
7278         (init_registers_s390_linux64): Likewise.
7279         (init_registers_s390x_linux64): Likewise.
7280         (s390_num_regs_3264): New define.
7281         (s390_regmap_3264): New global variable.
7282         (s390_cannot_fetch_register): Remove obsolete check.
7283         (s390_cannot_store_register): Likewise.
7284         (s390_collect_ptrace_register): Handle upper/lower register halves.
7285         (s390_supply_ptrace_register): Likewise.
7286         (s390_fill_gregset): Update to register number changes.
7287         (s390_get_hwcap): New routine.
7288         (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7289         Install appropriate regmap and register set.
7290
7291 2010-01-01  Joel Brobecker  <[email protected]>
7292
7293         * server.c (gdbserver_version): Update copyright year to 2010.
7294         * gdbreplay.c (gdbreplay_version): Likewise.
7295
7296 2009-12-28  Doug Evans  <[email protected]>
7297
7298         * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7299         elf/external.h.  Include <elf.h> instead but only if necessary.
7300
7301 2009-12-28  Pedro Alves  <[email protected]>
7302
7303         * linux-low.c (linux_remove_process): Remove `detaching'
7304         parameter.  Don't release/detach from thread_db here.
7305         (linux_kill): Release/detach from thread_db here, ...
7306         (linux_detach): ... and here, before actually detaching.
7307         (linux_wait_1): ... and here, when a process exits.
7308         * thread-db.c (any_thread_of): New.
7309         (thread_db_free): Switch the current inferior to a thread of the
7310         passed in process.
7311
7312 2009-12-21  Doug Evans  <[email protected]>
7313
7314         * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7315
7316         * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7317         Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7318         warning ifndef __NR_tkill.  Move setting of errno there too.
7319         Delete unnecessary resetting of errno after syscall.
7320         Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7321
7322         * configure.ac: Check for dladdr.
7323         * config.in: Regenerate.
7324         * configure: Regenerate.
7325         * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7326         (try_thread_db_load): Update.
7327
7328         * linux-low.c (my_waitpid): Delete unnecessary prototype.
7329
7330 2009-12-18  Doug Evans  <[email protected]>
7331
7332         * event-loop.c: Include unistd.h if it exists.
7333
7334         * linux-low.c (my_waitpid): Move definition away from being in
7335         between linux_tracefork_child/linux_test_for_tracefork.
7336
7337         * gdb_proc_service.h (psaddr_t): Fix type.
7338         * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7339         signature to match glibc.
7340
7341 2009-12-16  Doug Evans  <[email protected]>
7342
7343         * linux-low.c (linux_read_memory): Fix argument to read.
7344
7345 2009-11-26  Pedro Alves  <[email protected]>
7346
7347         * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7348         events, don't leave current_inferior pointing at null.
7349
7350 2009-11-26  Pedro Alves  <[email protected]>
7351
7352         * win32-low.c (LOG): Delete.
7353         (OUTMSG): Output to stderr.
7354         (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7355         on compile time LOG macro.
7356         (win32_wait): Fix debug output.
7357
7358 2009-11-26  Pedro Alves  <[email protected]>
7359
7360         * win32-low.c (win32_add_one_solib): If the dll name is
7361         "ntdll.dll", prepend the system directory to the dll path.
7362
7363 2009-11-17  Daniel Jacobowitz  <[email protected]>
7364
7365         * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7366
7367 2009-11-17  Nathan Sidwell  <[email protected]>
7368             Vladimir Prus  <[email protected]>
7369
7370         * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7371         * configure.ac: Check for __mcoldfire__ and set
7372         gdb_cv_m68k_is_coldfire.
7373         * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7374         reg-cf.o and reg-m68k.o.
7375         * configure: Regenerated.
7376
7377 2009-11-16  Pedro Alves  <[email protected]>
7378
7379         * linux-low.c (linux_remove_process): Add `detaching' parameter.
7380         Pass it to thread_db_free.
7381         (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7382         proper `detaching' argument to linux_remove_process.
7383         * linux-low.h (thread_db_free): Add `detaching' parameter.
7384         * thread-db.c (thread_db_init): Pass false as `detaching' argument
7385         to thread_db_free.
7386         (thread_db_free): Add `detaching' parameter.  Only
7387         call td_ta_clear_event if detaching from process.
7388
7389 2009-11-12  Maxim Kuvyrkov  <[email protected]>
7390
7391         * thread-db.c (thread_db_free): Fix typo.
7392
7393 2009-11-11  Paul Pluzhnikov  <[email protected]>
7394
7395         PR gdb/10838
7396         * thread-db.c (thread_db_free): Call td_ta_clear_event.
7397
7398 2009-11-03  Nathan Sidwell  <[email protected]>
7399
7400         * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7401         with an i686 compiler.
7402         * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7403         needed.
7404         * configure: Rebuilt.
7405
7406 2009-10-29  Sandra Loosemore  <[email protected]>
7407
7408         PR gdb/10783
7409
7410         * server.c (handle_search_memory_1): Correct read_addr initialization
7411         in loop for searching subsequent chunks.
7412
7413 2009-10-29  Paul Pluzhnikov  <[email protected]>
7414
7415         * configure.ac: New --with-libthread-db option.
7416         * thread-db.c: Allow direct dependence on libthread_db.
7417         (thread_db_free): Adjust.
7418         * config.in: Regenerate.
7419         * configure: Likewise.
7420
7421 2009-10-28  Paul Pluzhnikov  <[email protected]>
7422
7423         PR gdb/10757
7424         * thread-db.c (attach_thread): New function.
7425         (maybe_attach_thread): Return success/failure.
7426         (find_new_threads_callback): Adjust.
7427         (thread_db_find_new_threads): Loop until no new threads.
7428
7429 2009-10-13  Pedro Alves  <[email protected]>
7430
7431         * proc-service.c (ps_lgetregs): Formatting.
7432
7433 2009-10-08  Paul Pluzhnikov  <[email protected]>
7434
7435         * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7436         * configure.ac: Adjust.
7437         * linux-low.h (struct process_info_private): Move members to struct
7438         thread_db.
7439         (thread_db_free, thread_db_handle_monitor_command): New prototype.
7440         * linux-low.c (linux_remove_process): Adjust.
7441         (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7442         * server.c (handle_query): Move code ...
7443         (handle_monitor_command): ... here. New function.
7444         * target.h (struct target_ops): New member.
7445         * thread-db.c (struct thread_db): New.
7446         (libthread_db_search_path): New variable.
7447         (thread_db_create_event, thread_db_enable_reporting)
7448         (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7449         (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7450         (try_thread_db_load_1, dladdr_to_soname): New functions.
7451         (try_thread_db_load, thread_db_load_search): New functions.
7452         (thread_db_init): Search for libthread_db.
7453         (thread_db_free): New function.
7454         (thread_db_handle_monitor_command): Likewise.
7455         * config.in: Regenerate.
7456         * configure: Regenerate.
7457
7458 2009-09-27  Ulrich Weigand  <[email protected]>
7459
7460         * spu-low.c (spu_kill): Wait for inferior to terminate.
7461         Call clear_inferiors.
7462         (spu_detach): Call clear_inferiors.
7463
7464 2009-08-22  Ralf Wildenhues  <[email protected]>
7465
7466         * aclocal.m4: Regenerate.
7467         * config.in: Likewise.
7468         * configure: Likewise.
7469
7470 2009-07-31  Ulrich Weigand  <[email protected]>
7471
7472         * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7473         (parse_spufs_run): New function.
7474         (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7475         (ppc_breakpoint_at): Handle SPU breakpoints.
7476
7477 2009-07-31  Ulrich Weigand  <[email protected]>
7478
7479         * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7480         (SPUFS_MAGIC): Define.
7481         (spu_enumerate_spu_ids): New function.
7482         (linux_qxfer_spu): New function.
7483         (linux_target_ops): Install linux_qxfer_spu.
7484
7485 2009-07-31  Ulrich Weigand  <[email protected]>
7486
7487         * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7488         and powerpc-cell64l.o to srv_regobj.  Add rs6000/powerpc-cell32l.xml
7489         and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7490         * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7491         (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7492         (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7493         * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7494         (init_registers_powerpc_cell32l): Add prototype.
7495         (init_registers_powerpc_cell64l): Likewise.
7496         (ppc_arch_setup): Detect Cell/B.E. architecture.
7497
7498 2009-07-30  Ralf Wildenhues  <[email protected]>
7499
7500         * Makefile.in (datarootdir): New variable.
7501
7502 2009-07-28  Daniel Jacobowitz  <[email protected]>
7503
7504         * linux-low.c (linux_write_memory): Update debugging output.
7505         * Makefile.in (clean): Add new descriptions.
7506         (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7507         (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7508         * configure.srv: Add new files for arm*-*-linux*.
7509         * linux-arm-low.c: Add new declarations.
7510         (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7511         (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7512         (HWCAP_VFPv3D16): New.
7513         (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7514         instead of __IWMMXT__.
7515         (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7516         (arm_arch_setup): New.
7517         (target_regsets): Remove #ifdef.  Add VFP regset.
7518         (the_low_target): Use arm_arch_setup.
7519
7520 2009-07-28  Daniel Jacobowitz  <[email protected]>
7521
7522         * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7523         the main thread again.
7524
7525 2009-07-06  Aleksandar Ristovski  <[email protected]>
7526
7527         Adding Neutrino gdbserver.
7528         * configure: Regenerated.
7529         * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7530         * configure.srv (i[34567]86-*-nto*): New target.
7531         * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7532         * remote-utils.c [__QNX__]: Include sys/iomgr.h
7533         (nto_comctrl) [__QNX__]: New function.
7534         (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7535
7536 2009-07-05  Danny Backx  <[email protected]>
7537
7538         * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7539         srv_tgtobj.
7540
7541 2009-07-04  Danny Backx  <[email protected]>
7542             Pedro Alves  <[email protected]>
7543
7544         * win32-i386-low.c (i386_get_thread_context): Handle systems that
7545         don't support CONTEXT_EXTENDED_REGISTERS.
7546         (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7547         (the_low_target): Install them.
7548         * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7549         failing with ERROR_PIPE_NOT_CONNECTED.
7550
7551 2009-06-30  Doug Evans  <[email protected]>
7552             Pierre Muller  <[email protected]>
7553
7554         Add h/w watchpoint support to x86-linux, win32-i386.
7555         * Makefile.in (SFILES): Add i386-low.c
7556         (i386_low_h): Define.
7557         (i386-low.o): Add dependencies.
7558         (linux-x86-low.o): Add i386-low.h dependency.
7559         (win32-i386-low.o): Ditto.
7560         * i386-low.c: New file.
7561         * i386-low.h: New file.
7562         * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7563         (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7564         * linux-low.c (linux_add_process): Initialize arch_private.
7565         (linux_remove_process): Free arch_private.
7566         (add_lwp): Initialize arch_private.
7567         (delete_lwp): Free arch_private.
7568         (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7569         provided.
7570         * linux-low.h (process_info_private): New member arch_private.
7571         (lwp_info): New member arch_private.
7572         (linux_target_ops): New members new_process, new_thread,
7573         prepare_to_resume.
7574         (ptid_of): New macro.
7575         * linux-x86-low.c: Include stddef.h, i386-low.h.
7576         (arch_process_info): New struct.
7577         (arch_lwp_info): New struct.
7578         (x86_linux_dr_get, x86_linux_dr_set): New functions.
7579         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7580         (i386_dr_low_get_status): New function.
7581         (x86_insert_point, x86_remove_point): New functions.
7582         (x86_stopped_by_watchpoint): New function.
7583         (x86_stopped_data_address): New function.
7584         (x86_linux_new_process, x86_linux_new_thread): New functions.
7585         (x86_linux_prepare_to_resume): New function.
7586         (the_low_target): Add entries for insert_point, remove_point,
7587         stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7588         prepare_to_resume.
7589         * server.c (debug_hw_points): New global.
7590         (monitor_show_help): Document set debug-hw-points.
7591         (handle_query): Process "set debug-hw-points".
7592         * server.h (debug_hw_points): Declare.
7593         (paddress): Declare.
7594         * utils.c (NUMCELLS, CELLSIZE): New macros.
7595         (get_sell, xsnprintf, paddress): New functions.
7596         * win32-arm-low.c (the_low_target): Add entries for insert_point,
7597         remove_point, stopped_by_watchpoint, stopped_data_address.
7598         * win32-i386-low.c: Include i386-low.h.
7599         (debug_reg_state): Replaces dr.
7600         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7601         (i386_dr_low_get_status): New function.
7602         (i386_insert_point, i386_remove_point): New functions.
7603         (i386_stopped_by_watchpoint): New function.
7604         (i386_stopped_data_address): New function.
7605         (i386_initial_stuff): Update.
7606         (get_thread_context,set_thread_context,i386_thread_added): Update.
7607         (the_low_target): Add entries for insert_point,
7608         remove_point, stopped_by_watchpoint, stopped_data_address.
7609         * win32-low.c (win32_insert_watchpoint): New function.
7610         (win32_remove_watchpoint): New function.
7611         (win32_stopped_by_watchpoint): New function.
7612         (win32_stopped_data_address): New function.
7613         (win32_target_ops): Add entries for insert_watchpoint,
7614         remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
7615         * win32-low.h (win32_target_ops): New members insert_point,
7616         remove_point, stopped_by_watchpoint, stopped_data_address.
7617
7618 2009-06-25  Pedro Alves  <[email protected]>
7619
7620         * server.c (process_serial_event): Re-return unsupported, not
7621         error, if the type isn't recognized.  Re-allow supporting only
7622         insert or remove packets.  Also call require_running for
7623         breakpoints.  Add missing break statement to default case.  Tidy.
7624         * target.h (struct target_ops): Rename insert_watchpoint to
7625         insert_point, and remove_watchpoint to remove_point.
7626
7627         * linux-low.h (struct linux_target_ops): Likewise.
7628         * linux-low.c (linux_insert_watchpoint): Rename to ...
7629         (linux_insert_point): ... this.  Adjust.
7630         (linux_remove_watchpoint): Rename to ...
7631         (linux_remove_point): ... this.  Adjust.
7632         (linux_target_ops): Adjust.
7633         * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
7634         (cris_insert_point): ... this.
7635         (cris_remove_watchpoint): Rename to ...
7636         (cris_remove_point): ... this.
7637         (the_low_target): Adjust.
7638
7639 2009-06-24  Pierre Muller  <[email protected]>
7640
7641         * server.c (handle_v_kill): Pass signal_pid to
7642         kill_inferior if multi_process is zero.
7643
7644 2009-06-23  Aleksandar Ristovski  <[email protected]>
7645
7646         * server.c (process_serial_event): Add support for Z0 and Z1 packet.
7647         * target.h (target_ops): Comment for *_watchpoint to make it clear
7648         the functions can get types '0' and '1'.
7649
7650 2009-06-22  Aleksandar Ristovski  <[email protected]>
7651
7652         * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
7653         * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
7654         * regcache.c (get_regcache): Likewise.
7655         * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
7656         * win32-low.c (child_fetch_inferior_registers): Remove check for
7657         regno 0.
7658
7659 2009-06-19  Aleksandar Ristovski  <[email protected]>
7660             Pedro Alves <[email protected]>
7661
7662         * target.h (struct target_ops) <supports_multi_process>: New
7663         callback.
7664         (target_supports_multi_process): New.
7665         * server.c (handle_query): Even if GDB reports support, only
7666         enable multi-process if the target also supports it.  Report
7667         multi-process support only if the target backend supports it.
7668         * linux-low.c (linux_supports_multi_process): New function.
7669         (linux_target_ops): Install it as target_supports_multi_process
7670         callback.
7671
7672 2009-05-24  Doug Evans  <[email protected]>
7673
7674         Global renaming of find_thread_pid to find_thread_ptid.
7675         * server.h (find_thread_ptid): Renamed from find_thread_pid.
7676         * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
7677         All callers updated.
7678
7679         * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
7680         to resume the newly created thread, don't call ptrace (PTRACE_CONT)
7681         directly.
7682
7683         * linux-low.c (get_stop_pc): Print pc if debug_threads.
7684         (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
7685         (linux_resume_one_lwp): Ditto.
7686
7687 2009-05-23  Doug Evans  <[email protected]>
7688
7689         * linux-low.c (linux_resume_one_lwp): Change type of first arg
7690         from struct inferior_list_entry * to struct lwp_info *.
7691         All callers updated.
7692
7693 2009-05-13  Doug Evans  <[email protected]>
7694
7695         * linux-x86-low.c: Don't include assert.h.
7696         (x86_siginfo_fixup): Use fatal, not assert.
7697         (x86_arch_setup): Fix comment.
7698
7699 2009-05-12  Doug Evans  <[email protected]>
7700
7701         Biarch support for i386/amd64 gdbserver.
7702         * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
7703         Add linux-x86-low.c.
7704         (linux-i386-low.o, linux-x86-64-low.o): Delete.
7705         (linux-x86-low.o): Add.
7706         * linux-x86-64-low.c: Delete.
7707         * linux-i386-low.c: Delete.
7708         * linux-x86-low.c: New file.
7709         * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
7710         linux-x86-low.o.
7711         (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
7712         linux-x86-low.o.
7713         (x86_64-linux srv_regobj): Add reg-i386-linux.o.
7714         * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
7715         (linux_child_pid_to_exec_file): New function.
7716         (elf_64_header_p, elf_64_file_p): New functions.
7717         (siginfo_fixup): New function.
7718         (linux_xfer_siginfo): New local inf_siginfo.  Call siginfo_fixup to
7719         give target a chance to convert layout.
7720         * linux-low.h (linux_target_ops): New member siginfo_fixup.
7721         (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
7722
7723 2009-05-07  Doug Evans  <[email protected]>
7724
7725         * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
7726         (regsets_store_inferior_registers): Ditto.
7727
7728 2009-05-06  Pedro Alves  <[email protected]>
7729
7730         PR server/10048
7731
7732         * linux-low.c (must_set_ptrace_flags): Delete.
7733         (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
7734         of the global.
7735         (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here.  Set
7736         `lwp->must_set_ptrace_flags' instead.
7737         (linux_wait_for_event_1): Set ptrace options here.
7738         (linux_wait_1): ... not here.
7739
7740 2009-04-30  Doug Evans  <[email protected]>
7741
7742         * inferiors.c (started_inferior_callback): New function.
7743         (attached_inferior_callback): New function.
7744         (have_started_inferiors_p, have_attached_inferiors_p): New functions.
7745         * server.c (print_started_pid, print_attached_pid): New functions.
7746         (detach_or_kill_for_exit): New function.
7747         (main): Call it instead of for_each_inferior (kill_inferior_callback).
7748         * server.h (have_started_inferiors_p): Declare.
7749         (have_attached_inferiors_p): Declare.
7750
7751         * inferiors.c (remove_process): Fix memory leak, free process.
7752         * linux-low.c (linux_remove_process): New function.
7753         (linux_kill): Call it instead of remove_process.
7754         (linux_detach, linux_wait_1): Ditto.
7755
7756 2009-04-19  Danny Backx  <[email protected]>
7757
7758         * configure.srv: Add x86 Windows CE target.
7759
7760 2009-04-03  Ulrich Weigand  <[email protected]>
7761
7762         * inferiors.c (get_thread_process): Make global.
7763         * server.h (get_thread_process): Add prototype.
7764         * thread-db.c (find_one_thread): Use get_thread_process
7765         instead of current_process.
7766         (thread_db_get_tls_address): Do not crash if called when
7767         thread layer is not yet initialized.
7768
7769 2009-04-03  Ulrich Weigand  <[email protected]>
7770
7771         * remote-utils.c (prepare_resume_reply): Null-terminate packet.
7772         * spu-low.c (current_tid): Rename to ...
7773         (current_ptid): ... this.
7774         (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
7775         spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
7776         ptid_get_lwp (current_ptid) instead of current_tid.
7777         (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
7778         instead of current_tid.  Use find_process_pid to verify pid
7779         argument is valid.  Pass proper argument to remove_process.
7780         (spu_thread_alive): Compare current_ptid instead of current_tid.
7781         (spu_resume): Likewise.
7782
7783 2009-04-02  Pedro Alves  <[email protected]>
7784
7785         * linux-low.c (usr_store_inferior_registers): Declare local `pid'
7786         variable.
7787
7788 2009-04-01  Pedro Alves  <[email protected]>
7789
7790         Implement the multiprocess extensions, and add linux multiprocess
7791         support.
7792
7793         * server.h (ULONGEST): Declare.
7794         (struct ptid, ptid_t): New.
7795         (minus_one_ptid, null_ptid): Declare.
7796         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7797         (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
7798         (struct inferior_list_entry): Change `id' type from unsigned from
7799         to ptid_t.
7800         (struct sym_cache, struct breakpoint, struct
7801         process_info_private): Forward declare.
7802         (struct process_info): Declare.
7803         (current_process): Declare.
7804         (all_processes): Declare.
7805         (initialize_inferiors): Declare.
7806         (add_thread): Adjust to use ptid_t.
7807         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
7808         (add_process, remove_process, find_thread_pid): Declare.
7809         (find_inferior_id): Adjust to use ptid_t.
7810         (cont_thread, general_thread, step_thread): Change type to ptid_t.
7811         (multi_process): Declare.
7812         (push_event): Adjust to use ptid_t.
7813         (read_ptid, write_ptid): Declare.
7814         (prepare_resume_reply): Adjust to use ptid_t.
7815         (clear_symbol_cache): Declare.
7816         * inferiors.c (all_processes): New.
7817         (null_ptid, minus_one_ptid): New.
7818         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7819         (ptid_get_tid, ptid_equal, ptid_is_pid): New.
7820         (add_thread): Change unsigned long to ptid.  Remove gdb_id
7821         parameter.  Adjust.
7822         (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
7823         (gdb_id_to_thread): Rename to ...
7824         (find_thread_pid): ... this.  Change unsigned long to ptid.
7825         (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
7826         (loaded_dll, pull_pid_from_list): Adjust.
7827         (add_process, remove_process, find_process_pid)
7828         (get_thread_process, current_process, initialize_inferiors): New.
7829         * target.h (struct thread_resume) <thread>: Change type to ptid_t.
7830         (struct target_waitstatus) <related_pid>: Ditto.
7831         (struct target_ops) <kill, detach>: Add `pid' argument.  Change
7832         return type to int.
7833         (struct target_ops) <join>: Add `pid' argument.
7834         (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
7835         (struct target_ops) <wait>: Add `ptid' field.  Change return type
7836         to ptid.
7837         (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
7838         (mywait): Add `ptid' argument.  Change return type to ptid_t.
7839         (target_pid_to_str): Declare.
7840         * target.c (set_desired_inferior): Adjust to use ptids.
7841         (mywait): Add new `ptid' argument.  Adjust.
7842         (target_pid_to_str): New.
7843         * mem-break.h (free_all_breakpoints): Declare.
7844         * mem-break.c (breakpoints): Delelete.
7845         (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
7846         (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
7847         to use per-process breakpoint list.
7848         (free_all_breakpoints): New.
7849         * remote-utils.c (struct sym_cache) <name>: Drop `const'.
7850         (symbol_cache, all_symbols_looked_up): Delete.
7851         (hexchars): New.
7852         (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
7853         read_ptid): New.
7854         (prepare_resume_reply): Change ptid argument's type from unsigned
7855         long to ptid_t.  Adjust.  Implement W;process and X;process.
7856         (free_sym_cache, clear_symbol_cache): New.
7857         (look_up_one_symbol): Adjust to per-process symbol cache.  *
7858         * server.c (cont_thread, general_thread, step_thread): Change type
7859         to ptid_t.
7860         (attached): Delete.
7861         (multi_process): New.
7862         (last_ptid): Change type to ptid_t.
7863         (struct vstop_notif) <ptid>: Change type to ptid_t.
7864         (queue_stop_reply, push_event): Change `ptid' argument's type to
7865         ptid_t.
7866         (discard_queued_stop_replies): Add `pid' argument.
7867         (start_inferior): Adjust to use ptids.  Adjust to mywait interface
7868         changes.  Don't reference the `attached' global.
7869         (attach_inferior): Adjust to mywait interface changes.
7870         (handle_query): Adjust to use ptids.  Parse GDB's qSupported
7871         features.  Handle and report "multiprocess+".  Handle
7872         "qAttached:PID".
7873         (handle_v_cont): Adjust to use ptids.  Adjust to mywait interface
7874         changes.
7875         (handle_v_kill): New.
7876         (handle_v_stopped): Adjust to use target_pid_to_str.
7877         (handle_v_requests): Allow multiple attaches and runs when
7878         multiprocess extensions are in effect.  Handle "vKill".
7879         (myresume): Adjust to use ptids.
7880         (queue_stop_reply_callback): Add `arg' parameter.  Handle it.
7881         (handle_status): Adjust to discard_queued_stop_replies interface
7882         change.
7883         (first_thread_of, kill_inferior_callback)
7884         (detach_or_kill_inferior_callback, join_inferiors_callback): New.
7885         (main): Call initialize_inferiors.  Adjust to use ptids, killing
7886         and detaching from all inferiors.  Handle multiprocess packet
7887         variants.
7888         * linux-low.h: Include gdb_proc_service.h.
7889         (struct process_info_private): New.
7890         (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
7891         <lwpid_of>: Use ptid_get_lwp.
7892         (get_lwp_thread): Adjust.
7893         (struct lwp_info): Add `dead' member.
7894         (find_lwp_pid): Declare.
7895         * linux-low.c (thread_db_active): Delete.
7896         (new_inferior): Adjust comment.
7897         (inferior_pid): Delete.
7898         (linux_add_process): New.
7899         (handle_extended_wait): Adjust.
7900         (add_lwp): Change unsigned long to ptid.
7901         (linux_create_inferior): Add process to processes table.  Adjust
7902         to use ptids.  Don't set new_inferior here.
7903         (linux_attach_lwp): Rename to ...
7904         (linux_attach_lwp_1): ... this.  Add `initial' argument.  Handle
7905         it.  Adjust to use ptids.
7906         (linux_attach_lwp): New.
7907         (linux_attach): Add process to processes table.  Don't set
7908         new_inferior here.
7909         (struct counter): New.
7910         (second_thread_of_pid_p, last_thread_of_process_p): New.
7911         (linux_kill_one_lwp): Add `args' parameter.  Handle it.  Adjust to
7912         multiple processes.
7913         (linux_kill): Add `pid' argument.  Handle it.  Adjust to multiple
7914         processes.  Remove process from process table.
7915         (linux_detach_one_lwp): Add `args' parameter.  Handle it.  Adjust
7916         to multiple processes.
7917         (any_thread_of): New.
7918         (linux_detach): Add `pid' argument, and handle it.  Remove process
7919         from processes table.
7920         (linux_join): Add `pid' argument.  Handle it.
7921         (linux_thread_alive): Change unsighed long argument to ptid_t.
7922         Consider dead lwps as not being alive.
7923         (status_pending_p): Rename `dummy' argument to `arg'.  Filter out
7924         threads we're not interested in.
7925         (same_lwp, find_lwp_pid): New.
7926         (linux_wait_for_lwp): Change `pid' argument's type from int to
7927         ptid_t.  Adjust.
7928         (linux_wait_for_event): Rename to ...
7929         (linux_wait_for_event_1): ... this.  Change `pid' argument's type
7930         from int to ptid_t.  Adjust.
7931         (linux_wait_for_event): New.
7932         (linux_wait_1): Add `ptid' argument.  Change return type to
7933         ptid_t.  Adjust.  Use last_thread_of_process_p.  Remove processes
7934         that exit from the process table.
7935         (linux_wait): Add `ptid' argument.  Change return type to ptid_t.
7936         Adjust.
7937         (mark_lwp_dead): New.
7938         (wait_for_sigstop): Adjust to use ptids.  If a process exits while
7939         stopping all threads, mark its main lwp as dead.
7940         (linux_set_resume_request, linux_resume_one_thread): Adjust to use
7941         ptids.
7942         (fetch_register, usr_store_inferior_registers)
7943         (regsets_fetch_inferior_registers)
7944         (regsets_store_inferior_registers, linux_read_memory)
7945         (linux_write_memory): Inline `inferior_pid'.
7946         (linux_look_up_symbols): Adjust to use per-process
7947         `thread_db_active'.
7948         (linux_request_interrupt): Adjust to use ptids.
7949         (linux_read_auxv): Inline `inferior_pid'.
7950         (initialize_low): Don't reference thread_db_active.
7951         * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
7952         * proc-service.c (ps_lgetregs): Use find_lwp_pid.
7953         (ps_getpid): Return the pid of the current inferior.
7954         * thread-db.c (proc_handle, thread_agent): Delete.
7955         (thread_db_create_event, thread_db_enable_reporting): Adjust to
7956         per-process data.
7957         (find_one_thread): Change argument type to ptid_t.  Adjust to
7958         per-process data.
7959         (maybe_attach_thread): Adjust to per-process data and ptids.
7960         (thread_db_find_new_threads): Ditto.
7961         (thread_db_init): Ditto.
7962         * spu-low.c (spu_create_inferior, spu_attach): Add process to
7963         processes table.  Adjust to use ptids.
7964         (spu_kill, spu_detach): Adjust interface.  Remove process from
7965         processes table.
7966         (spu_join, spu_thread_alive): Adjust interface.
7967         (spu_wait): Adjust interface.  Remove process from processes
7968         table.  Adjust to use ptids.
7969         * win32-low.c (current_inferior_tid): Delete.
7970         (current_inferior_ptid): New.
7971         (debug_event_ptid): New.
7972         (thread_rec): Take a ptid.  Adjust.
7973         (child_add_thread): Add `pid' argument.  Adjust to use ptids.
7974         (child_delete_thread): Ditto.
7975         (do_initial_child_stuff): Add `attached' argument.  Add process to
7976         processes table.
7977         (child_fetch_inferior_registers, child_store_inferior_registers):
7978         Adjust.
7979         (win32_create_inferior): Pass 0 to do_initial_child_stuff.
7980         (win32_attach): Pass 1 to do_initial_child_stuff.
7981         (win32_kill): Adjust interface.  Remove process from processes
7982         table.
7983         (win32_detach): Ditto.
7984         (win32_join): Adjust interface.
7985         (win32_thread_alive): Take a ptid.
7986         (win32_resume): Adjust to use ptids.
7987         (get_child_debug_event): Ditto.
7988         (win32_wait): Adjust interface.  Remove exiting process from
7989         processes table.
7990
7991 2009-04-01  Pedro Alves  <[email protected]>
7992
7993         Non-stop mode support.
7994
7995         * server.h (non_stop): Declare.
7996         (gdb_client_data, handler_func): Declare.
7997         (delete_file_handler, add_file_handler, start_event_loop):
7998         Declare.
7999         (handle_serial_event, handle_target_event, push_event)
8000         (putpkt_notif): Declare.
8001         * target.h (enum resume_kind): New.
8002         (struct thread_resume): Replace `step' field by `kind' field.
8003         (TARGET_WNOHANG): Define.
8004         (struct target_ops) <wait>: Add `options' argument.
8005         <supports_non_stop, async, start_non_stop>: New fields.
8006         (target_supports_non_stop, target_async): New.
8007         (start_non_stop): Declare.
8008         (mywait): Add `options' argument.
8009         * target.c (mywait): Add `options' argument.  Print child exit
8010         notifications here.
8011         (start_non_stop): New.
8012         * server.c (non_stop, own_buf, mem_buf): New globals.
8013         (struct vstop_notif): New.
8014         (notif_queue): New global.
8015         (queue_stop_reply, push_event, discard_queued_stop_replies)
8016         (send_next_stop_reply): New.
8017         (start_inferior): Adjust to use resume_kind.  Adjust to mywait
8018         interface changes.
8019         (attach_inferior): In non-stop mode, don't wait for the target
8020         here.
8021         (handle_general_set): Handle QNonStop.
8022         (handle_query): When handling qC, return the current general
8023         thread, instead of the first thread of the list.
8024         (handle_query): If the backend supports non-stop mode, include
8025         QNonStop+ in the qSupported query response.
8026         (handle_v_cont): Adjust to use resume_kind.  Handle resume_stop
8027         and non-stop mode.
8028         (handle_v_attach, handle_v_run): Handle non-stop mode.
8029         (handle_v_stopped): New.
8030         (handle_v_requests): Report support for vCont;t.  Handle vStopped.
8031         (myresume): Adjust to use resume_kind.  Handle non-stop.
8032         (queue_stop_reply_callback): New.
8033         (handle_status): Handle non-stop mode.
8034         (main): Clear non_stop flag on reconnection.  Use the event-loop.
8035         Refactor serial protocol handling from here ...
8036         (process_serial_event): ... to this new function.  When GDB
8037         selects any thread, select one here.  In non-stop mode, wait until
8038         GDB acks all pending events before exiting.
8039         (handle_serial_event, handle_target_event): New.
8040         * remote-utils.c (remote_open): Install remote_desc in the event
8041         loop.
8042         (remote_close): Remove remote_desc from the event loop.
8043         (putpkt_binary): Rename to...
8044         (putpkt_binary_1): ... this.  Add `is_notic' argument.  Handle it.
8045         (putpkt_binary): New as wrapper around putpkt_binary_1.
8046         (putpkt_notif): New.
8047         (prepare_resume_reply): In non-stop mode, don't change the
8048         general_thread.
8049         * event-loop.c: New.
8050         * Makefile.in (OBJ): Add event-loop.o.
8051         (event-loop.o): New rule.
8052
8053         * linux-low.h (pid_of): Moved here.
8054         (lwpid_of): New.
8055         (get_lwp_thread): Use lwpid_of.
8056         (struct lwp_info): Delete `lwpid' field.  Add `suspended' field.
8057         * linux-low.c (pid_of): Delete.
8058         (inferior_pid): Use lwpid_of.
8059         (linux_event_pipe): New.
8060         (target_is_async_p): New.
8061         (delete_lwp): New.
8062         (handle_extended_wait): Use lwpid_of.
8063         (add_lwp): Don't set lwpid field.
8064         (linux_attach_lwp): Adjust debug output.  Use lwpid_of.
8065         (linux_kill_one_lwp): If killing a running lwp, stop it first.
8066         Use lwpid_of.  Adjust to linux_wait_for_event interface changes.
8067         (linux_detach_one_lwp): If detaching from a running lwp, stop it
8068         first.  Adjust to linux_wait_for_event interface changes.  Use
8069         lwpid_of.
8070         (linux_detach): Don't delete the main lwp here.
8071         (linux_join): Use my_waitpid.  Avoid signal_pid.  Use lwpid_of.
8072         (status_pending_p): Don't consider explicitly suspended lwps.
8073         (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
8074         pointer.  Add OPTIONS argument.  Change return type to int.  Use
8075         my_waitpid instead of sleeping.  Handle WNOHANG.  Use lwpid_of.
8076         (linux_wait_for_event): Take an integer pid instead of a lwp_info
8077         pointer.  Add status pointer argument.  Return a pid instead of a
8078         status.  Use lwpid_of.  Adjust to linux_wait_for_lwp interface
8079         changes.  In non-stop mode, don't switch to a random thread.
8080         (linux_wait): Rename to...
8081         (linux_wait_1): ... this.  Add target_options argument, and handle
8082         it.  Adjust to use resume_kind.  Use lwpid_of.  In non-stop mode,
8083         don't handle the continue thread.  Handle TARGET_WNOHANG.  Merge
8084         clean exit and signal exit code.  Don't stop all threads in
8085         non-stop mode.  In all-stop mode, only stop all threads when
8086         reporting a stop to GDB.  Handle explicit thread stop requests.
8087         (async_file_flush, async_file_mark): New.
8088         (linux_wait): New.
8089         (send_sigstop): Use lwpid_of.
8090         (wait_for_sigstop): Use lwpid_of.  Adjust to linux_wait_for_event
8091         interface changes.  In non-stop mode, don't switch to a random
8092         thread.
8093         (linux_resume_one_lwp): Use lwpid_of.
8094         (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
8095         (linux_resume_one_thread): ... this.  Handle resume_stop.  In
8096         non-stop mode, don't look for pending flag in all threads.
8097         (resume_status_pending_p): Don't consider explicitly suspended
8098         threads.
8099         (my_waitpid): Reimplement.  Emulate __WALL.
8100         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8101         Use lwpid_of.
8102         (sigchld_handler, linux_supports_non_stop, linux_async)
8103         (linux_start_non_stop): New.
8104         (linux_target_ops): Register linux_supports_non_stop, linux_async
8105         and linux_start_non_stop.
8106         (initialize_low): Install SIGCHLD handler.
8107         * thread-db.c (thread_db_create_event, find_one_thread)
8108         (thread_db_get_tls_address): Use lwpid_of.
8109         * win32-low.c (win32_detach): Adjust to use resume_kind.
8110         (win32_wait): Add `options' argument.
8111         * spu-low.c (spu_resume): Adjust to use resume_kind.
8112         (spu_wait): Add `options' argument.
8113
8114 2009-04-01  Pedro Alves  <[email protected]>
8115
8116         Decouple target code from remote protocol.
8117
8118         * target.h (enum target_waitkind): New.
8119         (struct target_waitstatus): New.
8120         (struct target_ops) <wait>: Return an unsigned long.  Take a
8121         target_waitstatus pointer instead of a char pointer.
8122         (mywait): Likewise.
8123         * target.c (mywait): Change prototype to return an unsigned long.
8124         Take a target_waitstatus pointer instead of a char pointer.  Adjust.
8125         * server.h (thread_from_wait, old_thread_from_wait): Delete
8126         declarations.
8127         (prepare_resume_reply): Change prototype to take a
8128         target_waitstatus.
8129         * server.c (thread_from_wait, old_thread_from_wait): Delete.
8130         (last_status, last_ptid): New.
8131         (start_inferior): Remove "statusptr" argument.  Adjust.  Return a
8132         pid instead of a signal.
8133         (attach_inferior): Remove "status" and "signal" parameters.
8134         Adjust.
8135         (handle_query): For qGetTLSAddr, parse the thread id with strtol,
8136         not as an address.
8137         (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
8138         (handle_v_requests, myresume): Remove "status" and "signal"
8139         parameters.  Adjust.
8140         (handle_status): New.
8141         (main): Delete local `status'.  Adjust.
8142         * remote-utils.c: Include target.h.
8143         (prepare_resume_reply): Change prototype to take a
8144         target_waitstatus.  Adjust.
8145
8146         * linux-low.c (linux_wait): Adjust to new target_ops->wait
8147         interface.
8148         * spu-low.c (spu_wait): Adjust.
8149         * win32-low.c (enum target_waitkind, struct target_waitstatus):
8150         Delete.
8151         (win32_wait): Adjust.
8152
8153 2009-04-01  Pedro Alves  <[email protected]>
8154
8155         * target.h (struct thread_resume): Delete leave_stopped member.
8156         (struct target_ops): Add a `n' argument to the `resume' callback.
8157         * server.c (start_inferior): Adjust.
8158         (handle_v_cont, myresume): Adjust.
8159         * linux-low.c (check_removed_breakpoint): Adjust to resume
8160         interface change, and to removed leave_stopped field.
8161         (resume_ptr): Delete.
8162         (struct thread_resume_array): New.
8163         (linux_set_resume_request): Add new `arg' parameter.  Adjust to
8164         resume interface change.
8165         (linux_continue_one_thread, linux_queue_one_thread)
8166         (resume_status_pending_p): Check if the resume field is NULL
8167         instead of checking the leave_stopped member.
8168         (linux_resume): Adjust to the target resume interface change.
8169         * spu-low.c (spu_resume): Adjust to the target resume interface
8170         change.
8171         * win32-low.c (win32_detach, win32_resume): Ditto.
8172
8173 2009-04-01  Pedro Alves  <[email protected]>
8174
8175         * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
8176         flag.
8177         (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
8178         pending.
8179         (linux_continue_one_thread): Only preserve the stepping flag if
8180         there's a pending breakpoint.
8181
8182 2009-03-31  Pedro Alves  <[email protected]>
8183
8184         * server.c (main): After the inferior having exited, call
8185         remote_close before exiting gdbserver.
8186
8187 2009-03-25  Thiago Jung Bauermann  <[email protected]>
8188
8189         Fix size of FPSCR in Power 7 processors.
8190         * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
8191         (PPC_FEATURE_HAS_DFP): New #define.
8192         (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
8193         size of the FPSCR.
8194
8195 2009-03-23  Pedro Alves  <[email protected]>
8196
8197         * server.c (handle_query) Whitespace and formatting.
8198
8199 2009-03-22  Pedro Alves  <[email protected]>
8200
8201         * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
8202         linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
8203         linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
8204         linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
8205         regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
8206         thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
8207         Makefile.in, configure.ac: Fix whitespace throughout.
8208         * configure: Regenerate.
8209
8210 2009-03-22  Pedro Alves  <[email protected]>
8211
8212         * inferiors.c (find_inferior): Make it safe for the callback
8213         function to delete the currently iterated inferior.
8214
8215 2009-03-22  Pedro Alves  <[email protected]>
8216
8217         * Makefile.in (linuw_low_h): Move higher.
8218         (thread-db.o): Depend on $(linux_low_h).
8219
8220 2009-03-17  Pedro Alves  <[email protected]>
8221
8222         Rename "process" to "lwp" throughout.
8223
8224         * linux-low.c (all_processes): Rename to...
8225         (all_lwps): ... this.
8226         (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
8227         (add_process): Rename to ...
8228         (add_lwp): ... this.  Adjust.
8229         (linux_create_inferior): Adjust.
8230         (linux_attach_lwp): Adjust.
8231         (linux_attach): Adjust.
8232         (linux_kill_one_process): Rename to ...
8233         (linux_kill_one_lwp): ... this.  Adjust.
8234         (linux_kill): Adjust.
8235         (linux_detach_one_process): Rename to ...
8236         (linux_detach_one_lwp): ... this.  Adjust.
8237         (linux_detach): Adjust.
8238         (check_removed_breakpoint): Adjust.
8239         (status_pending_p): Adjust.
8240         (linux_wait_for_process): Rename to ...
8241         (linux_wait_for_lwp): ... this.  Adjust.
8242         (linux_wait_for_event): Adjust.
8243         (send_sigstop): Adjust.
8244         (wait_for_sigstop): Adjust.
8245         (stop_all_processes): Rename to ...
8246         (stop_all_lwps): ... this.
8247         (linux_resume_one_process): Rename to ...
8248         (linux_resume_one_lwp): ... this.  Adjust.
8249         (linux_set_resume_request, linux_continue_one_thread)
8250         (linux_queue_one_thread, resume_status_pending_p)
8251         (usr_store_inferior_registers, regsets_store_inferior_registers)
8252         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
8253         Adjust.
8254         * linux-low.h (get_process): Rename to ...
8255         (get_lwp): ... this.  Adjust.
8256         (get_thread_process): Rename to ...
8257         (get_thread_lwp): ... this.  Adjust.
8258         (get_process_thread): Rename to ...
8259         (get_lwp_thread): ... this.  Adjust.
8260         (struct process_info): Rename to ...
8261         (struct lwp_info): ... this.
8262         (all_processes): Rename to ...
8263         (all_lwps): ... this.
8264         * proc-service.c (ps_lgetregs): Adjust.
8265         * thread-db.c (thread_db_create_event, find_one_thread)
8266         (maybe_attach_thread, thread_db_get_tls_address): Adjust.
8267
8268 2009-03-14  Pedro Alves  <[email protected]>
8269
8270         * server.c (handle_query): Handle "qAttached".
8271
8272 2009-03-13  Nathan Sidwell  <[email protected]>
8273
8274         * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
8275         GPLv3, update license URL.
8276
8277 2009-03-01  Doug Evans  <[email protected]>
8278
8279         * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
8280         (server_h): Add gdb_signals.h.
8281         (signals.o): Update.
8282         * server.h (target_signal_from_host,target_signal_to_host_p)
8283         (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
8284
8285 2009-02-14  Pierre Muller  <[email protected]>
8286
8287         * remote-utils.c (getpkt): Also generate remote-debug
8288         information if noack_mode is set.
8289
8290 2009-02-06  Pedro Alves  <[email protected]>
8291
8292         * server.c (handle_query): Report qXfer:siginfo:read and
8293         qXfer:siginfo:write as supported and handle them.
8294         * target.h (struct target_ops) <qxfer_siginfo>: New field.
8295         * linux-low.c (linux_xfer_siginfo): New.
8296         (linux_target_ops): Set it.
8297
8298 2009-01-26  Pedro Alves  <[email protected]>
8299
8300         * server.c (gdbserver_usage): Mention --remote-debug.
8301         (main): Accept '--remote-debug' switch.
8302
8303 2009-01-18  Doug Evans  <[email protected]>
8304
8305         * regcache.c (new_register_cache): No need to check result of xcalloc.
8306         * server.c (handle_search_memory): Back out calls to xmalloc,
8307         result is checked and error is returned to user upon failure.
8308         (handle_query): Ditto.  Add more checks for result of malloc.
8309         (handle_v_cont): Check result of malloc, report error back to
8310         user upon failure.
8311         (handle_v_run): Ditto.  Call freeargv.
8312         * server.h (freeargv): Declare.
8313         * utils.c (freeargv): New fn.
8314
8315 2009-01-15  Doug Evans  <[email protected]>
8316
8317         * gdbreplay.c (perror_with_name): Make arg const char *.
8318         * server.h (target_signal_to_name): Make return type const char *.
8319         * thread-db.c (thread_db_err_str): Make return type const char *.
8320         * utils.c (perror_with_name): Make arg const char *.
8321
8322 2009-01-14  Pedro Alves  <[email protected]>
8323
8324         * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8325         when handling a EXIT_PROCESS_DEBUG_EVENT.
8326
8327 2009-01-06  Joel Brobecker  <[email protected]>
8328
8329         * gdbreplay.c (gdbreplay_version): Update copyright year.
8330         * server.c (gdbserver_version): Likewise.
8331
8332 2009-01-05  Doug Evans  <[email protected]>
8333
8334         * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
8335         (handle_extended_wait): Improve comment.
8336
8337 2008-12-13  Doug Evans  <[email protected]>
8338
8339         * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8340         * server.h (ATTR_MALLOC): New macro.
8341         (xmalloc,xcalloc,xstrdup): Declare.
8342         * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8343         * inferiors.c: Ditto.
8344         * linux-low.c: Ditto.
8345         * mem-break.c: Ditto.
8346         * regcache.c: Ditto.
8347         * remote-utils.c: Ditto.
8348         * server.c: Ditto.
8349         * target.c: Ditto.
8350         * win32-low.c: Ditto.
8351
8352 2008-12-12  Doug Evans  <[email protected]>
8353
8354         * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8355         in debugging printf.
8356
8357         * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8358
8359 2008-12-09  Doug Evans  <[email protected]>
8360
8361         * linux-low.h (struct process_info): Delete member tid, unused.
8362         * thread-db.c (find_one_thread): Update.
8363         (maybe_attach_thread): Update.
8364
8365 2008-12-02  Pedro Alves  <[email protected]>
8366
8367         * target.h (struct target_ops): Add qxfer_osdata member.
8368         * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8369         and dirent.h.
8370         (linux_qxfer_osdata): New functions.
8371         (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8372         callback.
8373         * server.c (handle_query): Handle "qXfer:osdata:read:".
8374         * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8375         (buffer_xml_printf): New functions.
8376         * server.h (struct buffer): New.
8377         (buffer_grow_str, buffer_grow_str0): New macros.
8378         (buffer_grow, buffer_free, buffer_init, buffer_finish)
8379         (buffer_xml_printf): Declare.
8380
8381 2008-11-24  Doug Evans  <[email protected]>
8382
8383         * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8384
8385 2008-11-24  Daniel Jacobowitz  <[email protected]>
8386
8387         * server.c (handle_v_run): Always use the supplied argument list.
8388
8389 2008-11-19  Bob Wilson  <[email protected]>
8390
8391         * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8392         (xtensa_regmap_table): Add entry for scompare1.
8393
8394 2008-11-18  Thiago Jung Bauermann  <[email protected]>
8395
8396         * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8397         powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8398         powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8399         powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8400         powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8401         powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8402         * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8403         XML target descriptions.
8404         * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8405         when inferior is running on an ISA 2.05 or later processor.  Add
8406         special case to return offset for full 64-bit slot of FPSCR when
8407         in 32-bits.
8408
8409 2008-11-14  Daniel Gutson  <[email protected]>
8410
8411         * Makefile.in (SFILES, clean): Added sparc64 files.
8412         (reg-sparc64.o, reg-sparc64.c): New.
8413         * configure.srv (sparc*-*-linux*): New configuration.
8414         * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8415         syscall arguments for SPARC.
8416         (regsets_store_inferior_registers): Likewise.
8417         * linux-sparc-low.c: New file.
8418
8419 2008-10-21  Doug Evans  <[email protected]>
8420
8421         * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8422         (READLINE_DIR,READLINE_DEP): Delete.
8423         (INTERNAL_CFLAGS): Update.
8424         (LINTFLAGS): Update.
8425
8426 2008-10-10  Pedro Alves  <[email protected]>
8427
8428         * server.c (handle_v_run): If GDB didn't specify an argv, use the
8429         whole argv from the last run, not just argv[0].
8430
8431 2008-09-08  Pedro Alves  <[email protected]>
8432
8433         * regcache.c (new_register_cache): Return NULL if the register
8434         cache size isn't known yet.
8435         (free_register_cache): Avoid dereferencing a NULL regcache.
8436
8437 2008-09-04  Daniel Jacobowitz  <[email protected]>
8438
8439         * configure.srv: Merge MIPS and MIPS64.
8440
8441 2008-08-24  Maciej W. Rozycki  <[email protected]>
8442
8443         * Makefile.in (uninstall): Apply $(EXEEXT) too.
8444
8445 2008-08-18  Luis Machado  <[email protected]>
8446
8447         * Makefile.in: Add required vsx dependencies.
8448
8449         * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8450         Declare init_registers_powerpc_vsx32l.
8451         Declare init_registers_powerpc_vsx64l.
8452         Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8453         (ppc_arch_setup): Check for VSX in hwcap.
8454         (ppc_fill_vsxregset): New function.
8455         (ppc_store_vsxregset): New function.
8456         Add new VSX entry in regset_info target_regsets.
8457
8458         * configure.srv: Add new VSX dependencies.
8459
8460 2008-08-12  Pedro Alves  <[email protected]>
8461
8462         * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8463         (remote_open): Set or clear transport_is_reliable.
8464         (putpkt_binary): Don't expect acks in noack mode.
8465         (getpkt): Don't send ack/nac in noack mode.
8466         * server.c (handle_general_set): Handle QStartNoAckMode.
8467         (handle_query): If connected by tcp pass QStartNoAckMode+ in
8468         qSupported.
8469         (main): Reset noack_mode on every connection.
8470         * server.h (noack_mode): Declare.
8471
8472 2008-08-07  Ralf Wildenhues  <[email protected]>
8473
8474         * Makefile.in (GDBREPLAY_OBS): New variable.
8475         (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8476
8477 2008-08-05  Ulrich Weigand  <[email protected]>
8478             Daniel Jacobowitz  <[email protected]>
8479
8480         * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8481         (usr_store_inferior_registers): Likewise.
8482         (regsets_store_inferior_registers): Likewise.
8483
8484 2008-07-31  Rolf Jansen  <[email protected]>
8485             Pedro Alves  <[email protected]>
8486
8487         * configure.ac: Check for memmem declaration.
8488         * server.c [HAVE_MALLOC_H]: Include malloc.h.
8489         (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8490         (disable_packet_qfThreadInfo): Unconditionally compile.
8491         * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8492         * configure, config.in: Regenerate.
8493
8494 2008-07-28  Doug Kwan  <[email protected]>
8495
8496         * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8497         (linux_write_memory): Remove declaration of errno.
8498
8499 2008-07-12  Ulrich Weigand  <[email protected]>
8500
8501         * linux-low.c (handle_extended_wait): Do not use "status"
8502         variable uninitialized.
8503
8504 2008-07-07  Pedro Alves  <[email protected]>
8505
8506         * server.c (handle_v_attach): Inhibit reporting dll changes.
8507
8508 2008-06-27  Pedro Alves  <[email protected]>
8509
8510         * remote-utils.c (prepare_resume_reply): If requested, don't
8511         output "thread:TID" in the T stop reply.
8512
8513         * server.c (disable_packet_vCont, disable_packet_Tthread)
8514         (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8515         (handle_query): If requested, disable support for qC, qfThreadInfo
8516         and qsThreadInfo.
8517         (handle_v_requests): If requested, disable support for vCont.
8518         (gdbserver_show_disableable): New.
8519         (main): Handle --disable-packet and --disable-packet=LIST.
8520
8521         * server.h (disable_packet_vCont, disable_packet_Tthread)
8522         (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8523
8524 2008-06-20  Carlos O'Donell  <[email protected]>
8525
8526         * server.c (gdbserver_usage): Mention --version.
8527
8528 2008-06-06  Daniel Jacobowitz  <[email protected]>
8529
8530         * Makefile.in (gdbreplay.o): New rule.
8531
8532 2008-06-06  Joseph Myers  <[email protected]>
8533
8534         * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8535         message, not gdbserver.
8536
8537 2008-06-05  Vladimir Prus  <[email protected]>
8538             Nathan Sidwell  <[email protected]>
8539             Joseph Myers  <[email protected]>
8540
8541         * acinclude.m4: Include ../../config/acx.m4.
8542         * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8543         * configure, config.in: Regenerate.
8544         * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8545         * server.c (gdbserver_version): Print PKGVERSION.
8546         (gdbsrever_usage): Add stream parameter.  Print REPORT_BUGS_TO.
8547         (main): Adjust gdbserver_usage calls.
8548         * gdbreplay.c (version, host_name): Add declarations.
8549         (gdbreplay_version, gdbreplay_usage): New.
8550         (main): Accept --version and --help options.
8551
8552 2008-06-04  Daniel Jacobowitz  <[email protected]>
8553
8554         * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8555         (arm_breakpoint_at): Handle Thumb.
8556         (the_low_target): Add comment.
8557
8558 2008-05-29  Ulrich Weigand  <[email protected]>
8559
8560         * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8561
8562 2008-05-09  Doug Evans  <[email protected]>
8563
8564         * server.h (decode_search_memory_packet): Declare.
8565         * remote-utils.c (decode_search_memory_packet): New fn.
8566         * server.c (handle_search_memory_1): New fn.
8567         (handle_search_memory): New fn.
8568         (handle_query): Process qSearch:memory packets.
8569
8570 2008-05-08  Ulrich Weigand  <[email protected]>
8571
8572         * regcache.c (registers_length): Remove.
8573         (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8574         full register packet.
8575         * regcache.h (registers_length): Remove prototype.
8576         * server.h (PBUFSIZ): Define to 16384.
8577
8578 2008-05-03  Ulrich Weigand  <[email protected]>
8579
8580         * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8581         powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8582         powerpc-64l.o, and powerpc-altivec64l.o.
8583         Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8584         rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8585         rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8586         rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8587         rs6000/power-linux.xml, and rs6000/power64-linux.xml
8588         to srv_xmlfiles.
8589
8590         * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8591         (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8592         (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8593         (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8594         (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8595         (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8596         (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8597         (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8598         (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8599         (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8600         (clean): Update.
8601
8602         * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8603         (init_registers_powerpc_32l): ... this new prototype.
8604         (init_registers_powerpc_32): Remove, replace by ...
8605         (init_registers_powerpc_altivec32l): ... this new prototype.
8606         (init_registers_powerpc_e500): Remove, replace by ...
8607         (init_registers_powerpc_e500l): ... this new prototype.
8608         (init_registers_ppc64): Remove, replace by ...
8609         (init_registers_powerpc_64l): ... this new prototype.
8610         (init_registers_powerpc_64): Remove, replace by ...
8611         (init_registers_powerpc_altivec64l): ... this new prototype.
8612         (ppc_num_regs): Set to 73.
8613         (PT_ORIG_R3, PT_TRAP): Define if necessary.
8614         (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
8615         (ppc_cannot_store_register): Handle orig_r3 and trap.
8616         (ppc_arch_setup): Update init_registers_... calls.
8617         (ppc_fill_gregset): Handle orig_r3 and trap.
8618
8619         * inferiors.c (clear_inferiors): Reset current_inferior.
8620
8621 2008-04-23  Paolo Bonzini  <[email protected]>
8622
8623         * acinclude.m4: Add override.m4.
8624         * configure: Regenerate.
8625
8626 2008-04-21  Ulrich Weigand  <[email protected]>
8627
8628         * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
8629         initial call to init_register_ppc64.
8630
8631 2008-04-21  Ulrich Weigand  <[email protected]>
8632
8633         * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
8634         single powerpc*-*-linux* case.
8635         (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
8636
8637 2008-04-17  Ulrich Weigand  <[email protected]>
8638
8639         * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
8640         srv_regobj.  Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
8641         from reg_xmlfiles.
8642         * linux-ppc-low.c: Include <elf.h>.
8643         (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
8644         (ppc_hwcap): New global variable.
8645         (ppc_regmap): Remove __SPE__ #ifdef sections.
8646         (ppc_regmap_e500): New global variable.
8647         (ppc_cannot_store_register): Update __SPE__ special case.
8648         (ppc_get_hwcap): New function.
8649         (ppc_arch_setup): Use it to determine whether inferior supports
8650         AltiVec or SPE registers.  Set the_low_target.regmap if appropriate.
8651         (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
8652         Do not access registers if target does not support AltiVec.
8653         (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
8654         Do not access registers if target does not support SPE.
8655         (target_regsets): Unconditionally include AltiVec and SPE regsets.
8656
8657 2008-04-17  Daniel Jacobowitz  <[email protected]>
8658
8659         * linux-low.c (disabled_regsets, num_regsets): New.
8660         (use_regsets_p): Delete.
8661         (linux_wait_for_process): Clear disabled_regsets.
8662         (regsets_fetch_inferior_registers): Check and set it.
8663         (regsets_store_inferior_registers): Likewise.
8664         (linux_fetch_registers, linux_store_registers): Do not use
8665         use_regsets_p.
8666         (initialize_low): Allocate disabled_regsets.
8667
8668 2008-04-14  Daniel Jacobowitz  <[email protected]>
8669
8670         * Makefile.in (LIBOBJS): New.
8671         (OBS): Use LIBOBJS.
8672         (memmem.o): New rule.
8673         * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
8674         * configure: Regenerated.
8675
8676 2008-04-04  Ulrich Weigand  <[email protected]>
8677
8678         * server.c (handle_query): Never return "unsupported" for
8679         qXfer:features:read queries.
8680
8681 2008-03-27  Ulrich Weigand  <[email protected]>
8682
8683         * server.c (get_features_xml): Fix inverted condition.
8684         (handle_query): Always support qXfer:feature:read.
8685
8686 2008-03-10  Daniel Jacobowitz  <[email protected]>
8687
8688         * server.c (wrapper_argv): New.
8689         (start_inferior): Handle wrapper_argv.  If set, expect an extra
8690         trap.
8691         (gdbserver_usage): Document --wrapper.
8692         (main): Parse --wrapper.
8693
8694 2008-02-28  Ulrich Weigand  <[email protected]>
8695
8696         * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
8697         powerpc-*-linux* to srv_regobj and reg_xmlfiles.
8698         * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
8699         (ppc_set_pc): Likewise.
8700         (ppc_arch_setup): New function.
8701         (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
8702         of collect_register.
8703         (the_low_target): Use ppc_arch_setup as arch_setup initializer.
8704
8705 2008-02-28  Ulrich Weigand  <[email protected]>
8706
8707         * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
8708         instead of linux-ppc64-low.o.
8709         * linux-ppc64-low.c: Remove file.
8710         * Makefile.in (SFILES): Remove linux-ppc64-low.c.
8711         (linux-ppc64-low.o): Remove rule.
8712
8713         * linux-ppc-low.c (init_registers_ppc64): Add prototype.
8714         (init_registers_powerpc_64): Likewise.
8715         (ppc_regmap): Conditionally define depending on __powerpc64__.
8716         (ppc_cannot_store_register): Do not special-case "fpscr" when
8717         compiled on __powerpc64__.
8718         (ppc_collect_ptrace_register): New function.
8719         (ppc_supply_ptrace_register): New function.
8720         (ppc_breakpoint): Change type to "unsigned int".
8721         (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
8722         (the_low_target): Conditionally provide initializers for the
8723         arch_setup member depending on __powerpc64__.  Install
8724         collect_ptrace_register and supply_ptrace_register members.
8725
8726 2008-02-28  Ulrich Weigand  <[email protected]>
8727
8728         * regcache.h (gdbserver_xmltarget): Add extern declaration.
8729         * server.c (gdbserver_xmltarget): Define.
8730         (get_features_xml): Use it to replace "target.xml" and arch_string.
8731
8732         * configure.srv: Remove srv_xmltarget.  Add XML files that were
8733         mentioned there to srv_xmlfiles instead.  Remove conditional tests
8734         on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
8735         srv_xmlfiles and srv_regobj to include all possible choices.
8736         * configure.ac (srv_xmltarget): Remove.
8737         (srv_xmlfiles): Do not add "target.xml".
8738         (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
8739         checks for supplementary target information.
8740         * configure: Regenerate.
8741         * Makefile.in (XML_TARGET): Remove.
8742         (target.xml): Remove rule.
8743         (clean): Do not clean up target.xml.
8744         (.PRECIOUS): Do not mention target.xml.
8745
8746         * target.h (struct target_ops): Remove arch_string member.
8747         * linux-low.c (linux_arch_string): Remove.
8748         (linux_target_ops): Remove arch_string initializer.
8749         * linux-low.h (struct linux_target_ops): Remove arch_string member.
8750         * linux-i386-low.c (the_low_target): Remove arch_string initializer.
8751         * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
8752         * spu-low.c (spu_arch_string): Remove.
8753         (spu_target_ops): Remove arch_string initializer.
8754         * win32-low.c (win32_arch_string): Remove.
8755         (win32_target_ops): Remove arch_string initializer.
8756         * win32-low.h (struct win32_target_ops): Remove arch_string member.
8757         * win32-arm-low.c (the_low_target): Remove arch_string initializer.
8758         * win32-i368-low.c (the_low_target): Remove arch_string initializer.
8759
8760 2008-02-27  Ulrich Weigand  <[email protected]>
8761
8762         * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
8763         by collect_ptrace_register and supply_ptrace_register hooks.
8764         * linux-low.c (fetch_register): Use supply_ptrace_register callback
8765         instead of checking for the_low_target.left_pad_xfer.
8766         (usr_store_inferior_registers): Use collect_ptrace_register callback
8767         instead of checking for the_low_target.left_pad_xfer.
8768
8769         * linux-s390-low.c (s390_collect_ptrace_register): New function.
8770         (s390_supply_ptrace_register): Likewise.
8771         (s390_fill_gregset): Call s390_collect_ptrace_register.
8772         (the_low_target): Update.
8773
8774         * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
8775         (ppc_supply_ptrace_register): Likewise.
8776         (the_low_target): Update.
8777
8778         * linux-i386-low.c (the_low_target): Update.
8779         * linux-x86-64-low.c (the_low_target): Update.
8780
8781 2008-02-27  Ulrich Weigand  <[email protected]>
8782
8783         * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
8784         reg-s390.o and reg-s390x.o.
8785
8786         * linux-low.c (new_inferior): New global variable.
8787         (linux_create_inferior, linux_attach): Set it.
8788         (linux_wait_for_process): Call the_low_target.arch_setup after the
8789         target has stopped for the first time.
8790         (initialize_low): Do not call the_low_target.arch_setup.
8791
8792         * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
8793         (s390_set_pc): Likewise.
8794         (s390_arch_setup): New function.
8795         (the_low_target): Use s390_arch_setup as arch_setup routine.
8796
8797         * regcache.c (realloc_register_cache): New function.
8798         (set_register_cache): Call it for each existing regcache.
8799
8800 2008-02-27  Ulrich Weigand  <[email protected]>
8801
8802         * server.h (init_registers): Remove prototype.
8803
8804         * linux-low.h (struct linux_target_ops): Add arch_setup field.
8805         * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
8806         instead of init_registers ().
8807         * linux-arm-low.c (init_registers_arm): Add prototype.
8808         (init_registers_arm_with_iwmmxt): Likewise.
8809         (the_low_target): Add initializer for arch_setup field.
8810         * linux-cris-low.c (init_registers_cris): Add prototype.
8811         (the_low_target): Add initializer for arch_setup field.
8812         * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
8813         (the_low_target): Add initializer for arch_setup field.
8814         * linux-i386-low.c (init_registers_i386_linux): Add prototype.
8815         (the_low_target): Add initializer for arch_setup field.
8816         * linux-ia64-low.c (init_registers_ia64): Add prototype.
8817         (the_low_target): Add initializer for arch_setup field.
8818         * linux-m32r-low.c (init_registers_m32r): Add prototype.
8819         (the_low_target): Add initializer for arch_setup field.
8820         * linux-m68k-low.c (init_registers_m68k): Add prototype.
8821         (the_low_target): Add initializer for arch_setup field.
8822         * linux-mips-low.c (init_registers_mips_linux): Add prototype.
8823         (init_registers_mips64_linux): Likewise.
8824         (the_low_target): Add initializer for arch_setup field.
8825         * linux-ppc-low.c (init_registers_ppc): Add prototype.
8826         (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
8827         (the_low_target): Add initializer for arch_setup field.
8828         * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
8829         (init_registers_powerpc_64): Likewise.
8830         (the_low_target): Add initializer for arch_setup field.
8831         * linux-s390-low.c (init_registers_s390): Add prototype.
8832         (init_registers_s390x): Likewise.
8833         (the_low_target): Add initializer for arch_setup field.
8834         * linux-sh-low.c (init_registers_sh): Add prototype.
8835         (the_low_target): Add initializer for arch_setup field.
8836         * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
8837         (the_low_target): Add initializer for arch_setup field.
8838         * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
8839         (the_low_target): Add initializer for arch_setup field.
8840
8841         * win32-low.h (struct win32_target_ops): Add arch_setup field.
8842         * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
8843         instead of init_registers ().
8844         * win32-arm-low.c (init_registers_arm): Add prototype.
8845         (the_low_target): Add initializer for arch_setup field.
8846         * win32-i386-low.c (init_registers_i386): Add prototype.
8847         (the_low_target): Add initializer for arch_setup field.
8848
8849         * spu-low.c (init_registers_spu): Add prototype.
8850         (initialize_low): Call initialie_registers_spu () instead of
8851         initialize_registers ().
8852
8853 2008-02-19  Pedro Alves  <[email protected]>
8854
8855         * server.c (handle_v_requests): When handling the vRun and vAttach
8856         packets, if already debugging a process, don't kill it.  Return an
8857         error instead.
8858
8859 2008-02-17  Daniel Jacobowitz  <[email protected]>
8860
8861         * server.c (handle_query): Correct length check.
8862
8863 2008-02-14  Pedro Alves  <[email protected]>
8864
8865         * win32-low.c (do_initial_child_stuff): Add process handle
8866         parameter.  Set current_process_handle and current_process_id from the
8867         parameters. Clear globals.
8868         (win32_create_inferior): Don't set current_process_handle and
8869         current_process_id here.  Instead pass them on the call to
8870         do_initial_child_stuff.
8871         (win32_attach): Likewise.
8872         (win32_clear_inferiors): New.
8873         (win32_kill): Don't close the current process handle or the
8874         current thread handle here.  Instead call win32_clear_inferiors.
8875         (win32_detach): Don't open a new handle to the process.  Call
8876         win32_clear_inferiors.
8877         (win32_join): Don't rely on current_process_handle; open a new
8878         handle using the process id.
8879         (win32_wait): Call win32_clear_inferiors when the inferior process
8880         has exited.
8881
8882 2008-02-14  Daniel Jacobowitz  <[email protected]>
8883
8884         * server.c (monitor_show_help): Add "exit".
8885
8886 2008-02-11  Maxim Grigoriev  <[email protected]>
8887
8888         * Makefile.in (SFILES): Add linux-xtensa-low.c.
8889         (clean): Add reg-xtensa.c.
8890         (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
8891         * configure.srv (xtensa*-*-linux*) New target.
8892         * linux-xtensa-low.c: New.
8893         * xtensa-xtregs.c: New.
8894
8895 2008-02-01  Pedro Alves  <[email protected]>
8896
8897         * hostio.c: Don't include errno.h.
8898         (errno_to_fileio_errno): Move to hostio-errno.
8899         * hostio.c: (hostio_error): Remove the error parameter.  Defer the
8900         error number outputting to the target->hostio_last_error callback.
8901         (hostio_packet_error): Use FILEIO_EINVAL directly.
8902         (handle_open, handle_pread, hostio_error, handle_unlink): Update
8903         calls to hostio_error.
8904         * hostio-errno.c: New.
8905         * server.h (hostio_last_error_from_errno): Declare.
8906         * target.h (target_ops): Add hostio_last_error member.
8907         * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
8908         as hostio_last_error handler.
8909         * spu-low.c (spu_target_ops): Likewise.
8910         * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
8911         (wince_hostio_last_error): New functions.
8912         (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
8913         as hostio_last_error handler.
8914         (win32_target_ops) [!_WIN32_WCE]: Register
8915         hostio_last_error_from_errno as hostio_last_error handler.
8916         * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
8917         (hostio-errno.o): New rule.
8918         * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
8919         * configure.srv (srv_hostio_err_objs): New variable.  Default to
8920         hostio-errno.o.
8921         (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
8922         * configure: Regenerate.
8923
8924 2008-01-29  Daniel Jacobowitz  <[email protected]>
8925
8926         * linux-low.c (linux_attach_lwp): Do not _exit after errors.
8927         (linux_kill, linux_detach): Clean up the process list.
8928         * remote-utils.c (remote_open): Improve port number parsing.
8929         (putpkt_binary, input_interrupt): Only send interrupts if the target
8930         is running.
8931         * server.c (extended_protocol): Make static.
8932         (attached): Define earlier.
8933         (exit_requested, response_needed, program_argv): New variables.
8934         (target_running): New.
8935         (start_inferior): Clear attached here.
8936         (attach_inferior): Set attached here.
8937         (require_running): Define.
8938         (handle_query): Use require_running and target_running.  Implement
8939         "monitor exit".
8940         (handle_v_attach, handle_v_run): New.
8941         (handle_v_requests): Use require_running.  Handle vAttach and vRun.
8942         (gdbserver_usage): Update.
8943         (main): Redo argument parsing.  Handle --debug and --multi.  Handle
8944         --attach along with other options or after the port.  Save
8945         program_argv.  Support no initial program.  Resynchronize
8946         communication with GDB after an error.  Handle "monitor exit".
8947         Use require_running and target_running.  Always allow the extended
8948         protocol.  Do not error out for Hc0 or Hc-1.  Do not automatically
8949         restart in extended mode.
8950         * README: Refer to the GDB manual.  Update --attach usage.
8951
8952 2007-12-20  Andreas Schwab  <[email protected]>
8953
8954         * linux-low.c (STACK_SIZE): Define.
8955         (linux_tracefork_child): Use it.  Use __clone2 on ia64.
8956         (linux_test_for_tracefork): Likewise.
8957
8958 2007-12-18  Daniel Jacobowitz  <[email protected]>
8959
8960         * linux-low.c (linux_wait_for_event): Update messages.  Do not
8961         reinsert auto-delete breakpoints.
8962         * mem-break.c (struct breakpoint): Change return type of handler to
8963         int.
8964         (set_breakpoint_at): Update handler type.
8965         (reinsert_breakpoint_handler): Return 1 instead of calling
8966         delete_breakpoint.
8967         (reinsert_breakpoint_by_bp): Check for the original breakpoint before
8968         setting a new one.
8969         (check_breakpoints): Delete auto-delete breakpoints and return 2.
8970         * mem-break.h (set_breakpoint_at): Update handler type.
8971         * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
8972         * win32-low.c (auto_delete_breakpoint): New.
8973         (get_child_debug_event): Use it.
8974
8975 2007-12-16  Daniel Jacobowitz  <[email protected]>
8976
8977         * configure.ac: Check for pread and pwrite.
8978         * hostio.c (handle_pread): Fall back to lseek and read.
8979         (handle_pwrite): Fall back to lseek and write.
8980         * config.in, configure: Regenerated.
8981
8982 2007-12-07  Daniel Jacobowitz  <[email protected]>
8983
8984         * server.c (myresume): Add own_buf argument.
8985         (main): Update calls.
8986
8987 2007-12-06  Daniel Jacobowitz  <[email protected]>
8988
8989         * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
8990         * remote-utils.c (remote_open): Do not call disable_async_io.
8991         (block_async_io): Delete.
8992         (unblock_async_io): Make static.
8993         (initialize_async_io): New.
8994         * server.c (handle_v_cont): Handle async I/O here.
8995         (myresume): Likewise.  Move other common resume tasks here...
8996         (main): ... from here.  Call initialize_async_io.  Disable async
8997         I/O before the main loop.
8998         * server.h (initialize_async_io): Declare.
8999         (block_async_io, unblock_async_io): Delete prototypes.
9000         * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
9001
9002 2007-12-06  Mick Davis  <[email protected]>
9003
9004         * remote-utils.c (readchar): Allow binary data in received messages.
9005
9006 2007-12-03  Pedro Alves  <[email protected]>
9007
9008         * win32-low.c (attaching): New global.
9009         (win32_create_inferior): Clear the `attaching' global.
9010         (win32_attach): Set the `attaching' global.
9011         (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
9012         attaching.  Only set a breakpoint at the entry point if not
9013         attaching.
9014
9015 2007-12-03  Pedro Alves  <[email protected]>
9016
9017         * server.c (main): Don't report dll events on the initial
9018         connection on attaches.
9019
9020 2007-12-03  Pedro Alves  <[email protected]>
9021
9022         * server.c (main): Relax numerical bases supported for the pid of
9023         the --attach command line argument.
9024
9025 2007-12-03  Pedro Alves  <[email protected]>
9026
9027         * win32-low.c (win32_attach): Call OpenProcess before
9028         DebugActiveProcess, not after.  Add last error output to error
9029         call.
9030
9031 2007-12-03  Pedro Alves  <[email protected]>
9032
9033         * win32-low.c (win32_get_thread_context)
9034         (win32_set_thread_context): New functions.
9035         (thread_rec): Use win32_get_thread_context.
9036         (continue_one_thread, win32_resume): Use win32_set_thread_context.
9037         * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
9038         field.
9039
9040 2007-12-03  Leo Zayas
9041             Pedro Alves  <[email protected]>
9042
9043         * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
9044         global variables.
9045         (child_add_thread): Minor cleanup.
9046         (child_continue): Resume artificially suspended threads before
9047         calling ContinueDebugEvent.
9048         (suspend_one_thread): New.
9049         (fake_breakpoint_event): New.
9050         (get_child_debug_event): Change return type to int.  Check here if
9051         gdb sent an interrupt request.  If a soft interrupt was requested,
9052         fake a breakpoint event.  Return 0 if there is no event to handle,
9053         and 1 otherwise.
9054         (win32_wait): Don't check here if gdb sent an interrupt request.
9055         Ensure there is a valid event to handle.
9056         (win32_request_interrupt): Add soft interruption method as last
9057         resort.
9058
9059 2007-12-03  Leo Zayas
9060             Pedro Alves  <[email protected]>
9061
9062         * win32-low.h (win32_thread_info): Add descriptions to the
9063         structure members.  Replace `suspend_count' counter by a
9064         `suspended' flag.
9065         * win32-low.c (thread_rec): Update condition of when to get the
9066         context from the inferior.  Rely on ContextFlags being set if it
9067         has already been retrieved.  Only suspend the inferior thread if
9068         we haven't already.  Warn if that fails.
9069         (continue_one_thread): s/suspend_count/suspended/.  Only call
9070         ResumeThread once.  Warn if that fails.
9071
9072 2007-12-02  Pedro Alves  <[email protected]>
9073
9074         * win32-low.c (win32_wait): Don't read from the inferior when it
9075         has already exited.
9076
9077 2007-12-02  Pedro Alves  <[email protected]>
9078
9079         * Makefile.in (win32_low_h): New variable.
9080         (win32-low.o): Add dependency on $(win32_low_h).
9081         (win32-arm-low.o, win32-i386-low.o): New rules.
9082
9083 2007-11-30  Daniel Jacobowitz  <[email protected]>
9084
9085         * hostio.c: Correct copyright year.
9086
9087 2007-11-30  Daniel Jacobowitz  <[email protected]>
9088
9089         * Makefile.in (OBS): Add hostio.o.
9090         (hostio.o): New rule.
9091         * server.h (handle_vFile): Declare.
9092         * hostio.c: New file.
9093         * server.c (handle_v_requests): Take packet_len and new_packet_len
9094         for binary packets.  Call handle_vFile.
9095         (main): Update call to handle_v_requests.
9096
9097 2007-11-05  Daniel Jacobowitz  <[email protected]>
9098
9099         * linux-low.c: Include <sched.h>.
9100
9101 2007-11-01  Daniel Jacobowitz  <[email protected]>
9102
9103         * linux-low.c (linux_tracefork_grandchild): New.
9104         (linux_tracefork_child): Use clone.
9105         (linux_test_for_tracefork): Use clone; allocate and free a stack.
9106
9107 2007-10-31  Joel Brobecker  <[email protected]>
9108
9109         * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
9110
9111 2007-10-24  Daniel Jacobowitz  <[email protected]>
9112
9113         * linux-low.c (handle_extended_wait): Handle unexpected signals.
9114
9115 2007-10-23  Daniel Jacobowitz  <[email protected]>
9116
9117         * inferiors.c (change_inferior_id): Delete.
9118         (add_pid_to_list, pull_pid_from_list): New.
9119         * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
9120         (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
9121         (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
9122         (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
9123         (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
9124         (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
9125         (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
9126         (using_threads): Always set to 1.
9127         (handle_extended_wait): New.
9128         (add_process): Do not set TID.
9129         (linux_create_inferior): Set must_set_ptrace_flags.
9130         (linux_attach_lwp): Remove TID argument.  Do not check using_threads.
9131         Use PTRACE_SETOPTIONS.  Call new_thread_notify.  Update all callers.
9132         (linux_thread_alive): Rename TID argument to LWPID.
9133         (linux_wait_for_process): Handle unknown processes.  Do not use TID.
9134         (linux_wait_for_event): Do not use TID or check using_threads.  Update
9135         call to dead_thread_notify.  Call handle_extended_wait.
9136         (linux_create_inferior): Use PTRACE_SETOPTIONS.
9137         (send_sigstop): Delete sigstop_sent.
9138         (wait_for_sigstop): Avoid TID.
9139         (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
9140         (linux_test_for_tracefork): New.
9141         (linux_lookup_signals): Use thread_db_active and
9142         linux_supports_tracefork_flag.
9143         (initialize_low): Use thread_db_active and linux_test_for_tracefork.
9144         * linux-low.h (get_process_thread): Avoid TID.
9145         (struct process_ifo): Move thread_known and tid to the end.  Remove
9146         sigstop_sent.
9147         (linux_attach_lwp, thread_db_init): Update prototypes.
9148         * server.h (change_inferior_id): Delete prototype.
9149         (add_pid_to_list, pull_pid_from_list): New prototypes.
9150         * thread-db.c (thread_db_use_events): New.
9151         (find_first_thread): Rename to...
9152         (find_one_thread): ...this.  Update callers and messages.  Do not
9153         call fatal.  Check thread_db_use_events.  Do not call
9154         change_inferior_id or new_thread_notify.
9155         (maybe_attach_thread): Update.  Do not call new_thread_notify.
9156         (thread_db_init): Set thread_db_use_events.  Check use_events.
9157         * utils.c (fatal, warning): Correct message prefix.
9158
9159 2007-10-15  Daniel Jacobowitz  <[email protected]>
9160
9161         * Makefile.in (clean): Remove new files.
9162         (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
9163         (powerpc-64.o, powerpc-64.c): New rules.
9164         * configure.srv: Use alternate register sets for powerpc64-*-linux*
9165         with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
9166         with SPE.
9167         * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
9168         SPE targets.
9169         (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
9170         (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
9171         (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
9172         (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
9173         (target_regsets): Add AltiVec and SPE register sets.
9174         * configure.ac: Check for AltiVec and SPE.
9175         * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
9176         (ppc_fill_vrregset, ppc_store_vrregset): New.
9177         (target_regsets): Add AltiVec register set.
9178         * configure: Regenerated.
9179
9180 2007-09-19  Daniel Jacobowitz  <[email protected]>
9181
9182         * linux-low.c (O_LARGEFILE): Define.
9183         (linux_read_memory): Use /proc/PID/mem.
9184         * configure.ac: Use AC_GNU_SOURCE.  Check for pread64.
9185         * configure, config.in: Regenerated.
9186
9187 2007-09-04  Daniel Jacobowitz  <[email protected]>
9188
9189         * linux-low.c (linux_wait_for_event): Do not pass signals while
9190         single-stepping.
9191
9192 2007-09-03  Pedro Alves  <[email protected]>
9193
9194         * win32-low.c (create_process): New.
9195         (win32_create_inferior): Use create_process instead of
9196         CreateProcess.  If create_process failed retry appending an ".exe"
9197         suffix.  Store the GetLastError result immediatelly after
9198         create_process calls and use it on the call to error.
9199
9200 2007-09-03  Pedro Alves  <[email protected]>
9201
9202         * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
9203
9204 2007-08-23  Joel Brobecker  <[email protected]>
9205
9206         * configure.ac: Switch license to GPLv3.
9207
9208 2007-08-01  Michael Snyder  <[email protected]>
9209
9210         * remote-utils.c (putpkt_binary): Memory leak, free buf2.
9211
9212 2007-07-31  Pedro Alves  <[email protected]>
9213
9214         * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
9215         typedef.
9216         (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
9217         (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL.  Get
9218         CloseToolhelp32Snapshot.
9219         (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
9220         CloseToolhelp32Snapshot.
9221
9222 2007-07-27  Michael Snyder  <[email protected]>
9223
9224         * server.c (main): Check for inferior exit before main loop.
9225
9226 2007-07-18  Pedro Alves  <[email protected]>
9227
9228         * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
9229         instead of on tmp_desc.
9230
9231 2007-07-17  Pedro Alves  <[email protected]>
9232             Daniel Jacobowitz  <[email protected]>
9233
9234         * inferiors.c (all_dlls, dlls_changed, get_dll): New.
9235         (add_thread): Minor cleanups.
9236         (clear_inferiors): Move lower in the file.  Clear the DLL
9237         list.
9238         (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
9239         * remote-utils.c (prepare_resume_reply): Check dlls_changed.
9240         (xml_escape_text): New.
9241         * server.c (handle_query): Handle qXfer:libraries:read.  Report it
9242         for qSupported.
9243         (handle_v_cont): Report errors.
9244         (gdbserver_version): Update.
9245         (main): Correct size of own_buf.  Do not report initial DLL events.
9246         * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
9247         (unloaded_dll, xml_escape_text): New.
9248         * win32-low.c (enum target_waitkind): Update comments.
9249         (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
9250         (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
9251         (win32_EnumProcessModules, win32_GetModuleInformation)
9252         (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
9253         (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
9254         (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
9255         (win32_Module32First, win32_Module32Next, load_toolhelp)
9256         (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
9257         (get_child_debug_event): Handle DLL events.
9258         (win32_wait): Likewise.
9259
9260 2007-07-12  Daniel Jacobowitz  <[email protected]>
9261
9262         * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
9263         * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
9264
9265 2007-07-08  Pedro Alves  <[email protected]>
9266
9267         * win32-low.c (handle_output_debug_string): Ignore event if not
9268         waiting.
9269
9270 2007-07-08  Pedro Alves  <[email protected]>
9271
9272         * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
9273
9274 2007-07-03  Daniel Jacobowitz  <[email protected]>
9275
9276         * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
9277
9278 2007-07-02  Daniel Jacobowitz  <[email protected]>
9279
9280         * inferiors.c (change_inferior_id): Add comment.
9281         * linux-low.c (check_removed_breakpoint): Add an early
9282         prototype.  Improve debug output.
9283         (linux_attach): Doc update.
9284         (linux_detach_one_process, linux_detach): Clean up before releasing
9285         each process.
9286         (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9287         * linux-low.h (struct process_info): Doc improvement.
9288         * mem-break.c (delete_all_breakpoints): New.
9289         * mem-break.h (delete_all_breakpoints): New prototype.
9290         * thread-db.c (find_first_thread): New.
9291         (thread_db_create_event): Call it instead of
9292         thread_db_find_new_threads.  Clean up unused variables.
9293         (maybe_attach_thread): Remove first thread handling.
9294         (thread_db_find_new_threads): Use find_first_thread.
9295         (thread_db_get_tls_address): Likewise.
9296
9297 2007-06-27  Daniel Jacobowitz  <[email protected]>
9298
9299         * thread-db.c (thread_db_find_new_threads): Add prototype.
9300         (thread_db_create_event): Check for the main thread before adding
9301         a new thread.
9302         (maybe_attach_thread): Only enable event reporting if TID == 0.
9303         (thread_db_get_tls_address): Check for new threads.
9304
9305 2007-06-20  Daniel Jacobowitz  <[email protected]>
9306
9307         * linux-low.c (linux_create_inferior): Try execv before execvp.
9308         * spu-low.c (spu_create_inferior): Likewise.
9309
9310 2007-06-13  Mike Frysinger  <[email protected]>
9311
9312         * linux-low.c (linux_create_inferior): Change execv to execvp.
9313         * spu-low.c (spu_create_inferior): Likewies.
9314
9315 2007-06-13  Daniel Jacobowitz  <[email protected]>
9316
9317         * Makefile.in (clean): Clean new files instead of deleted ones.
9318         (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9319         (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9320         rules.
9321         * configure.srv: Specify XML files and new regformats for MIPS and
9322         MIPS64 GNU/Linux.
9323         * linux-mips-low.c (mips_num_regs): Set to only used registers.
9324         (mips_regmap): Do not fetch $0.  Remove unused registers.  Add
9325         an entry for the restart register.
9326         (mips_cannot_fetch_register, mips_cannot_store_register)
9327         (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9328         register names to match the XML descriptions.
9329         (mips_fill_gregset, mips_store_gregset): Likewise.  Handle the
9330         restart register instead of $0.
9331
9332 2007-06-12  Ulrich Weigand  <[email protected]>
9333             Markus Deuling  <[email protected]>
9334
9335         * remote-utils.c (decode_xfer_write): New function.
9336         * server.h (decode_xfer_write): Add prototype.
9337         * server.c (handle_query): Add PACKET_LEN argument.  Support
9338         qXfer:spu:read and qXfer:spu:write packets.
9339         (main): Pass packet_len to handle_query.
9340         * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9341         * target.h (target_ops): Add qxfer_spu.
9342
9343 2007-06-12  Ulrich Weigand  <[email protected]>
9344
9345         * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9346         accessing non-seekable spufs files.
9347
9348 2007-05-16  Markus Deuling  <[email protected]>
9349
9350         * server.c (handle_query): Add reply for qC packet.
9351
9352 2007-05-10  Pedro Alves  <[email protected]>
9353             Leo Zayas  <lerele@champenstudios@com>
9354
9355         * server.h (check_remote_input_interrupt_request): New function.
9356         * remote_utils.c (INVALID_DESCRIPTOR): New define.
9357         (remote_desc): Initialize with INVALID_DESCRIPTOR.
9358         (input_interrupt): Expose on USE_WIN32API too.  Fix whitespace.
9359         (check_remote_input_interrupt_request): New function.
9360         * server.h (check_remote_input_interrupt_request): Declare.
9361         * win32-low.c (winapi_DebugBreakProcess,
9362         winapi_GenerateConsoleCtrlEvent): New typedefs.
9363         (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9364         to 250 ms.
9365         (win32_wait): Check for remote interrupt request
9366         with check_remote_input_interrupt_request.
9367         (win32_request_interrupt): New function.
9368         (win32_target_op): Set request_interrupt to win32_request_interrupt.
9369
9370 2007-05-10  Pedro Alves  <[email protected]>
9371
9372         * win32-low.c (debug_registers_changed,
9373         debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9374         CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9375         CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9376         (thread_rec): Get context using the low target.
9377         (child_add_thread): Call thread_added on the low target,
9378         which does the same thing.
9379         (regptr): Delete.
9380         (do_initial_child_stuff): Remove debug registers references.
9381         Set context using the low target.  Resume threads after
9382         setting the contexts.
9383         (child_continue): Remove dead variable.  Remove debug
9384         registers references.
9385         (child_fetch_inferior_registers): Go through the low target.
9386         (do_child_store_inferior_registers): Remove.
9387         (child_store_inferior_registers): Go through the low target.
9388         (win32_resume): Remove debug registers references.
9389         Set context using the low target.
9390         (handle_exception): Change return type to void.  Don't record
9391         context here.  Set status to TARGET_WAITKIND_SPURIOUS on a
9392         first chance exception.
9393         (get_child_debug_event): Change return type to void.  Remove
9394         goto loop.  Always return after waiting for debug event.
9395         (win32_wait): Convert to switch statement.  Handle spurious
9396         events.
9397
9398         * win32-i386-low.c (debug_registers_changed,
9399         debug_registers_used): New.
9400         (initial_stuff): Rename to ...
9401         (i386_initial_stuff): ... this.  Clear debug registers
9402         state variables.
9403         (store_debug_registers): Delete.
9404         (i386_get_thread_context): New.
9405         (load_debug_registers): Delete.
9406         (i386_set_thread_context): New.
9407         (i386_thread_added): New.
9408         (single_step): Rename to ...
9409         (i386_single_step): ... this.
9410         (do_fetch_inferior_registers): Rename to ...
9411         (i386_fetch_inferior_register): ... this.
9412         (i386_store_inferior_register): New.
9413         (the_low_target): Adapt to new interface.
9414
9415         * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9416         (arm_get_thread_context): New.
9417         (arm_set_thread_context): New.
9418         (regptr): New.
9419         (do_fetch_inferior_registers): Rename to ...
9420         (arm_fetch_inferior_register): ... this.
9421         (arm_store_inferior_register): New.
9422         (arm_wince_breakpoint): Reimplement as unsigned long.
9423         (arm_wince_breakpoint_len): Define.
9424         (the_low_target): Adapt to new interface.
9425
9426         * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9427         load_debug_registers.  Add get_thread_context, set_thread_context,
9428         thread_added and store_inferior_register.  Rename
9429         fetch_inferior_registers to fetch_inferior_register.
9430         (regptr): Remove declaration.
9431
9432 2007-05-10  Pedro Alves  <[email protected]>
9433
9434         * linux-low.c (linux_detach): Change return type to int.  Return 0.
9435         * spu-low.c (spu_detach): Likewise.
9436
9437 2007-05-10  Pedro Alves  <[email protected]>
9438
9439         * target.h (target_ops): Change return type of detach to int.
9440         Add join.
9441         (join_inferior): New.
9442         * server.c (main): Don't skip detach support on mingw32.
9443         If the inferior doesn't support detaching return error.
9444         Call join_inferior instead of using waitpid.
9445         * linux-low.c (linux_join): New.
9446         (linux_target_op): Add linux_join.
9447         * spu-low.c (spu_join): New.
9448         (spu_target_ops): Add spu_join.
9449         * win32-low.c (win32_detach): Adapt to new interface.
9450         Reopen current_process_handle before detaching.  Issue a child
9451         resume before detaching.
9452         (win32_join): New.
9453         (win32_target_op): Add win32_join.
9454
9455 2007-05-10  Pedro Alves  <[email protected]>
9456
9457         * win32-low.c (win32-attach): Fix return value.
9458         * target.h (target_ops): Describe ATTACH return values.
9459
9460 2007-05-10  Pedro Alves  <[email protected]>
9461
9462         * win32-low.c (GETPROCADDRESS): Define.
9463         (winapi_DebugActiveProcessStop): Add WINAPI.  typedef as pointer.
9464         (winapi_DebugSetProcessKillOnExit): Likewise.
9465         (win32_create_inferior): Force usage of ansi CreateProcessA.
9466         (win32_attach): Use GETPROCADDRESS.
9467         (win32_detach): Likewise.
9468
9469 2007-05-10  Pedro Alves  <[email protected]>
9470
9471         * win32-low.c (win32_wait): Don't use WSTOPSIG.
9472
9473 2007-03-30  Pedro Alves  <[email protected]>
9474
9475         * win32-low.c: Commit leftover changes from 2007-03-29.
9476
9477 2007-03-30  Daniel Jacobowitz  <[email protected]>
9478
9479         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9480         fields short instead of int.  Add explicit padding.
9481         (i387_cache_to_fsave): Remove unnecessary casts.
9482         (i387_fsave_to_cache): Doc fix.
9483         (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9484
9485 2007-03-30  Daniel Jacobowitz  <[email protected]>
9486
9487         * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9488         (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9489
9490 2007-03-29  Pedro Alves  <[email protected]>
9491
9492         * configure.srv (arm*-*-mingw32ce*): Move near the other
9493         arm targets.
9494
9495 2007-03-29  Pedro Alves  <[email protected]>
9496
9497         * configure.ac: Add errno checking.
9498         (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9499         sys/file.h and malloc.h.
9500         (AC_CHECK_DECLS): Add perror.
9501         (srv_mingwce): Handle.
9502         * configure.srv (i[34567]86-*-cygwin*): Add
9503         win32-i386-low.o to srv_tgtobj.
9504         (i[34567]86-*-mingw*): Likewise.
9505         (arm*-*-mingw32ce*): Add case.
9506         * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9507         HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9508         [__MINGW32CE__] (strerror): New function.
9509         [__MINGW32CE__] (errno): Define to GetLastError.
9510         [__MINGW32CE__] (COUNTOF): New macro.
9511         (remote_open): Remove extra close call.
9512         * mem-break.c (delete_breakpoint_at): New function.
9513         * mem-break.h (delete_breakpoint_at): Declare.
9514         * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9515         HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9516         [USE_WIN32API] (read, write): Add char* casts.
9517         * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9518         * server.h: Include wincecompat.h on Windows CE.
9519         [HAVE_ERRNO_H]: Check.
9520         (perror): Declare if not declared.
9521         * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9522         (perror_with_name): Remove errno declaration.
9523         * wincecompat.h: New.
9524         * wincecompat.c: New.
9525         * win32-low.h: New.
9526         * win32-arm-low.c: New.
9527         * win32-i386-low.c: New.
9528         (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9529         (OUTMSG2): Make it safe.
9530         (_T): New macro.
9531         (COUNTOF): New macro.
9532         (NUM_REGS): Get it from the low target.
9533         (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9534         CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9535         (thread_rec): Let low target handle debug registers.
9536         (child_add_thread): Likewise.
9537         (child_init_thread_list): Likewise.
9538         (continue_one_thread): Likewise.
9539         (regptr): New.
9540         (do_child_fetch_inferior_registers): Move to ...
9541         * win32-i386-low.c: ... here, and rename to ...
9542         (do_fetch_inferior_registers): ... this.
9543         * win32-low.c (child_fetch_inferior_registers):
9544         Go through the low target.
9545         (do_child_store_inferior_registers): Use regptr.
9546         (strwinerror): New function.
9547         (win32_create_inferior): Handle Windows CE.
9548         Use strwinerror instead of strerror on Windows error
9549         codes.  Add program to the error output.
9550         Don't close the main thread handle on Windows CE.
9551         (win32_attach): Use coredll.dll on Windows CE.
9552         (win32_kill): Close current process and current
9553         thread handles.
9554         (win32_detach): Use coredll.dll on Windows CE.
9555         (win32_resume): Let low target handle debug registers, and
9556         step request.
9557         (handle_exception): Add/Remove initial breakpoint.  Avoid
9558         non-existant WSTOPSIG on Windows CE.
9559         (win32_read_inferior_memory): Cast to remove warning.
9560         (win32_arch_string): Go through the low target.
9561         (initialize_low): Call set_breakpoint_data with the low
9562         target's breakpoint.
9563         * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9564         FOP_REGNUM, mappings): Move to ...
9565         * win32-i386-low.c: ... here.
9566         * win32-low.c (win32_thread_info): Move to ...
9567         * win32-low.h: ... here.
9568         * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9569         win32-arm-low.c and wincecompat.c.
9570         (all:): Add $EXEEXT.
9571         (install-only:): Likewise.
9572         (gdbserver:): Likewise.
9573         (gdbreplay:): Likewise.
9574         * config.in: Regenerate.
9575         * configure: Regenerate.
9576
9577 2007-03-28  Pedro Alves  <[email protected]>
9578
9579         * win32-low.c: Rename typedef thread_info to
9580         win32_thread_info throughout.
9581
9582 2007-03-28  Pedro Alves  <[email protected]>
9583
9584         * win32-i386-low.c: Rename to ...
9585         * win32-low.c: ... this.
9586         * configure.srv: Replace win32-i386-low.o with win32-low.o.
9587         * Makefile.in: Likewise.
9588
9589 2007-03-27  Pedro Alves  <[email protected]>
9590
9591         * remote-utils.c (monitor_output): Constify msg parameter.
9592         * server.h (monitor_output): Likewise.
9593         * win32-i386-low.c (handle_output_debug_string): New.
9594         (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9595         handle_output_debug_string.
9596         (get_child_debug_event): Likewise.
9597
9598 2007-03-27  Mat Hostetter  <[email protected]>
9599
9600         * server.c (main): Correct strtoul check.
9601
9602 2007-03-27  Jon Ringle  <[email protected]>
9603
9604         * linux-low.c: Check __ARCH_HAS_MMU__ also.
9605
9606 2007-03-27  Brooks Moses  <[email protected]>
9607
9608         * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9609
9610 2007-02-27  Daniel Jacobowitz  <[email protected]>
9611
9612         * terminal.h: Check HAVE_SGTTY_H.
9613
9614 2007-02-27  Mat Hostetter  <[email protected]>
9615
9616         * remote-utils.c (remote_open): Print out the assigned port number.
9617
9618 2007-02-26  Daniel Jacobowitz  <[email protected]>
9619
9620         * remote-utils.c (monitor_output): New function.
9621         * server.c (debug_threads): Define here.
9622         (monitor_show_help): New function.
9623         (handle_query): Handle qRcmd.
9624         (main): Do not handle 'd' packet.
9625         * server.h (debug_threads, remote_debug, monitor_output): Declare.
9626         * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
9627         of debug_threads.
9628
9629 2007-02-25  Pedro Alves  <[email protected]>
9630
9631         * Makefile.in (EXEEXT): New.
9632         (clean): Use $(EXEEXT).
9633
9634 2007-02-25  Pedro Alves  <[email protected]>
9635
9636         * target.h (target_ops): Rename send_signal to request_interrupt,
9637         and remove enum target_signal parameter.
9638         * linux-low.c (linux_request_interrupt): Rename from
9639         linux_send_signal, and always send SIGINT.
9640         * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
9641         and always send SIGINT.
9642         * remote-utils.c (putpkt_binary): Call request_interrupt, instead
9643         of send_signal.
9644         (input_interrupt): Likewise.
9645
9646 2007-02-25  Pedro Alves  <[email protected]>
9647
9648         * server.c (get_features_xml): Check if target implemented
9649         arch_string.
9650         * win32-i386-low.c (win32_arch_string): New.
9651         (win32_target_ops): Add win32_arch_string as arch_string member.
9652
9653 2007-02-22  Markus Deuling  <[email protected]>
9654
9655         * spu-low.c (spu_arch_string): New.
9656         (spu_target_ops): Add spu_arch_string.
9657
9658 2007-02-16  Daniel Jacobowitz  <[email protected]>
9659
9660         * remote-utils.c: Remove HAVE_TERMINAL_H check.
9661         * configure.ac: Do not check for terminal.h.
9662         * configure, config.in: Regenerated.
9663
9664 2007-02-08  Daniel Jacobowitz  <[email protected]>
9665
9666         * Makefile.in (OBS): Add $(XML_BUILTIN).
9667         (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
9668         (clean): Update.
9669         (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
9670         (arm-with-iwmmxt.c): New.
9671         * config.in, configure: Regenerate.
9672         * configure.ac: Check for iWMMXt.  Handle srv_xmltarget,
9673         srv_xmlbuiltin, and srv_xmlfiles.  Define USE_XML.
9674         * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
9675         (arm*-*-linux*): Add iWMMXt and regset support.
9676         * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
9677         (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
9678         (arm_store_wmmxregset, target_regsets): New.
9679         * server.c (get_features_xml): Take annex argument.  Check builtin
9680         XML documents.
9681         (handle_query): Handle multiple annexes.
9682
9683 2007-01-29  Daniel Jacobowitz  <[email protected]>
9684
9685         * remote-utils.c [USE_WIN32API] (read, write): Define.
9686         (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
9687         write.
9688
9689 2007-01-09  Daniel Jacobowitz  <[email protected]>
9690
9691         * linux-i386-low.c (the_low_target): Set arch_string.
9692         * linux-x86-64-low.c (the_low_target): Likewise.
9693         * linux-low.c (linux_arch_string): New.
9694         (linux_target_ops): Add it.
9695         * linux-low.h (struct linux_target_ops): Add arch_string.
9696         * server.c (write_qxfer_response): Use const void * for DATA.
9697         (get_features_xml): New.
9698         (handle_query): Handle qXfer:features:read.  Report it for qSupported.
9699         * target.h (struct target_ops): Add arch_string method.
9700
9701 2007-01-03  Denis Pilat  <[email protected]>
9702             Daniel Jacobowitz  <[email protected]>
9703
9704         * linux-low.c (linux_kill): Handle being called with no threads.
9705         * win32-i386-low.c (win32_kill): Likewise.
9706         (get_child_debug_event): Clear current_process_handle.
9707
9708 2006-12-30  Denis PILAT  <[email protected]>
9709             Daniel Jacobowitz  <[email protected]>
9710
9711         * remote-utils.c (remote_open): Check the type of specified
9712         serial port devices before opening them.
9713         * server.c (main): Kill the inferior if an error occurs during
9714         the first remote_open.
9715
9716 2006-12-05  Markus Deuling  <[email protected]>
9717
9718         * README: Update supported targets.
9719
9720 2006-11-28  Daniel Jacobowitz  <[email protected]>
9721
9722         * Makefile.in (clean): Remove reg-mips64.c.
9723         (reg-mips64.c, reg-mips64.o): New rules.
9724         * configure.srv: Handle mips64.  Include regset support for mips.
9725         * linux-mips-low.c (union mips_register): New.
9726         (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
9727         (mips_breakpoint, mips_breakpoint_at): Use int.
9728         (mips_collect_register, mips_supply_register)
9729         (mips_collect_register_32bit, mips_supply_register_32bit)
9730         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9731         (mips_store_fpregset, target_regsets): New.
9732         * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
9733
9734 2006-11-22  Ulrich Weigand  <[email protected]>
9735
9736         * configure.srv: Add target "spu*-*-*".
9737         * Makefile.in (clean): Remove reg-spu.c.
9738         (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
9739         * spu-low.c: New file.
9740
9741 2006-11-16  Daniel Jacobowitz  <[email protected]>
9742
9743         * configure.ac: Correct td_thr_tls_get_addr test.
9744         * configure: Regenerated.
9745
9746 2006-11-16  Daniel Jacobowitz  <[email protected]>
9747
9748         * linux-low.c (linux_wait_for_event): Reformat.  Use the
9749         pass_signals array.
9750         * remote-utils.c (decode_address_to_semicolon): New.
9751         * server.c (pass_signals, handle_general_set): New.
9752         (handle_query): Mention QPassSignals for qSupported.
9753         (main): Call handle_general_set.
9754         * server.h (pass_signals, decode_address_to_semicolon): New.
9755
9756 2006-11-06  Daniel Jacobowitz  <[email protected]>
9757
9758         * server.c (handle_query): Correct error handling for read_auxv.
9759
9760 2005-10-19  Ulrich Weigand  <[email protected]>
9761
9762         * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
9763         and srv_linux_thread_db to yes.
9764         * linux-s390-low.c (s390_fill_gregset): New function.
9765         (target_regsets): Define data structure.
9766
9767 2006-10-17  Daniel Jacobowitz  <[email protected]>
9768
9769         * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
9770         * configure.ac: Use it.  Define HAVE_TD_THR_TLS_GET_ADDR.
9771         * config.in, configure: Regenerated.
9772         * inferiors.c (gdb_id_to_thread): New function.
9773         (gdb_id_to_thread_id): Use it.
9774         * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
9775         * linux-low.h (struct process_info): Add th member.
9776         (thread_db_get_tls_address): New prototype.
9777         * remote-utils.c (decode_address): Make non-static.
9778         * server.c (handle_query): Handle qGetTLSAddr.
9779         * server.h (gdb_id_to_thread, decode_address): New prototypes.
9780         * target.h (struct target_ops): Add get_tls_address.
9781         * thread-db.c (maybe_attach_thread): Save the thread handle.
9782         (thread_db_get_tls_address): New.
9783
9784 2006-09-28  Daniel Jacobowitz  <[email protected]>
9785
9786         * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
9787         (linux_resume_one_process): Take a siginfo_t *.  Update all
9788         callers.  Queue it if necessary.  Use PTRACE_SETSIGINFO.
9789         (struct pending_signals): Add a siginfo_t.
9790         (linux_wait_for_process): Always set last_status.
9791         (linux_wait_for_event): Use PTRACE_GETSIGINFO.
9792         (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
9793         * linux-low.h (struct process_info): Add last_status.
9794
9795 2006-09-21  Daniel Jacobowitz  <[email protected]>
9796
9797         * remote-utils.c (try_rle): New function.
9798         (putpkt_binary): Use it.
9799
9800 2006-08-19  Daniel Jacobowitz  <[email protected]>
9801
9802         * Makefile.in (clean): Clean reg-x86-64-linux.c.
9803         (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
9804         * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
9805         * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
9806         (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
9807         point registers.
9808
9809 2006-08-08  Richard Sandiford  <[email protected]>
9810
9811         * server.c (terminal_fd): New variable.
9812         (old_foreground_pgrp): Likewise.
9813         (restore_old_foreground_pgrp): New function.
9814         (start_inferior): Record the terminal file descriptor in terminal_fd
9815         and its original foreground group in old_foreground_pgrp.  Register
9816         restore_old_foreground_pgrp with atexit().
9817
9818 2006-07-26  Daniel Jacobowitz  <[email protected]>
9819
9820         * server.c (handle_query): Correct qPart to qXfer.
9821
9822 2006-07-22  Daniel Jacobowitz  <[email protected]>
9823
9824         * configure.ac: Check for more headers which are missing on
9825         Windows.  Automatically supply -lwsock32 and USE_WIN32API.
9826         * configure.srv: Add Cygwin and mingw32.
9827         * remote-utils.c: Don't include headers unconditionally which
9828         are missing on mingw32.  Include <winsock.h> for mingw32.
9829         (remote_open): Adjust for mingw32 support.  Flush
9830         standard error after writing to it.
9831         (remote_close, putpkt_binary, input_interrupt, block_async_io)
9832         (unblock_async_io, enable_async_io, disable_async_io)
9833         (readchar, getpkt): Update for Winsock support.
9834         (prepare_resume_reply): Expect a protocol signal number.
9835         * server.c: Disable <sys/wait.h> on mingw32.
9836         (start_inferior): Adjust for mingw32 support.  Flush
9837         standard error after writing to it.
9838         (attach_inferior): Likewise.  Use protocol signal
9839         numbers.
9840         (main): Skip 'D' packet on mingw32.  Use protocol signal numbers
9841         and names.
9842         * win32-i386-low.c: New file.
9843         * Makefile.in (XM_CLIBS): Set.
9844         (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
9845         (win32-i386-low.o): New dependency rule.
9846         * linux-low.c (linux_wait): Use target signal numbers.
9847         * target.h (struct target_ops): Doc fix.
9848         * server.h (target_signal_to_name): New prototype.
9849         * gdbreplay.c: Don't include headers unconditionally which
9850         are missing on mingw32.  Include <winsock.h> for mingw32.
9851         (remote_close, remote_open): Adjust for Winsock support.
9852         * configure, config.in: Regenerated.
9853
9854 2006-07-12  Daniel Jacobowitz  <[email protected]>
9855
9856         * server.c (decode_xfer_read, write_qxfer_response): New.
9857         (handle_query): Take a packet length argument.  Handle
9858         qXfer:auxv:read instead of qPart:auxv:read.  Mention it in
9859         the qSupported response.
9860         (main): Update call to handle_query.
9861
9862 2006-06-22  Daniel Jacobowitz  <[email protected]>
9863
9864         * remote-utils.c (remote_escape_output, remote_unescape_input): New.
9865         (putpkt_binary): Renamed from putpkt and adjusted for binary
9866         data.
9867         (putpkt): New wrapper for putpkt_binary.
9868         (readchar): Don't mask off the high bit.
9869         (decode_X_packet): New function.
9870         * server.c (main): Call putpkt_binary if a handler sets the packet
9871         length.  Save the length of the incoming packet.  Handle 'X'.
9872         * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
9873
9874 2006-06-21  Daniel Jacobowitz  <[email protected]>
9875
9876         * server.c (handle_query): Handle qSupported.
9877
9878 2006-05-30  Daniel Jacobowitz  <[email protected]>
9879
9880         * remote-utils.c (all_symbols_looked_up): New variable.
9881         (look_up_one_symbol): Check it.
9882         * server.h (look_up_one_symbol): New declaration.
9883         * thread-db.c (thread_db_init): Set all_symbols_looked_up.
9884
9885 2006-05-30  Daniel Jacobowitz  <[email protected]>
9886
9887         * Makefile.in (linux-arm-low.o): Update dependencies.
9888         * linux-arm-low.c: Include "gdb_proc_service.h".
9889         (PTRACE_GET_THREAD_AREA): Define.
9890         (ps_get_thread_area): New function.
9891
9892 2006-05-09  Nathan Sidwell  <[email protected]>
9893
9894         * configure.srv (m68k*-*-uclinux*): New target.
9895         * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
9896         (linux_resume_one_process): Remove extraneous cast.
9897         (linux_read_offsets): New.
9898         (linux_target_op): Add linux_read_offsets on mmuless systems.
9899         * server.c (handle_query): Add qOffsets logic.
9900         * target.h (struct target_ops): Add read_offsets.
9901
9902 2006-03-15  Daniel Jacobowitz  <[email protected]>
9903
9904         * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
9905         (PTRACE_GET_THREAD_AREA): Define.
9906         (ps_get_thread_area): New function.
9907         * Makefile.in (linux-i386-low.o, linux-mips-low.o)
9908         (linux-x86-64-low.o): Update.
9909
9910 2006-03-15  Daniel Jacobowitz  <[email protected]>
9911
9912         * configure.ac: Remove checks for prfpregset_t.
9913         * gdb_proc_service.h: New file.
9914         * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
9915         new "gdb_proc_service.h".
9916         * proc-service.c: Likewise.
9917         (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
9918         (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
9919         * Makefile.in (gdb_proc_service_h): Updated.
9920         * configure, config.in: Regenerated.
9921
9922 2006-03-03  Daniel Jacobowitz  <[email protected]>
9923
9924         * remote-utils.c (prepare_resume_reply): Move declaration
9925         of gdb_id_from_wait to the top of the block.
9926
9927 2006-02-15  Daniel Jacobowitz  <[email protected]>
9928
9929         * linux-low.c (regsets_store_inferior_registers): Read the regset
9930         from the target before filling it.
9931
9932 2006-02-08  Daniel Jacobowitz  <[email protected]>
9933
9934         * server.c (attach_inferior): Return SIGTRAP for a successful
9935         attach.
9936
9937 2006-02-01  Daniel Jacobowitz  <[email protected]>
9938
9939         * Makefile.in (OBS): Add version.o.
9940         (STAGESTUFF): Delete.
9941         (version.o): Add dependencies.
9942         (version.c): Replace rule.
9943         (clean): Remove version.c.
9944         * server.c (gdbserver_version): New.
9945         (gdbserver_usage): Use printf.
9946         (main): Handle --version and --help.
9947         * server.h (version, host_name): Add declarations.
9948
9949 2005-12-23  Eli Zaretskii  <[email protected]>
9950
9951         * linux-arm-low.c:
9952         * linux-arm-low.c:
9953         * inferiors.c:
9954         * i387-fp.h:
9955         * i387-fp.c:
9956         * gdbreplay.c:
9957         * regcache.c:
9958         * proc-service.c:
9959         * mem-break.h:
9960         * mem-break.c:
9961         * linux-x86-64-low.c:
9962         * linux-sh-low.c:
9963         * linux-s390-low.c:
9964         * linux-ppc64-low.c:
9965         * linux-ppc-low.c:
9966         * linux-mips-low.c:
9967         * linux-m68k-low.c:
9968         * linux-m32r-low.c:
9969         * linux-low.h:
9970         * linux-low.c:
9971         * linux-ia64-low.c:
9972         * linux-i386-low.c:
9973         * linux-crisv32-low.c:
9974         * thread-db.c:
9975         * terminal.h:
9976         * target.h:
9977         * target.c:
9978         * server.h:
9979         * server.c:
9980         * remote-utils.c:
9981         * regcache.h:
9982         * utils.c:
9983         * Makefile.in:
9984         * configure.ac:
9985         * gdbserver.1: Add (C) after Copyright.  Update the FSF
9986         address.
9987
9988 2005-11-13  Daniel Jacobowitz  <[email protected]>
9989
9990         * linux-arm-low.c (arm_eabi_breakpoint): New variable.
9991         (arm_breakpoint_at): Recognize both breakpoints.
9992         (the_low_target): Use the correct breakpoint instruction.
9993
9994 2005-11-02  Daniel Jacobowitz  <[email protected]>
9995
9996         * configure.srv (x86_64-*-linux*): Turn on thread_db support.
9997         * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
9998         (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
9999         (the_low_target): Update.
10000
10001 2005-10-25  Andreas Schwab  <[email protected]>
10002
10003         * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
10004
10005         * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
10006         (ia64_num_regs): Reduce to 462.
10007
10008 2005-09-17  Daniel Jacobowitz  <[email protected]>
10009
10010         * acinclude.m4: Correct quoting.
10011         * aclocal.m4: Regenerated.
10012
10013         Suggested by SZOKOVACS Robert <[email protected]>:
10014         * thread-db.c (thread_db_err_str): Handle TD_VERSION.
10015         (thread_db_init): Call thread_db_err_str.
10016         * configure.ac: Check for TD_VERSION.
10017         * config.in, configure: Regenerated.
10018
10019 2005-07-31  Kaveh R. Ghazi  <[email protected]>
10020
10021         * server.h (error, fatal, warning): Add ATTR_FORMAT.
10022
10023 2005-07-13  Daniel Jacobowitz  <[email protected]>
10024
10025         * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
10026         is not available.  Define HAVE_PTRACE_GETREGS if it is.
10027         * config.in, configure: Regenerated.
10028         * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
10029         * linux-i386-low.c, linux-m68k-low.c: Update to use
10030         HAVE_PTRACE_GETREGS.
10031         * linux-low.c (regsets_fetch_inferior_registers)
10032         (regsets_store_inferior_registers): Only return 0 if we processed
10033         GENERAL_REGS.
10034         * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
10035         * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
10036
10037 2005-07-13  Daniel Jacobowitz  <[email protected]>
10038
10039         * inferiors.c (struct thread_info): Add gdb_id.
10040         (add_thread): Add gdb_id argument.
10041         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
10042         * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
10043         calls to add_thread.
10044         * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
10045         * server.c (handle_query): Use thread_to_gdb_id.
10046         (handle_v_cont, main): Use gdb_id_to_thread_id.
10047         * server.h (add_thread): Update prototype.
10048         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
10049         prototypes.
10050
10051 2005-07-13  Daniel Jacobowitz  <[email protected]>
10052
10053         * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
10054         left-padded registers.
10055         * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
10056         * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
10057
10058 2005-07-01  Steve Ellcey  <[email protected]>
10059
10060         * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
10061         * configure: Regenerate.
10062         * config.in: Regenerate.
10063         * server.h (NEED_DECLARATION_STRERROR):
10064         Replace with !HAVE_DECL_STRERROR.
10065
10066 2005-06-16  Daniel Jacobowitz  <[email protected]>
10067
10068         * linux-low.c (linux_wait, linux_send_signal): Don't test
10069         an unsigned long variable for > 0 if it could be MAX_ULONG.
10070         * server.c (myresume): Likewise.
10071         * target.c (set_desired_inferior): Likewise.
10072
10073 2005-06-13  Mark Kettenis  <[email protected]>
10074
10075         * configure.ac: Simplify and improve check for socklen_t.
10076         * configure, config.in: Regenerate.
10077
10078 2005-06-12  Daniel Jacobowitz  <[email protected]>
10079
10080         * acconfig.h: Remove.
10081         * configure.ac: Add a test for socklen_t.  Use three-argument
10082         AC_DEFINE throughout.
10083         * config.in: Regenerated using autoheader 2.59.
10084         * configure: Regenerated.
10085
10086         * gdbreplay.c (socklen_t): Provide a default.
10087         (remote_open): Use socklen_t.
10088         * remote-utils.c (socklen_t): Provide a default.
10089         (remote_open): Use socklen_t.
10090         (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
10091         unsigned char.
10092
10093         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
10094         char for buffers.
10095         * linux-low.c (linux_read_memory, linux_write_memory)
10096         (linux_read_auxv): Likewise.
10097         * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
10098         (check_mem_write): Likewise.
10099         * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
10100         Likewise.
10101         * regcache.c (struct inferior_rgcache_data, registers_to_string)
10102         (registers_from_string, register_data): Likewise.
10103         * server.c (handle_query, main): Likewise.
10104         * server.h (convert_ascii_to_int, convert_int_to_ascii)
10105         (decode_M_packet): Likewise.
10106         * target.c (read_inferior_memory, write_inferior_memory): Likewise.
10107         * target.h (struct target_ops): Update read_memory, write_memory,
10108         and read_auxv.
10109         (read_inferior_memory, write_inferior_memory): Update.
10110         * linux-low.h (struct linux_target_ops): Change type of breakpoint
10111         to unsigned char *.
10112         * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
10113         linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
10114         linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
10115         linux-s390-low.c, linux-sh-low.c: Update for changes in
10116         read_inferior_memory and the_low_target->breakpoint.
10117
10118 2005-05-28  Daniel Jacobowitz  <[email protected]>
10119
10120         * Makefile.in (SFILES): Add linux-ppc64-low.c.
10121         (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
10122         * configure.srv: Add powerpc64-*-linux*.
10123         * linux-ppc64-low.c: New file.
10124
10125 2005-05-23  Orjan Friberg  <[email protected]>
10126
10127         * linux-cris-low.c: New file with support for CRIS.
10128         * linux-crisv32-low.c: Ditto for CRISv32.
10129         * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
10130         (clean): Add reg-cris.c and reg-crisv32.c.
10131         Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
10132         reg-crisv32.o, and reg-crisv32.c to make rules.
10133         * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
10134         recognized targets.
10135
10136 2005-05-16  Ulrich Weigand  <[email protected]>
10137
10138         * linux-low.c (fetch_register): Ensure buffer size is a multiple
10139         of sizeof (PTRACE_XFER_TYPE).
10140         (usr_store_inferior_registers): Likewise.  Zero out excess bytes.
10141
10142 2005-05-12  Orjan Friberg  <[email protected]>
10143
10144         * target.h (struct target_ops): Add insert_watchpoint,
10145         remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
10146         pointers for hardware watchpoint support.
10147         * linux-low.h (struct linux_target_ops): Ditto.
10148         * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
10149         (linux_stopped_by_watchpoint, linux_stopped_data_address): New.  Add
10150         to linux_target_ops.
10151         * remote-utils.c (prepare_resume_reply): Add watchpoint information to
10152         reply packet.
10153         * server.c (main): Recognize 'Z' and 'z' packets.
10154
10155 2005-05-10  Ulrich Weigand  <[email protected]>
10156
10157         * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
10158         (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
10159         (the_low_target): Add new members.
10160
10161 2005-05-04  Daniel Jacobowitz  <[email protected]>
10162
10163         * proc-service.c (ps_lgetregs): Search all_processes instead of
10164         all_threads.
10165
10166 2005-05-04  Daniel Jacobowitz  <[email protected]>
10167
10168         * server.c (start_inferior): Change return type to int.
10169         (attach_inferior): Change sigptr to int *.
10170         (handle_v_cont, handle_v_requests): Change signal to int *.
10171         (main): Change signal to int.
10172
10173 2005-04-15  Kei Sakamoto  <[email protected]>
10174
10175         * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
10176         * configure.srv: Add m32r*-*-linux*.
10177         * linux-m32r-low.c: New file.
10178
10179 2005-03-04  Daniel Jacobowitz  <[email protected]>
10180
10181         * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
10182
10183 2005-03-03  Daniel Jacobowitz  <[email protected]>
10184
10185         * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
10186         Take unsigned long arguments for PIDs.
10187         * linux-low.c (add_process, linux_attach_lwp, linux_attach)
10188         (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
10189         (wait_for_sigstop, linux_resume_one_process)
10190         (regsets_fetch_inferior_registers, linux_send_signal)
10191         (linux_read_auxv): Likewise.  Update the types of variables holding
10192         PIDs.  Update format string specifiers.
10193         * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
10194         * remote-utils.c (prepare_resume_reply): Likewise.
10195         * server.c (cont_thread, general_thread, step_thread)
10196         (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
10197         unsigned long.
10198         (handle_query): Update format specifiers.
10199         (handle_v_cont, main): Use strtoul for thread IDs.
10200         * server.h (struct inferior_list_entry): Use unsigned long for ID.
10201         (add_thread, find_inferior_id, change_inferior_id, cont_thread)
10202         (general_thread, step_thread, thread_from_wait)
10203         (old_thread_from_wait): Update.
10204         * target.h (struct thread_resume): Use unsigned long for THREAD.
10205         (struct target_ops): Use unsigned long for arguments to attach and
10206         thread_alive.
10207
10208 2005-02-24  Daniel Jacobowitz  <[email protected]>
10209
10210         * acinclude.m4: Include bfd/bfd.m4 directly.
10211         * configure.ac: Use AC_ARG_PROGRAM.  Suggested by Aron Griffis
10212         <[email protected]>.
10213         * aclocal.m4, configure: Regenerated.
10214
10215 2005-01-07  Andrew Cagney  <[email protected]>
10216
10217         * configure.ac: Rename configure.in, require autoconf 2.59.
10218         * configure: Re-generate.
10219
10220 2004-12-08  Daniel Jacobowitz  <[email protected]>
10221
10222         * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area.  Reset
10223         LIBS when finished.
10224         * aclocal.m4: Regenerated.
10225         * configure: Regenerated.
10226
10227 2004-11-21  Andreas Schwab  <[email protected]>
10228
10229         * linux-m68k-low.c (m68k_num_gregs): Define.
10230         (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
10231         (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
10232         (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
10233         (m68k_breakpoint_at): New.  Add to the_low_target.
10234
10235         * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
10236         srv_linux_thread_db to yes.
10237
10238 2004-10-20  Joel Brobecker  <[email protected]>
10239
10240         * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
10241         (ARCH_SET_FS): Likewise.
10242         (ARCH_GET_FS): Likewise.
10243         (ARCH_GET_GS): Likewise.
10244
10245 2004-10-16  Daniel Jacobowitz  <[email protected]>
10246
10247         * linux-i386-low.c (ps_get_thread_area): New.
10248         * linux-x86-64-low.c (ps_get_thread_area): New.
10249         * linux-low.c: Include <sys/syscall.h>.
10250         (linux_kill_one_process): Don't kill the first thread here.
10251         (linux_kill): Kill the first thread here.
10252         (kill_lwp): New function.
10253         (send_sigstop, linux_send_signal): Use it.
10254         * proc-service.c: Clean up #ifdefs.
10255         (fpregset_info): Delete.
10256         (ps_lgetregs): Update and enable implementation.
10257         (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
10258         implementations.
10259         * remote-utils.c (struct sym_cache, symbol_cache): New.
10260         (input_interrupt): Print a clearer message.
10261         (async_io_enabled): New variable.
10262         (enable_async_io, disable_async_io): Use it.  Update comments.
10263         (look_up_one_symbol): Use the symbol cache.
10264         * thread-db.c (thread_db_look_up_symbols): New function.
10265         (thread_db_init): Update comments.  Call thread_db_look_up_symbols.
10266
10267 2004-10-16  Daniel Jacobowitz  <[email protected]>
10268
10269         * configure.in: Test for -rdynamic.
10270         * configure: Regenerated.
10271         * Makefile (INTERNAL_LDFLAGS): New.
10272         (gdbserver, gdbreplay): Use it.
10273
10274 2004-09-02  Andrew Cagney  <[email protected]>
10275
10276         * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
10277
10278 2004-03-23  Daniel Jacobowitz  <[email protected]>
10279
10280         * linux-low.c (linux_wait): Clear all_processes list also.
10281
10282 2004-03-12  Daniel Jacobowitz  <[email protected]>
10283
10284         * linux-low.c: Include <errno.h>.  Remove extern declaration of
10285         errno.
10286
10287 2004-03-12  Daniel Jacobowitz  <[email protected]>
10288
10289         * gdbreplay.c, server.h, utils.c: Update copyright years.
10290
10291 2004-03-04  Nathan J. Williams  <[email protected]>
10292
10293         * server.c (main): Print child status or termination signal from
10294         variable 'signal', not 'sig'.
10295
10296 2004-03-04  Nathan J. Williams  <[email protected]>
10297
10298         * linux-low.c (linux_read_memory): Change return type to
10299         int.  Check for and return error from ptrace().
10300         * target.c (read_inferior_memory): Change return type to int.  Pass
10301         back return status from the_target->read_memory().
10302         * target.h (struct target_ops): Adapt *read_memory() prototype.
10303         Update comment.
10304         (read_inferior_memory): Adapt prototype.
10305         * server.c (main): Return an error packet if
10306         read_inferior_memory() returns an error.
10307
10308 2004-03-04  Daniel Jacobowitz  <[email protected]>
10309
10310         * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10311         Unify with other clean targets.
10312
10313 2004-02-29  Daniel Jacobowitz  <[email protected]>
10314
10315         * server.c (handle_v_cont): Call set_desired_inferior.
10316
10317 2004-02-29  Daniel Jacobowitz  <[email protected]>
10318
10319         * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10320
10321 2004-02-29  Daniel Jacobowitz  <[email protected]>
10322
10323         * linux-low.c (linux_wait): Unblock async I/O.
10324         (linux_resume): Block and enable async I/O.
10325         * remote-utils.c (block_async_io, unblock_async_io): New functions.
10326         * server.h (block_async_io, unblock_async_io): Add prototypes.
10327
10328 2004-02-29  Daniel Jacobowitz  <[email protected]>
10329
10330         * remote-utils.c (remote_open): Print a status notice after
10331         opening a TCP port.
10332         * server.c (attach_inferior): Print a status notice after
10333         attaching.
10334
10335 2004-02-29  Daniel Jacobowitz  <[email protected]>
10336
10337         * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10338
10339 2004-02-26  Daniel Jacobowitz  <[email protected]>
10340
10341         * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10342         error packet.
10343         * server.c, target.h: Update copyright years.
10344
10345 2004-02-25  Roland McGrath  <[email protected]>
10346
10347         * target.h (struct target_ops): New member `read_auxv'.
10348         * server.c (handle_query): Handle qPart:auxv:read: query using that.
10349         * linux-low.c (linux_read_auxv): New function.
10350         (linux_target_ops): Initialize `read_auxv' member to that.
10351
10352 2004-02-17  Ulrich Weigand <[email protected]>
10353
10354         Committed by Jim Blandy  <[email protected]>.
10355
10356         * linux-s390-low.c (s390_num_regs): Update.
10357         (s390_regmap): Remove control registers.  Use __s390x__ predefine
10358         instead of GPR_SIZE to distiguish s390 and s390x targets.
10359
10360 2004-01-31  Daniel Jacobowitz  <[email protected]>
10361
10362         * linux-low.c: Update copyright year.
10363         (check_removed_breakpoint): Clear pending_is_breakpoint.
10364         (linux_set_resume_request, linux_queue_one_thread)
10365         (resume_status_pending_p): New functions.
10366         (linux_continue_one_thread): Use process->resume.
10367         (linux_resume): Only resume threads if there are no pending events.
10368         * linux-low.h (struct process_info): Add resume request
10369         pointer.
10370
10371 2004-01-30  Daniel Jacobowitz  <[email protected]>
10372
10373         * regcache.c (new_register_cache): Clear the allocated register
10374         buffer.  Suggested by Atsushi Nemoto <[email protected]>.
10375
10376 2003-10-13  Daniel Jacobowitz  <[email protected]>
10377
10378         * linux-low.c (linux_resume): Take a struct thread_resume *
10379         argument.
10380         (linux_wait): Update call.
10381         (resume_ptr): New static variable.
10382         (linux_continue_one_thread): Renamed from
10383         linux_continue_one_process.  Use resume_ptr.
10384         (linux_resume): Use linux_continue_one_thread.
10385         * server.c (handle_v_cont, handle_v_requests): New functions.
10386         (myresume): New function.
10387         (main): Handle 'v' case.
10388         * target.h (struct thread_resume): New type.
10389         (struct target_ops): Change argument of "resume" to struct
10390         thread_resume *.
10391         (myresume): Delete macro.
10392
10393 2003-08-08  H.J. Lu  <[email protected]>
10394
10395         * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10396         (uninstall): Support DESTDIR.
10397
10398 Mon Jul 21 20:09:34 UTC 2003  Brendan Conoboy  <[email protected]>
10399
10400         * configure.srv: Add xscale*linux copy of arm*linux entry.
10401
10402 2003-07-24  Daniel Jacobowitz  <[email protected]>
10403
10404         * linux-arm-low.c (arm_reinsert_addr): New function.
10405         (the_low_target): Add arm_reinsert_addr.
10406
10407 2003-07-08  Mark Kettenis  <[email protected]>
10408
10409         * mem-break.c: Remove whitespace at end of file.
10410
10411 2003-06-28  Daniel Jacobowitz  <[email protected]>
10412
10413         * configure.in: Check whether we need to prototype strerror.
10414         * server.h: Optionally prototype strerror.
10415         * gdbreplay.c (perror_with_name): Use strerror.
10416         * linux-low.c (linux_attach_lwp): Use strerror.
10417         * utils.c (perror_with_name): Use strerror.
10418         * config.in, configure: Regenerated.
10419
10420 2003-06-28  Daniel Jacobowitz  <[email protected]>
10421
10422         * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10423         SUGIOKA Toshinobu <[email protected]>.
10424
10425 2003-06-20  Daniel Jacobowitz  <[email protected]>
10426
10427         * Makefile.in (SFILES): Update.
10428         * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10429         low-sun3.c: Remove files.
10430
10431 2003-06-17  Daniel Jacobowitz  <[email protected]>
10432
10433         * linux-low.c: Move comment to linux_thread_alive where it belonged.
10434         (linux_detach_one_process, linux_detach): New functions.
10435         (linux_target_ops): Add linux_detach.
10436         * server.c (main): Handle 'D' packet.
10437         * target.h (struct target_ops): Add "detach" member.
10438         (detach_inferior): Define.
10439
10440 2003-06-13  Mark Kettenis  <[email protected]>
10441
10442         From Kelley Cook  <[email protected]>:
10443         * configure.srv: Accept i[34567]86 variants.
10444
10445 2003-06-05  Daniel Jacobowitz  <[email protected]>
10446
10447         * linux-low.c (linux_wait_for_event): Correct comment typos.
10448         (linux_resume_one_process): Call check_removed_breakpoint.
10449         (linux_send_signal): New function.
10450         (linux_target_ops): Add linux_send_signal.
10451         * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10452         of kill.
10453         * target.h (struct target_ops): Add send_signal.
10454
10455 2003-05-29  Jim Blandy  <[email protected]>
10456
10457         * linux-low.c (usr_store_inferior_registers): Transfer buf in
10458         PTRACE_XFER_TYPE-sized chunks, not int-sized chunks.  Otherwise,
10459         if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10460         away part of the register's value.
10461
10462 2003-03-26  Daniel Jacobowitz  <[email protected]>
10463
10464         * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10465         (linux_wait_for_event, linux_init_signals): Likewise.
10466
10467 2003-03-17  Daniel Jacobowitz  <[email protected]>
10468
10469         * configure.in: Check for stdlib.h.
10470         * configure: Regenerated.
10471         * config.in: Regenerated.
10472
10473 2003-01-04  Andreas Schwab  <[email protected]>
10474
10475         * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10476
10477 2003-01-02  Andrew Cagney  <[email protected]>
10478
10479         * Makefile.in: Remove obsolete code.
10480
10481 2002-11-20  Daniel Jacobowitz  <[email protected]>
10482
10483         * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10484         defined(PT_FPR0_HI).
10485
10486 2002-11-17  Stuart Hughes  <[email protected]>
10487
10488         * linux-arm-low.c (arm_num_regs): Increase.
10489         (arm_regmap): Include status register.
10490
10491 2002-11-17  Daniel Jacobowitz  <[email protected]>
10492
10493         * linux-low.c (register_addr): Remove incorrect -1 check.
10494
10495 2002-08-29  Daniel Jacobowitz  <[email protected]>
10496
10497         * linux-low.c (linux_create_inferior): Call setpgid.  Return
10498         the new PID.
10499         (unstopped_p, linux_signal_pid): Remove.
10500         (linux_target_ops): Remove linux_signal_pid.
10501         * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10502         global instead of target method.
10503         * target.h (struct target_ops): Remove signal_pid.  Update comment
10504         for create_inferior.
10505         * server.c (signal_pid): New variable.
10506         (create_inferior): Set signal_pid.  Block SIGTTOU and SIGTTIN in
10507         gdbserver.  Set the child to be the foreground process group.
10508         (attach_inferior): Set signal_pid.
10509
10510 2002-08-23  Daniel Jacobowitz  <[email protected]>
10511
10512         * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10513
10514 2002-08-20  Jim Blandy  <[email protected]>
10515
10516         * Makefile.in (LDFLAGS): Allow the configure script to establish a
10517         default for this.
10518
10519 2002-08-01  Andrew Cagney  <[email protected]>
10520
10521         * Makefile.in: Make chill references obsolete.
10522
10523 2002-07-24  Kevin Buettner  <[email protected]>
10524
10525         * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10526         * configure: Regenerate.
10527         * config.in: Regenerate.
10528
10529 2002-07-09  David O'Brien  <[email protected]>
10530
10531         * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10532         (perror_with_name, remote_close, remote_open, expect, play): Static.
10533
10534 2002-07-04  Michal Ludvig  <[email protected]>
10535
10536         * linux-x86-64-low.c (x86_64_regmap): Make it an array of
10537         byte offsets instead of an array of indexes.
10538         (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10539
10540 2002-06-13  Daniel Jacobowitz  <[email protected]>
10541
10542         * regcache.c: Add comment.
10543
10544 2002-06-11  Daniel Jacobowitz  <[email protected]>
10545
10546         * thread-db.c: New file.
10547         * proc-service.c: New file.
10548         * acinclude.m4: New file.
10549         * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10550         proc-service.o, and thread-db.o.
10551         (linux-low.o): Add USE_THREAD_DB.
10552         * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10553         HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10554         * aclocal.m4: Regenerated.
10555         * config.in: Regenerated.
10556         * configure: Regenerated.
10557         * configure.in: Check for proc_service.h, sys/procfs.h,
10558         thread_db.h, and linux/elf.h headrs.
10559         Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10560         PRFPREGSET_T_BROKEN.  Introduce srv_thread_depfiles and USE_THREAD_DB.
10561         Check for -lthread_db and thread support.
10562         * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10563         PowerPC, and SuperH.
10564         * i387-fp.c: Constify arguments.
10565         * i387-fp.h: Likewise.
10566         * inferiors.c: (struct thread_info): Renamed from
10567         `struct inferior_info'.  Remove PID member.  Use generic inferior
10568         list header.  All uses updated.
10569         (inferiors, signal_pid): Removed.
10570         (all_threads): New variable.
10571         (get_thread): Define.
10572         (add_inferior_to_list): New function.
10573         (for_each_inferior): New function.
10574         (change_inferior_id): New function.
10575         (add_inferior): Removed.
10576         (remove_inferior): New function.
10577         (add_thread): New function.
10578         (free_one_thread): New function.
10579         (remove_thread): New function.
10580         (clear_inferiors): Use for_each_inferior and free_one_thread.
10581         (find_inferior): New function.
10582         (find_inferior_id): New function.
10583         (inferior_target_data): Update argument type.
10584         (set_inferior_target_data): Likewise.
10585         (inferior_regcache_data): Likewise.
10586         (set_inferior_regcache_data): Likewise.
10587         * linux-low.c (linux_bp_reinsert): Remove.
10588         (all_processes, stopping_threads, using_thrads)
10589         (struct pending_signals, debug_threads, pid_of): New.
10590         (inferior_pid): Replace with macro.
10591         (struct inferior_linux_data): Remove.
10592         (get_stop_pc, add_process): New functions.
10593         (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10594         Use add_process and add_thread.
10595         (linux_attach_lwp): New function, based on old linux_attach.  Use
10596         add_process and add_thread.  Set stop_expected for new threads.
10597         (linux_attach): New function.
10598         (linux_kill_one_process): New function.
10599         (linux_kill): Kill all LWPs.
10600         (linux_thread_alive): Use find_inferior_id.
10601         (check_removed_breakpoints, status_pending_p): New functions.
10602         (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10603         Update.  Use WNOHANG.  Wait for cloned processes also.  Update process
10604         struct for the found process.
10605         (linux_wait_for_event): New function.
10606         (linux_wait): Use it.  Support LWPs.
10607         (send_sigstop, wait_for_sigstop, stop_all_processes)
10608         (linux_resume_one_process, linux_continue_one_process): New functions.
10609         (linux_resume): Support LWPs.
10610         (REGISTER_RAW_SIZE): Remove.
10611         (fetch_register): Use register_size instead.  Call supply_register.
10612         (usr_store_inferior_registers): Likewise.  Call collect_register.
10613         Fix recursive case.
10614         (regsets_fetch_inferior_registers): Improve error message.
10615         (regsets_store_inferior_registers): Add debugging.
10616         (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
10617         (unstopped_p, linux_signal_pid): New functions.
10618         (linux_target_ops): Add linux_signal_pid.
10619         (linux_init_signals): New function.
10620         (initialize_low): Call it.  Initialize using_threads.
10621         * regcache.c (inferior_regcache_data): Add valid
10622         flag.
10623         (get_regcache): Fetch registers lazily.  Add fetch argument
10624         and update all callers.
10625         (regcache_invalidate_one, regcache_invalidate): New
10626         functions.
10627         (new_register_cache): Renamed from create_register_cache.
10628         Return the new regcache.
10629         (free_register_cache): Change argument to a void *.
10630         (registers_to_string, registers_from_string): Call get_regcache
10631         with fetch flag set.
10632         (register_data): Make static.  Pass fetch flag to get_regcache.
10633         (supply_register): Call get_regcache with fetch flag clear.
10634         (collect_register): Call get_regcache with fetch flag set.
10635         (collect_register_as_string): New function.
10636         * regcache.h: Update.
10637         * remote-utils.c (putpkt): Flush after debug output and use
10638         stderr.
10639         Handle input interrupts while waiting for an ACK.
10640         (input_interrupt): Use signal_pid method.
10641         (getpkt): Flush after debug output and use stderr.
10642         (outreg): Use collect_register_as_string.
10643         (new_thread_notify, dead_thread_notify): New functions.
10644         (prepare_resume_reply): Check using_threads.  Set thread_from_wait
10645         and general_thread.
10646         (look_up_one_symbol): Flush after debug output.
10647         * server.c (step_thread, server_waiting): New variables.
10648         (start_inferior): Don't use signal_pid.  Update call to mywait.
10649         (attach_inferior): Update call to mywait.
10650         (handle_query): Handle qfThreadInfo and qsThreadInfo.
10651         (main): Don't fetch/store registers explicitly.  Use
10652         set_desired_inferior.  Support proposed ``Hs'' packet.  Update
10653         calls to mywait.
10654         * server.h: Update.
10655         (struct inferior_list, struct_inferior_list_entry): New.
10656         * target.c (set_desired_inferior): New.
10657         (write_inferior_memory): Constify.
10658         (mywait): New function.
10659         * target.h: Update.
10660         (struct target_ops): New signal_pid method.
10661         (mywait): Removed macro, added prototype.
10662
10663         * linux-low.h (regset_func): Removed.
10664         (regset_fill_func, regset_store_func): New.
10665         (enum regset_type): New.
10666         (struct regset_info): Add type field.  Use new operation types.
10667         (struct linux_target_ops): stop_pc renamed to get_pc.
10668         Add decr_pc_after_break and breakpoint_at.
10669         (get_process, get_thread_proess, get_process_thread)
10670         (strut process_info, all_processes, linux_attach_lwp)
10671         (thread_db_init): New.
10672
10673         * linux-arm-low.c (arm_get_pc, arm_set_pc,
10674         arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
10675         (the_low_target): Add new members.
10676         * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
10677         (i386_store_fpxregset): Constify.
10678         (target_regsets): Add new kind identifier.
10679         (i386_get_pc): Renamed from i386_stop_pc.  Simplify.
10680         (i386_set_pc): Add debugging.
10681         (i386_breakpoint_at): New function.
10682         (the_low_target): Add new members.
10683         * linux-mips-low.c (mips_get_pc, mips_set_pc)
10684         (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
10685         (mips_breakpoint_at): New.
10686         (the_low_target): Add new members.
10687         * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
10688         (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
10689         (the_low_target): Add new members.
10690         * linux-sh-low.c (sh_get_pc, sh_set_pc)
10691         (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
10692         (the_low_target): Add new members.
10693         * linux-x86-64-low.c (target_regsets): Add new kind
10694         identifier.
10695
10696 2002-05-15  Daniel Jacobowitz  <[email protected]>
10697
10698         From Martin Pool <[email protected]>:
10699         * server.c (gdbserver_usage): New function.
10700         (main): Call it.
10701
10702 2002-05-14  Daniel Jacobowitz  <[email protected]>
10703
10704         * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
10705         stop_at -> stop_pc.
10706
10707 2002-05-04  Andrew Cagney  <[email protected]>
10708
10709         * Makefile.in: Remove obsolete code.
10710
10711 2002-04-24  Michal Ludvig  <[email protected]>
10712
10713         * linux-low.c (regsets_fetch_inferior_registers),
10714         (regsets_store_inferior_registers): Removed cast to int from
10715         ptrace() calls.
10716         * regcache.h: Added declaration of struct inferior_info.
10717
10718 2002-04-20  Daniel Jacobowitz  <[email protected]>
10719
10720         * inferiors.c (struct inferior_info): Add regcache_data.
10721         (add_inferior): Call create_register_cache.
10722         (clear_inferiors): Call free_register_cache.
10723         (inferior_regcache_data, set_inferior_regcache_data): New functions.
10724         * regcache.c (struct inferior_regcache_data): New.
10725         (registers): Remove.
10726         (get_regcache): New function.
10727         (create_register_cache, free_register_cache): New functions.
10728         (set_register_cache): Don't initialize the register cache here.
10729         (registers_to_string, registers_from_string, register_data): Call
10730         get_regcache.
10731         * regcache.h: Add prototypes.
10732         * server.h: Likewise.
10733
10734 2002-04-20  Daniel Jacobowitz  <[email protected]>
10735
10736         * mem-break.c: New file.
10737         * mem-break.h: New file.
10738         * Makefile.in: Add mem-break.o rule; update server.h
10739         dependencies.
10740         * inferiors.c (struct inferior_info): Add target_data
10741         member.
10742         (clear_inferiors): Free target_data member if set.
10743         (inferior_target_data, set_inferior_target_data): New functions.
10744         * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
10745         (i386_stop_pc, i386_set_pc): New.  Add to the_low_target.
10746         * linux-low.c (linux_bp_reinsert): New variable.
10747         (struct inferior_linux_data): New.
10748         (linux_create_inferior): Use set_inferior_target_data.
10749         (linux_attach): Likewise.  Call add_inferior.
10750         (linux_wait_for_one_inferior): New function.
10751         (linux_wait): Call it.
10752         (linux_write_memory): Add const.
10753         (initialize_low): Call set_breakpoint_data.
10754         * linux-low.h (struct linux_target_ops): Add breakpoint
10755         handling members.
10756         * server.c (attach_inferior): Remove extra add_inferior
10757         call.
10758         * server.h: Include mem-break.h.  Update inferior.c
10759         prototypes.
10760         * target.c (read_inferior_memory)
10761         (write_inferior_memory): New functions.
10762         * target.h (read_inferior_memory)
10763         (write_inferior_memory): Change macros to prototypes.
10764         (struct target_ops): Update comments.  Add const to write_memory
10765         definition.
10766
10767 2002-04-11  Daniel Jacobowitz  <[email protected]>
10768
10769         * linux-low.c (usr_store_inferior_registers): Support
10770         registers which are allowed to fail to store.
10771         * linux-low.h (linux_target_ops): Likewise.
10772         * linux-ppc-low.c (ppc_regmap): Support FPSCR.
10773         (ppc_cannot_store_register): FPSCR may not be storable.
10774
10775 2002-04-09  Daniel Jacobowitz  <[email protected]>
10776
10777         * server.h: Include <string.h> if HAVE_STRING_H.
10778         * ChangeLog: Correct paths in last ChangeLog entry.
10779
10780 2002-04-09  Daniel Jacobowitz  <[email protected]>
10781
10782         * linux-low.h: Remove obsolete prototypes.
10783         (struct linux_target_ops): New.
10784         (extern the_low_target): New.
10785         * linux-low.c (num_regs, regmap): Remove declarations.
10786         (register_addr): Use the_low_target explicitly.
10787         (fetch_register): Likewise.
10788         (usr_fetch_inferior_registers): Likewise.
10789         (usr_store_inferior_registers): Likewise.
10790         * linux-arm-low.c (num_regs): Remove.
10791         (arm_num_regs): Define.
10792         (arm_regmap): Renamed from regmap, made static.
10793         (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
10794         made static.
10795         (arm_cannot_store_register): Renamed from cannot_store_register,
10796         made static.
10797         (the_low_target): New.
10798         * linux-i386-low.c (num_regs): Remove.
10799         (i386_num_regs): Define.
10800         (i386_regmap): Renamed from regmap, made static.
10801         (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
10802         made static.
10803         (i386_cannot_store_register): Renamed from cannot_store_register,
10804         made static.
10805         (the_low_target): New.
10806         * linux-ia64-low.c (num_regs): Remove.
10807         (ia64_num_regs): Define.
10808         (ia64_regmap): Renamed from regmap, made static.
10809         (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
10810         made static.
10811         (ia64_cannot_store_register): Renamed from cannot_store_register,
10812         made static.
10813         (the_low_target): New.
10814         * linux-m68k-low.c (num_regs): Remove.
10815         (m68k_num_regs): Define.
10816         (m68k_regmap): Renamed from regmap, made static.
10817         (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
10818         made static.
10819         (m68k_cannot_store_register): Renamed from cannot_store_register,
10820         made static.
10821         (the_low_target): New.
10822         * linux-mips-low.c (num_regs): Remove.
10823         (mips_num_regs): Define.
10824         (mips_regmap): Renamed from regmap, made static.
10825         (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
10826         made static.
10827         (mips_cannot_store_register): Renamed from cannot_store_register,
10828         made static.
10829         (the_low_target): New.
10830         * linux-ppc-low.c (num_regs): Remove.
10831         (ppc_num_regs): Define.
10832         (ppc_regmap): Renamed from regmap, made static.
10833         (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
10834         made static.
10835         (ppc_cannot_store_register): Renamed from cannot_store_register,
10836         made static.
10837         (the_low_target): New.
10838         * linux-s390-low.c (num_regs): Remove.
10839         (s390_num_regs): Define.
10840         (s390_regmap): Renamed from regmap, made static.
10841         (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
10842         made static.
10843         (s390_cannot_store_register): Renamed from cannot_store_register,
10844         made static.
10845         (the_low_target): New.
10846         * linux-sh-low.c (num_regs): Remove.
10847         (sh_num_regs): Define.
10848         (sh_regmap): Renamed from regmap, made static.
10849         (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
10850         made static.
10851         (sh_cannot_store_register): Renamed from cannot_store_register,
10852         made static.
10853         (the_low_target): New.
10854         * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
10855         (the_low_target): New.
10856
10857 2002-04-09  Daniel Jacobowitz  <[email protected]>
10858
10859         * Makefile.in: Add stamp-h target.
10860         * configure.in: Create stamp-h.
10861         * configure: Regenerated.
10862
10863 2002-04-09  Daniel Jacobowitz  <[email protected]>
10864
10865         * inferiors.c: New file.
10866         * target.c: New file.
10867         * target.h: New file.
10868         * Makefile.in:  Add target.o and inferiors.o.  Update
10869         dependencies.
10870         * linux-low.c (inferior_pid): New static variable,
10871         moved from server.c.
10872         (linux_create_inferior): Renamed from create_inferior.
10873         Call add_inferior.  Return 0 on success instead of a PID.
10874         (linux_attach): Renamed from myattach.
10875         (linux_kill): Renamed from kill_inferior.  Call clear_inferiors ().
10876         (linux_thread_alive): Renamed from mythread_alive.
10877         (linux_wait): Renamed from mywait.  Call clear_inferiors () if the
10878         child dies.
10879         (linux_resume): Renamed from myresume.  Add missing ``return 0''.
10880         (regsets_store_inferior_registers): Correct error message.
10881         Add missing ``return 0''.
10882         (linux_fetch_registers): Renamed from fetch_inferior_registers.
10883         (linux_store_registers): Renamed from store_inferior_registers.
10884         (linux_read_memory): Renamed from read_inferior_memory.
10885         (linux_write_memory): Renamed from write_inferior_memory.
10886         (linux_target_ops): New structure.
10887         (initialize_low): Call set_target_ops ().
10888         * remote-utils.c (unhexify): New function.
10889         (hexify): New function.
10890         (input_interrupt): Send signals to ``signal_pid''.
10891         * server.c (inferior_pid): Remove.
10892         (start_inferior): Update create_inferior call.
10893         (attach_inferior): Call add_inferior.
10894         (handle_query): New function.
10895         (main): Call handle_query for `q' packets.
10896         * server.h: Include "target.h".  Remove obsolete prototypes.
10897         Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
10898
10899 2002-04-09  Daniel Jacobowitz  <[email protected]>
10900
10901         * Makefile.in: Add WARN_CFLAGS.  Update configury
10902         dependencies.
10903         * configure.in: Check for <string.h>
10904         * configure: Regenerate.
10905         * config.in: Regenerate.
10906         * gdbreplay.c: Include needed system headers.
10907         (remote_open): Remove strchr prototype.
10908         * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
10909         * regcache.c (supply_register): Change buf argument to const void *.
10910         (supply_register_by_name): Likewise.
10911         (collect_register): Change buf argument to void *.
10912         (collect_register_by_name): Likewise.
10913         * regcache.h: Add missing prototypes.
10914         * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
10915         * server.c (handle_query): New function.
10916         (attached): New static variable, moved out of main.
10917         (main): Quiet longjmp clobber warnings.
10918         * server.h: Add ATTR_NORETURN and ATTR_FORMAT.  Update prototypes.
10919         * utils.c (error): Remove NORETURN.
10920         (fatal): Likewise.
This page took 0.658244 seconds and 4 git commands to generate.