record-btrace: add bts buffer size configuration option
[external/binutils.git] / gdb / gdbserver / ChangeLog
1 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
2
3         * linux-low.c (linux_low_btrace_conf): Print size.
4         * server.c (handle_btrace_conf_general_set): New.
5         (hanle_general_set): Call handle_btrace_conf_general_set.
6         (handle_query): Report Qbtrace-conf:bts:size as supported.
7
8 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
9
10         * linux-low.c (linux_low_enable_btrace): Update parameters.
11         (linux_low_btrace_conf): New.
12         (linux_target_ops)<to_btrace_conf>: Initialize.
13         * server.c (current_btrace_conf): New.
14         (handle_btrace_enable): Rename to ...
15         (handle_btrace_enable_bts): ... this.  Pass &current_btrace_conf
16         to target_enable_btrace.  Update comment.  Update users.
17         (handle_qxfer_btrace_conf): New.
18         (qxfer_packets): Add btrace-conf entry.
19         (handle_query): Report qXfer:btrace-conf:read as supported packet.
20         * target.h (target_ops)<enable_btrace>: Update parameters and comment.
21         (target_ops)<read_btrace_conf>: New.
22         (target_enable_btrace): Update parameters.
23         (target_read_btrace_conf): New.
24
25 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
26
27         * server.c (handle_btrace_general_set): Remove call to
28         target_supports_btrace.
29         (supported_btrace_packets): New.
30         (handle_query): Call supported_btrace_packets.
31         * target.h: include btrace-common.h.
32         (btrace_target_info): Removed.
33         (supports_btrace, target_supports_btrace): Update parameters.
34
35 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
36
37         * Makefile.in (SFILES): Add common/btrace-common.c.
38         (OBS): Add common/btrace-common.o.
39         (btrace-common.o): Add build rules.
40         * linux-low: Include btrace-common.h.
41         (linux_low_read_btrace): Use struct btrace_data.  Call
42         btrace_data_init and btrace_data_fini.
43
44 2015-02-06  Pedro Alves  <palves@redhat.com>
45
46         * thread-db.c (find_new_threads_callback): Add debug output.
47
48 2015-02-04  Pedro Alves  <palves@redhat.com>
49
50         * linux-low.c (handle_extended_wait): Don't resume LWPs here.
51         (resume_stopped_resumed_lwps): New function.
52         (linux_wait_for_event_filtered): Use it.
53
54 2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
55
56         * Makefile.in (SFILES): Add linux-personality.c.
57         (linux-personality.o): New rule.
58         * configure.srv (srv_linux_obj): Add linux-personality.o to the
59         list of objects to be built.
60         * linux-low.c: Include nat/linux-personality.h.
61         (linux_create_inferior): Remove code to disable address space
62         randomization (moved to ../nat/linux-personality.c).  Create
63         cleanup to disable address space randomization.
64
65 2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
66
67         * Makefile.in (posix-strerror.o): New rule.
68         (mingw-strerror.o): Likewise.
69         * configure: Regenerated.
70         * configure.ac: Source file ../common/common.host.  Initialize new
71         variable srv_host_obs.  Add srv_host_obs to GDBSERVER_DEPFILES.
72
73 2015-01-14  Yao Qi  <yao@codesourcery.com>
74
75         * Makefile.in (SFILES): Add nat/ppc-linux.c.
76         (ppc-linux.o): New rule.
77         * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
78         * configure.ac: AC_CHECK_FUNCS(getauxval).
79         * config.in: Re-generated.
80         * configure: Re-generated.
81         * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
82         ppc64_64bit_inferior_p
83
84 2015-01-14  Yao Qi  <yao@codesourcery.com>
85
86         * linux-ppc-low.c: Include "nat/ppc-linux.h".
87          (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
88         (PPC_FEATURE_HAS_ALTIVEC,  PPC_FEATURE_HAS_SPE): Likewise.
89         (PT_ORIG_R3, PT_TRAP): Likewise.
90         (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
91         (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
92         (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
93
94 2015-01-10  Joel Brobecker  <brobecker@adacore.com>
95
96         * i387-fp.c (i387_cache_to_xsave): In look over
97         num_avx512_zmmh_high_registers, replace use of struct i387_xsave
98         zmmh_low_space field by use of zmmh_high_space.
99
100 2015-01-09  Pedro Alves  <palves@redhat.com>
101
102         * linux-low.c (step_over_bkpt): Move higher up in the file.
103         (handle_extended_wait): Don't store the stop_pc here.
104         (get_stop_pc): Adjust comments and rename to ...
105         (check_stopped_by_breakpoint): ... this.  Record whether the LWP
106         stopped for a software breakpoint or hardware breakpoint.
107         (thread_still_has_status_pending_p): New function.
108         (status_pending_p_callback): Use
109         thread_still_has_status_pending_p.  If the event is no longer
110         interesting, resume the LWP.
111         (handle_tracepoints): Add assert.
112         (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
113         (wstatus_maybe_breakpoint): New function.
114         (cancel_breakpoint): Delete function.
115         (check_stopped_by_watchpoint): New function, factored out from
116         linux_low_filter_event.
117         (lp_status_maybe_breakpoint): Delete function.
118         (linux_low_filter_event): Remove filter_ptid argument.
119         Leave thread group exits pending here.  Store the LWP's stop PC.
120         Always leave events pending.
121         (linux_wait_for_event_filtered): Pull all events out of the
122         kernel, and leave them all pending.
123         (count_events_callback, select_event_lwp_callback): Consider all
124         events.
125         (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
126         (select_event_lwp): Only give preference to the stepping LWP in
127         all-stop mode.  Adjust comments.
128         (ignore_event): New function.
129         (linux_wait_1): Delete 'retry' label.  Use ignore_event.  Remove
130         references to cancel_breakpoints.  Adjust to renames.  Also give
131         equal priority to all LWPs that have had events in non-stop mode.
132         If reporting a software breakpoint event, unadjust the LWP's PC.
133         (linux_wait): If linux_wait_1 returned an ignored event, retry.
134         (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
135         Adjust.
136         (linux_resume_one_lwp): Store the LWP's PC.  Adjust.
137         (resume_status_pending_p): Use thread_still_has_status_pending_p.
138         (linux_stopped_by_watchpoint): Adjust.
139         (linux_target_ops): Remove reference to linux_cancel_breakpoints.
140         * linux-low.h (enum lwp_stop_reason): New.
141         (struct lwp_info) <stop_pc>: Adjust comment.
142         <stopped_by_watchpoint>: Delete field.
143         <stop_reason>: New field.
144         * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
145         * mem-break.c (software_breakpoint_inserted_here)
146         (hardware_breakpoint_inserted_here): New function.
147         * mem-break.h (software_breakpoint_inserted_here)
148         (hardware_breakpoint_inserted_here): Declare.
149         * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
150         (cancel_breakpoints): Delete.
151         * tracepoint.c (clear_installed_tracepoints, stop_tracing)
152         (upload_fast_traceframes): Remove references to
153         cancel_breakpoints.
154
155 2015-01-09  Pedro Alves  <palves@redhat.com>
156
157         * thread-db.c (find_new_threads_callback): Ignore thread if the
158         kernel thread ID is -1.
159
160 2015-01-09  Pedro Alves  <palves@redhat.com>
161
162         * linux-low.c (linux_attach_fail_reason_string): Move to
163         nat/linux-ptrace.c, and rename.
164         (linux_attach_lwp): Update comment.
165         (attach_proc_task_lwp_callback): New function.
166         (linux_attach): Adjust to rename and use
167         linux_proc_attach_tgid_threads.
168         (linux_attach_fail_reason_string): Delete declaration.
169
170 2015-01-01  Joel Brobecker  <brobecker@adacore.com>
171
172         * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
173         * server.c (gdbserver_version): Likewise.
174
175 2014-12-29  Sergio Durigan Junior  <sergiodj@redhat.com>
176
177         * remote-utils.c: Include ctype.h.
178         (input_interrupt): Explicitly handle the case when the char
179         received is the NUL byte.  Improve the printing of non-ASCII
180         characters.
181
182 2014-12-16  Joel Brobecker  <brobecker@adacore.com>
183
184         * linux-low.c (linux_low_filter_event): Update call to
185         linux_enable_event_reporting following the addition of
186         a new parameter to that function.
187
188 2014-12-16  Catalin Udma  <catalin.udma@freescale.com>
189
190         PR server/17457
191         * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
192         (AARCH64_FPCR_REGNO): Likewise.
193         (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
194         (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
195         (aarch64_store_fpregset): Likewise.
196
197 2014-12-15  Joel Brobecker  <brobecker@adacore.com>
198
199         * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
200         Remove FIXME comment about assumption about N.
201
202 2014-12-13  Joel Brobecker  <brobecker@adacore.com>
203
204         * configure.ac: If large-file support is disabled in GDBserver,
205         pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
206         * configure: Regenerate.
207
208 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
209
210         * linux-low.c (regsets_fetch_inferior_registers): Suppress the
211         warning upon ENODATA from ptrace.
212         * linux-s390-low.c (s390_store_tdb): New.
213         (s390_regsets): Add regset for NT_S390_TDB.
214
215 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
216
217         * linux-low.c (regsets_store_inferior_registers): Skip regsets
218         without a fill_function.
219         * linux-s390-low.c (s390_fill_last_break): Remove.
220         (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
221         (s390_arch_setup): Use regset's size instead of fill_function for
222         loop end condition.
223
224 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
225
226         * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
227         the regset's store function when ptrace returned an error.
228         * regcache.c (get_thread_regcache): Invalidate register cache
229         before fetching inferior's registers.
230
231 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
232
233         * linux-low.c (regsets_fetch_inferior_registers): Rephrase
234         while-loop as for-loop.
235         (regsets_store_inferior_registers): Likewise.
236
237 2014-11-28  Yao Qi  <yao@codesourcery.com>
238
239         * configure.ac(AC_CHECK_FUNCS): Remove readlink.
240         * config.in, configure: Re-generate.
241         * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
242         is defined.
243
244 2014-11-21  Yao Qi  <yao@codesourcery.com>
245
246         * configure.ac: Don't invoke AC_FUNC_ALLOCA.
247         (AC_CHECK_HEADERS): Remove malloc.h.
248         * configure: Re-generated.
249         * config.in: Re-generated.
250         * server.h: Don't include alloca.h and malloc.h.
251         * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
252         Don't include malloc.h.
253
254 2014-11-17  Joel Brobecker  <brobecker@adacore.com>
255
256         * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
257         corresponding ERRNO check in same block.
258
259 2014-11-12  Pedro Alves  <palves@redhat.com>
260
261         * server.c (cont_thread): Update comment.
262         (start_inferior, attach_inferior): No longer clear cont_thread.
263         (handle_v_cont): No longer set cont_thread.
264         (captured_main): Clear cont_thread each time a GDB connects.
265
266 2014-11-12  Pedro Alves  <palves@redhat.com>
267
268         * linux-low.c (linux_wait_1): Don't force a wait for the Hc
269         thread, and don't resume all threads if the Hc thread has exited.
270
271 2014-11-12  Pedro Alves  <palves@redhat.com>
272
273         * linux-low.c (linux_request_interrupt): Always send a SIGINT to
274         the process group instead of to a specific LWP.
275
276 2014-10-15  Pedro Alves  <palves@redhat.com>
277
278         PR server/17487
279         * win32-arm-low.c (arm_set_thread_context): Remove current_event
280         parameter.
281         (arm_set_thread_context): Delete.
282         (the_low_target): Adjust.
283         * win32-i386-low.c (debug_registers_changed)
284         (debug_registers_used): Delete.
285         (update_debug_registers_callback): New function.
286         (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
287         needing to update their debug registers.
288         (win32_get_current_dr): New function.
289         (x86_dr_low_get_addr, x86_dr_low_get_control)
290         (x86_dr_low_get_status): Fetch the debug register from the thread
291         record's context.
292         (i386_initial_stuff): Adjust.
293         (i386_get_thread_context): Remove current_event parameter.  Don't
294         clear debug_registers_changed nor copy DR values to
295         debug_reg_state.
296         (i386_set_thread_context): Delete.
297         (i386_prepare_to_resume): New function.
298         (i386_thread_added): Mark the thread as needing to update irs
299         debug registers.
300         (the_low_target): Remove i386_set_thread_context and install
301         i386_prepare_to_resume.
302         * win32-low.c (win32_get_thread_context): Adjust.
303         (win32_set_thread_context): Use SetThreadContext
304         directly.
305         (win32_prepare_to_resume): New function.
306         (win32_require_context): New function, factored out from ...
307         (thread_rec): ... this.
308         (continue_one_thread): Call win32_prepare_to_resume on each thread
309         we're about to continue.
310         (win32_resume): Call win32_prepare_to_resume on the event thread.
311         * win32-low.h (struct win32_thread_info)
312         <debug_registers_changed>: New field.
313         (struct win32_target_ops): Change prototype of set_thread_context,
314         delete set_thread_context and add prepare_to_resume.
315         (win32_require_context): New declaration.
316
317 2014-10-08  Gary Benson  <gbenson@redhat.com>
318
319         * server.h: Do not include common-exceptions.h.
320
321 2014-10-08  Gary Benson  <gbenson@redhat.com>
322
323         * server.h: Do not include cleanups.h.
324
325 2014-09-30  James Hogan  <james.hogan@imgtec.com>
326
327         * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
328         mips64-dsp-linux.c.
329
330 2014-09-23  Yao Qi  <yao@codesourcery.com>
331
332         * linux-low.c (lp_status_maybe_breakpoint): New function.
333         (linux_low_filter_event): Call lp_status_maybe_breakpoint.
334         (count_events_callback): Likewise.
335         (select_event_lwp_callback): Likewise.
336         (cancel_breakpoints_callback): Likewise.
337
338 2014-09-19  Don Breazeal  <donb@codesourcery.com>
339
340         * linux-low.c (handle_extended_wait): Call
341         linux_ptrace_get_extended_event.
342         (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
343         linux_is_extended_waitstatus.
344
345 2014-09-16  Joel Brobecker  <brobecker@adacore.com>
346
347         * Makefile.in (CPPFLAGS): Define.
348         (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
349         (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
350
351 2014-09-16  Gary Benson  <gbenson@redhat.com>
352
353         * inferiors.h (current_inferior): Renamed as...
354         (current_thread): New variable.  All uses updated.
355         * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
356         (maybe_move_out_of_jump_pad): Likewise.
357         (cancel_breakpoint): Likewise.
358         (linux_low_filter_event): Likewise.
359         (wait_for_sigstop): Likewise.
360         (linux_resume_one_lwp): Likewise.
361         (need_step_over_p): Likewise.
362         (start_step_over): Likewise.
363         (linux_stabilize_threads): Renamed save_inferior as saved_thread.
364         * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
365         * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
366         and save_inferior as saved_thread.
367         * regcache.c (get_thread_regcache): Renamed saved_inferior as
368         saved_thread.
369         (regcache_invalidate_thread): Likewise.
370         * remote-utils.c (prepare_resume_reply): Likewise.
371         * thread-db.c (thread_db_get_tls_address): Likewise.
372         (disable_thread_event_reporting): Likewise.
373         (remove_thread_event_breakpoints): Likewise.
374         * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
375         as saved_thread.
376         * target.h (set_desired_inferior): Renamed as...
377         (set_desired_thread): New declaration.  All uses updated.
378         * server.c (myresume): Updated comment to reference thread instead
379         of inferior.
380         (handle_serial_event): Likewise.
381         (handle_target_event): Likewise.
382
383 2014-09-12  Tom Tromey  <tromey@redhat.com>
384             Gary Benson  <gbenson@redhat.com>
385
386         * regcache.h: Include common-regcache.h.
387         (regcache_read_pc): Don't declare.
388         * regcache.c (get_thread_regcache_for_ptid): New function.
389
390 2014-09-11  Tom Tromey  <tromey@redhat.com>
391             Gary Benson  <gbenson@redhat.com>
392
393         * symbol.c: New file.
394         * Makefile.in (SFILES): Add symbol.c.
395         (OBS): Add symbol.o.
396
397 2014-09-11  Gary Benson  <gbenson@redhat.com>
398
399         * target.c (target_stop_ptid, target_continue_ptid): New
400         functions.
401
402 2014-09-11  Tom Tromey  <tromey@redhat.com>
403             Gary Benson  <gbenson@redhat.com>
404
405         * target.h: Include target/target.h.
406         * target.c (target_read_memory, target_read_uint32)
407         (target_write_memory): New functions.
408
409 2014-09-11  Gary Benson  <gbenson@redhat.com>
410
411         * server.h (debug_hw_points): Don't declare.
412         * server.c (debug_hw_points): Don't define.  Replace all uses
413         with show_debug_regs.
414         * linux-aarch64-low.c (debug_hw_points): Don't define.  Replace
415         all uses with show_debug_regs.
416
417 2014-09-08  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
418
419         * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
420         endianness into account.
421         (ppc_supply_ptrace_register): Likewise.
422
423 2014-09-03  James Hogan  <james.hogan@imgtec.com>
424
425         * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
426         to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
427
428 2014-09-03  Gary Benson  <gbenson@redhat.com>
429
430         * linux-x86-low.c (x86_linux_prepare_to_resume): Use
431         ALL_DEBUG_ADDRESS_REGISTERS.
432
433 2014-09-02  Gary Benson  <gbenson@redhat.com>
434
435         * i386-low.h: Renamed as...
436         * x86-low.h: New file.  All type, function and variable name
437         prefixes changed from "i386_" to "x86_".  All references updated.
438         * i386-low.c: Renamed as...
439         * x86-low.c: New file.  All type, function and variable name
440         prefixes changed from "i386_" to "x86_".  All references updated.
441
442 2014-09-02  Gary Benson  <gbenson@redhat.com>
443
444         * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
445         (x86_linux_new_thread): Likewise.
446
447 2014-08-29  Gary Benson  <gbenson@redhat.com>
448
449         * server.h (setjmp.h): Do not include.
450         (toplevel): Do not declare.
451         (common-exceptions.h): Include.
452         (cleanups.h): Likewise.
453         * server.c (toplevel): Do not define.
454         (exit_code): New static global.
455         (detach_or_kill_for_exit_cleanup): New function.
456         (main): New function.  Original main renamed to...
457         (captured_main): New function.
458         * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
459
460 2014-08-29  Gary Benson  <gbenson@redhat.com>
461
462         * Makefile.in (SFILES): Add common/common-exceptions.c.
463         (OBS): Add common-exceptions.o.
464         (common-exceptions.o): New rule.
465         * utils.c (prepare_to_throw_exception): New function.
466
467 2014-08-29  Gary Benson  <gbenson@redhat.com>
468
469         * config.in: Regenerate.
470         * configure: Likewise.
471
472 2014-08-29  Gary Benson  <gbenson@redhat.com>
473
474         * Makefile.in (SFILES): Add common/cleanups.c.
475         (OBS): cleanups.o.
476         (cleanups.o): New rule.
477
478 2014-08-29  Gary Benson  <gbenson@redhat.com>
479
480         * utils.c (internal_vwarning): New function.
481
482 2014-08-28  Gary Benson  <gbenson@redhat.com>
483
484         * utils.h (fatal): Remove declaration.
485         * utils.c (fatal): Remove function.
486
487 2014-08-28  Gary Benson  <gbenson@redhat.com>
488
489         * tracepoint.c (gdb_agent_init): Replace fatal with
490         perror_with_name.
491         (initialize_tracepoint): Likewise.
492
493 2014-08-28  Gary Benson  <gbenson@redhat.com>
494
495         * remote-utils.c (remote_prepare): Replace fatal with error.
496
497 2014-08-28  Gary Benson  <gbenson@redhat.com>
498
499         * linux-low.c (linux_async): Replace fatal with warning.
500         Tidy up and return.
501         (linux_start_non_stop): Return -1 if linux_async failed.
502
503 2014-08-28  Gary Benson  <gbenson@redhat.com>
504
505         * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
506         gdb_assert.
507         (i386_dr_low_get_addr): Remove vague comment.
508         * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
509         gdb_assert.
510
511 2014-08-28  Gary Benson  <gbenson@redhat.com>
512
513         * inferiors.c (get_thread_process): Replace check with gdb_assert.
514         * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
515         internal_error.
516         (linux_resume_one_lwp): Likewise.
517         * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
518         gdb_assert.
519         * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
520         with internal_error.
521         * regcache.c (get_thread_regcache): Replace check with gdb_assert.
522         (init_register_cache): Replace fatal with gdb_assert_not_reached.
523         (find_register_by_name): Replace fatal with internal_error.
524         (find_regno): Likewise.
525         * tdesc.c (init_target_desc): Replace check with gdb_assert.
526         * thread-db.c (thread_db_create_event): Likewise.
527         (thread_db_load_search): Likewise.
528         (try_thread_db_load_1): Likewise.
529         * tracepoint.c (get_jump_space_head): Replace fatal with
530         internal_error.
531         (claim_trampoline_space): Likewise.
532         (have_fast_tracepoint_trampoline_buffer): Likewise.
533         (cmd_qtstart): Likewise.
534         (stop_tracing): Likewise.
535         (fast_tracepoint_collecting): Likewise.
536         (target_malloc): Likewise.
537         (download_tracepoint): Likewise.
538         (download_trace_state_variables): Replace check with gdb_assert.
539         (upload_fast_traceframes): Replace fatal with internal_error.
540
541 2014-08-19  Tom Tromey  <tromey@redhat.com>
542             Gary Benson  <gbenson@redhat.com>
543
544         * Makefile.in (SFILES): Add common/common-debug.c.
545         (OBS): Add common-debug.o.
546         (common-debug.o): New rule.
547         * debug.h (debug_printf): Don't declare.
548         * debug.c (debug_printf): Renamed and rewritten as...
549         (debug_vprintf): New function.
550
551 2014-08-19  Gary Benson  <gbenson@redhat.com>
552
553         * utils.h: Do not include print-utils.h.
554
555 2014-08-19  Tom Tromey  <tromey@redhat.com>
556             Gary Benson  <gbenson@redhat.com>
557
558         * server.h: Add static assertion.
559         (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
560
561 2014-08-19  Tom Tromey  <tromey@redhat.com>
562             Gary Benson  <gbenson@redhat.com>
563
564         * Makefile.in (SFILES): Add common/errors.c.
565         (OBS): Add errors.o.
566         (IPA_OBS): Add errors-ipa.o.
567         (errors.o): New rule.
568         (errors-ipa.o): Likewise.
569         * utils.h (perror_with_name, error, warning): Don't declare.
570         * utils.c (warning): Renamed and rewritten as...
571         (vwarning): New function.
572         (error): Renamed and rewritten as...
573         (verror): New function.
574         (internal_error): Renamed and rewritten as...
575         (internal_verror): New function.
576
577 2014-08-07  Gary Benson  <gbenson@redhat.com>
578
579         * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
580         * configure: Regenerate.
581         * config.in: Likewise.
582         * server.h: Do not include errno.h.
583         * event-loop.c: Likewise.
584         * hostio-errno.c: Likewise.
585         * linux-low.c: Likewise.
586         * remote-utils.c: Likewise.
587         * spu-low.c: Likewise.
588         * utils.c: Likewise.
589         * gdbreplay.c: Unconditionally include errno.h.
590
591 2014-08-07  Gary Benson  <gbenson@redhat.com>
592
593         * server.h: Do not include string.h.
594         * event-loop.c: Likewise.
595         * linux-low.c: Likewise.
596         * regcache.c: Likewise.
597         * remote-utils.c: Likewise.
598         * spu-low.c: Likewise.
599         * utils.c: Likewise.
600
601 2014-08-07  Gary Benson  <gbenson@redhat.com>
602
603         * server.h: Do not include gdb_assert.h.
604
605 2014-08-07  Gary Benson  <gbenson@redhat.com>
606
607         * server.h: Do not include common-utils.h.
608
609 2014-08-07  Gary Benson  <gbenson@redhat.com>
610
611         * server.h: Do not include ptid.h.
612         * notif.h: Likewise.
613
614 2014-08-07  Gary Benson  <gbenson@redhat.com>
615
616         * server.h: Do not include gdb_locale.h.
617
618 2014-08-07  Gary Benson  <gbenson@redhat.com>
619
620         * server.h: Do not include gdb/signals.h.
621         * win32-low.c: Likewise.
622
623 2014-08-07  Gary Benson  <gbenson@redhat.com>
624
625         * server.h: Do not include pathmax.h.
626
627 2014-08-07  Gary Benson  <gbenson@redhat.com>
628
629         * server.h: Do not include libiberty.h.
630         * linux-bfin-low.c: Likewise.
631
632 2014-08-07  Gary Benson  <gbenson@redhat.com>
633
634         * server.h: Do not include ansidecl.h.
635
636 2014-08-07  Gary Benson  <gbenson@redhat.com>
637
638         * linux-x86-low.c: Do not include stddef.h.
639         * lynx-ppc-low.c: Likewise.
640         * tracepoint.c: Likewise.
641
642 2014-08-07  Gary Benson  <gbenson@redhat.com>
643
644         * server.h: Do not include stdarg.h.
645         * nto-low.c: Likewise.
646
647 2014-08-07  Gary Benson  <gbenson@redhat.com>
648
649         * server.h: Do not include stdlib.h.
650         * inferiors.c: Likewise.
651         * linux-low.c: Likewise.
652         * regcache.c: Likewise.
653         * spu-low.c: Likewise.
654         * tracepoint.c: Likewise.
655         * utils.c: Likewise.
656
657 2014-08-07  Gary Benson  <gbenson@redhat.com>
658
659         * server.h: Do not include stdio.h.
660         * linux-low.c: Likewise.
661         * remote-utils.c: Likewise.
662         * spu-low.c: Likewise.
663         * utils.c: Likewise.
664         * wincecompat.c: Likewise.
665
666 2014-08-06  Gary Benson  <gbenson@redhat.com>
667
668         * regcache.c (init_register_cache): Move conditionals inside if.
669
670 2014-08-06  Gary Benson  <gbenson@redhat.com>
671
672         * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
673
674 2014-07-31  Gary Benson  <gbenson@redhat.com>
675
676         * ax.h: Do not include server.h.
677         * gdbthread.h: Likewise.
678         * lynx-low.h: Likewise.
679         * notif.h: Likewise.
680
681 2014-07-30  Gary Benson  <gbenson@redhat.com>
682
683         * server.h: Include common-defs.h.
684         Do not include config.h or build-gnulib-gdbserver/config.h.
685
686 2014-07-30  Gary Benson  <gbenson@redhat.com>
687
688         * hostio-errno.c: Move server.h to top of includes list.
689         * inferiors.c: Likewise.
690         * linux-x86-low.c: Likewise.
691         * notif.c: Include server.h.
692
693 2014-07-24  Tom Tromey  <tromey@redhat.com>
694             Gary Benson  <gbenson@redhat.com>
695
696         * server.h (CORE_ADDR): Now unsigned.
697
698 2014-07-16  Pedro Alves  <palves@redhat.com>
699
700         * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
701
702 2014-07-15  Pedro Alves  <palves@redhat.com>
703
704         * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
705         copy.
706
707 2014-07-11  Pedro Alves  <palves@redhat.com>
708
709         * linux-low.c (kill_wait_lwp): New function, based on
710         kill_one_lwp_callback, but use my_waitpid directly.
711         (kill_one_lwp_callback, linux_kill): Use it.
712
713 2014-06-23  Pedro Alves  <palves@redhat.com>
714
715         * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
716         before setting DR0..DR3.
717
718 2014-06-20  Gary Benson  <gbenson@redhat.com>
719
720         * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
721         * configure: Regenerated.
722         * config.in: Likewise.
723
724 2014-06-20  Gary Benson  <gbenson@redhat.com>
725
726         * Makefile.in (SFILES): Update locations for files moved
727         from common to nat.
728         (object file files): Reordered.
729
730 2014-06-20  Gary Benson  <gbenson@redhat.com>
731
732         * i386-low.h (i386_dr_low_can_set_addr): Removed.
733         (i386_dr_low_set_addr): Likewise.
734         (i386_dr_low_get_addr): Likewise.
735         (i386_dr_low_can_set_control): Likewise.
736         (i386_dr_low_set_control): Likewise.
737         (i386_dr_low_get_control): Likewise.
738         (i386_dr_low_get_status): Likewise.
739         (i386_get_debug_register_length): Likewise.
740         * linux-x86-low.c (i386_dr_low_set_addr):
741         Changed signature.  Made static.
742         (i386_dr_low_get_addr): Likewise.
743         (i386_dr_low_set_control): Likewise.
744         (i386_dr_low_get_control): Likewise.
745         (i386_dr_low_get_status): Likewise.
746         (i386_dr_low): New global variable.
747         * win32-i386-low.c (i386_dr_low_set_addr):
748         Changed signature.  Made static.
749         (i386_dr_low_get_addr): Likewise.
750         (i386_dr_low_set_control): Likewise.
751         (i386_dr_low_get_control): Likewise.
752         (i386_dr_low_get_status): Likewise.
753         (i386_dr_low): New global variable.
754
755 2014-06-20  Marcus Shawcroft  <marcus.shawcroft@arm.com>
756
757         * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
758         * Makefile.in (AR, AR_FLAGS): Define.
759         * configure: Regenerate.
760
761 2014-06-19  Gary Benson  <gbenson@redhat.com>
762
763         * Makefile.in (i386-dregs.o): New rule.
764         * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
765         * i386-low.c (target.h): Remove include.
766         (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
767         (DR_CONTROL_SHIFT): Likewise.
768         (DR_CONTROL_SIZE): Likewise.
769         (DR_RW_EXECUTE): Likewise.
770         (DR_RW_WRITE): Likewise.
771         (DR_RW_READ): Likewise.
772         (DR_RW_IORW): Likewise.
773         (DR_LEN_1): Likewise.
774         (DR_LEN_2): Likewise.
775         (DR_LEN_4): Likewise.
776         (DR_LEN_8): Likewise.
777         (DR_LOCAL_ENABLE_SHIFT): Likewise.
778         (DR_GLOBAL_ENABLE_SHIFT): Likewise.
779         (DR_ENABLE_SIZE): Likewise.
780         (DR_LOCAL_SLOWDOWN): Likewise.
781         (DR_GLOBAL_SLOWDOWN): Likewise.
782         (DR_CONTROL_RESERVED): Likewise.
783         (I386_DR_CONTROL_MASK): Likewise.
784         (I386_DR_VACANT): Likewise.
785         (I386_DR_LOCAL_ENABLE): Likewise.
786         (I386_DR_GLOBAL_ENABLE): Likewise.
787         (I386_DR_DISABLE): Likewise.
788         (I386_DR_SET_RW_LEN): Likewise.
789         (I386_DR_GET_RW_LEN): Likewise.
790         (I386_DR_WATCH_HIT): Likewise.
791         (i386_wp_op_t): Likewise.
792         (i386_show_dr): Likewise.
793         (i386_length_and_rw_bits): Likewise.
794         (i386_insert_aligned_watchpoint): Likewise.
795         (i386_remove_aligned_watchpoint): Likewise.
796         (i386_handle_nonaligned_watchpoint): Likewise.
797         i386_update_inferior_debug_regs(): Likewise.
798         (i386_dr_insert_watchpoint): Likewise.
799         (i386_dr_remove_watchpoint): Likewise.
800         (i386_dr_region_ok_for_watchpoint): Likewise.
801         (i386_dr_stopped_data_address): Likewise.
802         (i386_dr_stopped_by_watchpoint): Likewise.
803
804 2014-06-19  Gary Benson  <gbenson@redhat.com>
805
806         * i386-low.c (i386_dr_show): Renamed to
807         i386_show_dr and made static.  All uses updated.
808         (i386_dr_length_and_rw_bits): Renamed to
809         i386_length_and_rw_bits and made static.
810         All uses updated.
811         (i386_dr_insert_aligned_watchpoint): Renamed to
812         i386_insert_aligned_watchpoint and made static.
813         All uses updated.
814         (i386_dr_remove_aligned_watchpoint): Renamed to
815         i386_remove_aligned_watchpoint and made static.
816         All uses updated.
817         (i386_dr_update_inferior_debug_regs): Renamed to
818         i386_update_inferior_debug_regs and made static.
819         All uses updated.
820
821 2014-06-18  Gary Benson  <gbenson@redhat.com>
822
823         * i386-low.h (i386_dr_low_can_set_addr): New macro.
824         (i386_dr_low_can_set_control): Likewise.
825         (i386_get_debug_register_length): Likewise.
826         * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
827         (i386_dr_low_can_set_control): Likewise.
828         (i386_get_debug_register_length): Likewise.
829
830 2014-06-17  Gary Benson  <gbenson@redhat.com>
831
832         * i386-low.h (i386-dregs.h): New include.
833         (DR_FIRSTADDR): Now in i386-dregs.h.
834         (DR_LASTADDR): Likewise.
835         (DR_NADDR): Likewise.
836         (DR_STATUS): Likewise.
837         (DR_CONTROL): Likewise.
838         (i386_debug_reg_state): Likewise.
839         (i386_dr_insert_watchpoint): Likewise.
840         (i386_dr_remove_watchpoint): Likewise.
841         (i386_dr_region_ok_for_watchpoint): Likewise.
842         (i386_dr_stopped_data_address): Likewise.
843         (i386_dr_stopped_by_watchpoint): Likewise.
844         * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
845
846 2014-06-18  Gary Benson  <gbenson@redhat.com>
847
848         * i386-low.h (i386_low_insert_watchpoint): Renamed to
849         i386_dr_insert_watchpoint.
850         (i386_low_remove_watchpoint): Renamed to
851         i386_dr_remove_watchpoint.
852         (i386_low_region_ok_for_watchpoint): Renamed to
853         i386_dr_region_ok_for_watchpoint.
854         (i386_low_stopped_data_address): Renamed to
855         i386_dr_stopped_data_address.
856         (i386_low_stopped_by_watchpoint): Renamed to
857         i386_dr_stopped_by_watchpoint.
858         * i386-low.c (i386_show_dr): Renamed to
859         i386_dr_show and made nonstatic.  All uses updated.
860         (i386_length_and_rw_bits): Renamed to
861         i386_dr_length_and_rw_bits and made nonstatic.
862         All uses updated.
863         (i386_insert_aligned_watchpoint): Renamed to
864         i386_dr_insert_aligned_watchpoint and made nonstatic.
865         All uses updated.
866         (i386_remove_aligned_watchpoint): Renamed to
867         i386_dr_remove_aligned_watchpoint and made nonstatic.
868         All uses updated.
869         (i386_update_inferior_debug_regs): Renamed to
870         i386_dr_update_inferior_debug_regs and made nonstatic.
871         All uses updated.
872         (i386_low_insert_watchpoint): Renamed to
873         i386_dr_insert_watchpoint.  All uses updated.
874         (i386_low_remove_watchpoint): Renamed to
875         i386_dr_remove_watchpoint.  All uses updated.
876         (i386_low_region_ok_for_watchpoint): Renamed to
877         i386_dr_region_ok_for_watchpoint.  All uses updated.
878         (i386_low_stopped_data_address): Renamed to
879         i386_dr_stopped_data_address.  All uses updated.
880         (i386_low_stopped_by_watchpoint): Renamed to
881         i386_dr_stopped_by_watchpoint.  All uses updated.
882
883 2014-06-18  Gary Benson  <gbenson@redhat.com>
884
885         * i386-low.c (i386_dr_low_can_set_addr): New macro.
886         (i386_dr_low_can_set_control): Likewise.
887         (i386_insert_aligned_watchpoint): New check.
888
889 2014-06-18  Gary Benson  <gbenson@redhat.com>
890
891         * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
892         Renamed to state.
893
894 2014-06-18  Gary Benson  <gbenson@redhat.com>
895
896         * i386-low.c (i386_length_and_rw_bits): Use internal_error
897         instead of fatal and error.
898         (i386_handle_nonaligned_watchpoint): Likewise.
899
900 2014-06-18  Gary Benson  <gbenson@redhat.com>
901
902         * i386-low.c (i386_get_debug_register_length): New macro.
903         (TARGET_HAS_DR_LEN_8): Remove conditional.  Use above macro.
904         (i386_show_dr): Use debug_printf instead of fprintf.  Use
905         phex to format values.
906
907 2014-06-18  Gary Benson  <gbenson@redhat.com>
908
909         * i386-low.h: Comment changes.
910         * i386-low.c: Likewise.
911
912 2014-06-18  Gary Benson  <gbenson@redhat.com>
913
914         * i386-low.c: Whitespace changes.
915
916 2014-06-12  Tom Tromey  <tromey@redhat.com>
917
918         * utils.c (freeargv): Remove.
919
920 2014-06-12  Tom Tromey  <tromey@redhat.com>
921
922         * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
923         * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
924         (parse_debug_format_options): Likewise.
925         (gdbserver_usage): Likewise.
926         * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
927         (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
928         (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
929         against libiberty.
930         ($(LIBGNU)): Depend on libiberty.
931         (all-lib): Recurse into all subdirs.
932         (install-only): Invoke "install" target in subdirs.
933         (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
934         targets.
935         * configure: Rebuild.
936         * configure.ac: Add ACX_CONFIGURE_DIR for libiberty.  Don't check
937         for vasprintf, vsnprintf, or gettimeofday.
938         * configure.srv: Don't add safe-ctype.o or lbasename.o to
939         srv_tgtobj.
940
941 2014-06-05  Joel Brobecker  <brobecker@adacore.com>
942
943         * development.sh: Delete.
944         * Makefile.in (config.status): Adjust dependency on development.sh.
945         * configure.ac: Adjust development.sh source call.
946         * configure: Regenerate.
947
948 2014-06-02  Pedro Alves  <palves@redhat.com>
949
950         * ax.c (gdb_free_agent_expr): New function.
951         * ax.h (gdb_free_agent_expr): New declaration.
952         * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
953         list.
954         (clear_breakpoint_conditions, clear_breakpoint_commands): Make
955         static.
956         (clear_breakpoint_conditions_and_commands): New function.
957         * mem-break.h (clear_breakpoint_conditions): Delete declaration.
958         (clear_breakpoint_conditions_and_commands): New declaration.
959
960 2014-05-23  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
961
962         * linux-aarch64-low.c (asm/ptrace.h): Include.
963
964 2014-05-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
965
966         Fix TLS access for -static -pthread.
967         * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
968         (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
969         (thread_db_load_search, try_thread_db_load_1): Initialize it.
970
971 2014-05-20  Pedro Alves  <palves@redhat.com>
972
973         * linux-aarch64-low.c (aarch64_insert_point)
974         (aarch64_remove_point): No longer check whether the type is
975         supported here.  Adjust to new interface.
976         (the_low_target): Install aarch64_supports_z_point_type as
977         supports_z_point_type method.
978         * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
979         (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
980         instead of a Z packet char.  Adjust.
981         (arm_supports_z_point_type): New function.
982         (arm_insert_point, arm_remove_point): Adjust to new interface.
983         (the_low_target): Install arm_supports_z_point_type.
984         * linux-crisv32-low.c (cris_supports_z_point_type): New function.
985         (cris_insert_point, cris_remove_point): Adjust to new interface.
986         Don't check whether the type is supported here.
987         (the_low_target): Install cris_supports_z_point_type.
988         * linux-low.c (linux_supports_z_point_type): New function.
989         (linux_insert_point, linux_remove_point): Adjust to new interface.
990         * linux-low.h (struct linux_target_ops) <insert_point,
991         remove_point>: Take an enum raw_bkpt_type instead of a char.  Add
992         raw_breakpoint pointer parameter.
993         <supports_z_point_type>: New method.
994         * linux-mips-low.c (mips_supports_z_point_type): New function.
995         (mips_insert_point, mips_remove_point): Adjust to new interface.
996         Use mips_supports_z_point_type.
997         (the_low_target): Install mips_supports_z_point_type.
998         * linux-ppc-low.c (the_low_target): Install NULL as
999         supports_z_point_type method.
1000         * linux-s390-low.c (the_low_target): Install NULL as
1001         supports_z_point_type method.
1002         * linux-sparc-low.c (the_low_target): Install NULL as
1003         supports_z_point_type method.
1004         * linux-x86-low.c (x86_supports_z_point_type): New function.
1005         (x86_insert_point): Adjust to new insert_point interface.  Use
1006         insert_memory_breakpoint.  Adjust to new
1007         i386_low_insert_watchpoint interface.
1008         (x86_remove_point): Adjust to remove_point interface.  Use
1009         remove_memory_breakpoint.  Adjust to new
1010         i386_low_remove_watchpoint interface.
1011         (the_low_target): Install x86_supports_z_point_type.
1012         * lynx-low.c (lynx_target_ops): Install NULL as
1013         supports_z_point_type callback.
1014         * nto-low.c (nto_supports_z_point_type): New.
1015         (nto_insert_point, nto_remove_point): Adjust to new interface.
1016         (nto_target_ops): Install nto_supports_z_point_type.
1017         * mem-break.c: Adjust intro comment.
1018         (struct raw_breakpoint) <raw_type, size>: New fields.
1019         <inserted>: Update comment.
1020         <shlib_disabled>: Delete field.
1021         (enum bkpt_type) <gdb_breakpoint>: Delete value.
1022         <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
1023         gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
1024         (raw_bkpt_type_to_target_hw_bp_type): New function.
1025         (find_enabled_raw_code_breakpoint_at): New function.
1026         (find_raw_breakpoint_at): New type and size parameters.  Use them.
1027         (insert_memory_breakpoint): New function, based off
1028         set_raw_breakpoint_at.
1029         (remove_memory_breakpoint): New function.
1030         (set_raw_breakpoint_at): Reimplement.
1031         (set_breakpoint): New, based on set_breakpoint_at.
1032         (set_breakpoint_at): Reimplement.
1033         (delete_raw_breakpoint): Go through the_target->remove_point
1034         instead of assuming memory breakpoints.
1035         (find_gdb_breakpoint_at): Delete.
1036         (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
1037         (find_gdb_breakpoint): New function.
1038         (set_gdb_breakpoint_at): Delete.
1039         (z_type_supported): New function.
1040         (set_gdb_breakpoint_1): New function, loosely based off
1041         set_gdb_breakpoint_at.
1042         (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
1043         (delete_gdb_breakpoint_at): Delete.
1044         (delete_gdb_breakpoint_1): New function, loosely based off
1045         delete_gdb_breakpoint_at.
1046         (delete_gdb_breakpoint): New function.
1047         (clear_gdb_breakpoint_conditions): Rename to ...
1048         (clear_breakpoint_conditions): ... this.  Don't handle a NULL
1049         breakpoint.
1050         (add_condition_to_breakpoint): Make static.
1051         (add_breakpoint_condition): Take a struct breakpoint pointer
1052         instead of an address.  Adjust.
1053         (gdb_condition_true_at_breakpoint): Rename to ...
1054         (gdb_condition_true_at_breakpoint_z_type): ... this, and add
1055         z_type parameter.
1056         (gdb_condition_true_at_breakpoint): Reimplement.
1057         (add_breakpoint_commands): Take a struct breakpoint pointer
1058         instead of an address.  Adjust.
1059         (gdb_no_commands_at_breakpoint): Rename to ...
1060         (gdb_no_commands_at_breakpoint_z_type): ... this.  Add z_type
1061         parameter.  Return true if no breakpoint was found.  Change debug
1062         output.
1063         (gdb_no_commands_at_breakpoint): Reimplement.
1064         (run_breakpoint_commands): Rename to ...
1065         (run_breakpoint_commands_z_type): ... this.  Add z_type parameter,
1066         and change return type to boolean.
1067         (run_breakpoint_commands): New function.
1068         (gdb_breakpoint_here): Also check for Z1 breakpoints.
1069         (uninsert_raw_breakpoint): Don't try to reinsert a disabled
1070         breakpoint.  Go through the_target->remove_point instead of
1071         assuming memory breakpoint.
1072         (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
1073         software and hardware breakpoints.
1074         (reinsert_raw_breakpoint): Go through the_target->insert_point
1075         instead of assuming memory breakpoint.
1076         (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
1077         software and hardware breakpoints.
1078         (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
1079         Check both software and hardware breakpoints.
1080         (validate_inserted_breakpoint): Assert the breakpoint is a
1081         software breakpoint.  Set the inserted flag to -1 instead of
1082         setting shlib_disabled.
1083         (delete_disabled_breakpoints): Adjust.
1084         (validate_breakpoints): Only validate software breakpoints.
1085         Adjust to inserted flag change.
1086         (check_mem_read, check_mem_write): Skip breakpoint types other
1087         than software breakpoints.  Adjust to inserted flag change.
1088         * mem-break.h (enum raw_bkpt_type): New enum.
1089         (raw_breakpoint, struct process_info): Forward declare.
1090         (Z_packet_to_target_hw_bp_type): Delete declaration.
1091         (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
1092         (set_gdb_breakpoint, delete_gdb_breakpoint)
1093         (clear_breakpoint_conditions): New declarations.
1094         (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
1095         (breakpoint_inserted_here): Update comment.
1096         (add_breakpoint_condition, add_breakpoint_commands): Replace
1097         address parameter with a breakpoint pointer parameter.
1098         (gdb_breakpoint_here): Update comment.
1099         (delete_gdb_breakpoint_at): Delete.
1100         (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
1101         * server.c (process_point_options): Take a struct breakpoint
1102         pointer instead of an address.  Adjust.
1103         (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
1104         delete_gdb_breakpoint.
1105         * spu-low.c (spu_target_ops): Install NULL as
1106         supports_z_point_type method.
1107         * target.h: Include mem-break.h.
1108         (struct target_ops) <prepare_to_access_memory>: Update comment.
1109         <supports_z_point_type>: New field.
1110         <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1111         instead of a char.  Also take a raw breakpoint pointer.
1112         * win32-arm-low.c (the_low_target): Install NULL as
1113         supports_z_point_type.
1114         * win32-i386-low.c (i386_supports_z_point_type): New function.
1115         (i386_insert_point, i386_remove_point): Adjust to new interface.
1116         (the_low_target): Install i386_supports_z_point_type.
1117         * win32-low.c (win32_supports_z_point_type): New function.
1118         (win32_insert_point, win32_remove_point): Adjust to new interface.
1119         (win32_target_ops): Install win32_supports_z_point_type.
1120         * win32-low.h (struct win32_target_ops):
1121         <supports_z_point_type>: New method.
1122         <insert_point, remove_point>: Take an enum raw_bkpt_type argument
1123         instead of a char.  Also take a raw breakpoint pointer.
1124
1125 2014-05-20  Pedro Alves  <palves@redhat.com>
1126
1127         * mem-break.h: Include break-common.h.
1128         (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1129         (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
1130         (Z_packet_to_target_hw_bp_type): New declaration.
1131         * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
1132         * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
1133         (Z_PACKET_ACCESS_WP): Delete macros.
1134         (Z_packet_to_hw_type): Delete function.
1135         * i386-low.h: Don't include break-common.h here.
1136         (Z_packet_to_hw_type): Delete declaration.
1137         * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
1138         Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1139         * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
1140         Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
1141         * linux-aarch64-low.c: Don't include break-common.h here.
1142         (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
1143         (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
1144         (Z_packet_to_target_hw_bp_type): Delete function.
1145         * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
1146         function.
1147         (mips_insert_point, mips_remove_point): Use
1148         Z_packet_to_target_hw_bp_type.
1149
1150 2014-05-20  Pedro Alves  <palves@redhat.com>
1151
1152         * linux-aarch64-low.c: Include break-common.h.
1153         (enum target_point_type): Delete.
1154         (Z_packet_to_point_type): Rename to ...
1155         (Z_packet_to_target_hw_bp_type): ... this, and return a
1156         target_hw_bp_type instead.
1157         (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
1158         instead of an enum target_point_type.
1159         (aarch64_point_encode_ctrl_reg): Likewise.  Compute type mask from
1160         breakpoint type.
1161         (aarch64_dr_state_insert_one_point)
1162         (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
1163         (aarch64_handle_aligned_watchpoint)
1164         (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
1165         Take an enum target_hw_bp_type instead of an enum
1166         target_point_type.
1167         (aarch64_supports_z_point_type): New function.
1168         (aarch64_insert_point, aarch64_remove_point): Use it.  Adjust to
1169         use Z_packet_to_target_hw_bp_type.
1170
1171 2014-05-20  Joel Brobecker  <brobecker@adacore.com>
1172
1173         * configure.ac: Only use -Werror by default when DEVELOPMENT
1174         is true.
1175         * configure: Regenerate.
1176
1177 2014-05-19  Jan Kratochvil  <jan.kratochvil@redhat.com>
1178
1179         Fix gdbserver qGetTLSAddr for x86_64 -m32.
1180         * linux-x86-low.c (X86_64_USER_REGS): New.
1181         (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
1182
1183 2014-04-28  Yao Qi  <yao@codesourcery.com>
1184
1185         * Makefile.in (i386-avx512.c): Fix the typo of generated file
1186         name.
1187
1188 2014-04-25  Pedro Alves  <palves@redhat.com>
1189
1190         PR server/16255
1191         * linux-low.c (linux_attach_fail_reason_string): New function.
1192         (linux_attach_lwp): Delete.
1193         (linux_attach_lwp_1): Rename to ...
1194         (linux_attach_lwp): ... this.  Take a ptid instead of a pid as
1195         argument.  Remove "initial" parameter.  Return int instead of
1196         void.  Don't error or warn here.
1197         (linux_attach): Adjust to call linux_attach_lwp.  Call error on
1198         failure to attach to the tgid.  Call warning when failing to
1199         attach to an lwp.
1200         * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
1201         argument.  Remove "initial" parameter.  Return int instead of
1202         void.  Don't error or warn here.
1203         (linux_attach_fail_reason_string): New declaration.
1204         * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
1205         interface change.  Use linux_attach_fail_reason_string.
1206
1207 2014-04-24  Michael Sturm  <michael.sturm@mintel.com>
1208             Walfred Tedeschi  <walfred.tedeschi@intel.com>
1209
1210         * Makefile.in: Added rules to handle new files
1211         i386-avx512.c i386-avx512-linux.c amd64-avx512.c
1212         amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
1213         * configure.srv (srv_i386_regobj): Add i386-avx512.o.
1214         (srv_i386_linux_regobj): Add i386-avx512-linux.o.
1215         (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
1216         (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
1217         x32-avx512-linux.o.
1218         (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
1219         (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
1220         (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
1221         i386/x32-avx512.xml.
1222         (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
1223         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
1224         i386/x32-avx512-linux.xml.
1225         * i387-fp.c (num_avx512_k_registers): New constant for number
1226         of K registers.
1227         (num_avx512_zmmh_low_registers): New constant for number of
1228         lower ZMM registers (0-15).
1229         (num_avx512_zmmh_high_registers): New constant for number of
1230         higher ZMM registers (16-31).
1231         (num_avx512_ymmh_registers): New contant for number of higher
1232         YMM registers (ymm16-31 added by avx521 on x86_64).
1233         (num_avx512_xmm_registers): New constant for number of higher
1234         XMM registers (xmm16-31 added by AVX512 on x86_64).
1235         (struct i387_xsave): Add space for AVX512 registers.
1236         (i387_cache_to_xsave): Change raw buffer size to 64 characters.
1237         Add code to handle AVX512 registers.
1238         (i387_xsave_to_cache): Add code to handle AVX512 registers.
1239         * linux-x86-low.c (init_registers_amd64_avx512_linux): New
1240         prototypei from generated file.
1241         (tdesc_amd64_avx512_linux): Likewise.
1242         (init_registers_x32_avx512_linux): Likewise.
1243         (tdesc_x32_avx512_linux): Likewise.
1244         (init_registers_i386_avx512_linux): Likewise.
1245         (tdesc_i386_avx512_linux): Likewise.
1246         (x86_64_regmap): Add AVX512 registers.
1247         (x86_linux_read_description): Add code to handle AVX512 XSTATE
1248         mask.
1249         (initialize_low_arch): Add code to initialize AVX512 registers.
1250
1251 2014-04-23  Pedro Alves  <palves@redhat.com>
1252
1253         * mem-break.c (find_gdb_breakpoint_at): Make static.
1254         * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
1255
1256 2014-04-23  Pedro Alves  <palves@redhat.com>
1257
1258         * i386-low.c: Don't include break-common.h here.
1259         (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1260         prototype to take target_hw_bp_type as argument instead of a Z
1261         packet char.
1262         * i386-low.h: Include break-common.h here.
1263         (Z_packet_to_hw_type): Declare.
1264         (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
1265         prototypes.
1266         * linux-x86-low.c (x86_insert_point): Convert the packet number to
1267         a target_hw_bp_type before calling i386_low_insert_watchpoint.
1268         (x86_remove_point): Convert the packet number to a
1269         target_hw_bp_type before calling i386_low_remove_watchpoint.
1270         * win32-i386-low.c (i386_insert_point): Convert the packet number
1271         to a target_hw_bp_type before calling i386_low_insert_watchpoint.
1272         (i386_remove_point): Convert the packet number to a
1273         target_hw_bp_type before calling i386_low_remove_watchpoint.
1274
1275 2014-04-23  Pedro Alves  <palves@redhat.com>
1276
1277         * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
1278
1279 2014-04-10  Pedro Alves  <palves@redhat.com>
1280
1281         * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1282         Check if the condition or command is NULL before checking if the
1283         breakpoint is known.  On success, return true.
1284         * mem-break.h (add_breakpoint_condition): Document return.
1285         (add_breakpoint_commands): Add describing comment.
1286         * server.c (skip_to_semicolon): New function.
1287         (process_point_options): Use it.
1288
1289 2014-04-09  Pedro Alves  <palves@redhat.com>
1290
1291         * linux-low.c (linux_read_loadmap): Pass current_inferior directly
1292         to lwpid_of.
1293
1294 2014-02-27  Pedro Alves  <palves@redhat.com>
1295
1296         PR 12702
1297         * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
1298         macros.
1299         * linux-low.c (delete_lwp, handle_extended_wait): Add debug
1300         output.
1301         (last_thread_of_process_p): Take a PID argument instead of a
1302         thread pointer.
1303         (linux_wait_for_lwp): Delete.
1304         (num_lwps, check_zombie_leaders, not_stopped_callback): New
1305         functions.
1306         (linux_low_filter_event): New function, party factored out from
1307         linux_wait_for_event.
1308         (linux_wait_for_event): Rename to ...
1309         (linux_wait_for_event_filtered): ... this.  Add new filter ptid
1310         argument.  Partly rewrite.  Always use waitpid(-1, WNOHANG) and
1311         sigsuspend.  Check for zombie leaders.
1312         (linux_wait_for_event): Reimplement as wrapper around
1313         linux_wait_for_event_filtered.
1314         (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED.  Assume that if
1315         a normal or signal exit is seen, it's the whole process exiting.
1316         (wait_for_sigstop): No longer a for_each_inferior callback.
1317         Rewrite on top of linux_wait_for_event_filtered.
1318         (stop_all_lwps): Call wait_for_sigstop directly.
1319         * server.c (resume, handle_target_event): Handle
1320         TARGET_WAITKIND_NO_RESUMED.
1321
1322 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
1323
1324         * win32-low.c (psapi_get_dll_name,
1325         * win32_CreateToolhelp32Snapshot): Delete.
1326         (win32_CreateToolhelp32Snapshot, win32_Module32First)
1327         (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
1328         Delete.
1329         (handle_load_dll): Add function description.
1330         Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
1331
1332 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
1333
1334         * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
1335         Add comment.
1336         (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
1337         base address when calling win32_add_one_solib.
1338         (handle_load_dll): Delete local variable load_addr.
1339         Remove 0x1000 offset applied to DLL base address when calling
1340         win32_add_one_solib.
1341         (handle_unload_dll): Add comment.
1342
1343 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
1344
1345         * win32-low.c (win32_add_all_dlls): Renames
1346         win32_ensure_ntdll_loaded.  Rewrite function documentation.
1347         Adjust implementation to always load all DLLs.
1348         Add 0x1000 offset to DLL base address when calling
1349         win32_add_one_solib.
1350         (child_initialization_done): New static global.
1351         (do_initial_child_stuff): Set child_initialization_done to
1352         zero during child initialization, and 1 after.  Replace call
1353         to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
1354         Add comment.
1355         (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
1356         (handle_unload_dll): Add function documentation.
1357         (get_child_debug_event): Ignore load and unload DLL events
1358         during child initialization.
1359
1360 2014-02-20  Doug Evans  <dje@google.com>
1361
1362         Remove global all_lwps.
1363         * inferiors.h (ptid_of): Move here from linux-low.h.
1364         (pid_of, lwpid_of): Ditto.
1365         * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
1366         parameter is a struct thread_info * now.
1367         (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
1368         directly.  Pass &all_threads to find_inferior instead of &all_lwps.
1369         (aarch64_stopped_data_address): Fetch lwpid from current_inferior
1370         directly.
1371         (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
1372         (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
1373         * linux-arm-low.c (update_registers_callback): Update, "entry"
1374         parameter is a struct thread_info * now.
1375         Fetch lwpid from current_inferior directly.
1376         (arm_insert_point): Pass &all_threads to find_inferior instead of
1377         &all_lwps.
1378         (arm_remove_point): Ditto.
1379         (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
1380         (arm_prepare_to_resume): Fetch pid from thread.
1381         (arm_read_description): Fetch lwpid from current_inferior directly.
1382         * linux-low.c (all_lwps): Delete.
1383         (delete_lwp): Delete call to remove_inferior.
1384         (handle_extended_wait): Fetch lwpid from thread.
1385         (add_lwp): Don't set lwp->entry.id.  Remove call to
1386         add_inferior_to_list.
1387         (linux_attach_lwp_1): Fetch pid from current_inferior directly.
1388         (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
1389         (kill_one_lwp_callback): Ditto.
1390         (linux_kill): Don't dereference NULL pointer.
1391         Fetch ptid,lwpid from thread.
1392         (get_detach_signal): Fetch ptid from thread.
1393         (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
1394         Simplify call to regcache_invalidate_thread.
1395         (delete_lwp_callback): Update, "entry" parameter is a
1396         struct thread_info * now.  Fetch pid from thread.
1397         (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
1398         (status_pending_p_callback): Update, "entry" parameter is a
1399         struct thread_info * now.  Fetch ptid from thread.
1400         (find_lwp_pid): Update, "entry" parameter is a
1401         struct thread_info * now.
1402         (linux_wait_for_lwp): Fetch pid from thread.
1403         (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
1404         (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
1405         (enqueue_one_deferred_signal): Fetch lwpid from thread.
1406         (dequeue_one_deferred_signal): Ditto.
1407         (cancel_breakpoint): Fetch ptid from current_inferior.
1408         (linux_wait_for_event): Pass &all_threads to find_inferior,
1409         not &all_lwps.  Fetch ptid, lwpid from thread.
1410         (count_events_callback): Update, "entry" parameter is a
1411         struct thread_info * now.
1412         (select_singlestep_lwp_callback): Ditto.
1413         (select_event_lwp_callback): Ditto.
1414         (cancel_breakpoints_callback): Ditto.
1415         (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
1416         not &all_lwps.
1417         (select_event_lwp): Ditto.  Fetch ptid from event_thread.
1418         (unsuspend_one_lwp): Update, "entry" parameter is a
1419         struct thread_info * now.
1420         (unsuspend_all_lwps): Pass &all_threads to find_inferior,
1421         not &all_lwps.
1422         (linux_stabilize_threads): Ditto.  And for for_each_inferior.
1423         Fetch lwpid from thread, not lwp.
1424         (linux_wait_1): Fetch ptid, lwpid from current_inferior.
1425         Pass &all_threads to find_inferior, not &all_lwps.
1426         (send_sigstop): Fetch lwpid from thread, not lwp.
1427         (send_sigstop_callback): Update, "entry" parameter is a
1428         struct thread_info * now.
1429         (suspend_and_send_sigstop_callback): Ditto.
1430         (wait_for_sigstop): Ditto.  Fetch ptid, lwpid from thread, lwp.
1431         (stuck_in_jump_pad_callback): Update, "entry" parameter is a
1432         struct thread_info * now.
1433         (move_out_of_jump_pad_callback): Ditto.  Fetch ptid, lwpid
1434         from thread, lwp.
1435         (lwp_running): Update, "entry" parameter is a
1436         struct thread_info * now.
1437         (stop_all_lwps): Fetch ptid from thread.
1438         Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
1439         (linux_resume_one_lwp): Fetch lwpid from thread.
1440         (linux_set_resume_request): Update, "entry" parameter is a
1441         struct thread_info * now.  Fetch pid, lwpid from thread.
1442         (resume_status_pending_p): Update, "entry" parameter is a
1443         struct thread_info * now.
1444         (need_step_over_p): Ditto.  Fetch lwpid from thread.
1445         (start_step_over): Fetch lwpid from thread.
1446         (linux_resume_one_thread): Update, "entry" parameter is a
1447         struct thread_info * now.  Fetch lwpid from thread.
1448         (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
1449         (proceed_one_lwp): Update, "entry" parameter is a
1450         struct thread_info * now.  Fetch lwpid from thread.
1451         (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
1452         struct thread_info * now.
1453         (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
1454         (unstop_all_lwps): Ditto.  Fetch lwpid from thread.
1455         (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
1456         directly.
1457         (regsets_store_inferior_registers): Ditto.
1458         (fetch_register, store_register): Ditto.
1459         (linux_read_memory, linux_write_memory): Ditto.
1460         (linux_request_interrupt): Ditto.
1461         (linux_read_auxv): Ditto.
1462         (linux_xfer_siginfo): Ditto.
1463         (linux_qxfer_spu): Ditto.
1464         (linux_qxfer_libraries_svr4): Ditto.
1465         * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
1466         moved to inferiors.h.
1467         (get_lwp): Delete.
1468         (get_thread_lwp): Update.
1469         (struct lwp_info): Delete member "entry".  Simplify comment for
1470         member "thread".
1471         (all_lwps): Delete.
1472         * linux-mips-low.c (mips_read_description): Fetch lwpid from
1473         current_inferior directly.
1474         (update_watch_registers_callback): Update, "entry" parameter is a
1475         struct thread_info * now.  Fetch pid from thread.
1476         (mips_linux_prepare_to_resume): Fetch ptid from thread.
1477         (mips_insert_point): Fetch lwpid from current_inferior.
1478         Pass &all_threads to find_inferior, not &all_lwps.
1479         (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
1480         (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
1481         directly.
1482         (mips_stopped_data_address): Ditto.
1483         * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
1484         directly.
1485         * linux-tile-low.c (tile_arch_setup): Ditto.
1486         * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
1487         (update_debug_registers_callback): Update, "entry" parameter is a
1488         struct thread_info * now.  Fetch pid from thread.
1489         (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
1490         Pass &all_threads to find_inferior, not &all_lwps.
1491         (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
1492         (i386_dr_low_set_control): Fetch pid from current_inferior directly.
1493         Pass &all_threads to find_inferior, not &all_lwps.
1494         (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
1495         (i386_dr_low_get_status): Ditto.
1496         (x86_linux_prepare_to_resume): Fetch ptid from thread.
1497         (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
1498         (x86_linux_read_description): Ditto.
1499         * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
1500
1501 2014-02-20  Doug Evans  <dje@google.com>
1502
1503         * inferiors.c (get_first_inferior): Fix buglet.
1504
1505 2014-02-19  Doug Evans  <dje@google.com>
1506
1507         * gdbthread.h (add_thread): Change result type to struct thread_info *.
1508         * inferiors.c (add_thread): Change result type to struct thread_info *.
1509         All callers updated.
1510         (add_lwp): Call add_thread here instead of in callers.
1511         All callers updated.
1512         * linux-low.h (get_lwp_thread): Rewrite.
1513         (struct lwp_info): New member "thread".
1514
1515 2014-02-19  Doug Evans  <dje@google.com>
1516
1517         * linux-low.c (add_lwp): Change result to struct lwp_info *.
1518         All callers updated.
1519
1520 2014-02-19  Doug Evans  <dje@google.com>
1521
1522         * inferiors.c (add_thread): Fix whitespace.
1523
1524 2014-02-19  Doug Evans  <dje@google.com>
1525
1526         * dll.c (clear_dlls): Replace accessing list implemention details
1527         with API function.
1528         * gdbthread.h (get_first_thread): Declare.
1529         * inferiors.c (for_each_inferior_with_data): New function.
1530         (get_first_thread): New function.
1531         (find_thread_ptid): Simplify.
1532         (get_first_inferior): New function.
1533         (clear_list): Delete.
1534         (one_inferior_p): New function.
1535         (clear_inferior_list): New function.
1536         (clear_inferiors): Update.
1537         * inferiors.h (for_each_inferior_with_data): Declare.
1538         (clear_inferior_list): Declare.
1539         (one_inferior_p): Declare.
1540         (get_first_inferior): Declare.
1541         * linux-low.c (linux_wait_for_event): Replace accessing list
1542         implemention details with API function.
1543         * server.c (target_running): Ditto.
1544         (accumulate_file_name_length): New function.
1545         (emit_dll_description): New function.
1546         (handle_qxfer_libraries): Replace accessing list implemention
1547         details with API function.
1548         (handle_qxfer_threads_worker): New function.
1549         (handle_qxfer_threads_proper): Replace accessing list implemention
1550         details with API function.
1551         (handle_query): Ditto.
1552         (visit_actioned_threads_callback_ftype): New typedef.
1553         (visit_actioned_threads_data): New struct.
1554         (visit_actioned_threads): Rewrite to be find_inferior callback.
1555         (resume): Call find_inferior.
1556         (handle_status): Replace accessing list implemention
1557         details with API function.
1558         (process_serial_event): Replace accessing list implemention details
1559         with API function.
1560         * target.c (set_desired_inferior): Replace accessing list implemention
1561         details with API function.
1562         * tracepoint.c (same_process_p): New function.
1563         (gdb_agent_about_to_close): Replace accessing list implemention
1564         details with API function.
1565         * win32-low.c (child_delete_thread): Replace accessing list
1566         implemention details with API function.
1567         (match_dll_by_basename): New function.
1568         (dll_is_loaded_by_basename): New function.
1569         (win32_ensure_ntdll_loaded): Replace accessing list implemention
1570         details call to dll_is_loaded_by_basename.
1571
1572 2014-02-19  Doug Evans  <dje@google.com>
1573
1574         * dll.h (struct dll_info): Add comment.
1575         * gdbthread.h (struct thread_info): Add comment.
1576         (current_ptid): Simplify.
1577         * inferiors.c (add_process): Update.
1578         (remove_process): Update.
1579         * inferiors.h (struct process_info): Rename member "head" to "entry".
1580         * linux-low.c (delete_lwp): Update.
1581         (add_lwp): Update.
1582         (last_thread_of_process_p): Update.
1583         (kill_one_lwp_callback, linux_kill): Update.
1584         (status_pending_p_callback): Update.
1585         (wait_for_sigstop): Update.  Simplify read of ptid.
1586         (start_step_over): Update.
1587         * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
1588         (get_lwp_thread): Update.
1589         (struct lwp_info): Rename member "head" to "entry".
1590         * regcache.h (inferior_list_entry): Delete.
1591         * server.c (kill_inferior_callback): Update.
1592         (detach_or_kill_inferior_callback): Update.
1593         (print_started_pid): Update.
1594         (print_attached_pid): Update.
1595         (process_serial_event): Simplify read of ptid.
1596         * thread-db.c (thread_db_create_event): Update.
1597         (thread_db_get_tls_address): Update.
1598         * win32-low.c (current_inferior_ptid): Simplify.
1599
1600 2014-02-19  Tom Tromey  <tromey@redhat.com>
1601
1602         * target.h (struct target_ops) <supports_btrace>: Add target_ops
1603         argument.
1604         (target_supports_btrace): Update.
1605
1606 2014-02-14  Yao Qi  <yao@codesourcery.com>
1607
1608         * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
1609         (rsp-low-ipa.o): New target.
1610
1611 2014-02-12  Tom Tromey  <tromey@redhat.com>
1612
1613         * ax.c (gdb_parse_agent_expr): Use hex2bin, not
1614         convert_ascii_to_int.
1615         * regcache.c (registers_to_string): Likewise.
1616         * remote-utils.c (decode_M_packet): Likewise.
1617         * server.c (process_serial_event): Likewise.
1618
1619 2014-02-12  Tom Tromey  <tromey@redhat.com>
1620
1621         * server.c (handle_query, handle_v_run): Use hex2bin, not
1622         unhexify.
1623         * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
1624
1625 2014-02-12  Tom Tromey  <tromey@redhat.com>
1626
1627         * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
1628         convert_int_to_ascii.
1629         * regcache.c (registers_to_string, collect_register_as_string):
1630         Likewise.
1631         * remote-utils.c (look_up_one_symbol, relocate_instruction):
1632         Likewise.
1633         * server.c (process_serial_event): Likewise.
1634         * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
1635         (cmd_qtbuffer, cstr_to_hexstr): Likewise.
1636
1637 2014-02-12  Tom Tromey  <tromey@redhat.com>
1638
1639         * remote-utils.c (look_up_one_symbol, monitor_output): Use
1640         bin2hex, not hexify.
1641         * tracepoint.c (cmd_qtstatus): Likewise.
1642
1643 2014-02-12  Tom Tromey  <tromey@redhat.com>
1644
1645         * remote-utils.c (monitor_output): Pass explicit length to
1646         hexify.
1647
1648 2014-02-12  Tom Tromey  <tromey@redhat.com>
1649
1650         * tracepoint.c: Include rsp-low.h.
1651         * server.c: Include rsp-low.h.
1652         * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
1653         (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
1654         declare.
1655         * remote-utils.c: Include rsp-low.h.
1656         (fromhex, hexchars, ishex, unhexify, tohex, hexify)
1657         (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
1658         (convert_int_to_ascii, convert_ascii_to_int): Move to
1659         common/rsp-low.c.
1660         * regcache.c: Include rsp-low.h.
1661         * ax.c: Include rsp-low.h.
1662         * Makefile.in (SFILES): Add common/rsp-low.c.
1663         (OBS): Add rsp-low.o.
1664         (rsp-low.o): New target.
1665
1666 2014-02-12  Tom Tromey  <tromey@redhat.com>
1667
1668         * utils.h (pulongest, plongest, phex_nz): Don't declare.
1669         Include print-utils.h.
1670         * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
1671         (plongest, thirty_two, phex_nz): Remove.
1672         * Makefile.in (SFILES): Add common/print-utils.c.
1673         (OBS): Add print-utils.o.
1674         (print-utils-ipa.o): New target.
1675         (print-utils.o): New target.
1676         (IPA_OBJS): Add print-utils-ipa.o.
1677
1678 2014-02-06  Tom Tromey  <tromey@redhat.com>
1679
1680         * Makefile.in (SFILES): Fix indentation.
1681
1682 2014-02-05  Doug Evans  <dje@google.com>
1683
1684         * linux-low.c (linux_wait_for_event): Improve comment.
1685         (linux_wait_1): Keep current_inferior in sync with event_child.
1686
1687 2014-01-22  Doug Evans  <dje@google.com>
1688
1689         * gdbthread.h (gdb_id_to_thread): Delete, unused.
1690
1691 2014-01-22  Doug Evans  <dje@google.com>
1692
1693         * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
1694         * configure: Regenerate.
1695         * config.in: Regenerate.
1696         * Makefile.in (SFILES): Add debug.c.
1697         (OBS): Add debug.o.
1698         * debug.c: New file.
1699         * debug.h: New file.
1700         * linux-aarch64-low.c (*): Update all debugging printfs to use
1701         debug_printf instead of fprintf.
1702         * linux-arm-low.c (*): Ditto.
1703         * linux-cris-low.c (*): Ditto.
1704         * linux-crisv32-low.c (*): Ditto.
1705         * linux-m32r-low.c (*): Ditto.
1706         * linux-sparc-low.c (*): Ditto.
1707         * linux-x86.c (*): Ditto.
1708         * linux-low.c (*): Ditto.
1709         (linux_wait_1): Add calls to debug_enter, debug_exit.
1710         (linux_wait): Remove redundant debugging printf.
1711         (stop_all_lwps): Add calls to debug_enter, debug_exit.
1712         (linux_resume, unstop_all_lwps): Ditto.
1713         * mem-break.c (*): Update all debugging printfs to use
1714         debug_printf instead of fprintf.
1715         * remote-utils.c (*): Ditto.
1716         * thread-db.c (*): Ditto.
1717         * server.c #include <ctype.h>, "gdb_vecs.h".
1718         (debug_threads): Moved to debug.c.
1719         (*): Update all debugging printfs to use debug_printf instead of
1720         fprintf.
1721         (start_inferior): Replace call to fflush with call to debug_flush.
1722         (monitor_show_help): Mention set debug-format.
1723         (parse_debug_format_options): New function.
1724         (handle_monitor_command): Handle "monitor set debug-format".
1725         (gdbserver_usage): Mention --debug-format.
1726         (main): Parse --debug-format.
1727         * server.h (debug_threads): Declaration moved to debug.h.
1728         #include "debug.h".
1729         * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
1730         trace_debug_1 that uses debug_printf.
1731         (tracepoint_look_up_symbols): Update all debugging printfs to use
1732         debug_printf instead of fprintf.
1733
1734 2014-01-20  Baruch Siach  <baruch@tkos.co.il>
1735
1736         * linux-xtensa-low.c: Include asm/ptrace.h instead of
1737         sys/ptrace.h.
1738
1739 2014-01-17  Pedro Alves  <palves@redhat.com>
1740
1741         PR build/16445
1742         * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
1743         defined after including gdb_proc_service.h.
1744
1745 2014-01-16  Doug Evans  <dje@google.com>
1746
1747         * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
1748         (match_dll): Use it.
1749
1750 2014-01-16  Markus Metzger  <markus.t.metzger@intel.com>
1751
1752         * target.h (target_ops) <read_btrace>: Change parameters and
1753         return type to allow error reporting.
1754         * server.c (handle_qxfer_btrace): Support delta reads.  Pass
1755         trace reading errors on.
1756         * linux-low.c (linux_low_read_btrace): Pass trace reading
1757         errors on.
1758         (linux_low_disable_btrace): New.
1759
1760 2014-01-15  Doug Evans  <dje@google.com>
1761
1762         * inferiors.c (thread_id_to_gdb_id): Delete.
1763         * inferiors.h (thread_id_to_gdb_id): Delete.
1764
1765 2014-01-13  Eli Zaretskii  <eliz@gnu.org>
1766
1767         * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
1768         "-I$(srcdir)/../".  Fixes MinGW compilation errors with old GCC
1769         versions.
1770
1771 2014-01-08  Pedro Alves  <palves@redhat.com>
1772
1773         * server.c (handle_status): Don't discard previous queued stop
1774         replies or thread's pending status here.
1775         (main) <disconnection>: Do it here instead.
1776
1777 2014-01-08  Pedro Alves  <palves@redhat.com>
1778
1779         * gdbthread.h (struct thread_info) <status_pending_p>: New field.
1780         * server.c (visit_actioned_threads, handle_pending_status): New
1781         function.
1782         (handle_v_cont): Factor out parts to ...
1783         (resume): ... this new function.  If in all-stop, and a thread
1784         being resumed has a pending status, report it without actually
1785         resuming.
1786         (myresume): Adjust to use the new 'resume' function.
1787         (clear_pending_status_callback, set_pending_status_callback)
1788         (find_status_pending_thread_callback): New functions.
1789         (handle_status): Handle the case of multiple threads having
1790         interesting statuses to report.  Report threads' real last signal
1791         instead of always reporting GDB_SIGNAL_TRAP.  Look for a thread
1792         with an interesting thread to report the status for, instead of
1793         always reporting the status of the first thread.
1794
1795 2014-01-01  Joel Brobecker  <brobecker@adacore.com>
1796
1797         * gdbserver.c (gdbserver_version): Set copyright year to 2014.
1798         * gdbreplay.c (gdbreplay_version): Likewise.
1799
1800 2013-12-18  Yufeng Zhang  <yufeng.zhang@arm.com>
1801
1802         * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
1803         iov.iov_len with the real length in use.
1804
1805 2013-12-13  Joel Brobecker  <brobecker@adacore.com>
1806
1807         * Makefile.in (safe-ctype.o, lbasename.o): New rules.
1808         * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
1809         for all targets that use win32-low.c.
1810         * win32-low.c (win32_ensure_ntdll_loaded): New function.
1811         (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
1812
1813 2013-12-13  Pedro Alves  <palves@redhat.com>
1814
1815         * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
1816         if equal to TARGET_WAITKIND_LOADED.
1817         * win32-low.c (cached_status): New static global.
1818         (win32_wait): Add declaration.
1819         (do_initial_child_stuff): Flush all initial pending debug events
1820         up to the initial breakpoint.
1821         (win32_wait): If CACHED_STATUS was set, return that instead
1822         of doing a real wait.  Remove the code resuming the execution
1823         of the inferior after receiving a TARGET_WAITKIND_LOADED event
1824         during the initial phase.  Also remove the code changing
1825         OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
1826         TARGET_WAITKIND_STOPPED.
1827
1828 2013-12-11  Yao Qi  <yao@codesourcery.com>
1829
1830         * notif.c (handle_notif_ack): Return 0 if no notification
1831         matches.
1832
1833 2013-11-20  Doug Evans  <dje@google.com>
1834
1835         * linux-low.c (linux_set_resume_request): Fix comment.
1836
1837 2013-11-20  Doug Evans  <dje@google.com>
1838
1839         * linux-low.c (resume_status_pending_p): Tweak comment.
1840
1841 2013-11-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1842
1843         * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
1844         amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
1845         * configure.srv (srv_i386_regobj): Add i386-mpx.o.
1846         (srv_i386_linux_regobj): Add i386-mpx-linux.o.
1847         (srv_amd64_regobj): Add amd64-mpx.o.
1848         (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
1849         (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
1850         (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
1851         * i387-fp.c (num_pl_bnd_register) Added constant.
1852         (num_pl_bnd_cfg_registers) Added constant.
1853         (struct i387_xsave) Added reserved area and MPX fields.
1854         (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
1855         * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
1856         function.
1857         (tdesc_i386_mpx_linux): Add MPX amd64 target.
1858         (init_registers_amd64_mpx_linux): Declare new function.
1859         (tdesc_amd64_mpx_linux): Add MPX amd64 target.
1860         (x86_64_regmap): Add MPX registers.
1861         (x86_linux_read_description): Add MPX case.
1862         (initialize_low_arch): Initialize MPX targets.
1863
1864 2013-11-18  Tom Tromey  <tromey@redhat.com>
1865
1866         * configure: Rebuild.
1867         * configure.ac: Don't check for stdlib.h.
1868         * gdbreplay.c: Unconditionally include stdlib.h.
1869
1870 2013-11-18  Tom Tromey  <tromey@redhat.com>
1871
1872         * config.in: Rebuild.
1873         * configure: Rebuild.
1874         * configure.ac: Don't use AC_HEADER_DIRENT.
1875
1876 2013-11-18  Tom Tromey  <tromey@redhat.com>
1877
1878         * server.h: Don't check HAVE_STRING_H.
1879         * gdbreplay.c: Don't check HAVE_STRING_H.
1880         * configure: Rebuild.
1881
1882 2013-11-18  Tom Tromey  <tromey@redhat.com>
1883
1884         * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
1885         LIBGNU.
1886
1887 2013-11-08  Tom Tromey  <tromey@redhat.com>
1888
1889         * configure, config.in: Rebuild.
1890         * configure.ac: Remove unused configury.
1891
1892 2013-11-08  Tom Tromey  <tromey@redhat.com>
1893
1894         * acinclude.m4: Include common.m4, codeset.m4.
1895         * configure, config.in: Rebuild.
1896         * configure.ac: Use GDB_AC_COMMON.
1897
1898 2013-11-06  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1899
1900         * linux-s390-low.c (HWCAP_S390_TE): New define.
1901         (s390_arch_setup): Consider the TE field in the HWCAP for
1902         determining 'have_regset_tdb'.
1903
1904 2013-10-16  Sergio Durigan Junior  <sergiodj@redhat.com>
1905
1906         PR gdb/16014
1907         * tracepoint.c (download_tracepoint_1): Remove unnecessary double
1908         call to sizeof.
1909
1910 2013-10-02  Pedro Alves  <palves@redhat.com>
1911
1912         * server.c (process_serial_event): Don't output "GDBserver
1913         exiting" if GDB is connected through stdio.
1914         * target.c (mywait): Likewise, be silent if GDB is connected
1915         through stdio.
1916
1917 2013-10-01  Joel Brobecker  <brobecker@adacore.com>
1918
1919         * lynx-low.c (lynx_add_threads_after_attach): New function.
1920         (lynx_attach): Remove call to add_thread.  Add call to
1921         lynx_add_threads_after_attach instead.
1922
1923 2013-09-28  Mike Frysinger  <vapier@gentoo.org>
1924
1925         * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
1926         * config.in, configure: Regenerated.
1927
1928 2013-09-18  Yao Qi  <yao@codesourcery.com>
1929
1930         PR server/15959
1931         * server.c (start_inferior): Clear 'resume_info'.
1932
1933 2013-09-16  Jiong Wang  <jiwang@tilera.com>
1934
1935         * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
1936         for each register.
1937
1938 2013-09-16  Jiong Wang  <jiwang@tilera.com>
1939
1940         * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
1941         linux-tile-low.o to srv_tgtobj.
1942
1943 2013-09-16  Will Newton  <will.newton@linaro.org>
1944
1945         * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
1946         out regs.
1947
1948 2013-09-06  Pedro Alves  <palves@redhat.com>
1949
1950         * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
1951         (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
1952         (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
1953         (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
1954         (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
1955         (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
1956
1957 2013-09-06  Pedro Alves  <palves@redhat.com>
1958
1959         * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
1960         explicit header dependencies and use $COMPILE/$POSTCOMPILE.
1961
1962 2013-09-06  Pedro Alves  <palves@redhat.com>
1963
1964         * linux-amd64-ipa.c: Include tracepoint.h.
1965         * linux-i386-ipa.c: Include tracepoint.h.
1966
1967 2013-09-06  Ricard Wanderlof  <ricardw@axis.com>
1968
1969         * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
1970         (ps_get_thread_area): New function.
1971
1972 2013-09-06  Ricard Wanderlof  <ricardw@axis.com>
1973
1974         * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
1975         (initialize_low_arch): Call init_registers_crisv32 rather than
1976         init_register_crisv32.
1977
1978 2013-09-05  Pedro Alves  <palves@redhat.com>
1979
1980         * server.h (handle_vFile, hostio_last_error_from_errno): Move
1981         to ...
1982         * hostio.h: ... this new file.
1983         * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
1984         win32-low.c: Include hostio.h.
1985
1986 2013-09-05  Pedro Alves  <palves@redhat.com>
1987
1988         * server.h (gdb_client_data, handler_func, callback_handler_func)
1989         (delete_file_handler, add_file_handler, append_callback_event)
1990         (delete_callback_event, start_event_loop, initialize_event_loop):
1991         Move to event-loop.h and include it.
1992         * event-loop.h: New file.
1993
1994 2013-09-05  Pedro Alves  <palves@redhat.com>
1995
1996         * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
1997         * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
1998         (loaded_dll, unloaded_dll): Move to ...
1999         * dll.h: ... this new file.
2000         * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2001
2002 2013-09-05  Pedro Alves  <palves@redhat.com>
2003
2004         * server.h (current_process, get_thread_process, all_processes)
2005         (add_inferior_to_list, for_each_inferior, current_inferior)
2006         (remove_inferior, add_process, remove_process, find_process_pid)
2007         (have_started_inferiors_p, have_attached_inferiors_p)
2008         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
2009         (clear_inferiors, find_inferior, find_inferior_id)
2010         (inferior_target_data, set_inferior_target_data)
2011         (inferior_regcache_data, set_inferior_regcache_data): Move to
2012         inferiors.h, and include it.
2013         * inferiors.h: New file.
2014
2015 2013-09-05  Pedro Alves  <palves@redhat.com>
2016
2017         * server.h (struct emit_ops, current_insn_ptr, emit_error):
2018         Move ...
2019         * ax.h: ... here.
2020
2021 2013-09-05  Pedro Alves  <palves@redhat.com>
2022
2023         * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
2024         tracepoint.h.
2025         * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
2026         (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
2027         (handle_tracepoint_general_set, handle_tracepoint_query)
2028         (tracepoint_finished_step, tracepoint_was_hit)
2029         (release_while_stepping_state_list, current_traceframe)
2030         (in_readonly_region, traceframe_read_mem)
2031         (fetch_traceframe_registers, traceframe_read_sdata)
2032         (traceframe_read_info, struct fast_tpoint_collect_status)
2033         (fast_tracepoint_collecting, force_unlock_trace_buffer)
2034         (handle_tracepoit_bkpts, initialize_low_tracepoint)
2035         (supply_fast_tracepoint_registers)
2036         (supply_static_tracepoint_registers, set_trampoline_buffer_space)
2037         (ipa_tdesc, claim_trampoline_space)
2038         (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
2039         (agent_mem_read, agent_get_trace_state_variable_value)
2040         (agent_set_trace_state_variable_value, agent_tsv_read)
2041         (agent_mem_read_string, get_raw_reg_func_addr)
2042         (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
2043         * tracepoint.h: ... this new file.
2044
2045 2013-09-05  Pedro Alves  <palves@redhat.com>
2046
2047         * server.h (perror_with_name, error, fatal, warning, paddress)
2048         (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
2049         include it.
2050         * utils.h: New file.
2051
2052 2013-09-05  Pedro Alves  <palves@redhat.com>
2053
2054         * server.h (remote_debug, noack_mode, transport_is_reliable)
2055         (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
2056         (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
2057         (getpkt, remote_prepare, remote_open, remote_close, write_ok)
2058         (write_enn, initialize_async_io, enable_async_io)
2059         (disable_async_io, check_remote_input_interrupt_request)
2060         (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
2061         (dead_thread_notify, prepare_resume_reply)
2062         (decode_address_to_semicolon, decode_address, decode_m_packet)
2063         (decode_M_packet, decode_X_packet, decode_xfer_write)
2064         (decode_search_memory_packet, unhexify, hexify)
2065         (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
2066         (look_up_one_symbol, relocate_instruction)
2067         (monitor_output): Move to remote-utils.h, and include it.
2068         * remote-utils.h: New file.
2069
2070 2013-09-05  Pedro Alves  <palves@redhat.com>
2071
2072         * server.h (_): Delete.
2073
2074 2013-09-02  Pedro Alves  <palves@redhat.com>
2075
2076         * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
2077         (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
2078         allocated.
2079         (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2080
2081 2013-09-02  Pierre Muller  <muller@sourceware.org>
2082
2083         * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
2084         or WriteProcessMemory complete successfully and handle
2085         ERROR_PARTIAL_COPY error.
2086
2087 2013-09-02  Pedro Alves  <palves@redhat.com>
2088
2089         * server.c (gdb_read_memory): Return -1 on traceframe memory read
2090         error instead of EIO.
2091
2092 2013-08-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
2093
2094         PR server/15604
2095         * linux-low.c: Include filestuff.h.
2096         (linux_create_inferior) <pid == 0>: Call close_most_fds.
2097         * lynx-low.c: Include filestuff.h.
2098         (lynx_create_inferior) <pid == 0>: Call close_most_fds.
2099         * server.c: Include filestuff.h.
2100         (main): Call notice_open_fds.
2101         * spu-low.c: Include filestuff.h.
2102         (spu_create_inferior) <pid == 0>: Call close_most_fds.
2103
2104 2013-08-22  Luis Machado  <lgustavo@codesourcery.com>
2105
2106         * Makefile.in: Explain why ../target and ../nat are not
2107         listed as include file search paths.
2108         (linux-waitpid.o): New object file rule.
2109         * configure.srv (srv_native_linux_obj): New variable.
2110         Replace all occurrences of linux native object files with
2111         $srv_native_linux_obj.
2112         * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
2113         (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
2114         (linux_enable_event_reporting): Remove declaration.
2115         (my_waitpid): Moved to common/linux-waitpid.c.
2116         (linux_wait_for_event): Pass ptid when calling
2117         linux_enable_event_reporting.
2118         (linux_supports_tracefork_flag): Remove.
2119         (linux_enable_event_reporting): Likewise.
2120         (linux_tracefork_grandchild): Remove.
2121         (STACK_SIZE): Moved to common/linux-ptrace.c.
2122         (linux_tracefork_child): Remove.
2123         (linux_test_for_tracefork): Remove.
2124         (linux_look_up_symbols): Call linux_supports_traceclone.
2125         (initialize_low): Remove call to linux_test_for_tracefork.
2126         * linux-low.h (PTRACE_TYPE_ARG3): Move to
2127         common/linux-ptrace.h.
2128         (PTRACE_TYPE_ARG4): Likewise.
2129         Include linux-ptrace.h.
2130
2131 2013-08-21  Pedro Alves  <palves@redhat.com>
2132
2133         * config.in: Renegerate.
2134
2135 2013-08-19  Luis Machado  <lgustavo@codesourcery.com>
2136
2137         * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
2138         (SFILES): Remove $(srcdir)/common/target-common.c and
2139         add $(srcdir)/target/waitstatus.c.
2140         (OBS): Remove target-common.o and add waitstatus.o.
2141         (server_h): Remove $(srcdir)/../common/target-common.h and
2142         add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
2143         and $(srcdir)/../target/waitstatus.h.
2144         (target-common.o): Remove.
2145         (waitstatus.o): New target object file.
2146         * target.h: Do not include target-common.h and
2147         include target/resume.h, target/wait.h and
2148         target/waitstatus.h.
2149
2150 2013-08-13  Luis Machado  <lgustavo@codesourcery.com>
2151
2152         * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2153         to PTRACE_TYPE_ARG3.
2154         * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
2155         to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
2156         PTRACE_TYPE_ARG4.
2157         * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
2158         (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
2159
2160 2013-07-27  Jie Zhang  <jie@codesourcery.com>
2161             Daniel Jacobowitz  <dan@codesourcery.com>
2162             Yao Qi  <yao@codesourcery.com>
2163
2164         * Makefile.in (SFILES): Add common/mips-linux-watch.c.
2165         (mips-linux-watch.o): New rule.
2166         (mips_linux_watch_h): New variable.
2167         * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
2168         srv_tgtobj.
2169         * linux-mips-low.c: Include mips-linux-watch.h.
2170         (struct arch_process_info, struct arch_lwp_info): New.
2171         (update_watch_registers_callback): New function.
2172         (mips_linux_new_process, mips_linux_new_thread) New functions.
2173         (mips_linux_prepare_to_resume, mips_insert_point): New
2174         functions.
2175         (mips_remove_point, mips_stopped_by_watchpoint): New
2176         functions.
2177         (rsp_bp_type_to_target_hw_bp_type): New function.
2178         (mips_stopped_data_address): New function.
2179         (the_low_target): Add watchpoint support functions.
2180
2181 2013-07-27  Yao Qi  <yao@codesourcery.com>
2182
2183         * i386-low.c: Include break-common.h.
2184         (enum target_hw_bp_type): Remove.
2185
2186 2013-07-24  Luis Machado  <lgustavo@codesourcery.com>
2187
2188         * Makefile.in (SFILES): /common/target-common.c.
2189         (OBS): Add target-common.o.
2190         (server_h): Add $(srcdir)/../common/target-common.h.
2191         (target-common.o): New target.
2192         * server.c (queue_stop_reply_callback): Free
2193         status string after use.
2194         * target.c (target_waitstatus_to_string): Remove.
2195         * target.h: Include target-common.h.
2196         (resume_kind): Likewise.
2197         (target_waitkind): Likewise.
2198         (target_waitstatus): Likewise.
2199         (TARGET_WNOHANG): Likewise.
2200
2201 2013-07-04  Yao Qi  <yao@codesourcery.com>
2202
2203         * Makefile.in (host_alias): Use @host_noncanonical@.
2204         (target_alias): Use @target_noncanonical@.
2205         * configure.ac: Use ACX_NONCANONICAL_TARGET and
2206         ACX_NONCANONICAL_HOST.
2207         * configure: Regenerated.
2208
2209         Revert:
2210         2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>
2211
2212         * configure.ac (version_host, version_target): Set and AC_SUBST them.
2213         * configure: Rebuild.
2214         * Makefile.in (version_host, version_target): Get from configure.
2215         (version.c): Use $(version_host) and $(version_target).
2216
2217 2013-07-03  Pedro Alves  <palves@redhat.com>
2218
2219         * Makefile.in (config.status): Depend on development.sh.
2220         * acinclude.m4: Include libmcheck.m4.
2221         * configure: Regenerate.
2222
2223 2013-07-02  Mircea Gherzan  <mircea.gherzan@intel.com>
2224
2225         * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
2226         attribute inside the parentheses.
2227         (winapi_DebugSetProcessKillOnExit): Ditto.
2228         (winapi_DebugBreakProcess): Ditto.
2229         (winapi_GenerateConsoleCtrlEvent): Ditto.
2230
2231 2013-07-02  Mircea Gherzan  <mircea.gherzan@intel.com>
2232
2233         * notif.h (notif_event): Add a dummy member to avoid compiler
2234         errors.
2235
2236 2013-07-01  Pedro Alves  <palves@redhat.com>
2237
2238         * hostio.c (HOSTIO_PATH_MAX): Define.
2239         (require_filename, handle_open, handle_unlink, handle_readlink):
2240         Use it.
2241
2242 2013-07-01  Pedro Alves  <palves@redhat.com>
2243
2244         * server.h: Include "pathmax.h".
2245         * linux-low.c: Don't include sys/param.h.
2246         (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
2247         MAXPATHLEN.
2248         * win32-low.c: Don't include sys/param.h.
2249         (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
2250
2251 2013-07-01  Pedro Alves  <palves@redhat.com>
2252
2253         * event-loop.c: Don't check HAVE_UNISTD_H before including
2254         <unistd.h>.
2255         * gdbreplay.c: Likewise.
2256         * remote-utils.c: Likewise.
2257         * server.c: Likewise.
2258         * configure.ac: Don't check for unistd.h.
2259         * configure: Regenerate.
2260
2261 2013-06-28  Tom Tromey  <tromey@redhat.com>
2262
2263         * Makefile.in (version.c): Use version.in, not
2264         common/version.in.
2265
2266 2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>
2267
2268         * configure.ac (version_host, version_target): Set and AC_SUBST them.
2269         * configure: Rebuild.
2270         * Makefile.in (version_host, version_target): Get from configure.
2271         (version.c): Use $(version_host) and $(version_target).
2272
2273 2013-06-10  Dmitry Kozlov <ddk@codesourcery.com>
2274
2275         Fix trace-status to output user name without trailing colon.
2276         * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
2277
2278 2013-06-10  Dmitry Kozlov <ddk@codesourcery.com>
2279
2280         Fix trace-status to output proper start-time and stop-time.
2281         * tracepoint.c (cmd_qtstatus): Modify trace-status output to
2282         output start time and stop time in hex as gdb expects.
2283
2284 2013-06-26  Pedro Alves  <pedro@codesourcery.com>
2285
2286         * tracepoint.c (build_traceframe_info_xml): Output trace state
2287         variables present in the trace buffer.
2288
2289 2013-06-24  Tom Tromey  <tromey@redhat.com>
2290
2291         * Makefile.in (version.c): Use bfd/version.h, common/version.in,
2292         create-version.sh.
2293         (version.o): Remove.
2294         * gdbreplay.c: Include version.h.
2295         (version, host_name): Don't declare.
2296         * server.h: Include version.h.
2297         (version, host_name): Don't declare.
2298
2299 2013-06-12  Pedro Alves  <palves@redhat.com>
2300
2301         * linux-x86-low.c (linux_is_elf64): Delete global.
2302         (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
2303         with local linux_pid_exe_is_elf_64_file use.
2304
2305 2013-06-11  Pedro Alves  <palves@redhat.com>
2306
2307         * linux-low.c (regset_disabled, disable_regset): New functions.
2308         (regsets_fetch_inferior_registers)
2309         (regsets_store_inferior_registers): Use them.
2310         (initialize_regsets_info); Don't allocate the disabled_regsets
2311         array here.
2312         * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
2313         comment.
2314
2315 2013-06-11  Pedro Alves  <palves@redhat.com>
2316
2317         * linux-low.c (initialize_regsets_info): Use xcalloc instead of
2318         xmalloc.
2319
2320 2013-06-11  Pedro Alves  <palves@redhat.com>
2321
2322         * linux-x86-low.c (initialize_low_arch): Call
2323         init_registers_x32_avx_linux.
2324
2325 2013-06-09  Jan Kratochvil  <jan.kratochvil@redhat.com>
2326
2327         Fix compatibility with Android Bionic.
2328         * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
2329         it is not empty.
2330
2331 2013-06-07  Pedro Alves  <palves@redhat.com>
2332
2333         PR server/14823
2334         * Makefile.in (OBS): Add tdesc.o.
2335         (IPA_OBJS): Add tdesc-ipa.o.
2336         (tdesc-ipa.o): New rule.
2337         * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
2338         interface.
2339         * linux-low.c (new_inferior): Delete.
2340         (disabled_regsets, num_regsets): Delete.
2341         (linux_add_process): Adjust to set the new per-process
2342         new_inferior flag.
2343         (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
2344         (linux_wait_for_lwp): Adjust.  Only call arch_setup if the event
2345         was a stop.  When calling arch_setup, switch the current inferior
2346         to the thread that got an event.
2347         (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
2348         (regsets_fetch_inferior_registers)
2349         (regsets_store_inferior_registers): New regsets_info parameter.
2350         Adjust to use it.
2351         (linux_register_in_regsets): New regs_info parameter.  Adjust to
2352         use it.
2353         (register_addr, fetch_register, store_register): New usrregs_info
2354         parameter.  Adjust to use it.
2355         (usr_fetch_inferior_registers, usr_store_inferior_registers): New
2356         parameter regs_info.  Adjust to use it.
2357         (linux_fetch_registers): Get the current inferior's regs_info, and
2358         adjust to use it.
2359         (linux_store_registers): Ditto.
2360         [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
2361         (initialize_low): Don't initialize the target_regsets here.  Call
2362         initialize_low_arch.
2363         * linux-low.h (target_regsets): Delete declaration.
2364         (struct regsets_info): New.
2365         (struct usrregs_info): New.
2366         (struct regs_info): New.
2367         (struct process_info_private) <new_inferior>: New field.
2368         (struct linux_target_ops): Delete the num_regs, regmap, and
2369         regset_bitmap fields.  New field regs_info.
2370         [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
2371         * i387-fp.c (num_xmm_registers): Delete.
2372         (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
2373         calls to new interface.
2374         (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
2375         (i387_xsave_to_cache): Adjust find_regno calls to new interface.
2376         Infer the number of xmm registers from the regcache's target
2377         description.
2378         * i387-fp.h (num_xmm_registers): Delete.
2379         * inferiors.c (add_thread): Don't install the thread's regcache
2380         here.
2381         * proc-service.c (gregset_info): Fetch the current inferior's
2382         regs_info.  Adjust to use it.
2383         * regcache.c: Include tdesc.h.
2384         (register_bytes, reg_defs, num_registers)
2385         (gdbserver_expedite_regs): Delete.
2386         (get_thread_regcache): If the thread doesn't have a regcache yet,
2387         create one, instead of aborting gdbserver.
2388         (regcache_invalidate_one): Rename to ...
2389         (regcache_invalidate_thread): ... this.
2390         (regcache_invalidate_one): New.
2391         (regcache_invalidate): Only invalidate registers of the current
2392         process.
2393         (init_register_cache): Add target_desc parameter, and use it.
2394         (new_register_cache): Ditto.  Assert the target description has a
2395         non zero registers_size.
2396         (regcache_cpy): Add assertions.  Adjust.
2397         (realloc_register_cache, set_register_cache): Delete.
2398         (registers_to_string, registers_from_string): Adjust.
2399         (find_register_by_name, find_regno, find_register_by_number)
2400         (register_cache_size): Add target_desc parameter, and use it.
2401         (free_register_cache_thread, free_register_cache_thread_one)
2402         (regcache_release, register_cache_size): New.
2403         (register_size): Add target_desc parameter, and use it.
2404         (register_data, supply_register, supply_register_zeroed)
2405         (supply_regblock, supply_register_by_name, collect_register)
2406         (collect_register_as_string, collect_register_by_name): Adjust.
2407         * regcache.h (struct target_desc): Forward declare.
2408         (struct regcache) <tdesc>: New field.
2409         (init_register_cache, new_register_cache): Add target_desc
2410         parameter.
2411         (regcache_invalidate_thread): Declare.
2412         (regcache_invalidate_one): Delete declaration.
2413         (regcache_release): Declare.
2414         (find_register_by_number, register_cache_size, register_size)
2415         (find_regno): Add target_desc parameter.
2416         (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
2417         declarations.
2418         * remote-utils.c: Include tdesc.h.
2419         (outreg, prepare_resume_reply): Adjust.
2420         * server.c: Include tdesc.h.
2421         (gdbserver_xmltarget): Delete declaration.
2422         (get_features_xml, process_serial_event): Adjust.
2423         * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
2424         declare.
2425         (struct process_info) <tdesc>: New field.
2426         (ipa_tdesc): Declare.
2427         * tdesc.c: New file.
2428         * tdesc.h: New file.
2429         * tracepoint.c: Include tdesc.h.
2430         [IN_PROCESS_AGENT] (ipa_tdesc): Define.
2431         (get_context_regcache): Adjust to pass ipa_tdesc down.
2432         (do_action_at_tracepoint): Adjust to get the register cache size
2433         from the context regcache's description.
2434         (traceframe_walk_blocks): Adjust to get the register cache size
2435         from the current trace frame's description.
2436         (traceframe_get_pc): Adjust to get current trace frame's
2437         description and pass it down.
2438         (gdb_collect): Adjust to get the register cache size from the
2439         IPA's description.
2440         * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
2441         (gdbserver_xmltarget): Delete.
2442         (initialize_low_tracepoint): Set the ipa's target description.
2443         * linux-i386-ipa.c (tdesc_i386_linux): Declare.
2444         (initialize_low_tracepoint): Set the ipa's target description.
2445         * linux-x86-low.c: Include tdesc.h.
2446         [__x86_64__] (is_64bit_tdesc): New.
2447         (ps_get_thread_area, x86_get_thread_area): Use it.
2448         (i386_cannot_store_register): Rename to ...
2449         (x86_cannot_store_register): ... this.  Use is_64bit_tdesc.
2450         (i386_cannot_fetch_register): Rename to ...
2451         (x86_cannot_fetch_register): ... this.  Use is_64bit_tdesc.
2452         (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
2453         to new interface.
2454         (target_regsets): Rename to ...
2455         (x86_regsets): ... this.
2456         (x86_get_pc, x86_set_pc): Adjust register_size calls to new
2457         interface.
2458         (x86_siginfo_fixup): Use is_64bit_tdesc.
2459         [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
2460         (tdesc_x32_avx_linux, tdesc_x32_linux)
2461         (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
2462         Declare.
2463         (x86_linux_update_xmltarget): Delete.
2464         (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
2465         (have_ptrace_getfpxregs, have_ptrace_getregset): New.
2466         (AMD64_LINUX_USER64_CS): New.
2467         (x86_linux_read_description): New, based on
2468         x86_linux_update_xmltarget.
2469         (same_process_callback): New.
2470         (x86_arch_setup_process_callback): New.
2471         (x86_linux_update_xmltarget): New.
2472         (x86_regsets_info): New.
2473         (amd64_linux_regs_info): New.
2474         (i386_linux_usrregs_info): New.
2475         (i386_linux_regs_info): New.
2476         (x86_linux_regs_info): New.
2477         (x86_arch_setup): Reimplement.
2478         (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
2479         (x86_emit_ops): Ditto.
2480         (the_low_target): Adjust.  Install x86_linux_regs_info,
2481         x86_cannot_fetch_register, and x86_cannot_store_register.
2482         (initialize_low_arch): New.
2483         * linux-ia64-low.c (tdesc_ia64): Declare.
2484         (ia64_fetch_register): Adjust.
2485         (ia64_usrregs_info, regs_info): New globals.
2486         (ia64_regs_info): New function.
2487         (the_low_target): Adjust.
2488         (initialize_low_arch): New function.
2489         * linux-sparc-low.c (tdesc_sparc64): Declare.
2490         (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
2491         Adjust.
2492         (sparc_arch_setup): New function.
2493         (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
2494         (the_low_target): Adjust.
2495         (initialize_low_arch): New function.
2496         * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
2497         (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
2498         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
2499         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
2500         (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
2501         (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
2502         (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
2503         (tdesc_powerpc_isa205_vsx64l): Declare.
2504         (ppc_cannot_store_register, ppc_collect_ptrace_register)
2505         (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
2506         (ppc_set_pc, ppc_get_hwcap): Adjust.
2507         (ppc_usrregs_info): Forward declare.
2508         (!__powerpc64__) ppc_regmap_adjusted: New global.
2509         (ppc_arch_setup): Adjust to the current process'es target
2510         description.
2511         (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
2512         (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
2513         (ppc_store_evrregset): Adjust.
2514         (target_regsets): Rename to ...
2515         (ppc_regsets): ... this, and make static.
2516         (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
2517         (ppc_regs_info): New function.
2518         (the_low_target): Adjust.
2519         (initialize_low_arch): New function.
2520         * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
2521         (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
2522         (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
2523         (tdesc_s390x_linux64v2): Declare.
2524         (s390_collect_ptrace_register, s390_supply_ptrace_register)
2525         (s390_fill_gregset, s390_store_last_break): Adjust.
2526         (target_regsets): Rename to ...
2527         (s390_regsets): ... this, and make static.
2528         (s390_get_pc, s390_set_pc): Adjust.
2529         (s390_get_hwcap): New target_desc parameter, and use it.
2530         [__s390x__] (have_hwcap_s390_high_gprs): New global.
2531         (s390_arch_setup): Adjust to set the current process'es target
2532         description.  Don't adjust the regmap.
2533         (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
2534         [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
2535         (regs_info_3264): New globals.
2536         (s390_regs_info): New function.
2537         (the_low_target): Adjust.
2538         (initialize_low_arch): New function.
2539         * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
2540         (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
2541         [__mips64] (init_registers_mips_linux)
2542         (init_registers_mips_dsp_linux): Delete defines.
2543         [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
2544         (have_dsp): New global.
2545         (mips_read_description): New, based on mips_arch_setup.
2546         (mips_arch_setup): Reimplement.
2547         (get_usrregs_info): New function.
2548         (mips_cannot_fetch_register, mips_cannot_store_register)
2549         (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
2550         (mips_fill_fpregset, mips_store_fpregset): Adjust.
2551         (target_regsets): Rename to ...
2552         (mips_regsets): ... this, and make static.
2553         (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
2554         (dsp_regs_info, regs_info): New globals.
2555         (mips_regs_info): New function.
2556         (the_low_target): Adjust.
2557         (initialize_low_arch): New function.
2558         * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
2559         (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
2560         Declare.
2561         (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
2562         (arm_read_description): New, with bits factored from
2563         arm_arch_setup.
2564         (arm_arch_setup): Reimplement.
2565         (target_regsets): Rename to ...
2566         (arm_regsets): ... this, and make static.
2567         (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
2568         (arm_regs_info): New function.
2569         (the_low_target): Adjust.
2570         (initialize_low_arch): New function.
2571         * linux-m68k-low.c (tdesc_m68k): Declare.
2572         (target_regsets): Rename to ...
2573         (m68k_regsets): ... this, and make static.
2574         (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
2575         (m68k_regs_info): New function.
2576         (m68k_arch_setup): New function.
2577         (the_low_target): Adjust.
2578         (initialize_low_arch): New function.
2579         * linux-sh-low.c (tdesc_sharch): Declare.
2580         (target_regsets): Rename to ...
2581         (sh_regsets): ... this, and make static.
2582         (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
2583         (sh_regs_info, sh_arch_setup): New functions.
2584         (the_low_target): Adjust.
2585         (initialize_low_arch): New function.
2586         * linux-bfin-low.c (tdesc_bfin): Declare.
2587         (bfin_arch_setup): New function.
2588         (bfin_usrregs_info, regs_info): New globals.
2589         (bfin_regs_info): New function.
2590         (the_low_target): Adjust.
2591         (initialize_low_arch): New function.
2592         * linux-cris-low.c (tdesc_cris): Declare.
2593         (cris_arch_setup): New function.
2594         (cris_usrregs_info, regs_info): New globals.
2595         (cris_regs_info): New function.
2596         (the_low_target): Adjust.
2597         (initialize_low_arch): New function.
2598         * linux-cris-low.c (tdesc_crisv32): Declare.
2599         (cris_arch_setup): New function.
2600         (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
2601         (cris_regs_info): New function.
2602         (the_low_target): Adjust.
2603         (initialize_low_arch): New function.
2604         * linux-m32r-low.c (tdesc_m32r): Declare.
2605         (m32r_arch_setup): New function.
2606         (m32r_usrregs_info, regs_info): New globals.
2607         (m32r_regs_info): Adjust.
2608         (initialize_low_arch): New function.
2609         * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
2610         (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
2611         (tic6x_usrregs_info): Forward declare.
2612         (tic6x_read_description): New function, based on ...
2613         (tic6x_arch_setup): ... this.  Reimplement.
2614         (target_regsets): Rename to ...
2615         (tic6x_regsets): ... this, and make static.
2616         (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
2617         (tic6x_regs_info): New function.
2618         (the_low_target): Adjust.
2619         (initialize_low_arch): New function.
2620         * linux-xtensa-low.c (tdesc_xtensa): Declare.
2621         (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
2622         (target_regsets): Rename to ...
2623         (xtensa_regsets): ... this, and make static.
2624         (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
2625         globals.
2626         (xtensa_arch_setup, xtensa_regs_info): New functions.
2627         (the_low_target): Adjust.
2628         (initialize_low_arch): New function.
2629         * linux-nios2-low.c (tdesc_nios2_linux): Declare.
2630         (nios2_arch_setup): Set the current process'es tdesc.
2631         (target_regsets): Rename to ...
2632         (nios2_regsets): ... this.
2633         (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
2634         (nios2_regs_info): New function.
2635         (the_low_target): Adjust.
2636         (initialize_low_arch): New function.
2637         * linux-aarch64-low.c (tdesc_aarch64): Declare.
2638         (aarch64_arch_setup): Set the current process'es tdesc.
2639         (target_regsets): Rename to ...
2640         (aarch64_regsets): ... this.
2641         (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
2642         (aarch64_regs_info): New function.
2643         (the_low_target): Adjust.
2644         (initialize_low_arch): New function.
2645         * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
2646         globals.
2647         (target_regsets): Rename to ...
2648         (tile_regsets): ... this.
2649         (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
2650         (tile_regs_info): New function.
2651         (tile_arch_setup): Set the current process'es tdesc.
2652         (the_low_target): Adjust.
2653         (initialize_low_arch): New function.
2654         * spu-low.c (tdesc_spu): Declare.
2655         (spu_create_inferior, spu_attach): Set the new process'es tdesc.
2656         * win32-arm-low.c (tdesc_arm): Declare.
2657         (arm_arch_setup): New function.
2658         (the_low_target): Install arm_arch_setup instead of
2659         init_registers_arm.
2660         * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
2661         (init_windows_x86): Rename to ...
2662         (i386_arch_setup): ... this.  Set `win32_tdesc'.
2663         (the_low_target): Adjust.
2664         * win32-low.c (win32_tdesc): New global.
2665         (child_add_thread): Don't create the thread cache here.
2666         (do_initial_child_stuff): Set the new process'es tdesc.
2667         * win32-low.h (struct target_desc): Forward declare.
2668         (win32_tdesc): Declare.
2669         * lynx-i386-low.c (tdesc_i386): Declare global.
2670         (lynx_i386_arch_setup): Set `lynx_tdesc'.
2671         * lynx-low.c (lynx_tdesc): New global.
2672         (lynx_add_process): Set the new process'es tdesc.
2673         * lynx-low.h (struct target_desc): Forward declare.
2674         (lynx_tdesc): Declare global.
2675         * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
2676         (lynx_ppc_arch_setup): Set `lynx_tdesc'.
2677         * nto-low.c (nto_tdesc): New global.
2678         (do_attach): Set the new process'es tdesc.
2679         * nto-low.h (struct target_desc): Forward declare.
2680         (nto_tdesc): Declare.
2681         * nto-x86-low.c (tdesc_i386): Declare.
2682         (nto_x86_arch_setup): Set `nto_tdesc'.
2683
2684 2013-06-04  Gary Benson  <gbenson@redhat.com>
2685
2686         * server.c (handle_query): Add "augmented-libraries-svr4-read+"
2687         to qSupported response when appropriate.
2688         (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
2689         with nonzero-length annex.
2690         * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
2691         arguments supplied in annex.
2692
2693 2013-05-31  Doug Evans  <dje@google.com>
2694
2695         PR server/15594
2696         * linux-x86-low.c (ps_get_thread_area): Properly extend address to
2697         64 bits in 64-cross-32 environment.
2698
2699 2013-05-28  Pedro Alves  <palves@redhat.com>
2700
2701         * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
2702         (aarch64-without-fpu.c): Delete rule.
2703         * configure.srv (aarch64*-*-linux*): Remove references to
2704         aarch64-without-fpu.o and aarch64-without-fpu.xml.
2705         * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
2706         declaration.
2707
2708 2013-05-24  Pedro Alves  <palves@redhat.com>
2709
2710         * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
2711         instead of strchr/decode_address.  Error if the range isn't split
2712         with a ','.  Don't assume there's be a ':' in the action.
2713
2714 2013-05-23  Yao Qi  <yao@codesourcery.com>
2715             Pedro Alves  <palves@redhat.com>
2716
2717         * linux-low.c (lwp_in_step_range): New function.
2718         (linux_wait_1): If the thread was range stepping and stopped
2719         outside the stepping range, report the stop to GDB.  Otherwise,
2720         continue stepping.  Add range stepping debug output.
2721         (linux_set_resume_request): Copy the step range from the resume
2722         request to the lwp.
2723         (linux_supports_range_stepping): New.
2724         (linux_target_ops) <supports_range_stepping>: Set to
2725         linux_supports_range_stepping.
2726         * linux-low.h (struct linux_target_ops)
2727         <supports_range_stepping>: New field.
2728         (struct lwp_info) <step_range_start, step_range_end>: New fields.
2729         * linux-x86-low.c (x86_supports_range_stepping): New.
2730         (the_low_target) <supports_range_stepping>: Set to
2731         x86_supports_range_stepping.
2732         * server.c (handle_v_cont): Handle 'r' action.
2733         (handle_v_requests): Append ";r" if the target supports range
2734         stepping.
2735         * target.h (struct thread_resume) <step_range_start,
2736         step_range_end>: New fields.
2737         (struct target_ops) <supports_range_stepping>:
2738         New field.
2739         (target_supports_range_stepping): New macro.
2740
2741 2013-05-17  Joel Brobecker  <brobecker@adacore.com>
2742
2743         * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
2744         confusion in comment.
2745
2746 2013-05-17  Joel Brobecker  <brobecker@adacore.com>
2747
2748         * lynx-low.c (struct process_info_private): New type.
2749         (lynx_add_process): New function.
2750         (lynx_create_inferior, lynx_attach): Replace calls to
2751         add_process by calls to lynx_add_process.
2752         (lynx_resume): If PTID is null, then try using
2753         current_process()->private->last_wait_event_ptid.
2754         Add comments.
2755         (lynx_clear_inferiors): Delete.  The contents of that function
2756         has been inlined in lynx_mourn;
2757         (lynx_wait_1): Save the ptid in the process's private data.
2758         (lynx_mourn): Free the process' private data.  Replace call
2759         to lynx_clear_inferiors by call to clear_inferiors.
2760
2761 2013-05-17  Yao Qi  <yao@codesourcery.com>
2762
2763         * i386-low.c (i386_length_and_rw_bits): Move the comment to
2764         the right place.
2765
2766 2013-05-16  Luis Machado  <lgustavo@codesourcery.com>
2767
2768         * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
2769         PT_DATA_ADDR and PT_TEXT_END_ADDR.  Update comments.
2770         (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
2771         PT_TEXT_END_ADDR guards.  Update comments.
2772         (linux_target_op) <read_offsets>: Conditionally define to
2773         linux_read_offsets if the target is UCLIBC and if it defines
2774         PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
2775
2776 2013-05-06  Sandra Loosemore  <sandra@codesourcery.com>
2777             Andrew Jenner  <andrew@codesourcery.com>
2778
2779         * Makefile.in (SFILES): Add linux-nios2-low.c.
2780         (clean): Add action to delete nios2-linux.c.
2781         (nios2-linux.c): New rule.
2782         * configure.srv: Add nios2*-*-linux*.
2783         * linux-nios2-low.c: New.
2784
2785 2013-05-03  Hafiz Abid Qadeer  <abidh@codesourcery.com>
2786
2787         * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
2788
2789 2013-04-25  Hui Zhu  <hui@codesourcery.com>
2790
2791         PR gdb/15186
2792         * ax.c (ax_printf): Add fflush.
2793
2794 2013-04-22  Tom Tromey  <tromey@redhat.com>
2795
2796         * Makefile.in (SFILES): Add filestuff.c.
2797         (OBS): Add filestuff.o.
2798         (filestuff.o): New target.
2799         * config.in, configure: Rebuild.
2800         * configure.ac: Check for fdwalk, pipe2.
2801
2802 2013-04-17  Pedro Alves  <palves@redhat.com>
2803
2804         * configure.ac (USE_THREAD_DB): Delete variable.
2805         (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
2806         Don't AC_SUBST USE_THREAD_DB.
2807         * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
2808         * config.in, configure: Regenerate.
2809
2810 2013-04-16  Pedro Alves  <palves@redhat.com>
2811
2812         * linux-low.h (struct lwp_info) <thread_known>: Move under
2813         the USE_THREAD_DB #ifdef.
2814
2815 2013-04-16  Pedro Alves  <palves@redhat.com>
2816
2817         * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
2818         (linux-low.o): Delete rule.
2819         * linux-low.h: Always include "gdb_thread_db.h" instead of
2820         conditionally including thread_db.h.
2821         (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
2822         HAVE_THREAD_DB_H.
2823
2824 2013-04-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
2825
2826         * Makefile.in (install-only): Fix make install regression.
2827
2828 2013-04-05  Jan Kratochvil  <jan.kratochvil@redhat.com>
2829
2830         Convert man pages to texinfo, new gdbinit.5 texinfo page.
2831         * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
2832         installation.
2833         * gdbserver.1: Remove.
2834
2835 2013-03-22  Pedro Alves  <palves@redhat.com>
2836
2837         * linux-low.c (handle_extended_wait): Don't call
2838         linux_enable_event_reporting.
2839
2840 2013-03-15  Tony Theodore  <tonyt@logyst.com>
2841
2842         PR build/9098:
2843         * Makefile.in (SHELL): Use @SHELL@.
2844
2845 2013-03-14  Sergio Durigan Junior  <sergiodj@redhat.com>
2846
2847         * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
2848         compiler warning.
2849
2850 2013-03-13  Joel Brobecker  <brobecker@adacore.com>
2851
2852         * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
2853         Remove extraneous NULL element.
2854
2855 2013-03-13  Yao Qi  <yao@codesourcery.com>
2856
2857         * tracepoint.c (traceframe_read_tsv): Look for the last matched
2858         'V' block in trace frame.
2859
2860 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
2861
2862         * target.h (struct target_ops): Add btrace ops.
2863         (target_supports_btrace): New macro.
2864         (target_enable_btrace): New macro.
2865         (target_disable_btrace): New macro.
2866         (target_read_btrace): New macro.
2867         * gdbthread.h (struct thread_info): Add btrace field.
2868         * server.c: Include btrace-common.h.
2869         (handle_btrace_general_set): New function.
2870         (handle_btrace_enable): New function.
2871         (handle_btrace_disable): New function.
2872         (handle_general_set): Call handle_btrace_general_set.
2873         (handle_qxfer_btrace): New function.
2874         (struct qxfer qxfer_packets[]): Add btrace entry.
2875         * inferiors.c (remove_thread): Disable btrace.
2876         * linux-low: Include linux-btrace.h.
2877         (linux_low_enable_btrace): New function.
2878         (linux_low_read_btrace): New function.
2879         (linux_target_ops): Add btrace ops.
2880         * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
2881         Add srv_linux_btrace=yes.
2882         (x86_64-*-linux*): Add linux-btrace.o.
2883         Add srv_linux_btrace=yes.
2884         * configure.ac: Define HAVE_LINUX_BTRACE.
2885         * config.in: Regenerated.
2886         * configure: Regenerated.
2887
2888 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
2889
2890         * server.c (handle_qxfer): Preserve error message if -3 is
2891         returned.
2892         (qxfer): Document the -3 return value.
2893
2894 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
2895
2896         * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
2897         (linux_btrace_h): New variable.
2898         (linux-btrace.o): New rule.
2899
2900 2013-03-08  Stan Shebs  <stan@codesourcery.com>
2901             Hafiz Abid Qadeer  <abidh@codesourcery.com>
2902
2903         * tracepoint.c (trace_buffer_size): New global.
2904         (DEFAULT_TRACE_BUFFER_SIZE): New define.
2905         (init_trace_buffer): Change to one-argument function. Allocate
2906         trace buffer memory.
2907         (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
2908         handle QTBuffer:size packet.
2909         (cmd_bigqtbuffer_size): New function.
2910         (initialize_tracepoint): Call init_trace_buffer with
2911         DEFAULT_TRACE_BUFFER_SIZE.
2912         * server.c (handle_query): Add QTBuffer:size in the
2913         supported packets.
2914
2915 2013-03-07  Yao Qi  <yao@codesourcery.com>
2916
2917         * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
2918         (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
2919         of -1.
2920         (cmd_qtsp): Adjust condition.  Do post increment.
2921         Set cur_action and cur_step_action back to 0.
2922
2923 2013-03-07  Jeremy Bennett  <jeremy.bennett@embecosm.com>
2924
2925         PR server/15236
2926         * linux-low.c (linux_write_memory): Return early success if LEN is
2927         zero.
2928
2929 2013-03-05  Corinna Vinschen  <vinschen@redhat.de>
2930
2931         * configure.srv: Add x86_64-*-cygwin* as target.
2932
2933 2013-02-28  Tom Tromey  <tromey@redhat.com>
2934
2935         * configure.ac: Invoke AC_SYS_LARGEFILE.
2936         * configure, config.in: Rebuild.
2937
2938 2013-02-28  Corinna Vinschen  <vinschen@redhat.com>
2939
2940         * win32-low.c: Throughout, fix format strings and casts of
2941         printf-like functions to avoid type related warnings on all
2942         platforms.
2943         (get_child_debug_event): Print dwDebugEventCode as hex since
2944         that's how it's usually documented.
2945
2946 2013-02-28  Yao Qi  <yao@codesourcery.com>
2947
2948         * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
2949         pulongest.
2950
2951 2013-02-27  Jiong Wang  <jiwang@tilera.com>
2952
2953         * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
2954         (reg-tilegx32.c): New rule.
2955         * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
2956         * linux-tile-low.c (tile_arch_setup): New function.  Invoke
2957         different register info initializer according to elf class.
2958         (init_registers_tilgx32): New function.  The tilegx32 register info
2959         initializer.
2960         (tile_fill_gregset): Use "uint_reg_t" to represent register size.
2961         (tile_store_gregset): Likewise.
2962
2963 2013-02-27  Yao Qi  <yao@codesourcery.com>
2964
2965         * server.c (process_point_options): Print debug message when
2966         debug_threads is true.
2967
2968 2013-02-26  Yao Qi  <yao@codesourcery.com>
2969
2970         * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
2971
2972 2013-02-19  Pedro Alves  <palves@redhat.com>
2973             Kai Tietz <ktietz@redhat.com>
2974
2975         PR gdb/15161
2976
2977         * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
2978         instead of strtoul to extract address from packet.
2979         (process_serial_event) <'z'>: Likewise.
2980
2981 2013-02-18  Yao Qi  <yao@codesourcery.com>
2982
2983         * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
2984
2985 2013-02-14  Pedro Alves  <palves@redhat.com>
2986
2987         Plug memory leak.
2988
2989         * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
2990         TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
2991
2992 2013-02-14  Pedro Alves  <palves@redhat.com>
2993
2994         * tracepoint.c (cmd_qtdpsrc): Use savestring.
2995
2996 2013-02-14  Pedro Alves  <palves@redhat.com>
2997
2998         * tracepoint.c (save_string): Delete.
2999         (add_tracepoint_action): Use savestring instead of save_string.
3000
3001 2013-02-12  Pedro Alves  <palves@redhat.com>
3002
3003         * linux-xtensa-low.c: Ditto.
3004         * xtensa-xtregs.c: Ditto.
3005
3006 2013-02-12  Sanimir Agovic  <sanimir.agovic@intel.com>
3007
3008         * thread-db.c (thread_db_get_tls_address): NULL pointer check
3009         thread_db.
3010
3011 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
3012
3013         * linux-aarch64-low.c (aarch64_arch_setup): Clamp
3014         aarch64_num_wp_regs and aarch64_num_bp_regs to
3015         AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
3016
3017 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
3018
3019         * linux-aarch64-low.c (ps_get_thread_area): Replace
3020         PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
3021
3022 2013-02-04  Jim MacArthur  <jim.macarthur@arm.com>
3023             Marcus Shawcroft  <marcus.shawcroft@arm.com>
3024             Nigel Stephens  <nigel.stephens@arm.com>
3025             Yufeng Zhang  <yufeng.zhang@arm.com>
3026
3027         * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
3028         (aarch64.c, aarch64-without-fpu.c): New targets.
3029         * configure.srv (aarch64*-*-linux*): New.
3030         * linux-aarch64-low.c: New file.
3031
3032 2013-02-04  Marcus Shawcroft  <marcus.shawcroft@arm.com>
3033
3034         * linux-low.c (handle_extended_wait, linux_create_inferior)
3035         (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
3036         (dequeue_one_deferred_signal, linux_resume_one_thread)
3037         (fetch_register, linux_write_memory, linux_enable_event_reporting)
3038         (linux_tracefork_grandchild, linux_test_for_tracefork)
3039         (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
3040         PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
3041         where the argument is 0.
3042
3043 2013-01-25  Yao Qi  <yao@codesourcery.com>
3044
3045         * event-loop.c: Include "queue.h".
3046         (gdb_event_p): New typedef.
3047         (struct gdb_event) <next_event>: Remove.
3048         (event_queue): Change to QUEUE(gdb_event_p).
3049         (async_queue_event): Remove.
3050         (gdb_event_xfree): New.
3051         (initialize_event_loop): New.
3052         (process_event): Use API from QUEUE.
3053         (wait_for_event): Likewise.
3054         * server.c (main): Call initialize_event_loop.
3055         * server.h (initialize_event_loop): Declare.
3056
3057 2013-01-18  Yao Qi  <yao@codesourcery.com>
3058
3059         * ax.h (struct eval_agent_expr_context): New.
3060         (gdb_eval_agent_expr): Update declaration.
3061         * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
3062         TFRAME.  Add new argument CTX.
3063         * server.h (struct eval_agent_expr_context): Declare.
3064         (agent_mem_read, agent_tsv_read): Update declaration.
3065         (agent_mem_read_string): Likewise.
3066         * tracepoint.c (eval_tracepoint_agent_expr): Remove.
3067         (add_traceframe_block): Add new argument TPOINT.
3068         Increase TPOINT->traceframe_usage.
3069         (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
3070         eval_tracepoint_agent_expr.
3071         (condition_true_at_tracepoint): Likewise.
3072         (agent_mem_read): Remove argument TFRAME.  Add argument CTX.
3073         (agent_mem_read_string, agent_tsv_read): Likewise.
3074
3075 2013-01-16  Yao Qi  <yao@codesourcery.com>
3076
3077         * linux-low.c (linux_resume_one_lwp): Don't check
3078         'lwp->bp_reinsert != 0'.
3079
3080 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
3081             Pedro Alves  <palves@redhat.com>
3082
3083         * lynx-low.c (ptrace_request_to_str): Define a temporary
3084         macro and use it to simplify this function's implementation.
3085
3086 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
3087
3088         * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
3089         sets errno.
3090
3091 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
3092
3093         * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
3094
3095 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
3096
3097         * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
3098
3099 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
3100
3101         * lynx-low.c (lynx_resume): Use the resume_info parameter
3102         to determine the ptid for the lynx_ptrace call, unless
3103         it is equal to minus_one_ptid, in which case we use the
3104         ptid of the current_inferior.
3105         (lynx_wait_1): After having received a thread create/exit
3106         event, resume the inferior's execution using the signaling
3107         thread's ptid, rather than the old ptid.
3108
3109 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
3110
3111         * lynx-low.c (lynx_resume): Delete variable ret.
3112
3113 2013-01-01  Joel Brobecker  <brobecker@adacore.com>
3114
3115         * gdbreplay.c (gdbreplay_version): Update copyright year.
3116         * server.c (gdbserver_version): Likewise.
3117
3118 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
3119
3120         * lynx-low.c (lynx_wait_1): Add debug trace before adding
3121         new thread.
3122
3123 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
3124
3125         * lynx-low.c (ptrace_request_to_str): Add handling for
3126         PTRACE_GETTRACESIG.
3127
3128 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
3129
3130         * lynx-low.c (lynx_attach): Delete variable new_process.
3131
3132 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
3133
3134         * lynx-low.c (lynx_create_inferior): Delete variable
3135         new_process.
3136
3137 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
3138
3139         * lynx-low.c (ptrace_request_to_str): Do not handle
3140         PTRACE_GETTHREADLIST if this macro does not exist.
3141
3142 2012-12-15  Yao Qi  <yao@codesourcery.com>
3143
3144         * Makefile.in (OBS): Add notif.o.
3145         * notif.c, notif.h: New.
3146         * server.c: Include "notif.h".
3147         (struct vstop_notif) <next>: Remove.
3148         <base>: New field.
3149         (queue_stop_reply): Update.
3150         (push_event, send_next_stop_reply): Remove.
3151         (discard_queued_stop_replies): Update.
3152         (notif_stop): New variable.
3153         (handle_v_stopped): Remove.
3154         (handle_v_requests): Don't call handle_v_stopped.  Call
3155         handle_ack_notif instead.
3156         (queue_stop_reply_callback): Call notif_event_enque instead
3157         of queue_stop_reply.
3158         (handle_status): Don't call send_next_stop_reply, call
3159         notif_write_event instead.
3160         (kill_inferior_callback): Likewise.
3161         (detach_or_kill_inferior_callback): Likewise.
3162         (main): Call initialize_notif.
3163         (process_serial_event): Call QUEUE_is_empty.
3164         (handle_target_event): Call notif_push instead of push event.
3165         * server.h (push_event): Remove declaration.
3166
3167 2012-12-10  Tom Tromey  <tromey@redhat.com>
3168
3169         * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
3170         (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
3171         macros.
3172         (.c.o): Rewrite.
3173         (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
3174         (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
3175         (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
3176         (amd64-linux-ipa.o, ax.o): Rewrite.
3177         (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
3178         (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
3179         (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
3180         (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
3181         (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
3182         (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
3183         (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
3184         (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
3185         (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
3186         (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
3187         (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
3188         (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
3189         (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
3190         (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
3191         (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
3192         (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
3193         (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
3194         (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
3195         (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
3196         (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
3197         (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
3198         (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
3199         (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
3200         (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
3201         (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
3202         (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
3203         (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
3204         (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
3205         (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
3206         (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
3207         (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
3208         (reg-tilegx.o): Remove.
3209         (all_object_files): New macro.
3210         Include .deps files.
3211         * aclocal.m4, configure: Rebuild.
3212         * acinclude.m4: Include depstand.m4, lead-dot.m4.
3213         * configure.ac: Invoke ZW_CREATE_DEPDIR,
3214         ZW_PROG_COMPILER_DEPENDENCIES.  Compute GMAKE condition.
3215
3216 2012-12-05  Tom Tromey  <tromey@redhat.com>
3217
3218         PR gdb/14917:
3219         * server.h (current_insn_ptr, emit_error): Declare 'extern'.
3220
3221 2012-11-28  Markus Metzger  <markus.t.metzger@intel.com>
3222
3223         * configure.ac: Check for linux/perf_event.h.
3224         * config.in: Regenerated.
3225         * configure: Regenerated.
3226
3227 2012-11-26  Maxime Villard  <rustyBSD@gmx.fr>
3228
3229         * hostio.c (handle_readlink): Decrease buffer size
3230         parameter passed to readlink by one byte.
3231
3232 2012-11-26  Yao Qi  <yao@codesourcery.com>
3233
3234         * configure.ac (build_warnings): Append '-Wempty-body'.
3235         * configure: Regenerated.
3236         * linux-low.c (linux_create_inferior): Use braces for empty 'if'
3237         body.
3238
3239 2012-11-15  Pierre Muller  <muller@sourceware.org>
3240
3241         * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
3242         * config.in: Regenerate.
3243         * configure: Regenerate.
3244         * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
3245         Use "gdb_wait.h" header instead of <sys/wait.h> header.
3246         * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3247         * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
3248         header.
3249         * server.c: Remove HAVE_WAIT_H conditional.  Use "gdb_wait.h" header
3250         instead of <sys/wait.h> header.
3251         * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
3252
3253 2012-11-13 Markus Metzger  <markus.t.metzger@intel.com>
3254
3255         * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
3256         (various make rules): Remove -DGDBSERVER
3257
3258 2012-11-09  Yao Qi  <yao@codesourcery.com>
3259
3260         * spu-low.c (current_ptid): Move it to ..
3261         * gdbthread.h: ... here.  New.
3262         * remote-utils.c (read_ptid): Use macro 'current_ptid'.
3263         * server.c (myresume, process_serial_event): Likewise.
3264         * thread-db.c (thread_db_find_new_threads): Likewise.
3265         * tracepoint.c (run_inferior_command): Likewise.
3266
3267 2012-10-01  Andrew Burgess  <aburgess@broadcom.com>
3268
3269         * server.c (handle_search_memory_1): Include access length in
3270         warning message.
3271
3272 2012-09-05  Michael Brandt  <michael.brandt@axis.com>
3273
3274         * linux-crisv32-low.c: Fix compile errors.
3275
3276 2012-09-04  Yao Qi  <yao@codesourcery.com>
3277
3278         * tracepoint.c (cmd_qtsv): Adjust debug message.
3279         Don't check CUR_TPOINT.
3280
3281 2012-08-28  Yao Qi  <yao@codesourcery.com>
3282
3283         * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
3284         * server.h: Include 'libiberty.h' and 'ansidecl.h'.
3285         (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
3286         Remove declarations of xmalloc, xreallloc, xstrdup and
3287         freeargv.
3288         * Makefile.in (libiberty_h): New.
3289         (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
3290         (linux-bfin-low.o): Append dependency 'libiberty.h'.
3291
3292 2012-08-23  Yao Qi  <yao@codesourcery.com>
3293
3294         * server.h: Remove declaration of 'xsnprintf'.
3295
3296 2012-08-22  Keith Seitz  <keiths@redhat.com>
3297
3298         * server.h: Include build-gnulib-gbserver/config.h.
3299         * gdbreplay.c: Likewise.
3300
3301 2012-08-08  Doug Evans  <dje@google.com>
3302
3303         * Makefile.in (SFILES): Add gdb_vecs.c.
3304         (OBS): Add gdb_vecs.o.
3305         (gdb_vecs_h, host_defs_h): New variables.
3306         (thread-db.o): Add $(gdb_vecs_h) dependency.
3307         (gdb_vecs.o): New rule.
3308         * thread-db.c: #include "gdb_vecs.h".
3309         (thread_db_load_search): Use a vector to iterate over path elements.
3310         Handle text appearing after "$pdir".
3311
3312         * configure.ac: Add check for strstr.
3313         * config.in: Regenerate.
3314         * configure: Regenerate.
3315
3316 2012-08-02  Ulrich Weigand  <ulrich.weigand@linaro.org>
3317
3318         * hostio.c (handle_pread): If pread fails, fall back to attempting
3319         lseek/read.
3320         (handle_pwrite): Likewise for pwrite.
3321
3322 2012-08-01  Ulrich Weigand  <ulrich.weigand@linaro.org>
3323
3324         * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
3325         between unsupported TYPE and unimplementable ADDR/LEN combination.
3326         (arm_insert_point): Act on new return value.
3327
3328 2012-07-31  Pedro Alves  <palves@redhat.com>
3329
3330         * server.c (process_point_options): Only skip tokens if we find
3331         one that is unrecognized.  Don't treat 'X' specially while
3332         skipping unrecognized tokens.
3333
3334 2012-07-30  Ulrich Weigand  <ulrich.weigand@linaro.org>
3335
3336         * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
3337         to 4-byte-align HW breakpoint addresses for Thumb.
3338
3339 2012-07-27  Yao Qi  <yao@codesourcery.com>
3340
3341         PR remote/14161.
3342
3343         * server.h: Declare gdb_agent_about_to_close.
3344         * target.c (kill_inferior): Include "agent.h".
3345         New.  Send command 'kill'.
3346         * target.h (kill_inferior): Removed macro.
3347         * tracepoint.c (gdb_agent_about_to_close): New.
3348         (gdb_agent_helper_thread): Handle command 'close'.
3349         Wait endlessly until the inferior stops.
3350         Install gdb_agent_remove_socket to atexit hook.
3351         (agent_socket_name): New static variable.
3352         (gdb_agent_socket_init): Replace local variable 'name' with
3353         'agent_socket_name'.
3354         (gdb_agent_remove_socket): New.
3355
3356 2012-07-27  Yao Qi  <yao@codesourcery.com>
3357
3358         * server.c (process_point_options): Stop at 'X' when parsing.
3359
3360 2012-07-19  Michael Eager  <eager@eagercon.com>
3361
3362         * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
3363         to hw_execute.
3364         * linux-x86-low.c (x86_insert_point, x86_remove_point):
3365         Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
3366         hardware breakpoint.
3367
3368 2012-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
3369
3370         * gdbserver/linux-low.c (initialize_low): Call
3371         linux_ptrace_init_warnings.
3372
3373 2012-07-02  Doug Evans  <dje@google.com>
3374
3375         * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
3376         pointer to int.
3377
3378 2012-07-02  Stan Shebs  <stan@codesourcery.com>
3379
3380         * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
3381         (ax.o): Add it to build rule.
3382         (ax-ipa.o): Ditto.
3383         (OBS): Add format.o.
3384         (IPA_OBS): Add format.o.
3385         * server.c (handle_query): Claim support for breakpoint commands.
3386         (process_point_options): Add command case.
3387         (process_serial_event): Leave running if there are printfs in
3388         effect.
3389         * mem-break.h (any_persistent_commands): Declare.
3390         (add_breakpoint_commands): Declare.
3391         (gdb_no_commands_at_breakpoint): Declare.
3392         (run_breakpoint_commands): Declare.
3393         * mem-break.c (struct point_command_list): New struct.
3394         (struct breakpoint): New field command_list.
3395         (any_persistent_commands): New function.
3396         (add_commands_to_breakpoint): New function.
3397         (add_breakpoint_commands): New function.
3398         (gdb_no_commands_at_breakpoint): New function.
3399         (run_breakpoint_commands): New function.
3400         * linux-low.c (linux_wait_1): Test for and run breakpoint commands
3401         locally.
3402         * ax.c: Include format.h.
3403         (ax_printf): New function.
3404         (gdb_eval_agent_expr): Add printf opcode.
3405
3406 2012-06-13  Yao Qi  <yao@codesourcery.com>
3407
3408         * server.c (start_inferior): Remove duplicated writes to fields
3409         'last_resume_kind' and 'last_status' of 'current_inferior'.
3410
3411 2012-06-12  Yao Qi  <yao@codesourcery.com>
3412             Pedro Alves  <palves@redhat.com>
3413
3414         * linux-low.c (linux_set_resume_request): Simplify predicate.  Add
3415         comment.
3416         * server.c (handle_v_cont): Extend comment.
3417
3418 2012-06-11  Yao Qi  <yao@codesourcery.com>
3419
3420         * linux-low.c (linux_attach): Add 'static'.
3421
3422 2012-06-06  Yao Qi  <yao@codesourcery.com>
3423
3424         * ax.c (gdb_eval_agent_expr): Print `top' in hex.
3425
3426 2012-06-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
3427
3428         Fix gcc -flto compilation warning.
3429         * server.c (main): Make variable multi_mode and attach volatile.
3430
3431 2012-05-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
3432
3433         * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
3434         if the platform doesn't know about it.
3435
3436 2012-05-30  Jeff Kenton  <jkenton@tilera.com>
3437
3438         * Makefile.in (SFILES): Add linux-tile-low.c.
3439         (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
3440         * configure.srv: Handle tilegx-*-linux*.
3441         * linux-tile-low.c: New file.
3442
3443 2012-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
3444
3445         * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
3446
3447 2012-05-24  Pedro Alves  <palves@redhat.com>
3448
3449         PR gdb/7205
3450
3451         Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
3452
3453 2012-05-24  Pedro Alves  <palves@redhat.com>
3454
3455         PR gdb/7205
3456
3457         Replace target_signal with gdb_signal throughout.
3458
3459 2012-05-22  Maciej W. Rozycki  <macro@codesourcery.com>
3460
3461         * linux-low.c (linux_store_registers): Avoid the copying sequence
3462         when no data has been retrieved by ptrace.
3463
3464 2012-05-22  Will Deacon  <will.deacon@arm.com>
3465
3466         * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
3467         Include asm/ptrace.h.
3468         (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
3469         already defined.
3470
3471 2012-05-21  Maciej W. Rozycki  <macro@codesourcery.com>
3472
3473         * linux-low.c (linux_store_registers): Don't re-retrieve data
3474         with ptrace that has already been obtained from /proc.  Always
3475         copy any data retrieved with ptrace to the buffer supplied.
3476
3477 2012-05-11  Yao Qi  <yao@codesourcery.com>
3478             Pedro Alves  <palves@redhat.com>
3479
3480         * linux-low.c (enum stopping_threads_kind): New.
3481         (stopping_threads): Change type to `enum stopping_threads_kind'.
3482         (handle_extended_wait): If stopping and suspending threads, leave
3483         the new_lwp suspended too.
3484         (linux_wait_for_event): Adjust.
3485         (stop_all_lwps): Set `stopping_threads' to
3486         STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
3487         whether we're suspending threads or just stopping them.  Assert no
3488         recursion happens.
3489
3490 2012-04-29  Yao Qi  <yao@codesourcery.com>
3491
3492         * server.h: Move some code to ...
3493         * gdbthread.h: ... here.  New.
3494         * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
3495         (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
3496         (nto-low.o, win32-low.o): Likewise.
3497         * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
3498         * regcache.c, remote-utils.c, server.c: Likewise.
3499         * target.c, tracepoint.c, win32-low.c: Likewise.
3500
3501 2012-04-24  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
3502
3503         * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
3504         (PTRACE_ARG4_TYPE): Likewise.
3505         (PTRACE_XFER_TYPE): Likewise.
3506         * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
3507         ptrace to PTRACE_ARG3_TYPE.
3508         * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
3509         (PTRACE_ARG4_TYPE): Likewise.
3510         (PTRACE_XFER_TYPE): Likewise.
3511         (linux_detach_one_lwp): Cast fourth argument of
3512         ptrace to long then PTRACE_ARG4_TYPE.
3513         (regsets_fetch_inferior_registers): Cast third argument of
3514         ptrace to long then PTRACE_ARG3_TYPE.
3515         (regsets_store_inferior_registers): Likewise.
3516
3517 2012-04-20  Pedro Alves  <palves@redhat.com>
3518
3519         * configure: Regenerate.
3520
3521 2012-04-19  Pedro Alves  <palves@redhat.com>
3522
3523         * Makefile.in (GNULIB_BUILDDIR): New.
3524         (LIBGNU, INCGNU, GNULIB_H): Adjust.
3525         (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
3526         (all, install-only, uninstall, clean-info, all-lib, clean): No
3527         longer pass GNULIB_FLAGS_TO_PASS.  Use subdir_do.
3528         (maintainer-clean realclean distclean): Use subdir_do.
3529         (subdir_do): New.
3530         (gnulib/import/Makefile): Adjust.  Replace gnulib/import with
3531         $(GNULIB_BUILDDIR).  Don't pass argument to config.status.
3532         * acinclude.m4: Include acx_configure_dir.m4.
3533         * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
3534         calls.  Call AC_PROG_RANLIB.  Configure gnulib using
3535         ACX_CONFIGURE_DIR.
3536         (GNULIB): New.
3537         (GNULIB_STDINT_H): Adjust.
3538         (AC_OUTPUT): Don't output gnulib/Makefile anymore.
3539         * gdbreplay.c: Include build-gnulib/config.h.
3540         * server.h: Likewise.
3541         * aclocal.m4: Regenerate.
3542         * config.in: Regenerate.
3543         * configure: Regenerate.
3544
3545 2012-04-19  Pedro Alves  <palves@redhat.com>
3546
3547         * Makefile.in (LIBGNU, INCGNU): Adjust.
3548         (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
3549         (all, install-only, uninstall, clean-info, all-lib, clean)
3550         (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
3551         * configure.ac: Adjust AC_OUTPUT output.
3552         * aclocal.m4: Regenerate.
3553         * configure: Regenerate.
3554
3555 2012-04-19  Pedro Alves  <palves@redhat.com>
3556
3557         * Makefile.in (generated_files): New.
3558         (server_h): Remove the explicit dependency on config.h, and depend
3559         on $generated_files.
3560
3561 2012-04-19  Pedro Alves  <palves@redhat.com>
3562
3563         * Makefile.in (INCGNU): Add -Ignulib.
3564
3565 2012-04-19  Pedro Alves  <palves@redhat.com>
3566
3567         * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
3568         (INCGNU): ... this, and spell out -I here.
3569         (GNULIB_LIB): Rename to ...
3570         (LIBGNU): ... this.
3571         (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
3572
3573 2012-04-19  Pedro Alves  <palves@redhat.com>
3574
3575         * config.in: Regenerate.
3576
3577 2012-04-19  Pedro Alves  <palves@redhat.com>
3578
3579         * configure.ac: Remove AC_CHECK_DECLS check for memmem.
3580         * server.h (memmem): Remove declaration.
3581         * config.in: Regenerate.
3582         * configure: Regenerate.
3583
3584 2012-04-19  Yao Qi  <yao@codesourcery.com>
3585
3586         * Makefile.in (SFILES): Add common/vec.c.
3587         (OBS): Add vec.o.
3588         (vec.o): New rule.
3589
3590 2012-04-19  Yao Qi  <yao@codesourcery.com>
3591
3592         * remote-utils.c (prepare_resume_reply): Replace with macro
3593         target_core_of_thread.
3594         * server.c (handle_qxfer_threads_proper): Likewise.
3595         * target.h (traget_core_of_thread): New macro.
3596
3597 2012-04-18  Pedro Alves  <palves@redhat.com>
3598
3599         * aclocal.m4: Regenerate.
3600         * configure: Regenerate.
3601
3602 2012-04-16  Yao Qi  <yao@codesourcery.com>
3603
3604         * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
3605         duplicated on address.
3606
3607 2012-04-16  Yao Qi  <yao@codesourcery.com>
3608
3609         * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
3610         (struct tracepoint_action_ops) <send>: New field.
3611         (m_tracepoint_action_send, r_tracepoint_action_send): New.
3612         (agent_expr_send, x_tracepoint_action_send): New.
3613         (l_tracepoint_action_send): New.
3614         (cmd_qtdp): Download and install tracepoint
3615         according to `use_agent'.
3616         (run_inferior_command): Add one more parameter `len'.
3617         Update callers.
3618         (tracepoint_send_agent): New.
3619         (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
3620
3621 2012-04-16  Yao Qi  <yao@codesourcery.com>
3622
3623         * tracepoint.c (download_tracepoints): Moved to ...
3624         (cmd_qtstart): ... here.
3625
3626 2012-04-14  Yao Qi  <yao@codesourcery.com>
3627
3628         * tracepoint.c: Include inttypes.h.
3629         (struct collect_memory_action): Use sized types.
3630         (struct tracepoint): Likewise.
3631         (cmd_qtdp, stop_tracing): Update print specifiers.
3632         (cmd_qtp, response_tracepoint): Likewise.
3633         (collect_data_at_tracepoint): Likewise.
3634         (collect_data_at_step): Likewise.
3635
3636 2012-04-14  Yao Qi  <yao@codesourcery.com>
3637
3638         Import gnulib module inttypes.
3639         * aclocal.m4, config.in, configure: Regenerated.
3640
3641 2012-04-14  Yao Qi  <yao@codesourcery.com>
3642
3643         * Makefile.in (maintainer-clean, realclean, distclean): Remove
3644         Makefile and config.status at last.
3645
3646 2012-04-13  Yao Qi  <yao@codesourcery.com>
3647
3648         * tracepoint.c: Include stdint.h unconditionally.
3649
3650 2012-04-13  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
3651
3652         * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
3653         on BFD_HAVE_SYS_PROCFS_TYPE.
3654         * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
3655         * configure: Regenerate.
3656         * config.in: Likewise.
3657
3658 2012-04-13  H.J. Lu  <hongjiu.lu@intel.com>
3659
3660         * Makefile.in (clean): Also remove x32.c x32-linux.c
3661         x32-avx.c x32-avx-linux.c.
3662         (x32.o): New target.
3663         (x32.c): Likewise.
3664         (x32-linux.o): Likewise.
3665         (x32-linux.c): Likewise.
3666         (x32-avx.o): Likewise.
3667         (x32-avx.c): Likewise.
3668         (x32-avx-linux.o): Likewise.
3669         (x32-avx-linux.c): Likewise.
3670
3671         * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
3672         (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
3673         (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
3674         (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
3675         (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
3676         i386/x32-avx-linux.xml.
3677
3678         * linux-x86-low.c (init_registers_x32_linux): New prototype.
3679         (init_registers_x32_avx_linux): Likwise.
3680         (x86_linux_update_xmltarget): Call init_registers_x32_linux
3681         or init_registers_x32_avx_linux if linux_is_elf64 is false.
3682
3683 2012-04-13  Pedro Alves  <palves@redhat.com>
3684
3685         * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
3686         (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
3687         (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
3688         (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
3689         the sub-make.
3690
3691 2012-04-12  H.J. Lu  <hongjiu.lu@intel.com>
3692
3693         * linux-x86-low.c (compat_x32_clock_t): New.
3694         (compat_x32_siginfo_t): Likewise.
3695         (compat_x32_siginfo_from_siginfo): Likewise.
3696         (siginfo_from_compat_x32_siginfo): Likewise.
3697         (linux_is_elf64): Likewise.
3698         (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
3699         and siginfo_from_compat_x32_siginfo for x32.
3700         (x86_arch_setup): Set linux_is_elf64.
3701
3702 2012-04-12  H.J. Lu  <hongjiu.lu@intel.com>
3703
3704         PR gdb/13969
3705         * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
3706         e_machine field.
3707         (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
3708         * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
3709         * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
3710         compatible with process.
3711
3712 2012-04-12  Yao Qi  <yao@codesourcery.com>
3713
3714         * Makefile.in: Define abs_top_srcdir and abs_srcdir.
3715         (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
3716         (install-only, install-info, clean): Handle sub dir gnulib.
3717         (all-lib, am--refresh): New targets.
3718         (memmem.o): Remove target.
3719         * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
3720         Invoke gl_EARLY.  Invoke AC_CHECK_PROGS for make.
3721         (AC_REPLACE_FUNCS): Remove memmem.
3722         Invoke gl_INIT and AM_INIT_AUTOMAKE.
3723         (AC_OUTPUT): Generate Makefile in gnulib/.
3724         * aclocal.m4, config.in, configure: Regenerated.
3725
3726 2012-04-10  Maciej W. Rozycki  <macro@codesourcery.com>
3727
3728         * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
3729
3730 2012-04-05  Pedro Alves  <palves@redhat.com>
3731
3732         -Werror=strict-aliasing
3733
3734         * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
3735         pointer.
3736
3737 2012-04-04  Pedro Alves  <palves@redhat.com>
3738
3739         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
3740         (sparc_store_gregset_from_stack, sparc_store_gregset)
3741         (sparc_breakpoint_at): Fix formatting.
3742
3743 2012-03-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
3744
3745         * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
3746         are available.
3747         * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
3748         [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
3749         * config.in: Regenerate.
3750         * configure: Likewise.
3751
3752 2012-03-29  Pedro Alves  <palves@redhat.com>
3753
3754         * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
3755         Correct ptrace arguments.
3756
3757 2012-03-28  Pedro Alves  <palves@redhat.com>
3758
3759         * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
3760         (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
3761         (IA64_FR1_REGNUM): New defines.
3762         (ia64_fetch_register): New.
3763         (the_low_target): Install it.
3764         * linux-low.h (struct linux_target_ops) <fetch_register>: New
3765         field.
3766         * linux-low.c (linux_fetch_registers): Try the
3767         the_low_target.fetch_register hook first.
3768
3769         * linux-arm-low.c (the_low_target): Adjust.
3770         * linux-bfin-low.c (the_low_target): Adjust.
3771         * linux-cris-low.c (the_low_target): Adjust.
3772         * linux-crisv32-low.c (the_low_target): Adjust.
3773         * linux-m32r-low.c (the_low_target): Adjust.
3774         * linux-m68k-low.c (the_low_target): Adjust.
3775         * linux-mips-low.c (the_low_target): Adjust.
3776         * linux-ppc-low.c (the_low_target): Adjust.
3777         * linux-s390-low.c (the_low_target): Adjust.
3778         * linux-sh-low.c (the_low_target): Adjust.
3779         * linux-sparc-low.c (the_low_target): Adjust.
3780         * linux-tic6x-low.c (the_low_target): Adjust.
3781         * linux-x86-low.c (the_low_target): Adjust.
3782         * linux-xtensa-low.c (the_low_target): Adjust.
3783
3784 2012-03-26  Pedro Alves  <palves@redhat.com>
3785
3786         * server.c (handle_qxfer_libraries): Don't bail early if
3787         the_target->qxfer_libraries_svr4 is not NULL.
3788
3789 2012-03-26  Pedro Alves  <palves@redhat.com>
3790
3791         * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
3792
3793 2012-03-23  Pedro Alves  <palves@redhat.com>
3794
3795         * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
3796         "library-list-svr4" element's start tag when the the DSO list is
3797         empty.
3798
3799 2012-03-23  Pedro Alves  <palves@redhat.com>
3800
3801         * linux-low.c (read_one_ptr): Read the inferior's pointer through
3802         a variable whose type size is the same as the inferior's pointer
3803         size.
3804
3805 2012-03-21  Thomas Schwinge  <thomas@codesourcery.com>
3806
3807         * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
3808         struct siginfo.
3809         * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
3810         * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3811         * linux-low.h: Include <signal.h>.
3812         (struct siginfo): Remove forward declaration.
3813         (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
3814         struct siginfo.
3815
3816 2012-03-21  Mike Frysinger  <vapier@gentoo.org>
3817
3818         * .gitignore: Ignore more files.
3819
3820 2012-03-19  Pedro Alves  <palves@redhat.com>
3821             Jan Kratochvil  <jan.kratochvil@redhat.com>
3822
3823         * server.c (cont_thread, general_thread): Add describing comments.
3824         (start_inferior): Clear `cont_thread'.
3825         (handle_v_cont): Don't set `cont_thread' if resuming all threads
3826         of a process.
3827
3828 2012-03-15  Yao Qi  <yao@codesourcery.com>
3829
3830         * tracepoint.c (install_tracepoint): Move duplicated tracepoint
3831         handling to ...
3832         (cmd_qtdp): ... here.
3833
3834 2012-03-15  Yao Qi  <yao@codesourcery.com>
3835
3836         * tracepoint.c (struct tracepoint_action_ops): New.
3837         (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
3838         (m_tracepoint_action_download): New.
3839         (r_tracepoint_action_download): New.
3840         (x_tracepoint_action_download): New.
3841         (l_tracepoint_action_download): New.
3842         (add_tracepoint_action): Install `action->ops' according type.
3843         (download_tracepoint_1): Move code `download' function pointer
3844         of various tracepoint_action_ops.
3845
3846 2012-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
3847
3848         * linux-low.c (linux_attach_lwp_1): New variable buffer.  Call
3849         linux_ptrace_attach_warnings.
3850
3851 2012-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
3852
3853         * Makefile.in (linux-ptrace.o): New.
3854         * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
3855         (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
3856         (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
3857         (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
3858         (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
3859         of these targets.
3860         * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
3861
3862 2012-03-08  Yao Qi  <yao@codesourcery.com>
3863             Pedro Alves  <palves@redhat.com>
3864
3865         Fix PR server/13392.
3866         * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
3867         offset of JMP insn.
3868         * tracepoint.c (remove_tracepoint): New.
3869         (cmd_qtdp): Call remove_tracepoint when failed to install.
3870
3871 2012-03-07  Pedro Alves  <palves@redhat.com>
3872
3873         * linux-low.c (get_detach_signal): New.
3874         (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
3875         Pass on pending signals to PTRACE_DETACH.  Check the result of the
3876         ptrace call.
3877         * server.c (program_signals, program_signals_p): New.
3878         (handle_general_set): Handle QProgramSignals.
3879         * server.h (program_signals, program_signals_p): Declare.
3880
3881 2012-03-05  Pedro Alves  <palves@redhat.com>
3882             Jan Kratochvil  <jan.kratochvil@redhat.com>
3883
3884         * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
3885         New comment why.
3886
3887 2012-03-03  Yao Qi  <yao@codesourcery.com>
3888
3889         * tracepoint.c (tracepoint_look_up_symbols): Update call to
3890         agent_look_up_symbols.
3891
3892 2012-03-03  Yao Qi  <yao@codesourcery.com>
3893
3894         * Makefile.in (linux-low.o): Keep dependence on agent.h.
3895         (linux-x86-low.o): Likewise.
3896         * server.h: Remove in_process_agent_loaded.
3897         * tracepoint.c (in_process_agent_loaded): Removed.  Moved it
3898         common/agent.c.
3899         Update callers.
3900
3901 2012-03-03  Yao Qi  <yao@codesourcery.com>
3902
3903         * tracepoint.c (gdb_agent_capability): New global.
3904         (in_process_agent_loaded_ust): Renamed to
3905         `in_process_agent_supports_ust'.
3906         Update callers.
3907         (in_process_agent_supports_ust): Call agent_capability_check.
3908         (clear_installed_tracepoints): Assert that agent supports
3909         agent.
3910
3911 2012-03-03  Yao Qi  <yao@codesourcery.com>
3912
3913         * linux-low.c (linux_supports_agent): New.
3914         (linux_target_ops): Initialize field `supports_agent' with
3915         linux_supports_agent.
3916         * target.h (struct target_ops) <supports_agent>: New.
3917         (target_supports_agent): New macro.
3918         * server.c (handle_general_set): Handle packet 'QAgent'.
3919         (handle_query): Send `QAgent+'.
3920         * Makefile.in (server.o): Depends on agent.h.
3921
3922 2012-03-03  Yao Qi  <yao@codesourcery.com>
3923
3924         * Makefile.in (OBS): Add agent.o.
3925         Add new rule for agent.o.
3926         Track dependence of tracepoint.c on agent.h.
3927         * tracepoint.c (run_inferior_command_1):
3928         (run_inferior_command): Call agent_run_command.
3929         (gdb_ust_connect_sync_socket): Deleted.  Move it to
3930         common/agent.c.
3931         (resume_thread, stop_thread): Likewise.
3932         (gdb_ust_socket_init): Renamed to ...
3933         (gdb_agent_socket_init): ... New.
3934         (gdb_ust_thread): Renamed to ...
3935         (gdb_agent_helper_thread): ... New.
3936         (gdb_ust_init): Move some code to ...
3937         (gdb_agent_init): ... here.  New.
3938         [HAVE_UST]: Call gdb_ust_init.
3939         (initialize_tracepoint_ftlib):  Call gdb_agent_init.
3940         * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
3941         * config.in, configure: Regenerated.
3942
3943 2012-03-02  Pedro Alves  <palves@redhat.com>
3944
3945         * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
3946         * linux-low.c (struct simple_pid_list): New.
3947         (stopped_pids): New a struct simple_pid_list pointer.
3948         (add_to_pid_list, pull_pid_from_list): New.
3949         (handle_extended_wait): Don't assume the first signal new children
3950         report is SIGSTOP.  Adjust call to pull_pid_from_list.
3951         (linux_wait_for_lwp): Adjust.
3952
3953 2012-03-02  Yao Qi  <yao@codesourcery.com>
3954
3955         * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
3956         debug log.
3957
3958 2012-03-02  Yao Qi  <yao@codesourcery.com>
3959
3960         * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
3961         `stop_pc' and `tpoint'.  Update caller.
3962
3963 2012-03-01  Maciej W. Rozycki  <macro@codesourcery.com>
3964
3965         * linux-low.h (linux_target_ops): Add regset_bitmap member.
3966         * linux-low.c (use_linux_regsets): New macro.
3967         [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
3968         [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
3969         (linux_register_in_regsets): New function.
3970         (usr_fetch_inferior_registers): Skip registers covered by
3971         regsets.
3972         (usr_store_inferior_registers): Likewise.
3973         (usr_fetch_inferior_registers): New macro.
3974         (usr_store_inferior_registers): Likewise.
3975         (linux_fetch_registers): Handle mixed regset/non-regset targets.
3976         (linux_store_registers): Likewise.
3977         * linux-mips-low.c (init_registers_mips_dsp_linux): New
3978         prototype.
3979         (init_registers_mips64_dsp_linux): Likewise.
3980         (init_registers_mips_linux): New macro.
3981         (init_registers_mips_dsp_linux): Likewise.
3982         (mips_dsp_num_regs): Likewise.
3983         (DSP_BASE, DSP_CONTROL): New fallback macros.
3984         (mips_base_regs): New macro.
3985         (mips_regmap): Use it.  Fix the size.
3986         (mips_dsp_regmap): New variable.
3987         (mips_dsp_regset_bitmap): Likewise.
3988         (mips_arch_setup): New function.
3989         (mips_cannot_fetch_register): Use the_low_target.regmap rather
3990         than mips_regmap.
3991         (mips_cannot_store_register): Likewise.
3992         (the_low_target): Update .arch_setup, .num_regs and .regmap
3993         initializers.  Add .regset_bitmap initializer.
3994         * linux-arm-low.c (the_low_target): Add .regset_bitmap
3995         initializer.
3996         * linux-bfin-low.c (the_low_target): Likewise.
3997         * linux-cris-low.c (the_low_target): Likewise.
3998         * linux-crisv32-low.c (the_low_target): Likewise.
3999         * linux-ia64-low.c (the_low_target): Likewise.
4000         * linux-m32r-low.c (the_low_target): Likewise.
4001         * linux-m68k-low.c (the_low_target): Likewise.
4002         * linux-ppc-low.c (the_low_target): Likewise.
4003         * linux-s390-low.c (the_low_target): Likewise.
4004         * linux-sh-low.c (the_low_target): Likewise.
4005         * linux-sparc-low.c (the_low_target): Likewise.
4006         * linux-tic6x-low.c (the_low_target): Likewise.
4007         * linux-x86-low.c (the_low_target): Likewise.
4008         * linux-xtensa-low.c (the_low_target): Likewise.
4009         * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
4010         mips64-dsp-linux.o to srv_regobj.  Add mips-dsp-linux.xml,
4011         mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
4012         srv_xmlfiles.
4013         * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
4014         (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
4015
4016 2012-02-29  Yao Qi  <yao@codesourcery.com>
4017             Pedro Alves  <palves@redhat.com>
4018
4019         * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
4020         `step_over_finished' is true.
4021
4022 2012-02-27  Pedro Alves  <palves@redhat.com>
4023
4024         * linux-low.c (pid_is_stopped): Delete, moved to common/.
4025         (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
4026
4027 2012-02-27  Pedro Alves  <palves@redhat.com>
4028
4029         PR server/9684
4030         * linux-low.c (pid_is_stopped): New.
4031         (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
4032
4033 2012-02-25  Luis Machado  <lgustavo@codesourcery.com>
4034
4035         * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
4036         of conditions.
4037
4038 2012-02-24  Maciej W. Rozycki  <macro@codesourcery.com>
4039
4040         * linux-mips-low.c (mips_regmap): Correct the index of $f9.
4041
4042 2012-02-24  Luis Machado  <lgustavo@codesourcery>
4043
4044         * server.c (handle_query): Advertise support for target-side
4045         breakpoint condition evaluation.
4046         (process_point_options): New function.
4047         (process_serial_event): When inserting a breakpoint, check for
4048         a target-side condition that should be evaluated.
4049
4050         * mem-break.c: Include regcache.h and ax.h.
4051         (point_cond_list_t): New data structure.
4052         (breakpoint) <cond_list>: New field.
4053         (find_gdb_breakpoint_at): Make non-static.
4054         (delete_gdb_breakpoint_at): Clear any target-side
4055         conditions.
4056         (clear_gdb_breakpoint_conditions): New function.
4057         (add_condition_to_breakpoint): Likewise.
4058         (add_breakpoint_condition): Likewise.
4059         (gdb_condition_true_at_breakpoint): Likewise.
4060         (gdb_breakpoint_here): Return result directly instead
4061         of going through a local variable.
4062
4063         * mem-break.h (find_gdb_breakpoint_at): New prototype.
4064         (clear_gdb_breakpoint_conditions): Likewise.
4065         (add_breakpoint_condition): Likewise.
4066         (gdb_condition_true_at_breakpoint): Likewise.
4067
4068         * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
4069         (need_step_over_p): Take target-side breakpoint condition into
4070         consideration.
4071
4072 2012-02-24  Luis Machado  <lgustavo@codesourcery>
4073
4074         * server.h: Include tracepoint.h.
4075         (agent_mem_read, agent_get_trace_state_variable_value,
4076         agent_set_trace_state_variable_value,
4077         agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
4078         get_set_tsv_func_addr): New prototypes.
4079
4080         * ax.h: New include file.
4081         * ax.c: New source file.
4082
4083         * tracepoint.c: Include ax.h.
4084         (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
4085         agent_expr, eval_result_type): Move to ax.h.
4086         (parse_agent_expr): Rename to ...
4087         (gdb_parse_agent_expr): ... this, make it non-static and move
4088         to ax.h.
4089         (unparse_agent_expr) Rename to ...
4090         (gdb_unparse_agent_expr): ... this, make it non-static and move
4091         to ax.h.
4092         (eval_agent_expr): Rename to ...
4093         (eval_tracepoint_agent_expr): ... this.
4094         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
4095         forward declarations.
4096         (add_tracepoint_action): Call gdb_parse_agent_expr (...).
4097         (agent_get_trace_state_variable_value): New function.
4098         (agent_set_trace_state_variable_value): New function.
4099         (cmd_qtdp): Call gdb_parse_agent_expr (...).
4100         (response_tracepoint): Call gdb_unparse_agent_expr (...).
4101         (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
4102         (condition_true_at_tracepoint): Likewise.
4103         (parse_agent_expr): Rename to ...
4104         (gdb_parse_agent_expr): ... this and move to ax.c.
4105         (unparse_agent_expr): Rename to ...
4106         (gdb_unparse_agent_expr): ... this and move to ax.c.
4107         (gdb_agent_op_name): Move to ax.c.
4108         (eval_agent_expr): Rename to ...
4109         (gdb_eval_agent_expr): ... this, use regcache passed as parameter
4110         and move to ax.c.
4111         (eval_tracepoint_agent_expr): New function.
4112         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
4113         non-static.
4114         (current_insn_ptr, emit_error, struct bytecode_address): Move to
4115         ax.c.
4116         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
4117         emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
4118         emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
4119         emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
4120         emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
4121         emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
4122         emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
4123         emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
4124         (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
4125         (compile_bytecodes): Remove forward declaration.
4126         (is_goto_target): Move to ax.c.
4127         (compile_bytecodes): Move to ax.c and call
4128         agent_get_trace_state_variable_value (...) and
4129         agent_set_trace_state_variable_value (...).
4130
4131         * Makefile.in: Update ax.c and IPA dependencies.
4132
4133 2012-02-24  Pedro Alves  <palves@redhat.com>
4134
4135         * tracepoint.c (cmd_bigqtbuffer): Rename as ...
4136         (cmd_bigqtbuffer_circular): ... this.  Only handle
4137         'QTBuffer:circular:'.
4138         (handle_tracepoint_general_set): Adjust.
4139
4140 2012-02-16  Yao Qi  <yao@codesourcery.com>
4141
4142         * inferiors.c: Move code to ...
4143         * dll.c: .... here.  New.
4144         * server.h: Declare clear_dlls.
4145         * Makefile.in (SFILES): Add dll.c.
4146         (OBS): Add dll.o
4147         (dll.o): New rule.
4148
4149 2012-02-11  Yao Qi  <yao@codesourcery.com>
4150
4151         * server.c: (handle_monitor_command): Add a new parameter
4152         `own_buf'.
4153         (handle_query): Update caller.
4154
4155 2012-02-09  Joel Brobecker  <brobecker@adacore.com>
4156
4157         * configure.ac: Add readlink to AC_CHECK_FUNCS list.
4158         * configure, config.in: Regenerate.
4159         * hostio.c: Provide an alternate implementation if HAVE_READLINK
4160         is not defined.
4161
4162 2012-02-02  Pedro Alves  <palves@redhat.com>
4163
4164         Try SIGKILL first, then PTRACE_KILL.
4165         * linux-low.c (linux_kill_one_lwp): New.
4166         (linux_kill_one_lwp): Rename to ...
4167         (kill_one_lwp_callback): ... this.  Use the new
4168         linux_kill_one_lwp.
4169
4170 2012-02-02  Pedro Alves  <palves@redhat.com>
4171
4172         * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
4173         inferior.
4174
4175 2012-01-27  Pedro Alves  <palves@redhat.com>
4176
4177         * linux-low.c (linux_child_pid_to_exec_file): Delete.
4178         (elf_64_file_p): Make static.
4179         (linux_pid_exe_is_elf_64_file): New.
4180         * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
4181         Delete declarations.
4182         (linux_pid_exe_is_elf_64_file): Declare.
4183         * linux-x86-low.c (x86_arch_setup): Use
4184         linux_pid_exe_is_elf_64_file.
4185
4186 2012-01-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
4187
4188         * linux-low.c (linux_wait_for_event_1): Rename to ...
4189         (linux_wait_for_event): ... here and merge it with former
4190         linux_wait_for_event - new variable wait_ptid, use it.
4191         (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
4192
4193 2012-01-23  Pedro Alves  <palves@redhat.com>
4194
4195         * server.c (main): Avoid yet another case of infinite loop while
4196         detaching/killing after a longjmp.
4197
4198 2012-01-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
4199
4200         Code cleanup.
4201         * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
4202
4203 2012-01-20  Ulrich Weigand  <ulrich.weigand@linaro.org>
4204
4205         * hostio.c (handle_readlink): New function.
4206         (handle_vFile): Call it to handle "vFile:readlink" packets.
4207
4208 2012-01-20  Pedro Alves  <palves@redhat.com>
4209             Ulrich Weigand  <ulrich.weigand@linaro.org>
4210
4211         * server.c (handle_v_requests): Only support vAttach and vRun to
4212         start multiple processes when in extended protocol mode.
4213
4214 2012-01-17  Pedro Alves  <palves@redhat.com>
4215
4216         * tracepoint.c (initialize_tracepoint): Use mmap instead of
4217         memalign plus mprotect to allocate the scratch buffer.
4218
4219 2012-01-13  Pedro Alves  <palves@redhat.com>
4220
4221         * server.c (attach_inferior): Clear `cont_thread'.
4222
4223 2012-01-13  Pedro Alves  <palves@redhat.com>
4224
4225         * server.c (main): Avoid infinite loop while detaching/killing
4226         after a longjmp.
4227
4228 2012-01-09  Doug Evans  <dje@google.com>
4229
4230         * server.c (start_inferior): Set last_ptid in --wrapper case.
4231
4232 2012-01-06  Yao Qi  <yao@codesourcery.com>
4233
4234         * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
4235         defined.
4236         [IN_PROCESS_AGENT] (debug_agent): New global variable.
4237
4238 2012-01-04  Yao Qi  <yao@codesourcery.com>
4239
4240         * tracepoint.c (cmd_qtdp): Print debug message
4241         for static tracepoint.
4242
4243 2012-01-04  Yao Qi  <yao@codesourcery.com>
4244
4245         * tracepoint.c (trace_vdebug): Differentiate debug message
4246         between gdbserver and IPA.
4247
4248 2012-01-03  Yao Qi  <yao@codesourcery.com>
4249
4250         * tracepoint.c (tracepoint_was_hit): Don't collect for
4251         static tracepoint.
4252
4253 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
4254
4255         * terminal.h: Reformat copyright header.
4256
4257 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
4258
4259         * server.c (gdbserver_version): Update copyright year.
4260         * gdbreplay.c (gdbreplay_version): Likewise.
4261
4262 2011-12-18  Jan Kratochvil  <jan.kratochvil@redhat.com>
4263
4264         * linux-low.c (linux_create_inferior): Put empty if clause for write.
4265
4266         Revert:
4267         2011-12-18  Hui Zhu  <teawater@gmail.com>
4268         * linux-low.c (linux_create_inferior): Save return value to ret.
4269
4270 2011-12-18  Hui Zhu  <teawater@gmail.com>
4271
4272         * linux-low.c (linux_create_inferior): Save return value to ret.
4273
4274 2011-12-16  Doug Evans  <dje@google.com>
4275
4276         * linux-low.c (linux_create_inferior): If stdio connection,
4277         redirect stdin from /dev/null, stdout to stderr.
4278         * remote-utils.c (remote_is_stdio): New static global.
4279         (remote_connection_is_stdio): New function.
4280         (remote_prepare): Handle stdio connection.
4281         (remote_open): Ditto.
4282         (remote_close): Don't close stdin for stdio connections.
4283         (read_prim,write_prim): New functions.  Replace all calls to
4284         read/write to these.
4285         * server.c (main): Watch for "-" argument.  Move call to
4286         remote_prepare before start_inferior.
4287         * server.h (STDIO_CONNECTION_NAME): New macro.
4288         (remote_connection_is_stdio): Declare.
4289
4290         * remote-utils.c (prepare_resume_reply): Remove extraneous \n
4291         in debugging output.
4292
4293 2011-12-15  Yao Qi  <yao@codesourcery.com>
4294
4295         * tracepoint.c: Include sys/syscall.h.
4296         (gdb_ust_thread): Remove preprocessor conditional.
4297
4298 2011-12-14  Pedro Alves  <pedro@codesourcery.com>
4299
4300         * linux-low.c (linux_detach_one_lwp): Call
4301         the_low_target.prepare_to_resume before detaching.
4302
4303 2011-12-14  Yao Qi  <yao@codesourcery.com>
4304
4305         * tracepoint.c (gdb_ust_thread): Don't ignore return value
4306         of write.
4307
4308 2011-12-14  Yao Qi  <yao@codesourcery.com>
4309
4310         * i386-low.c (i386_low_stopped_data_address): Initialize local
4311         variable `control'.
4312
4313 2011-12-13  Pedro Alves  <pedro@codesourcery.com>
4314
4315         PR remote/13492
4316
4317         * i386-low.c (i386_low_stopped_data_address): Avoid fetching
4318         DR_CONTROL unless necessary.  Extend comments.
4319         * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
4320         DR0-3 if not used.  If any watchpoint was set, clear DR_STATUS.
4321
4322 2011-12-13  Yao Qi  <yao@codesourcery.com>
4323
4324         * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
4325         macros.
4326         (upload_fast_traceframes, upload_fast_traceframes): Likewise.
4327
4328 2011-12-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
4329
4330         * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
4331         Print new debug message for such case.
4332
4333 2011-12-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
4334
4335         Fix overlapping memcpy.
4336         * mem-break.c (set_raw_breakpoint_at): New variable buf.  Use it for
4337         the read_inferior_memory transfer.
4338         (delete_fast_tracepoint_jump): New variable buf.  Use it for the
4339         write_inferior_memory transfer.
4340         (set_fast_tracepoint_jump): New variable buf.  Use it for the
4341         read_inferior_memory and write_inferior_memory transfers.
4342         (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
4343         (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
4344         Use it for the write_inferior_memory transfer.
4345         (check_mem_read, check_mem_write): New gdb_asserts for overlapping
4346         buffers.
4347
4348 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
4349
4350         * linux-low.c (fetch_register, store_register): Make code
4351         consistent, fix formatting.
4352
4353 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
4354
4355         * linux-low.c (usr_store_inferior_registers): Factor out code
4356         to handle individual registers into...
4357         (store_register): ... this new function.
4358
4359 2011-12-06  Ulrich Weigand  <uweigand@de.ibm.com>
4360
4361         * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
4362         (s390-linux32v2.o, s390-linux32v2.c): Likewise.
4363         (s390-linux64v1.o, s390-linux64v1.c): Likewise.
4364         (s390-linux64v2.o, s390-linux64v2.c): Likewise.
4365         (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
4366         (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
4367         * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
4368         (srv_xmlfiles): Add new XML files.
4369
4370         * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
4371         and <sys/uio.h>.
4372         (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
4373         (init_registers_s390_linux32v1): Add prototype.
4374         (init_registers_s390_linux32v2): Likewise.
4375         (init_registers_s390_linux64v1): Likewise.
4376         (init_registers_s390_linux64v2): Likewise.
4377         (init_registers_s390x_linux64v1): Likewise.
4378         (init_registers_s390x_linux64v2): Likewise.
4379         (s390_num_regs): Increment to 52.
4380         (s390_regmap): Add orig_r2 register.
4381         (s390_num_regs_3264): Increment to 68.
4382         (s390_regmap_3264): Add orig_r2 register.
4383         (s390_collect_ptrace_register): Handle orig_r2 register.
4384         (s390_supply_ptrace_register): Likewise.
4385         (s390_fill_last_break): New function.
4386         (s390_store_last_break): Likewise.
4387         (s390_fill_system_call): New function.
4388         (s390_store_system_call): Likewise.
4389         (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
4390         register sets.
4391         (s390_check_regset): New function.
4392         (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
4393         NT_S390_SYSTEM_CALL regsets and use appropriate description.
4394         Update target_regsets for available register sets.
4395
4396 2011-12-02  Paul Pluzhnikov  <ppluzhnikov@google.com>
4397             Jan Kratochvil  <jan.kratochvil@redhat.com>
4398
4399         * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
4400         (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
4401         New.
4402         (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
4403         * linux-low.h (struct process_info_private): New member r_debug.
4404         * server.c (handle_qxfer_libraries): Call
4405         the_target->qxfer_libraries_svr4.
4406         (handle_qxfer_libraries_svr4): New function.
4407         (qxfer_packets): New entry "libraries-svr4".
4408         (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
4409         * target.h (struct target_ops): New member qxfer_libraries_svr4.
4410         * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
4411         PACKET_qXfer_libraries_svr4.
4412
4413 2011-11-30  Ulrich Weigand  <uweigand@de.ibm.com>
4414
4415         * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
4416         PSW address/mask between 8-byte and 16-byte formats.
4417         (s390_supply_ptrace_register): Likewise.
4418         (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
4419         basic addressing mode bit.
4420
4421 2011-11-24  Stan Shebs  <stan@codesourcery.com>
4422
4423         * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
4424
4425 2011-11-17  Stan Shebs  <stan@codesourcery.com>
4426
4427         * tracepoint.c (struct tracepoint): New field traceframe_usage.
4428         (tracing_start_time): New global.
4429         (tracing_stop_time): New global.
4430         (tracing_user_name): New global.
4431         (tracing_notes): New global.
4432         (tracing_stop_note): New global.
4433         (cmd_qtstart): Set traceframe_usage, start_time.
4434         (stop_tracing): Set stop_time.
4435         (cmd_qtstatus): Report additional status.
4436         (cmd_qtp): New function.
4437         (handle_tracepoint_query): Call it.
4438         (cmd_qtnotes): New function.
4439         (handle_tracepoint_general_set): Call it.
4440         (get_timestamp): Rename from tsv_get_timestamp.
4441
4442 2011-11-14  Stan Shebs  <stan@codesourcery.com>
4443             Kwok Cheung Yeung  <kcy@codesourcery.com>
4444
4445         * linux-x86-low.c (small_jump_insn): New.
4446         (i386_install_fast_tracepoint_jump_pad): Add arguments for
4447         trampoline and error message, build a trampoline and issue a small
4448         jump instruction to it.
4449         (x86_install_fast_tracepoint_jump_pad): Add arguments for
4450         trampoline and error message.
4451         (x86_get_min_fast_tracepoint_insn_len): New.
4452         (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
4453         * linux-low.h (struct linux_target_ops): Add arguments to
4454         install_fast_tracepoint_jump_pad operation, add new operation.
4455         * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
4456         arguments.
4457         (linux_get_min_fast_tracepoint_insn_len): New function.
4458         (linux_target_op): Add new operation.
4459         * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
4460         (gdb_trampoline_buffer_end): Ditto.
4461         (gdb_trampoline_buffer_error): Ditto.
4462         (struct ipa_sym_addresses): Add fields for new IPA variables.
4463         (symbol_list): Add entries for new IPA variables.
4464         (struct tracepoint): Add fields to hold the address range of the
4465         trampoline used by the tracepoint.
4466         (trampoline_buffer_head): New static variable.
4467         (trampoline_buffer_tail): Ditto.
4468         (claim_trampoline_space): New function.
4469         (have_fast_tracepoint_trampoline_buffer): New function.
4470         (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
4471         structure.
4472         (install_fast_tracepoint): Ditto, also add error buffer argument.
4473         (cmd_qtminftpilen): New function.
4474         (handle_tracepoint_query): Add response to qTMinFTPILen packet.
4475         (fast_tracepoint_from_trampoline_address): New function.
4476         (fast_tracepoint_collecting): Handle trampoline as part of jump
4477         pad space.
4478         (set_trampoline_buffer_space): New function.
4479         (initialize_tracepoint): Initialize new IPA variables.
4480         * target.h (struct target_ops): Add arguments to
4481         install_fast_tracepoint_jump_pad operation, add new
4482         get_min_fast_tracepoint_insn_len operation.
4483         (target_get_min_fast_tracepoint_insn_len): New.
4484         (install_fast_tracepoint_jump_pad): Add arguments.
4485         * server.h (IPA_BUFSIZ): Define.
4486         * linux-i386-ipa.c: Include extra header files.
4487         (initialize_fast_tracepoint_trampoline_buffer): New function.
4488         (initialize_low_tracepoint): Call it.
4489         * server.h (set_trampoline_buffer_space): Declare.
4490         (claim_trampoline_space): Ditto.
4491         (have_fast_tracepoint_trampoline_buffer): Ditto.
4492
4493 2011-11-14  Yao Qi  <yao@codesourcery.com>
4494
4495         * server.c (handle_query): Handle InstallInTrace for qSupported.
4496         * tracepoint.c (add_tracepoint): Sort list.
4497         (install_tracepoint, download_tracepoint): New.
4498         (cmd_qtdp): Call them to install and download tracepoints.
4499         (sort_tracepoints): Removed.
4500         (cmd_qtstart): Update.
4501
4502 2011-11-14  Yao Qi  <yao@codesourcery.com>
4503
4504         * mem-break.c (inc_ref_fast_tracepoint_jump): New.
4505         * mem-break.h: Declare.
4506         * tracepoint.c (cmd_qtstart): Move some code to ...
4507         (clone_fast_tracepoint, install_fast_tracepoint): ... here.
4508         New.
4509         (download_tracepoints): Move some code to ...
4510         (download_tracepoint_1): ... here.  New.
4511
4512 2011-11-08  Yao Qi  <yao@codesourcery.com>
4513
4514         * remote-utils.c (relocate_instruction): A comment fix.
4515
4516 2011-11-07  Joel Brobecker  <brobecker@adacore.com>
4517
4518         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
4519         (i386_dr_low_get_control, i386_dr_low_get_status): Use
4520         dr_status_mirror and dr_control_mirror from debug_reg_state.
4521         (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
4522         (i386_initial_stuff): Remove use of deleted globals.
4523         (i386_get_thread_context, i386_set_thread_context,
4524         i386_thread_added): Use dr_status_mirror and dr_control_mirror
4525         from debug_reg_state.
4526
4527 2011-11-05  Yao Qi  <yao@codesourcery.com>
4528
4529         * tracepoint.c (gdb_collect): Loop over tracepoints of same
4530         address as TPOINT's.
4531
4532 2011-11-02  Stan Shebs  <stan@codesourcery.com>
4533
4534         * tracepoint.c (agent_mem_read_string): New function.
4535         (eval_agent_expr): Call it for tracenz.
4536         * server.c (handle_query): Report support for tracenz.
4537
4538 2011-11-02  Yao Qi  <yao@codesourcery.com>
4539
4540         * tracepoint.c (cmd_qtstart): Remove unused local variables.
4541
4542 2011-11-02  Yao Qi  <yao@codesourcery.com>
4543
4544         * target.h: Fix a typo in comment.
4545
4546 2011-10-31  Pedro Alves  <pedro@codesourcery.com>
4547
4548         * mem-break.c (check_mem_write): Add `myaddr' parameter.  Don't
4549         clobber the breakpoints' shadows with fast tracepoint jumps.
4550         * mem-break.h (check_mem_write): Add `myaddr' parameter.
4551         * target.c (write_inferior_memory): Also pass MYADDR down to
4552         check_mem_write.
4553
4554 2011-10-07  Ulrich Weigand  <ulrich.weigand@linaro.org>
4555
4556         * configure.ac: Check support for personality routine.
4557         * configure: Regenerate.
4558         * config.in: Likewise.
4559         * linux-low.c: Include <sys/personality.h>.
4560         Define ADDR_NO_RANDOMIZE if necessary.
4561         (linux_create_inferior): Disable address space randomization when
4562         forking inferior, if requested.
4563         (linux_supports_disable_randomization): New function.
4564         (linux_target_ops): Install it.
4565         * server.h (disable_randomization): Declare.
4566         * server.c (disable_randomization): New global variable.
4567         (handle_general_set): Handle QDisableRandomization.
4568         (handle_query): Likewise for qSupported.
4569         (main): Support --disable-randomization and --no-disable-randomization
4570         command line arguments.
4571         * target.h (struct target_ops): Add supports_disable_randomization.
4572         (target_supports_disable_randomization): New macro.
4573
4574 2011-09-29  Mike Frysinger  <vapier@gentoo.org>
4575
4576         * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
4577         ifdef check.
4578         [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
4579         [!PT_GETDSBT] (target_loadmap): New definition.
4580         (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
4581         (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
4582         LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
4583         and PT_GETDSBT to LINUX_LOADMAP.
4584         [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
4585         (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
4586
4587 2011-09-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
4588
4589         * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
4590         (arm_linux_hwbp_cap): New static variable.
4591         (arm_linux_get_hwbp_cap): Replace by ...
4592         (arm_linux_init_hwbp_cap): ... this new function.
4593         (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
4594         (arm_linux_get_hw_watchpoint_count): Likewise.
4595         (arm_linux_get_hw_watchpoint_max_length): Likewise.
4596         (arm_arch_setup): Call arm_linux_init_hwbp_cap.
4597         (arm_prepare_to_resume): Use perror_with_name instead of error.
4598
4599 2011-09-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
4600
4601         * linux-arm-low.c: Include <signal.h>.
4602         (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
4603         (struct arm_linux_hwbp_cap): New data type.
4604         (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
4605         (struct arm_linux_hw_breakpoint): New data type.
4606         (MAX_BPTS, MAX_WPTS): Define.
4607         (struct arch_process_info, struct arch_lwp_info): New data types.
4608         (arm_linux_get_hwbp_cap): New function.
4609         (arm_linux_get_hw_breakpoint_count): Likewise.
4610         (arm_linux_get_hw_watchpoint_count): Likewise.
4611         (arm_linux_get_hw_watchpoint_max_length): Likewise.
4612         (arm_hwbp_control_initialize): Likewise.
4613         (arm_hwbp_control_is_enabled): Likewise.
4614         (arm_hwbp_control_is_initialized): Likewise.
4615         (arm_hwbp_control_disable): Likewise.
4616         (arm_linux_hw_breakpoint_equal): Likewise.
4617         (arm_linux_hw_point_initialize): Likewise.
4618         (struct update_registers_data): New data structure.
4619         (update_registers_callback: New function.
4620         (arm_insert_point): Likewise.
4621         (arm_remove_point): Likewise.
4622         (arm_stopped_by_watchpoint): Likewise.
4623         (arm_stopped_data_address): Likewise.
4624         (arm_new_process): Likewise.
4625         (arm_new_thread): Likewise.
4626         (arm_prepare_to_resume): Likewise.
4627         (the_low_target): Register arm_insert_point, arm_remove_point,
4628         arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
4629         arm_new_thread, and arm_prepare_to_resume.
4630
4631 2011-09-15  Stan Shebs  <stan@codesourcery.com>
4632
4633         * server.h (struct emit_ops): Add compare-goto fields.
4634         * tracepoint.c (gdb_agent_op_sizes): New table.
4635         (emit_eq_goto): New function.
4636         (emit_ne_goto): New function.
4637         (emit_lt_goto): New function.
4638         (emit_le_goto): New function.
4639         (emit_gt_goto): New function.
4640         (emit_ge_goto): New function.
4641         (is_goto_target): New function.
4642         (compile_bytecodes): Recognize special cases of compare-goto
4643         combinations and call specialized emitters for them.
4644         * linux-x86-low.c (amd64_emit_eq_goto): New function.
4645         (amd64_emit_ne_goto): New function.
4646         (amd64_emit_lt_goto): New function.
4647         (amd64_emit_le_goto): New function.
4648         (amd64_emit_gt_goto): New function.
4649         (amd64_emit_ge_goto): New function.
4650         (amd64_emit_ops): Add the new functions.
4651         (i386_emit_eq_goto): New function.
4652         (i386_emit_ne_goto): New function.
4653         (i386_emit_lt_goto): New function.
4654         (i386_emit_le_goto): New function.
4655         (i386_emit_gt_goto): New function.
4656         (i386_emit_ge_goto): New function.
4657         (i386_emit_ops): Add the new functions.
4658
4659 2011-09-08  Stan Shebs  <stan@codesourcery.com>
4660
4661         * linux-x86-low.c (i386_emit_prologue): Save %ebx.
4662         (i386_emit_epilogue): Restore %ebx.
4663
4664 2011-08-31  Jie Zhang  <jzhang918@gmail.com>
4665
4666         * server.c (step_thread): Remove definition.
4667         (process_serial_event): Don't handle Hs.
4668         * server.h (step_thread): Remove declaration.
4669         * target.c (set_desired_inferior): Remove use of step_thread.
4670
4671 2011-08-24  Luis Machado  <lgustavo@codesourcery.com>
4672
4673         * linux-low.c: Include linux-procfs.h.
4674         (linux_attach_lwp_1): Update comments.
4675         (linux_attach): Scan for existing threads when attaching to a
4676         process that is the tgid.
4677         * Makefile.in: Update dependencies.
4678
4679 2011-08-24  Luis Machado  <lgustavo@codesourcery.com>
4680
4681         * configure.srv: Add linux-procfs.o dependencies.
4682
4683 2011-08-14  Yao Qi  <yao@codesourcery.com>
4684
4685         * target.h (struct target_ops): Fix indent.
4686         * win32-low.c (win32_target_ops): Fix comment.
4687
4688 2011-08-14  Andrew Jenner  <andrew@codesourcery.com>
4689             Yao Qi  <yao@codesourcery.com>
4690
4691         * Makefile.in (clean): Remove tic6x-*.c files.
4692         (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
4693         (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
4694         (tic6x-c64xp-linux.c): Likewise.
4695         * configure.srv: Add support for tic6x-*-uclinux.
4696         * linux-tic6x-low.c: New.
4697         * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
4698
4699 2011-08-14  Andrew Stubbs <ams@codesourcery.com>
4700             Yao Qi  <yao@codesourcery.com>
4701
4702         * target.h (struct target_ops): Add read_loadmap.
4703         * linux-low.c (struct target_loadseg): New type.
4704         (struct target_loadmap): New type.
4705         (linux_read_loadmap): New function.
4706         (linux_target_ops): Add linux_read_loadmap.
4707         * server.c (handle_query): Support qXfer:fdpic:read packet.
4708         * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
4709         to NULL.
4710
4711 2011-08-05  Eli Zaretskii  <eliz@gnu.org>
4712
4713         * win32-low.c: Include <stdint.h>.
4714
4715 2011-07-22  Pedro Alves  <pedro@codesourcery.com>
4716
4717         * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
4718         to the inferior here.
4719         (i386_remove_aligned_watchpoint): Ditto.
4720         (i386_handle_nonaligned_watchpoint): Return immediate on fail to
4721         fit part of the watchpoint in the debug registers.
4722         (i386_update_inferior_debug_regs): New.
4723         (i386_low_insert_watchpoint): Work on a local mirror of the debug
4724         registers, and only update the inferior on success.
4725         (i386_low_remove_watchpoint): Ditto.
4726
4727 2011-07-22  Kwok Cheung Yeung  <kcy@codesourcery.com>
4728
4729         * linux-low.c (compare_ints, unique, list_threads, show_process,
4730         linux_core_of_thread): Delete.
4731         (linux_target_ops): Change linux_core_of_thread to
4732         linux_common_core_of_thread.
4733         (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
4734         * utils.c (malloc_failure): Change type of argument.
4735         (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
4736         * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
4737         common/linux-osdata.c, common/ptid.c and common/buffer.c.
4738         (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
4739         (IPA_OBJS): Add common-utils-ipa.o.
4740         (ptid_h, linux_osdata_h): New macros.
4741         (server_h): Add common/common-utils.h, common/xml-utils.h,
4742         common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
4743         common/ptid.h.
4744         (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
4745         ptid.o, buffer.o): New rules.
4746         (linux-low.o): Add common/linux-osdata.h as a dependency.
4747         * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
4748         * configure.ac: Add AC_HEADER_DIRENT check.
4749         * config.in: Regenerate.
4750         * configure: Regenerate.
4751         * remote-utils.c (xml_escape_text): Delete.
4752         (buffer_grow, buffer_free, buffer_init, buffer_finish,
4753         buffer_xml_printf): Move to common/buffer.c.
4754         * server.c (main): Remove call to initialize_inferiors.
4755         * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
4756         ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
4757         ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
4758         internal_error, gdb_assert, gdb_assert_fail): Delete.
4759         (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
4760         buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
4761         common/buffer.h.
4762         * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
4763         ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
4764         initialize_inferiors): Delete.
4765
4766 2011-07-20  Pedro Alves  <pedro@codesourcery.com>
4767
4768         * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
4769         symbol error.
4770
4771 2011-05-31  Pedro Alves  <pedro@codesourcery.com>
4772
4773         * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
4774         assertion.
4775         * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
4776
4777 2011-05-26  Yao Qi  <yao@codesourcery.com>
4778
4779         * Makefile.in (thread-db.o): Track dependence to
4780         common/gdb_thread_db.h.
4781         * thread-db.c: include gdb_thread_db.h from right place.
4782
4783 2011-05-16  Adrian Cornish  <gnu@bluedreamer.com>
4784
4785         * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
4786         __FILE__ and __LINE__ to internal_error.
4787
4788 2011-05-13  Doug Evans  <dje@google.com>
4789
4790         * thread-db.c (try_thread_db_load_from_sdir): New function.
4791         (try_thread_db_load_from_dir): New function.
4792         (thread_db_load_search): Handle $sdir, ignore $pdir.
4793         Remove trying of system directories if search of
4794         libthread-db-search-path fails, that is now done via $sdir.
4795
4796 2011-05-12  Kwok Cheung Yeung  <kcy@codesourcery.com>
4797
4798         * server.c (handle_query): Add EnableDisableTracepoints to the list
4799         of supported features.
4800         * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
4801         tracepoints.
4802         (cmd_qtenable_disable): New.
4803         (cmd_qtstart): Install tracepoints even if disabled.
4804         (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
4805         receiving a QTEnable or QTDisable packet.
4806         (gdb_collect): Skip data collection if fast tracepoint is disabled.
4807         (ust_marker_to_static_tracepoint): Do not ignore disabled static
4808         tracepoints.
4809         (gdb_probe): Skip data collection if static tracepoint is disabled.
4810
4811 2011-05-10  Doug Evans  <dje@google.com>
4812
4813         * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
4814
4815 2011-05-04  Doug Evans  <dje@google.com>
4816
4817         * linux-low.c (linux_join): Skip process lookup.
4818         * spu-low.c (spu_join): Ditto.
4819         * server.c (join_inferiors_callback): Delete.
4820         (process_serial_event): For 'D' packet (detach) call join_inferior
4821         directly.
4822
4823 2011-05-04  Joseph Myers  <joseph@codesourcery.com>
4824
4825         * README: Don't mention xscale*-*-linux*.
4826         * configure.srv (xscale*-*-linux*): Don't handle target.
4827
4828 2011-04-27  Nathan Froyd  <froydnj@codesourcery.com>
4829
4830         * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
4831         casting pointers.
4832         (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
4833         (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
4834         (i386_emit_void_call_2): Likewise.
4835
4836 2011-04-26  Yao Qi  <yao@codesourcery.com>
4837
4838         * linux-low.c: Move common macros to linux-ptrace.h.
4839         Include linux-ptrace.h.
4840         * Makefile.in (linux_ptrace_h): New.
4841         (linux-low.o): Depends on linux-ptrace.h.
4842
4843 2011-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
4844
4845         * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
4846         RUN_ONCE.  Comment for the LISTEN_DESC delete_file_handler call.
4847         (remote_prepare): New function with most of the TCP code from ...
4848         (remote_open): ... here.  Detect PORT here unconditionally.  Move also
4849         setting transport_is_reliable.
4850         * server.c (run_once): New variable.
4851         (gdbserver_usage): Document it.
4852         (main): Set run_once for `--once'.  Call remote_prepare.  Exit after
4853         the first run if RUN_ONCE.
4854         * server.h (run_once, remote_prepare): New declarations.
4855
4856 2011-04-19  Tom Tromey  <tromey@redhat.com>
4857
4858         * win32-low.c (handle_load_dll): Remove duplicate "the".
4859
4860 2011-04-07  Pierre Muller  <muller@ics.u-strasbg.fr>
4861
4862         Remove support for old Cygwin 1.5 versions.
4863         * win32-low.c (win32_create_inferior): Use new cygwin_path_list
4864         function to avoid warning.
4865         (win32_add_one_solib): Use cygwin_conv_path function to avoid
4866         warning.
4867
4868 2011-03-18  Pierre Muller  <muller@ics.u-strasbg.fr>
4869
4870         * gdbserver/server.h (Macro _): Define it if not available.
4871
4872 2011-03-14  Michael Snyder  <msnyder@vmware.com>
4873
4874         * hostio.c (handle_close): Remove unnecessary null test.
4875
4876 2011-03-10  Joel Brobecker  <brobecker@adacore.com>
4877
4878         * Makefile.in (maintainer-clean realclean distclean): Remove
4879         "make ...  subdir_do" command.
4880
4881 2011-03-10  Michael Snyder  <msnyder@vmware.com>
4882
4883         * tracepoint.c (tracepoint_finish_step): Fix loop variable.
4884
4885         * server.c (handle_v_run): Free alloced buffer on early return.
4886
4887 2011-03-09  Yao Qi  <yao@codesourcery.com>
4888
4889         Revert:
4890         2011-03-04  Yao Qi  <yao@codesourcery.com>
4891
4892         * Makefile.in: Remove GNU make feature --directory.
4893
4894         2011-03-05  Yao Qi  <yao@codesourcery.com>
4895
4896         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
4897         (subdir_do): New make target.  Copied from gdb/Makefile.
4898         (maintainer-clean, realclean, distclean, clean): Call corresponding
4899         make targets in common/Makefile.
4900
4901         2011-02-11  Yao Qi  <yao@codesourcery.com>
4902
4903         * configure.ac: Call AC_PROG_RANLIB.
4904         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
4905         * configure: Regenerate.
4906
4907 2011-03-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
4908
4909         * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
4910
4911 2011-03-06  Yao Qi  <yao@codesourcery.com>
4912
4913         * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
4914
4915 2011-03-05  Yao Qi  <yao@codesourcery.com>
4916
4917         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
4918         (subdir_do): New make target.  Copied from gdb/Makefile.
4919         (maintainer-clean, realclean, distclean, clean): Call corresponding
4920         make targets in common/Makefile.
4921
4922 2011-03-04  Yao Qi  <yao@codesourcery.com>
4923
4924         * Makefile.in: Remove GNU make feature --directory.
4925
4926 2011-03-04  Michael Snyder  <msnyder@vmware.com>
4927
4928         * server.c (queue_stop_reply): Call xmalloc not malloc.
4929
4930 2011-03-02  Michael Snyder  <msnyder@vmware.com>
4931
4932         * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
4933
4934 2011-02-28  Michael Snyder  <msnyder@vmware.com>
4935
4936         * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
4937         (cmd_qtframe): Ditto.
4938         (cmd_qtbuffer): Ditto.
4939         (cmd_bigqtbuffer): Ditto.
4940
4941         * utils.c (decimal2str): Initialize 'width' to nine, then
4942         don't mess with it.
4943
4944 2011-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
4945
4946         * hostio.c (require_data): Free *data, not data.
4947
4948 2011-02-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
4949
4950         * hostio.c (require_data): Use free, not xfree.
4951
4952 2011-02-27  Michael Snyder  <msnyder@vmware.com>
4953
4954         * server.c (handle_query): Discard unused value.
4955
4956         * hostio.c (require_data): Free malloc memory before returning
4957         error.
4958
4959 2011-02-26  Michael Snyder  <msnyder@vmware.com>
4960
4961         * linux-low.c (list_threads): Call closedir for dirent.
4962
4963 2011-02-27  Michael Snyder  <msnyder@vmware.com>
4964
4965         * i386-low.c (i386-length_and_rw_bits): Comment the fact that
4966         a case statement falls through.
4967
4968         * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
4969
4970         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
4971         in comparison.
4972
4973 2011-02-26  Michael Snyder  <msnyder@vmware.com>
4974
4975         * utils.c (decimal2str): Eliminate dead code and dead param.
4976         (pulongest): Drop dead param from call to decimal2str.
4977         (plongest): Ditto.
4978
4979 2011-02-24  Joel Brobecker  <brobecker@adacore.com>
4980
4981         Revert the following patch (not approved yet):
4982         2011-02-21  Hui Zhu  <teawater@gmail.com>
4983         * tracepoint.c (tp_printf): New function.
4984         (eval_agent_expr): Handle gdb_agent_op_printf.
4985
4986 2011-02-21  Hui Zhu  <teawater@gmail.com>
4987
4988         * tracepoint.c (tp_printf): New function.
4989         (eval_agent_expr): Handle gdb_agent_op_printf.
4990
4991 2011-02-18  Tom Tromey  <tromey@redhat.com>
4992
4993         * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
4994         (tracepoint.o): Likewise.
4995         * tracepoint.c (enum gdb_agent_op): Use ax.def.
4996         (gdb_agent_op_names): Likewise.
4997
4998 2011-02-18  Tom Tromey  <tromey@redhat.com>
4999
5000         * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
5001         gdb_agent_op_rot>: New constants.
5002         (gdb_agent_op_names): Add pick and roll.
5003         (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
5004         cases.
5005
5006 2011-02-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
5007
5008         * aclocal.m4: Regenerated with aclocal-1.11.1.
5009
5010 2011-02-14  Pedro Alves  <pedro@codesourcery.com>
5011
5012         * server.c (handle_qxfer_traceframe_info): New.
5013         (qxfer_packets): Register "traceframe-info".
5014         (handle_query): Report support for qXfer:traceframe-info:read+.
5015         * tracepoint.c (match_blocktype): New.
5016         (traceframe_find_block_type): Rename to ...
5017         (traceframe_walk_blocks): ... this.  Add callback filter argument,
5018         and use it.
5019         (traceframe_find_block_type): New, reimplemented on top of
5020         traceframe_walk_blocks.
5021         (build_traceframe_info_xml): New.
5022         (traceframe_read_info): New.
5023         * server.h (traceframe_read_info): Declare.
5024
5025 2011-02-11  Yao Qi  <yao@codesourcery.com>
5026
5027         * configure.ac: Call AC_PROG_RANLIB.
5028         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
5029         * configure: Regenerate.
5030
5031 2011-02-07  Pedro Alves  <pedro@codesourcery.com>
5032
5033         * server.c (gdb_read_memory): Change return semantics to allow
5034         partial transfers.
5035         (handle_search_memory_1): Adjust.
5036         (process_serial_event) <'m' packet>: Handle partial transfers.
5037         * tracepoint.c (traceframe_read_mem): Handle partial transfers.
5038
5039 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
5040
5041         * regcache.c (init_register_cache): Initialize
5042         regcache->register_status.
5043         (free_register_cache): Release regcache->register_status.
5044         (regcache_cpy): Copy register_status.
5045         (registers_to_string): Print 'x's for unavailable registers.
5046         (supply_register): Mark the register's status valid or
5047         unavailable, depending on whether a buffer was passed in or not.
5048         (supply_register_zeroed): New.
5049         (supply_regblock): Mark the registers' status valid or
5050         unavailable, depending on whether a buffer was passed in or not.
5051         * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
5052         (struct regcache): New `register_status' field.
5053         (supply_register_zeroed): Declare.
5054         * i387-fp.c (i387_xsave_to_cache): Zero out registers using
5055         supply_register_zeroed, rather than passing a NULL buffer to
5056         supply_register.
5057         * tracepoint.c (fetch_traceframe_registers): Update comment.
5058
5059 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
5060
5061         * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
5062         buffer explicit.
5063
5064 2011-01-25  Pedro Alves  <pedro@codesourcery.com>
5065
5066         * server.h (decode_xfer_write): Change prototype.
5067         * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
5068         and don't extract the annex here.
5069         * server.c (decode_xfer_read): Remove `annex' parameter,
5070         and don't extract the annex here.
5071         (decode_xfer): New.
5072         (struct qxfer): New.
5073         (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
5074         (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
5075         (handle_qxfer_statictrace): New functions, abstracted out from
5076         handle_query, and made to use the struct qxfer interface.
5077         (handle_threads_qxfer_proper): Rename to ...
5078         (handle_qxfer_threads_proper): ... this.
5079         (handle_threads_qxfer): Rename to ...
5080         (handle_qxfer_threads): ... this.  Adjust.
5081         (qxfer_packets): New array.
5082         (handle_qxfer): New function.
5083         (handle_query): Use handle_qxfer.
5084
5085 2011-01-05  Michael Snyder  <msnyder@msnyder-server.eng.vmware.com>
5086
5087         * gdbreplay.c: Shorten lines of >= 80 columns.
5088         * linux-low.c: Ditto.
5089         * linux-ppc-low.c: Ditto.
5090         * linux-s390-low.c: Ditto.
5091         * linux-sparc-low.c: Ditto.
5092         * linux-x86-low.c: Ditto.
5093         * linux-xtensa-low.c: Ditto.
5094         * mem-break.c: Ditto.
5095         * nto-low.c: Ditto.
5096         * regcache.h: Ditto.
5097         * remote-utils.c: Ditto.
5098         * server.c: Ditto.
5099         * server.h: Ditto.
5100         * thread-db.c: Ditto.
5101         * tracepoint.c: Ditto.
5102         * utils.c: Ditto.
5103         * win32-low.h: Ditto.
5104
5105 2011-01-05  Joel Brobecker  <brobecker@adacore.com>
5106
5107         * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
5108         update.
5109
5110 2011-01-01  Joel Brobecker  <brobecker@adacore.com>
5111
5112         * server.c (gdbserver_version): Update copyright year in version
5113         output.
5114         * gdbreplay.c (gdbreplay_version): Ditto.
5115
5116 2010-12-29  Jie Zhang  <jie.zhang@analog.com>
5117
5118         * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
5119         * linux-bfin-low.c: New file.
5120         * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
5121         PT_DATA_ADDR for BFIN targets.
5122         * Makefile.in (SFILES): Add linux-bfin-low.c.
5123         (clean): Remove reg-bfin.c.
5124         (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
5125         * README: Mention supported Blackfin targets.
5126
5127 2010-12-23  Mike Frysinger  <vapier@gentoo.org>
5128
5129         * .gitignore: New file.
5130
5131 2010-11-16  Mike Frysinger  <vapier@gentoo.org>
5132
5133         * linux-low.c (linux_tracefork_child): Add char* cast to arg.
5134
5135 2010-10-22  Jie Zhang  <jie@codesourcery.com>
5136
5137         * Makefile.in: Add FLAGS_TO_PASS variable.
5138         (install): Remove dependency of install-only and recursively
5139         invoke make for install-only.
5140
5141 2010-10-04  Doug Evans  <dje@google.com>
5142
5143         * Makefile.in (uninstall): Use $(DESTDIR).
5144
5145 2010-09-24  Pedro Alves  <pedro@codesourcery.com>
5146
5147         PR gdb/11842
5148
5149         * linux-x86-low.c (compat_siginfo_from_siginfo)
5150         (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
5151         si_code is < 0.  Check for si_code == SI_TIMER before checking for
5152         si_code < 0.
5153
5154 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
5155
5156         * lynx-i386-low.c: New file.
5157         * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
5158
5159 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
5160
5161         * lynx-low.c (ptrace_request_to_str): Remove handling for
5162         request values that have been removed in LynxOS 5.x.
5163
5164 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
5165
5166         * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
5167         <ptrace.h>
5168
5169 2010-09-09  Nathan Sidwell  <nathan@codesourcery.com>
5170
5171         * configure.ac: Add --enable-inprocess-agent option.
5172         * configure: Rebuilt.
5173
5174 2010-09-06  Yao Qi  <yao@codesourcery.com>
5175
5176         * linux-low.c (linux_kill): Remove unused variable.
5177         (linux_stabilize_threads): Likewise.
5178         * server.c (start_inferior): Likewise.
5179         (queue_stop_reply_callback): Likewise.
5180         * tracepoint.c (do_action_at_tracepoint): Likewise.
5181
5182 2010-09-06  Yao Qi  <yao@codesourcery.com>
5183
5184         * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
5185         on return.
5186
5187 2010-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
5188
5189         * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
5190
5191 2010-09-06  Pedro Alves  <pedro@codesourcery.com>
5192
5193         * Makefile.in (install-only): Replace $IPA_DEPFILES with
5194         "$(IPA_DEPFILES)".
5195
5196 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
5197
5198         * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
5199         gdbserver/lynx-ppc-low.c: New files.
5200         * Makefile.in (lynx_low_h): New variable.
5201         (lynx-low.o, lynx-ppc-low.o): New rules.
5202         * configure.ac: On LynxOS, link with -lnetinet.
5203         * configure.srv: Add handling of powerpc-*-lynxos* targets.
5204         * configure: regenerate.
5205
5206 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
5207
5208         * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
5209         * configure.ac: Add check for vasprintf and vsnprintf.
5210         * configure, config.in: Regenerate.
5211         * server.h (vasprintf, vsnprintf): Add conditional declarations.
5212
5213 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
5214
5215         * gdbreplay.c: Move include of alloca.h up, next to include of
5216         malloc.h.
5217         * server.h: Add include of malloc.h.
5218         * mem-break.c: Remove include of malloc.h.
5219         * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
5220
5221 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
5222
5223         * Makefile.in (memmem.o): Build with -Wno-error.
5224
5225 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
5226
5227         * utils.c (xsnprintf): Make non-static.
5228         * server.h: Add xsnprintf declaration.
5229         * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
5230         replace calls to snprintf by calls to xsnprintf throughout.
5231
5232 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
5233
5234         * configure.ac: Add configure check for alloca.
5235         * configure, config.in: Regenerate.
5236         * server.h: Include alloca.h if it exists.
5237         * gdbreplay.c: Include alloca.h if it exists.
5238
5239 2010-08-28  Pedro Alves  <pedro@codesourcery.com>
5240
5241         * linux-low.c (__SIGRTMIN): Define if not already defined.
5242         (linux_create_inferior): Check for __ANDROID__ rather than
5243         __SIGRTMIN.
5244         (enqueue_one_deferred_signal): Don't requeue non-RT signals that
5245         are already deferred.
5246         (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
5247         (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
5248         stopped and already has a pending signal to report.
5249         (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
5250         a pending signal to report or is moving out of a jump pad.
5251         (linux_init_signals): Check for __ANDROID__ rather than
5252         __SIGRTMIN.
5253
5254 2010-08-28  Pedro Alves  <pedro@codesourcery.com>
5255
5256         * linux-low.c (linux_stabilize_threads): Wrap debug output in a
5257         debug_threads check.  Avoid a linear search when not doing debug
5258         output.
5259
5260 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
5261
5262         * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
5263         (struct gdb_event) <fd>: Change type to gdb_fildes_t.
5264         (struct file_handler) <fd>: Change type to gdb_fildes_t.
5265         (process_event): Change local fd's type to gdb_fildes_t.
5266         (create_file_handler): Adjust prototype.
5267         (delete_file_handler): Adjust prototype.
5268         (handle_file_event): Adjust prototype.  Use pfildes.
5269         (create_file_event): Adjsut prototype.
5270         * remote-utils.c (remote_desc, listen_desc): Change type to
5271         gdb_fildes_t.
5272         * server.h: New gdb_fildes_t typedef.
5273         [USE_WIN32API]: Include winsock2.h.
5274         (delete_file_handler, add_file_handler): Adjust prototypes.
5275         (pfildes): Declare.
5276         * utils.c (pfildes): New.
5277
5278 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
5279
5280         * configure.ac (build_warnings): Add -Wno-char-subscripts.
5281         * configure: Regenerate.
5282
5283 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
5284
5285         * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
5286         (linux_done_accessing_memory): ... this.
5287         (linux_target_ops): Adjust.
5288         * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
5289         * nto-low.c (nto_target_ops): Adjust comment.
5290         * server.c (gdb_read_memory, gdb_write_memory): Adjust.
5291         * spu-low.c (spu_target_ops): Adjust comment.
5292         * target.h (target_ops): Rename unprepare_to_access_memory field
5293         to done_accessing_memory.
5294         (unprepare_to_access_memory): Rename to ...
5295         (done_accessing_memory): ... this.
5296
5297 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
5298
5299         * linux-low.c (linux_prepare_to_access_memory): New.
5300         (linux_unprepare_to_access_memory): New.
5301         (linux_target_ops): Install them.
5302         * server.c (read_memory): Rename to ...
5303         (gdb_read_memory): ... this.  Use
5304         prepare_to_access_memory/prepare_to_access_memory.
5305         (write_memory): Rename to ...
5306         (gdb_write_memory): ... this.  Use
5307         prepare_to_access_memory/prepare_to_access_memory.
5308         (handle_search_memory_1): Adjust.
5309         (process_serial_event): Adjust.
5310         * target.h (struct target_ops): New fields
5311         prepare_to_access_memory and unprepare_to_access_memory.
5312         (prepare_to_access_memory, unprepare_to_access_memory): New.
5313         * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
5314         prepare_to_access_memory/prepare_to_access_memory.
5315         * nto-low.c (nto_target_ops): Adjust.
5316         * spu-low.c (spu_target_ops): Adjust.
5317         * win32-low.c (win32_target_ops): Adjust.
5318
5319 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
5320
5321         * Makefile.in (WARN_CFLAGS): Get it from configure.
5322         (WERROR_CFLAGS): New.
5323         (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
5324         * configure.ac: Introduce --enable-werror, which adds -Werror to
5325         the compiler command line.  Enabled by default.  Disable with
5326         --disable-werror.  Add -Wdeclaration-after-statement
5327         Wpointer-arith and -Wformat-nonliteral to warning flags.
5328         * configure: Regenerate.
5329
5330 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
5331
5332         * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
5333
5334 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
5335
5336         * gdbreplay.c (remote_error): New.
5337         (gdbchar): New.
5338         (expect): Use gdbchar.  Check for error reading from GDB.
5339         Clarify sync error output.
5340         (play): Check for errors writing to GDB.
5341         * linux-low.c (sigchld_handler): Really ignore `write' errors.
5342         * remote-utils.c (getpkt): Check for errors writing to the remote
5343         descriptor.
5344
5345 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
5346
5347         * linux-low.c (linux_wait_1): Move non-debugging code out of
5348         `debug_threads' control.
5349
5350 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
5351
5352         * linux-low.c (linux_wait_1): Don't set last_status here.
5353         * server.c (push_event, queue_stop_reply_callback): Assert we're
5354         not pushing a TARGET_WAITKIND_IGNORE event.
5355         (start_inferior, start_inferior, attach_inferior, handle_v_cont)
5356         (myresume, handle_target_event): Set the thread's last_resume_kind
5357         and last_status from the target returned status.
5358
5359 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
5360
5361         PR threads/10729
5362
5363         * linux-x86-low.c (update_debug_registers_callback): New.
5364         (i386_dr_low_set_addr): Use it.
5365         (i386_dr_low_get_addr): New.
5366         (i386_dr_low_set_control): Use update_debug_registers_callback.
5367         (i386_dr_low_get_control): New.
5368         (i386_dr_low_get_status): Adjust.
5369         * linux-low.c (linux_stop_lwp): New.
5370         * linux-low.h (linux_stop_lwp): Declare.
5371
5372         * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
5373         argument instead of a i386_debug_reg_state.
5374         (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
5375         a i386_debug_reg_state.
5376         (i386_insert_aligned_watchpoint): Adjust.
5377         (i386_remove_aligned_watchpoint): Adjust.
5378         (i386_low_stopped_data_address): Read the debug registers from the
5379         inferior instead of from the mirrors.
5380         * i386-low.h (struct i386_debug_reg_state): Extend comment.
5381         (i386_dr_low_get_addr): Declare.
5382         (i386_dr_low_get_control): Declare.
5383         (i386_dr_low_get_status): Change prototype.
5384
5385         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
5386         (i386_dr_low_get_addr): New.
5387         (i386_dr_low_get_control): New.
5388         (i386_dr_low_get_status): Adjust prototype.  Return
5389         dr_status_mirror.
5390         (i386_initial_stuff): Clear dr_status_mirror and
5391         dr_control_mirror.
5392         (i386_get_thread_context): Adjust.
5393         (i386_set_thread_context): Adjust.
5394         (i386_thread_added): Adjust.
5395
5396 2010-08-24  Pedro Alves  <pedro@codesourcery.com>
5397
5398         * linux-low.h (linux_thread_area): Delete declaration.
5399
5400 2010-08-11  Thomas Schwinge  <thomas@codesourcery.com>
5401
5402         * linux-low.c (linux_wait_1): Correctly return the ptid of the child
5403         after its termination.
5404
5405 2010-08-09  Pedro Alves  <pedro@codesourcery.com>
5406
5407         * linux-low.c (gdb_wants_lwp_stopped): Delete.
5408         (gdb_wants_all_stopped): Delete.
5409         (linux_wait_1): Don't call them.
5410         * server.c (handle_v_cont): Tag all threads as want-stopped.
5411         (gdb_wants_thread_stopped): Fix comments.  Tag the thread that
5412         stopped as "client-wants-stopped".
5413
5414 2010-07-31  Pedro Alves  <pedro@codesourcery.com>
5415
5416         * Makefile.in (signals_h): New.
5417         (server_h): Depend on it.
5418         (server.o): Don't depend on $(signals_def).
5419         (signals.o): Depend on $(signals_def).
5420
5421 2010-07-31  Jan Kratochvil  <jan.kratochvil@redhat.com>
5422
5423         * Makefile.in (signals_def): New.
5424         (server_h): Append include/gdb/signals.h and signals_def.
5425         (server.o): Append signals_def.
5426
5427 2010-07-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
5428
5429         * server.c (handle_target_event): Use target_signal_to_host for
5430         resume_info.sig initialization.
5431         * target.h (struct thread_resume) <sig>: New comment.
5432
5433 2010-07-20  Ozkan Sezer  <sezeroz@gmail.com>
5434
5435         * server.c (handle_query): strcpy() the returned string from paddress()
5436         instead of sprintf().
5437         * utils.c (paddress): Return phex_nz().
5438
5439 2010-07-07  Joel Brobecker  <brobecker@adacore.com>
5440
5441         * server.c (handle_v_cont): Call mourn_inferior if process
5442         just exited.
5443         (myresume): Likewise.
5444
5445 2010-07-01  Pedro Alves  <pedro@codesourcery.com>
5446
5447         Static tracepoints, and integration with UST.
5448
5449         * configure.ac: Handle --with-ust.  substitute ustlibs and ustinc.
5450         * mem-break.c (uninsert_all_breakpoints)
5451         (reinsert_all_breakpoints): New.
5452         * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
5453         * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
5454         (gdb_agent_ust_loaded, helper_thread_id)
5455         (gdb_agent_helper_thread_id): New macros.
5456         (struct ipa_sym_addresses): Add addr_ust_loaded,
5457         addr_helper_thread_id, addr_cmd_buf.
5458         (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
5459         (in_process_agent_loaded_ust): New.
5460         (write_e_ust_not_loaded): New.
5461         (maybe_write_ipa_ust_not_loaded): New.
5462         (struct collect_static_trace_data_action): New.
5463         (enum tracepoint_type) <static_tracepoint>: New.
5464         (struct tracepoint) <handle>: Mention static tracepoints.
5465         (struct static_tracepoint_ctx): New.
5466         (CMD_BUF_SIZE): New.
5467         (add_tracepoint_action): Handle static tracepoint actions.
5468         (unprobe_marker_at): New.
5469         (clear_installed_tracepoints): Handle static tracepoints.
5470         (cmd_qtdp): Handle static tracepoints.
5471         (probe_marker_at): New.
5472         (cmd_qtstart): Handle static tracepoints.
5473         (response_tracepoint): Handle static tracepoints.
5474         (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
5475         (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
5476         (get_context_regcache): Handle static tracepoints.
5477         (do_action_at_tracepoint): Handle static tracepoint actions.
5478         (traceframe_find_block_type): Handle static trace data blocks.
5479         (traceframe_read_sdata): New.
5480         (download_tracepoints): Download static tracepoint actions.
5481         [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
5482         (GDB_PROBE_NAME): New.
5483         (ust_ops): New.
5484         (GET_UST_SYM): New.
5485         (USTF): New.
5486         (dlsym_ust): New.
5487         (ust_marker_to_static_tracepoint): New.
5488         (gdb_probe): New.
5489         (collect_ust_data_at_tracepoint): New.
5490         (gdb_ust_probe): New.
5491         (UNIX_PATH_MAX, SOCK_DIR): New.
5492         (gdb_ust_connect_sync_socket): New.
5493         (resume_thread, stop_thread): New.
5494         (run_inferior_command): New.
5495         (init_named_socket): New.
5496         (gdb_ust_socket_init): New.
5497         (cstr_to_hexstr): New.
5498         (next_st): New.
5499         (first_marker, next_marker): New.
5500         (response_ust_marker): New.
5501         (cmd_qtfstm, cmd_qtsstm): New.
5502         (unprobe_marker_at, probe_marker_at): New.
5503         (cmd_qtstmat, gdb_ust_thread): New.
5504         (gdb_ust_init): New.
5505         (initialize_tracepoint_ftlib): Call gdb_ust_init.
5506         * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
5507         (ST_REGENTRY): New.
5508         (x86_64_st_collect_regmap): New.
5509         (X86_64_NUM_ST_COLLECT_GREGS): New.
5510         (AMD64_RIP_REGNUM): New.
5511         (supply_static_tracepoint_registers): New.
5512         * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
5513         (ST_REGENTRY): New.
5514         (i386_st_collect_regmap): New.
5515         (i386_NUM_ST_COLLECT_GREGS): New.
5516         (supply_static_tracepoint_registers): New.
5517         * server.c (handle_query): Handle qXfer:statictrace:read.
5518         <qSupported>: Report support for StaticTracepoints, and
5519         qXfer:statictrace:read features.
5520         * server.h (traceframe_read_sdata)
5521         (supply_static_tracepoint_registers): Declare.
5522         * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
5523         (unpack_varlen_hex): Include in IPA build.
5524         * Makefile.in (ustlibs, ustinc): New.
5525         (IPA_OBJS): Add remote-utils-ipa.o.
5526         ($(IPA_LIB)): Link -ldl and -lpthread.
5527         (UST_CFLAGS): New.
5528         (IPAGENT_CFLAGS): Add UST_CFLAGS.
5529         * config.in, configure: Regenerate.
5530
5531 2010-06-20  Ian Lance Taylor  <iant@google.com>
5532             Pedro Alves  <pedro@codesourcery.com>
5533
5534         * linux-x86-low.c (always_true): Delete.
5535         (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
5536         trying to fool the compiler with always_true.
5537
5538 2010-06-20  Pedro Alves  <pedro@codesourcery.com>
5539
5540         * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
5541         conditions in gdbserver.
5542
5543 2010-06-19  Ulrich Weigand  <uweigand@de.ibm.com>
5544
5545         * spu-low.c (spu_read_memory): Wrap around local store limit.
5546         (spu_write_memory): Likewise.
5547
5548 2010-06-15  Pedro Alves  <pedro@codesourcery.com>
5549
5550         * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
5551         (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
5552         LONGEST uses.
5553         * server.h (struct emit_ops): Replace int64_t uses with LONGEST
5554         uses.
5555         * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
5556         uses with LONGEST uses.
5557
5558 2010-06-14  Stan Shebs  <stan@codesourcery.com>
5559             Pedro Alves  <pedro@codesourcery.com>
5560
5561         Bytecode compiler.
5562
5563         * linux-x86-low.c: Include limits.h.
5564         (add_insns): New.
5565         (always_true): New.
5566         (EMIT_ASM): New.
5567         (EMIT_ASM32): New.
5568         (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
5569         (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
5570         (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
5571         (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
5572         (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
5573         (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
5574         (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
5575         (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
5576         (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
5577         (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
5578         (amd64_emit_void_call_2): New.
5579         (amd64_emit_ops): New.
5580         (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
5581         (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
5582         (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
5583         (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
5584         (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
5585         (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
5586         (i386_emit_goto, i386_write_goto_address, i386_emit_const)
5587         (i386_emit_call, i386_emit_reg, i386_emit_pop)
5588         (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
5589         (i386_emit_stack_adjust, i386_emit_int_call_1)
5590         (i386_emit_void_call_2): New.
5591         (i386_emit_ops): New.
5592         (x86_emit_ops): New.
5593         (the_low_target): Install x86_emit_ops.
5594         * server.h (struct emit_ops): New.
5595         (get_raw_reg_func_addr): Declare.
5596         (current_insn_ptr, emit_error): Declare.
5597         * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
5598         (set_trace_state_variable_value): New defines.
5599         (struct ipa_sym_addresses): New fields addr_get_raw_reg,
5600         addr_get_trace_state_variable_value and
5601         addr_set_trace_state_variable_value.
5602         (symbol_list): New fields for get_raw_reg,
5603         get_trace_state_variable_value and set_trace_state_variable_value.
5604         (condfn): New typedef.
5605         (struct tracepoint): New field `compiled_cond'.
5606         (do_action_at_tracepoint): Clear compiled_cond.
5607         (get_trace_state_variable_value, set_trace_state_variable_value):
5608         Export in the IPA.
5609         (condition_true_at_tracepoint): If there's a compiled condition,
5610         run that.
5611         (current_insn_ptr, emit_error): New globals.
5612         (struct bytecode_address): New.
5613         (get_raw_reg_func_addr): New.
5614         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
5615         (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
5616         (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
5617         (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
5618         (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
5619         (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
5620         (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
5621         (compile_tracepoint_condition, compile_bytecodes): New.
5622         * target.h (emit_ops): Forward declare.
5623         (struct target_ops): New field emit_ops.
5624         (target_emit_ops): New.
5625         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
5626         * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
5627         * linux-low.c (linux_emit_ops): New.
5628         (linux_target_ops): Install it.
5629         * linux-low.h (struct linux_target_ops): New field emit_ops.
5630
5631 2010-06-14  Ulrich Weigand  <uweigand@de.ibm.com>
5632
5633         * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
5634         * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
5635
5636 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
5637             Stan Shebs  <stan@codesourcery.com>
5638
5639         * Makefile.in (IPA_DEPFILES, extra_libraries): New.
5640         (all): Depend on $(extra_libraries).
5641         (install-only): Install the IPA.
5642         (IPA_OBJS, IPA_LIB): New.
5643         (clean): Remove the IPA lib.
5644         (IPAGENT_CFLAGS): New.
5645         (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
5646         (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
5647         (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
5648         * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
5649         * configure.ac: Check for atomic builtins support in the compiler.
5650         (IPA_DEPFILES, extra_libraries): Define.
5651         * configure.srv (ipa_obj): Add description.
5652         (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
5653         (i[34567]86-*-linux*): Set ipa_obj.
5654         (x86_64-*-linux*): Set ipa_obj.
5655         * linux-low.c (stabilizing_threads): New.
5656         (supports_fast_tracepoints): New.
5657         (linux_detach): Stabilize threads before detaching.
5658         (handle_tracepoints): Handle internal tracing breakpoints.  Assert
5659         the lwp is either not stabilizing, or is moving out of a jump pad.
5660         (linux_fast_tracepoint_collecting): New.
5661         (maybe_move_out_of_jump_pad): New.
5662         (enqueue_one_deferred_signal): New.
5663         (dequeue_one_deferred_signal): New.
5664         (linux_wait_for_event_1): If moving out of a jump pad, defer
5665         pending signals to later.
5666         (linux_stabilize_threads): New.
5667         (linux_wait_1): Check if threads need moving out of jump pads, and
5668         do it if so.
5669         (stuck_in_jump_pad_callback): New.
5670         (move_out_of_jump_pad_callback): New.
5671         (lwp_running): New.
5672         (linux_resume_one_lwp): Handle moving out of jump pads.
5673         (linux_set_resume_request): Dequeue deferred signals.
5674         (need_step_over_p): Also step over fast tracepoint jumps.
5675         (start_step_over): Also uninsert fast tracepoint jumps.
5676         (finish_step_over): Also reinsert fast tracepoint jumps.
5677         (linux_install_fast_tracepoint_jump): New.
5678         (linux_target_ops): Install linux_stabilize_threads and
5679         linux_install_fast_tracepoint_jump_pad.
5680         * linux-low.h (linux_target_ops) <get_thread_area,
5681         install_fast_tracepoint_jump_pad>: New fields.
5682         (struct lwp_info) <collecting_fast_tracepoint,
5683         pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
5684         (linux_get_thread_area): Declare.
5685         * linux-x86-low.c (jump_insn): New.
5686         (x86_get_thread_area): New.
5687         (append_insns): New.
5688         (push_opcode): New.
5689         (amd64_install_fast_tracepoint_jump_pad): New.
5690         (i386_install_fast_tracepoint_jump_pad): New.
5691         (x86_install_fast_tracepoint_jump_pad): New.
5692         (the_low_target): Install x86_get_thread_area and
5693         x86_install_fast_tracepoint_jump_pad.
5694         * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
5695         (struct fast_tracepoint_jump): New.
5696         (fast_tracepoint_jump_insn): New.
5697         (fast_tracepoint_jump_shadow): New.
5698         (find_fast_tracepoint_jump_at): New.
5699         (fast_tracepoint_jump_here): New.
5700         (delete_fast_tracepoint_jump): New.
5701         (set_fast_tracepoint_jump): New.
5702         (uninsert_fast_tracepoint_jumps_at): New.
5703         (reinsert_fast_tracepoint_jumps_at): New.
5704         (set_breakpoint_at): Use write_inferior_memory.
5705         (uninsert_raw_breakpoint): Use write_inferior_memory.
5706         (check_mem_read): Mask out fast tracepoint jumps.
5707         (check_mem_write): Mask out fast tracepoint jumps.
5708         * mem-break.h (struct fast_tracepoint_jump): Forward declare.
5709         (set_fast_tracepoint_jump): Declare.
5710         (delete_fast_tracepoint_jump)
5711         (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
5712         (reinsert_fast_tracepoint_jumps_at): Declare.
5713         * regcache.c: Don't compile many functions when building the
5714         in-process agent library.
5715         (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
5716         the register buffer in the heap.
5717         (free_register_cache): If the register buffer isn't owned by the
5718         regcache, don't free it.
5719         (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
5720         pre-existing register caches.
5721         * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
5722         type.
5723         (convert_ascii_to_int): : Constify `from' parameter type.
5724         (decode_M_packet, decode_X_packet): Replace the `to' parameter by
5725         a `to_p' pointer to pointer parameter.  If TO_P is NULL, malloc
5726         the needed buffer in-place.
5727         (relocate_instruction): New.
5728         * server.c (handle_query) <qSymbols>: If the target supports
5729         tracepoints, give it a chance of looking up symbols.  Report
5730         support for fast tracepoints.
5731         (handle_status): Stabilize threads.
5732         (process_serial_event): Adjust.
5733         * server.h (struct fast_tracepoint_jump): Forward declare.
5734         (struct process_info) <fast_tracepoint_jumps>: New field.
5735         (convert_ascii_to_int, convert_int_to_ascii): Adjust.
5736         (decode_X_packet, decode_M_packet): Adjust.
5737         (relocate_instruction): Declare.
5738         (in_process_agent_loaded): Declare.
5739         (tracepoint_look_up_symbols): Declare.
5740         (struct fast_tpoint_collect_status): Declare.
5741         (fast_tracepoint_collecting): Declare.
5742         (force_unlock_trace_buffer): Declare.
5743         (handle_tracepoint_bkpts): Declare.
5744         (initialize_low_tracepoint)
5745         (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
5746         * target.h (struct target_ops) <stabilize_threads,
5747         install_fast_tracepoint_jump_pad>: New fields.
5748         (stabilize_threads, install_fast_tracepoint_jump_pad): New.
5749         * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
5750         [HAVE_STDINT_H]: Include stdint.h.
5751         (trace_debug_1): Rename to ...
5752         (trace_vdebug): ... this.
5753         (trace_debug): Rename to ...
5754         (trace_debug_1): ... this.  Add `level' parameter.
5755         (trace_debug): New.
5756         (ATTR_USED, ATTR_NOINLINE): New.
5757         (IP_AGENT_EXPORT): New.
5758         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5759         (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
5760         (about_to_request_buffer_space, trace_buffer_is_full)
5761         (stopping_tracepoint, expr_eval_result, error_tracepoint)
5762         (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
5763         (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
5764         (traceframe_write_count, traceframes_created)
5765         (trace_state_variables)
5766         New renaming defines.
5767         (struct ipa_sym_addresses): New.
5768         (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
5769         (symbol_list): New.
5770         (ipa_sym_addrs): New.
5771         (all_tracepoint_symbols_looked_up): New.
5772         (in_process_agent_loaded): New.
5773         (write_e_ipa_not_loaded): New.
5774         (maybe_write_ipa_not_loaded): New.
5775         (tracepoint_look_up_symbols): New.
5776         (debug_threads) [IN_PROCESS_AGENT]: New.
5777         (read_inferior_memory) [IN_PROCESS_AGENT]: New.
5778         (UNKNOWN_SIDE_EFFECTS): New.
5779         (stop_tracing): New.
5780         (flush_trace_buffer): New.
5781         (stop_tracing_bkpt): New.
5782         (flush_trace_buffer_bkpt): New.
5783         (read_inferior_integer): New.
5784         (read_inferior_uinteger): New.
5785         (read_inferior_data_pointer): New.
5786         (write_inferior_data_pointer): New.
5787         (write_inferior_integer): New.
5788         (write_inferior_uinteger): New.
5789         (struct collect_static_trace_data_action): Delete.
5790         (enum tracepoint_type): New.
5791         (struct tracepoint) <type>: New field `type'.
5792         <actions_str, step_actions, step_actions_str>: Only include in
5793         GDBserver.
5794         <orig_size, obj_addr_on_target, adjusted_insn_addr>
5795         <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
5796         (tracepoints): Use IP_AGENT_EXPORT.
5797         (last_tracepoint): Don't include in the IPA.
5798         (stopping_tracepoint): Use IP_AGENT_EXPORT.
5799         (trace_buffer_is_full): Use IP_AGENT_EXPORT.
5800         (alloced_trace_state_variables): New.
5801         (trace_state_variables): Use IP_AGENT_EXPORT.
5802         (traceframe_t): Delete unused variable.
5803         (circular_trace_buffer): Don't include in the IPA.
5804         (trace_buffer_start): Delete.
5805         (struct trace_buffer_control): New.
5806         (trace_buffer_free): Delete.
5807         (struct ipa_trace_buffer_control): New.
5808         (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
5809         (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
5810         New.
5811         (trace_buffer_ctrl): New.
5812         (TRACE_BUFFER_CTRL_CURR): New.
5813         (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
5814         Reimplement as macros.
5815         (trace_buffer_wrap): Delete.
5816         (traceframe_write_count, traceframe_read_count)
5817         (traceframes_created, tracing): Use IP_AGENT_EXPORT.
5818         (struct tracepoint_hit_ctx) <type>: New field.
5819         (struct fast_tracepoint_ctx): New.
5820         (memory_barrier): New.
5821         (cmpxchg): New.
5822         (record_tracepoint_error): Update atomically in the IPA.
5823         (clear_inferior_trace_buffer): New.
5824         (about_to_request_buffer_space): New.
5825         (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
5826         updating the same buffer.
5827         (add_tracepoint): Default the tracepoint's type to trap
5828         tracepoint, and orig_size to -1.
5829         (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
5830         internal variables.
5831         (create_trace_state_variable): New parameter `gdb'.  Handle it.
5832         (clear_installed_tracepoints): Clear fast tracepoint jumps.
5833         (cmd_qtdp): Handle fast tracepoints.
5834         (cmd_qtdv): Adjust.
5835         (max_jump_pad_size): New.
5836         (gdb_jump_pad_head): New.
5837         (get_jump_space_head): New.
5838         (claim_jump_space): New.
5839         (sort_tracepoints): New.
5840         (MAX_JUMP_SIZE): New.
5841         (cmd_qtstart): Handle fast tracepoints.  Sync tracepoints with the
5842         IPA.
5843         (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
5844         support.  Upload fast traceframes, and delete internal IPA
5845         breakpoints.
5846         (stop_tracing_handler): New.
5847         (flush_trace_buffer_handler): New.
5848         (cmd_qtstop): Upload fast tracepoints.
5849         (response_tracepoint): Handle fast tracepoints.
5850         (tracepoint_finished_step): Upload fast traceframes.  Set the
5851         tracepoint hit context's tracepoint type.
5852         (handle_tracepoint_bkpts): New.
5853         (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
5854         type.  Add comment about fast tracepoints.
5855         (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
5856         non-existing action_str field.
5857         (get_context_regcache): Handle fast tracepoints.
5858         (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
5859         to the regcache.
5860         (fast_tracepoint_from_jump_pad_address): New.
5861         (fast_tracepoint_from_ipa_tpoint_address): New.
5862         (collecting_t): New.
5863         (force_unlock_trace_buffer): New.
5864         (fast_tracepoint_collecting): New.
5865         (collecting): New.
5866         (gdb_collect): New.
5867         (write_inferior_data_ptr): New.
5868         (target_tp_heap): New.
5869         (target_malloc): New.
5870         (download_agent_expr): New.
5871         (UALIGN): New.
5872         (download_tracepoints): New.
5873         (download_trace_state_variables): New.
5874         (upload_fast_traceframes): New.
5875         (IPA_FIRST_TRACEFRAME): New.
5876         (IPA_NEXT_TRACEFRAME_1): New.
5877         (IPA_NEXT_TRACEFRAME): New.
5878         [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
5879         [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
5880         (gdb_jump_pad_buffer_end): New.
5881         [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
5882         (initialize_tracepoint): Adjust.
5883         [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
5884         buffer.  Initialize the low module.
5885         * utils.c (PREFIX, TOOLNAME): New.
5886         (malloc_failure): Use PREFIX.
5887         (error): In the IPA, an error causes an exit.
5888         (fatal, warning): Use PREFIX.
5889         (internal_error): Use TOOLNAME.
5890         (NUMCELLS): Increase to 10.
5891         * configure, config.in: Regenerate.
5892
5893 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
5894
5895         * server.c (handle_query) <qSupported>: Do two passes over the
5896         qSupported string to avoid nesting strtok.
5897
5898 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
5899
5900         * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
5901         (CDEPS): New.
5902         * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping.  Test also
5903         -Wl,--dynamic-list.
5904         * configure: Regenerate.
5905         * proc-service.list: New.
5906
5907 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
5908
5909         * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
5910         New comment.
5911
5912 2010-05-26  Ozkan Sezer  <sezeroz@gmail.com>
5913
5914         * gdbreplay.c (remote_open): Check error return from socket() call by
5915         its equality to -1 not by it being negative.
5916         * remote-utils.c (remote_open): Likewise.
5917
5918 2010-05-23  Pedro Alves  <pedro@codesourcery.com>
5919
5920         * config.h: Regenerate.
5921
5922 2010-05-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
5923
5924         * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
5925         doesn't provide PTRACE_GET_THREAD_AREA.
5926
5927 2010-05-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
5928
5929         * linux-m68k-low.c: Include <asm/ptrace.h>
5930         (ps_get_thread_area): Implement.
5931
5932 2010-05-03  Doug Evans  <dje@google.com>
5933
5934         * event-loop.c (struct callback_event): New struct.
5935         (callback_list): New global.
5936         (append_callback_event, delete_callback_event): New functions.
5937         (process_callback): New function.
5938         (start_event_loop): Call it.
5939         * remote-utils.c (NOT_SCHEDULED): Define.
5940         (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
5941         moved out of readchar.
5942         (readchar): Rewrite.  Call reschedule before returning.
5943         (reset_readchar): New function.
5944         (remote_close): Call it.
5945         (process_remaining, reschedule): New functions.
5946         * server.h (callback_handler_func): New typedef.
5947         (append_callback_event, delete_callback_event): Declare.
5948
5949 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
5950
5951         * proc-service.c (ps_pglobal_lookup): Use
5952         thread_db_look_up_one_symbol.
5953         * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
5954         parameter.  Use it instead of all_symbols_looked_up.
5955         * server.h (struct process_info) <all_symbols_looked_up>: Delete
5956         field.
5957         (all_symbols_looked_up): Don't declare.
5958         (look_up_one_symbol): Add new `may_ask_gdb' parameter.
5959         * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
5960         field.
5961         (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
5962         Set all_symbols_looked_up here.
5963         (thread_db_look_up_one_symbol): New.
5964         (thread_db_get_tls_address): Adjust.
5965         (thread_db_load_search, try_thread_db_load_1): Always allocate the
5966         thread_db object on the heap, and tentatively set it in the
5967         process structure.
5968         (thread_db_init): Don't set all_symbols_looked_up here.
5969         * linux-low.h (thread_db_look_up_one_symbol): Declare.
5970
5971 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
5972
5973         * linux-low.c (linux_kill, linux_detach): Adjust.
5974         (status_pending_p_callback): Remove redundant statement.  Check
5975         for !TARGET_WAITIKIND_IGNORE, instead of
5976         TARGET_WAITKIND_STOPPED.
5977         (handle_tracepoints): Make sure LWP is locked.  Adjust.
5978         (linux_wait_for_event_1): Adjust.
5979         (linux_cancel_breakpoints): New.
5980         (unsuspend_one_lwp): New.
5981         (unsuspend_all_lwps): New.
5982         (linux_wait_1): If finishing a step-over, unsuspend all lwps.
5983         (send_sigstop_callback): Change return type to int, add new
5984         `except' parameter and handle it.
5985         (suspend_and_send_sigstop_callback): New.
5986         (stop_all_lwps): Add new `suspend' and `expect' parameters, and
5987         pass them down.  If SUSPEND, also increment the lwp's suspend
5988         count.
5989         (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
5990         (need_step_over_p): Don't consider suspended LWPs.
5991         (start_step_over): Adjust.
5992         (proceed_one_lwp): Change return type to int, add new `except'
5993         parameter and handle it.
5994         (unsuspend_and_proceed_one_lwp): New.
5995         (proceed_all_lwps): Use find_inferior instead of
5996         for_each_inferior.
5997         (unstop_all_lwps): Add `unsuspend' parameter.  If UNSUSPEND, them
5998         also decrement the suspend count of LWPs.  Pass `except' down,
5999         instead of hacking its suspend count.
6000         (linux_pause_all): Add `freeze' parameter.  Adjust.
6001         (linux_unpause_all): New.
6002         (linux_target_ops): Install linux_unpause_all.
6003         * server.c (handle_status): Adjust.
6004         * target.h (struct target_ops): New fields `unpause_all' and
6005         `cancel_breakpoints'.  Add new parameter to `pause_all'.
6006         (pause_all): Add new `freeze' parameter.
6007         (unpause_all): New.
6008         (cancel_breakpoints): New.
6009         * tracepoint.c (clear_installed_tracepoints): Pause threads, and
6010         cancel breakpoints.
6011         (cmd_qtstart): Pause threads.
6012         (stop_tracing): Pause threads, and cancel breakpoints.
6013         * win32-low.c (win32_target_ops): Adjust.
6014
6015 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
6016
6017         * linux-low.c (linux_wait_for_event_1): Move passing the signal to
6018         the inferior right away from here...
6019         (linux_wait_1): ... to here, and adjust to check the thread's
6020         last_resume_kind instead of the lwp's step or stop_expected flags.
6021
6022 2010-05-02  Pedro Alves  <pedro@codesourcery.com>
6023
6024         * README: Use consistent `GDB' and `GDBserver' spellings.
6025
6026 2010-05-02  Pedro Alves  <pedro@codesourcery.com>
6027
6028         * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
6029         (linux_kill): Stop all lwps here.  Don't delete the main lwp here.
6030         (linux_detach_one_lwp): Assume the lwp is stopped.
6031         (any_thread_of): Delete.
6032         (linux_detach): Stop all lwps here.  Don't blindly delete all
6033         breakpoints.
6034         (delete_lwp_callback): New.
6035         (linux_mourn): Delete all lwps of the process that is gone.
6036         (linux_wait_1): Don't delete the last lwp of the process here.
6037         * mem-break.h (mark_breakpoints_out): Declare.
6038         * mem-break.c (mark_breakpoints_out): New.
6039         (free_all_breakpoints): Use it.
6040         * server.c (handle_target_event): If the process is gone, mark
6041         breakpoints out.
6042         * thread-db.c (struct thread_db) <create_bp>: New field.
6043         (thread_db_enable_reporting): Fix prototype.  Store a thread event
6044         breakpoint reference in the thread_db struct.
6045         (thread_db_load_search): Clear the thread_db object.
6046         (try_thread_db_load_1): Ditto.
6047         (switch_to_process): New.
6048         (disable_thread_event_reporting): Use it.
6049         (remove_thread_event_breakpoints): New.
6050         (thread_db_detach, thread_db_mourn): Use it.
6051
6052 2010-05-01  Pedro Alves  <pedro@codesourcery.com>
6053
6054         * linux-low.c (linux_enable_event_reporting): New.
6055         (linux_wait_for_event_1, handle_extended_wait): Use it.
6056
6057 2010-04-30  Pedro Alves  <pedro@codesourcery.com>
6058
6059         * linux-low.c (linux_kill_one_lwp, linux_kill)
6060         (linux_detach_one_lwp): Adjust to send_sigstop interface change.
6061         (send_sigstop): Take an lwp_info as parameter instead.  Queue a
6062         SIGSTOP even if the LWP is stopped.
6063         (send_sigstop_callback): New.
6064         (stop_all_lwps): Use send_sigstop_callback instead.
6065         (linux_resume_one_thread): Adjust.
6066         (proceed_one_lwp): Still proceed an LWP that the client has
6067         requested to stop, if we haven't reported it as stopped yet.  Make
6068         sure that LWPs the client want stopped, have a pending SIGSTOP.
6069
6070 2010-04-26  Doug Evans  <dje@google.com>
6071
6072         * server.c (handle_general_set): Make static.
6073
6074         * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
6075         Print received char after testing for error/eof instead of before.
6076         (input_interrupt): Tweak comment.
6077
6078 2010-04-23  Doug Evans  <dje@google.com>
6079
6080         * server.c (start_inferior): Print inferior argv if --debug.
6081
6082 2010-04-21  Aleksandar Ristovski  <aristovski@qnx.com>
6083
6084         * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
6085         * nto-x86-low.c: Include server.h
6086
6087 2010-04-20  Pierre Muller  <muller@ics.u-strasbg.fr>
6088
6089         * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
6090         be consistent with other sources of this directory.
6091         (init_registers_amd64): Correct name of source file of this function
6092         in the comment.
6093
6094 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
6095
6096         * configure.srv (x86_64-*-mingw*): New configuration for Windows
6097         64-bit executables.
6098
6099 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
6100
6101         * win32-i386-low.c: Add 64-bit support.
6102         (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
6103         (init_registers_amd64): Declare.
6104         (mappings): Add 64-bit version of array.
6105         (init_windows_x86): New function.
6106         (the_low_target): Change init_arch field to init_windows_x86.
6107
6108 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
6109
6110         * win32-low.c: Adapt to support also 64-bit architecture.
6111         (child_xfer_memory): Use uintptr_t type for local variable `addr'.
6112         (get_image_name): Use SIZE_T type for local variable `done'.
6113         (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
6114         (toolhelp_get_dll_name): Idem.
6115         (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
6116         Use uintptr_t typecast to avoid warning.
6117         (handle_unload_dll): Use uintptr_t typecast to avoid warning.
6118         (handle_exception): Use phex_nz to avoid warning.
6119         (win32_wait): Remove unused local variable `process'.
6120
6121 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
6122
6123         * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
6124         `amd64-avx.o'.
6125
6126 2010-04-17  Pierre Muller  <muller@ics.u-strasbg.fr>
6127
6128         * configure.ac: Use `ws2_32' library for srv_mingw.
6129         * configure: Regenerate.
6130         * gdbreplay.c: Include winsock2.h instead of winsock.h.
6131         * remote-utils.c: Likewise.
6132
6133 2010-04-17  H.J. Lu  <hongjiu.lu@intel.com>
6134
6135         * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
6136         if __x86_64__ is defined.
6137
6138 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
6139
6140         * configure: Regenerate.
6141
6142 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
6143
6144         * server.c (handle_query): Handle 'qGetTIBAddr' query.
6145         * target.h (target_ops): New get_tib_address field.
6146         * win32-low.h (win32_thread_info): Add thread_local_base field.
6147         * win32-low.c (child_add_thread): Add tlb argument.
6148         Set thread_local_base field to TLB.
6149         (get_child_debug_event): Adapt to child_add_thread change.
6150         (win32_get_tib_address): New function.
6151         (win32_target_ops): Set get_tib_address field to
6152         win32_get_tib_address.
6153         * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
6154
6155 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
6156
6157         * linux-low.c (linux_mourn): Also remove the process.
6158         * server.c (handle_target_event): Don't remove the process here.
6159         * nto-low.c (nto_mourn): New.
6160         (nto_target_ops): Install it.
6161         * spu-low.c (spu_mourn): New.
6162         (spu_target_ops): Install it.
6163         * win32-low.c (win32_mourn): New.
6164         (win32_target_ops): Install it.
6165
6166 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
6167
6168         * server.h (buffer_xml_printf): Remove redundant `;'.
6169
6170 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
6171
6172         * regcache.c (set_register_cache): Invalidate regcaches before
6173         changing the register cache layout.
6174         (regcache_invalidate_one): Allow a NULL regcache.
6175         * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
6176         regcaches before changing the register cache layout or the target
6177         regsets.
6178
6179 2010-04-12  H.J. Lu  <hongjiu.lu@intel.com>
6180
6181         * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
6182         variable warning on Linux/x86-64.
6183
6184 2010-04-11  Pedro Alves  <pedro@codesourcery.com>
6185
6186         GDBserver disconnected tracing support.
6187
6188         * linux-low.c (linux_remove_process): Delete.
6189         (add_lwp): Don't set last_resume_kind here.
6190         (linux_kill): Use `mourn'.
6191         (linux_detach): Use `thread_db_detach', and `mourn'.
6192         (linux_mourn): New.
6193         (linux_attach_lwp_1): Adjust comment.
6194         (linux_attach): last_resume_kind moved the thread_info; adjust.
6195         (status_pending_p_callback): Adjust.
6196         (linux_wait_for_event_1): Adjust.
6197         (count_events_callback, select_singlestep_lwp_callback)
6198         (select_event_lwp_callback, cancel_breakpoints_callback)
6199         (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
6200         (proceed_one_lwp): Adjust.
6201         (linux_async): Add debug output.
6202         (linux_thread_stopped): New.
6203         (linux_pause_all): New.
6204         (linux_target_ops): Install linux_mourn, linux_thread_stopped and
6205         linux_pause_all.
6206         * linux-low.h (struct lwp_info): Delete last_resume_kind field.
6207         (thread_db_free): Delete declaration.
6208         (thread_db_detach, thread_db_mourn): Declare.
6209         * thread-db.c (thread_db_init): Use thread_db_mourn.
6210         (thread_db_free): Delete, split in two.
6211         (disable_thread_event_reporting): New.
6212         (thread_db_detach): New.
6213         (thread_db_mourn): New.
6214
6215         * server.h (struct thread_info) <last_resume_kind>: New field.
6216         <attached>: Add comment.
6217         <gdb_detached>: New field.
6218         (handler_func): Change return type to int.
6219         (handle_serial_event, handle_target_event): Ditto.
6220         (gdb_connected): Declare.
6221         (tracing): Delete.
6222         (disconnected_tracing): Declare.
6223         (stop_tracing): Declare.
6224
6225         * server.c (handle_query) <qSupported>: Report support for
6226         disconnected tracing.
6227         (queue_stop_reply_callback): Account for running threads.
6228         (gdb_wants_thread_stopped): New.
6229         (gdb_wants_all_threads_stopped): New.
6230         (gdb_reattached_process): New.
6231         (handle_status): Clear the `gdb_detached' flag of all processes.
6232         In all-stop, stop all threads.
6233         (main): Be sure to leave tfind mode.  Handle disconnected tracing.
6234         (process_serial_event): If the remote connection breaks, or if an
6235         exit was forced with "monitor exit", force an event loop exit.
6236         Handle disconnected tracing on detach.
6237         (handle_serial_event): Adjust.
6238         (handle_target_event): If GDB isn't connected, forward events back
6239         to the inferior, unless the last process exited, in which case,
6240         exit gdbserver.  Adjust interface.
6241
6242         * remote-utils.c (remote_open): Don't block in accept.  Instead
6243         register an event loop source on the listen socket file
6244         descriptor.  Refactor bits into ...
6245         (listen_desc): ... this new global.
6246         (gdb_connected): ... this new function.
6247         (enable_async_notification): ... this new function.
6248         (handle_accept_event): ... this new function.
6249         (remote_close): Clear remote_desc.
6250
6251         * inferiors.c (add_thread): Set the new thread's last_resume_kind.
6252
6253         * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
6254         New fields.
6255         (mourn_inferior): Define.
6256         (target_process_qsupported): Avoid the dangling else problem.
6257         (thread_stopped): Define.
6258         (pause_all): Define.
6259         (target_waitstatus_to_string): Declare.
6260         * target.c (target_waitstatus_to_string): New.
6261
6262         * tracepoint.c (tracing): Make extern.
6263         (disconnected_tracing): New.
6264         (stop_tracing): Make extern.  Handle tracing stops due to GDB
6265         disconnecting.
6266         (cmd_qtdisconnected): New.
6267         (cmd_qtstatus): Report disconnected tracing status in trace reply.
6268         (handle_tracepoint_general_set): Handle QTDisconnected.
6269
6270         * event-loop.c (event_handler_func): Change return type to int.
6271         (process_event): Bail out if the event handler wants the event
6272         loop to stop.
6273         (handle_file_event): Ditto.
6274         (start_event_loop): Bail out if the event handler wants the event
6275         loop to stop.
6276
6277         * nto-low.c (nto_target_ops): Adjust.
6278         * spu-low.c (spu_wait): Don't remove the process here.
6279         (spu_target_ops): Adjust.
6280         * win32-low.c (win32_wait): Don't remove the process here.
6281         (win32_target_ops): Adjust.
6282
6283 2010-04-11  Pedro Alves  <pedro@codesourcery.com>
6284
6285         * regcache.c (realloc_register_cache): Invalidate inferior's
6286         regcache before recreating it.
6287
6288 2010-04-09  Pedro Alves  <pedro@codesourcery.com>
6289
6290         * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
6291
6292 2010-04-09  Stan Shebs  <stan@codesourcery.com>
6293             Pedro Alves  <pedro@codesourcery.com>
6294
6295         * server.h (LONGEST): New.
6296         (struct thread_info) <while_stepping>: New field.
6297         (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
6298         Declare.
6299         (initialize_tracepoint, handle_tracepoint_general_set)
6300         (handle_tracepoint_query, tracepoint_finished_step)
6301         (tracepoint_was_hit, release_while_stepping_state_list):
6302         (current_traceframe): Declare.
6303         * server.c (handle_general_set): Handle tracepoint packets.
6304         (read_memory): New.
6305         (write_memory): New.
6306         (handle_search_memory_1): Use read_memory.
6307         (handle_query): Report support for conditional tracepoints, trace
6308         state variables, and tracepoint sources.  Handle tracepoint
6309         queries.
6310         (main): Initialize the tracepoints module.
6311         (process_serial_event): Handle traceframe reads/writes.
6312
6313         * linux-low.c (handle_tracepoints): New.
6314         (linux_wait_1): Call it.
6315         (linux_resume_one_lwp): Handle while-stepping.
6316         (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
6317         (linux_target_ops): Install them.
6318         * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
6319         New field.
6320         * linux-x86-low.c (x86_supports_tracepoints): New.
6321         (the_low_target). Install it.
6322
6323         * mem-break.h (delete_breakpoint): Declare.
6324         * mem-break.c (delete_breakpoint): Make external.
6325
6326         * target.h (struct target_ops): Add `supports_tracepoints',
6327         `read_pc', and `write_pc' fields.
6328         (target_supports_tracepoints): Define.
6329         * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
6330         (phex_nz): New.
6331
6332         * regcache.h (struct regcache) <registers_owned>: New field.
6333         (init_register_cache, regcache_cpy): Declare.
6334         (regcache_read_pc, regcache_write_pc): Declare.
6335         (register_cache_size): Declare.
6336         (supply_regblock): Declare.
6337         * regcache.c (init_register_cache): New.
6338         (new_register_cache): Use it.
6339         (regcache_cpy): New.
6340         (register_cache_size): New.
6341         (supply_regblock): New.
6342         (regcache_read_pc, regcache_write_pc): New.
6343
6344         * tracepoint.c: New.
6345
6346         * Makefile.in (OBS): Add tracepoint.o.
6347         (tracepoint.o): New rule.
6348
6349 2010-04-08  H.J. Lu  <hongjiu.lu@intel.com>
6350
6351         * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
6352         (i386-mmx.o): New.
6353         (i386-mmx.c): Likewise.
6354         (i386-mmx-linux.o): Likewise.
6355         (i386-mmx-linux.c): Likewise.
6356
6357         * configure.srv (srv_i386_regobj): Add i386-mmx.o.
6358         (srv_i386_linux_regobj): Add i386-mmx-linux.o.
6359         (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
6360         (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
6361
6362         * linux-x86-low.c (init_registers_i386_mmx_linux): New.
6363         (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
6364         and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
6365
6366 2010-04-07  H.J. Lu  <hongjiu.lu@intel.com>
6367
6368         * Makefile.in (clean): Updated.
6369         (i386-avx.o): New.
6370         (i386-avx.c): Likewise.
6371         (i386-avx-linux.o): Likewise.
6372         (i386-avx-linux.c): Likewise.
6373         (amd64-avx.o): Likewise.
6374         (amd64-avx.c): Likewise.
6375         (amd64-avx-linux.o): Likewise.
6376         (amd64-avx-linux.c): Likewise.
6377
6378         * configure.srv (srv_i386_regobj): Add i386-avx.o.
6379         (srv_i386_linux_regobj): Add i386-avx-linux.o.
6380         (srv_amd64_regobj): Add amd64-avx.o.
6381         (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
6382         (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
6383         (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
6384         (srv_i386_xmlfiles): Add i386/i386-avx.xml.
6385         (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
6386         (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
6387         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
6388
6389         * i387-fp.c: Include "i386-xstate.h".
6390         (i387_xsave): New.
6391         (i387_cache_to_xsave): Likewise.
6392         (i387_xsave_to_cache): Likewise.
6393         (x86_xcr0): Likewise.
6394
6395         * i387-fp.h (i387_cache_to_xsave): Likewise.
6396         (i387_xsave_to_cache): Likewise.
6397         (x86_xcr0): Likewise.
6398
6399         * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
6400         * linux-crisv32-low.c (target_regsets): Likewise.
6401         * linux-m68k-low.c (target_regsets): Likewise.
6402         * linux-mips-low.c (target_regsets): Likewise.
6403         * linux-ppc-low.c (target_regsets): Likewise.
6404         * linux-s390-low.c (target_regsets): Likewise.
6405         * linux-sh-low.c (target_regsets): Likewise.
6406         * linux-sparc-low.c (target_regsets): Likewise.
6407         * linux-xtensa-low.c (target_regsets): Likewise.
6408
6409         * linux-low.c: Include <sys/uio.h>.
6410         (regsets_fetch_inferior_registers): Support nt_type.
6411         (regsets_store_inferior_registers): Likewise.
6412         (linux_process_qsupported): New.
6413         (linux_target_ops): Add linux_process_qsupported.
6414
6415         * linux-low.h (regset_info): Add nt_type.
6416         (linux_target_ops): Add process_qsupported.
6417
6418         * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
6419         and <sys/uio.h>.
6420         (init_registers_i386_avx_linux): New.
6421         (init_registers_amd64_avx_linux): Likewise.
6422         (xmltarget_i386_linux_no_xml): Likewise.
6423         (xmltarget_amd64_linux_no_xml): Likewise.
6424         (PTRACE_GETREGSET): Likewise.
6425         (PTRACE_SETREGSET): Likewise.
6426         (x86_fill_xstateregset): Likewise.
6427         (x86_store_xstateregset): Likewise.
6428         (use_xml): Likewise.
6429         (x86_linux_update_xmltarget): Likewise.
6430         (x86_linux_process_qsupported): Likewise.
6431         (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
6432         (x86_arch_setup): Don't call init_registers_amd64_linux nor
6433         init_registers_i386_linux here.  Call
6434         x86_linux_update_xmltarget.
6435         (the_low_target): Add x86_linux_process_qsupported.
6436
6437         * server.c (handle_query): Call target_process_qsupported.
6438
6439         * target.h (target_ops): Add process_qsupported.
6440         (target_process_qsupported): New.
6441
6442 2010-04-03  Pedro Alves  <pedro@codesourcery.com>
6443
6444         * inferiors.c (add_thread): Set last_status kind to
6445         TARGET_WAITKIND_IGNORE.
6446         * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
6447         fetch.  Use ptid_of.  Avoid unnecessary get_lwp_thread calls.
6448         (linux_wait_1): Move `thread' local definition to block that uses
6449         it.  Don't NULL initialize `event_child'.
6450         (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
6451         Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
6452         * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
6453
6454 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
6455
6456         * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
6457         an extended waitstatus, or by a watchpoint.
6458         (cancel_breakpoints_callback): Don't cancel a breakpoint if the
6459         thread was stepping or has been stopped by a watchpoint.
6460
6461 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
6462
6463         * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
6464         (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
6465         of another, then delete the previous, and validate all
6466         breakpoints.
6467         (validate_inserted_breakpoint): New.
6468         (delete_disabled_breakpoints): New.
6469         (validate_breakpoints): New.
6470         (check_mem_read): Validate breakpoints before trusting their
6471         shadow.  Delete disabled breakpoints.
6472         (check_mem_write): Validate breakpoints before trusting they
6473         should be inserted.  Delete disabled breakpoints.
6474         * mem-break.h (validate_breakpoints):
6475         * server.c (handle_query): Validate breakpoints when we see a
6476         qSymbol query.
6477
6478 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
6479
6480         * linux-low.c (linux_wait_1): Avoid setting need_step_over is
6481         there's a GDB breakpoint at stop_pc.  Always report a trap to GDB
6482         if we could tell there's a GDB breakpoint at stop_pc.
6483         (need_step_over_p): Don't do a step over if we find a GDB
6484         breakpoint at the resume PC.
6485
6486         * mem-break.c (struct raw_breakpoint): New.
6487         (enum bkpt_type): New type `gdb_breakpoint'.
6488         (struct breakpoint): Delete the `PC', `old_data' and `inserted'
6489         fields.  New field `raw'.
6490         (find_raw_breakpoint_at): New.
6491         (set_raw_breakpoint_at): Handle refcounting.  Create a raw
6492         breakpoint instead.
6493         (set_breakpoint_at): Adjust.
6494         (delete_raw_breakpoint): New.
6495         (release_breakpoint): New.
6496         (delete_breakpoint): Rename to...
6497         (delete_breakpoint_1): ... this.  Add proc parameter.  Use
6498         release_breakpoint.  Return ENOENT.
6499         (delete_breakpoint): Reimplement.
6500         (find_breakpoint_at): Delete.
6501         (find_gdb_breakpoint_at): New.
6502         (delete_breakpoint_at): Delete.
6503         (set_gdb_breakpoint_at): New.
6504         (delete_gdb_breakpoint_at): New.
6505         (gdb_breakpoint_here): New.
6506         (set_reinsert_breakpoint): Use release_breakpoint.
6507         (uninsert_breakpoint): Rename to ...
6508         (uninsert_raw_breakpoint): ... this.
6509         (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
6510         (reinsert_raw_breakpoint): Change parameter type to
6511         raw_breakpoint.
6512         (reinsert_breakpoints_at): Adjust to handle raw breakpoints
6513         instead.
6514         (check_breakpoints): Adjust.  Use release_breakpoint.
6515         (breakpoint_here): Rewrite using find_raw_breakpoint_at.
6516         (breakpoint_inserted_here): Ditto.
6517         (check_mem_read): Adjust to iterate over raw breakpoints instead.
6518         Don't trust the breakpoint's shadow if it is not inserted.
6519         (check_mem_write): Adjust to iterate over raw breakpoints instead.
6520         (delete_all_breakpoints): Adjust.
6521         (free_all_breakpoints): Mark all breakpoints as uninserted, and
6522         use delete_breakpoint_1.
6523
6524         * mem-break.h (breakpoints_supported): Delete declaration.
6525         (set_gdb_breakpoint_at): Declare.
6526         (gdb_breakpoint_here): Declare.
6527         (delete_breakpoint_at): Delete.
6528         (delete_gdb_breakpoint_at): Declare.
6529
6530         * server.h (struct raw_breakpoint): Forward declare.
6531         (struct process_info): New field `raw_breakpoints'.
6532
6533         * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
6534         breakpoints.
6535
6536 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
6537
6538         * linux-low.c (status_pending_p_callback): Fix comment.
6539         (linux_wait_for_event_1): Move most of the internal breakpoint
6540         handling from here...
6541         (linux_wait_1): ... to here.
6542         (count_events_callback): New.
6543         (select_singlestep_lwp_callback): New.
6544         (select_event_lwp_callback): New.
6545         (cancel_breakpoints_callback): New.
6546         (select_event_lwp): New.
6547         (linux_wait_1): Simplify internal breakpoint handling.  Give equal
6548         priority to all LWPs that have had events that should be reported
6549         to the client.  Cancel breakpoints when about to reporting the
6550         event to the client, not while stopping lwps.  No longer cancel
6551         finished single-steps here.
6552         (cancel_finished_single_step): Delete.
6553         (cancel_finished_single_steps): Delete.
6554
6555 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
6556
6557         * mem-break.c (enum bkpt_type): New.
6558         (struct breakpoint): New field `type'.
6559         (set_breakpoint_at): Change return type to struct breakpoint
6560         pointer.  Set type to `other_breakpoint' by default.
6561         (delete_breakpoint): Rewrite, supporting more than one breakpoint
6562         in the breakpoint list.
6563         (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
6564         (reinsert_breakpoint): Rename to ...
6565         (reinsert_raw_breakpoint): ... this.
6566         (reinsert_breakpoints_at): Adjust.
6567         * mem-break.h (struct breakpoint): Declare.
6568         (set_breakpoint_at): Change return type to struct breakpoint
6569         pointer.
6570
6571 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
6572
6573         * server.c (handle_query): Assign, not compare.
6574
6575 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
6576
6577         Teach linux gdbserver to step-over-breakpoints.
6578
6579         * linux-low.c (can_hardware_single_step): New.
6580         (supports_breakpoints): New.
6581         (handle_extended_wait): If stopping threads, read the stop pc of
6582         the new cloned LWP.
6583         (get_pc): New.
6584         (get_stop_pc): Add `lwp' parameter.  Handle it.  Bail out if the
6585         low target doesn't support retrieving the PC.
6586         (add_lwp): Set last_resume_kind to resume_continue.
6587         (linux_attach_lwp_1): Adjust comments.  Always set stop_expected.
6588         (linux_attach): Don't clear stop_expected.  Set the lwp's
6589         last_resume_kind to resume_stop.
6590         (linux_detach_one_lwp): Don't check for removed breakpoints.
6591         (check_removed_breakpoint): Delete.
6592         (status_pending_p): Rename to ...
6593         (status_pending_p_callback): ... this.  Don't check for removed
6594         breakpoints.  Don't consider threads that are stopped from GDB's
6595         perspective.
6596         (linux_wait_for_lwp): Always read the stop_pc here.
6597         (cancel_breakpoint): New.
6598         (step_over_bkpt): New global.
6599         (linux_wait_for_event_1): Implement stepping over breakpoints.
6600         (gdb_wants_lwp_stopped): New.
6601         (gdb_wants_all_stopped): New.
6602         (linux_wait_1): Tag threads as gdb-wants-stopped.  Cancel finished
6603         single-step traps here.  Store the thread's last reported target
6604         wait status.
6605         (send_sigstop): Don't clear stop_expected.  Always set it,
6606         instead.
6607         (mark_lwp_dead): Remove reference to pending_is_breakpoint.
6608         (cancel_finished_single_step): New.
6609         (cancel_finished_single_steps): New.
6610         (wait_for_sigstop): Don't cancel finished single-step traps here.
6611         (linux_resume_one_lwp): Don't check for removed breakpoints.
6612         Don't set `step' on non-hardware step archs.
6613         (linux_set_resume_request): Ignore resume_stop requests if already
6614         stopping or stopped.  Set the lwp's last_resume_kind.
6615         (resume_status_pending_p): Don't check for removed breakpoints.
6616         (need_step_over_p): New.
6617         (start_step_over): New.
6618         (finish_step_over): New.
6619         (linux_resume_one_thread): Always queue a sigstop for resume_stop
6620         requests.  Clear the thread's last reported target waitstatus.
6621         Don't use the `suspended' flag.  Don't consider pending breakpoints.
6622         (linux_resume): Start a step-over if necessary.
6623         (proceed_one_lwp): New.
6624         (proceed_all_lwps): New.
6625         (unstop_all_lwps): New.
6626         * linux-low.h (struct lwp_info): Rewrite comment for the
6627         `suspended' flag.  Add the `stop_pc' field.  Delete the
6628         `pending_stop_pc' field.  Tweak the `stepping' flag's comment.
6629         Add `'last_resume_kind' and `need_step_over' fields.
6630         * inferiors.c (struct thread_info): Delete, moved elsewhere.
6631         * mem-break.c (struct breakpoint): Delete `reinserting' flag.
6632         Delete `breakpoint_to_reinsert' field.  New flag `inserted'.
6633         (set_raw_breakpoint_at): New.
6634         (set_breakpoint_at): Rewrite to use it.
6635         (reinsert_breakpoint_handler): Delete.
6636         (set_reinsert_breakpoint): New.
6637         (reinsert_breakpoint_by_bp): Delete.
6638         (delete_reinsert_breakpoints): New.
6639         (uninsert_breakpoint): Rewrite.
6640         (uninsert_breakpoints_at): New.
6641         (reinsert_breakpoint): Rewrite.
6642         (reinsert_breakpoints_at): New.
6643         (check_breakpoints): Rewrite.
6644         (breakpoint_here): New.
6645         (breakpoint_inserted_here): New.
6646         (check_mem_read): Adjust.
6647         * mem-break.h (breakpoints_supported, breakpoint_here)
6648         (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
6649         (reinsert_breakpoint_by_bp): Delete declaration.
6650         (delete_reinsert_breakpoints): Declare.
6651         (reinsert_breakpoint): Delete declaration.
6652         (reinsert_breakpoints_at): Declare.
6653         (uninsert_breakpoint): Delete declaration.
6654         (uninsert_breakpoints_at): Declare.
6655         (check_breakpoints): Adjust prototype.
6656         * server.h: Adjust include order.
6657         (struct thread_info): Declare here.  Add a `last_status' field.
6658
6659 2010-03-23  Michael Snyder  <msnyder@vmware.com>
6660
6661         * server.c (crc32): New function.
6662         (handle_query): Add handling for 'qCRC:' request.
6663
6664 2010-03-23  Pedro Alves  <pedro@codesourcery.com>
6665
6666         * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
6667         lwp had been stopped by a watchpoint.
6668
6669 2010-03-16  Pedro Alves  <pedro@codesourcery.com>
6670
6671         * server.h (internal_error): Declare.
6672         (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
6673         * utils.c (internal_error): New function.
6674
6675 2010-03-15  Andreas Schwab  <schwab@redhat.com>
6676
6677         * configure.srv: Fix typo setting srv_regobj.
6678
6679 2010-03-15  Pedro Alves  <pedro@codesourcery.com>
6680
6681         * linux-low.c (fetch_register): Avoid passing a non string literal
6682         format to `error'.
6683         (usr_store_inferior_registers): Ditto.
6684
6685 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
6686
6687         * linux-low.c (linux_write_memory): Bail out early if peeking
6688         memory failed.
6689
6690 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
6691
6692         * linux-low.h (struct lwp_info): New fields
6693         `stopped_by_watchpoint' and `stopped_data_address'.
6694         * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
6695         here, and cache them in the lwp object.
6696         (wait_for_sigstop): Check stopped_by_watchpoint lwp field
6697         directly.
6698         (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
6699         field.
6700         (linux_stopped_by_watchpoint): Rewrite.
6701         (linux_stopped_data_address): Rewrite.
6702
6703 2010-03-06  Simo Melenius  <simo.melenius@iki.fi>
6704
6705         * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
6706         switching the current inferior, not before.
6707
6708 2010-03-01  H.J. Lu  <hongjiu.lu@intel.com>
6709
6710         * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
6711         reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
6712         i386-linux.c and amd64-linux.c.
6713         (reg-i386.o): Removed.
6714         (reg-i386.c): Likewise.
6715         (reg-i386-linux.o): Likewise.
6716         (reg-i386-linux.c): Likewise.
6717         (reg-x86-64.o): Likewise.
6718         (reg-x86-64.c): Likewise.
6719         (reg-x86-64-linux.o): Likewise.
6720         (reg-x86-64-linux.c): Likewise.
6721         (i386.o): New.
6722         (i386.c): Likewise.
6723         (i386-linux.o): Likewise.
6724         (i386-linux.c): Likewise.
6725         (amd64.o): Likewise.
6726         (amd64.c): Likewise.
6727         (amd64-linux.o): Likewise.
6728         (amd64-linux.c): Likewise.
6729
6730         * configure.srv (srv_i386_regobj): New.
6731         (srv_i386_linux_regobj): Likewise.
6732         (srv_amd64_regobj): Likewise.
6733         (srv_amd64_linux_regobj): Likewise.
6734         (srv_i386_32bit_xmlfiles): Likewise.
6735         (srv_i386_64bit_xmlfiles): Likewise.
6736         (srv_i386_xmlfiles): Likewise.
6737         (srv_amd64_xmlfiles): Likewise.
6738         (srv_i386_linux_xmlfiles): Likewise.
6739         (srv_amd64_linux_xmlfiles): Likewise.
6740         (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj.  Set
6741         srv_xmlfiles to $srv_i386_xmlfiles.
6742         (i[34567]86-*-mingw32ce*): Likewise.
6743         (i[34567]86-*-mingw*): Likewise.
6744         (i[34567]86-*-nto*): Likewise.
6745         (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
6746         and $srv_amd64_linux_regobj.  Set srv_xmlfiles to
6747         $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
6748         (x86_64-*-linux*): Likewise.
6749
6750         * linux-x86-low.c (init_registers_x86_64_linux): Removed.
6751         (init_registers_amd64_linux): New.
6752         (x86_arch_setup): Replace init_registers_x86_64_linux with
6753         init_registers_amd64_linux.
6754
6755 2010-02-23  Maxim Kuvyrkov  <maxim@codesourcery.com>
6756
6757         * configure.ac: Check for libdl.  If it is not available link against
6758         static libthread_db.
6759         * configure: Regenerate.
6760
6761 2010-02-22  Pedro Alves  <pedro@codesourcery.com>
6762
6763         PR9605
6764
6765         * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
6766         handing a read watchpoint.
6767         (i386_low_insert_watchpoint): Read watchpoints aren't supported.
6768
6769 2010-02-12  Doug Evans  <dje@google.com>
6770
6771         * linux-low.c (linux_supports_tracefork_flag): Document.
6772         (linux_look_up_symbols): Add comment.
6773
6774 2010-02-03  H.J. Lu  <hongjiu.lu@intel.com>
6775
6776         * regcache.c (supply_register): Clear regcache if buf is NULL.
6777
6778 2010-02-02  Nicolas Roche  <roche@sourceware.org>
6779             Joel Brobecker  <brobecker@adacore.com>
6780
6781         * inferiors.c (find_inferior): Add function documentation.
6782         (unloaded_dll): Handle the case where the unloaded dll has not
6783         been previously registered in the dll list.
6784
6785 2010-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
6786
6787         * linux-arm-low.c (thumb_breakpoint_len): Delete.
6788         (thumb2_breakpoint): New.
6789         (arm_breakpoint_at): Check for Thumb-2 breakpoints.
6790
6791 2010-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
6792
6793         * linux-low.c (get_stop_pc): Check for SIGTRAP.
6794         (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
6795         breakpoints.
6796
6797 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
6798
6799         * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
6800
6801 2010-01-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
6802
6803         * linux-s390-low.c (s390_collect_ptrace_register)
6804         (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
6805
6806 2010-01-21  Doug Evans  <dje@google.com>
6807
6808         * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
6809         (PTRACE_ARG4_TYPE): New macro.
6810         (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
6811         (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
6812         (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
6813         (usr_store_inferior_registers): Ditto.
6814         (linux_read_memory, linux_write_memory): Ditto.
6815         (linux_test_for_tracefork): Ditto.
6816
6817         * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
6818         Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
6819
6820 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
6821
6822         * proc-service.c (ps_lgetregs): Don't refetch registers from the
6823         target.
6824
6825 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
6826
6827         * spu-low.c (spu_fetch_registers, spu_store_registers): Change
6828         prototype to take a regcache.  Adjust.
6829
6830 2010-01-20  Pedro Alves  <pedro@codesourcery.com>
6831
6832         * regcache.h (struct thread_info): Forward declare.
6833         (struct regcache): New.
6834         (new_register_cache): Adjust prototype.
6835         (get_thread_regcache): Declare.
6836         (free_register_cache): Adjust prototype.
6837         (registers_to_string, registers_from_string): Ditto.
6838         (supply_register, supply_register_by_name, collect_register)
6839         (collect_register_as_string, collect_register_by_name): Ditto.
6840         * regcache.c (struct inferior_regcache_data): Delete.
6841         (get_regcache): Rename to ...
6842         (get_thread_regcache): ... this.  Adjust.  Switch inferior before
6843         fetching registers.
6844         (regcache_invalidate_one): Adjust.
6845         (regcache_invalidate): Fix prototype.
6846         (new_register_cache): Return the new register cache.
6847         (free_register_cache): Change prototype.
6848         (realloc_register_cache): Adjust.
6849         (registers_to_string): Change prototype to take a regcache.  Adjust.
6850         (registers_from_string): Ditto.
6851         (register_data): Ditto.
6852         (supply_register): Ditto.
6853         (supply_register_by_name): Ditto.
6854         (collect_register): Ditto.
6855         (collect_register_as_string): Ditto.
6856         (collect_register_by_name): Ditto.
6857         * server.c (process_serial_event): Adjust.
6858         * linux-low.h (regset_fill_func, regset_store_func): Change
6859         prototype.
6860         (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
6861         Change prototype.
6862         * linux-low.c (get_stop_pc): Adjust.
6863         (check_removed_breakpoint): Adjust.
6864         (linux_wait_for_event): Adjust.
6865         (linux_resume_one_lwp): Adjust.
6866         (fetch_register): Add regcache parameter.  Adjust.
6867         (usr_store_inferior_registers): Ditto.
6868         (regsets_fetch_inferior_registers): Ditto.
6869         (regsets_store_inferior_registers): Ditto.
6870         (linux_fetch_registers, linux_store_registers): Ditto.
6871         * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
6872         regcache.  Adjust.
6873         (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
6874         Ditto.
6875         * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
6876         prototype to take a regcache.
6877         (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
6878         * remote-utils.c (convert_ascii_to_int, outreg)
6879         (prepare_resume_reply): Change prototype to take a regcache.
6880         Adjust.
6881         * target.h (struct target_ops) <fetch_registers, store_registers>:
6882         Change prototype to take a regcache.
6883         (fetch_inferior_registers, store_inferior_registers): Change
6884         prototype to take a regcache.  Adjust.
6885         * proc-service.c (ps_lgetregs): Adjust.
6886         * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
6887         (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
6888         (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
6889         take a regcache.  Adjust.
6890         * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
6891         (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
6892         (arm_store_vfpregset, arm_get_pc, arm_set_pc):
6893         (arm_breakpoint_at): Change prototype to take a regcache.  Adjust.
6894         * linux-cris-low.c (cris_get_pc, cris_set_pc)
6895         (cris_cannot_fetch_register):
6896         (cris_breakpoint_at): Change prototype to take a regcache.
6897         Adjust.
6898         * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
6899         cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
6900         to take a regcache.  Adjust.
6901         (cris_breakpoint_at, cris_insert_point, cris_remove_point):
6902         Adjust.
6903         * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
6904         take a regcache.  Adjust.
6905         * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
6906         (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
6907         (m68k_set_pc): Change prototype to take a regcache.  Adjust.
6908         * linux-mips-low.c (mips_get_pc):
6909         (mips_set_pc): Change prototype to take a regcache.  Adjust.
6910         (mips_reinsert_addr): Adjust.
6911         (mips_collect_register): Change prototype to take a regcache.
6912         Adjust.
6913         (mips_supply_register):
6914         (mips_collect_register_32bit, mips_supply_register_32bit)
6915         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
6916         (mips_store_fpregset): Ditto.
6917         * linux-ppc-low.c (ppc_supply_ptrace_register)
6918         (ppc_supply_ptrace_register): Ditto.
6919         (parse_spufs_run): Adjust.
6920         (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
6921         (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
6922         (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
6923         take a regcache.  Adjust.
6924         * linux-s390-low.c (s390_collect_ptrace_register)
6925         (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
6926         (s390_set_pc): Change prototype to take a regcache.  Adjust.
6927         (s390_arch_setup): Adjust.
6928         * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
6929         (sh_fill_gregset): Change prototype to take a regcache.  Adjust.
6930         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
6931         (sparc_fill_gregset, sparc_store_gregset_from_stack)
6932         (sparc_store_gregset, sparc_get_pc): Change prototype to take a
6933         regcache.  Adjust.
6934         (sparc_breakpoint_at): Adjust.
6935         * linux-xtensa-low.c (xtensa_fill_gregset):
6936         (xtensa_store_gregset):
6937         (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
6938         (xtensa_set_pc): Change prototype to take a regcache.  Adjust.
6939         * nto-low.c (nto_fetch_registers, nto_store_registers): Change
6940         prototype to take a regcache.  Adjust.
6941         * win32-arm-low.c (arm_fetch_inferior_register)
6942         (arm_store_inferior_register): Change prototype to take a
6943         regcache.  Adjust.
6944         * win32-i386-low.c (i386_fetch_inferior_register)
6945         (i386_store_inferior_register): Change prototype to take a
6946         regcache.  Adjust.
6947         * win32-low.c (child_fetch_inferior_registers)
6948         (child_store_inferior_registers): Change prototype to take a
6949         regcache.  Adjust.
6950         (win32_wait): Adjust.
6951         (win32_fetch_inferior_registers): Change prototype to take a
6952         regcache.  Adjust.
6953         (win32_store_inferior_registers): Adjust.
6954         * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
6955         store_inferior_register>: Change prototype to take a regcache.
6956
6957 2010-01-20  Doug Evans  <dje@google.com>
6958
6959         * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
6960         #ifdef.
6961         (linux_wait_for_event1, linux_init_signals): Ditto.
6962         (W_STOPCODE): Provide definition if missing.
6963
6964 2010-01-13  Vladimir Prus  <vladimir@codesourcery.com>
6965
6966         * linux-low.c (linux_core_of_thread): New.
6967         (compare_ints, show_process, list_threads): New.
6968         (linux_qxfer_osdata): Report threads and cores.
6969         (linux_target_op): Register linux_core_of_thread.
6970         * remote-utils.c (prepare_resume_reply): Report the core.
6971         (buffer_xml_printf): Support %d specifier.
6972         * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
6973         New.
6974         (handle_query): Handle qXfer:threads.  Announce availability
6975         thereof.
6976         * target.h (struct target_ops): New field core_of_thread.
6977
6978 2010-01-04  Ulrich Weigand  <uweigand@de.ibm.com>
6979
6980         * Makefile.in (clean): Remove new generated files.
6981         (reg-s390.o, reg-s390.c): Remove rules.
6982         (reg-s390x.o, reg-s390x.c): Likewise.
6983         (s390-linux32.o, s390-linux32.c): Add rules.
6984         (s390-linux64.o, s390-linux64.c): Likewise.
6985         (s390x-linux64.o, s390x-linux64.c): Likewise.
6986         * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
6987         * linux-s390-low.c: Include <elf.h>.
6988         (HWCAP_S390_HIGH_GPRS): Define if undefined.
6989         (init_registers_s390): Remove prototype.
6990         (init_registers_s390x): Likewise.
6991         (init_registers_s390_linux32): Add prototype.
6992         (init_registers_s390_linux64): Likewise.
6993         (init_registers_s390x_linux64): Likewise.
6994         (s390_num_regs_3264): New define.
6995         (s390_regmap_3264): New global variable.
6996         (s390_cannot_fetch_register): Remove obsolete check.
6997         (s390_cannot_store_register): Likewise.
6998         (s390_collect_ptrace_register): Handle upper/lower register halves.
6999         (s390_supply_ptrace_register): Likewise.
7000         (s390_fill_gregset): Update to register number changes.
7001         (s390_get_hwcap): New routine.
7002         (s390_arch_setup): Detect 32-bit process running on 64-bit system.
7003         Install appropriate regmap and register set.
7004
7005 2010-01-01  Joel Brobecker  <brobecker@adacore.com>
7006
7007         * server.c (gdbserver_version): Update copyright year to 2010.
7008         * gdbreplay.c (gdbreplay_version): Likewise.
7009
7010 2009-12-28  Doug Evans  <dje@google.com>
7011
7012         * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
7013         elf/external.h.  Include <elf.h> instead but only if necessary.
7014
7015 2009-12-28  Pedro Alves  <pedro@codesourcery.com>
7016
7017         * linux-low.c (linux_remove_process): Remove `detaching'
7018         parameter.  Don't release/detach from thread_db here.
7019         (linux_kill): Release/detach from thread_db here, ...
7020         (linux_detach): ... and here, before actually detaching.
7021         (linux_wait_1): ... and here, when a process exits.
7022         * thread-db.c (any_thread_of): New.
7023         (thread_db_free): Switch the current inferior to a thread of the
7024         passed in process.
7025
7026 2009-12-21  Doug Evans  <dje@google.com>
7027
7028         * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
7029
7030         * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
7031         Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
7032         warning ifndef __NR_tkill.  Move setting of errno there too.
7033         Delete unnecessary resetting of errno after syscall.
7034         Minor comment changes to match gdb/linux-nat.c:kill_lwp.
7035
7036         * configure.ac: Check for dladdr.
7037         * config.in: Regenerate.
7038         * configure: Regenerate.
7039         * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
7040         (try_thread_db_load): Update.
7041
7042         * linux-low.c (my_waitpid): Delete unnecessary prototype.
7043
7044 2009-12-18  Doug Evans  <dje@google.com>
7045
7046         * event-loop.c: Include unistd.h if it exists.
7047
7048         * linux-low.c (my_waitpid): Move definition away from being in
7049         between linux_tracefork_child/linux_test_for_tracefork.
7050
7051         * gdb_proc_service.h (psaddr_t): Fix type.
7052         * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
7053         signature to match glibc.
7054
7055 2009-12-16  Doug Evans  <dje@google.com>
7056
7057         * linux-low.c (linux_read_memory): Fix argument to read.
7058
7059 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
7060
7061         * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
7062         events, don't leave current_inferior pointing at null.
7063
7064 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
7065
7066         * win32-low.c (LOG): Delete.
7067         (OUTMSG): Output to stderr.
7068         (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
7069         on compile time LOG macro.
7070         (win32_wait): Fix debug output.
7071
7072 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
7073
7074         * win32-low.c (win32_add_one_solib): If the dll name is
7075         "ntdll.dll", prepend the system directory to the dll path.
7076
7077 2009-11-17  Daniel Jacobowitz  <dan@codesourcery.com>
7078
7079         * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
7080
7081 2009-11-17  Nathan Sidwell  <nathan@codesourcery.com>
7082             Vladimir Prus  <vladimir@codesourcery.com>
7083
7084         * Makefile.in (reg-cf.o, reg-cf.c): New targets.
7085         * configure.ac: Check for __mcoldfire__ and set
7086         gdb_cv_m68k_is_coldfire.
7087         * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
7088         reg-cf.o and reg-m68k.o.
7089         * configure: Regenerated.
7090
7091 2009-11-16  Pedro Alves  <pedro@codesourcery.com>
7092
7093         * linux-low.c (linux_remove_process): Add `detaching' parameter.
7094         Pass it to thread_db_free.
7095         (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
7096         proper `detaching' argument to linux_remove_process.
7097         * linux-low.h (thread_db_free): Add `detaching' parameter.
7098         * thread-db.c (thread_db_init): Pass false as `detaching' argument
7099         to thread_db_free.
7100         (thread_db_free): Add `detaching' parameter.  Only
7101         call td_ta_clear_event if detaching from process.
7102
7103 2009-11-12  Maxim Kuvyrkov  <maxim@codesourcery.com>
7104
7105         * thread-db.c (thread_db_free): Fix typo.
7106
7107 2009-11-11  Paul Pluzhnikov  <ppluzhnikov@google.com>
7108
7109         PR gdb/10838
7110         * thread-db.c (thread_db_free): Call td_ta_clear_event.
7111
7112 2009-11-03  Nathan Sidwell  <nathan@codesourcery.com>
7113
7114         * configure.ac (i[34567]86-*): Check if we're targetting x86-64
7115         with an i686 compiler.
7116         * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
7117         needed.
7118         * configure: Rebuilt.
7119
7120 2009-10-29  Sandra Loosemore  <sandra@codesourcery.com>
7121
7122         PR gdb/10783
7123
7124         * server.c (handle_search_memory_1): Correct read_addr initialization
7125         in loop for searching subsequent chunks.
7126
7127 2009-10-29  Paul Pluzhnikov  <ppluzhnikov@google.com>
7128
7129         * configure.ac: New --with-libthread-db option.
7130         * thread-db.c: Allow direct dependence on libthread_db.
7131         (thread_db_free): Adjust.
7132         * config.in: Regenerate.
7133         * configure: Likewise.
7134
7135 2009-10-28  Paul Pluzhnikov  <ppluzhnikov@google.com>
7136
7137         PR gdb/10757
7138         * thread-db.c (attach_thread): New function.
7139         (maybe_attach_thread): Return success/failure.
7140         (find_new_threads_callback): Adjust.
7141         (thread_db_find_new_threads): Loop until no new threads.
7142
7143 2009-10-13  Pedro Alves  <pedro@codesourcery.com>
7144
7145         * proc-service.c (ps_lgetregs): Formatting.
7146
7147 2009-10-08  Paul Pluzhnikov  <ppluzhnikov@google.com>
7148
7149         * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
7150         * configure.ac: Adjust.
7151         * linux-low.h (struct process_info_private): Move members to struct
7152         thread_db.
7153         (thread_db_free, thread_db_handle_monitor_command): New prototype.
7154         * linux-low.c (linux_remove_process): Adjust.
7155         (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
7156         * server.c (handle_query): Move code ...
7157         (handle_monitor_command): ... here. New function.
7158         * target.h (struct target_ops): New member.
7159         * thread-db.c (struct thread_db): New.
7160         (libthread_db_search_path): New variable.
7161         (thread_db_create_event, thread_db_enable_reporting)
7162         (find_one_thread, maybe_attach_thread, find_new_threads_callback)
7163         (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
7164         (try_thread_db_load_1, dladdr_to_soname): New functions.
7165         (try_thread_db_load, thread_db_load_search): New functions.
7166         (thread_db_init): Search for libthread_db.
7167         (thread_db_free): New function.
7168         (thread_db_handle_monitor_command): Likewise.
7169         * config.in: Regenerate.
7170         * configure: Regenerate.
7171
7172 2009-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
7173
7174         * spu-low.c (spu_kill): Wait for inferior to terminate.
7175         Call clear_inferiors.
7176         (spu_detach): Call clear_inferiors.
7177
7178 2009-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7179
7180         * aclocal.m4: Regenerate.
7181         * config.in: Likewise.
7182         * configure: Likewise.
7183
7184 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
7185
7186         * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
7187         (parse_spufs_run): New function.
7188         (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
7189         (ppc_breakpoint_at): Handle SPU breakpoints.
7190
7191 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
7192
7193         * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
7194         (SPUFS_MAGIC): Define.
7195         (spu_enumerate_spu_ids): New function.
7196         (linux_qxfer_spu): New function.
7197         (linux_target_ops): Install linux_qxfer_spu.
7198
7199 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
7200
7201         * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
7202         and powerpc-cell64l.o to srv_regobj.  Add rs6000/powerpc-cell32l.xml
7203         and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
7204         * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
7205         (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
7206         (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
7207         * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
7208         (init_registers_powerpc_cell32l): Add prototype.
7209         (init_registers_powerpc_cell64l): Likewise.
7210         (ppc_arch_setup): Detect Cell/B.E. architecture.
7211
7212 2009-07-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7213
7214         * Makefile.in (datarootdir): New variable.
7215
7216 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
7217
7218         * linux-low.c (linux_write_memory): Update debugging output.
7219         * Makefile.in (clean): Add new descriptions.
7220         (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
7221         (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
7222         * configure.srv: Add new files for arm*-*-linux*.
7223         * linux-arm-low.c: Add new declarations.
7224         (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
7225         (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
7226         (HWCAP_VFPv3D16): New.
7227         (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
7228         instead of __IWMMXT__.
7229         (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
7230         (arm_arch_setup): New.
7231         (target_regsets): Remove #ifdef.  Add VFP regset.
7232         (the_low_target): Use arm_arch_setup.
7233
7234 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
7235
7236         * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
7237         the main thread again.
7238
7239 2009-07-06  Aleksandar Ristovski  <aristovski@qnx.com>
7240
7241         Adding Neutrino gdbserver.
7242         * configure: Regenerated.
7243         * configure.ac: Add case for srv_qnx and set LIBS accordingly.
7244         * configure.srv (i[34567]86-*-nto*): New target.
7245         * nto-low.c, nto-low.h, nto-x86-low.c: New files.
7246         * remote-utils.c [__QNX__]: Include sys/iomgr.h
7247         (nto_comctrl) [__QNX__]: New function.
7248         (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
7249
7250 2009-07-05  Danny Backx  <dannybackx@users.sourceforge.net>
7251
7252         * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
7253         srv_tgtobj.
7254
7255 2009-07-04  Danny Backx  <dannybackx@users.sourceforge.net>
7256             Pedro Alves  <pedro@codesourcery.com>
7257
7258         * win32-i386-low.c (i386_get_thread_context): Handle systems that
7259         don't support CONTEXT_EXTENDED_REGISTERS.
7260         (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
7261         (the_low_target): Install them.
7262         * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
7263         failing with ERROR_PIPE_NOT_CONNECTED.
7264
7265 2009-06-30  Doug Evans  <dje@google.com>
7266             Pierre Muller  <muller@ics.u-strasbg.fr>
7267
7268         Add h/w watchpoint support to x86-linux, win32-i386.
7269         * Makefile.in (SFILES): Add i386-low.c
7270         (i386_low_h): Define.
7271         (i386-low.o): Add dependencies.
7272         (linux-x86-low.o): Add i386-low.h dependency.
7273         (win32-i386-low.o): Ditto.
7274         * i386-low.c: New file.
7275         * i386-low.h: New file.
7276         * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
7277         (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
7278         * linux-low.c (linux_add_process): Initialize arch_private.
7279         (linux_remove_process): Free arch_private.
7280         (add_lwp): Initialize arch_private.
7281         (delete_lwp): Free arch_private.
7282         (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
7283         provided.
7284         * linux-low.h (process_info_private): New member arch_private.
7285         (lwp_info): New member arch_private.
7286         (linux_target_ops): New members new_process, new_thread,
7287         prepare_to_resume.
7288         (ptid_of): New macro.
7289         * linux-x86-low.c: Include stddef.h, i386-low.h.
7290         (arch_process_info): New struct.
7291         (arch_lwp_info): New struct.
7292         (x86_linux_dr_get, x86_linux_dr_set): New functions.
7293         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7294         (i386_dr_low_get_status): New function.
7295         (x86_insert_point, x86_remove_point): New functions.
7296         (x86_stopped_by_watchpoint): New function.
7297         (x86_stopped_data_address): New function.
7298         (x86_linux_new_process, x86_linux_new_thread): New functions.
7299         (x86_linux_prepare_to_resume): New function.
7300         (the_low_target): Add entries for insert_point, remove_point,
7301         stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
7302         prepare_to_resume.
7303         * server.c (debug_hw_points): New global.
7304         (monitor_show_help): Document set debug-hw-points.
7305         (handle_query): Process "set debug-hw-points".
7306         * server.h (debug_hw_points): Declare.
7307         (paddress): Declare.
7308         * utils.c (NUMCELLS, CELLSIZE): New macros.
7309         (get_sell, xsnprintf, paddress): New functions.
7310         * win32-arm-low.c (the_low_target): Add entries for insert_point,
7311         remove_point, stopped_by_watchpoint, stopped_data_address.
7312         * win32-i386-low.c: Include i386-low.h.
7313         (debug_reg_state): Replaces dr.
7314         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
7315         (i386_dr_low_get_status): New function.
7316         (i386_insert_point, i386_remove_point): New functions.
7317         (i386_stopped_by_watchpoint): New function.
7318         (i386_stopped_data_address): New function.
7319         (i386_initial_stuff): Update.
7320         (get_thread_context,set_thread_context,i386_thread_added): Update.
7321         (the_low_target): Add entries for insert_point,
7322         remove_point, stopped_by_watchpoint, stopped_data_address.
7323         * win32-low.c (win32_insert_watchpoint): New function.
7324         (win32_remove_watchpoint): New function.
7325         (win32_stopped_by_watchpoint): New function.
7326         (win32_stopped_data_address): New function.
7327         (win32_target_ops): Add entries for insert_watchpoint,
7328         remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
7329         * win32-low.h (win32_target_ops): New members insert_point,
7330         remove_point, stopped_by_watchpoint, stopped_data_address.
7331
7332 2009-06-25  Pedro Alves  <pedro@codesourcery.com>
7333
7334         * server.c (process_serial_event): Re-return unsupported, not
7335         error, if the type isn't recognized.  Re-allow supporting only
7336         insert or remove packets.  Also call require_running for
7337         breakpoints.  Add missing break statement to default case.  Tidy.
7338         * target.h (struct target_ops): Rename insert_watchpoint to
7339         insert_point, and remove_watchpoint to remove_point.
7340
7341         * linux-low.h (struct linux_target_ops): Likewise.
7342         * linux-low.c (linux_insert_watchpoint): Rename to ...
7343         (linux_insert_point): ... this.  Adjust.
7344         (linux_remove_watchpoint): Rename to ...
7345         (linux_remove_point): ... this.  Adjust.
7346         (linux_target_ops): Adjust.
7347         * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
7348         (cris_insert_point): ... this.
7349         (cris_remove_watchpoint): Rename to ...
7350         (cris_remove_point): ... this.
7351         (the_low_target): Adjust.
7352
7353 2009-06-24  Pierre Muller  <muller@ics.u-strasbg.fr>
7354
7355         * server.c (handle_v_kill): Pass signal_pid to
7356         kill_inferior if multi_process is zero.
7357
7358 2009-06-23  Aleksandar Ristovski  <aristovski@qnx.com>
7359
7360         * server.c (process_serial_event): Add support for Z0 and Z1 packet.
7361         * target.h (target_ops): Comment for *_watchpoint to make it clear
7362         the functions can get types '0' and '1'.
7363
7364 2009-06-22  Aleksandar Ristovski  <aristovski@qnx.com>
7365
7366         * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
7367         * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
7368         * regcache.c (get_regcache): Likewise.
7369         * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
7370         * win32-low.c (child_fetch_inferior_registers): Remove check for
7371         regno 0.
7372
7373 2009-06-19  Aleksandar Ristovski  <aristovski@qnx.com>
7374             Pedro Alves <pedro@codesourcery.com>
7375
7376         * target.h (struct target_ops) <supports_multi_process>: New
7377         callback.
7378         (target_supports_multi_process): New.
7379         * server.c (handle_query): Even if GDB reports support, only
7380         enable multi-process if the target also supports it.  Report
7381         multi-process support only if the target backend supports it.
7382         * linux-low.c (linux_supports_multi_process): New function.
7383         (linux_target_ops): Install it as target_supports_multi_process
7384         callback.
7385
7386 2009-05-24  Doug Evans  <dje@google.com>
7387
7388         Global renaming of find_thread_pid to find_thread_ptid.
7389         * server.h (find_thread_ptid): Renamed from find_thread_pid.
7390         * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
7391         All callers updated.
7392
7393         * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
7394         to resume the newly created thread, don't call ptrace (PTRACE_CONT)
7395         directly.
7396
7397         * linux-low.c (get_stop_pc): Print pc if debug_threads.
7398         (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
7399         (linux_resume_one_lwp): Ditto.
7400
7401 2009-05-23  Doug Evans  <dje@google.com>
7402
7403         * linux-low.c (linux_resume_one_lwp): Change type of first arg
7404         from struct inferior_list_entry * to struct lwp_info *.
7405         All callers updated.
7406
7407 2009-05-13  Doug Evans  <dje@google.com>
7408
7409         * linux-x86-low.c: Don't include assert.h.
7410         (x86_siginfo_fixup): Use fatal, not assert.
7411         (x86_arch_setup): Fix comment.
7412
7413 2009-05-12  Doug Evans  <dje@google.com>
7414
7415         Biarch support for i386/amd64 gdbserver.
7416         * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
7417         Add linux-x86-low.c.
7418         (linux-i386-low.o, linux-x86-64-low.o): Delete.
7419         (linux-x86-low.o): Add.
7420         * linux-x86-64-low.c: Delete.
7421         * linux-i386-low.c: Delete.
7422         * linux-x86-low.c: New file.
7423         * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
7424         linux-x86-low.o.
7425         (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
7426         linux-x86-low.o.
7427         (x86_64-linux srv_regobj): Add reg-i386-linux.o.
7428         * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
7429         (linux_child_pid_to_exec_file): New function.
7430         (elf_64_header_p, elf_64_file_p): New functions.
7431         (siginfo_fixup): New function.
7432         (linux_xfer_siginfo): New local inf_siginfo.  Call siginfo_fixup to
7433         give target a chance to convert layout.
7434         * linux-low.h (linux_target_ops): New member siginfo_fixup.
7435         (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
7436
7437 2009-05-07  Doug Evans  <dje@google.com>
7438
7439         * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
7440         (regsets_store_inferior_registers): Ditto.
7441
7442 2009-05-06  Pedro Alves  <pedro@codesourcery.com>
7443
7444         PR server/10048
7445
7446         * linux-low.c (must_set_ptrace_flags): Delete.
7447         (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
7448         of the global.
7449         (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here.  Set
7450         `lwp->must_set_ptrace_flags' instead.
7451         (linux_wait_for_event_1): Set ptrace options here.
7452         (linux_wait_1): ... not here.
7453
7454 2009-04-30  Doug Evans  <dje@google.com>
7455
7456         * inferiors.c (started_inferior_callback): New function.
7457         (attached_inferior_callback): New function.
7458         (have_started_inferiors_p, have_attached_inferiors_p): New functions.
7459         * server.c (print_started_pid, print_attached_pid): New functions.
7460         (detach_or_kill_for_exit): New function.
7461         (main): Call it instead of for_each_inferior (kill_inferior_callback).
7462         * server.h (have_started_inferiors_p): Declare.
7463         (have_attached_inferiors_p): Declare.
7464
7465         * inferiors.c (remove_process): Fix memory leak, free process.
7466         * linux-low.c (linux_remove_process): New function.
7467         (linux_kill): Call it instead of remove_process.
7468         (linux_detach, linux_wait_1): Ditto.
7469
7470 2009-04-19  Danny Backx  <dannybackx@users.sourceforge.net>
7471
7472         * configure.srv: Add x86 Windows CE target.
7473
7474 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
7475
7476         * inferiors.c (get_thread_process): Make global.
7477         * server.h (get_thread_process): Add prototype.
7478         * thread-db.c (find_one_thread): Use get_thread_process
7479         instead of current_process.
7480         (thread_db_get_tls_address): Do not crash if called when
7481         thread layer is not yet initialized.
7482
7483 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
7484
7485         * remote-utils.c (prepare_resume_reply): Null-terminate packet.
7486         * spu-low.c (current_tid): Rename to ...
7487         (current_ptid): ... this.
7488         (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
7489         spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
7490         ptid_get_lwp (current_ptid) instead of current_tid.
7491         (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
7492         instead of current_tid.  Use find_process_pid to verify pid
7493         argument is valid.  Pass proper argument to remove_process.
7494         (spu_thread_alive): Compare current_ptid instead of current_tid.
7495         (spu_resume): Likewise.
7496
7497 2009-04-02  Pedro Alves  <pedro@codesourcery.com>
7498
7499         * linux-low.c (usr_store_inferior_registers): Declare local `pid'
7500         variable.
7501
7502 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
7503
7504         Implement the multiprocess extensions, and add linux multiprocess
7505         support.
7506
7507         * server.h (ULONGEST): Declare.
7508         (struct ptid, ptid_t): New.
7509         (minus_one_ptid, null_ptid): Declare.
7510         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7511         (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
7512         (struct inferior_list_entry): Change `id' type from unsigned from
7513         to ptid_t.
7514         (struct sym_cache, struct breakpoint, struct
7515         process_info_private): Forward declare.
7516         (struct process_info): Declare.
7517         (current_process): Declare.
7518         (all_processes): Declare.
7519         (initialize_inferiors): Declare.
7520         (add_thread): Adjust to use ptid_t.
7521         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
7522         (add_process, remove_process, find_thread_pid): Declare.
7523         (find_inferior_id): Adjust to use ptid_t.
7524         (cont_thread, general_thread, step_thread): Change type to ptid_t.
7525         (multi_process): Declare.
7526         (push_event): Adjust to use ptid_t.
7527         (read_ptid, write_ptid): Declare.
7528         (prepare_resume_reply): Adjust to use ptid_t.
7529         (clear_symbol_cache): Declare.
7530         * inferiors.c (all_processes): New.
7531         (null_ptid, minus_one_ptid): New.
7532         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
7533         (ptid_get_tid, ptid_equal, ptid_is_pid): New.
7534         (add_thread): Change unsigned long to ptid.  Remove gdb_id
7535         parameter.  Adjust.
7536         (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
7537         (gdb_id_to_thread): Rename to ...
7538         (find_thread_pid): ... this.  Change unsigned long to ptid.
7539         (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
7540         (loaded_dll, pull_pid_from_list): Adjust.
7541         (add_process, remove_process, find_process_pid)
7542         (get_thread_process, current_process, initialize_inferiors): New.
7543         * target.h (struct thread_resume) <thread>: Change type to ptid_t.
7544         (struct target_waitstatus) <related_pid>: Ditto.
7545         (struct target_ops) <kill, detach>: Add `pid' argument.  Change
7546         return type to int.
7547         (struct target_ops) <join>: Add `pid' argument.
7548         (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
7549         (struct target_ops) <wait>: Add `ptid' field.  Change return type
7550         to ptid.
7551         (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
7552         (mywait): Add `ptid' argument.  Change return type to ptid_t.
7553         (target_pid_to_str): Declare.
7554         * target.c (set_desired_inferior): Adjust to use ptids.
7555         (mywait): Add new `ptid' argument.  Adjust.
7556         (target_pid_to_str): New.
7557         * mem-break.h (free_all_breakpoints): Declare.
7558         * mem-break.c (breakpoints): Delelete.
7559         (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
7560         (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
7561         to use per-process breakpoint list.
7562         (free_all_breakpoints): New.
7563         * remote-utils.c (struct sym_cache) <name>: Drop `const'.
7564         (symbol_cache, all_symbols_looked_up): Delete.
7565         (hexchars): New.
7566         (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
7567         read_ptid): New.
7568         (prepare_resume_reply): Change ptid argument's type from unsigned
7569         long to ptid_t.  Adjust.  Implement W;process and X;process.
7570         (free_sym_cache, clear_symbol_cache): New.
7571         (look_up_one_symbol): Adjust to per-process symbol cache.  *
7572         * server.c (cont_thread, general_thread, step_thread): Change type
7573         to ptid_t.
7574         (attached): Delete.
7575         (multi_process): New.
7576         (last_ptid): Change type to ptid_t.
7577         (struct vstop_notif) <ptid>: Change type to ptid_t.
7578         (queue_stop_reply, push_event): Change `ptid' argument's type to
7579         ptid_t.
7580         (discard_queued_stop_replies): Add `pid' argument.
7581         (start_inferior): Adjust to use ptids.  Adjust to mywait interface
7582         changes.  Don't reference the `attached' global.
7583         (attach_inferior): Adjust to mywait interface changes.
7584         (handle_query): Adjust to use ptids.  Parse GDB's qSupported
7585         features.  Handle and report "multiprocess+".  Handle
7586         "qAttached:PID".
7587         (handle_v_cont): Adjust to use ptids.  Adjust to mywait interface
7588         changes.
7589         (handle_v_kill): New.
7590         (handle_v_stopped): Adjust to use target_pid_to_str.
7591         (handle_v_requests): Allow multiple attaches and runs when
7592         multiprocess extensions are in effect.  Handle "vKill".
7593         (myresume): Adjust to use ptids.
7594         (queue_stop_reply_callback): Add `arg' parameter.  Handle it.
7595         (handle_status): Adjust to discard_queued_stop_replies interface
7596         change.
7597         (first_thread_of, kill_inferior_callback)
7598         (detach_or_kill_inferior_callback, join_inferiors_callback): New.
7599         (main): Call initialize_inferiors.  Adjust to use ptids, killing
7600         and detaching from all inferiors.  Handle multiprocess packet
7601         variants.
7602         * linux-low.h: Include gdb_proc_service.h.
7603         (struct process_info_private): New.
7604         (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
7605         <lwpid_of>: Use ptid_get_lwp.
7606         (get_lwp_thread): Adjust.
7607         (struct lwp_info): Add `dead' member.
7608         (find_lwp_pid): Declare.
7609         * linux-low.c (thread_db_active): Delete.
7610         (new_inferior): Adjust comment.
7611         (inferior_pid): Delete.
7612         (linux_add_process): New.
7613         (handle_extended_wait): Adjust.
7614         (add_lwp): Change unsigned long to ptid.
7615         (linux_create_inferior): Add process to processes table.  Adjust
7616         to use ptids.  Don't set new_inferior here.
7617         (linux_attach_lwp): Rename to ...
7618         (linux_attach_lwp_1): ... this.  Add `initial' argument.  Handle
7619         it.  Adjust to use ptids.
7620         (linux_attach_lwp): New.
7621         (linux_attach): Add process to processes table.  Don't set
7622         new_inferior here.
7623         (struct counter): New.
7624         (second_thread_of_pid_p, last_thread_of_process_p): New.
7625         (linux_kill_one_lwp): Add `args' parameter.  Handle it.  Adjust to
7626         multiple processes.
7627         (linux_kill): Add `pid' argument.  Handle it.  Adjust to multiple
7628         processes.  Remove process from process table.
7629         (linux_detach_one_lwp): Add `args' parameter.  Handle it.  Adjust
7630         to multiple processes.
7631         (any_thread_of): New.
7632         (linux_detach): Add `pid' argument, and handle it.  Remove process
7633         from processes table.
7634         (linux_join): Add `pid' argument.  Handle it.
7635         (linux_thread_alive): Change unsighed long argument to ptid_t.
7636         Consider dead lwps as not being alive.
7637         (status_pending_p): Rename `dummy' argument to `arg'.  Filter out
7638         threads we're not interested in.
7639         (same_lwp, find_lwp_pid): New.
7640         (linux_wait_for_lwp): Change `pid' argument's type from int to
7641         ptid_t.  Adjust.
7642         (linux_wait_for_event): Rename to ...
7643         (linux_wait_for_event_1): ... this.  Change `pid' argument's type
7644         from int to ptid_t.  Adjust.
7645         (linux_wait_for_event): New.
7646         (linux_wait_1): Add `ptid' argument.  Change return type to
7647         ptid_t.  Adjust.  Use last_thread_of_process_p.  Remove processes
7648         that exit from the process table.
7649         (linux_wait): Add `ptid' argument.  Change return type to ptid_t.
7650         Adjust.
7651         (mark_lwp_dead): New.
7652         (wait_for_sigstop): Adjust to use ptids.  If a process exits while
7653         stopping all threads, mark its main lwp as dead.
7654         (linux_set_resume_request, linux_resume_one_thread): Adjust to use
7655         ptids.
7656         (fetch_register, usr_store_inferior_registers)
7657         (regsets_fetch_inferior_registers)
7658         (regsets_store_inferior_registers, linux_read_memory)
7659         (linux_write_memory): Inline `inferior_pid'.
7660         (linux_look_up_symbols): Adjust to use per-process
7661         `thread_db_active'.
7662         (linux_request_interrupt): Adjust to use ptids.
7663         (linux_read_auxv): Inline `inferior_pid'.
7664         (initialize_low): Don't reference thread_db_active.
7665         * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
7666         * proc-service.c (ps_lgetregs): Use find_lwp_pid.
7667         (ps_getpid): Return the pid of the current inferior.
7668         * thread-db.c (proc_handle, thread_agent): Delete.
7669         (thread_db_create_event, thread_db_enable_reporting): Adjust to
7670         per-process data.
7671         (find_one_thread): Change argument type to ptid_t.  Adjust to
7672         per-process data.
7673         (maybe_attach_thread): Adjust to per-process data and ptids.
7674         (thread_db_find_new_threads): Ditto.
7675         (thread_db_init): Ditto.
7676         * spu-low.c (spu_create_inferior, spu_attach): Add process to
7677         processes table.  Adjust to use ptids.
7678         (spu_kill, spu_detach): Adjust interface.  Remove process from
7679         processes table.
7680         (spu_join, spu_thread_alive): Adjust interface.
7681         (spu_wait): Adjust interface.  Remove process from processes
7682         table.  Adjust to use ptids.
7683         * win32-low.c (current_inferior_tid): Delete.
7684         (current_inferior_ptid): New.
7685         (debug_event_ptid): New.
7686         (thread_rec): Take a ptid.  Adjust.
7687         (child_add_thread): Add `pid' argument.  Adjust to use ptids.
7688         (child_delete_thread): Ditto.
7689         (do_initial_child_stuff): Add `attached' argument.  Add process to
7690         processes table.
7691         (child_fetch_inferior_registers, child_store_inferior_registers):
7692         Adjust.
7693         (win32_create_inferior): Pass 0 to do_initial_child_stuff.
7694         (win32_attach): Pass 1 to do_initial_child_stuff.
7695         (win32_kill): Adjust interface.  Remove process from processes
7696         table.
7697         (win32_detach): Ditto.
7698         (win32_join): Adjust interface.
7699         (win32_thread_alive): Take a ptid.
7700         (win32_resume): Adjust to use ptids.
7701         (get_child_debug_event): Ditto.
7702         (win32_wait): Adjust interface.  Remove exiting process from
7703         processes table.
7704
7705 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
7706
7707         Non-stop mode support.
7708
7709         * server.h (non_stop): Declare.
7710         (gdb_client_data, handler_func): Declare.
7711         (delete_file_handler, add_file_handler, start_event_loop):
7712         Declare.
7713         (handle_serial_event, handle_target_event, push_event)
7714         (putpkt_notif): Declare.
7715         * target.h (enum resume_kind): New.
7716         (struct thread_resume): Replace `step' field by `kind' field.
7717         (TARGET_WNOHANG): Define.
7718         (struct target_ops) <wait>: Add `options' argument.
7719         <supports_non_stop, async, start_non_stop>: New fields.
7720         (target_supports_non_stop, target_async): New.
7721         (start_non_stop): Declare.
7722         (mywait): Add `options' argument.
7723         * target.c (mywait): Add `options' argument.  Print child exit
7724         notifications here.
7725         (start_non_stop): New.
7726         * server.c (non_stop, own_buf, mem_buf): New globals.
7727         (struct vstop_notif): New.
7728         (notif_queue): New global.
7729         (queue_stop_reply, push_event, discard_queued_stop_replies)
7730         (send_next_stop_reply): New.
7731         (start_inferior): Adjust to use resume_kind.  Adjust to mywait
7732         interface changes.
7733         (attach_inferior): In non-stop mode, don't wait for the target
7734         here.
7735         (handle_general_set): Handle QNonStop.
7736         (handle_query): When handling qC, return the current general
7737         thread, instead of the first thread of the list.
7738         (handle_query): If the backend supports non-stop mode, include
7739         QNonStop+ in the qSupported query response.
7740         (handle_v_cont): Adjust to use resume_kind.  Handle resume_stop
7741         and non-stop mode.
7742         (handle_v_attach, handle_v_run): Handle non-stop mode.
7743         (handle_v_stopped): New.
7744         (handle_v_requests): Report support for vCont;t.  Handle vStopped.
7745         (myresume): Adjust to use resume_kind.  Handle non-stop.
7746         (queue_stop_reply_callback): New.
7747         (handle_status): Handle non-stop mode.
7748         (main): Clear non_stop flag on reconnection.  Use the event-loop.
7749         Refactor serial protocol handling from here ...
7750         (process_serial_event): ... to this new function.  When GDB
7751         selects any thread, select one here.  In non-stop mode, wait until
7752         GDB acks all pending events before exiting.
7753         (handle_serial_event, handle_target_event): New.
7754         * remote-utils.c (remote_open): Install remote_desc in the event
7755         loop.
7756         (remote_close): Remove remote_desc from the event loop.
7757         (putpkt_binary): Rename to...
7758         (putpkt_binary_1): ... this.  Add `is_notic' argument.  Handle it.
7759         (putpkt_binary): New as wrapper around putpkt_binary_1.
7760         (putpkt_notif): New.
7761         (prepare_resume_reply): In non-stop mode, don't change the
7762         general_thread.
7763         * event-loop.c: New.
7764         * Makefile.in (OBJ): Add event-loop.o.
7765         (event-loop.o): New rule.
7766
7767         * linux-low.h (pid_of): Moved here.
7768         (lwpid_of): New.
7769         (get_lwp_thread): Use lwpid_of.
7770         (struct lwp_info): Delete `lwpid' field.  Add `suspended' field.
7771         * linux-low.c (pid_of): Delete.
7772         (inferior_pid): Use lwpid_of.
7773         (linux_event_pipe): New.
7774         (target_is_async_p): New.
7775         (delete_lwp): New.
7776         (handle_extended_wait): Use lwpid_of.
7777         (add_lwp): Don't set lwpid field.
7778         (linux_attach_lwp): Adjust debug output.  Use lwpid_of.
7779         (linux_kill_one_lwp): If killing a running lwp, stop it first.
7780         Use lwpid_of.  Adjust to linux_wait_for_event interface changes.
7781         (linux_detach_one_lwp): If detaching from a running lwp, stop it
7782         first.  Adjust to linux_wait_for_event interface changes.  Use
7783         lwpid_of.
7784         (linux_detach): Don't delete the main lwp here.
7785         (linux_join): Use my_waitpid.  Avoid signal_pid.  Use lwpid_of.
7786         (status_pending_p): Don't consider explicitly suspended lwps.
7787         (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
7788         pointer.  Add OPTIONS argument.  Change return type to int.  Use
7789         my_waitpid instead of sleeping.  Handle WNOHANG.  Use lwpid_of.
7790         (linux_wait_for_event): Take an integer pid instead of a lwp_info
7791         pointer.  Add status pointer argument.  Return a pid instead of a
7792         status.  Use lwpid_of.  Adjust to linux_wait_for_lwp interface
7793         changes.  In non-stop mode, don't switch to a random thread.
7794         (linux_wait): Rename to...
7795         (linux_wait_1): ... this.  Add target_options argument, and handle
7796         it.  Adjust to use resume_kind.  Use lwpid_of.  In non-stop mode,
7797         don't handle the continue thread.  Handle TARGET_WNOHANG.  Merge
7798         clean exit and signal exit code.  Don't stop all threads in
7799         non-stop mode.  In all-stop mode, only stop all threads when
7800         reporting a stop to GDB.  Handle explicit thread stop requests.
7801         (async_file_flush, async_file_mark): New.
7802         (linux_wait): New.
7803         (send_sigstop): Use lwpid_of.
7804         (wait_for_sigstop): Use lwpid_of.  Adjust to linux_wait_for_event
7805         interface changes.  In non-stop mode, don't switch to a random
7806         thread.
7807         (linux_resume_one_lwp): Use lwpid_of.
7808         (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
7809         (linux_resume_one_thread): ... this.  Handle resume_stop.  In
7810         non-stop mode, don't look for pending flag in all threads.
7811         (resume_status_pending_p): Don't consider explicitly suspended
7812         threads.
7813         (my_waitpid): Reimplement.  Emulate __WALL.
7814         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
7815         Use lwpid_of.
7816         (sigchld_handler, linux_supports_non_stop, linux_async)
7817         (linux_start_non_stop): New.
7818         (linux_target_ops): Register linux_supports_non_stop, linux_async
7819         and linux_start_non_stop.
7820         (initialize_low): Install SIGCHLD handler.
7821         * thread-db.c (thread_db_create_event, find_one_thread)
7822         (thread_db_get_tls_address): Use lwpid_of.
7823         * win32-low.c (win32_detach): Adjust to use resume_kind.
7824         (win32_wait): Add `options' argument.
7825         * spu-low.c (spu_resume): Adjust to use resume_kind.
7826         (spu_wait): Add `options' argument.
7827
7828 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
7829
7830         Decouple target code from remote protocol.
7831
7832         * target.h (enum target_waitkind): New.
7833         (struct target_waitstatus): New.
7834         (struct target_ops) <wait>: Return an unsigned long.  Take a
7835         target_waitstatus pointer instead of a char pointer.
7836         (mywait): Likewise.
7837         * target.c (mywait): Change prototype to return an unsigned long.
7838         Take a target_waitstatus pointer instead of a char pointer.  Adjust.
7839         * server.h (thread_from_wait, old_thread_from_wait): Delete
7840         declarations.
7841         (prepare_resume_reply): Change prototype to take a
7842         target_waitstatus.
7843         * server.c (thread_from_wait, old_thread_from_wait): Delete.
7844         (last_status, last_ptid): New.
7845         (start_inferior): Remove "statusptr" argument.  Adjust.  Return a
7846         pid instead of a signal.
7847         (attach_inferior): Remove "status" and "signal" parameters.
7848         Adjust.
7849         (handle_query): For qGetTLSAddr, parse the thread id with strtol,
7850         not as an address.
7851         (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
7852         (handle_v_requests, myresume): Remove "status" and "signal"
7853         parameters.  Adjust.
7854         (handle_status): New.
7855         (main): Delete local `status'.  Adjust.
7856         * remote-utils.c: Include target.h.
7857         (prepare_resume_reply): Change prototype to take a
7858         target_waitstatus.  Adjust.
7859
7860         * linux-low.c (linux_wait): Adjust to new target_ops->wait
7861         interface.
7862         * spu-low.c (spu_wait): Adjust.
7863         * win32-low.c (enum target_waitkind, struct target_waitstatus):
7864         Delete.
7865         (win32_wait): Adjust.
7866
7867 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
7868
7869         * target.h (struct thread_resume): Delete leave_stopped member.
7870         (struct target_ops): Add a `n' argument to the `resume' callback.
7871         * server.c (start_inferior): Adjust.
7872         (handle_v_cont, myresume): Adjust.
7873         * linux-low.c (check_removed_breakpoint): Adjust to resume
7874         interface change, and to removed leave_stopped field.
7875         (resume_ptr): Delete.
7876         (struct thread_resume_array): New.
7877         (linux_set_resume_request): Add new `arg' parameter.  Adjust to
7878         resume interface change.
7879         (linux_continue_one_thread, linux_queue_one_thread)
7880         (resume_status_pending_p): Check if the resume field is NULL
7881         instead of checking the leave_stopped member.
7882         (linux_resume): Adjust to the target resume interface change.
7883         * spu-low.c (spu_resume): Adjust to the target resume interface
7884         change.
7885         * win32-low.c (win32_detach, win32_resume): Ditto.
7886
7887 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
7888
7889         * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
7890         flag.
7891         (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
7892         pending.
7893         (linux_continue_one_thread): Only preserve the stepping flag if
7894         there's a pending breakpoint.
7895
7896 2009-03-31  Pedro Alves  <pedro@codesourcery.com>
7897
7898         * server.c (main): After the inferior having exited, call
7899         remote_close before exiting gdbserver.
7900
7901 2009-03-25  Thiago Jung Bauermann  <bauerman@br.ibm.com>
7902
7903         Fix size of FPSCR in Power 7 processors.
7904         * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
7905         (PPC_FEATURE_HAS_DFP): New #define.
7906         (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
7907         size of the FPSCR.
7908
7909 2009-03-23  Pedro Alves  <pedro@codesourcery.com>
7910
7911         * server.c (handle_query) Whitespace and formatting.
7912
7913 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
7914
7915         * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
7916         linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
7917         linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
7918         linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
7919         regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
7920         thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
7921         Makefile.in, configure.ac: Fix whitespace throughout.
7922         * configure: Regenerate.
7923
7924 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
7925
7926         * inferiors.c (find_inferior): Make it safe for the callback
7927         function to delete the currently iterated inferior.
7928
7929 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
7930
7931         * Makefile.in (linuw_low_h): Move higher.
7932         (thread-db.o): Depend on $(linux_low_h).
7933
7934 2009-03-17  Pedro Alves  <pedro@codesourcery.com>
7935
7936         Rename "process" to "lwp" throughout.
7937
7938         * linux-low.c (all_processes): Rename to...
7939         (all_lwps): ... this.
7940         (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
7941         (add_process): Rename to ...
7942         (add_lwp): ... this.  Adjust.
7943         (linux_create_inferior): Adjust.
7944         (linux_attach_lwp): Adjust.
7945         (linux_attach): Adjust.
7946         (linux_kill_one_process): Rename to ...
7947         (linux_kill_one_lwp): ... this.  Adjust.
7948         (linux_kill): Adjust.
7949         (linux_detach_one_process): Rename to ...
7950         (linux_detach_one_lwp): ... this.  Adjust.
7951         (linux_detach): Adjust.
7952         (check_removed_breakpoint): Adjust.
7953         (status_pending_p): Adjust.
7954         (linux_wait_for_process): Rename to ...
7955         (linux_wait_for_lwp): ... this.  Adjust.
7956         (linux_wait_for_event): Adjust.
7957         (send_sigstop): Adjust.
7958         (wait_for_sigstop): Adjust.
7959         (stop_all_processes): Rename to ...
7960         (stop_all_lwps): ... this.
7961         (linux_resume_one_process): Rename to ...
7962         (linux_resume_one_lwp): ... this.  Adjust.
7963         (linux_set_resume_request, linux_continue_one_thread)
7964         (linux_queue_one_thread, resume_status_pending_p)
7965         (usr_store_inferior_registers, regsets_store_inferior_registers)
7966         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
7967         Adjust.
7968         * linux-low.h (get_process): Rename to ...
7969         (get_lwp): ... this.  Adjust.
7970         (get_thread_process): Rename to ...
7971         (get_thread_lwp): ... this.  Adjust.
7972         (get_process_thread): Rename to ...
7973         (get_lwp_thread): ... this.  Adjust.
7974         (struct process_info): Rename to ...
7975         (struct lwp_info): ... this.
7976         (all_processes): Rename to ...
7977         (all_lwps): ... this.
7978         * proc-service.c (ps_lgetregs): Adjust.
7979         * thread-db.c (thread_db_create_event, find_one_thread)
7980         (maybe_attach_thread, thread_db_get_tls_address): Adjust.
7981
7982 2009-03-14  Pedro Alves  <pedro@codesourcery.com>
7983
7984         * server.c (handle_query): Handle "qAttached".
7985
7986 2009-03-13  Nathan Sidwell  <nathan@codesourcery.com>
7987
7988         * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
7989         GPLv3, update license URL.
7990
7991 2009-03-01  Doug Evans  <dje@google.com>
7992
7993         * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
7994         (server_h): Add gdb_signals.h.
7995         (signals.o): Update.
7996         * server.h (target_signal_from_host,target_signal_to_host_p)
7997         (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
7998
7999 2009-02-14  Pierre Muller  <muller@ics.u-strasbg.fr>
8000
8001         * remote-utils.c (getpkt): Also generate remote-debug
8002         information if noack_mode is set.
8003
8004 2009-02-06  Pedro Alves  <pedro@codesourcery.com>
8005
8006         * server.c (handle_query): Report qXfer:siginfo:read and
8007         qXfer:siginfo:write as supported and handle them.
8008         * target.h (struct target_ops) <qxfer_siginfo>: New field.
8009         * linux-low.c (linux_xfer_siginfo): New.
8010         (linux_target_ops): Set it.
8011
8012 2009-01-26  Pedro Alves  <pedro@codesourcery.com>
8013
8014         * server.c (gdbserver_usage): Mention --remote-debug.
8015         (main): Accept '--remote-debug' switch.
8016
8017 2009-01-18  Doug Evans  <dje@google.com>
8018
8019         * regcache.c (new_register_cache): No need to check result of xcalloc.
8020         * server.c (handle_search_memory): Back out calls to xmalloc,
8021         result is checked and error is returned to user upon failure.
8022         (handle_query): Ditto.  Add more checks for result of malloc.
8023         (handle_v_cont): Check result of malloc, report error back to
8024         user upon failure.
8025         (handle_v_run): Ditto.  Call freeargv.
8026         * server.h (freeargv): Declare.
8027         * utils.c (freeargv): New fn.
8028
8029 2009-01-15  Doug Evans  <dje@google.com>
8030
8031         * gdbreplay.c (perror_with_name): Make arg const char *.
8032         * server.h (target_signal_to_name): Make return type const char *.
8033         * thread-db.c (thread_db_err_str): Make return type const char *.
8034         * utils.c (perror_with_name): Make arg const char *.
8035
8036 2009-01-14  Pedro Alves  <pedro@codesourcery.com>
8037
8038         * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
8039         when handling a EXIT_PROCESS_DEBUG_EVENT.
8040
8041 2009-01-06  Joel Brobecker  <brobecker@adacore.com>
8042
8043         * gdbreplay.c (gdbreplay_version): Update copyright year.
8044         * server.c (gdbserver_version): Likewise.
8045
8046 2009-01-05  Doug Evans  <dje@google.com>
8047
8048         * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
8049         (handle_extended_wait): Improve comment.
8050
8051 2008-12-13  Doug Evans  <dje@google.com>
8052
8053         * utils.c (xmalloc,xcalloc,xstrdup): New fns.
8054         * server.h (ATTR_MALLOC): New macro.
8055         (xmalloc,xcalloc,xstrdup): Declare.
8056         * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
8057         * inferiors.c: Ditto.
8058         * linux-low.c: Ditto.
8059         * mem-break.c: Ditto.
8060         * regcache.c: Ditto.
8061         * remote-utils.c: Ditto.
8062         * server.c: Ditto.
8063         * target.c: Ditto.
8064         * win32-low.c: Ditto.
8065
8066 2008-12-12  Doug Evans  <dje@google.com>
8067
8068         * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
8069         in debugging printf.
8070
8071         * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
8072
8073 2008-12-09  Doug Evans  <dje@google.com>
8074
8075         * linux-low.h (struct process_info): Delete member tid, unused.
8076         * thread-db.c (find_one_thread): Update.
8077         (maybe_attach_thread): Update.
8078
8079 2008-12-02  Pedro Alves  <pedro@codesourcery.com>
8080
8081         * target.h (struct target_ops): Add qxfer_osdata member.
8082         * linux-low.c: Include ctype.h and pwd.h and sys/types.h
8083         and dirent.h.
8084         (linux_qxfer_osdata): New functions.
8085         (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
8086         callback.
8087         * server.c (handle_query): Handle "qXfer:osdata:read:".
8088         * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
8089         (buffer_xml_printf): New functions.
8090         * server.h (struct buffer): New.
8091         (buffer_grow_str, buffer_grow_str0): New macros.
8092         (buffer_grow, buffer_free, buffer_init, buffer_finish)
8093         (buffer_xml_printf): Declare.
8094
8095 2008-11-24  Doug Evans  <dje@google.com>
8096
8097         * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
8098
8099 2008-11-24  Daniel Jacobowitz  <dan@codesourcery.com>
8100
8101         * server.c (handle_v_run): Always use the supplied argument list.
8102
8103 2008-11-19  Bob Wilson  <bob.wilson@acm.org>
8104
8105         * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
8106         (xtensa_regmap_table): Add entry for scompare1.
8107
8108 2008-11-18  Thiago Jung Bauermann  <bauerman@br.ibm.com>
8109
8110         * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
8111         powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
8112         powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
8113         powerpc-isa205-64l.o, powerpc-isa205-64l.c,
8114         powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
8115         powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
8116         * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
8117         XML target descriptions.
8118         * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
8119         when inferior is running on an ISA 2.05 or later processor.  Add
8120         special case to return offset for full 64-bit slot of FPSCR when
8121         in 32-bits.
8122
8123 2008-11-14  Daniel Gutson  <dgutson@codesourcery.com>
8124
8125         * Makefile.in (SFILES, clean): Added sparc64 files.
8126         (reg-sparc64.o, reg-sparc64.c): New.
8127         * configure.srv (sparc*-*-linux*): New configuration.
8128         * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
8129         syscall arguments for SPARC.
8130         (regsets_store_inferior_registers): Likewise.
8131         * linux-sparc-low.c: New file.
8132
8133 2008-10-21  Doug Evans  <dje@google.com>
8134
8135         * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
8136         (READLINE_DIR,READLINE_DEP): Delete.
8137         (INTERNAL_CFLAGS): Update.
8138         (LINTFLAGS): Update.
8139
8140 2008-10-10  Pedro Alves  <pedro@codesourcery.com>
8141
8142         * server.c (handle_v_run): If GDB didn't specify an argv, use the
8143         whole argv from the last run, not just argv[0].
8144
8145 2008-09-08  Pedro Alves  <pedro@codesourcery.com>
8146
8147         * regcache.c (new_register_cache): Return NULL if the register
8148         cache size isn't known yet.
8149         (free_register_cache): Avoid dereferencing a NULL regcache.
8150
8151 2008-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
8152
8153         * configure.srv: Merge MIPS and MIPS64.
8154
8155 2008-08-24  Maciej W. Rozycki  <macro@linux-mips.org>
8156
8157         * Makefile.in (uninstall): Apply $(EXEEXT) too.
8158
8159 2008-08-18  Luis Machado  <luisgpm@br.ibm.com>
8160
8161         * Makefile.in: Add required vsx dependencies.
8162
8163         * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
8164         Declare init_registers_powerpc_vsx32l.
8165         Declare init_registers_powerpc_vsx64l.
8166         Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
8167         (ppc_arch_setup): Check for VSX in hwcap.
8168         (ppc_fill_vsxregset): New function.
8169         (ppc_store_vsxregset): New function.
8170         Add new VSX entry in regset_info target_regsets.
8171
8172         * configure.srv: Add new VSX dependencies.
8173
8174 2008-08-12  Pedro Alves  <pedro@codesourcery.com>
8175
8176         * remote-utils.c (noack_mode, transport_is_reliable): New globals.
8177         (remote_open): Set or clear transport_is_reliable.
8178         (putpkt_binary): Don't expect acks in noack mode.
8179         (getpkt): Don't send ack/nac in noack mode.
8180         * server.c (handle_general_set): Handle QStartNoAckMode.
8181         (handle_query): If connected by tcp pass QStartNoAckMode+ in
8182         qSupported.
8183         (main): Reset noack_mode on every connection.
8184         * server.h (noack_mode): Declare.
8185
8186 2008-08-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8187
8188         * Makefile.in (GDBREPLAY_OBS): New variable.
8189         (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
8190
8191 2008-08-05  Ulrich Weigand  <uweigand@de.ibm.com>
8192             Daniel Jacobowitz  <dan@codesourcery.com>
8193
8194         * linux-low.c (linux_resume_one_process): Ignore ESRCH.
8195         (usr_store_inferior_registers): Likewise.
8196         (regsets_store_inferior_registers): Likewise.
8197
8198 2008-07-31  Rolf Jansen  <rj@surtec.com>
8199             Pedro Alves  <pedro@codesourcery.com>
8200
8201         * configure.ac: Check for memmem declaration.
8202         * server.c [HAVE_MALLOC_H]: Include malloc.h.
8203         (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
8204         (disable_packet_qfThreadInfo): Unconditionally compile.
8205         * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
8206         * configure, config.in: Regenerate.
8207
8208 2008-07-28  Doug Kwan  <dougkwan@google.com>
8209
8210         * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
8211         (linux_write_memory): Remove declaration of errno.
8212
8213 2008-07-12  Ulrich Weigand  <uweigand@de.ibm.com>
8214
8215         * linux-low.c (handle_extended_wait): Do not use "status"
8216         variable uninitialized.
8217
8218 2008-07-07  Pedro Alves  <pedro@codesourcery.com>
8219
8220         * server.c (handle_v_attach): Inhibit reporting dll changes.
8221
8222 2008-06-27  Pedro Alves  <pedro@codesourcery.com>
8223
8224         * remote-utils.c (prepare_resume_reply): If requested, don't
8225         output "thread:TID" in the T stop reply.
8226
8227         * server.c (disable_packet_vCont, disable_packet_Tthread)
8228         (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
8229         (handle_query): If requested, disable support for qC, qfThreadInfo
8230         and qsThreadInfo.
8231         (handle_v_requests): If requested, disable support for vCont.
8232         (gdbserver_show_disableable): New.
8233         (main): Handle --disable-packet and --disable-packet=LIST.
8234
8235         * server.h (disable_packet_vCont, disable_packet_Tthread)
8236         (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
8237
8238 2008-06-20  Carlos O'Donell  <carlos@codesourcery.com>
8239
8240         * server.c (gdbserver_usage): Mention --version.
8241
8242 2008-06-06  Daniel Jacobowitz  <dan@codesourcery.com>
8243
8244         * Makefile.in (gdbreplay.o): New rule.
8245
8246 2008-06-06  Joseph Myers  <joseph@codesourcery.com>
8247
8248         * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
8249         message, not gdbserver.
8250
8251 2008-06-05  Vladimir Prus  <vladimir@codesourcery.com>
8252             Nathan Sidwell  <nathan@codesourcery.com>
8253             Joseph Myers  <joseph@codesourcery.com>
8254
8255         * acinclude.m4: Include ../../config/acx.m4.
8256         * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
8257         * configure, config.in: Regenerate.
8258         * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
8259         * server.c (gdbserver_version): Print PKGVERSION.
8260         (gdbsrever_usage): Add stream parameter.  Print REPORT_BUGS_TO.
8261         (main): Adjust gdbserver_usage calls.
8262         * gdbreplay.c (version, host_name): Add declarations.
8263         (gdbreplay_version, gdbreplay_usage): New.
8264         (main): Accept --version and --help options.
8265
8266 2008-06-04  Daniel Jacobowitz  <dan@codesourcery.com>
8267
8268         * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
8269         (arm_breakpoint_at): Handle Thumb.
8270         (the_low_target): Add comment.
8271
8272 2008-05-29  Ulrich Weigand  <uweigand@de.ibm.com>
8273
8274         * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
8275
8276 2008-05-09  Doug Evans  <dje@google.com>
8277
8278         * server.h (decode_search_memory_packet): Declare.
8279         * remote-utils.c (decode_search_memory_packet): New fn.
8280         * server.c (handle_search_memory_1): New fn.
8281         (handle_search_memory): New fn.
8282         (handle_query): Process qSearch:memory packets.
8283
8284 2008-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
8285
8286         * regcache.c (registers_length): Remove.
8287         (set_register_cache): Verify that PBUFSIZ is large enough to hold a
8288         full register packet.
8289         * regcache.h (registers_length): Remove prototype.
8290         * server.h (PBUFSIZ): Define to 16384.
8291
8292 2008-05-03  Ulrich Weigand  <uweigand@de.ibm.com>
8293
8294         * configure.srv (powerpc*-*-linux*): Set srv_regobj to
8295         powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
8296         powerpc-64l.o, and powerpc-altivec64l.o.
8297         Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
8298         rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
8299         rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
8300         rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
8301         rs6000/power-linux.xml, and rs6000/power64-linux.xml
8302         to srv_xmlfiles.
8303
8304         * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
8305         (powerpc-32l.o, powerpc-32l.c): ... these new rules.
8306         (powerpc-32.o, powerpc-32.c): Remove, replace by ...
8307         (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
8308         (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
8309         (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
8310         (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
8311         (powerpc-64l.o, powerpc-64l.c): ... these new rules.
8312         (powerpc-64.o, powerpc-64.c): Remove, replace by ...
8313         (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
8314         (clean): Update.
8315
8316         * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
8317         (init_registers_powerpc_32l): ... this new prototype.
8318         (init_registers_powerpc_32): Remove, replace by ...
8319         (init_registers_powerpc_altivec32l): ... this new prototype.
8320         (init_registers_powerpc_e500): Remove, replace by ...
8321         (init_registers_powerpc_e500l): ... this new prototype.
8322         (init_registers_ppc64): Remove, replace by ...
8323         (init_registers_powerpc_64l): ... this new prototype.
8324         (init_registers_powerpc_64): Remove, replace by ...
8325         (init_registers_powerpc_altivec64l): ... this new prototype.
8326         (ppc_num_regs): Set to 73.
8327         (PT_ORIG_R3, PT_TRAP): Define if necessary.
8328         (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
8329         (ppc_cannot_store_register): Handle orig_r3 and trap.
8330         (ppc_arch_setup): Update init_registers_... calls.
8331         (ppc_fill_gregset): Handle orig_r3 and trap.
8332
8333         * inferiors.c (clear_inferiors): Reset current_inferior.
8334
8335 2008-04-23  Paolo Bonzini  <bonzini@gnu.org>
8336
8337         * acinclude.m4: Add override.m4.
8338         * configure: Regenerate.
8339
8340 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
8341
8342         * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
8343         initial call to init_register_ppc64.
8344
8345 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
8346
8347         * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
8348         single powerpc*-*-linux* case.
8349         (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
8350
8351 2008-04-17  Ulrich Weigand  <uweigand@de.ibm.com>
8352
8353         * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
8354         srv_regobj.  Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
8355         from reg_xmlfiles.
8356         * linux-ppc-low.c: Include <elf.h>.
8357         (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
8358         (ppc_hwcap): New global variable.
8359         (ppc_regmap): Remove __SPE__ #ifdef sections.
8360         (ppc_regmap_e500): New global variable.
8361         (ppc_cannot_store_register): Update __SPE__ special case.
8362         (ppc_get_hwcap): New function.
8363         (ppc_arch_setup): Use it to determine whether inferior supports
8364         AltiVec or SPE registers.  Set the_low_target.regmap if appropriate.
8365         (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
8366         Do not access registers if target does not support AltiVec.
8367         (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
8368         Do not access registers if target does not support SPE.
8369         (target_regsets): Unconditionally include AltiVec and SPE regsets.
8370
8371 2008-04-17  Daniel Jacobowitz  <dan@codesourcery.com>
8372
8373         * linux-low.c (disabled_regsets, num_regsets): New.
8374         (use_regsets_p): Delete.
8375         (linux_wait_for_process): Clear disabled_regsets.
8376         (regsets_fetch_inferior_registers): Check and set it.
8377         (regsets_store_inferior_registers): Likewise.
8378         (linux_fetch_registers, linux_store_registers): Do not use
8379         use_regsets_p.
8380         (initialize_low): Allocate disabled_regsets.
8381
8382 2008-04-14  Daniel Jacobowitz  <dan@codesourcery.com>
8383
8384         * Makefile.in (LIBOBJS): New.
8385         (OBS): Use LIBOBJS.
8386         (memmem.o): New rule.
8387         * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
8388         * configure: Regenerated.
8389
8390 2008-04-04  Ulrich Weigand  <uweigand@de.ibm.com>
8391
8392         * server.c (handle_query): Never return "unsupported" for
8393         qXfer:features:read queries.
8394
8395 2008-03-27  Ulrich Weigand  <uweigand@de.ibm.com>
8396
8397         * server.c (get_features_xml): Fix inverted condition.
8398         (handle_query): Always support qXfer:feature:read.
8399
8400 2008-03-10  Daniel Jacobowitz  <dan@codesourcery.com>
8401
8402         * server.c (wrapper_argv): New.
8403         (start_inferior): Handle wrapper_argv.  If set, expect an extra
8404         trap.
8405         (gdbserver_usage): Document --wrapper.
8406         (main): Parse --wrapper.
8407
8408 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
8409
8410         * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
8411         powerpc-*-linux* to srv_regobj and reg_xmlfiles.
8412         * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
8413         (ppc_set_pc): Likewise.
8414         (ppc_arch_setup): New function.
8415         (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
8416         of collect_register.
8417         (the_low_target): Use ppc_arch_setup as arch_setup initializer.
8418
8419 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
8420
8421         * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
8422         instead of linux-ppc64-low.o.
8423         * linux-ppc64-low.c: Remove file.
8424         * Makefile.in (SFILES): Remove linux-ppc64-low.c.
8425         (linux-ppc64-low.o): Remove rule.
8426
8427         * linux-ppc-low.c (init_registers_ppc64): Add prototype.
8428         (init_registers_powerpc_64): Likewise.
8429         (ppc_regmap): Conditionally define depending on __powerpc64__.
8430         (ppc_cannot_store_register): Do not special-case "fpscr" when
8431         compiled on __powerpc64__.
8432         (ppc_collect_ptrace_register): New function.
8433         (ppc_supply_ptrace_register): New function.
8434         (ppc_breakpoint): Change type to "unsigned int".
8435         (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
8436         (the_low_target): Conditionally provide initializers for the
8437         arch_setup member depending on __powerpc64__.  Install
8438         collect_ptrace_register and supply_ptrace_register members.
8439
8440 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
8441
8442         * regcache.h (gdbserver_xmltarget): Add extern declaration.
8443         * server.c (gdbserver_xmltarget): Define.
8444         (get_features_xml): Use it to replace "target.xml" and arch_string.
8445
8446         * configure.srv: Remove srv_xmltarget.  Add XML files that were
8447         mentioned there to srv_xmlfiles instead.  Remove conditional tests
8448         on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
8449         srv_xmlfiles and srv_regobj to include all possible choices.
8450         * configure.ac (srv_xmltarget): Remove.
8451         (srv_xmlfiles): Do not add "target.xml".
8452         (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
8453         checks for supplementary target information.
8454         * configure: Regenerate.
8455         * Makefile.in (XML_TARGET): Remove.
8456         (target.xml): Remove rule.
8457         (clean): Do not clean up target.xml.
8458         (.PRECIOUS): Do not mention target.xml.
8459
8460         * target.h (struct target_ops): Remove arch_string member.
8461         * linux-low.c (linux_arch_string): Remove.
8462         (linux_target_ops): Remove arch_string initializer.
8463         * linux-low.h (struct linux_target_ops): Remove arch_string member.
8464         * linux-i386-low.c (the_low_target): Remove arch_string initializer.
8465         * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
8466         * spu-low.c (spu_arch_string): Remove.
8467         (spu_target_ops): Remove arch_string initializer.
8468         * win32-low.c (win32_arch_string): Remove.
8469         (win32_target_ops): Remove arch_string initializer.
8470         * win32-low.h (struct win32_target_ops): Remove arch_string member.
8471         * win32-arm-low.c (the_low_target): Remove arch_string initializer.
8472         * win32-i368-low.c (the_low_target): Remove arch_string initializer.
8473
8474 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
8475
8476         * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
8477         by collect_ptrace_register and supply_ptrace_register hooks.
8478         * linux-low.c (fetch_register): Use supply_ptrace_register callback
8479         instead of checking for the_low_target.left_pad_xfer.
8480         (usr_store_inferior_registers): Use collect_ptrace_register callback
8481         instead of checking for the_low_target.left_pad_xfer.
8482
8483         * linux-s390-low.c (s390_collect_ptrace_register): New function.
8484         (s390_supply_ptrace_register): Likewise.
8485         (s390_fill_gregset): Call s390_collect_ptrace_register.
8486         (the_low_target): Update.
8487
8488         * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
8489         (ppc_supply_ptrace_register): Likewise.
8490         (the_low_target): Update.
8491
8492         * linux-i386-low.c (the_low_target): Update.
8493         * linux-x86-64-low.c (the_low_target): Update.
8494
8495 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
8496
8497         * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
8498         reg-s390.o and reg-s390x.o.
8499
8500         * linux-low.c (new_inferior): New global variable.
8501         (linux_create_inferior, linux_attach): Set it.
8502         (linux_wait_for_process): Call the_low_target.arch_setup after the
8503         target has stopped for the first time.
8504         (initialize_low): Do not call the_low_target.arch_setup.
8505
8506         * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
8507         (s390_set_pc): Likewise.
8508         (s390_arch_setup): New function.
8509         (the_low_target): Use s390_arch_setup as arch_setup routine.
8510
8511         * regcache.c (realloc_register_cache): New function.
8512         (set_register_cache): Call it for each existing regcache.
8513
8514 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
8515
8516         * server.h (init_registers): Remove prototype.
8517
8518         * linux-low.h (struct linux_target_ops): Add arch_setup field.
8519         * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
8520         instead of init_registers ().
8521         * linux-arm-low.c (init_registers_arm): Add prototype.
8522         (init_registers_arm_with_iwmmxt): Likewise.
8523         (the_low_target): Add initializer for arch_setup field.
8524         * linux-cris-low.c (init_registers_cris): Add prototype.
8525         (the_low_target): Add initializer for arch_setup field.
8526         * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
8527         (the_low_target): Add initializer for arch_setup field.
8528         * linux-i386-low.c (init_registers_i386_linux): Add prototype.
8529         (the_low_target): Add initializer for arch_setup field.
8530         * linux-ia64-low.c (init_registers_ia64): Add prototype.
8531         (the_low_target): Add initializer for arch_setup field.
8532         * linux-m32r-low.c (init_registers_m32r): Add prototype.
8533         (the_low_target): Add initializer for arch_setup field.
8534         * linux-m68k-low.c (init_registers_m68k): Add prototype.
8535         (the_low_target): Add initializer for arch_setup field.
8536         * linux-mips-low.c (init_registers_mips_linux): Add prototype.
8537         (init_registers_mips64_linux): Likewise.
8538         (the_low_target): Add initializer for arch_setup field.
8539         * linux-ppc-low.c (init_registers_ppc): Add prototype.
8540         (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
8541         (the_low_target): Add initializer for arch_setup field.
8542         * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
8543         (init_registers_powerpc_64): Likewise.
8544         (the_low_target): Add initializer for arch_setup field.
8545         * linux-s390-low.c (init_registers_s390): Add prototype.
8546         (init_registers_s390x): Likewise.
8547         (the_low_target): Add initializer for arch_setup field.
8548         * linux-sh-low.c (init_registers_sh): Add prototype.
8549         (the_low_target): Add initializer for arch_setup field.
8550         * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
8551         (the_low_target): Add initializer for arch_setup field.
8552         * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
8553         (the_low_target): Add initializer for arch_setup field.
8554
8555         * win32-low.h (struct win32_target_ops): Add arch_setup field.
8556         * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
8557         instead of init_registers ().
8558         * win32-arm-low.c (init_registers_arm): Add prototype.
8559         (the_low_target): Add initializer for arch_setup field.
8560         * win32-i386-low.c (init_registers_i386): Add prototype.
8561         (the_low_target): Add initializer for arch_setup field.
8562
8563         * spu-low.c (init_registers_spu): Add prototype.
8564         (initialize_low): Call initialie_registers_spu () instead of
8565         initialize_registers ().
8566
8567 2008-02-19  Pedro Alves  <pedro@codesourcery.com>
8568
8569         * server.c (handle_v_requests): When handling the vRun and vAttach
8570         packets, if already debugging a process, don't kill it.  Return an
8571         error instead.
8572
8573 2008-02-17  Daniel Jacobowitz  <dan@codesourcery.com>
8574
8575         * server.c (handle_query): Correct length check.
8576
8577 2008-02-14  Pedro Alves  <pedro_alves@portugalmail.pt>
8578
8579         * win32-low.c (do_initial_child_stuff): Add process handle
8580         parameter.  Set current_process_handle and current_process_id from the
8581         parameters. Clear globals.
8582         (win32_create_inferior): Don't set current_process_handle and
8583         current_process_id here.  Instead pass them on the call to
8584         do_initial_child_stuff.
8585         (win32_attach): Likewise.
8586         (win32_clear_inferiors): New.
8587         (win32_kill): Don't close the current process handle or the
8588         current thread handle here.  Instead call win32_clear_inferiors.
8589         (win32_detach): Don't open a new handle to the process.  Call
8590         win32_clear_inferiors.
8591         (win32_join): Don't rely on current_process_handle; open a new
8592         handle using the process id.
8593         (win32_wait): Call win32_clear_inferiors when the inferior process
8594         has exited.
8595
8596 2008-02-14  Daniel Jacobowitz  <dan@codesourcery.com>
8597
8598         * server.c (monitor_show_help): Add "exit".
8599
8600 2008-02-11  Maxim Grigoriev  <maxim2405@gmail.com>
8601
8602         * Makefile.in (SFILES): Add linux-xtensa-low.c.
8603         (clean): Add reg-xtensa.c.
8604         (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
8605         * configure.srv (xtensa*-*-linux*) New target.
8606         * linux-xtensa-low.c: New.
8607         * xtensa-xtregs.c: New.
8608
8609 2008-02-01  Pedro Alves  <pedro_alves@portugalmail.pt>
8610
8611         * hostio.c: Don't include errno.h.
8612         (errno_to_fileio_errno): Move to hostio-errno.
8613         * hostio.c: (hostio_error): Remove the error parameter.  Defer the
8614         error number outputting to the target->hostio_last_error callback.
8615         (hostio_packet_error): Use FILEIO_EINVAL directly.
8616         (handle_open, handle_pread, hostio_error, handle_unlink): Update
8617         calls to hostio_error.
8618         * hostio-errno.c: New.
8619         * server.h (hostio_last_error_from_errno): Declare.
8620         * target.h (target_ops): Add hostio_last_error member.
8621         * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
8622         as hostio_last_error handler.
8623         * spu-low.c (spu_target_ops): Likewise.
8624         * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
8625         (wince_hostio_last_error): New functions.
8626         (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
8627         as hostio_last_error handler.
8628         (win32_target_ops) [!_WIN32_WCE]: Register
8629         hostio_last_error_from_errno as hostio_last_error handler.
8630         * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
8631         (hostio-errno.o): New rule.
8632         * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
8633         * configure.srv (srv_hostio_err_objs): New variable.  Default to
8634         hostio-errno.o.
8635         (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
8636         * configure: Regenerate.
8637
8638 2008-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
8639
8640         * linux-low.c (linux_attach_lwp): Do not _exit after errors.
8641         (linux_kill, linux_detach): Clean up the process list.
8642         * remote-utils.c (remote_open): Improve port number parsing.
8643         (putpkt_binary, input_interrupt): Only send interrupts if the target
8644         is running.
8645         * server.c (extended_protocol): Make static.
8646         (attached): Define earlier.
8647         (exit_requested, response_needed, program_argv): New variables.
8648         (target_running): New.
8649         (start_inferior): Clear attached here.
8650         (attach_inferior): Set attached here.
8651         (require_running): Define.
8652         (handle_query): Use require_running and target_running.  Implement
8653         "monitor exit".
8654         (handle_v_attach, handle_v_run): New.
8655         (handle_v_requests): Use require_running.  Handle vAttach and vRun.
8656         (gdbserver_usage): Update.
8657         (main): Redo argument parsing.  Handle --debug and --multi.  Handle
8658         --attach along with other options or after the port.  Save
8659         program_argv.  Support no initial program.  Resynchronize
8660         communication with GDB after an error.  Handle "monitor exit".
8661         Use require_running and target_running.  Always allow the extended
8662         protocol.  Do not error out for Hc0 or Hc-1.  Do not automatically
8663         restart in extended mode.
8664         * README: Refer to the GDB manual.  Update --attach usage.
8665
8666 2007-12-20  Andreas Schwab  <schwab@suse.de>
8667
8668         * linux-low.c (STACK_SIZE): Define.
8669         (linux_tracefork_child): Use it.  Use __clone2 on ia64.
8670         (linux_test_for_tracefork): Likewise.
8671
8672 2007-12-18  Daniel Jacobowitz  <dan@codesourcery.com>
8673
8674         * linux-low.c (linux_wait_for_event): Update messages.  Do not
8675         reinsert auto-delete breakpoints.
8676         * mem-break.c (struct breakpoint): Change return type of handler to
8677         int.
8678         (set_breakpoint_at): Update handler type.
8679         (reinsert_breakpoint_handler): Return 1 instead of calling
8680         delete_breakpoint.
8681         (reinsert_breakpoint_by_bp): Check for the original breakpoint before
8682         setting a new one.
8683         (check_breakpoints): Delete auto-delete breakpoints and return 2.
8684         * mem-break.h (set_breakpoint_at): Update handler type.
8685         * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
8686         * win32-low.c (auto_delete_breakpoint): New.
8687         (get_child_debug_event): Use it.
8688
8689 2007-12-16  Daniel Jacobowitz  <dan@codesourcery.com>
8690
8691         * configure.ac: Check for pread and pwrite.
8692         * hostio.c (handle_pread): Fall back to lseek and read.
8693         (handle_pwrite): Fall back to lseek and write.
8694         * config.in, configure: Regenerated.
8695
8696 2007-12-07  Daniel Jacobowitz  <dan@codesourcery.com>
8697
8698         * server.c (myresume): Add own_buf argument.
8699         (main): Update calls.
8700
8701 2007-12-06  Daniel Jacobowitz  <dan@codesourcery.com>
8702
8703         * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
8704         * remote-utils.c (remote_open): Do not call disable_async_io.
8705         (block_async_io): Delete.
8706         (unblock_async_io): Make static.
8707         (initialize_async_io): New.
8708         * server.c (handle_v_cont): Handle async I/O here.
8709         (myresume): Likewise.  Move other common resume tasks here...
8710         (main): ... from here.  Call initialize_async_io.  Disable async
8711         I/O before the main loop.
8712         * server.h (initialize_async_io): Declare.
8713         (block_async_io, unblock_async_io): Delete prototypes.
8714         * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
8715
8716 2007-12-06  Mick Davis  <mickd@goanna.iinet.net.au>
8717
8718         * remote-utils.c (readchar): Allow binary data in received messages.
8719
8720 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
8721
8722         * win32-low.c (attaching): New global.
8723         (win32_create_inferior): Clear the `attaching' global.
8724         (win32_attach): Set the `attaching' global.
8725         (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
8726         attaching.  Only set a breakpoint at the entry point if not
8727         attaching.
8728
8729 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
8730
8731         * server.c (main): Don't report dll events on the initial
8732         connection on attaches.
8733
8734 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
8735
8736         * server.c (main): Relax numerical bases supported for the pid of
8737         the --attach command line argument.
8738
8739 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
8740
8741         * win32-low.c (win32_attach): Call OpenProcess before
8742         DebugActiveProcess, not after.  Add last error output to error
8743         call.
8744
8745 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
8746
8747         * win32-low.c (win32_get_thread_context)
8748         (win32_set_thread_context): New functions.
8749         (thread_rec): Use win32_get_thread_context.
8750         (continue_one_thread, win32_resume): Use win32_set_thread_context.
8751         * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
8752         field.
8753
8754 2007-12-03  Leo Zayas
8755             Pedro Alves  <pedro_alves@portugalmail.pt>
8756
8757         * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
8758         global variables.
8759         (child_add_thread): Minor cleanup.
8760         (child_continue): Resume artificially suspended threads before
8761         calling ContinueDebugEvent.
8762         (suspend_one_thread): New.
8763         (fake_breakpoint_event): New.
8764         (get_child_debug_event): Change return type to int.  Check here if
8765         gdb sent an interrupt request.  If a soft interrupt was requested,
8766         fake a breakpoint event.  Return 0 if there is no event to handle,
8767         and 1 otherwise.
8768         (win32_wait): Don't check here if gdb sent an interrupt request.
8769         Ensure there is a valid event to handle.
8770         (win32_request_interrupt): Add soft interruption method as last
8771         resort.
8772
8773 2007-12-03  Leo Zayas
8774             Pedro Alves  <pedro_alves@portugalmail.pt>
8775
8776         * win32-low.h (win32_thread_info): Add descriptions to the
8777         structure members.  Replace `suspend_count' counter by a
8778         `suspended' flag.
8779         * win32-low.c (thread_rec): Update condition of when to get the
8780         context from the inferior.  Rely on ContextFlags being set if it
8781         has already been retrieved.  Only suspend the inferior thread if
8782         we haven't already.  Warn if that fails.
8783         (continue_one_thread): s/suspend_count/suspended/.  Only call
8784         ResumeThread once.  Warn if that fails.
8785
8786 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
8787
8788         * win32-low.c (win32_wait): Don't read from the inferior when it
8789         has already exited.
8790
8791 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
8792
8793         * Makefile.in (win32_low_h): New variable.
8794         (win32-low.o): Add dependency on $(win32_low_h).
8795         (win32-arm-low.o, win32-i386-low.o): New rules.
8796
8797 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
8798
8799         * hostio.c: Correct copyright year.
8800
8801 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
8802
8803         * Makefile.in (OBS): Add hostio.o.
8804         (hostio.o): New rule.
8805         * server.h (handle_vFile): Declare.
8806         * hostio.c: New file.
8807         * server.c (handle_v_requests): Take packet_len and new_packet_len
8808         for binary packets.  Call handle_vFile.
8809         (main): Update call to handle_v_requests.
8810
8811 2007-11-05  Daniel Jacobowitz  <dan@codesourcery.com>
8812
8813         * linux-low.c: Include <sched.h>.
8814
8815 2007-11-01  Daniel Jacobowitz  <dan@codesourcery.com>
8816
8817         * linux-low.c (linux_tracefork_grandchild): New.
8818         (linux_tracefork_child): Use clone.
8819         (linux_test_for_tracefork): Use clone; allocate and free a stack.
8820
8821 2007-10-31  Joel Brobecker  <brobecker@adacore.com>
8822
8823         * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
8824
8825 2007-10-24  Daniel Jacobowitz  <dan@codesourcery.com>
8826
8827         * linux-low.c (handle_extended_wait): Handle unexpected signals.
8828
8829 2007-10-23  Daniel Jacobowitz  <dan@codesourcery.com>
8830
8831         * inferiors.c (change_inferior_id): Delete.
8832         (add_pid_to_list, pull_pid_from_list): New.
8833         * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
8834         (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
8835         (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
8836         (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
8837         (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
8838         (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
8839         (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
8840         (using_threads): Always set to 1.
8841         (handle_extended_wait): New.
8842         (add_process): Do not set TID.
8843         (linux_create_inferior): Set must_set_ptrace_flags.
8844         (linux_attach_lwp): Remove TID argument.  Do not check using_threads.
8845         Use PTRACE_SETOPTIONS.  Call new_thread_notify.  Update all callers.
8846         (linux_thread_alive): Rename TID argument to LWPID.
8847         (linux_wait_for_process): Handle unknown processes.  Do not use TID.
8848         (linux_wait_for_event): Do not use TID or check using_threads.  Update
8849         call to dead_thread_notify.  Call handle_extended_wait.
8850         (linux_create_inferior): Use PTRACE_SETOPTIONS.
8851         (send_sigstop): Delete sigstop_sent.
8852         (wait_for_sigstop): Avoid TID.
8853         (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
8854         (linux_test_for_tracefork): New.
8855         (linux_lookup_signals): Use thread_db_active and
8856         linux_supports_tracefork_flag.
8857         (initialize_low): Use thread_db_active and linux_test_for_tracefork.
8858         * linux-low.h (get_process_thread): Avoid TID.
8859         (struct process_ifo): Move thread_known and tid to the end.  Remove
8860         sigstop_sent.
8861         (linux_attach_lwp, thread_db_init): Update prototypes.
8862         * server.h (change_inferior_id): Delete prototype.
8863         (add_pid_to_list, pull_pid_from_list): New prototypes.
8864         * thread-db.c (thread_db_use_events): New.
8865         (find_first_thread): Rename to...
8866         (find_one_thread): ...this.  Update callers and messages.  Do not
8867         call fatal.  Check thread_db_use_events.  Do not call
8868         change_inferior_id or new_thread_notify.
8869         (maybe_attach_thread): Update.  Do not call new_thread_notify.
8870         (thread_db_init): Set thread_db_use_events.  Check use_events.
8871         * utils.c (fatal, warning): Correct message prefix.
8872
8873 2007-10-15  Daniel Jacobowitz  <dan@codesourcery.com>
8874
8875         * Makefile.in (clean): Remove new files.
8876         (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
8877         (powerpc-64.o, powerpc-64.c): New rules.
8878         * configure.srv: Use alternate register sets for powerpc64-*-linux*
8879         with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
8880         with SPE.
8881         * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
8882         SPE targets.
8883         (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
8884         (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
8885         (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
8886         (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
8887         (target_regsets): Add AltiVec and SPE register sets.
8888         * configure.ac: Check for AltiVec and SPE.
8889         * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
8890         (ppc_fill_vrregset, ppc_store_vrregset): New.
8891         (target_regsets): Add AltiVec register set.
8892         * configure: Regenerated.
8893
8894 2007-09-19  Daniel Jacobowitz  <dan@codesourcery.com>
8895
8896         * linux-low.c (O_LARGEFILE): Define.
8897         (linux_read_memory): Use /proc/PID/mem.
8898         * configure.ac: Use AC_GNU_SOURCE.  Check for pread64.
8899         * configure, config.in: Regenerated.
8900
8901 2007-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
8902
8903         * linux-low.c (linux_wait_for_event): Do not pass signals while
8904         single-stepping.
8905
8906 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
8907
8908         * win32-low.c (create_process): New.
8909         (win32_create_inferior): Use create_process instead of
8910         CreateProcess.  If create_process failed retry appending an ".exe"
8911         suffix.  Store the GetLastError result immediatelly after
8912         create_process calls and use it on the call to error.
8913
8914 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
8915
8916         * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
8917
8918 2007-08-23  Joel Brobecker  <brobecker@adacore.com>
8919
8920         * configure.ac: Switch license to GPLv3.
8921
8922 2007-08-01  Michael Snyder  <msnyder@access-company.com>
8923
8924         * remote-utils.c (putpkt_binary): Memory leak, free buf2.
8925
8926 2007-07-31  Pedro Alves  <pedro_alves@portugalmail.pt>
8927
8928         * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
8929         typedef.
8930         (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
8931         (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL.  Get
8932         CloseToolhelp32Snapshot.
8933         (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
8934         CloseToolhelp32Snapshot.
8935
8936 2007-07-27  Michael Snyder  <michael.snyder@access-company.com>
8937
8938         * server.c (main): Check for inferior exit before main loop.
8939
8940 2007-07-18  Pedro Alves  <pedro_alves@portugalmail.pt>
8941
8942         * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
8943         instead of on tmp_desc.
8944
8945 2007-07-17  Pedro Alves  <pedro_alves@portugalmail.pt>
8946             Daniel Jacobowitz  <dan@codesourcery.com>
8947
8948         * inferiors.c (all_dlls, dlls_changed, get_dll): New.
8949         (add_thread): Minor cleanups.
8950         (clear_inferiors): Move lower in the file.  Clear the DLL
8951         list.
8952         (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
8953         * remote-utils.c (prepare_resume_reply): Check dlls_changed.
8954         (xml_escape_text): New.
8955         * server.c (handle_query): Handle qXfer:libraries:read.  Report it
8956         for qSupported.
8957         (handle_v_cont): Report errors.
8958         (gdbserver_version): Update.
8959         (main): Correct size of own_buf.  Do not report initial DLL events.
8960         * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
8961         (unloaded_dll, xml_escape_text): New.
8962         * win32-low.c (enum target_waitkind): Update comments.
8963         (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
8964         (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
8965         (win32_EnumProcessModules, win32_GetModuleInformation)
8966         (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
8967         (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
8968         (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
8969         (win32_Module32First, win32_Module32Next, load_toolhelp)
8970         (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
8971         (get_child_debug_event): Handle DLL events.
8972         (win32_wait): Likewise.
8973
8974 2007-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
8975
8976         * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
8977         * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
8978
8979 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
8980
8981         * win32-low.c (handle_output_debug_string): Ignore event if not
8982         waiting.
8983
8984 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
8985
8986         * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
8987
8988 2007-07-03  Daniel Jacobowitz  <dan@codesourcery.com>
8989
8990         * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
8991
8992 2007-07-02  Daniel Jacobowitz  <dan@codesourcery.com>
8993
8994         * inferiors.c (change_inferior_id): Add comment.
8995         * linux-low.c (check_removed_breakpoint): Add an early
8996         prototype.  Improve debug output.
8997         (linux_attach): Doc update.
8998         (linux_detach_one_process, linux_detach): Clean up before releasing
8999         each process.
9000         (send_sigstop, wait_for_sigstop): Improve comments and debug output.
9001         * linux-low.h (struct process_info): Doc improvement.
9002         * mem-break.c (delete_all_breakpoints): New.
9003         * mem-break.h (delete_all_breakpoints): New prototype.
9004         * thread-db.c (find_first_thread): New.
9005         (thread_db_create_event): Call it instead of
9006         thread_db_find_new_threads.  Clean up unused variables.
9007         (maybe_attach_thread): Remove first thread handling.
9008         (thread_db_find_new_threads): Use find_first_thread.
9009         (thread_db_get_tls_address): Likewise.
9010
9011 2007-06-27  Daniel Jacobowitz  <dan@codesourcery.com>
9012
9013         * thread-db.c (thread_db_find_new_threads): Add prototype.
9014         (thread_db_create_event): Check for the main thread before adding
9015         a new thread.
9016         (maybe_attach_thread): Only enable event reporting if TID == 0.
9017         (thread_db_get_tls_address): Check for new threads.
9018
9019 2007-06-20  Daniel Jacobowitz  <dan@codesourcery.com>
9020
9021         * linux-low.c (linux_create_inferior): Try execv before execvp.
9022         * spu-low.c (spu_create_inferior): Likewise.
9023
9024 2007-06-13  Mike Frysinger  <vapier@gentoo.org>
9025
9026         * linux-low.c (linux_create_inferior): Change execv to execvp.
9027         * spu-low.c (spu_create_inferior): Likewies.
9028
9029 2007-06-13  Daniel Jacobowitz  <dan@codesourcery.com>
9030
9031         * Makefile.in (clean): Clean new files instead of deleted ones.
9032         (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
9033         (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
9034         rules.
9035         * configure.srv: Specify XML files and new regformats for MIPS and
9036         MIPS64 GNU/Linux.
9037         * linux-mips-low.c (mips_num_regs): Set to only used registers.
9038         (mips_regmap): Do not fetch $0.  Remove unused registers.  Add
9039         an entry for the restart register.
9040         (mips_cannot_fetch_register, mips_cannot_store_register)
9041         (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
9042         register names to match the XML descriptions.
9043         (mips_fill_gregset, mips_store_gregset): Likewise.  Handle the
9044         restart register instead of $0.
9045
9046 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
9047             Markus Deuling  <deuling@de.ibm.com>
9048
9049         * remote-utils.c (decode_xfer_write): New function.
9050         * server.h (decode_xfer_write): Add prototype.
9051         * server.c (handle_query): Add PACKET_LEN argument.  Support
9052         qXfer:spu:read and qXfer:spu:write packets.
9053         (main): Pass packet_len to handle_query.
9054         * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
9055         * target.h (target_ops): Add qxfer_spu.
9056
9057 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
9058
9059         * spu-low.c (spu_proc_xfer_spu): Do not return failure when
9060         accessing non-seekable spufs files.
9061
9062 2007-05-16  Markus Deuling  <deuling@de.ibm.com>
9063
9064         * server.c (handle_query): Add reply for qC packet.
9065
9066 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
9067             Leo Zayas  <lerele@champenstudios@com>
9068
9069         * server.h (check_remote_input_interrupt_request): New function.
9070         * remote_utils.c (INVALID_DESCRIPTOR): New define.
9071         (remote_desc): Initialize with INVALID_DESCRIPTOR.
9072         (input_interrupt): Expose on USE_WIN32API too.  Fix whitespace.
9073         (check_remote_input_interrupt_request): New function.
9074         * server.h (check_remote_input_interrupt_request): Declare.
9075         * win32-low.c (winapi_DebugBreakProcess,
9076         winapi_GenerateConsoleCtrlEvent): New typedefs.
9077         (get_child_debug_event): Lower Win32 debug event polling from 1 sec
9078         to 250 ms.
9079         (win32_wait): Check for remote interrupt request
9080         with check_remote_input_interrupt_request.
9081         (win32_request_interrupt): New function.
9082         (win32_target_op): Set request_interrupt to win32_request_interrupt.
9083
9084 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
9085
9086         * win32-low.c (debug_registers_changed,
9087         debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
9088         CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
9089         CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
9090         (thread_rec): Get context using the low target.
9091         (child_add_thread): Call thread_added on the low target,
9092         which does the same thing.
9093         (regptr): Delete.
9094         (do_initial_child_stuff): Remove debug registers references.
9095         Set context using the low target.  Resume threads after
9096         setting the contexts.
9097         (child_continue): Remove dead variable.  Remove debug
9098         registers references.
9099         (child_fetch_inferior_registers): Go through the low target.
9100         (do_child_store_inferior_registers): Remove.
9101         (child_store_inferior_registers): Go through the low target.
9102         (win32_resume): Remove debug registers references.
9103         Set context using the low target.
9104         (handle_exception): Change return type to void.  Don't record
9105         context here.  Set status to TARGET_WAITKIND_SPURIOUS on a
9106         first chance exception.
9107         (get_child_debug_event): Change return type to void.  Remove
9108         goto loop.  Always return after waiting for debug event.
9109         (win32_wait): Convert to switch statement.  Handle spurious
9110         events.
9111
9112         * win32-i386-low.c (debug_registers_changed,
9113         debug_registers_used): New.
9114         (initial_stuff): Rename to ...
9115         (i386_initial_stuff): ... this.  Clear debug registers
9116         state variables.
9117         (store_debug_registers): Delete.
9118         (i386_get_thread_context): New.
9119         (load_debug_registers): Delete.
9120         (i386_set_thread_context): New.
9121         (i386_thread_added): New.
9122         (single_step): Rename to ...
9123         (i386_single_step): ... this.
9124         (do_fetch_inferior_registers): Rename to ...
9125         (i386_fetch_inferior_register): ... this.
9126         (i386_store_inferior_register): New.
9127         (the_low_target): Adapt to new interface.
9128
9129         * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
9130         (arm_get_thread_context): New.
9131         (arm_set_thread_context): New.
9132         (regptr): New.
9133         (do_fetch_inferior_registers): Rename to ...
9134         (arm_fetch_inferior_register): ... this.
9135         (arm_store_inferior_register): New.
9136         (arm_wince_breakpoint): Reimplement as unsigned long.
9137         (arm_wince_breakpoint_len): Define.
9138         (the_low_target): Adapt to new interface.
9139
9140         * win32-low.h (target_ops): Remove regmap, store_debug_registers and
9141         load_debug_registers.  Add get_thread_context, set_thread_context,
9142         thread_added and store_inferior_register.  Rename
9143         fetch_inferior_registers to fetch_inferior_register.
9144         (regptr): Remove declaration.
9145
9146 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
9147
9148         * linux-low.c (linux_detach): Change return type to int.  Return 0.
9149         * spu-low.c (spu_detach): Likewise.
9150
9151 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
9152
9153         * target.h (target_ops): Change return type of detach to int.
9154         Add join.
9155         (join_inferior): New.
9156         * server.c (main): Don't skip detach support on mingw32.
9157         If the inferior doesn't support detaching return error.
9158         Call join_inferior instead of using waitpid.
9159         * linux-low.c (linux_join): New.
9160         (linux_target_op): Add linux_join.
9161         * spu-low.c (spu_join): New.
9162         (spu_target_ops): Add spu_join.
9163         * win32-low.c (win32_detach): Adapt to new interface.
9164         Reopen current_process_handle before detaching.  Issue a child
9165         resume before detaching.
9166         (win32_join): New.
9167         (win32_target_op): Add win32_join.
9168
9169 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
9170
9171         * win32-low.c (win32-attach): Fix return value.
9172         * target.h (target_ops): Describe ATTACH return values.
9173
9174 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
9175
9176         * win32-low.c (GETPROCADDRESS): Define.
9177         (winapi_DebugActiveProcessStop): Add WINAPI.  typedef as pointer.
9178         (winapi_DebugSetProcessKillOnExit): Likewise.
9179         (win32_create_inferior): Force usage of ansi CreateProcessA.
9180         (win32_attach): Use GETPROCADDRESS.
9181         (win32_detach): Likewise.
9182
9183 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
9184
9185         * win32-low.c (win32_wait): Don't use WSTOPSIG.
9186
9187 2007-03-30  Pedro Alves  <pedro_alves@portugalmail.pt>
9188
9189         * win32-low.c: Commit leftover changes from 2007-03-29.
9190
9191 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
9192
9193         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
9194         fields short instead of int.  Add explicit padding.
9195         (i387_cache_to_fsave): Remove unnecessary casts.
9196         (i387_fsave_to_cache): Doc fix.
9197         (i387_cache_to_fxsave): Remove unnecessary casts and masking.
9198
9199 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
9200
9201         * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
9202         (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
9203
9204 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
9205
9206         * configure.srv (arm*-*-mingw32ce*): Move near the other
9207         arm targets.
9208
9209 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
9210
9211         * configure.ac: Add errno checking.
9212         (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
9213         sys/file.h and malloc.h.
9214         (AC_CHECK_DECLS): Add perror.
9215         (srv_mingwce): Handle.
9216         * configure.srv (i[34567]86-*-cygwin*): Add
9217         win32-i386-low.o to srv_tgtobj.
9218         (i[34567]86-*-mingw*): Likewise.
9219         (arm*-*-mingw32ce*): Add case.
9220         * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9221         HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
9222         [__MINGW32CE__] (strerror): New function.
9223         [__MINGW32CE__] (errno): Define to GetLastError.
9224         [__MINGW32CE__] (COUNTOF): New macro.
9225         (remote_open): Remove extra close call.
9226         * mem-break.c (delete_breakpoint_at): New function.
9227         * mem-break.h (delete_breakpoint_at): Declare.
9228         * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
9229         HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
9230         [USE_WIN32API] (read, write): Add char* casts.
9231         * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
9232         * server.h: Include wincecompat.h on Windows CE.
9233         [HAVE_ERRNO_H]: Check.
9234         (perror): Declare if not declared.
9235         * utils.c: Add stdlib.h, errno.h and malloc.h includes.
9236         (perror_with_name): Remove errno declaration.
9237         * wincecompat.h: New.
9238         * wincecompat.c: New.
9239         * win32-low.h: New.
9240         * win32-arm-low.c: New.
9241         * win32-i386-low.c: New.
9242         (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
9243         (OUTMSG2): Make it safe.
9244         (_T): New macro.
9245         (COUNTOF): New macro.
9246         (NUM_REGS): Get it from the low target.
9247         (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
9248         CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
9249         (thread_rec): Let low target handle debug registers.
9250         (child_add_thread): Likewise.
9251         (child_init_thread_list): Likewise.
9252         (continue_one_thread): Likewise.
9253         (regptr): New.
9254         (do_child_fetch_inferior_registers): Move to ...
9255         * win32-i386-low.c: ... here, and rename to ...
9256         (do_fetch_inferior_registers): ... this.
9257         * win32-low.c (child_fetch_inferior_registers):
9258         Go through the low target.
9259         (do_child_store_inferior_registers): Use regptr.
9260         (strwinerror): New function.
9261         (win32_create_inferior): Handle Windows CE.
9262         Use strwinerror instead of strerror on Windows error
9263         codes.  Add program to the error output.
9264         Don't close the main thread handle on Windows CE.
9265         (win32_attach): Use coredll.dll on Windows CE.
9266         (win32_kill): Close current process and current
9267         thread handles.
9268         (win32_detach): Use coredll.dll on Windows CE.
9269         (win32_resume): Let low target handle debug registers, and
9270         step request.
9271         (handle_exception): Add/Remove initial breakpoint.  Avoid
9272         non-existant WSTOPSIG on Windows CE.
9273         (win32_read_inferior_memory): Cast to remove warning.
9274         (win32_arch_string): Go through the low target.
9275         (initialize_low): Call set_breakpoint_data with the low
9276         target's breakpoint.
9277         * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
9278         FOP_REGNUM, mappings): Move to ...
9279         * win32-i386-low.c: ... here.
9280         * win32-low.c (win32_thread_info): Move to ...
9281         * win32-low.h: ... here.
9282         * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
9283         win32-arm-low.c and wincecompat.c.
9284         (all:): Add $EXEEXT.
9285         (install-only:): Likewise.
9286         (gdbserver:): Likewise.
9287         (gdbreplay:): Likewise.
9288         * config.in: Regenerate.
9289         * configure: Regenerate.
9290
9291 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
9292
9293         * win32-low.c: Rename typedef thread_info to
9294         win32_thread_info throughout.
9295
9296 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
9297
9298         * win32-i386-low.c: Rename to ...
9299         * win32-low.c: ... this.
9300         * configure.srv: Replace win32-i386-low.o with win32-low.o.
9301         * Makefile.in: Likewise.
9302
9303 2007-03-27  Pedro Alves  <pedro_alves@portugalmail.pt>
9304
9305         * remote-utils.c (monitor_output): Constify msg parameter.
9306         * server.h (monitor_output): Likewise.
9307         * win32-i386-low.c (handle_output_debug_string): New.
9308         (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
9309         handle_output_debug_string.
9310         (get_child_debug_event): Likewise.
9311
9312 2007-03-27  Mat Hostetter  <mat@lcs.mit.edu>
9313
9314         * server.c (main): Correct strtoul check.
9315
9316 2007-03-27  Jon Ringle  <jon@ringle.org>
9317
9318         * linux-low.c: Check __ARCH_HAS_MMU__ also.
9319
9320 2007-03-27  Brooks Moses  <brooks.moses@codesourcery.com>
9321
9322         * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
9323
9324 2007-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
9325
9326         * terminal.h: Check HAVE_SGTTY_H.
9327
9328 2007-02-27  Mat Hostetter  <mat@lcs.mit.edu>
9329
9330         * remote-utils.c (remote_open): Print out the assigned port number.
9331
9332 2007-02-26  Daniel Jacobowitz  <dan@codesourcery.com>
9333
9334         * remote-utils.c (monitor_output): New function.
9335         * server.c (debug_threads): Define here.
9336         (monitor_show_help): New function.
9337         (handle_query): Handle qRcmd.
9338         (main): Do not handle 'd' packet.
9339         * server.h (debug_threads, remote_debug, monitor_output): Declare.
9340         * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
9341         of debug_threads.
9342
9343 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
9344
9345         * Makefile.in (EXEEXT): New.
9346         (clean): Use $(EXEEXT).
9347
9348 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
9349
9350         * target.h (target_ops): Rename send_signal to request_interrupt,
9351         and remove enum target_signal parameter.
9352         * linux-low.c (linux_request_interrupt): Rename from
9353         linux_send_signal, and always send SIGINT.
9354         * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
9355         and always send SIGINT.
9356         * remote-utils.c (putpkt_binary): Call request_interrupt, instead
9357         of send_signal.
9358         (input_interrupt): Likewise.
9359
9360 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
9361
9362         * server.c (get_features_xml): Check if target implemented
9363         arch_string.
9364         * win32-i386-low.c (win32_arch_string): New.
9365         (win32_target_ops): Add win32_arch_string as arch_string member.
9366
9367 2007-02-22  Markus Deuling  <deuling@de.ibm.com>
9368
9369         * spu-low.c (spu_arch_string): New.
9370         (spu_target_ops): Add spu_arch_string.
9371
9372 2007-02-16  Daniel Jacobowitz  <dan@codesourcery.com>
9373
9374         * remote-utils.c: Remove HAVE_TERMINAL_H check.
9375         * configure.ac: Do not check for terminal.h.
9376         * configure, config.in: Regenerated.
9377
9378 2007-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
9379
9380         * Makefile.in (OBS): Add $(XML_BUILTIN).
9381         (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
9382         (clean): Update.
9383         (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
9384         (arm-with-iwmmxt.c): New.
9385         * config.in, configure: Regenerate.
9386         * configure.ac: Check for iWMMXt.  Handle srv_xmltarget,
9387         srv_xmlbuiltin, and srv_xmlfiles.  Define USE_XML.
9388         * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
9389         (arm*-*-linux*): Add iWMMXt and regset support.
9390         * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
9391         (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
9392         (arm_store_wmmxregset, target_regsets): New.
9393         * server.c (get_features_xml): Take annex argument.  Check builtin
9394         XML documents.
9395         (handle_query): Handle multiple annexes.
9396
9397 2007-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
9398
9399         * remote-utils.c [USE_WIN32API] (read, write): Define.
9400         (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
9401         write.
9402
9403 2007-01-09  Daniel Jacobowitz  <dan@codesourcery.com>
9404
9405         * linux-i386-low.c (the_low_target): Set arch_string.
9406         * linux-x86-64-low.c (the_low_target): Likewise.
9407         * linux-low.c (linux_arch_string): New.
9408         (linux_target_ops): Add it.
9409         * linux-low.h (struct linux_target_ops): Add arch_string.
9410         * server.c (write_qxfer_response): Use const void * for DATA.
9411         (get_features_xml): New.
9412         (handle_query): Handle qXfer:features:read.  Report it for qSupported.
9413         * target.h (struct target_ops): Add arch_string method.
9414
9415 2007-01-03  Denis Pilat  <denis.pilat@st.com>
9416             Daniel Jacobowitz  <dan@codesourcery.com>
9417
9418         * linux-low.c (linux_kill): Handle being called with no threads.
9419         * win32-i386-low.c (win32_kill): Likewise.
9420         (get_child_debug_event): Clear current_process_handle.
9421
9422 2006-12-30  Denis PILAT  <denis.pilat@st.com>
9423             Daniel Jacobowitz  <dan@codesourcery.com>
9424
9425         * remote-utils.c (remote_open): Check the type of specified
9426         serial port devices before opening them.
9427         * server.c (main): Kill the inferior if an error occurs during
9428         the first remote_open.
9429
9430 2006-12-05  Markus Deuling  <deuling@de.ibm.com>
9431
9432         * README: Update supported targets.
9433
9434 2006-11-28  Daniel Jacobowitz  <dan@codesourcery.com>
9435
9436         * Makefile.in (clean): Remove reg-mips64.c.
9437         (reg-mips64.c, reg-mips64.o): New rules.
9438         * configure.srv: Handle mips64.  Include regset support for mips.
9439         * linux-mips-low.c (union mips_register): New.
9440         (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
9441         (mips_breakpoint, mips_breakpoint_at): Use int.
9442         (mips_collect_register, mips_supply_register)
9443         (mips_collect_register_32bit, mips_supply_register_32bit)
9444         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9445         (mips_store_fpregset, target_regsets): New.
9446         * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
9447
9448 2006-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
9449
9450         * configure.srv: Add target "spu*-*-*".
9451         * Makefile.in (clean): Remove reg-spu.c.
9452         (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
9453         * spu-low.c: New file.
9454
9455 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
9456
9457         * configure.ac: Correct td_thr_tls_get_addr test.
9458         * configure: Regenerated.
9459
9460 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
9461
9462         * linux-low.c (linux_wait_for_event): Reformat.  Use the
9463         pass_signals array.
9464         * remote-utils.c (decode_address_to_semicolon): New.
9465         * server.c (pass_signals, handle_general_set): New.
9466         (handle_query): Mention QPassSignals for qSupported.
9467         (main): Call handle_general_set.
9468         * server.h (pass_signals, decode_address_to_semicolon): New.
9469
9470 2006-11-06  Daniel Jacobowitz  <dan@codesourcery.com>
9471
9472         * server.c (handle_query): Correct error handling for read_auxv.
9473
9474 2005-10-19  Ulrich Weigand  <uweigand@de.ibm.com>
9475
9476         * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
9477         and srv_linux_thread_db to yes.
9478         * linux-s390-low.c (s390_fill_gregset): New function.
9479         (target_regsets): Define data structure.
9480
9481 2006-10-17  Daniel Jacobowitz  <dan@codesourcery.com>
9482
9483         * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
9484         * configure.ac: Use it.  Define HAVE_TD_THR_TLS_GET_ADDR.
9485         * config.in, configure: Regenerated.
9486         * inferiors.c (gdb_id_to_thread): New function.
9487         (gdb_id_to_thread_id): Use it.
9488         * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
9489         * linux-low.h (struct process_info): Add th member.
9490         (thread_db_get_tls_address): New prototype.
9491         * remote-utils.c (decode_address): Make non-static.
9492         * server.c (handle_query): Handle qGetTLSAddr.
9493         * server.h (gdb_id_to_thread, decode_address): New prototypes.
9494         * target.h (struct target_ops): Add get_tls_address.
9495         * thread-db.c (maybe_attach_thread): Save the thread handle.
9496         (thread_db_get_tls_address): New.
9497
9498 2006-09-28  Daniel Jacobowitz  <dan@codesourcery.com>
9499
9500         * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
9501         (linux_resume_one_process): Take a siginfo_t *.  Update all
9502         callers.  Queue it if necessary.  Use PTRACE_SETSIGINFO.
9503         (struct pending_signals): Add a siginfo_t.
9504         (linux_wait_for_process): Always set last_status.
9505         (linux_wait_for_event): Use PTRACE_GETSIGINFO.
9506         (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
9507         * linux-low.h (struct process_info): Add last_status.
9508
9509 2006-09-21  Daniel Jacobowitz  <dan@codesourcery.com>
9510
9511         * remote-utils.c (try_rle): New function.
9512         (putpkt_binary): Use it.
9513
9514 2006-08-19  Daniel Jacobowitz  <dan@codesourcery.com>
9515
9516         * Makefile.in (clean): Clean reg-x86-64-linux.c.
9517         (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
9518         * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
9519         * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
9520         (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
9521         point registers.
9522
9523 2006-08-08  Richard Sandiford  <richard@codesourcery.com>
9524
9525         * server.c (terminal_fd): New variable.
9526         (old_foreground_pgrp): Likewise.
9527         (restore_old_foreground_pgrp): New function.
9528         (start_inferior): Record the terminal file descriptor in terminal_fd
9529         and its original foreground group in old_foreground_pgrp.  Register
9530         restore_old_foreground_pgrp with atexit().
9531
9532 2006-07-26  Daniel Jacobowitz  <dan@codesourcery.com>
9533
9534         * server.c (handle_query): Correct qPart to qXfer.
9535
9536 2006-07-22  Daniel Jacobowitz  <dan@codesourcery.com>
9537
9538         * configure.ac: Check for more headers which are missing on
9539         Windows.  Automatically supply -lwsock32 and USE_WIN32API.
9540         * configure.srv: Add Cygwin and mingw32.
9541         * remote-utils.c: Don't include headers unconditionally which
9542         are missing on mingw32.  Include <winsock.h> for mingw32.
9543         (remote_open): Adjust for mingw32 support.  Flush
9544         standard error after writing to it.
9545         (remote_close, putpkt_binary, input_interrupt, block_async_io)
9546         (unblock_async_io, enable_async_io, disable_async_io)
9547         (readchar, getpkt): Update for Winsock support.
9548         (prepare_resume_reply): Expect a protocol signal number.
9549         * server.c: Disable <sys/wait.h> on mingw32.
9550         (start_inferior): Adjust for mingw32 support.  Flush
9551         standard error after writing to it.
9552         (attach_inferior): Likewise.  Use protocol signal
9553         numbers.
9554         (main): Skip 'D' packet on mingw32.  Use protocol signal numbers
9555         and names.
9556         * win32-i386-low.c: New file.
9557         * Makefile.in (XM_CLIBS): Set.
9558         (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
9559         (win32-i386-low.o): New dependency rule.
9560         * linux-low.c (linux_wait): Use target signal numbers.
9561         * target.h (struct target_ops): Doc fix.
9562         * server.h (target_signal_to_name): New prototype.
9563         * gdbreplay.c: Don't include headers unconditionally which
9564         are missing on mingw32.  Include <winsock.h> for mingw32.
9565         (remote_close, remote_open): Adjust for Winsock support.
9566         * configure, config.in: Regenerated.
9567
9568 2006-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
9569
9570         * server.c (decode_xfer_read, write_qxfer_response): New.
9571         (handle_query): Take a packet length argument.  Handle
9572         qXfer:auxv:read instead of qPart:auxv:read.  Mention it in
9573         the qSupported response.
9574         (main): Update call to handle_query.
9575
9576 2006-06-22  Daniel Jacobowitz  <dan@codesourcery.com>
9577
9578         * remote-utils.c (remote_escape_output, remote_unescape_input): New.
9579         (putpkt_binary): Renamed from putpkt and adjusted for binary
9580         data.
9581         (putpkt): New wrapper for putpkt_binary.
9582         (readchar): Don't mask off the high bit.
9583         (decode_X_packet): New function.
9584         * server.c (main): Call putpkt_binary if a handler sets the packet
9585         length.  Save the length of the incoming packet.  Handle 'X'.
9586         * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
9587
9588 2006-06-21  Daniel Jacobowitz  <dan@codesourcery.com>
9589
9590         * server.c (handle_query): Handle qSupported.
9591
9592 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
9593
9594         * remote-utils.c (all_symbols_looked_up): New variable.
9595         (look_up_one_symbol): Check it.
9596         * server.h (look_up_one_symbol): New declaration.
9597         * thread-db.c (thread_db_init): Set all_symbols_looked_up.
9598
9599 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
9600
9601         * Makefile.in (linux-arm-low.o): Update dependencies.
9602         * linux-arm-low.c: Include "gdb_proc_service.h".
9603         (PTRACE_GET_THREAD_AREA): Define.
9604         (ps_get_thread_area): New function.
9605
9606 2006-05-09  Nathan Sidwell  <nathan@codesourcery.com>
9607
9608         * configure.srv (m68k*-*-uclinux*): New target.
9609         * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
9610         (linux_resume_one_process): Remove extraneous cast.
9611         (linux_read_offsets): New.
9612         (linux_target_op): Add linux_read_offsets on mmuless systems.
9613         * server.c (handle_query): Add qOffsets logic.
9614         * target.h (struct target_ops): Add read_offsets.
9615
9616 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
9617
9618         * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
9619         (PTRACE_GET_THREAD_AREA): Define.
9620         (ps_get_thread_area): New function.
9621         * Makefile.in (linux-i386-low.o, linux-mips-low.o)
9622         (linux-x86-64-low.o): Update.
9623
9624 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
9625
9626         * configure.ac: Remove checks for prfpregset_t.
9627         * gdb_proc_service.h: New file.
9628         * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
9629         new "gdb_proc_service.h".
9630         * proc-service.c: Likewise.
9631         (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
9632         (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
9633         * Makefile.in (gdb_proc_service_h): Updated.
9634         * configure, config.in: Regenerated.
9635
9636 2006-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
9637
9638         * remote-utils.c (prepare_resume_reply): Move declaration
9639         of gdb_id_from_wait to the top of the block.
9640
9641 2006-02-15  Daniel Jacobowitz  <dan@codesourcery.com>
9642
9643         * linux-low.c (regsets_store_inferior_registers): Read the regset
9644         from the target before filling it.
9645
9646 2006-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
9647
9648         * server.c (attach_inferior): Return SIGTRAP for a successful
9649         attach.
9650
9651 2006-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
9652
9653         * Makefile.in (OBS): Add version.o.
9654         (STAGESTUFF): Delete.
9655         (version.o): Add dependencies.
9656         (version.c): Replace rule.
9657         (clean): Remove version.c.
9658         * server.c (gdbserver_version): New.
9659         (gdbserver_usage): Use printf.
9660         (main): Handle --version and --help.
9661         * server.h (version, host_name): Add declarations.
9662
9663 2005-12-23  Eli Zaretskii  <eliz@gnu.org>
9664
9665         * linux-arm-low.c:
9666         * linux-arm-low.c:
9667         * inferiors.c:
9668         * i387-fp.h:
9669         * i387-fp.c:
9670         * gdbreplay.c:
9671         * regcache.c:
9672         * proc-service.c:
9673         * mem-break.h:
9674         * mem-break.c:
9675         * linux-x86-64-low.c:
9676         * linux-sh-low.c:
9677         * linux-s390-low.c:
9678         * linux-ppc64-low.c:
9679         * linux-ppc-low.c:
9680         * linux-mips-low.c:
9681         * linux-m68k-low.c:
9682         * linux-m32r-low.c:
9683         * linux-low.h:
9684         * linux-low.c:
9685         * linux-ia64-low.c:
9686         * linux-i386-low.c:
9687         * linux-crisv32-low.c:
9688         * thread-db.c:
9689         * terminal.h:
9690         * target.h:
9691         * target.c:
9692         * server.h:
9693         * server.c:
9694         * remote-utils.c:
9695         * regcache.h:
9696         * utils.c:
9697         * Makefile.in:
9698         * configure.ac:
9699         * gdbserver.1: Add (C) after Copyright.  Update the FSF
9700         address.
9701
9702 2005-11-13  Daniel Jacobowitz  <dan@codesourcery.com>
9703
9704         * linux-arm-low.c (arm_eabi_breakpoint): New variable.
9705         (arm_breakpoint_at): Recognize both breakpoints.
9706         (the_low_target): Use the correct breakpoint instruction.
9707
9708 2005-11-02  Daniel Jacobowitz  <dan@codesourcery.com>
9709
9710         * configure.srv (x86_64-*-linux*): Turn on thread_db support.
9711         * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
9712         (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
9713         (the_low_target): Update.
9714
9715 2005-10-25  Andreas Schwab  <schwab@suse.de>
9716
9717         * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
9718
9719         * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
9720         (ia64_num_regs): Reduce to 462.
9721
9722 2005-09-17  Daniel Jacobowitz  <dan@codesourcery.com>
9723
9724         * acinclude.m4: Correct quoting.
9725         * aclocal.m4: Regenerated.
9726
9727         Suggested by SZOKOVACS Robert <szo@ies.hu>:
9728         * thread-db.c (thread_db_err_str): Handle TD_VERSION.
9729         (thread_db_init): Call thread_db_err_str.
9730         * configure.ac: Check for TD_VERSION.
9731         * config.in, configure: Regenerated.
9732
9733 2005-07-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9734
9735         * server.h (error, fatal, warning): Add ATTR_FORMAT.
9736
9737 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
9738
9739         * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
9740         is not available.  Define HAVE_PTRACE_GETREGS if it is.
9741         * config.in, configure: Regenerated.
9742         * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
9743         * linux-i386-low.c, linux-m68k-low.c: Update to use
9744         HAVE_PTRACE_GETREGS.
9745         * linux-low.c (regsets_fetch_inferior_registers)
9746         (regsets_store_inferior_registers): Only return 0 if we processed
9747         GENERAL_REGS.
9748         * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
9749         * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
9750
9751 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
9752
9753         * inferiors.c (struct thread_info): Add gdb_id.
9754         (add_thread): Add gdb_id argument.
9755         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
9756         * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
9757         calls to add_thread.
9758         * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
9759         * server.c (handle_query): Use thread_to_gdb_id.
9760         (handle_v_cont, main): Use gdb_id_to_thread_id.
9761         * server.h (add_thread): Update prototype.
9762         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
9763         prototypes.
9764
9765 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
9766
9767         * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
9768         left-padded registers.
9769         * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
9770         * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
9771
9772 2005-07-01  Steve Ellcey  <sje@cup.hp.com>
9773
9774         * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
9775         * configure: Regenerate.
9776         * config.in: Regenerate.
9777         * server.h (NEED_DECLARATION_STRERROR):
9778         Replace with !HAVE_DECL_STRERROR.
9779
9780 2005-06-16  Daniel Jacobowitz  <dan@codesourcery.com>
9781
9782         * linux-low.c (linux_wait, linux_send_signal): Don't test
9783         an unsigned long variable for > 0 if it could be MAX_ULONG.
9784         * server.c (myresume): Likewise.
9785         * target.c (set_desired_inferior): Likewise.
9786
9787 2005-06-13  Mark Kettenis  <kettenis@gnu.org>
9788
9789         * configure.ac: Simplify and improve check for socklen_t.
9790         * configure, config.in: Regenerate.
9791
9792 2005-06-12  Daniel Jacobowitz  <dan@codesourcery.com>
9793
9794         * acconfig.h: Remove.
9795         * configure.ac: Add a test for socklen_t.  Use three-argument
9796         AC_DEFINE throughout.
9797         * config.in: Regenerated using autoheader 2.59.
9798         * configure: Regenerated.
9799
9800         * gdbreplay.c (socklen_t): Provide a default.
9801         (remote_open): Use socklen_t.
9802         * remote-utils.c (socklen_t): Provide a default.
9803         (remote_open): Use socklen_t.
9804         (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
9805         unsigned char.
9806
9807         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
9808         char for buffers.
9809         * linux-low.c (linux_read_memory, linux_write_memory)
9810         (linux_read_auxv): Likewise.
9811         * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
9812         (check_mem_write): Likewise.
9813         * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
9814         Likewise.
9815         * regcache.c (struct inferior_rgcache_data, registers_to_string)
9816         (registers_from_string, register_data): Likewise.
9817         * server.c (handle_query, main): Likewise.
9818         * server.h (convert_ascii_to_int, convert_int_to_ascii)
9819         (decode_M_packet): Likewise.
9820         * target.c (read_inferior_memory, write_inferior_memory): Likewise.
9821         * target.h (struct target_ops): Update read_memory, write_memory,
9822         and read_auxv.
9823         (read_inferior_memory, write_inferior_memory): Update.
9824         * linux-low.h (struct linux_target_ops): Change type of breakpoint
9825         to unsigned char *.
9826         * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
9827         linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
9828         linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
9829         linux-s390-low.c, linux-sh-low.c: Update for changes in
9830         read_inferior_memory and the_low_target->breakpoint.
9831
9832 2005-05-28  Daniel Jacobowitz  <dan@codesourcery.com>
9833
9834         * Makefile.in (SFILES): Add linux-ppc64-low.c.
9835         (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
9836         * configure.srv: Add powerpc64-*-linux*.
9837         * linux-ppc64-low.c: New file.
9838
9839 2005-05-23  Orjan Friberg  <orjanf@axis.com>
9840
9841         * linux-cris-low.c: New file with support for CRIS.
9842         * linux-crisv32-low.c: Ditto for CRISv32.
9843         * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
9844         (clean): Add reg-cris.c and reg-crisv32.c.
9845         Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
9846         reg-crisv32.o, and reg-crisv32.c to make rules.
9847         * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
9848         recognized targets.
9849
9850 2005-05-16  Ulrich Weigand  <uweigand@de.ibm.com>
9851
9852         * linux-low.c (fetch_register): Ensure buffer size is a multiple
9853         of sizeof (PTRACE_XFER_TYPE).
9854         (usr_store_inferior_registers): Likewise.  Zero out excess bytes.
9855
9856 2005-05-12  Orjan Friberg  <orjanf@axis.com>
9857
9858         * target.h (struct target_ops): Add insert_watchpoint,
9859         remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
9860         pointers for hardware watchpoint support.
9861         * linux-low.h (struct linux_target_ops): Ditto.
9862         * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
9863         (linux_stopped_by_watchpoint, linux_stopped_data_address): New.  Add
9864         to linux_target_ops.
9865         * remote-utils.c (prepare_resume_reply): Add watchpoint information to
9866         reply packet.
9867         * server.c (main): Recognize 'Z' and 'z' packets.
9868
9869 2005-05-10  Ulrich Weigand  <uweigand@de.ibm.com>
9870
9871         * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
9872         (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
9873         (the_low_target): Add new members.
9874
9875 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
9876
9877         * proc-service.c (ps_lgetregs): Search all_processes instead of
9878         all_threads.
9879
9880 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
9881
9882         * server.c (start_inferior): Change return type to int.
9883         (attach_inferior): Change sigptr to int *.
9884         (handle_v_cont, handle_v_requests): Change signal to int *.
9885         (main): Change signal to int.
9886
9887 2005-04-15  Kei Sakamoto  <sakamoto.kei@renesas.com>
9888
9889         * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
9890         * configure.srv: Add m32r*-*-linux*.
9891         * linux-m32r-low.c: New file.
9892
9893 2005-03-04  Daniel Jacobowitz  <dan@codesourcery.com>
9894
9895         * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
9896
9897 2005-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
9898
9899         * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
9900         Take unsigned long arguments for PIDs.
9901         * linux-low.c (add_process, linux_attach_lwp, linux_attach)
9902         (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
9903         (wait_for_sigstop, linux_resume_one_process)
9904         (regsets_fetch_inferior_registers, linux_send_signal)
9905         (linux_read_auxv): Likewise.  Update the types of variables holding
9906         PIDs.  Update format string specifiers.
9907         * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
9908         * remote-utils.c (prepare_resume_reply): Likewise.
9909         * server.c (cont_thread, general_thread, step_thread)
9910         (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
9911         unsigned long.
9912         (handle_query): Update format specifiers.
9913         (handle_v_cont, main): Use strtoul for thread IDs.
9914         * server.h (struct inferior_list_entry): Use unsigned long for ID.
9915         (add_thread, find_inferior_id, change_inferior_id, cont_thread)
9916         (general_thread, step_thread, thread_from_wait)
9917         (old_thread_from_wait): Update.
9918         * target.h (struct thread_resume): Use unsigned long for THREAD.
9919         (struct target_ops): Use unsigned long for arguments to attach and
9920         thread_alive.
9921
9922 2005-02-24  Daniel Jacobowitz  <dan@codesourcery.com>
9923
9924         * acinclude.m4: Include bfd/bfd.m4 directly.
9925         * configure.ac: Use AC_ARG_PROGRAM.  Suggested by Aron Griffis
9926         <agriffis@toolchain.org>.
9927         * aclocal.m4, configure: Regenerated.
9928
9929 2005-01-07  Andrew Cagney  <cagney@gnu.org>
9930
9931         * configure.ac: Rename configure.in, require autoconf 2.59.
9932         * configure: Re-generate.
9933
9934 2004-12-08  Daniel Jacobowitz  <dan@debian.org>
9935
9936         * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area.  Reset
9937         LIBS when finished.
9938         * aclocal.m4: Regenerated.
9939         * configure: Regenerated.
9940
9941 2004-11-21  Andreas Schwab  <schwab@suse.de>
9942
9943         * linux-m68k-low.c (m68k_num_gregs): Define.
9944         (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
9945         (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
9946         (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
9947         (m68k_breakpoint_at): New.  Add to the_low_target.
9948
9949         * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
9950         srv_linux_thread_db to yes.
9951
9952 2004-10-20  Joel Brobecker  <brobecker@gnat.com>
9953
9954         * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
9955         (ARCH_SET_FS): Likewise.
9956         (ARCH_GET_FS): Likewise.
9957         (ARCH_GET_GS): Likewise.
9958
9959 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
9960
9961         * linux-i386-low.c (ps_get_thread_area): New.
9962         * linux-x86-64-low.c (ps_get_thread_area): New.
9963         * linux-low.c: Include <sys/syscall.h>.
9964         (linux_kill_one_process): Don't kill the first thread here.
9965         (linux_kill): Kill the first thread here.
9966         (kill_lwp): New function.
9967         (send_sigstop, linux_send_signal): Use it.
9968         * proc-service.c: Clean up #ifdefs.
9969         (fpregset_info): Delete.
9970         (ps_lgetregs): Update and enable implementation.
9971         (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
9972         implementations.
9973         * remote-utils.c (struct sym_cache, symbol_cache): New.
9974         (input_interrupt): Print a clearer message.
9975         (async_io_enabled): New variable.
9976         (enable_async_io, disable_async_io): Use it.  Update comments.
9977         (look_up_one_symbol): Use the symbol cache.
9978         * thread-db.c (thread_db_look_up_symbols): New function.
9979         (thread_db_init): Update comments.  Call thread_db_look_up_symbols.
9980
9981 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
9982
9983         * configure.in: Test for -rdynamic.
9984         * configure: Regenerated.
9985         * Makefile (INTERNAL_LDFLAGS): New.
9986         (gdbserver, gdbreplay): Use it.
9987
9988 2004-09-02  Andrew Cagney  <cagney@gnu.org>
9989
9990         * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
9991
9992 2004-03-23  Daniel Jacobowitz  <drow@mvista.com>
9993
9994         * linux-low.c (linux_wait): Clear all_processes list also.
9995
9996 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
9997
9998         * linux-low.c: Include <errno.h>.  Remove extern declaration of
9999         errno.
10000
10001 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
10002
10003         * gdbreplay.c, server.h, utils.c: Update copyright years.
10004
10005 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
10006
10007         * server.c (main): Print child status or termination signal from
10008         variable 'signal', not 'sig'.
10009
10010 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
10011
10012         * linux-low.c (linux_read_memory): Change return type to
10013         int.  Check for and return error from ptrace().
10014         * target.c (read_inferior_memory): Change return type to int.  Pass
10015         back return status from the_target->read_memory().
10016         * target.h (struct target_ops): Adapt *read_memory() prototype.
10017         Update comment.
10018         (read_inferior_memory): Adapt prototype.
10019         * server.c (main): Return an error packet if
10020         read_inferior_memory() returns an error.
10021
10022 2004-03-04  Daniel Jacobowitz  <drow@mvista.com>
10023
10024         * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
10025         Unify with other clean targets.
10026
10027 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
10028
10029         * server.c (handle_v_cont): Call set_desired_inferior.
10030
10031 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
10032
10033         * remote-utils.c (prepare_resume_reply): Always supply "thread:".
10034
10035 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
10036
10037         * linux-low.c (linux_wait): Unblock async I/O.
10038         (linux_resume): Block and enable async I/O.
10039         * remote-utils.c (block_async_io, unblock_async_io): New functions.
10040         * server.h (block_async_io, unblock_async_io): Add prototypes.
10041
10042 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
10043
10044         * remote-utils.c (remote_open): Print a status notice after
10045         opening a TCP port.
10046         * server.c (attach_inferior): Print a status notice after
10047         attaching.
10048
10049 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
10050
10051         * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
10052
10053 2004-02-26  Daniel Jacobowitz  <drow@mvista.com>
10054
10055         * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
10056         error packet.
10057         * server.c, target.h: Update copyright years.
10058
10059 2004-02-25  Roland McGrath  <roland@redhat.com>
10060
10061         * target.h (struct target_ops): New member `read_auxv'.
10062         * server.c (handle_query): Handle qPart:auxv:read: query using that.
10063         * linux-low.c (linux_read_auxv): New function.
10064         (linux_target_ops): Initialize `read_auxv' member to that.
10065
10066 2004-02-17  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10067
10068         Committed by Jim Blandy  <jimb@redhat.com>.
10069
10070         * linux-s390-low.c (s390_num_regs): Update.
10071         (s390_regmap): Remove control registers.  Use __s390x__ predefine
10072         instead of GPR_SIZE to distiguish s390 and s390x targets.
10073
10074 2004-01-31  Daniel Jacobowitz  <drow@mvista.com>
10075
10076         * linux-low.c: Update copyright year.
10077         (check_removed_breakpoint): Clear pending_is_breakpoint.
10078         (linux_set_resume_request, linux_queue_one_thread)
10079         (resume_status_pending_p): New functions.
10080         (linux_continue_one_thread): Use process->resume.
10081         (linux_resume): Only resume threads if there are no pending events.
10082         * linux-low.h (struct process_info): Add resume request
10083         pointer.
10084
10085 2004-01-30  Daniel Jacobowitz  <drow@mvista.com>
10086
10087         * regcache.c (new_register_cache): Clear the allocated register
10088         buffer.  Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
10089
10090 2003-10-13  Daniel Jacobowitz  <drow@mvista.com>
10091
10092         * linux-low.c (linux_resume): Take a struct thread_resume *
10093         argument.
10094         (linux_wait): Update call.
10095         (resume_ptr): New static variable.
10096         (linux_continue_one_thread): Renamed from
10097         linux_continue_one_process.  Use resume_ptr.
10098         (linux_resume): Use linux_continue_one_thread.
10099         * server.c (handle_v_cont, handle_v_requests): New functions.
10100         (myresume): New function.
10101         (main): Handle 'v' case.
10102         * target.h (struct thread_resume): New type.
10103         (struct target_ops): Change argument of "resume" to struct
10104         thread_resume *.
10105         (myresume): Delete macro.
10106
10107 2003-08-08  H.J. Lu  <hongjiu.lu@intel.com>
10108
10109         * Makefile.in (install-only): Create dest dir. Support DESTDIR.
10110         (uninstall): Support DESTDIR.
10111
10112 Mon Jul 21 20:09:34 UTC 2003  Brendan Conoboy  <blc@redhat.com>
10113
10114         * configure.srv: Add xscale*linux copy of arm*linux entry.
10115
10116 2003-07-24  Daniel Jacobowitz  <drow@mvista.com>
10117
10118         * linux-arm-low.c (arm_reinsert_addr): New function.
10119         (the_low_target): Add arm_reinsert_addr.
10120
10121 2003-07-08  Mark Kettenis  <kettenis@gnu.org>
10122
10123         * mem-break.c: Remove whitespace at end of file.
10124
10125 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
10126
10127         * configure.in: Check whether we need to prototype strerror.
10128         * server.h: Optionally prototype strerror.
10129         * gdbreplay.c (perror_with_name): Use strerror.
10130         * linux-low.c (linux_attach_lwp): Use strerror.
10131         * utils.c (perror_with_name): Use strerror.
10132         * config.in, configure: Regenerated.
10133
10134 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
10135
10136         * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
10137         SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
10138
10139 2003-06-20  Daniel Jacobowitz  <drow@mvista.com>
10140
10141         * Makefile.in (SFILES): Update.
10142         * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
10143         low-sun3.c: Remove files.
10144
10145 2003-06-17  Daniel Jacobowitz  <drow@mvista.com>
10146
10147         * linux-low.c: Move comment to linux_thread_alive where it belonged.
10148         (linux_detach_one_process, linux_detach): New functions.
10149         (linux_target_ops): Add linux_detach.
10150         * server.c (main): Handle 'D' packet.
10151         * target.h (struct target_ops): Add "detach" member.
10152         (detach_inferior): Define.
10153
10154 2003-06-13  Mark Kettenis  <kettenis@gnu.org>
10155
10156         From Kelley Cook  <kelleycook@wideopenwest.com>:
10157         * configure.srv: Accept i[34567]86 variants.
10158
10159 2003-06-05  Daniel Jacobowitz  <drow@mvista.com>
10160
10161         * linux-low.c (linux_wait_for_event): Correct comment typos.
10162         (linux_resume_one_process): Call check_removed_breakpoint.
10163         (linux_send_signal): New function.
10164         (linux_target_ops): Add linux_send_signal.
10165         * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
10166         of kill.
10167         * target.h (struct target_ops): Add send_signal.
10168
10169 2003-05-29  Jim Blandy  <jimb@redhat.com>
10170
10171         * linux-low.c (usr_store_inferior_registers): Transfer buf in
10172         PTRACE_XFER_TYPE-sized chunks, not int-sized chunks.  Otherwise,
10173         if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
10174         away part of the register's value.
10175
10176 2003-03-26  Daniel Jacobowitz  <drow@mvista.com>
10177
10178         * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
10179         (linux_wait_for_event, linux_init_signals): Likewise.
10180
10181 2003-03-17  Daniel Jacobowitz  <drow@mvista.com>
10182
10183         * configure.in: Check for stdlib.h.
10184         * configure: Regenerated.
10185         * config.in: Regenerated.
10186
10187 2003-01-04  Andreas Schwab  <schwab@suse.de>
10188
10189         * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
10190
10191 2003-01-02  Andrew Cagney  <ac131313@redhat.com>
10192
10193         * Makefile.in: Remove obsolete code.
10194
10195 2002-11-20  Daniel Jacobowitz  <drow@mvista.com>
10196
10197         * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
10198         defined(PT_FPR0_HI).
10199
10200 2002-11-17  Stuart Hughes  <seh@zee2.com>
10201
10202         * linux-arm-low.c (arm_num_regs): Increase.
10203         (arm_regmap): Include status register.
10204
10205 2002-11-17  Daniel Jacobowitz  <drow@mvista.com>
10206
10207         * linux-low.c (register_addr): Remove incorrect -1 check.
10208
10209 2002-08-29  Daniel Jacobowitz  <drow@mvista.com>
10210
10211         * linux-low.c (linux_create_inferior): Call setpgid.  Return
10212         the new PID.
10213         (unstopped_p, linux_signal_pid): Remove.
10214         (linux_target_ops): Remove linux_signal_pid.
10215         * remote-utils.c (putpkt, input_interrupt): Use signal_pid
10216         global instead of target method.
10217         * target.h (struct target_ops): Remove signal_pid.  Update comment
10218         for create_inferior.
10219         * server.c (signal_pid): New variable.
10220         (create_inferior): Set signal_pid.  Block SIGTTOU and SIGTTIN in
10221         gdbserver.  Set the child to be the foreground process group.
10222         (attach_inferior): Set signal_pid.
10223
10224 2002-08-23  Daniel Jacobowitz  <drow@mvista.com>
10225
10226         * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
10227
10228 2002-08-20  Jim Blandy  <jimb@redhat.com>
10229
10230         * Makefile.in (LDFLAGS): Allow the configure script to establish a
10231         default for this.
10232
10233 2002-08-01  Andrew Cagney  <cagney@redhat.com>
10234
10235         * Makefile.in: Make chill references obsolete.
10236
10237 2002-07-24  Kevin Buettner  <kevinb@redhat.com>
10238
10239         * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
10240         * configure: Regenerate.
10241         * config.in: Regenerate.
10242
10243 2002-07-09  David O'Brien  <obrien@FreeBSD.org>
10244
10245         * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
10246         (perror_with_name, remote_close, remote_open, expect, play): Static.
10247
10248 2002-07-04  Michal Ludvig  <mludvig@suse.cz>
10249
10250         * linux-x86-64-low.c (x86_64_regmap): Make it an array of
10251         byte offsets instead of an array of indexes.
10252         (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
10253
10254 2002-06-13  Daniel Jacobowitz  <drow@mvista.com>
10255
10256         * regcache.c: Add comment.
10257
10258 2002-06-11  Daniel Jacobowitz  <drow@mvista.com>
10259
10260         * thread-db.c: New file.
10261         * proc-service.c: New file.
10262         * acinclude.m4: New file.
10263         * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
10264         proc-service.o, and thread-db.o.
10265         (linux-low.o): Add USE_THREAD_DB.
10266         * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
10267         HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
10268         * aclocal.m4: Regenerated.
10269         * config.in: Regenerated.
10270         * configure: Regenerated.
10271         * configure.in: Check for proc_service.h, sys/procfs.h,
10272         thread_db.h, and linux/elf.h headrs.
10273         Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
10274         PRFPREGSET_T_BROKEN.  Introduce srv_thread_depfiles and USE_THREAD_DB.
10275         Check for -lthread_db and thread support.
10276         * configure.srv: Enable thread_db support for ARM, i386, MIPS,
10277         PowerPC, and SuperH.
10278         * i387-fp.c: Constify arguments.
10279         * i387-fp.h: Likewise.
10280         * inferiors.c: (struct thread_info): Renamed from
10281         `struct inferior_info'.  Remove PID member.  Use generic inferior
10282         list header.  All uses updated.
10283         (inferiors, signal_pid): Removed.
10284         (all_threads): New variable.
10285         (get_thread): Define.
10286         (add_inferior_to_list): New function.
10287         (for_each_inferior): New function.
10288         (change_inferior_id): New function.
10289         (add_inferior): Removed.
10290         (remove_inferior): New function.
10291         (add_thread): New function.
10292         (free_one_thread): New function.
10293         (remove_thread): New function.
10294         (clear_inferiors): Use for_each_inferior and free_one_thread.
10295         (find_inferior): New function.
10296         (find_inferior_id): New function.
10297         (inferior_target_data): Update argument type.
10298         (set_inferior_target_data): Likewise.
10299         (inferior_regcache_data): Likewise.
10300         (set_inferior_regcache_data): Likewise.
10301         * linux-low.c (linux_bp_reinsert): Remove.
10302         (all_processes, stopping_threads, using_thrads)
10303         (struct pending_signals, debug_threads, pid_of): New.
10304         (inferior_pid): Replace with macro.
10305         (struct inferior_linux_data): Remove.
10306         (get_stop_pc, add_process): New functions.
10307         (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
10308         Use add_process and add_thread.
10309         (linux_attach_lwp): New function, based on old linux_attach.  Use
10310         add_process and add_thread.  Set stop_expected for new threads.
10311         (linux_attach): New function.
10312         (linux_kill_one_process): New function.
10313         (linux_kill): Kill all LWPs.
10314         (linux_thread_alive): Use find_inferior_id.
10315         (check_removed_breakpoints, status_pending_p): New functions.
10316         (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
10317         Update.  Use WNOHANG.  Wait for cloned processes also.  Update process
10318         struct for the found process.
10319         (linux_wait_for_event): New function.
10320         (linux_wait): Use it.  Support LWPs.
10321         (send_sigstop, wait_for_sigstop, stop_all_processes)
10322         (linux_resume_one_process, linux_continue_one_process): New functions.
10323         (linux_resume): Support LWPs.
10324         (REGISTER_RAW_SIZE): Remove.
10325         (fetch_register): Use register_size instead.  Call supply_register.
10326         (usr_store_inferior_registers): Likewise.  Call collect_register.
10327         Fix recursive case.
10328         (regsets_fetch_inferior_registers): Improve error message.
10329         (regsets_store_inferior_registers): Add debugging.
10330         (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
10331         (unstopped_p, linux_signal_pid): New functions.
10332         (linux_target_ops): Add linux_signal_pid.
10333         (linux_init_signals): New function.
10334         (initialize_low): Call it.  Initialize using_threads.
10335         * regcache.c (inferior_regcache_data): Add valid
10336         flag.
10337         (get_regcache): Fetch registers lazily.  Add fetch argument
10338         and update all callers.
10339         (regcache_invalidate_one, regcache_invalidate): New
10340         functions.
10341         (new_register_cache): Renamed from create_register_cache.
10342         Return the new regcache.
10343         (free_register_cache): Change argument to a void *.
10344         (registers_to_string, registers_from_string): Call get_regcache
10345         with fetch flag set.
10346         (register_data): Make static.  Pass fetch flag to get_regcache.
10347         (supply_register): Call get_regcache with fetch flag clear.
10348         (collect_register): Call get_regcache with fetch flag set.
10349         (collect_register_as_string): New function.
10350         * regcache.h: Update.
10351         * remote-utils.c (putpkt): Flush after debug output and use
10352         stderr.
10353         Handle input interrupts while waiting for an ACK.
10354         (input_interrupt): Use signal_pid method.
10355         (getpkt): Flush after debug output and use stderr.
10356         (outreg): Use collect_register_as_string.
10357         (new_thread_notify, dead_thread_notify): New functions.
10358         (prepare_resume_reply): Check using_threads.  Set thread_from_wait
10359         and general_thread.
10360         (look_up_one_symbol): Flush after debug output.
10361         * server.c (step_thread, server_waiting): New variables.
10362         (start_inferior): Don't use signal_pid.  Update call to mywait.
10363         (attach_inferior): Update call to mywait.
10364         (handle_query): Handle qfThreadInfo and qsThreadInfo.
10365         (main): Don't fetch/store registers explicitly.  Use
10366         set_desired_inferior.  Support proposed ``Hs'' packet.  Update
10367         calls to mywait.
10368         * server.h: Update.
10369         (struct inferior_list, struct_inferior_list_entry): New.
10370         * target.c (set_desired_inferior): New.
10371         (write_inferior_memory): Constify.
10372         (mywait): New function.
10373         * target.h: Update.
10374         (struct target_ops): New signal_pid method.
10375         (mywait): Removed macro, added prototype.
10376
10377         * linux-low.h (regset_func): Removed.
10378         (regset_fill_func, regset_store_func): New.
10379         (enum regset_type): New.
10380         (struct regset_info): Add type field.  Use new operation types.
10381         (struct linux_target_ops): stop_pc renamed to get_pc.
10382         Add decr_pc_after_break and breakpoint_at.
10383         (get_process, get_thread_proess, get_process_thread)
10384         (strut process_info, all_processes, linux_attach_lwp)
10385         (thread_db_init): New.
10386
10387         * linux-arm-low.c (arm_get_pc, arm_set_pc,
10388         arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
10389         (the_low_target): Add new members.
10390         * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
10391         (i386_store_fpxregset): Constify.
10392         (target_regsets): Add new kind identifier.
10393         (i386_get_pc): Renamed from i386_stop_pc.  Simplify.
10394         (i386_set_pc): Add debugging.
10395         (i386_breakpoint_at): New function.
10396         (the_low_target): Add new members.
10397         * linux-mips-low.c (mips_get_pc, mips_set_pc)
10398         (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
10399         (mips_breakpoint_at): New.
10400         (the_low_target): Add new members.
10401         * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
10402         (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
10403         (the_low_target): Add new members.
10404         * linux-sh-low.c (sh_get_pc, sh_set_pc)
10405         (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
10406         (the_low_target): Add new members.
10407         * linux-x86-64-low.c (target_regsets): Add new kind
10408         identifier.
10409
10410 2002-05-15  Daniel Jacobowitz  <drow@mvista.com>
10411
10412         From Martin Pool <mbp@samba.org>:
10413         * server.c (gdbserver_usage): New function.
10414         (main): Call it.
10415
10416 2002-05-14  Daniel Jacobowitz  <drow@mvista.com>
10417
10418         * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
10419         stop_at -> stop_pc.
10420
10421 2002-05-04  Andrew Cagney  <ac131313@redhat.com>
10422
10423         * Makefile.in: Remove obsolete code.
10424
10425 2002-04-24  Michal Ludvig  <mludvig@suse.cz>
10426
10427         * linux-low.c (regsets_fetch_inferior_registers),
10428         (regsets_store_inferior_registers): Removed cast to int from
10429         ptrace() calls.
10430         * regcache.h: Added declaration of struct inferior_info.
10431
10432 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
10433
10434         * inferiors.c (struct inferior_info): Add regcache_data.
10435         (add_inferior): Call create_register_cache.
10436         (clear_inferiors): Call free_register_cache.
10437         (inferior_regcache_data, set_inferior_regcache_data): New functions.
10438         * regcache.c (struct inferior_regcache_data): New.
10439         (registers): Remove.
10440         (get_regcache): New function.
10441         (create_register_cache, free_register_cache): New functions.
10442         (set_register_cache): Don't initialize the register cache here.
10443         (registers_to_string, registers_from_string, register_data): Call
10444         get_regcache.
10445         * regcache.h: Add prototypes.
10446         * server.h: Likewise.
10447
10448 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
10449
10450         * mem-break.c: New file.
10451         * mem-break.h: New file.
10452         * Makefile.in: Add mem-break.o rule; update server.h
10453         dependencies.
10454         * inferiors.c (struct inferior_info): Add target_data
10455         member.
10456         (clear_inferiors): Free target_data member if set.
10457         (inferior_target_data, set_inferior_target_data): New functions.
10458         * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
10459         (i386_stop_pc, i386_set_pc): New.  Add to the_low_target.
10460         * linux-low.c (linux_bp_reinsert): New variable.
10461         (struct inferior_linux_data): New.
10462         (linux_create_inferior): Use set_inferior_target_data.
10463         (linux_attach): Likewise.  Call add_inferior.
10464         (linux_wait_for_one_inferior): New function.
10465         (linux_wait): Call it.
10466         (linux_write_memory): Add const.
10467         (initialize_low): Call set_breakpoint_data.
10468         * linux-low.h (struct linux_target_ops): Add breakpoint
10469         handling members.
10470         * server.c (attach_inferior): Remove extra add_inferior
10471         call.
10472         * server.h: Include mem-break.h.  Update inferior.c
10473         prototypes.
10474         * target.c (read_inferior_memory)
10475         (write_inferior_memory): New functions.
10476         * target.h (read_inferior_memory)
10477         (write_inferior_memory): Change macros to prototypes.
10478         (struct target_ops): Update comments.  Add const to write_memory
10479         definition.
10480
10481 2002-04-11  Daniel Jacobowitz  <drow@mvista.com>
10482
10483         * linux-low.c (usr_store_inferior_registers): Support
10484         registers which are allowed to fail to store.
10485         * linux-low.h (linux_target_ops): Likewise.
10486         * linux-ppc-low.c (ppc_regmap): Support FPSCR.
10487         (ppc_cannot_store_register): FPSCR may not be storable.
10488
10489 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
10490
10491         * server.h: Include <string.h> if HAVE_STRING_H.
10492         * ChangeLog: Correct paths in last ChangeLog entry.
10493
10494 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
10495
10496         * linux-low.h: Remove obsolete prototypes.
10497         (struct linux_target_ops): New.
10498         (extern the_low_target): New.
10499         * linux-low.c (num_regs, regmap): Remove declarations.
10500         (register_addr): Use the_low_target explicitly.
10501         (fetch_register): Likewise.
10502         (usr_fetch_inferior_registers): Likewise.
10503         (usr_store_inferior_registers): Likewise.
10504         * linux-arm-low.c (num_regs): Remove.
10505         (arm_num_regs): Define.
10506         (arm_regmap): Renamed from regmap, made static.
10507         (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
10508         made static.
10509         (arm_cannot_store_register): Renamed from cannot_store_register,
10510         made static.
10511         (the_low_target): New.
10512         * linux-i386-low.c (num_regs): Remove.
10513         (i386_num_regs): Define.
10514         (i386_regmap): Renamed from regmap, made static.
10515         (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
10516         made static.
10517         (i386_cannot_store_register): Renamed from cannot_store_register,
10518         made static.
10519         (the_low_target): New.
10520         * linux-ia64-low.c (num_regs): Remove.
10521         (ia64_num_regs): Define.
10522         (ia64_regmap): Renamed from regmap, made static.
10523         (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
10524         made static.
10525         (ia64_cannot_store_register): Renamed from cannot_store_register,
10526         made static.
10527         (the_low_target): New.
10528         * linux-m68k-low.c (num_regs): Remove.
10529         (m68k_num_regs): Define.
10530         (m68k_regmap): Renamed from regmap, made static.
10531         (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
10532         made static.
10533         (m68k_cannot_store_register): Renamed from cannot_store_register,
10534         made static.
10535         (the_low_target): New.
10536         * linux-mips-low.c (num_regs): Remove.
10537         (mips_num_regs): Define.
10538         (mips_regmap): Renamed from regmap, made static.
10539         (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
10540         made static.
10541         (mips_cannot_store_register): Renamed from cannot_store_register,
10542         made static.
10543         (the_low_target): New.
10544         * linux-ppc-low.c (num_regs): Remove.
10545         (ppc_num_regs): Define.
10546         (ppc_regmap): Renamed from regmap, made static.
10547         (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
10548         made static.
10549         (ppc_cannot_store_register): Renamed from cannot_store_register,
10550         made static.
10551         (the_low_target): New.
10552         * linux-s390-low.c (num_regs): Remove.
10553         (s390_num_regs): Define.
10554         (s390_regmap): Renamed from regmap, made static.
10555         (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
10556         made static.
10557         (s390_cannot_store_register): Renamed from cannot_store_register,
10558         made static.
10559         (the_low_target): New.
10560         * linux-sh-low.c (num_regs): Remove.
10561         (sh_num_regs): Define.
10562         (sh_regmap): Renamed from regmap, made static.
10563         (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
10564         made static.
10565         (sh_cannot_store_register): Renamed from cannot_store_register,
10566         made static.
10567         (the_low_target): New.
10568         * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
10569         (the_low_target): New.
10570
10571 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
10572
10573         * Makefile.in: Add stamp-h target.
10574         * configure.in: Create stamp-h.
10575         * configure: Regenerated.
10576
10577 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
10578
10579         * inferiors.c: New file.
10580         * target.c: New file.
10581         * target.h: New file.
10582         * Makefile.in:  Add target.o and inferiors.o.  Update
10583         dependencies.
10584         * linux-low.c (inferior_pid): New static variable,
10585         moved from server.c.
10586         (linux_create_inferior): Renamed from create_inferior.
10587         Call add_inferior.  Return 0 on success instead of a PID.
10588         (linux_attach): Renamed from myattach.
10589         (linux_kill): Renamed from kill_inferior.  Call clear_inferiors ().
10590         (linux_thread_alive): Renamed from mythread_alive.
10591         (linux_wait): Renamed from mywait.  Call clear_inferiors () if the
10592         child dies.
10593         (linux_resume): Renamed from myresume.  Add missing ``return 0''.
10594         (regsets_store_inferior_registers): Correct error message.
10595         Add missing ``return 0''.
10596         (linux_fetch_registers): Renamed from fetch_inferior_registers.
10597         (linux_store_registers): Renamed from store_inferior_registers.
10598         (linux_read_memory): Renamed from read_inferior_memory.
10599         (linux_write_memory): Renamed from write_inferior_memory.
10600         (linux_target_ops): New structure.
10601         (initialize_low): Call set_target_ops ().
10602         * remote-utils.c (unhexify): New function.
10603         (hexify): New function.
10604         (input_interrupt): Send signals to ``signal_pid''.
10605         * server.c (inferior_pid): Remove.
10606         (start_inferior): Update create_inferior call.
10607         (attach_inferior): Call add_inferior.
10608         (handle_query): New function.
10609         (main): Call handle_query for `q' packets.
10610         * server.h: Include "target.h".  Remove obsolete prototypes.
10611         Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
10612
10613 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
10614
10615         * Makefile.in: Add WARN_CFLAGS.  Update configury
10616         dependencies.
10617         * configure.in: Check for <string.h>
10618         * configure: Regenerate.
10619         * config.in: Regenerate.
10620         * gdbreplay.c: Include needed system headers.
10621         (remote_open): Remove strchr prototype.
10622         * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
10623         * regcache.c (supply_register): Change buf argument to const void *.
10624         (supply_register_by_name): Likewise.
10625         (collect_register): Change buf argument to void *.
10626         (collect_register_by_name): Likewise.
10627         * regcache.h: Add missing prototypes.
10628         * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
10629         * server.c (handle_query): New function.
10630         (attached): New static variable, moved out of main.
10631         (main): Quiet longjmp clobber warnings.
10632         * server.h: Add ATTR_NORETURN and ATTR_FORMAT.  Update prototypes.
10633         * utils.c (error): Remove NORETURN.
10634         (fatal): Likewise.