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